---
title: 'Clique_L2: Local Decoder for Surface Code'
url: https://www.emergentmind.com/topics/clique_l2
type: topic
---

# Clique_L2: Local Decoder for Surface Code

Searching arXiv for the Clique_L2 paper and closely related work on the original Clique decoder and surface-code local decoding.
arXiv search query: "Clique local decoder surface code"
Clique_L2 is a local decoder for the distance-$d$ rotated surface code that extends the original Clique decoder by correcting both length-1 and length-2 space error chains in the cryogenic domain while preserving a filtering architecture in which only complex residual patterns are forwarded to a room-temperature decoder [2507.11481]. The design relaxes the original activation rule, adds low-cost logic for four length-2 spatial configurations, and evaluates local syndrome-processing units in a four-stage, four-color pipeline. Its reported purpose is to reduce classical I/O bandwidth and room-temperature decoder load, particularly when increasing physical error rate or code distance makes length-2 chains non-negligible [2507.11481].

## 1. Error model and decoding objective

The decoder is formulated for the rotated surface code. In the distance-$d$ patch, space error chains of length $k$ occur with probability $O(p^k)$, so isolated length-1 flips dominate at low $p$ and modest $d$, whereas length-2 space chains become increasingly relevant as $p$ or $d$ grow [2507.11481]. The original Clique decoder, denoted Clique_L1, corrects exactly length-1 chains on-chip: it activates a local clique when a central ancilla syndrome is $1$ and its four neighbors have odd parity, then flips the unique adjacent data qubit. All other patterns, including any $k \ge 2$ space chain, are treated as complex and are forwarded off-chip [2507.11481].

Clique_L2 is designed to change that coverage boundary without abandoning the original filtering philosophy. Its stated goals are to correct both $k=1$ and $k=2$ space chains locally in the cryo-domain, preserve Clique_L1’s low hardware cost, and ensure that only truly complex cases such as $k \ge 3$ or time-like patterns escape to a room-temperature decoder [2507.11481]. The paper also reports that Clique_L1’s on-chip coverage drops sharply once length-2 chains become common enough; one example given is that at $d \ge 15$ and $p \approx 10^{-3}$, only approximately $70$–$80\%$ of syndromes are handled on-chip, which motivates extending the local decoder to length-2 spatial events [2507.11481].

## 2. Formal structure and local decision rules

The decoder uses the following notation. Let $Q$ be the set of data qubits and $A$ the set of ancilla qubits, with $|Q|=(d^2-1)/2$ of each $X$ or $Z$ type and $|A| \approx d^2/2$. For each ancilla $i \in A$, the final syndrome bit is $a_i \in \{0,1\}$ after multi-round measurement, and $N(i) \subset A$ denotes the set of up to four nearest-neighbor ancilla qubits around $i$. The variable $k \in \mathbb{N}$ denotes the length of the shortest connected chain of data-qubit errors inducing the current syndrome pattern [2507.11481].

Length-1 detection inherits the Clique_L1 rule. Define the local parity
$$
P_i^{(1)}=\bigoplus_{j\in N(i)} a_j .
$$
The condition for a local length-1 decode is
$$
a_i=1 \;\wedge\; P_i^{(1)}=1 .
$$
When this condition holds, the decoder proposes the unique adjacent data-qubit flip implied by the central ancilla and odd neighbor parity [2507.11481].

Length-2 detection is the defining extension of Clique_L2. The clique must first be inactive, meaning
$$
a_i=0,
$$
and must satisfy even neighbor parity,
$$
P_i^{(2)}=\bigoplus_{j\in N(i)} a_j = 0 .
$$
Under those conditions, exactly one of a small set of subpatterns is detected. Writing the four neighbors as $N(i)=\{p,q,r,s\}$, the paper defines
$$
H_i = a_p \wedge a_q \wedge \neg a_r \wedge \neg a_s,
$$
$$
V_i = \neg a_p \wedge a_q \wedge \neg a_r \wedge a_s,
$$
$$
D1_i = \neg a_p \wedge a_q \wedge a_r \wedge \neg a_s,
$$
$$
D2_i = a_p \wedge \neg a_q \wedge \neg a_r \wedge a_s,
$$
$$
M_i = a_p \wedge a_q \wedge a_r \wedge a_s .
$$
These correspond, respectively, to horizontal, vertical, diagonal, diagonal, and mixed length-2 space configurations. If $H_i=1$, the decoder flips the two horizontal data qubits; if $V_i=1$, the two vertical qubits; if $D1_i=1$ or $D2_i=1$, the two implied diagonal qubits; and if $M_i=1$, all four neighboring data qubits [2507.11481].

