Sampler with shots=None
supports neither mid-circuit measurements nor unwritten classical bits
#1810
Labels
bug
Something isn't working
Informations
main
What is the current behavior?
Sampler with
shots=None
only works if each classical bit is set by a measurement at the end of the circuit.Steps to reproduce the problem
raises
What is the expected behavior?
Sampler should support calculating exact probabilities for circuits with arbitrary measurements
Suggested solutions
My understanding is that this will not be simple to fix in Aer. However, I wanted to have an open issue to refer to. In the meantime, I have created my own Sampler implementation based on Qiskit Terra's
Statevector
that supports mid-circuit measurements correctly: https://github.com/Qiskit-Extensions/circuit-knitting-toolbox/blob/main/circuit_knitting_toolbox/utils/simulation.pyRelated Qiskit Terra issue: Qiskit/qiskit#9657
The text was updated successfully, but these errors were encountered: