Curriculum / Quantum Hardware & NISQ / Zero-Noise Extrapolation Simulation

Lesson 17 of 20Code challengePro+175 XP

Zero-Noise Extrapolation Simulation

Implement ZNE to improve circuit fidelity through noise amplification and extrapolation.

Zero-Noise Extrapolation Simulation

Zero-Noise Extrapolation (ZNE) is a practical error mitigation technique for NISQ hardware. It runs circuits at multiple noise levels and fits a polynomial to extrapolate to zero noise.

How ZNE Works

  1. 1.Run your circuit at noise level (baseline)
  2. 2.Run at (amplified by inserting gate pairs)
  3. 3.Fit:
  4. 4.Extrapolate to E(0) = a

For small circuits, this recovers the noiseless expectation value with only 2-5x measurement overhead.

Noise Model for This Exercise

In this exercise, noise is modeled as a bit-flip channel: with probability p_noise per qubit, the qubit's measurement outcome is flipped.

A Bell state gives . We measure the "correlation" ideally.

With bit-flip noise:

  • Some |00> shots flip to |01> or |10> (decreasing both P(00) and P(11))
  • E(p) deviates from 0 as a function of p

The expectation value of ZZ for the Bell state is 1, not 0. Let's measure .

The Extrapolation Procedure

Given measurements at noise levels p, 2p, 3p:

  • Average 5 runs at each noise level (reducing shot noise)
  • Fit a linear extrapolation: E_extrap = E(p) - (E(2p) - E(p))
  • Or fit a polynomial through all three points and evaluate at p=0

Linear extrapolation:

Why Averaging Reduces Shot Noise

Each quantum circuit run is a single sample from a probability distribution. The expectation value has standard error . To reduce this by 2x, you need 4x more shots. Averaging 5 independent runs at each noise level reduces shot noise by , making the extrapolation more reliable. ZNE's total measurement overhead is: (num_noise_levels) x (runs_per_level) x (shots_per_run).

This is the opening of the lesson. The full walkthrough, the interactive circuit, and the graded challenge continue inside myqubit.

How this lesson works

A hands-on coding challenge. You write Qiskit-compatible Python in the browser editor, run it instantly via WebAssembly, watch the circuit and Bloch sphere react, and pass automatic output checks. The AI tutor Qubitus gives Socratic hints if you get stuck.

Part of: Quantum Hardware & NISQ

Explore the physics of real quantum computers, understand noise, and learn near-term algorithms designed for today's noisy hardware.

This lesson is part of Pro

Unlock Quantum Hardware & NISQ and all 10 tracks with Pro: $12.99/month, $79/year, or $97 lifetime. Start with the free track first if you are new.