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 qml.counts
measurement in new device
#4172
Conversation
Hello. You may have forgotten to update the changelog!
|
Codecov Report
@@ Coverage Diff @@
## master #4172 +/- ##
=======================================
Coverage 99.77% 99.77%
=======================================
Files 340 340
Lines 30561 30566 +5
=======================================
+ Hits 30491 30496 +5
Misses 70 70
|
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. Thanks @eddddddy ! 🚀
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.
🎉
Just changelog and unit tests for CountsMP.process_samples
.
Actually not seeing any unit tests for CountsMP.process_samples
in test_counts.py
, but this might be a good opportunity to change that. Even simple stuff like:
samples = np.zeros((4,2))
output = CountsMP(wires=(0,1)).process_samples(samples, wire_order=(0,1))
assert output == {'00': 4}
or something. probably messed up the orders, but you know what I mean anyway.
@albi3ro There are unit tests in |
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 for the added tests. Looks great 🎉
[sc-38218] |
Context:
Part of the effort to integrate the new device API. Most measurements are supported with only a few weird edge cases (including counts).
Description of the Change:
Previous behaviour:
New behaviour: