-
Notifications
You must be signed in to change notification settings - Fork 160
Correct QVFitter confidence level threshold to 0.977 #482
Correct QVFitter confidence level threshold to 0.977 #482
Conversation
…threshold to 0.977 corresponding to z=2
Suggest reviewers @dcmckayibm @levbishop. CC: @oliverdial. |
Hi @HuangJunye - thank you for your contribution. Please note that if you would like your code to get merged, then you should fix the minor travis errors. Thanks! |
@ShellyGarion Sorry about that. This is the first time I am making a real PR haha. I removed the trailing white spaces which I think are the reasons for Travis errors. Still waiting for the build to finish but the build that failed has passed now. Shall I add add anything to release note? |
Made a minor change to store confidence level even when hmean < 2/3 based on the comment from @oliverdial #483 |
I realise what I did is not what @oliverdial asked for. He wants to store the confidence interval not confidence level. The QVFitter doesn’t calculate or store confidence interval. It calculate the confidence level for hmean > 2/3. I think it doesn’t harm to store confidence level for hmean < 2/3, but adding a feature To calculate confidence interval is probably another PR. |
Actually, I misread the code -- I thought in some cases sigma was not stored, but it always is (with this the CI is easy to calculate). But saving the confidence level as well is still nice -- thanks! |
After you verify that this PR is correct and fits the theory of the QV paper, then you may also add release notes as you suggested. |
I tested with the quantum volume tutorial and textbook chapter. It behaves exactly as before the changes. I think it’s correct but the best would be getting @dcmckayibm or @levbishop to review the PR. |
Raises ValueError when sigma = 0 and added explanations for how to calculate statistics based on binomial distribution in |
@dcmckayibm I have added the error if, can you please review the code? Thank you. |
Thanks @dcmckayibm for your approval! |
Thanks @HuangJunye for your contribution! |
Thank you @ShellyGarion. I am really excited to contribute my first ever PR to Qiskit! |
@chriseclectic Thanks for merging the PR!!! |
Correct QVFitter confidence level threshold to 0.977 corresponding to z = 2 as defined by the QV paper Algorithm 1
Summary
Fixes #473 and #481 :
calc_z_value
andcalc_confidence_level
.calc_confidence_level(z_value=2)
.calc_z_value
Details and comments