A useful interpretive point is that the suffix “L2” refers here to local correction of length-2 space chains rather than to any Euclidean or graph-theoretic $L_2$ construction. In operational terms, a “clique” is the local syndrome-processing unit centered on ancilla $i$ and its nearest-neighbor ancilla set $N(i)$ [2507.11481].

## 3. Pipeline organization and scheduling

Clique_L2 sequences the logic in four pipeline stages. Stage 0 performs measurement-error mitigation by collapsing raw four-round syndrome bits $a_i^0,\dots,a_i^3$ to a single persistent bit $a_i$. Stage 1 executes the inherited Clique_L1 core for length-1 decoding. Stage 2 introduces the new length-2 decode logic for inactive cliques with even neighbor parity. Stage 3 handles edge and corner special cases using the two- or three-neighbor parity rules inherited from Clique_L1. Stage 4 marks any remaining $a_j=1$ patterns as complex and forwards them for off-chip decoding [2507.11481].

This staged organization is important because partial syndrome updates feed subsequent stages. After a Stage 1 length-1 correction, the local syndrome state is updated by clearing the four neighboring syndrome bits and setting the central syndrome to $0$. After a Stage 2 length-2 correction, the four neighbor bits are cleared. The architecture therefore uses successive local state updates rather than a single monolithic pattern match [2507.11481].

Parallel execution is coordinated by a four-color schedule. Because any clique can have up to eight neighbors in an 8-connected grid, the clique layout is colored with four colors, denoted $A,B,C,D$, such that no two intersecting cliques share a color. All cliques of one color are evaluated in one phase, followed by the remaining colors in turn. The stated purpose is to guarantee that no two active cliques simultaneously propose corrections to the same data qubit [2507.11481].

The resulting computational structure is therefore local, pipelined, and phased. This suggests that the decoder is engineered less as a global optimization procedure than as a hardware-friendly front-end filter for sparse or moderately structured syndrome events.

## 4. Bandwidth model and implementation cost

The paper measures decoder effectiveness through the fraction of cycles forwarded off-chip. Let $f_{L1}(p,d)$ be the fraction of cycles where Clique_L1 forwards the syndrome off-chip, and let $f_{L2}(p,d)$ denote the analogous quantity for Clique_L2. The bandwidth reduction factor is
$$
R(p,d)=\frac{f_{L1}(p,d)}{f_{L2}(p,d)} .
$$
Under the data-only code-capacity model, the forwarding fraction is empirically fit with a logistic form
$$
f_{Lk}(p,d) \approx \frac{1}{1+e^{-\alpha_k(d)\,(\log p-\beta_k(d))}}
$$
for $k=1,2$, although the reported bandwidth numbers are computed directly from tabulated values obtained from $10^8$ trials [2507.11481].

Hardware overhead is reported explicitly. Clique_L1 uses approximately $10$ two-input gates per qubit plus a 2-round counter for measurement-error filtering. Clique_L2 adds $4$ AND gates, $2$ OR gates, and $4$ pipeline registers, for a total of approximately $16$ gates per parity qubit. The 4-phase scheduler requires a 2-bit color counter per clique, described as negligible overhead of $2$ bits $\times d^2$ [2507.11481].

The implementation target is cryogenic digital logic. The paper states that all logic can be implemented in ERSFQ/SFQ at $4$ K with less than $100\,\mu\text{W}$ per logical qubit, and also reports a total power/thermal figure of less than $1\,\text{mW}$ per logical qubit in the scalability discussion [2507.11481]. The gate-count scaling is given as approximately $16$ SFQ gates per parity qubit, or
$$
16 \times (d^2/2)
$$
gates per logical qubit. Pipeline depth is reported as $4$ stages times $4$ colors, yielding $16$ subcycles per code cycle; at a $1\,\mu\text{s}$ code cycle, this corresponds to $16\,\text{ns}$ subcycles [2507.11481].

The principal systems claim is I/O reduction. By lowering the off-chip syndrome traffic by factors in the reported $8$–$18\times$ range under favorable noise models, the decoder is intended to reduce cryo-to-room wiring demand by a comparable factor, addressing the approximately terabit-per-second I/O bottleneck projected for million-qubit machines [2507.11481].

## 5. Reported behavior under different noise models

The paper evaluates Clique_L2 under data-qubit-only errors, uniformly random data-plus-measurement noise, Gaussian-clustered noise, and a Dual-Error or hook model [2507.11481]. The reported gains depend strongly on how often the observed syndrome originates from a length-2 spatial chain.

