-
Notifications
You must be signed in to change notification settings - Fork 612
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
Enforce the positivity of prob inside ProbMP.process_density_matrix
#6727
base: master
Are you sure you want to change the base?
Conversation
Hello. You may have forgotten to update the changelog!
|
ProbMP.process_density_matrix
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6727 +/- ##
========================================
Coverage 99.62% 99.62%
========================================
Files 476 477 +1
Lines 44733 44890 +157
========================================
+ Hits 44564 44721 +157
Misses 169 169 ☔ View full report in Codecov by Sentry. |
Revert "try suggestion" This reverts commit 5312bda.
We will leave this open for discussion furthermore after new year when everyone is back |
Concern here: there used to be issues with the use of eps in differentiability debugging before |
Context:
This missing line might lead to specific
nan
error in the downstreaming gradient process especially ag/jax related. Check out https://github.com/PennyLaneAI/pennylane/actions/runs/12360643306/job/34496071685?pr=6684 and https://github.com/PennyLaneAI/pennylane/actions/runs/12360643306/job/34496077651?pr=6684 for concrete examplesP.S. How did the legacy device deal with this issue? It explicitly calls its own analytic prob method and did similar things
pennylane/pennylane/devices/default_mixed.py
Line 386 in 6383dfc
Description of the Change:
use
clip
with min valueeps
to enforce the positivity.Benefits:
More reliability
Possible Drawbacks:
None realized
Related GitHub Issues: