bloqade.squin.stdlib.simple.noise.depolarize
← Module overview
function
source
functiondepolarize¶source
bloqade.squin.stdlib.simple.noise.depolarize
def depolarize(p: float, qubit: Qubit) -> NoneApply a depolarizing noise channel to a qubit with probability p.
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. |
qubit | Qubit | The qubit to which the noise channel is applied. |