Skip to main content
IBM Quantum Platform
Informationen zur Übersetzung

In Kürze folgen für diese Seite weitere Übersetzungen in andere Sprachen.

qiskit_noise_learning.analysis.FlipPostSelect

class qiskit_noise_learning.analysis.FlipPostSelect(creg_identifier: Callable[[list[str]], Iterator[tuple[str, ...]]] | None = None, mode: Literal['node', 'edge'] = 'edge')

GitHub

Bases: AnalysisStage

Apply a mask to raw data based on bit-flip failures across classical registers.

This post-selection stage identifies groups of one or two cregs, marks the failed bits of each group, and masks shots based on the structure of the failures. Both rules read the outcome of a bit, data ^ measurement_flips, which is the measured value with the flip introduced by measurement twirling undone. What counts as a failure depends on the size of the group:

  • Two cregs (base, ps): bit j failed if its outcome is the same in both, i.e. it did not flip between the two measurements.
  • One creg (base,): bit j failed if its outcome is True. This is the natural rule when a creg is expected to read out all-zeros, and coincides with the two-creg rule for a ps register of all ones.

Given the failed bits, the mode determines which shots are discarded:

  • "node": Shots are discarded if at least one bit failed.
  • "edge": Shots are discarded if there exists a pair of neighbouring qubits in the coupling map for which both bits failed.

Parameters

  • creg_identifier – A callable that, given a list of present creg names, returns an iterator over tuples of creg names to post-select on. Each tuple holds either one or two names, selecting the corresponding rule above. Defaults to pairing each creg named "*_ps" with "*" when the latter is present, and treating it on its own otherwise.
  • mode – Post-selection mode; either "node" or "edge".

Raises

ValueError – If mode is not "node" or "edge".

__init__

__init__(creg_identifier: Callable[[list[str]], Iterator[tuple[str, ...]]] | None = None, mode: Literal['node', 'edge'] = 'edge')


Methods

Kolumne „ 1 “
Kolumne „ 2 “
__init__([creg_identifier, mode])
run(fit)Run this stage, returning a new Fit with the output level populated.

Attributes

Kolumne „ 1 “
Kolumne „ 2 “
creg_identifier
input_levelThe data level this stage reads.
mode
output_levelThe data level this stage writes.

input_level

The data level this stage reads.

output_level

The data level this stage writes.

War diese Seite hilfreich?
Melden Sie auf GitHub einen Fehler, einen Tippfehler oder fordern Sie Inhalte an.