---
title: noise_models (latest version)
description: API reference for qiskit_paulice.noise_models in the latest version of qiskit-addon-paulice
source: https://quantum.cloud.ibm.com/docs/en/api/qiskit-addon-paulice/qiskit-paulice-noise-models
---

# 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](https://github.com/Qiskit/qiskit-paulice/tree/main/qiskit_paulice/noise_models.py#L59-L292)

Bases: [`object`](https://docs.python.org/3/library/functions.html#object)

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

**Parameters**

- **gate\_noise** (*GateNoise | None*)
- **readout\_noise** ([*float*](https://docs.python.org/3/library/functions.html#float) *| None*)
- **idling\_noise** ([*float*](https://docs.python.org/3/library/functions.html#float) *| None*)

#### from\_backend

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

[GitHub](https://github.com/Qiskit/qiskit-paulice/tree/main/qiskit_paulice/noise_models.py#L78-L198)

Instantiate a [`NoiseModel`](#qiskit_paulice.noise_models.NoiseModel "qiskit_paulice.noise_models.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*](/docs/api/qiskit/qiskit.providers.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*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*int*](https://docs.python.org/3/library/functions.html#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*](https://docs.python.org/3/library/functions.html#bool)) – If `True`, the `gate_noise` field in the output [`NoiseModel`](#qiskit_paulice.noise_models.NoiseModel "qiskit_paulice.noise_models.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*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*str*](https://docs.python.org/3/library/stdtypes.html#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`](#qiskit_paulice.noise_models.NoiseModel "qiskit_paulice.noise_models.NoiseModel") instance containing gate and readout noise derived from backend calibration data.

**Raises**

[**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – Backend is missing calibration data or layout contains invalid qubit indices.

**Return type**

[*NoiseModel*](#qiskit_paulice.noise_models.NoiseModel "qiskit_paulice.noise_models.NoiseModel")

#### from\_pauli\_lindblad\_maps

*classmethod* `from_pauli_lindblad_maps(layer_noise, readout_noise=None)`

[GitHub](https://github.com/Qiskit/qiskit-paulice/tree/main/qiskit_paulice/noise_models.py#L200-L292)

Create a NoiseModel from Pauli-Lindblad maps.

This method constructs a [`NoiseModel`](#qiskit_paulice.noise_models.NoiseModel "qiskit_paulice.noise_models.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*](https://docs.python.org/3/library/collections.abc.html#collections.abc.Sequence)*\[*[*PauliLindbladMap*](/docs/api/qiskit/qiskit.quantum_info.PauliLindbladMap)*]*) – A sequence of `PauliLindbladMap` objects, where each map represents the noise channel for one unique entangling layer in the circuit.
- **readout\_noise** ([*PauliLindbladMap*](/docs/api/qiskit/qiskit.quantum_info.PauliLindbladMap) *| None*) – Optional `PauliLindbladMap` containing Pauli X generators on each qubit for readout errors.

**Returns**

A [`NoiseModel`](#qiskit_paulice.noise_models.NoiseModel "qiskit_paulice.noise_models.NoiseModel") instance reflecting the noise model(s) defined in the input `PauliLindbladMap``s. ``idling_noise` will always be `None` for this method.

**Raises**

- [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – Weight of error generator greater than `2`.
- [**ValueError**](https://docs.python.org/3/library/exceptions.html#ValueError) – Readout error generator is not Pauli-X.

**Return type**

[*NoiseModel*](#qiskit_paulice.noise_models.NoiseModel "qiskit_paulice.noise_models.NoiseModel")

#### gate\_noise

Type: `GateNoise` | [`None`](https://docs.python.org/3/library/constants.html#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`](https://docs.python.org/3/library/functions.html#float) | [`None`](https://docs.python.org/3/library/constants.html#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`](https://docs.python.org/3/library/functions.html#float) | [`None`](https://docs.python.org/3/library/constants.html#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`](https://docs.python.org/3/library/stdtypes.html#dict)\[[`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple)\[[`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple)\[[`int`](https://docs.python.org/3/library/functions.html#int), [`int`](https://docs.python.org/3/library/functions.html#int)], …], [`list`](https://docs.python.org/3/library/stdtypes.html#list)\[[`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple)\[[`Pauli`](/docs/api/qiskit/qiskit.quantum_info.Pauli) | [`str`](https://docs.python.org/3/library/stdtypes.html#str), [`float`](https://docs.python.org/3/library/functions.html#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`](/docs/api/qiskit/qiskit.quantum_info.PauliLindbladMap)’s sparse form `(pauli_str, indices)`: for edge `(a, b)`, `"XZ"` places `X` on `a` and `Z` on `b`.

alias of [`dict`](https://docs.python.org/3/library/stdtypes.html#dict)\[[`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple)\[[`int`](https://docs.python.org/3/library/functions.html#int), [`int`](https://docs.python.org/3/library/functions.html#int)], [`list`](https://docs.python.org/3/library/stdtypes.html#list)\[[`tuple`](https://docs.python.org/3/library/stdtypes.html#tuple)\[[`str`](https://docs.python.org/3/library/stdtypes.html#str), [`float`](https://docs.python.org/3/library/functions.html#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).
