Skip to main content
The engine needs to know how noisy the underlying hardware is. A logical noise model holds the simulated logical error rates of the fundamental operations (Clifford gates and T gate) as a function of code distance. You can either use a ready-made public model or generate your own from a physical noise description.

Use a public logical noise model

Classiq hosts public logical noise models that any user can reference by name, with no simulation to run yourself. This is the fastest way to get started — retrieve one with get_logical_noise:
public/depolarize_1e-3 is the public noise model currently in the list — a general-purpose depolarizing model, generated from the physical noise model below with p = 1e-3. More public models can be added by request, and will be introduced over time.

Create your own logical noise model

To model different hardware, describe it with a PhysicalNoiseModel — composed of per-operation rules such as DepolarizeRule and PauliRule — then call initialize_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.
Once retrieved, you can inspect and plot the fitted logical error rates — for example, the 1-qubit Clifford curves as a function of code distance:
Logical errors of a 1-qubit Clifford by code distance

Logical X and Z error of a 1-qubit Clifford, exponentially suppressed as the code distance grows.

Each curve is a log-linear fit 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 with remove_logical_noise. Public models (such as public/depolarize_1e-3) are shared and cannot be removed this way.
Next, route a program onto the lattice.