qiskit-algorithms icon indicating copy to clipboard operation
qiskit-algorithms copied to clipboard

[from qiskit] Extend `qiskit_algorithms.eval_observables` to allow returning a callable

Open ElePT opened this issue 1 year ago • 1 comments

What should we add?

If we want to evaluate a set of expectation values for the same observables and circuits, but with different circuit parameters, we can cache the whole transpilation and basis transformation processes. Qiskit's opflow easily allows this and to leverage this it would be nice if we extended the eval_observables to allow returning a callable that takes as input circuit parameters and returns the (efficiently) evaluated expectation values.

Something like this is already used in #8304 and can be extracted and merged with the existing eval_observables in a follow-up.

ElePT avatar Aug 22 '23 09:08 ElePT