-
Notifications
You must be signed in to change notification settings - Fork 586
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
BugFix: draw_mpl fails with adjointed CNOT #5149
Conversation
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 for working on this, it looks great!
Checking it with the user hat, all my examples now work correctly 😄
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5149 +/- ##
==========================================
- Coverage 99.69% 99.68% -0.01%
==========================================
Files 394 394
Lines 36130 35862 -268
==========================================
- Hits 36019 35750 -269
- Misses 111 112 +1 ☔ 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.
nice fix!
Context:
Error raised when calling
draw_mpl
on a circuit containing anAdjoint(CNOT)
. This is due tounwrap_control
incorrectly consideringAdjoint
as a controlled operation because it has thecontrol_wires
property, and double counting the same control wires when generating default control values.Description of the Change:
A check is added to only append more control values if the operation in focus is indeed a controlled operation.
Related GitHub Issues:
#5064
Related Shortcut Story
[sc-53947]