-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Sampler primitive in Terra does not support mid-circuit measurements #9657
Comments
As for the question of "why don't you just use the Aer sampler instead?" ... I'd like to calculate the exact probability of each outcome in a circuit with mid-circuit measurements. |
I figured out and implemented a way to meet my current need by evolving the |
I think this is reasonable to add to the |
Because the reference implementation Now that we have |
Hello, is there any update on this? I would like to use Sampler for an iterative phase estimation algorithm, which necessarily requires mid circuit measurements. |
You could use Aer's sampler with |
Edit: @garrison already noticed this prior to the comment below. I am actually running into the same issue with the
Here is the code generating the problem. It is pretty minimal. Using version >= 12 for |
The corresponding issue for |
I close this because the Primitives V1 is deprecated #12575 |
What should we add?
The reference
Sampler
(inqiskit.primitives
) does not support mid-circuit measurements. However, other Samplers, including those provided by qiskit-aer and qiskit-ibm-runtime, do support mid-circuit measurements.I understand the desire to keep the reference implementation simple, but it is hardly a reference implementation if it only implements the Sampler for a subset of possible inputs.
This was previously discussed at #8708. My goal here is to open a centralized place for discussion going forward
The text was updated successfully, but these errors were encountered: