PhysicalNoiseModel and simulating it.
Describe the physical noise
APhysicalNoiseModel is a set of per-operation noise rules. Each field takes a list of
rules that compose, except measure, which maps a measurement basis to a flip probability.
Only reset gates (
R, RX) and recognized 1- and 2-qubit Clifford gates may appear in
gates; any other gate name is rejected. Supplying two rules of the same kind to one
field is also rejected, so idle=[DepolarizeRule(p=1e-4), DepolarizeRule(p=2e-4)] is an
error rather than a composition.
Noise rules
DepolarizeRule(p=...) applies a uniformly random Pauli error with total probability p;
with probability 1 - p nothing happens. On a 1-qubit operation each of X, Y and Z
is applied with probability p / 3; on a 2-qubit operation each of the 15 non-identity
two-qubit Paulis is applied with probability p / 15.
PauliRule(pauli=..., p=...) applies one specific Pauli error — "X", "Y" or "Z" —
with probability p. This is the natural way to express a biased error, such as a reset to
|0⟩ that occasionally leaves the qubit in |1⟩:
A complete model
Composing those rules into a single model, scaled by one parameterp. This is the model
public/depolarize_1e-3 was generated from, with p = 1e-3:
Initialize the model
Callinitialize_logical_noise to simulate the resulting logical error rates and store
them under a name you choose.
initialize_logical_noise runs a logical-noise simulation on the backend and is a
long-running operation. You only need to run it once per noise model — afterwards, retrieve
the stored result with get_logical_noise.
Logical X and Z error of a 1-qubit Clifford, exponentially suppressed as the code distance grows.
10 ** (a * cd + b); the legend reports the suppression
factor Λ (the improvement per two units of code distance). LogicalNoise also provides
plot_cnot() and plot_s(), and get_clifford_logical_error, get_cnot_logical_error
and get_s_logical_error to read a single rate at a given code distance.
Remove a logical noise model
When you no longer need a model you created, delete it withremove_logical_noise. Public
models (those whose name begins with public/) are shared and cannot be removed this way.