qiskit_noise_learning.analysis.suffix_creg_identifier
qiskit_noise_learning.analysis.suffix_creg_identifier(suffix: str = '_ps') → Callable[[list[str]], Iterator[tuple[str, ...]]]
Return a creg identifier that pairs each creg named "*<suffix>" with "*".
The returned callable is suitable as the creg_identifier argument of FlipPostSelect, and is the default that class uses. Given the names of the cregs present in a dataset, it yields one tuple for every name ending in suffix: the pair (base, name) when the corresponding base name is also present, and the singleton (name,) when it is not. Names that do not end in suffix are not post-selected on.
Parameters
suffix – The complete creg name suffix marking a post-selection register, including any separator. The default pairs "meas_ps" with "meas".
Returns
A callable mapping a list of creg names to an iterator over groups of creg names.
Raises
ValueError – If suffix is empty, which would pair every creg with itself.