qiskit-documentation/docs/api/qiskit-ibm-runtime/0.34/options-simulator-options.mdx

80 lines
3.1 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.34)
description: API reference for qiskit_ibm_runtime.options.SimulatorOptions in qiskit-ibm-runtime v0.34
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.34/qiskit_ibm_runtime/options/simulator_options.py#L33-L113" signature="SimulatorOptions(noise_model=Unset, seed_simulator=Unset, coupling_map=Unset, basis_gates=Unset)" modifiers="class">
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*](/api/qiskit/qiskit.transpiler.CouplingMap "(in Qiskit v1.3)"))
* **basis\_gates** (*UnsetType | List\[str]*)
### basis\_gates
<Attribute id="qiskit_ibm_runtime.options.SimulatorOptions.basis_gates" attributeTypeHint="UnsetType | List[str]" attributeValue="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.
</Attribute>
### coupling\_map
<Attribute id="qiskit_ibm_runtime.options.SimulatorOptions.coupling_map" attributeTypeHint="UnsetType | List[List[int]] | CouplingMap" attributeValue="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.
</Attribute>
### noise\_model
<Attribute id="qiskit_ibm_runtime.options.SimulatorOptions.noise_model" attributeTypeHint="UnsetType | dict | NoiseModel | None" attributeValue="Unset">
Noise model for the simulator.
Default: `None`.
</Attribute>
### seed\_simulator
<Attribute id="qiskit_ibm_runtime.options.SimulatorOptions.seed_simulator" attributeTypeHint="UnsetType | int" attributeValue="Unset">
Random seed to control sampling.
Default: `None`.
</Attribute>
## Methods
### set\_backend
<Function id="qiskit_ibm_runtime.options.SimulatorOptions.set_backend" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.34/qiskit_ibm_runtime/options/simulator_options.py#L87-L113" signature="set_backend(backend)">
Set backend for simulation. This method changes noise\_model, coupling\_map, basis\_gates according to given backend.
**Parameters**
**backend** ([*BackendV1*](/api/qiskit/qiskit.providers.BackendV1 "(in Qiskit v1.3)") *|*[*BackendV2*](/api/qiskit/qiskit.providers.BackendV2 "(in Qiskit v1.3)")) backend to be set.
**Raises**
**MissingOptionalLibraryError** if qiskit-aer is not found.
**Return type**
None
</Function>
</Class>