-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Bug] Normalize probabilities #53
Conversation
Codecov Report
@@ Coverage Diff @@
## master #53 +/- ##
==========================================
+ Coverage 88.77% 88.85% +0.07%
==========================================
Files 5 5
Lines 285 287 +2
==========================================
+ Hits 253 255 +2
Misses 32 32
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.
@albi3ro were the failures that we've seen results of a stochastic behaviour?
CHANGELOG.md
Outdated
@@ -6,11 +6,16 @@ | |||
`SimulatorDevice` class for general IonQ devices. | |||
[(#50)](https://github.com/PennyLaneAI/PennyLane-IonQ/pull/50) | |||
|
|||
### Bug Fixes | |||
|
|||
* Since the probabilities returned don't always perfectly sum to one, they are now normalized. |
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.
What probabilities are referred to here? Maybe good to rephrase from the user's point of view.
@antalszava When running an individual circuit locally, the errors were stochastic. |
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, thanks for the updates here 👏
The returned probabilities do not always perfectly sum to one. This difference seems to be slight, about 1e-5, but it is enough to cause
np.random.choice
to complain. Therefore we now normalize the probabilities.