-
Notifications
You must be signed in to change notification settings - Fork 616
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 qnode_spectrum
with interface="auto"
#6622
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6622 +/- ##
=======================================
Coverage 99.46% 99.46%
=======================================
Files 454 454
Lines 42644 42649 +5
=======================================
+ Hits 42415 42420 +5
Misses 229 229 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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.
Could we instead stop mapping "numpy"
to "autograd" (by mapping
"numpy" to
None) and raise an informative error if the interface is
None`?
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:
An example from the docstring of
qnode_spectrum
is failing because the detection of trainable arguments fails when using Autograd via vanilla numpy inputs andinterface="auto"
(default).Note that this problem is caused by a bug in
qml.math.is_independent
, but so far only surfaces in the specific context ofqnode_spectrum
, which uses this function to check a Jacobian to be constant.Description of the Change:
Add a warning to the docs that pure numpy parameters are not supported.
Raise an error if pure numpy parameters are present.
Smaller updates relating to code quality/linting.
Benefits:
Fixes #6593
Possible Drawbacks:
N/A
Related GitHub Issues:
Closes #6593
[sc-78453]