-
Notifications
You must be signed in to change notification settings - Fork 42
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
Update logic for enabling grad_on_execution
in lightning_*.py
devices
#1016
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1016 +/- ##
===========================================
- Coverage 95.85% 27.86% -68.00%
===========================================
Files 229 29 -200
Lines 38841 2584 -36257
===========================================
- Hits 37232 720 -36512
- Misses 1609 1864 +255 ☔ View full report in Codecov by Sentry. |
lightning_*.py
devicesgrad_on_execution
in lightning_*.py
devices
Co-authored-by: Ali Asadi <[email protected]>
Co-authored-by: Christina Lee <[email protected]>
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 @andrijapau, LGTM!
Context:
In PennyLane,
grad_on_execution
is expected to be enabled when the gradient method is set toadjoint
. Since this is automatically true for Lightning devices, theuse_device_gradient
flag can serve as an additional condition to decide whether to enablegrad_on_execution
.This discrepancy caused certain Lightning device tests to fail during a PennyLane workflow clean-up PR. The issue arose because PennyLane expected
grad_on_execution
to beNone
but receivedTrue
instead. Further details can be found in the PR workflow.Description of the Change:
Update logic for when
grad_on_execution
is turned on inlightning
device configurations.Benefits: Unblocks PennyLaneAI/pennylane#6657
Possible Drawbacks: None.
[sc-79648]
[sc-72150]