---
title: 'HyperBlossom: Quantum LDPC Decoder'
url: https://www.emergentmind.com/topics/hyperblossom
type: topic
---

# HyperBlossom: Quantum LDPC Decoder

HyperBlossom is a certifying, blossom-style decoder for quantum Low-Density Parity-Check codes that formulates Most-Likely-Error decoding as a Minimum-Weight Parity Factor problem on a decoding hypergraph. In this formulation, independent physical error sources become hyperedges, stabilizer checks become vertices, and decoding is cast as a parity-constrained weighted optimization problem. The framework generalizes Edmonds’ blossom algorithm from graphs to hypergraphs through a primal-dual linear-programming model with certifiable proximity bounds, unifies graph-based decoders such as Minimum-Weight Perfect Matching, Union-Find, and Hypergraph Union-Find, and is implemented in the Hyperion software [2508.04969]. In the supplied literature, the same label also appears in a separate combinatorial setting as a synthesis of blossoming bijections for hypermaps via bipartite incidence maps on arbitrary compact surfaces [2002.07238].

## 1. Quantum decoding formulation

In the qLDPC setting of HyperBlossom, the decoding object is a hypergraph $G=(V,E)$ whose vertices are stabilizer checks and whose hyperedges are independent physical error sources. If an error source $e \in E$ occurs alone, it induces a subset of defect vertices. A candidate error pattern is a subset of hyperedges $\mathcal{E} \subseteq E$, equivalently a binary vector $x \in \mathbb{F}_2^{|E|}$ with $x_e=1$ iff $e \in \mathcal{E}$. The syndrome-defect map is

$$
D(\mathcal{E}) = \{ v \in V \mid |\mathcal{E} \cap E(v)| \text{ is odd} \}.
$$

Given a measured syndrome $D \subseteq V$, a parity factor is a subset $\mathcal{E} \subseteq E$ such that $D(\mathcal{E})=D$ [2508.04969].

Under independent errors, including code-capacity and circuit-level settings after Pauli twirling, the likelihood factorization reduces maximum-likelihood inference to a weighted minimization. If edge $e$ occurs with probability $p_e$, then

$$
P(\mathcal{E}) \propto \prod_{e \in \mathcal{E}} \frac{p_e}{1-p_e},
\qquad
w_e := \log\frac{1-p_e}{p_e},
$$

so maximizing likelihood is equivalent to minimizing

$$
W(\mathcal{E})=\sum_{e\in\mathcal{E}} w_e.
$$

If some $p_e>1/2$, the edge is flipped to a conjugate model with nonnegative weight $w'_e \ge 0$ [2508.04969].

This yields the Minimum-Weight Parity Factor formulation:

$$
\text{minimize } \sum_{e\in E} w_e x_e
$$

subject to

$$
x_e \in \{0,1\} \qquad \forall e \in E,
$$

$$
\sum_{e\in E(v)} x_e \equiv 1 \pmod 2 \qquad \forall v \in D,
$$

$$
\sum_{e\in E(v)} x_e \equiv 0 \pmod 2 \qquad \forall v \in V \setminus D.
$$

The graph-theoretic significance is that MWPF generalizes matchings and perfect matchings to hypergraphs: rather than imposing degree-$1$ or degree-$0$ conditions as in graphs, it imposes parity constraints at each stabilizer node [2508.04969].

Degeneracy is intrinsic. Logical operators are parity factors $\mathcal{E}_L$ with $D(\mathcal{E}_L)=\varnothing$; if $\mathcal{E}$ is a parity factor, then $\mathcal{E} \oplus \mathcal{E}_L$ is another valid parity factor. In parity-matrix terms, this is nonzero nullity of the incidence matrix, producing cosets of solutions rather than a unique decoder output.

## 2. Primal-dual hyperblossoms and certification

Rather than solving the parity-constrained ILP directly, HyperBlossom introduces an equivalent formulation based on invalid subgraphs. A subgraph $S=(V_S,E_S)$ is invalid for the local syndrome $D \cap V_S$ if every $\mathcal{E}\subseteq E_S$ fails $D(\mathcal{E})=D\cap V_S$. If $\delta(S)=E(V_S)\setminus E_S$ denotes the hair of $S$, the equivalent ILP is

$$
\text{minimize } \sum_{e\in E} w_e x_e
$$

subject to

$$
x_e \in \{0,1\} \qquad \forall e \in E,
$$

