Skip to main content
IBM Quantum Platform

qiskit_ibm_runtime.options_models.PostSelectionOptions

pydantic model PostSelectionOptions

GitHub

Bases: BaseOptionsModel

Options for post selecting results.

Config

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

enable

field

Type: Annotated[bool, AfterValidator(func``=``_warn_post_selection)]

Default value: False

Whether to enable Post Selection when performing learning experiments.

If True, Post Selection is applied to all the learning circuits. In particular, the following steps are undertaken:

  • Using the passes in

    qiskit_addon_utils.noise_management.post_selection.transpiler.passes, the learning circuits are modified by adding measurements on the spectator qubits, as well as post selection measurements.

  • The results of each individual learning circuits are post selected by discarding the shots

    where one or more bits failed to flip, as explained in the docstring of qiskit_addon_utils.noise_management.post_selection.PostSelector.compute_mask().

If False, all the other Post Selection options will be ignored.

Constraints

  • func = <function _warn_post_selection at 0x7f3431e82170>

strategy

field

Type: Literal['node', 'edge']

Default value: 'node'

The strategy used to decide if a shot should be kept or discarded.

The available startegies are:

  • 'node': Discard every shot where one or more bits failed to flip. Keep every other shot.

  • 'edge': Discard every shot where there exists a pair of neighbouring qubits for which

    both of the bits failed to flip. Keep every other shot.

See the dosctrings of PostSelector and PostSelector.compute_mask() for more details.

x_pulse_type

field

Type: Literal['xslow', 'rx']

Default value: 'xslow'

The type of the X-pulse used for the post selection measurements.

update

update(**kwargs)

GitHub

Update the options.

Parameters

kwargs (Any)

Return type

None

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