VQE Suite / Physics

Zero Noise Extrapolation

How the ZNE panel turns a noisy energy estimate back toward the noiseless answer: depolarizing noise, digital gate folding, and Richardson extrapolation, with real numbers from the shipped simulator.

Depolarizing noise

Each gate in the ansatz circuit is followed by a depolarizing channel acting on the qubit(s) it touched. For a single qubit,

ρ→(1−p)ρ+p3(XρX+YρY+ZρZ)\rho \to (1-p)\rho + \frac{p}{3}\left(X\rho X + Y\rho Y + Z\rho Z\right)

and for the two qubit CNOT gate, the channel spreads over all 15 non identity two qubit Pauli strings:

ρ→(1−p)ρ+p15∑P≠I⊗IPρP†\rho \to (1-p)\rho + \frac{p}{15}\sum_{P \neq I\otimes I} P\rho P^\dagger

implemented directly on a 4×4 density matrix in src/lib/physics/densityMatrix.ts, the playground's two sliders set the single qubit gate error rate and the two qubit (CNOT) gate error rate independently, since real hardware's two qubit gates are consistently noisier.

Digital gate folding

Zero noise extrapolation needs the same circuit run at several different noise levels. Rather than changing hardware noise directly, digital ZNE scales it by rerunning extra, otherwise redundant gates: global folding replaces the ansatz unitary UU with

Uλ=U (U†U)k,λ=2k+1U_\lambda = U\,(U^\dagger U)^{k}, \qquad \lambda = 2k+1

Ideally U†U=IU^\dagger U = I, so UλU_\lambda computes the same thing as UU, but each extra U†UU^\dagger U pair re executes every physical gate, which re exposes the state to the depolarizing channels above. More folds, same ideal answer, more accumulated noise:

1applySequence(ansatzPhysicalGates(theta, false)); // U
2for (let k = 0; k < foldK; k++) {
3 applySequence(ansatzPhysicalGates(theta, true)); // U dagger
4 applySequence(ansatzPhysicalGates(theta, false)); // U
5}
6// lambda = 2*foldK + 1

The playground evaluates λ=1,3,5\lambda = 1, 3, 5 (k=0,1,2k = 0, 1, 2).

Richardson extrapolation via Lagrange interpolation

With noisy energy estimates E(λ1),…,E(λn)E(\lambda_1), \ldots, E(\lambda_n) at nn known noise scales, Richardson extrapolation fits the unique degree-(n−1)(n-1) polynomial through those points and evaluates it at λ=0\lambda = 0. Since these are exact deterministic simulation outputs (not statistically noisy samples), plain Lagrange interpolation is the right tool, no least squares regression needed:

E(0)≈∑i=1nE(λi)∏j≠i0−λjλi−λjE(0) \approx \sum_{i=1}^{n} E(\lambda_i) \prod_{j \neq i} \frac{0 - \lambda_j}{\lambda_i - \lambda_j}
1export function lagrangeInterpolate(points: { x: number; y: number }[], atX: number): number {
2 let total = 0;
3 for (let i = 0; i < points.length; i++) {
4 let weight = 1;
5 for (let j = 0; j < points.length; j++) {
6 if (i === j) continue;
7 weight *= (atX - points[j].x) / (points[i].x - points[j].x);
8 }
9 total += weight * points[i].y;
10 }
11 return total;
12}

The playground reports both the 2-point linear extrapolation (λ=1,3\lambda=1,3) and the 3-point quadratic extrapolation (λ=1,3,5\lambda=1,3,5).

Worked example (real measured output)

These numbers are a real run of the shipped code (runZne() in src/lib/physics/zne.ts) at the VQE optimized θ≈−0.2297\theta \approx -0.2297, with error rates p1=0.2%p_1 = 0.2\% per single qubit gate and p2=2%p_2 = 2\% per CNOT, not illustrative/rounded figures.
λEnergy (Ha)Error vs. noiseless (mHa)
1 (raw, noisy)-1.08336062.270
3 (raw, noisy)-0.967183178.446
5 (raw, noisy)-0.861327284.302
0 (linear extrap., 2-pt)-1.1414484.181
0 (quadratic extrap., 3-pt)-1.1453190.311

Chemical accuracy is conventionally 1.61.6 mHa. The raw λ=1 estimate misses it by nearly 40×; quadratic Richardson extrapolation recovers it from the same noisy data. Reproduce this yourself, or with your own error rates, on the VQE Suite playground, see also Hamiltonian & Ansatz for the parameter shift optimizer that produces θ\theta.

Source: src/lib/physics/densityMatrix.ts, zne.ts, linalg.ts