Skip to main contentIBM Quantum Documentation Mirror

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)

GitHub

Bases: object

Noise model used to find optimal circuit locations for spacetime Pauli checks.

Parameters

  • gate_noise (GateNoise | None)
  • readout_noise (float | None)
  • idling_noise (float | None)

from_backend

classmethod from_backend(backend, layout, uniform_gate_noise=False, pauli_bases=None)

GitHub

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, the gate_noise field in the output NoiseModel will be a UniformGateNoise and the error probability is assumed to be distributed uniformly among the 15 non-identity Pauli bases to form a uniform depolarizing channel which will affect all entangling gates equally. If False, gate_noise will be a GateWiseNoise instance where each edge is associated with a custom noise channel based on backend calibration data.
  • pauli_bases (Sequence[str] | None) – For GateWiseNoise models, pauli_bases are the bases over which the error probability reported from the backend will be distributed. Each basis is a 2-character Pauli string paired left-to-right with the edge tuple, so "XZ" on edge (a, b) places X on a and Z on b. The default behavior is to use the full 2Q Pauli basis excluding "II". For UniformNoise, the full basis is assumed, and this argument is ignored.

Returns

A NoiseModel instance containing gate and readout noise derived from backend calibration data.

Raises

ValueError – Backend is missing calibration data or layout contains invalid qubit indices.

Return type

NoiseModel

from_pauli_lindblad_maps

classmethod from_pauli_lindblad_maps(layer_noise, readout_noise=None)

GitHub

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 PauliLindbladMap objects, where each map represents the noise channel for one unique entangling layer in the circuit.
  • readout_noise (PauliLindbladMap | None) – Optional PauliLindbladMap containing 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

NoiseModel

gate_noise

Type: GateNoise | None

Default value: None

Errors that occur during 2-qubit gate operations. Can be:

  • UniformNoise: Same error probability for all gates. The error probability is equally distributed to each Pauli basis represented in the channel.
  • LayeredNoise: Pauli-Lindblad noise channel per unique entangling layer
  • GateWiseNoise: Pauli-Lindblad noise channel per unique entangling edge

idling_noise

Type: float | None

Default value: None

Qubit decay rate during idle time. Total error probability is given as 1 - exp(-t / idling_noise).

readout_noise

Type: float | None

Default value: None

Probability of bit-flip during measurement.

UniformGateNoise

Default value: <class 'float'>

A depolarizing probability applied uniformly to all 2-qubit gates.

This probability will be equally distributed among the 15 non-identity Paulis in the 2-qubit Pauli basis to form the depolarizing channel. This noise channel will be applied after each entangling gate.

LayeredGateNoise

Layered noise model mapping unique entangling layers to Pauli error generators.

Note

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.

alias of dict[tuple[int, int], list[tuple[str, float]]]

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).