-
Notifications
You must be signed in to change notification settings - Fork 603
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 a qnode with MPL #1803
draw a qnode with MPL #1803
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #1803 +/- ##
==========================================
+ Coverage 91.59% 98.83% +7.23%
==========================================
Files 222 222
Lines 16972 16979 +7
==========================================
+ Hits 15546 16781 +1235
+ Misses 1426 198 -1228
Continue to review full report at Codecov.
|
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 to me! Can't wait to use this functionality !
|
||
folder = pathlib.Path(__file__).parent | ||
|
||
def main_example(circuit): |
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.
This is a very small thing but maybe we could pass the parameters of the circuit as an argument into each of the functions as well, that way, if in the future the circuit is changed for some reason, the parameters can all be changed simultaneously without changing each line
|
||
assert len(ax.texts) == 4 # three wire labels and one gate label | ||
assert ax.texts[0].get_text() == "2" | ||
assert ax.texts[1].get_text() == "a" |
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.
Just a random thought, maybe as a separate feature, could we assign a single label to a group of wires, lets say for example we have 5 wires, 2 are ancillary and the remaining 3 constitute a state
pennylane/transforms/draw.py
Outdated
.. UsageDetails:: | ||
|
||
**Decimals:** |
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.
don't forget to indent everything below UsageDetails
! Otherwise Sphinx won't consider it part of UsageDetails
:
[sc-9615] |
This PR is dependent on #1787
It adds a transform that draws a
qnode
with matplotlib.