-
Notifications
You must be signed in to change notification settings - Fork 571
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
Incorporate level
keyword in draw
and draw_mpl
#5855
Conversation
Hello. You may have forgotten to update the changelog!
|
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 @Shiro-Raven 🎉 ! I don't consider the comments in this review to be blocking. I'll approve once tests are passing.
Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai>
…nd PT * Fix `specs` tests relating to `trainable_params` fix * Fix bug in PyTorch's `constuct`
Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5855 +/- ##
==========================================
+ Coverage 99.43% 99.66% +0.23%
==========================================
Files 421 421
Lines 41191 40309 -882
==========================================
- Hits 40958 40175 -783
+ Misses 233 134 -99 ☔ 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.
Thanks @Shiro-Raven !
Looks like there's some code cov failures. Seems like some of the code in the |
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.
🎉 I'll be happy to approve once we resolve the codecov issues. I think we should just be able to add tests for each of the two layers where we call .construct(args, kwargs)
and then double check that a tape was constructed.
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.
🎉
**Context:** Currently, `draw()` and `draw_mpl()` can only be requested after applying the full transform program, with the exception of the stages provided through expansion_strategy. **Description of the Change:** Using the new `level` argument from construct_batch, the functions are adapted to make use of the argument as well, which allows for more flexible requests and ability to pinpoint where exactly in the transform program to draw a circuit. As done before, the new functionality works with transforms that split the tape (only in the case for `draw`. For `draw_mpl`, a warning is raised and only the first tape is plotted). **Benefits:** Better plotting UX. **Note for Reviewers:** Minor bugs in `construct_batch` have been discovered during work on this PR, and so expect minor fixes to tests relating to `specs`. [[sc-53735](https://app.shortcut.com/xanaduai/story/53735)] Supersedes #5139 --------- Co-authored-by: Mudit Pandey <mudit.pandey@xanadu.ai> Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Context:
Currently,
draw()
anddraw_mpl()
can only be requested after applying the full transform program, with the exception of the stages provided through expansion_strategy.Description of the Change:
Using the new
level
argument from construct_batch, the functions are adapted to make use of the argument as well, which allows for more flexible requests and ability to pinpoint where exactly in the transform program to draw a circuit. As done before, the new functionality works with transforms that split the tape (only in the case fordraw
. Fordraw_mpl
, a warning is raised and only the first tape is plotted).Benefits:
Better plotting UX.
Note for Reviewers:
Minor bugs in
construct_batch
have been discovered during work on this PR, and so expect minor fixes to tests relating tospecs
.[sc-53735] Supersedes #5139