-
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
Explicitly convert prob
interface in ProbsMP.process_density_matrix
#6737
Explicitly convert prob
interface in ProbsMP.process_density_matrix
#6737
Conversation
Hello. You may have forgotten to update the changelog!
|
prob
interface in ProbsMP.process_density_matrix
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 @JerryChen97.
I just have one question: why create a single 1-line PR for this instead of applying the change directly in #6684 ?
We should probably add a test to ensure desired behaviour (interface remaining the same)? |
The modification to ProbsMP is of different scope from #6684. |
@JerryChen97 Thanks. Then I would say that a test and possibly a changelog entry would be ideal here 👍 Can you also update the PR description with an example of a non-working workflow that is solved by this bug fix? |
Done |
Added interface assert for all the current 4 different testing branches |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6737 +/- ##
=======================================
Coverage 99.60% 99.60%
=======================================
Files 475 475
Lines 45102 45118 +16
=======================================
+ Hits 44925 44941 +16
Misses 177 177 ☔ View full report in Codecov by Sentry. |
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, thanks for adding the tests 🎉
Context:
Previous
ProbsMP.process_density_matrix
has potential to alter the interface. Here we convert it explicitly.Specifically, when dealing with batched density matrices, the previous
ProbabilityMP
did not track the interface of inputdensity_matrix
.With the fixed
ProbabilityMP
we haveDescription of the Change:
Enforce the probs to match input interface via
qml.math.convert_like
Benefits:
This PR is blocking #6684. Its merge into master will free new
default.mixed
from many roundabout solutions.Possible Drawbacks:
Related GitHub Issues: