0
$\begingroup$

Is it possible to obtain the simulation method by a simulation run when using AerSimulator(method='automatic')?

For example running a circuit:

simulation_run = AerSimulator(method='automatic').run(qc)

Then trying to obtain the simulation method used by the two methods:

simulation_run.backend().configuration().backend_name
simulation_run.backend().options.method

This will only output 'automatic' but I would like to know what method the simulator actually used during the simulation run, e.g. 'statevector', 'density_matrix', 'stabilizer', etc.

$\endgroup$

1 Answer 1

0
$\begingroup$

Method is reported in metadata in the ExperimentResult. So, you can get it using the below code snippet:

simulation_run.result().results[0].metadata['method']
$\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.