$$
\sum_{e\in\delta(S)} x_e \ge 1 \qquad \forall S \in O,
$$

where $O$ is the set of all invalid subgraphs. The interpretation is that every invalid subgraph must be repaired by at least one external incident edge. The paper proves $\min(\mathrm{ILP})=\min(\mathrm{MWPF})$ [2508.04969].

Relaxing integrality gives the LP, whose dual introduces variables $y_S \ge 0$ for invalid subgraphs:

$$
\text{maximize } \sum_{S\in O} y_S
$$

subject to

$$
\sum_{S\in O: e\in\delta(S)} y_S \le w_e \qquad \forall e\in E.
$$

An edge is tight when the inequality saturates,

$$
\sum_{S: e\in\delta(S)} y_S = w_e,
$$

and a hyperblossom is any invalid subgraph $S$ with $y_S>0$. This is the hypergraph analogue of a blossom in Edmonds’ algorithm [2508.04969].

The primal-dual gap provides the certification mechanism. For any feasible parity factor $x$ and feasible dual $y$,

$$
\sum_{S\in O} y_S \le \min \mathrm{LP} \le \min \mathrm{ILP} = \min \mathrm{MWPF} \le \sum_{e\in E} w_e x_e.
$$

Hence the gap

$$
\sum_e w_e x_e - \sum_S y_S
$$

is a certifiable proximity bound. If the gap is zero, the candidate parity factor is optimal. HyperBlossom therefore differs from purely heuristic decoders by furnishing per-instance certificates whenever primal and dual coincide, and by supplying globally valid certification in regimes where $\min \mathrm{LP}=\min \mathrm{ILP}$ [2508.04969].

Dual growth proceeds through feasible directions $\Delta y$ and relaxers. A relaxer strictly relaxes a non-empty subset of tight edges while not decreasing the dual objective. The framework proves that if the current dual is suboptimal, then either a relaxer exists or a trivial direction exists that grows an invalid subgraph disjoint from the current tight set. Batched composition of relaxers and a trivial direction then yields a useful dual step without introducing unnecessary hyperblossoms.

## 3. Unification of MWPM, UF, HUF, and optimality regimes

A central feature of HyperBlossom is that it subsumes several established decoders inside one formulation. When the decoding hypergraph is a simple graph with $\deg(e)=2$, MWPF reduces to MWPM on the syndrome graph. In that regime, HyperBlossom uses a Blossom relaxer finder built from a bijection $f$ between blossom dual variables on the syndrome graph and dual variables on invalid subgraphs of the decoding graph, preserving both the dual objective and tightness along minimum paths. The resulting dual updates are step-by-step equivalent to MWPM, and the decoder inherits MWPM optimality on graphs [2508.04969].

The framework also contains Union-Find and Hypergraph Union-Find. If the UnionFind relaxer finder always returns Nil, HyperBlossom reduces to weighted UF: invalid clusters grow uniformly by a trivial direction until tight edges form and clusters merge. Setting the per-cluster hyperblossom cap to $c=0$ yields $\mathrm{MWPF}(c=0)$, which is exactly HUF on hypergraphs [2508.04969].

The relaxer-finder layer determines how much of the primal-dual structure is exploited. The general-purpose SingleHair relaxer finder constructs parity and hair matrices over $\mathbb{F}_2$, detects Odd rows, and forms relaxers of the form $\Delta y=\{\Delta y_S:-1,\Delta y_{S^+}:+1\}$. It is polynomial-time and often accurate, but it can be suboptimal on some graphs and hypergraphs. By contrast, the Nullity$\le 1$ relaxer finder is specialized and optimal whenever the cluster incidence matrix has nullity $0$ or $1$; in that case it explicitly builds an optimal dual $y^o$ and sets $\Delta y = y^o-y$ [2508.04969].

The optimality landscape is therefore structured rather than universal. The paper identifies a hereditary condition, $\min \mathrm{LP}=\min \mathrm{ILP}$, under which HyperBlossom is certifying at the global optimum. Two classes are proved to satisfy it: simple graphs, and hypergraphs with nullity at most $1$. This implies exact optimality on graphlike decoding problems and on biased-noise regimes that induce nullity$\le 1$ clusters, but it does not remove the NP-hardness of MWPF on general hypergraphs.

## 4. Clusterwise algorithm and Hyperion implementation

