# Difference between Aer.get_backend('aer_simulator') and AerSimulator()

In Qiskit, there are several ways to choose simulator: one is

from qiskit import Aer
backend = Aer.get_backend('aer_simulator')
result = backend.run(circ).result()


another one is

from qiskit.providers.aer import AerSimulator
backend = AerSimulator()
result=backend.run(circ).result()


,where circ is QuantumCircuit(n). Do they always return the same result?

They're functionally equivalent the first approach is primarily just a shortcut that involves less typing to create a simulator backend and also follows the standardized "provider" interface for backends (which honestly makes more sense for remote backends, like real devices or remote simulators). But, both approaches will initialize a new AerSimulator backend object with the default settings and if you run the circuit you will get roughly the same result with either.