-
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
Capture a qnode into jaxpr #5708
Conversation
Co-authored-by: David Wierichs <david.wierichs@xanadu.ai>
…neAI/pennylane into plxpr-capture-operations
Co-authored-by: David Wierichs <david.wierichs@xanadu.ai>
…neAI/pennylane into plxpr-capture-operations
Co-authored-by: Thomas R. Bromley <49409390+trbromley@users.noreply.github.com>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5708 +/- ##
==========================================
- Coverage 99.67% 99.66% -0.01%
==========================================
Files 413 414 +1
Lines 39250 39017 -233
==========================================
- Hits 39123 38887 -236
- Misses 127 130 +3 ☔ 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 work in those tests @albi3ro
Excited that this integration requires so little effort 🎉
We could think about modifying the printing of qnode jaxprs in a future PR, to enhance readability :)
The names of existing files suggests to rename the new file to tests/capture/test_qnode.py
🙃
Co-authored-by: David Wierichs <david.wierichs@xanadu.ai>
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.
Love it, this looks great 💯
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 @albi3ro, looking forward to this going in!
I'm approving, conditioned on a conscious decision about obtaining the shots
in the beginning of qnode_call
: Should we always call _get_device_shots
, and cast to a Shots
object even if it is one already? It's not crucial, but deserves a thought, I think :)
Co-authored-by: David Wierichs <david.wierichs@xanadu.ai>
Co-authored-by: David Wierichs <david.wierichs@xanadu.ai>
Context:
Description of the Change:
Benefits:
Possible Drawbacks:
Related GitHub Issues:
[sc-61301]