HyperBlossom operates on disjoint clusters $C=(V_C,E_C\subseteq T)$ formed from vertices, tight edges, and hyperblossoms. A cluster is locally optimal if there exists a parity factor $\mathcal{E}_C\subseteq E_C$ with $D(\mathcal{E}_C)=D\cap V_C$ and

$$
W(\mathcal{E}_C)=\sum_{S\in B_C} y_S.
$$

If every cluster is locally optimal, the union of cluster solutions yields a globally optimal MWPF solution because the clusters are disjoint in vertices, tight edges, and hyperblossoms [2508.04969].

The algorithm alternates a primal phase and a dual phase. Initialization sets $y \leftarrow 0$, starts from singleton defect clusters, declares zero-weight edges tight, and merges initial clusters by tight edges. In the primal phase, each cluster is tested for local optimality. If a cluster is not locally optimal, the algorithm invokes BatchedRelaxing to collect relaxers, removes the relaxed tight edges, and, if the residual cluster remains invalid, grows an invalid subgraph by a trivial direction. In the dual phase, the cluster history of positive dual subgraphs is updated, a partial dual LP is solved over that history, tight edges are recomputed, and clusters are merged by tight edges and by intersecting hyperblossoms [2508.04969].

The worst-case complexity remains exponential because the set of invalid subgraphs $|O|$ is exponential. With relaxer-finder cost $O(F(|V|,|E|))$, the cost per useful direction is $O(|E|F)$, the partial LP solve is bounded by $O(|O|^{1.5}|V|^2)$ by interior-point bounds, and the overall bound is

$$
O(|O|^{2.5}|V|^2 + |O|\cdot|E|\cdot F(|V|,|E|)).
$$

The practical claim is more favorable: in low-error regimes $p \ll 1$, clustering keeps most components small and produces almost-linear average runtime scaling in the number of defects $|D|\propto p|V|$ [2508.04969].

Hyperion is the software realization of the framework. It is implemented in Rust, supports floating-point and rational dual and weight types, uses HiGHS for floating-point LP solving and SLP for rational arithmetic, exposes a Python interface, and includes a 3D visualization tool that renders hypergraphs and dual variables as colored segments over hyperedges. It integrates with Stim through Detector Error Models and also accepts Clifford circuits to exploit circuit-level information such as heralded erasures [2508.04969].

Hyperion uses a two-stage decoding strategy. A search stage grows all invalid clusters simultaneously through a priority queue to ensure feasibility of a parity factor. A refine stage then applies relaxer finders clusterwise. Cluster priority is

$$
\mathrm{Priority}(C)=
\frac{\sum_{S\in B_C} y_S - \sum_{e\in E_C} w_e x_e}{(|E_C|+|B_C|)^3},
$$

which favors small clusters with large primal-dual gaps. To control latency, Hyperion enforces a per-cluster hyperblossom cap $c=\max |B_C|$, producing the decoder family $\mathrm{MWPF}(c)$. The special case $c=0$ recovers HUF, while larger $c$ trades runtime for accuracy; as $c\to\infty$, appropriate relaxer finders recover optimality in regimes where $\min \mathrm{LP}=\min \mathrm{ILP}$ [2508.04969].

## 5. Empirical behavior, operating regimes, and limits

The empirical profile reported for Hyperion is heterogeneous across code families and noise models. On the surface code under code-capacity bit-flip noise, MWPF matches MWPM accuracy because the decoding problem is a simple graph. Under biased-$Y$ noise, the induced hypergraph has nullity at most $1$, so $\mathrm{MWPF}(c=200)$ is provably optimal and reaches the optimal curve, with orders-of-magnitude lower logical error rates than tailored MWPM. Under depolarizing and circuit-level noise, MWPF exceeds both HUF and MWPM accuracy. The headline result is a $4.8\times$ lower logical error rate than MWPM on the distance-11 surface code under code-capacity noise [2508.04969].

For the color code, the same pattern holds under depolarizing and circuit-level noise: MWPF outperforms Chromobius, a specialized color-code MWPM decoder, and achieves the same effective distance in circuit-level tests. Runtime scaling remains almost-linear on average up to distance $31$ for the color code and up to distance $99$ for the surface code in the reported experiments [2508.04969].

For bivariate bicycle codes, the comparison is more nuanced. Against a

Source: https://www.emergentmind.com/topics/hyperblossom