About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
SimulatorOptions
class SimulatorOptions(noise_model=None, seed_simulator=None, coupling_map=None, basis_gates=None)
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 (
Union
[dict
,NoiseModel
,None
]) – Noise model for the simulator. - seed_simulator (
Optional
[int
]) – Random seed to control sampling. - coupling_map (
Union
[List
[List
[int
]],CouplingMap
,None
]) – 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 (
Optional
[List
[str
]]) – List of basis gate names to unroll to. For example,['u1', 'u2', 'u3', 'cx']
. IfNone
, do not unroll.
Attributes
basis_gates
Type: List[str] | None
Default value: None
coupling_map
Type: List[List[int]] | CouplingMap | None
Default value: None
noise_model
Type: dict | NoiseModel | None
Default value: None
seed_simulator
Type: int | None
Default value: None
Methods
set_backend
set_backend(backend)
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
validate_simulator_options
static validate_simulator_options(simulator_options)
Validate that simulator options are legal. :raises ValueError: if any simulator option is not supported
Return type
None
Was this page helpful?
Report a bug or request content on GitHub.