9
$\begingroup$

In Qiskit, we can see the names of available simulators with the command Aer.backends(). These include:

AerSimulator('aer_simulator')
AerSimulator('aer_simulator_statevector')
AerSimulator('aer_simulator_density_matrix') 
QasmSimulator('qasm_simulator')
StatevectorSimulator('statevector_simulator')

What are differences between AerSimulator('aer_simulator'), AerSimulator('aer_simulator_density_matrix') and QasmSimulator('qasm_simulator')? All three seem to perform similar QASM simulation.

Similarly, what are differences between AerSimulator('aer_simulator_statevector') and StatevectorSimulator('statevector_simulator')?

$\endgroup$
2
  • $\begingroup$ Hi user3886914 I think the answer from @Egretta.Thula hits the nail in the head. If you agree that answered your question, please accept it. $\endgroup$
    – luciano
    Commented Feb 15, 2022 at 9:21
  • $\begingroup$ Thanks for the reminder! $\endgroup$ Commented Feb 16, 2022 at 14:46

1 Answer 1

11
$\begingroup$

Deprecation Note:

  • The StatevectorSimulator has been superseded by the AerSimulator and will be deprecated in the future. It has same functionality as AerSimulator(method="statevector").

  • The same is true for QasmSimulator. It has been superseded by AerSimulator and will be deprecated in the future.

Difference:

According to the documentation here, the difference between simulation methods like statevector and density_matrix is:

The AerSimulator supports a variety of simulation methods, each of which supports a different set of instructions. The method can be set manually using simulator.set_option(method=value) option, or a simulator backend with a preconfigured method can be obtained directly from the Aer provider using Aer.get_backend.

When simulating ideal circuits, changing the method between the exact simulation methods stabilizer, statevector, density_matrix and matrix_product_state should not change the simulation result (other than usual variations from sampling probabilities for measurement outcomes)

More information is here:

"statevector": A dense statevector simulation that can sample measurement outcomes from ideal circuits with all measurements at end of the circuit. For noisy simulations each shot samples a randomly sampled noisy circuit from the noise model.

"density_matrix": A dense density matrix simulation that may sample measurement outcomes from noisy circuits with all measurements at end of the circuit.

$\endgroup$
0

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.