Skip to content

bloqade.squin.stdlib.broadcast.noise.depolarize

← Module overview

functiondepolarizesource

bloqade.squin.stdlib.broadcast.noise.depolarize

def depolarize(p: float, qubits: ilist.IList[Qubit, Any]) -> None

Apply a depolarizing noise channel to a list of qubits with probability p.

For each qubit, this will randomly select one of the Pauli operators X, Y, Z with a probability p / 3 and apply it to the qubit. No operator is applied with a probability of 1 - p.

Parameters

NameTypeDescription
pfloatThe probability with which a Pauli operator is applied.
qubitsilist.IList[Qubit, Any]The list of qubits to which the noise channel is applied.
source