Input and output. A check matrix , prior probabilities and a syndrome in the column space of . The output is a vector with .
Stage 1: belief propagation. Messages are exchanged along the edges of the Tanner graph of for a fixed number of iterations. With log-likelihood ratios , the check-to-variable message of the sum-product rule is
and the posterior estimate for mechanism is . If the hard decision satisfies , it is returned.
Stage 2: ordered-statistics decoding. Otherwise order the columns of from most to least likely to be in error (increasing ) and, going through them in that order, select a maximal linearly independent set of columns. Order-0 OSD returns the unique solution of with outside . Higher orders also try low-weight patterns on some columns outside , solve for each time, and keep the candidate of largest prior probability. The method adapts the classical algorithm of Fossorier and Lin and was introduced for quantum codes by Panteleev and Kalachev.
Complexity. Each belief-propagation iteration costs time proportional to the number of non-zero entries of . Stage 2 is Gaussian elimination, bit operations in the worst case, and dominates when it is invoked.
What it is exact for. Sum-product marginals are exact when the Tanner graph is a tree; the Tanner graphs of quantum codes are generally loopy (Poulin and Chung). OSD guarantees that the output reproduces the syndrome, not that it is the most likely error or lies in the most likely coset. The decoder is a heuristic whose accuracy is established numerically.
Accuracy. Post-processing improves the logical error rate of plain belief propagation on quantum LDPC codes by several orders of magnitude in the examples of Panteleev and Kalachev. Roffe et al. find thresholds for several families of hypergraph product codes and for the toric code. BP+OSD on the circuit-level hypergraph is the decoder used to establish the threshold of the bivariate bicycle codes.