Open doichanj opened 2 weeks ago
This PR fixes EstimatorV2.from_backend and SamplerV2.from_backend to use pre-defined AerSimulator for simulation
EstimatorV2.from_backend
SamplerV2.from_backend
With this fix, user can define specific simulator object with backend options instead of passing options for V2 primitives.
for example, following script can use AerSimulator with statevector simulation and with noise model
sim = AerSimulator(method="statevector", noise_model=noise_model) estimator = EstimatorV2.from_backend(sim)
This PR fixes from_backend that initialized backend object by calling AerSimulator.from_backend but when input backend is AerSimulator just copy it.
from_backend
AerSimulator.from_backend
Summary
This PR fixes
EstimatorV2.from_backend
andSamplerV2.from_backend
to use pre-defined AerSimulator for simulationDetails and comments
With this fix, user can define specific simulator object with backend options instead of passing options for V2 primitives.
for example, following script can use AerSimulator with statevector simulation and with noise model
This PR fixes
from_backend
that initialized backend object by callingAerSimulator.from_backend
but when input backend is AerSimulator just copy it.