Skip to content

CliffordSimp does not simplify consecutive swaps #2065

@daniel-mills-cqc

Description

@daniel-mills-cqc

For example

from pytket import Circuit
from pytket.passes import CliffordSimp

circuit = Circuit(3).CX(0,1).CX(1,0).CX(0,1).CX(1,0).CX(0,1).CX(1,0)
circuit_orig = circuit.copy()
CliffordSimp(allow_swaps=False).apply(circuit)
circuit_orig.n_2qb_gates(), circuit.n_2qb_gates()

demonstrates that the gate count before and after are the same. The compiled circuit should be the identity, with no swaps. I imagine swaps are added during the optimisation, even though the final circuit does not need them, so I'm not sure if this is expected behaviour. CliffordResynthesis does work when swaps are not allowed.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions