-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CliffordResynthesis
pass can create invalid circuits
#1468
Labels
bug
Something isn't working
Comments
A much smaller example: from pytket.circuit import Circuit
from pytket.passes import CliffordResynthesis
c = Circuit(6)
c.CZ(1, 4)
c.CZ(2, 3)
c.SWAP(3, 5)
c.CZ(1, 5)
c.SWAP(3, 5)
c.CZ(4, 5)
c.SWAP(1, 4)
c.CZ(1, 2)
c.CZ(3, 4)
c.SWAP(4, 5)
c.CZ(0, 3)
c.CZ(1, 5)
c.CZ(0, 4)
c.replace_SWAPs()
CliffordResynthesis().apply(c)
cmds = c.get_commands()
print(cmds) generates the same assertion error. |
The implicit qubit permutation was a red herring. This even simpler example exhibits the problem: from pytket.circuit import Circuit
from pytket.passes import CliffordResynthesis
c = Circuit(6)
c.CZ(1, 4)
c.CZ(2, 3)
c.CZ(1, 3)
c.CZ(4, 5)
c.CZ(4, 2)
c.CZ(3, 1)
c.CZ(0, 3)
c.CZ(4, 1)
c.CZ(0, 5)
CliffordResynthesis().apply(c)
cmds = c.get_commands()
print(cmds) |
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
generates a critical assertion error while attempting to construct the command list.
circ.json
The text was updated successfully, but these errors were encountered: