Skip to main content
IBM Quantum Platform
翻訳情報

このページの追加言語翻訳は近日公開予定です。

qiskit_ibm_runtime.options_models.TwirlingOptions

pydantic model TwirlingOptions

GitHub

Bases: BaseOptionsModel

Twirling options.

Config

  • validate_assignment: bool = True
  • extra: str = forbid

enable_gates

field

Type: bool | None

Default value: None

Whether to apply 2-qubit Clifford gate twirling.

If None:

  • For the Sampler, it defaults to False.
  • For the Estimator, it is determined by the server according to the resilience level: it is False for resilience levels 0 and 1, and True for resilience level 2.

enable_measure

field

Type: bool | None

Default value: None

Whether to enable twirling of measurement instructions.

Note

Twirling is only applied to measurements that are not involved in a conditional block.

If None:

  • For the Sampler, it defaults to False.
  • For the Estimator, it is determined by the server according to the resilience level: it is False for resilience level 0, and True for resilience levels 1 and 2.

group

field

Type: Literal['pauli', 'balanced_pauli', 'local_c1', 'local_pauli']

Default value: 'pauli'

The group used to twirl the content of the identified layers.

  • 'pauli' uses the Pauli group.
  • 'balanced_pauli' uses the Pauli group with a balanced distribution.
  • 'local_c1' uses the subgroup of single-qubit Cliffords that are conjugated to single-qubit Cliffords on any entangling gates in the box, and the Pauli group everywhere else.
  • 'local_pauli' uses the Pauli subgroup that commutes with an entangler for non-Clifford gates, and the Pauli group everywhere else.

num_randomizations

field

Type: Annotated[int, Field(ge``=``1)] | Literal['auto']

Default value: 'auto'

The number of random samples to use when twirling or performing sampled mitigation.

If "auto", the value is determined automatically based on the input PUB and other options.

shots_per_randomization

field

Type: Annotated[int, Field(ge``=``1)] | Literal['auto']

Default value: 'auto'

The number of shots to run for each random sample.

If "auto", the value is determined automatically based on the input PUB and other options.

strategy

field

Type: Literal['active', 'active-accum', 'active-circuit', 'all']

Default value: 'active-accum'

Specify the strategy of twirling qubits in identified layers of 2-qubit twirled gates.

  • "active": Only the instruction qubits in each individual twirled layer will be twirled.
  • "active-circuit": The union of all instruction qubits in the circuit will be twirled in each twirled layer.
  • "active-accum": The union of instructions qubits in the circuit up to the current twirled layer will be twirled in each individual twirled layer.
  • "all": All qubits in the input circuit will be twirled in each twirled layer.

update

update(**kwargs)

GitHub

Update the options.

Parameters

kwargs (Any)

Return type

None

このページは役に立ちましたか?
バグや誤字の報告、またはコンテンツの要求はGitHubで行ってください。