Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Match symbolic phase gadgets #132

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Conversation

y-richie-y
Copy link
Contributor

@y-richie-y y-richie-y commented Aug 22, 2023

from sympy.abc import phi, psi
from pyzx import full_reduce
from pyzx import Circuit

c = Circuit(1)
c.add_gate("ZPhase", 0, phi)
c.add_gate("NOT", 0)
c.add_gate("ZPhase", 0, psi)
# c.add_gate("NOT", 0)

g = c.to_graph()
draw(g)
full_reduce(g)
draw(g)
image

Previously:
image

@jvdwetering jvdwetering merged commit 787d8e5 into zxcalc:master Aug 22, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants