-
Notifications
You must be signed in to change notification settings - Fork 558
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 dimension ordering bug with sum_expand #5702
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 #5702 +/- ##
==========================================
- Coverage 99.68% 99.67% -0.01%
==========================================
Files 416 416
Lines 39049 38810 -239
==========================================
- Hits 38925 38685 -240
- Misses 124 125 +1 ☔ View full report in Codecov by Sentry. |
…o sum-expand-bug
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 @astralcai, nice upgrade + bug fix in one! 🎉
Could I ask you to add unit tests in tests/math/test_functions
for the newly supported case(s) in qml.math.dot
? :) Happy to approve otherwise!
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 @astralcai 🎉
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.
Looks good to me, thanks @astralcai 🚀
Context:
sum_expand
incorrectly order the dimensions when combining shot vectors, multiple measurements, and parameter broadcasting. Additionally,qml.math.dot
raises an error when when only one of the operands is a scaler. For example:Description of the Change:
sum_expand
.dot
in to use*
if either operand is a scaler.Related GitHub Issues:
Fixes #5700
[sc-63541]