-
Notifications
You must be signed in to change notification settings - Fork 604
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
[BUGFIX] Fix TF
shape computation for pauli_decompose
#4493
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4493 +/- ##
==========================================
- Coverage 99.71% 99.71% -0.01%
==========================================
Files 378 378
Lines 34253 34242 -11
==========================================
- Hits 34155 34144 -11
Misses 98 98
|
could you add a quick test for what was failing before? maybe.. do it for jax/torch as well just to be extra sure? otherwise this sounds good to me 👍 |
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 find!
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 💯
* fix `shape` bug * update `PR` number * trigger * change `type` * add more tests * parametrize prettify * suggestions
Context: There was an
if
condition inherited from the old legacy code where we were accessing shape viaH.shape
. This would fail for tensors built with TensorFlow.Description of the Change: This PR fixes it by using
qml.math.shape
instead.Benefits: Differentiability on TensorFlow backend.
Possible Drawbacks: N/A
Related GitHub Issues: N/A