Skip to main contentIBM Quantum Documentation

TwirlingOptions

TwirlingOptions(*args, **kwargs)

GitHub(opens in a new tab)

Twirling options.

Parameters

  • enable_gates – Whether to apply 2-qubit gate twirling. Default: False.

  • enable_measure – Whether to enable twirling of measurements. Twirling will only be applied to those measurement registers not involved within a conditional logic. Default: True.

  • num_randomizations – The number of random samples to use when twirling or peforming sampled mitigation. If “auto”, the value will be chosen automatically based on the input PUBs. Default: “auto”.

  • shots_per_randomization – The number of shots to run for each random sample. If “auto”, the value will be chosen automatically based on the input PUBs. Default: “auto”.

  • strategy

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

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

    Default: “active-accum”.


Attributes

enable_gates

UnsetType | bool = Unset

enable_measure

UnsetType | bool = Unset

num_randomizations

UnsetType | int | Literal['auto'] = Unset

shots_per_randomization

UnsetType | int | Literal['auto'] = Unset

strategy

UnsetType | Literal['active', 'active-accum', 'active-circuit', 'all'] = Unset


Methods

Was this page helpful?
Report a bug or request content on GitHub.