-
Notifications
You must be signed in to change notification settings - Fork 617
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
Fix zero-jvps with shot vectors #6219
Conversation
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.
LGTM, thank you for fixing this!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6219 +/- ##
=======================================
Coverage 99.63% 99.63%
=======================================
Files 445 445
Lines 42411 42417 +6
=======================================
+ Hits 42255 42261 +6
Misses 156 156 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Christina Lee <[email protected]>
**Context:** If a tape has no trainable parameters, generic zero-valued JVPs are created for it in JVP calculations. However, these generic calculations are not taking shot vectors correctly into account, also because they do not use `MeasurementProcess.shape` correctly. **Description of the Change:** Change the generic zero-valued JVPs so they are compatible with shot vectors. **Benefits:** One bug less. **Possible Drawbacks:** N/A **Related GitHub Issues:** Fixes #6220 [sc-73033] --------- Co-authored-by: Christina Lee <[email protected]>
**Context:** If a tape has no trainable parameters, generic zero-valued JVPs are created for it in JVP calculations. However, these generic calculations are not taking shot vectors correctly into account, also because they do not use `MeasurementProcess.shape` correctly. **Description of the Change:** Change the generic zero-valued JVPs so they are compatible with shot vectors. **Benefits:** One bug less. **Possible Drawbacks:** N/A **Related GitHub Issues:** Fixes #6220 [sc-73033] --------- Co-authored-by: Christina Lee <[email protected]>
**Context:** If a tape has no trainable parameters, generic zero-valued JVPs are created for it in JVP calculations. However, these generic calculations are not taking shot vectors correctly into account, also because they do not use `MeasurementProcess.shape` correctly. **Description of the Change:** Change the generic zero-valued JVPs so they are compatible with shot vectors. **Benefits:** One bug less. **Possible Drawbacks:** N/A **Related GitHub Issues:** Fixes #6220 [sc-73033] --------- Co-authored-by: Christina Lee <[email protected]>
Context:
If a tape has no trainable parameters, generic zero-valued JVPs are created for it in JVP calculations.
However, these generic calculations are not taking shot vectors correctly into account, also because they do not use
MeasurementProcess.shape
correctly.Description of the Change:
Change the generic zero-valued JVPs so they are compatible with shot vectors.
Benefits:
One bug less.
Possible Drawbacks:
N/A
Related GitHub Issues:
Fixes #6220
Related Shortcut Stories:
[sc-73033]