Sparse Blossom: correcting a million errors per core second with minimum-weight matching
Oscar Higgott, Craig Gidney
TL;DR
Sparse blossom presents a fast, exact MWEM decoder by directly solving the embedded matching problem on detector graphs, avoiding costly all-to-all Dijkstra searches. The approach relies on graph fill regions, compressed edges, region edges, and a timeline-driven architecture (matcher, flooder, tracker) to grow, collide, and shrink regions, forming matches and blossoms. It achieves real-time decoding performance on surface-code circuits (0.1% noise, distance-17) and scales to larger codes, with the open-source PyMatching v2 implementation supporting both $X$ and $Z$ bases and enabling parallelization. The work also introduces compression-inspired tracking and outlines worst-case bounds and negative-weight handling, offering practical pathways to real-time quantum error correction at scale.
Abstract
In this work, we introduce a fast implementation of the minimum-weight perfect matching (MWPM) decoder, the most widely used decoder for several important families of quantum error correcting codes, including surface codes. Our algorithm, which we call sparse blossom, is a variant of the blossom algorithm which directly solves the decoding problem relevant to quantum error correction. Sparse blossom avoids the need for all-to-all Dijkstra searches, common amongst MWPM decoder implementations. For 0.1% circuit-level depolarising noise, sparse blossom processes syndrome data in both $X$ and $Z$ bases of distance-17 surface code circuits in less than one microsecond per round of syndrome extraction on a single core, which matches the rate at which syndrome data is generated by superconducting quantum computers. Our implementation is open-source, and has been released in version 2 of the PyMatching library.
