-
Notifications
You must be signed in to change notification settings - Fork 605
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
Draw qubit reset and postselection with matplotlib #4832
Conversation
Thanks @albi3ro, this looks great! One minor suggestion, which could be done in a separate PR: could the measurement symbol (semicircle and arrow) be moved downwards inside the box so that it is centre-aligned vertically? |
@trbromley like this? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4832 +/- ##
==========================================
- Coverage 99.65% 99.64% -0.02%
==========================================
Files 383 383
Lines 34582 34341 -241
==========================================
- Hits 34462 34218 -244
- Misses 120 123 +3 ☔ View full report in Codecov by Sentry. |
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.
Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
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.
The link to this PR still needs to be added to the changelog, but other than that looks good! Thanks Christina, the singledispatch was a really good change as well
Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
what is the plan for conditionals? are we going to restore them to the current behaviour, or do something all-new? not entirely sure why it should be done in another PR, but i'm fine to keep things separated with a plan laid out |
@timmysilv PR #4850 . Depends on Mudit's PR #4803 . |
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.
looks good!
This PR depends on #4832 and #4803 ![midmeasure_mpl](https://github.com/PennyLaneAI/pennylane/assets/6364575/06147924-684d-4bd5-a8aa-5a266bf19852) [sc-48302] --------- Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
This PR depends on #4832 and #4803 ![midmeasure_mpl](https://github.com/PennyLaneAI/pennylane/assets/6364575/06147924-684d-4bd5-a8aa-5a266bf19852) [sc-48302] --------- Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
This PR accomplishes two main things:
|0>
box.There is a regression in the handling of conditionals, as drawing conditionals will be standardized in a follow-up PR.
While doing so, I also:
functools.singledispatch
to register custom ways to display operationsConditional
to theops.op_math
submodule to avoid a circular dependency. This can be accomplished in a separate PR instead.[sc-50118]