QEC ExplorerNoise Explorer
Part of QEC Explorer · Module 3 · Noise & Threshold
0 · Basics 1 · Detect errors 2 · Decoder race 3 · Noise explorer 4 · qLDPC Notebooks
Interactive · Monte Carlo · Runs in your browser

When does protection break?

Every decoder works fine when errors are rare. Crank the physical error rate up and eventually even a perfect code drowns. This module runs a real Monte Carlo experiment, sample thousands of random errors, decode each one with a real decoder, and measure how often a logical error slips through. Then sweep the error rate across code distances to look for the threshold: the crossover where making the code bigger finally starts helping.

Experiment

Code distance
Sweep mode runs all three distances (d=3, 5, 7) automatically.
Physical error rate p = 0.050
log-scaled · 0.001 → 0.5
Noise model
Z:X bias ratio ×30
Z errors at p × ratio
Decoder
Lookup decoder is only available at d=3.
Trials per data point
Above ~1000 trials, sweep mode (3 distances × ~9 points) can take many seconds at d=7.
Logical error rate
,
Trials run
0
Failures
0

Convergence, cumulative logical error rate

Press Run experiment. The curve shows the running logical error rate; watch it settle as more trials accumulate (Monte Carlo noise shrinks like 1/√trials).

Threshold sweep, logical vs physical error rate

d = 3
d = 5
d = 7
break-even (y = x)
Press Run experiment in sweep mode. This runs the Monte Carlo loop at ~9 error rates for each of d = 3, 5, 7 and plots three curves on log-log axes.
What you're looking for

The threshold, and why d = 3..7 makes it muddy

The ideal: below a critical error rate, the curves should fan out so that bigger distance = lower logical error rate (d=7 under d=5 under d=3), and above it the order flips. That crossover is the threshold. The reality at this scale: distances 3 to 7 with a few hundred trials are small and noisy. Real threshold plots use distances up to about 25 and millions of shots. So you'll often see the curves cross in a band rather than fan out cleanly, and at very low p the estimates are mostly Monte Carlo noise. The high-p order-flip is the most reliable signal here. This module shows you the actual numbers, muddiness and all, rather than a cleaned-up cartoon.

Tell us how QEC Explorer helped you

If this site helped you understand quantum error correction, or helped someone you shared it with, we would love to hear about it. Your stories help us make it better and show that open learning tools like this matter.

Want a high-quality, research-faithful simulation like the gross-code simulation you see in Module 4, built for your own class, club, or project? Just ask and we will make one.

qecexplorer@gmail.com