Skip to main contentIBM Quantum Documentation

SimulatorOptions

class SimulatorOptions(*args, **kwargs)

GitHub(opens in a new tab)

Simulator options.

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

Parameters

  • noise_model – Noise model for the simulator.
  • seed_simulator – Random seed to control sampling.
  • coupling_map – 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 interactions, e.g: [[0, 1], [0, 3], [1, 2], [1, 5], [2, 5], [4, 1], [5, 3]]
  • basis_gates – List of basis gate names to unroll to. For example, ['u1', 'u2', 'u3', 'cx']. Unrolling is not done if not set.

Attributes

basis_gates

Type: UnsetType | List[str]

Default value: Unset

coupling_map

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

Default value: Unset

noise_model

Type: UnsetType | dict | NoiseModel | None

Default value: Unset

seed_simulator

Type: UnsetType | int

Default value: Unset


Methods

set_backend

set_backend(backend)

GitHub(opens in a new tab)

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

Parameters

backend (Union[BackendV1, 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.