You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug is in the BasicAer python simulator. Specifically it is occurring in the _add_sample_measure function, which is responsible for finding a probability distribution from the statevector and sampling from that. This function cannot handle the case where only a subset of the total qubits are measured.
'OPENQASM 2.0;\ninclude "qelib1.inc";\nqreg q0[5];\ncreg c0[3];\nx q0[4];\nmeasure q0[1] -> c0[0];\nmeasure q0[3] -> c0[1];\nmeasure q0[4] -> c0[2];\n'
The above qasm should give all shots in
100
, but they are all in000
. Only happens inBasicAer
, not inAer
.Informations
What is the current behavior?
Steps to reproduce the problem
What is the expected behavior?
Suggested solutions
The text was updated successfully, but these errors were encountered: