PostSelectionOptions
class PostSelectionOptions(enable=False, x_pulse_type='xslow', strategy='node')
Bases: object
Options for post selecting results.
Attributes
Parameters
- enable (bool)
- x_pulse_type (Literal['xslow', 'rx'])
- strategy (Literal['node', 'edge'])
enable
Type: bool
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.
strategy
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 whichboth of the bits failed to flip. Keep every other shot.
See the dosctrings of PostSelector and PostSelector.compute_mask() for more details.
Defaults to node.
x_pulse_type
Type: Literal['xslow', 'rx']
Default value: 'xslow'
The type of the X-pulse used for the post selection measurements.