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

Operations/measurements on all wires are drawn correctly with mid-circuit measurements #5501

Merged
merged 5 commits into from
Apr 12, 2024

Conversation

mudit2812
Copy link
Contributor

Context:
Bug fix for #5499

Description of the Change:
Adding labels to layer strings only extends to wires, not classical bits.

Benefits:
Drawer works correctly with mid-circuit measurements

Possible Drawbacks:

Related GitHub Issues:

@mudit2812 mudit2812 linked an issue Apr 11, 2024 that may be closed by this pull request
1 task
@mudit2812
Copy link
Contributor Author

[sc-61127]

Copy link

codecov bot commented Apr 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.66%. Comparing base (1089bb3) to head (3fd8787).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5501      +/-   ##
==========================================
- Coverage   99.66%   99.66%   -0.01%     
==========================================
  Files         402      404       +2     
  Lines       37635    37540      -95     
==========================================
- Hits        37510    37415      -95     
  Misses        125      125              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@dwierichs dwierichs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for the quick fix @mudit2812
And nice that you caught the analogous measurement problem, too!
Only have one weak suggestion

pennylane/drawer/tape_text.py Show resolved Hide resolved
tests/drawer/test_draw.py Show resolved Hide resolved
@mudit2812 mudit2812 enabled auto-merge (squash) April 12, 2024 13:57
@mudit2812 mudit2812 merged commit 3f52824 into master Apr 12, 2024
38 checks passed
@mudit2812 mudit2812 deleted the mcm-draw-no-ops branch April 12, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Operators with wires=None are drawn onto classical control wires
3 participants