Skip to content
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

ZXGraphlikeOptimisation() can cause RunTime error #1566

Open
IlanIwumbwe opened this issue Sep 5, 2024 · 1 comment
Open

ZXGraphlikeOptimisation() can cause RunTime error #1566

IlanIwumbwe opened this issue Sep 5, 2024 · 1 comment

Comments

@IlanIwumbwe
Copy link

Benny and I found this by generating a random Pytket circuit.

When we run this code:

from pytket import Circuit
from pytket.passes import ZXGraphlikeOptimisation

main_circ = Circuit(6, 0, "main_circ")

# Applying gates 
main_circ.Rx(-0.78,3)
main_circ.Rx(1.069,5)
main_circ.CX(0, 3)
main_circ.CX(3, 5)
main_circ.CX(0, 5)
main_circ.Rx(1.069,3)
main_circ.Rx(-5.958,4)
main_circ.CX(3, 4)
main_circ.CX(3, 5)
main_circ.CX(0, 3)

ZXGraphlikeOptimisation().apply(main_circ)

We get this runtime error:

RuntimeError: Error during extraction from ZX diagram: diagram does not have gflow

We tried to minimize the test case but deleting any one of the gates would make it work. Additionally, if any of the arguments to the rotation gates are integers, it also works.

@cqc-alec
Copy link
Collaborator

cqc-alec commented Sep 5, 2024

Any ideas @willsimmons1465 ? Seems like ZXGraphlikeOptimisation should be applicable to this circuit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants