pygsti.objects.GateSet.depolarize¶
-
GateSet.
depolarize
(gate_noise=None, spam_noise=None, max_gate_noise=None, max_spam_noise=None, seed=None)¶ Apply depolarization uniformly or randomly to this gateset’s gate and/or SPAM elements, and return the result, without modifying the original (this) gateset. You must specify either gate_noise or max_gate_noise (for the amount of gate depolarization), and either spam_noise or max_spam_noise (for spam depolarization).
Parameters: - gate_noise (float, optional) – apply depolarizing noise of strength 1-noise to all gates in the gateset. (Multiplies each assumed-Pauli-basis gate matrix by the diagonal matrix with (1.0-noise) along all the diagonal elements except the first (the identity).
- spam_noise (float, optional) – apply depolarizing noise of strength 1-noise to all SPAM vectors in the gateset. (Multiplies the non-identity part of each assumed-Pauli-basis state preparation vector and measurement vector by (1.0-noise).
- max_gate_noise (float, optional) – specified instead of ‘gate_noise’; apply a random depolarization with maximum strength 1-max_noise to each gate in the gateset.
- max_spam_noise (float, optional) – specified instead of ‘spam_noise’; apply a random depolarization with maximum strength 1-max_noise to SPAM vector in the gateset.
- seed (int, optional) – if not None, seed numpy’s random number generator with this value before generating random depolarizations.
Returns: the depolarized GateSet
Return type: