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
Add operator IDs into the text based circuit draw function. #4749
Add operator IDs into the text based circuit draw function. #4749
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4749 +/- ##
==========================================
- Coverage 99.64% 99.64% -0.01%
==========================================
Files 380 380
Lines 34242 33993 -249
==========================================
- Hits 34121 33871 -250
- Misses 121 122 +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.
Looks great to me 🎉 Nice to close such a backlogged issue.
No comments or concerns from my side. I'm happy to approve :)
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.
🎉
updating the operator label also makes the ID appear in the MPL drawer, so I figure it wouldn't hurt to mention it's added there as well. otherwise lgtm!
Co-authored-by: Matthew Silverman <ma.silv11@gmail.com>
Thanks @JustinWoodring for your contribution! 🏆 This should be released as part of v0.34 in early January. If you would like us to tag you as part of our Twitter/X marketing, feel free to optionally share your handle here. |
I don't use Twitter, but if you do similar stuff on LinkedIn, my LinkedIn is, https://www.linkedin.com/in/justin-woodring/ 😃 |
Thanks! |
…`qcut.PrepareNode` (#5613) **Context:** `MeasureNode` and `PrepareNode` automatically have a UUID (#2224), which is being printed in tape text (#4749) **Description of the Change:** Update the docs of the `qcut` module to reflect some minor changes ,mostly in formatting/tape printing default settings. Update the `label` method of `MeasureNode` and `PrepareNode` to not include their `id`. **Benefits:** Updated docs. Nicely printing qcut tape texts **Possible Drawbacks:** **Related GitHub Issues:**
Context:
Per the associated issue "With the new functionality to assign "names" to gates, it might be worthwhile to have this information propagate to the printed circuit of qml.draw."
Description of the Change:
Modifies the printed text output resulting from qml.draw() to indicate the ids of operators.
Output:
0: ──RX(0.123,"data")──Rot(0.863,0.611,0.281)──┤ ⟨Z⟩
Benefits:
This allows users to see operators displayed with their ids in the printed circuit output.
Possible Drawbacks:
Too many rendered operators with ID's might consume more space causing the printed circuit to wrap more.
Related GitHub Issues:
This implements and closes #1397