Skip to main content
IBM Quantum Platform
翻訳情報

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

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', apply_measurement_flips: bool = False)

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:

  • 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".
  • apply_measurement_flips – Whether or not to include measurement flips in the comparison. Defaults to False, i.e. comparing the physical measurement outcomes.

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', apply_measurement_flips: bool = False)


Methods

コラム「 1 」
コラム「 2 」
__init__([creg_identifier, mode, ...])
run(fit)Run this stage, returning a new Fit with the output level populated.

Attributes

コラム「 1 」
コラム「 2 」
apply_measurement_flips
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.

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