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__(transpiler: Transpiler[QuantumCircuit] | None = None, *, method: QiskitAerMethods = QiskitAerMethods.AUTOMATIC, device_to_simulate: DeviceData | None = None, seed: int | None = None) None

Initialize an Aer simulator.

Parameters:
  • transpiler (Transpiler[QuantumCircuit] | None) – Transpiler for converting circuits into a format suitable for the backend.

  • 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.

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

validate_shots_type(shots_type: Type[int | None]) list[str]

Validate that the sampler supports the given shots type. Return a list of error messages if not supported.

Parameters:

shots_type (Type[int | None])

Return type:

list[str]

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'