Probabilities >1
in the sampler (and statevector)
#9761
Labels
bug
Something isn't working
mod: primitives
Related to the Primitives module
mod: quantum info
Related to the Quantum Info module (States & Operators)
Environment
What is happening?
The
Statevector.probabilities
method sometimes contains roundoff errors, leading to probabilities larger than 1. This breaks theSampler
if shots are emulated, as larger than 1 probabilities are not valid inputs to NumPy's multinomial library.How can we reproduce the issue?
The error raised is
What should happen?
The probabilities should not exceed 1.
Any suggestions?
Clip the probabilities.
The text was updated successfully, but these errors were encountered: