qiskit-documentation/docs/api/qiskit-ibm-runtime/0.16/qiskit_ibm_runtime.options....

72 lines
2.9 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: SimulatorOptions (v0.16)
description: API reference for qiskit_ibm_runtime.options.SimulatorOptions in qiskit-ibm-runtime v0.16
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_ibm_runtime.options.SimulatorOptions
---
# SimulatorOptions
<Class id="qiskit_ibm_runtime.options.SimulatorOptions" isDedicatedPage={true} github="https://github.com/qiskit/qiskit-ibm-runtime/tree/stable/0.16/qiskit_ibm_runtime/options/simulator_options.py" signature="SimulatorOptions(noise_model=None, seed_simulator=None, coupling_map=None, basis_gates=None)" modifiers="class">
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']`. If `None`, do not unroll.
## Attributes
### basis\_gates
<Attribute id="qiskit_ibm_runtime.options.SimulatorOptions.basis_gates" attributeTypeHint="List[str] | None" attributeValue="None" />
### coupling\_map
<Attribute id="qiskit_ibm_runtime.options.SimulatorOptions.coupling_map" attributeTypeHint="List[List[int]] | CouplingMap | None" attributeValue="None" />
### noise\_model
<Attribute id="qiskit_ibm_runtime.options.SimulatorOptions.noise_model" attributeTypeHint="dict | NoiseModel | None" attributeValue="None" />
### seed\_simulator
<Attribute id="qiskit_ibm_runtime.options.SimulatorOptions.seed_simulator" attributeTypeHint="int | None" attributeValue="None" />
## Methods
### set\_backend
<Function id="qiskit_ibm_runtime.options.SimulatorOptions.set_backend" signature="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`
</Function>
### validate\_simulator\_options
<Function id="qiskit_ibm_runtime.options.SimulatorOptions.validate_simulator_options" signature="validate_simulator_options(simulator_options)" modifiers="static">
Validate that simulator options are legal. :raises ValueError: if any simulator option is not supported
**Return type**
`None`
</Function>
</Class>