bloqade.squin.stdlib.broadcast.noise.depolarize
← Module overview
function
source
functiondepolarize¶source
bloqade.squin.stdlib.broadcast.noise.depolarize
def depolarize(p: float, qubits: ilist.IList[Qubit, Any]) -> NoneApply 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
| Name | Type | Description |
|---|---|---|
p | float | The probability with which a Pauli operator is applied. |
qubits | ilist.IList[Qubit, Any] | The list of qubits to which the noise channel is applied. |