-
Notifications
You must be signed in to change notification settings - Fork 377
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
Reduce complexity of sample_measure #836
Comments
The |
If generating samples from the histogram takes |
Samples from histogram is just |
Probably can close this issue, @hhorii will decide. |
@merav-aharoni @hhorii I remember that there were discussions about the measure sampling being implemented twice - in the statevector and the MPS simulator. I think there's a plan to unify it some day. When the day comes, which algorithm will be chosen, the binary search (implemented in the MPS sample measure using probabilities, and could be copied as is to the statevector section) or the other one (which is the statevector's one, and can be copied as is to the MPS section)? And, until the day comes, maybe determine which algorithm is preferable, remove the slower one, and duplicate the code of the faster one? |
@hhorii Please don't close this issue until the last point is resolved, thanks |
Sorry that we have been leaving this issue. Please submit a new issue if it is still necessary. |
What is the expected behavior?
sample_measure
returnss
measurement results, wheres
denotes the number of shots. Current implementation takeO(s * 2^n)
run time. #819 improves it toO(sn + 2^n)
. As noted in #819 (comment), this can be further improved toO(s + 2^n)
(#819 (comment) explains how to generate a counts histogram; once this histogram exists, generating samples corresponding to the histogram takesO(s^2)
).The text was updated successfully, but these errors were encountered: