9

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')?

glS
  • 27,510
  • 7
  • 37
  • 125
user3886914
  • 339
  • 2
  • 8

1 Answers1

11

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.

RSW
  • 309
  • 1
  • 12
Egretta.Thula
  • 11,986
  • 1
  • 13
  • 34