Skip to main content
IBM Quantum Platform

Noise

qiskit_mitigation.noise

Functionality for specifying and transforming quantum noise.

create_postselected_noise_mask

create_postselected_noise_mask(noisy_circuit, noise_maps, detectors)

GitHub

Identify generators in noise_maps that anticommute with one or more detectors.

Each detector, given as a Pauli operator at the end of noisy_circuit is evolved backward through the circuit. At each InjectNoise site, a generator that anticommutes with some evolved detector gets scale 0; a surviving generator gets 1.

Parameters

  • noisy_circuit (QuantumCircuit) – A circuit of box instructions. Box instructions may contain Clifford instructions, and any non-Clifford instructions they contain must commute with all detectors. InjectNoise annotations should be used to denote noisy layers in the circuit, and each InjectNoise reference ID should be a key in noise_maps.
  • detectors (PauliList |Sequence[Pauli |str]) – Pauli detectors defined at the end of noisy_circuit on all qubits.
  • noise_maps (dict[str, PauliLindbladMap]) – A mapping from each unique InjectNoise reference ID to the Pauli-Lindblad noise associated with that circuit layer.

Returns

  • A dict mapping each noisy box’s InjectNoise.modifier_ref to a 0/1 array aligned with that box’s noise_maps generators, ready to use as samplomatic local_scales
  • The sampling cost γ2=e(4∑λ⋅mask)\gamma^2 = e^{(4 \sum \lambda \cdot \text{mask})} of inverting only the surviving generators with PEC.

Return type

tuple[dict[str, ndarray], float]

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