-
Notifications
You must be signed in to change notification settings - Fork 48
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
Avoid blow-up of complexity when squashing symbolic circuits #969
Conversation
from sympy import Symbol
from pytket.circuit import Circuit, OpType
from pytket.passes import SynthesiseTK
a = [Symbol(f"a_{i}") for i in range(100)]
c = Circuit(3)
for i in range(10):
c.add_gate(OpType.CX, [], [0, 1])
c.add_gate(OpType.Rz, [a[i]], [0])
c.add_gate(OpType.CX, [], [1, 2])
SynthesiseTK().apply(c) pytket 1.17 took 14.3s. The resulting circuit json is 2.7MB Not sure why it still takes that long to run. |
Hmm, yeah I'm surprised it took so long... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I don't see any easy alternative to this...
Could you add this new argument to compiler_pass_v1.json
?
Done. |
Fixes #963 .