| Noise model | Representative reported setting | Reported bandwidth reduction |
|---|---|---|
| Data-qubit-only | $d=21$, $p=0.5\%$ | $R \approx 7.03\times$ |
| Uniformly random | $d=25$, $p=0.1\%$ | $R \approx 1.36\times$ |
| Gaussian-clustered | $d=25$, $p=0.1\%$ | $R \approx 6.71\times$ |
| Dual-Error / hook | $d=21$, $p=0.5\%$ | Peak $R \approx 18.38\times$ |

For data-qubit-only errors, one reported point is
$$
f_{L1} \approx 0.1070,\qquad f_{L2} \approx 0.0152,\qquad R \approx 7.03\times
$$
at $d=21$ and $p=0.5\%$. Across $p \in [0.1\%,1\%]$ and $d \in [3,25]$, the reported maximum reaches $8.95\times$ at $(d=25,p=0.1\%)$ [2507.11481]. A separate figure summary states that at $p=0.1\%$ and $d=25$, the off-chip fraction drops from $0.93\%$ to $0.11\%$, corresponding to an $8.68\times$ saving [2507.11481].

Under uniformly random noise including measurement errors, the gain is smaller. At $d=25$ and $p=0.1\%$, the reported values are $f_{L1}\approx 2.97\%$, $f_{L2}\approx 2.19\%$, and $R\approx 1.36\times$, with an overall range $R \in [1.22,1.44]$ across $p \in [0.05\%,0.5\%]$ [2507.11481]. The stated explanation is that two-round measurement mitigation slightly reduces visibility of length-2 events, so the incremental benefit of Clique_L2 is more modest in this regime [2507.11481].

Under Gaussian-clustered noise, the gain increases substantially. At $d=25$ and $p=0.1\%$, the reported off-chip fractions are $f_{L1}\approx 16.86\%$ and $f_{L2}\approx 2.51\%$, yielding $R\approx 6.71\times$, and the paper reports a range $R \in [1.36,8.60]$ across tested $(d,p)$ values, with a maximum of $8.60\times$ at $d=31$ [2507.11481]. The stated reason is that clustering drives up the frequency of length-2 chains, exactly the class that Clique_L2 adds to local coverage [2507.11481].

The strongest reported improvement occurs in the Dual-Error or hook model. For $d \ge 15$ and $p=0.5\%$, Clique_L1 offloads approximately $100\%$ of syndromes, whereas Clique_L2 still handles approximately $60$–$90\%$ locally. The peak reported factor is $R \approx 18.38\times$ at $p=0.5\%$ and $d=21$; at $p=0.1\%$ and $d=25$, the range is $R \approx 2.58$–$5.49\times$ [2507.11481]. The paper attributes this to hook-type adjacent flips matching the length-2 patterns explicitly detected in Stage 2 [2507.11481].

A recurring interpretive theme is therefore straightforward: the closer a noise model is to producing spatially adjacent two-qubit events, the larger the advantage of Clique_L2 over Clique_L1.

## 6. Scope, limitations, and nomenclature

Clique_L2 is not presented as a replacement for a full decoder. It is a local predecoder that preserves a filtering architecture in which only the simple, high-frequency cases are resolved on-chip, while residual complex syndromes are forwarded off-chip for conventional decoding [2507.11481]. The complexity boundary remains explicit: the design targets length-1 and length-2 space chains, whereas $k \ge 3$ or time-like patterns remain outside its local correction scope [2507.11481].

This scope matters when interpreting the reported bandwidth savings. The gains are substantial under data-only, clustered, and hook-dominated regimes, but they are much smaller under uniformly random data-plus-measurement noise, where the paper reports at most $1.44\times$ reduction [2507.11481]. A plausible implication is that Clique_L2 is best viewed as a noise-model-sensitive systems optimization rather than a universally dominant decoding strategy.

The paper identifies three future directions: extension to $k>2$ local decoding under the name Clique_Lk, improved multi-round measurement-error filtering to boost length-2 detection under time-like noise, and hardware prototyping in cryo-CMOS or SFQ to measure end-to-end latency and power [2507.11481]. These directions follow directly from the architecture’s stated trade-off: a small increase in local area and pipeline complexity in exchange for reduced I/O wiring pressure and reduced room-temperature decoder load [2507.11481].

The name can also cause terminological confusion because “clique” and “$L_2$” have established meanings elsewhere in the literature. Distinct examples include $(k,l)$ clique communities in network evolution [1309.4535], Euclidean $L_2$-distance graphs whose clique number on $\mathbb{R}^n$ is $n+1$ for positive squared distance [2306.07108], and “L₂-cliques” in second iterated line graphs [1010.2460]. Those are separate graph-theoretic usages. In Clique_L2, by contrast, “L2” denotes local correction of length-2 space chains within a cryogenic surface-code decoding pipeline [2507.11481].

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