qrunch.quantum.backends.ibm.qiskit_aer_backend

Module with implementation of the Aer simulator.

Classes

QiskitAerBackend

Class for handling the Qiskit Aer Simulator.

QiskitAerMethods

Available Aer simulator methods.

class QiskitAerBackend

Bases: Backend

Class for handling the Qiskit Aer Simulator.

__init__(*, method: QiskitAerMethods = QiskitAerMethods.AUTOMATIC, device_to_simulate: DeviceData | None = None, seed: int | None = None, compiler: Compiler | None = None, translator: Translator[QuantumCircuit] | None = None) None

Initialize an Aer simulator.

Parameters:
  • method (QiskitAerMethods) – Method to use in the simulator. Defaults to automatic

  • device_to_simulate (DeviceData | None) – If provided, the noise model and coupling map from the device data will be used to simulate a noisy device. Defaults to None.

  • seed (int | None) – Default seed for the simulator. Defaults to None.

  • compiler (Compiler | None) – Compiler for changing into universal gates. Defaults to PerGateCompiler.

  • translator (Translator[QuantumCircuit] | None) – Translator for translating universal gates to Qiskit format. Defaults to QiskitTranslator.

Return type:

None

property name: str

Name of backend.

run(circuits: Circuit | Sequence[Circuit], shots: int | None) SimulatedJob

Run circuit on the backend.

Parameters:
  • circuits (Circuit | Sequence[Circuit]) – circuits to run on backend.

  • shots (int | None) – number of shots. Must be a positive integer

Return type:

SimulatedJob

supports_shots_equals_none() bool

Return whether the backend supports shots = None.

Aer Backend does not support shots = None.

Return type:

bool

class QiskitAerMethods

Bases: Enum

Available Aer simulator methods.

AUTOMATIC = 'automatic'
DENSITY_MATRIX = 'density_matrix'
EXTENDED_STABILIZER = 'extended_stabilizer'
MATRIX_PRODUCT_STATE = 'matrix_product_state'
STABILIZER = 'stabilizer'
STATE_VECTOR = 'statevector'