yao-cqc

Results 10 issues of yao-cqc

As suggested in https://arxiv.org/abs/quant-ph/0406176 we should be able to further reduce the CX count by decomposing each Multiplexed Ry(Rz) reversed so one CX can be cancelled with a CX from...

stale

Most of the backends now rely on `RebaseCustom` and `RebaseSquash` passes. Since these two passes take a circuit-to-circuit function (e.g. `basis_tk2_replacement`) as an argument, they can't be completely serialised. This...

```python from pytket.circuit import Circuit from pytket.passes import SynthesiseTK, CommuteThroughMultis, RemoveRedundancies c = Circuit(2).Rz(0.3,0).CX(0,1).Rz(-0.3,0).CX(0,1) SynthesiseTK().apply(c) # [TK1(0.5, 0.5, 3.5) q[0]; TK1(0, 3, 3) q[1]; TK2(0.5, 0, 0) q[0], q[1]; TK2(0.5,...

enhancement
stale

For instance, `Circuit.n_gates` is a property while `Circuit.n_2qb_gates` and `Circuit.n_1qb_gates` are methods. I'm also not sure whether `Circuit.depth` should be a method or a property.

It would be nice to support ``` from pytket import Circuit circ = Circuit() m_qreg = circ.add_q_register("m", 2) m_creg = circ.add_c_register("c", 2) circ.measure_register(m_qreg, m_creg) ```

stale
classical-logic

# Description Please summarise the changes. # Related issues Fixes #1615 # Checklist - [x] I have performed a self-review of my code. - [ ] I have commented hard-to-understand...

```python from pytket import Circuit from pytket.wasm import WasmFileHandler wasfile = WasmFileHandler("add1.wasm") c = Circuit(1) a = c.add_c_register("a", 8) c.add_wasm_to_reg("add_one", wasfile, [a], [a]) d = Circuit() d.append(c) d ``` shows...

bug
classical-logic

```python range_predicate = RangePredicateOp(6, 0, 27) c = Circuit(0, 8) c.add_gate(range_predicate, [0, 1, 2, 3, 4, 5, 6], condition=Bit(7)) qasm = circuit_to_qasm_str(c, header="hqslib1") ``` prints ``` OPENQASM 2.0; include "hqslib1.inc";...

bug
classical-logic