Skip to main contentIBM Quantum Documentation
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

SimulatorOptions

class SimulatorOptions(noise_model=Unset, seed_simulator=Unset, coupling_map=Unset, basis_gates=Unset)

GitHub

Bases: object

Simulator options.

For best practice in simulating a backend make sure to pass the basis gates and coupling map of that backend.


Attributes

Parameters

  • noise_model (UnsetType | dict | NoiseModel | None)
  • seed_simulator (UnsetType | int)
  • coupling_map (UnsetType | List[List[int]] | CouplingMap)
  • basis_gates (UnsetType | List[str])

basis_gates

Type: UnsetType | List[str]

Default value: Unset

List of basis gate names to unroll to. For example, ['u1', 'u2', 'u3', 'cx']. Unrolling is not done if not set.

Default: all basis gates supported by the simulator.

coupling_map

Type: UnsetType | List[List[int]] | CouplingMap

Default value: Unset

Directed coupling map to target in mapping. If the coupling map is symmetric, both directions need to be specified. Each entry in the list specifies a directed two-qubit interaction, e.g: [[0, 1], [0, 3], [1, 2], [1, 5], [2, 5], [4, 1], [5, 3]].

Default: None, which implies no connectivity constraints.

noise_model

Type: UnsetType | dict | NoiseModel | None

Default value: Unset

Noise model for the simulator. This option is only supported in local testing mode.

Default: None.

seed_simulator

Type: UnsetType | int

Default value: Unset

Random seed to control sampling.

Default: None.


Methods

set_backend

set_backend(backend)

GitHub

Set backend for simulation. This method changes noise_model, coupling_map, basis_gates according to given backend.

Parameters

backend (BackendV2) – backend to be set.

Raises

MissingOptionalLibraryError – if qiskit-aer is not found.

Return type

None

Was this page helpful?
Report a bug or request content on GitHub.