Input and output. A planar stabilizer code, single-qubit Pauli error probabilities and a syndrome. The output is the logical class with the largest estimated coset probability, as required by degenerate maximum-likelihood decoding.
Idea. Fix an error with the observed syndrome. The probability of its coset is . Writing as a product of generators turns the sum into a sum over one binary variable per generator, and because each qubit is touched by a bounded number of generators and the noise is a product over qubits, the summand is a product of local factors. The sum is therefore the contraction of a tensor network laid out like the code, with one tensor per qubit and per check. The decoder evaluates this contraction for , , and and returns the largest.
Procedure (Bravyi, Suchara and Vargo). Contract the network column by column. The boundary of the contracted region is stored as a matrix product state, and after absorbing each column it is truncated back to bond dimension .
Complexity. for qubits. The method of Chubb for arbitrary two-dimensional stabilizer and subsystem codes costs .
What it is exact for. The contraction is exact when is not truncated, which in general needs a bond dimension exponential in the linear size. For the surface code with independent bit-flip and phase-flip noise, Bravyi, Suchara and Vargo give a different, exact maximum-likelihood algorithm with running time , by reduction to the simulation of matchgate circuits. For other noise, such as depolarising noise, the matrix-product-state contraction is an approximation controlled by ; in their benchmarks the logical error probability is already significantly below that of matching for .
Use. Because it estimates coset probabilities, the decoder serves as an accuracy reference for faster decoders and for threshold estimates of tailored codes, for example the 43.7(1)% threshold of a tailored surface code under pure dephasing (Tuckett, Bartlett and Flammia). A tensor-network decoder was also the most accurate decoder in the surface-code scaling experiment of Google Quantum AI. The cost grows quickly with the third (time) dimension required by faulty measurements, which confines the method to offline analysis.