Noise models
qiskit_paulice.noise_models
Noise model specification for evaluating spacetime Pauli checks.
NoiseModel
class NoiseModel(gate_noise=None, readout_noise=None, idling_noise=None)
Bases: object
Noise model used to find optimal circuit locations for spacetime Pauli checks.
from_backend
classmethod from_backend(backend, layout, uniform_gate_noise=False, pauli_bases=None)
Instantiate a NoiseModel from backend calibration data.
Edge keys in the resulting GateWiseNoise dict use virtual qubit indices (positions in layout). If the input circuit has a layout that maps virtual to physical consistently with layout, the keys also serve as physical indices.
idling_noise is always None from this method; if backend lacks readout calibration, readout_noise will also be None.
Parameters
- backend (BackendV2) – A backend containing two-qubit gate error probabilities for each coupling map edge as well as readout error information for each qubit in the layout.
- layout (Sequence[int]) – Physical qubit indices on the backend to include in the noise model. The order defines the virtual qubit indexing (virtual qubit 0 maps to
layout[0], etc.). - uniform_gate_noise (bool) – If
True,gate_noiseis aUniformGateNoise: the mean reported error over all edges. IfFalse, it is aGateWiseNoisewith a channel per edge built from that edge’s reported error. - pauli_bases (Sequence[str] | None) – For
GateWiseNoisemodels, the generators of each edge’s channel: 2-character Pauli strings paired left-to-right with the edge tuple, so"XZ"on edge(a, b)placesXonaandZonb. They share one rate, chosen so the channel has the edge’s total error probability. The default is the full 2Q Pauli basis excluding"II", the depolarizing channel ofUniformGateNoise. Ignored whenuniform_gate_noiseisTrue.
Returns
A NoiseModel instance containing gate and readout noise derived from backend calibration data.
Raises
ValueError – Backend is missing calibration data, layout contains invalid qubit indices, a Pauli basis is malformed or "II", or pauli_bases cannot produce an edge’s error.
Return type
from_pauli_lindblad_maps
classmethod from_pauli_lindblad_maps(layer_noise, readout_noise=None)
Create a NoiseModel from Pauli-Lindblad maps.
This method constructs a NoiseModel from PauliLindbladMap instances that represent noise channels affecting gates and, optionally, measurements. Gate noise is specified with the layer_noise argument. Each PauliLindbladMap instance is assumed to act on a unique layer of entangling gates. Readout noise is specified by a single PauliLindbladMap containing single-qubit Pauli-X generators and their associated rates.
Parameters
- layer_noise (Sequence[PauliLindbladMap]) – A sequence of
PauliLindbladMapobjects, where each map represents the noise channel for one unique entangling layer in the circuit. - readout_noise (PauliLindbladMap | None) – Optional
PauliLindbladMapcontaining Pauli X generators on each qubit for readout errors.
Returns
A NoiseModel instance reflecting the noise model(s) defined in the input PauliLindbladMap``s. ``idling_noise will always be None for this method.
Raises
- ValueError – Weight of error generator greater than
2. - ValueError – Readout error generator is not Pauli-X.
Return type
gate_noise
Type: GateNoise | None
Default value: None
Errors that occur during 2-qubit gate operations. Can be:
UniformGateNoise: The same depolarizing channel after every gate, with every non-identity Pauli equally likely.LayeredGateNoise: Pauli-Lindblad noise channel per unique entangling layerGateWiseNoise: Pauli-Lindblad noise channel per unique entangling edge
idling_noise
Default value: None
Qubit decay rate during idle time. Total error probability is given as 1 - exp(-t / idling_noise).
Not currently supported: both add_pauli_checks() and estimate_fault_rates() raise if this is set.
readout_noise
UniformGateNoise
Default value: <class 'float'>
An average gate infidelity p for every 2-qubit gate.
A depolarizing channel is applied after each 2-qubit gate: each of the 15 non-identity 2-qubit Paulis occurs with probability d / 15, where d = 5 p / 4 is the total error probability.
LayeredGateNoise
Layered noise model mapping unique entangling layers to Pauli error generators.
The Pauli-Lindblad error associated with each entangling layer is assumed to be defined before the gates in the layer.
Keys are tuples of qubit index pairs (edges) defining a layer. Values are lists of (pauli, rate) tuples where pauli is a Pauli or Pauli string defined over all qubits and rate is the associated error rate.
alias of dict[tuple[tuple[int, int], …], list[tuple[Pauli | str, float]]]
GateWiseNoise
Gate-wise noise model mapping qubit pairs to a Pauli noise channel.
Keys are tuples of qubit index pairs representing edges. Values are lists of (pauli, rate) tuples where pauli is a 2-character Pauli string and rate is the associated error rate. The string is paired left-to-right with the edge tuple — matching PauliLindbladMap’s sparse form (pauli_str, indices): for edge (a, b), "XZ" places X on a and Z on b.
GateNoise
Default value: float | dict[tuple[tuple[int, int], ...], list[tuple[qiskit.quantum_info.operators.symplectic.pauli.Pauli | str, float]]] | dict[tuple[int, int], list[tuple[str, float]]]
Gate noise can be uniform (float), layered (dict), or gate-wise (dict).