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

Circuit renderer does not handle Phase OpType #703

Closed
CalMacCQ opened this issue Jan 3, 2023 · 0 comments · Fixed by #754
Closed

Circuit renderer does not handle Phase OpType #703

CalMacCQ opened this issue Jan 3, 2023 · 0 comments · Fixed by #754
Labels
bug Something isn't working

Comments

@CalMacCQ
Copy link
Contributor

CalMacCQ commented Jan 3, 2023

Adding a OpType.Phase to a Circuit seems to cause the circuit render to not show the circuit diagram.

We could make it so that the OpType.Phase is invisible and add the numerical value of the phase alongside the Circuit somewhere. We should also think about how to represent conditional phase as this is what the Phase OpType was introduced to handle.

circ = Circuit(2).H(0).CX(0,1)

render_circuit_jupyter(circ) # This works fine

But If I then add a Phase OpType...

circ.Phase(0.25)
render_circuit_jupyter(circ) # diagram doesn't show
@CalMacCQ CalMacCQ added the bug Something isn't working label Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant