Skip to main content
IBM Quantum Platform

qiskit_noise_learning.analysis.ZeroPostSelect

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

GitHub

Bases: AnalysisStage

Apply a mask to raw data based on whether bit values are all False.

This post-selection stage identifies cregs and masks shots whose bit patterns indicate failure. It can be configured to operate in one of two modes:

  • "node": Shots are discarded if any bit in the identified creg is True.

  • "edge": Shots are discarded if there exists a pair of neighbouring qubits in the

    coupling map for which both bits are True.

Parameters

  • creg_identifier – A callable that, given a list of present creg names, returns an iterator over creg names to post-select on. Defaults to identifying cregs with naming pattern "*_ps".
  • mode – Post-selection mode; either "node" or "edge".

__init__

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


Methods

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

Attributes

Column 1
Column 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.

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