-
Notifications
You must be signed in to change notification settings - Fork 81
/
options.md
35 lines (24 loc) · 2.77 KB
/
options.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<span id="primitive-options-qiskit-ibm-runtime-options" />
<span id="module-qiskit_ibm_runtime.options" />
# Primitive options ([`qiskit_ibm_runtime.options`](#module-qiskit_ibm_runtime.options "qiskit_ibm_runtime.options"))[¶](#primitive-options-qiskit-ibm-runtime-options "Link to this heading")
Options that can be passed to the primitives.
The [`Options`](qiskit_ibm_runtime.options.Options "qiskit_ibm_runtime.options.Options") class encapsulates all the options you can specify when invoking a primitive. It includes frequently used options, such as `optimization_level` and `resilience_level` as well as sub-categories, such as `transpilation` and `execution`. You can use auto-complete to easily find the options inside each sub-category, for example:
```python
from qiskit_ibm_runtime.options import Options
options = Options()
options.transpilation.initial_layout = [0, 1, 2, 3] # This an be done using auto-complete
```
You can also pass dictionaries to each sub-category, for example:
```python
from qiskit_ibm_runtime.options import Options
options = Options(transpilation={"initial_layout": [0, 1, 2, 3]})
```
## Classes[¶](#classes "Link to this heading")
| | |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| [`Options`](qiskit_ibm_runtime.options.Options "qiskit_ibm_runtime.options.Options")(\[optimization\_level, ...]) | Options for the primitives. |
| [`TranspilationOptions`](qiskit_ibm_runtime.options.TranspilationOptions "qiskit_ibm_runtime.options.TranspilationOptions")(\[skip\_transpilation, ...]) | Transpilation options. |
| [`ResilienceOptions`](qiskit_ibm_runtime.options.ResilienceOptions "qiskit_ibm_runtime.options.ResilienceOptions")(\[noise\_amplifier, ...]) | Resilience options. |
| [`ExecutionOptions`](qiskit_ibm_runtime.options.ExecutionOptions "qiskit_ibm_runtime.options.ExecutionOptions")(\[shots, init\_qubits]) | Execution options. |
| [`EnvironmentOptions`](qiskit_ibm_runtime.options.EnvironmentOptions "qiskit_ibm_runtime.options.EnvironmentOptions")(\[log\_level, callback, ...]) | Options related to the execution environment. |
| [`SimulatorOptions`](qiskit_ibm_runtime.options.SimulatorOptions "qiskit_ibm_runtime.options.SimulatorOptions")(\[noise\_model, ...]) | Simulator options. |