Neural Minimum Weight Perfect Matching for Quantum Error Codes
Abstract
Realizing the full potential of quantum computation requires Quantum Error Correction (QEC). QEC reduces error rates by encoding logical information across redundant physical qubits, enabling errors to be detected and corrected. A common decoder used for this task is Minimum Weight Perfect Matching (MWPM) a graph-based algorithm that relies on edge weights to identify the most likely error chains. In this work, we propose a data-driven decoder named Neural Minimum Weight Perfect Matching (NMWPM). Our decoder utilizes a hybrid architecture that integrates Graph Neural Networks (GNNs) to extract local syndrome features and Transformers to capture long-range global dependencies, which are then used to predict dynamic edge weights for the MWPM decoder. To facilitate training through the non-differentiable MWPM algorithm, we formulate a novel proxy loss function that enables end-to-end optimization. Our findings on the toric code under depolarizing noise demonstrate thresholds of 17.9\% and 10.95\%, nearing the 18.9\% and 11.0\% maximum likelihood bounds, highlighting the advantage of hybrid decoders that combine the predictive capabilities of neural networks with the algorithmic structure of classical matching.
Lay Summary
Quantum computers promise to solve problems beyond the reach of classical machines. However, their fundamental information unit - the qubit, which is the quantum analogue of the classical bit, is notoriously fragile and error-prone. Quantum error correction addresses this by encoding information redundantly across many qubits, allowing errors to be detected and corrected. Detection works by measuring checks that reveal partial information about errors, specifically where error chains begin and end, but not the chains themselves. Reconstructing the most likely errors from this partial information is the core decoding challenge. A popular approach is to use a matching algorithm, which pairs up the detected endpoints and infers the most probable fault chain connecting each pair. Rather than replacing this algorithm, we developed a neural network that learns to guide it by adapting to the specific error pattern observed each time. Tested across several quantum codes and noise models, our method outperforms both classical and existing neural decoding algorithms.