1
$\begingroup$

For a hybrid, VQE-type optimization in qiskit, in order to compute the expectation value of a Hamiltonian, we can use CircuitSampler on some Pauli sum operators, as well as Execute method on a list of generated circuits. Previously, I checked that their performance (in terms of final expectation value) can be on par in a noise-mitigated simulation, except that the CircuitSampler approach takes significantly less time (about 20% or less), and can also evaluate your uncertainty for each intermediate value, which is very nice.

I read the documentation, which says CircuitSampler does the "approximations of the state function". I would really like to know the actual differences between these two approaches. In addition, I wonder if there is a way to extract the uncertainty directly from the "Execute" approach.

PS: I also used caching of circuits in the "Execute" method, so I doubt the speed difference is from there. PS: I did not use qiskit-runtime.

$\endgroup$

0

Your Answer

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