-
Notifications
You must be signed in to change notification settings - Fork 575
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 bug density_matrix
and torch
#2643
Conversation
Hello. You may have forgotten to update the changelog!
|
[sc-19818] |
Codecov Report
@@ Coverage Diff @@
## master #2643 +/- ##
=======================================
Coverage 99.58% 99.58%
=======================================
Files 248 248
Lines 19972 19975 +3
=======================================
+ Hits 19889 19892 +3
Misses 83 83
Continue to review full report at Codecov.
|
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.
Hi @rmoyard, looks good to me! Just a minor change and a question, then should be good to go.
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
Co-authored-by: Edward Jiang <34989448+eddddddy@users.noreply.github.com>
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.
@rmoyard this is awesome! 🥇 🎉
There was a major thing I wondered about related to the change in logic, though the fix seems to overall check out. 👍
Co-authored-by: antalszava <antalszava@gmail.com>
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 👍
Context:
When using torch returning the density matrix yields wrong format results.
Description of the Change:
The Torch
_asarray
function indefault.qubit.torch
is always unrolling the tensor. I created a specific case for density matrix.Benefits:
qml.density_matrix
works with Torch interface.Related GitHub Issues:
Closes #2553