-
Notifications
You must be signed in to change notification settings - Fork 615
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 expand_matrix
for qudit matrices
#6398
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6398 +/- ##
=======================================
Coverage 99.40% 99.40%
=======================================
Files 447 447
Lines 42400 42405 +5
=======================================
+ Hits 42146 42151 +5
Misses 254 254 ☔ View full report in Codecov by Sentry. |
@albi3ro and team, thank you so much for making this improvement!! 🎉 🙏 This will be super helpful for our qutrit researchers @jackyruth and @Gabriel-Bottrill 🚀 |
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 great! Should qml.matrix
and Operator.matrix
be updated accordingly?
Also, I don't mean to be frustrating but I wanted to get your thoughts on adding a test for qudit_dim > 3
and/or more wires. I guess at least for the former suggestion it might be unnecessary since we don't have any operations for higher qudit dimensions, but the latter might make sense.
What do we need to update in I'd like to test with more wires, but then we start to run into the challenge with figuring out what the "correct" answer should be 🤔 |
Oh, never mind. The fact that
Regarding this point, we can either:
|
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, just two tiny comments.
Nice! 🚀
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.
Thank you so much! These days I've been wanting this implemented but didn't get a chance to add; now finally we don't need multiple copies of expansion for any other arbitrary spins in the future😊!!
Context:
We were incorrectly manipulating qutrit matrices.
Description of the Change:
Allow
expand_matrix
to work on higher qudit matrices.Benefits:
Possible Drawbacks:
Related GitHub Issues:
[sc-75501] Fixes #6368