0
$\begingroup$

So for instance is there any difference between using backend = Aer.get_backend('aer_simulator_statevector') or backend = provider.get_backend('simulator_statevector') And relatedly are they both ran on IBM's servers and not locally?

$\endgroup$

1 Answer 1

3
$\begingroup$

In Qiskit, to execute a QuantumCircuit you need a backend which can be an actual quantum computer as well as a simulator. And to get a backend you need a Provider.

Qiskit comes with several providers:

from qiskit.providers.basicaer import BasicAerProvider
provider = BasicAerProvider()
  • Aer Provider: a variety of high-performance simulator backends for a variety of simulation methods.
from qiskit_aer import AerProvider
provider = AerProvider()
  • Fake Provider: a set of backends built to mimic the behaviors of IBM Quantum systems using system snapshots that contain important information about the quantum system such as coupling map, basis gates, qubit properties.
from qiskit.providers.fake_provider import FakeProvider
provider = FakeProvider()
from qiskit import IBMQ

# You will need an IBM Quantum Experience account
if IBMQ.active_account() is None:
    IBMQ.load_account()

provider = IBMQ.get_provider(hub = 'ibm-q')

To get the list of backends provided by any of these providers, call provider.backends(). And to get access to one of the backends, call provider.get_backend(backend_name).


Now, your question

is there any difference between using backend = Aer.get_backend('aer_simulator_statevector') or backend = provider.get_backend('simulator_statevector')

aer_simulator_statevector is one of the backends of Aer Provider. So, it runs on your machine. simulator_statevector is one of the backends of IBM Quantum Provider. It runs on the cloud.

$\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.