-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
precision argument of BackendEstimatorV2.run should account for observable norm #12414
Comments
I think that this issue should be filed against particular EstimatorV2 implementations, rather than the base class. This is because the base class can't really enforce how any child chooses to deal with precision. Note that "precision" should always be interpreted as "give me your best guess attempt to satisfy this precision". For example, the StatevectorSimulator has no notion of shots whatsoever, because it just grabs observable estimates straight from the state vector, and sets the stds to 0 because they're perfect estimates. The other thing to point out is that |
I agree that |
But what's the default implementation? If |
Oh I see what you mean. I've changed the title of this issue because it actually refers to BackendEstimatorV2 specifically. |
I opened Qiskit/qiskit-ibm-runtime#1684 for the implementation in Runtime. It appears that Runtime uses their own implementation of BackendEstimatorV2. |
What should we add?
The current implementation sets
shots = 1 / precision**2
. This is sufficient for a single Pauli operator with norm 1, but it is insufficient for a Hamiltonian with more terms and greater norm. I think it should beA / precision**2
whereA
is the sum of the absolute value squared of the coefficients of the Hamiltonian,sum(np.abs(sparse_pauli_op.coeffs)**2)
.The text was updated successfully, but these errors were encountered: