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.
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.