1
$\begingroup$

Is there a way of bundling commuting observables in qiskit primitive estimator to save the number of shots?

With the new feature of Qiskit primitives, it is easy to sample observables for a specific circuit on any backend. There is also a feature to run multiple circuits corresponding to an equal number of observables. I would like to run the same circuit on multiple observables. I would like to exploit their commutativity and reduce the number of shots. I am not sure if the current estimators already do this, or if there is any way I could do this and save the number of circuit executions

$\endgroup$
1

1 Answer 1

3
$\begingroup$

As mentioned in the answer linked above, there are different Estimator implementations from different providers. The implementations of the Aer Estimator and Qiskit Estimator and BackendEstimator are open source, and you can see that:

  1. the Qiskit Estimator performs an exact statevector calculation (so no grouping is performed or needeed)
  2. both the Aer and Backend Estimator expose an abelian_grouping parameter that triggers the use of the group_commuting method from Qiskit's quantum_info module.

As for the Qiskit Runtime Estimator, the implementation is not open source, but my understanding is that it performs qubit-wise group commuting by default, at least for resilience_level=0 (might be for all resilience levels), and this option is NOT configurable by users for the time being.

I hope this helps.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.