Optimal Decoding with the Worm

The paper introduces the "worm decoder," a Markov-Chain Monte-Carlo-based algorithm that achieves optimal decoding for various qLDPC codes by approximating logical error probabilities, offering rigorous efficiency guarantees for typical errors and demonstrating superior performance over existing methods even under depolarizing noise through the use of soft information.

Zac Tobias, Nikolas P. Breuckmann, Benedikt Placke

Published 2026-03-06
📖 6 min read🧠 Deep dive

Here is an explanation of the paper "Optimal Decoding with the Worm," translated into simple, everyday language using analogies.

The Big Picture: Fixing a Broken Puzzle

Imagine you are trying to solve a massive, 3D jigsaw puzzle that represents a quantum computer's memory. However, the puzzle is being played in a room where the lights flicker, and sometimes pieces get knocked out of place or swapped with the wrong ones. This is Quantum Error Correction.

To fix the puzzle, you need a Decoder. This is a smart computer program that looks at the "clues" (called a syndrome) left behind by the mistakes and figures out exactly how to put the pieces back together.

For a long time, the best way to solve this was Minimum-Weight Perfect Matching (MWPM). Think of this like a delivery driver who always takes the shortest, most direct route to fix a problem. It's fast and usually works well. But it has a flaw: it assumes there is only one way to fix the puzzle. In reality, there might be ten different ways to fix it that all look the same to the clues, and some of those ways are much more likely to be the "true" fix than others. MWPM misses this nuance, making it "sub-optimal."

The authors of this paper introduce a new decoder called the Worm Decoder. It doesn't just guess the single best route; it explores all the possible routes to find the statistically most likely solution. It's like sending out a swarm of explorers instead of just one driver.


The Star of the Show: The "Worm"

The core of this new decoder is an algorithm called the Worm Algorithm.

The Analogy: The Worm in the Garden
Imagine your decoding graph is a garden with a maze of paths. The "defects" (the errors) are like holes in the ground.

  • Old Method (MWPM): You look at the holes and draw a single string connecting them in the shortest way possible.
  • The Worm Method: You release a magical worm into the garden.
    1. The worm starts at a random spot and creates two "heads" (or a head and a tail).
    2. It wiggles around the garden, eating up paths and leaving a trail.
    3. Eventually, the two heads meet up, and the trail they left behind forms a closed loop.
    4. The worm then disappears, and the loop remains.

By repeating this process millions of times, the worm generates thousands of different "loops" (possible error corrections). Because the worm moves in a specific, mathematically proven way, the loops it generates appear with the exact same frequency as the real errors would occur in nature.

Why is this better?
The worm can take "non-local" shortcuts. It can jump across the garden instantly to connect two far-away holes, something a local step-by-step walker (like the old MWPM) can't do easily. This allows it to explore the whole garden quickly and find the most probable solution, even if it's a complex, winding path.


The Secret Sauce: "Soft Information"

Most decoders just give you an answer: "Here is the fix."
The Worm Decoder is like a wise old teacher. It gives you the answer, but it also whispers, "I'm 99% sure this is right, but there's a 1% chance it's this other thing."

This is called Soft Information.

  • Why it matters: If you are building a quantum computer, you might want to try a few different fixes based on those probabilities. Or, you might want to use that "1% chance" data to help fix other parts of the computer that are connected to this one.
  • The Result: The authors showed that by using this "soft info," they could fix errors in "depolarizing noise" (a messy, realistic type of error) much better than any previous method. It's like using a weather forecast to decide not just whether to bring an umbrella, but which umbrella to bring based on the wind speed.

The "Mixing Time" Problem: Will the Worm Get Stuck?

There is a catch with the worm. If the garden is too complex, the worm might get stuck in a corner, wandering in circles forever without finding the exit. In math terms, this is called slow mixing. If the worm takes too long to settle down, the decoder is too slow to be useful.

The authors proved a rigorous mathematical guarantee: The worm will almost always find the exit quickly.

The Analogy: The "Griffiths Phase"
They compared the garden to a forest with rare, dense thickets.

  • Typical Errors: In a normal forest, the worm can wiggle through easily.
  • Rare Errors: Sometimes, the worm might get trapped in a dense thicket (a "rare region" of errors). This would make it slow.
  • The Guarantee: They proved that while these dense thickets exist, they are so incredibly rare that for any practical quantum computer, the worm will almost never get stuck. It will finish its job in a reasonable amount of time, even for very large puzzles.

The Surprising Discovery: Hyperbolic Codes

The paper also tested this on a special type of code called Hyperbolic Surface Codes. These codes live on a curved, saddle-shaped geometry (like a Pringles chip) rather than a flat sheet.

The Finding:
On these curved codes, the old "shortest path" method (MWPM) was almost as good as the fancy new "Worm" method.
Why?
In a flat garden, there are many different winding paths that look the same length. In a curved, hyperbolic garden, the geometry is so tight that there is usually only one way to connect two points without taking a huge detour. The "degeneracy" (the number of equivalent paths) is low.
This means that for these specific codes, the simple "shortest path" guess is actually very close to the perfect answer. The Worm confirmed this, but it also proved that the Worm is still the superior tool for the general, messy world of quantum computing.

Summary

  1. The Problem: Quantum computers make mistakes. Fixing them requires a decoder. The old decoders are fast but sometimes miss the best solution because they ignore the fact that many fixes look the same.
  2. The Solution: The Worm Decoder. It uses a "worm" that wiggles through all possible solutions to find the most likely one, effectively accounting for all the "look-alike" fixes.
  3. The Proof: They proved mathematically that the worm won't get stuck (it mixes fast) for almost all real-world errors.
  4. The Bonus: The worm provides "soft info" (probabilities), which allows for even better error correction when combined with other techniques.
  5. The Takeaway: This is a major step toward making large-scale, fault-tolerant quantum computers a reality, offering a decoder that is both theoretically optimal and practically efficient.