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

73 lines
3.5 KiB
Plaintext

---
title: SamplerOptions (latest version)
description: API reference for qiskit_ibm_runtime.options.SamplerOptions in the latest version of qiskit-ibm-runtime
in_page_toc_min_heading_level: 1
python_api_type: class
python_api_name: qiskit_ibm_runtime.options.SamplerOptions
---
# SamplerOptions
<Class id="qiskit_ibm_runtime.options.SamplerOptions" isDedicatedPage={true} github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.33/qiskit_ibm_runtime/options/sampler_options.py#L27-L57" signature="SamplerOptions(*args, **kwargs)" modifiers="class">
Options for V2 Sampler.
## Attributes
### default\_shots
<Attribute id="qiskit_ibm_runtime.options.SamplerOptions.default_shots" attributeTypeHint="UnsetType | int" attributeValue="Unset">
The default number of shots to use if none are specified in the PUBs or in the run method.
Default: 4096.
</Attribute>
### dynamical\_decoupling
<Attribute id="qiskit_ibm_runtime.options.SamplerOptions.dynamical_decoupling" attributeTypeHint="DynamicalDecouplingOptions | Dict" attributeValue="FieldInfo(annotation=Union[DynamicalDecouplingOptions, Dict], required=False, default_factory=DynamicalDecouplingOptions)">
Suboptions for dynamical decoupling. See [`DynamicalDecouplingOptions`](qiskit_ibm_runtime.options.DynamicalDecouplingOptions "qiskit_ibm_runtime.options.DynamicalDecouplingOptions") for all available options.
</Attribute>
### environment
<Attribute id="qiskit_ibm_runtime.options.SamplerOptions.environment" attributeTypeHint="EnvironmentOptions | Dict" attributeValue="FieldInfo(annotation=Union[EnvironmentOptions, Dict], required=False, default_factory=EnvironmentOptions)" />
### execution
<Attribute id="qiskit_ibm_runtime.options.SamplerOptions.execution" attributeTypeHint="SamplerExecutionOptionsV2 | Dict" attributeValue="FieldInfo(annotation=Union[SamplerExecutionOptionsV2, Dict], required=False, default_factory=SamplerExecutionOptionsV2)">
Execution time options. See [`SamplerExecutionOptionsV2`](qiskit_ibm_runtime.options.SamplerExecutionOptionsV2 "qiskit_ibm_runtime.options.SamplerExecutionOptionsV2") for all available options.
</Attribute>
### experimental
<Attribute id="qiskit_ibm_runtime.options.SamplerOptions.experimental" attributeTypeHint="UnsetType | dict" attributeValue="Unset">
Experimental options.
</Attribute>
### max\_execution\_time
<Attribute id="qiskit_ibm_runtime.options.SamplerOptions.max_execution_time" attributeTypeHint="UnsetType | int" attributeValue="Unset" />
### simulator
<Attribute id="qiskit_ibm_runtime.options.SamplerOptions.simulator" attributeTypeHint="SimulatorOptions | Dict" attributeValue="FieldInfo(annotation=Union[SimulatorOptions, Dict], required=False, default_factory=SimulatorOptions)" />
### twirling
<Attribute id="qiskit_ibm_runtime.options.SamplerOptions.twirling" attributeTypeHint="TwirlingOptions | Dict" attributeValue="FieldInfo(annotation=Union[TwirlingOptions, Dict], required=False, default_factory=TwirlingOptions)">
Pauli twirling options. See [`TwirlingOptions`](qiskit_ibm_runtime.options.TwirlingOptions "qiskit_ibm_runtime.options.TwirlingOptions") for all available options.
</Attribute>
## Methods
### update
<Function id="qiskit_ibm_runtime.options.SamplerOptions.update" github="https://github.com/Qiskit/qiskit-ibm-runtime/tree/stable/0.33/qiskit_ibm_runtime/options/options.py#L146-L155" signature="update(**kwargs)">
Update the options.
**Return type**
`None`
</Function>
</Class>