Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add twirling options to SamplerV2 #1583

Merged
merged 16 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions qiskit_ibm_runtime/options/sampler_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from .options import OptionsV2
from .utils import primitive_dataclass
from .dynamical_decoupling_options import DynamicalDecouplingOptions
from .twirling_options import TwirlingOptions


@primitive_dataclass
Expand All @@ -36,6 +37,8 @@ class SamplerOptions(OptionsV2):

execution: Execution time options. See :class:`ExecutionOptionsV2` for all available options.

twirling: Pauli twirling options. See :class:`TwirlingOptions` for all available options.

experimental: Experimental options.
"""

Expand All @@ -45,4 +48,5 @@ class SamplerOptions(OptionsV2):
default_factory=DynamicalDecouplingOptions
)
execution: Union[ExecutionOptionsV2, Dict] = Field(default_factory=ExecutionOptionsV2)
twirling: Union[TwirlingOptions, Dict] = Field(default_factory=TwirlingOptions)
experimental: Union[UnsetType, dict] = Unset
2 changes: 2 additions & 0 deletions release-notes/unreleased/1557.feat.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
`SamplerV2` now supports twirling.
The twirling can only be applied on gates or measurements that are not used within a control flow.