---
title: ZX Interleaving Syndrome Extraction
url: https://www.emergentmind.com/topics/zx-interleaving-syndrome-extraction
type: topic
---

# ZX Interleaving Syndrome Extraction

Searching arXiv for the named topic and closely related work to ground the article in current papers.
ZX interleaving syndrome extraction denotes a class of syndrome-extraction constructions in which \(Z\)- and \(X\)-stabilizer measurements are deliberately interleaved, rather than compiled or executed as strictly separated subroutines. In the surface-code setting, the term refers to a minimum-depth, distance-preserving schedule for arbitrary regular tile layouts that neutralizes hook-error shortcuts in the decoding graph while retaining four CNOT layers per round [2603.01628]. In a broader qLDPC setting, closely related interleaving principles appear as global scheduling rules for \(\mathrm{CX}\) and \(\mathrm{CZ}\) gates, where logically equivalent \(X\)- and \(Z\)-type subroutines may cross subject to an even-parity commutativity condition, enabling depth-optimal or near-optimal syndrome extraction for arbitrary stabilizer families [2603.21499].

## 1. Problem setting and motivation

Syndrome extraction is the circuit process by which all stabilizer generators are measured round by round. The central obstacle motivating ZX interleaving is the hook error: a single fault on a measurement qubit can propagate through the CNOT schedule to multiple data qubits and thereby create shortcut paths in the decoding graph. In the rotated surface code, the relevant distinction is between **code distance**, identified with the patch side length \(d\), and **fault distance**, defined as “the minimum number of physical errors in the circuit required to cause logical errors.” Hook-error propagation can reduce the fault distance below \(d\) even when the code distance is unchanged [2603.01628].

The standard example is a \(Z\)-stabilizer measurement circuit in which an error on the measurement qubit after the first two CNOTs spreads to two data qubits, because a CNOT copies a \(Z\) error from the target to the controls. If the resulting correlated data error aligns with a logical operator, a logical failure can arise with fewer faults than the nominal distance. For memory layouts, carefully chosen CNOT orderings can orient hook propagation perpendicular to the logical operator, but this ceases to be sufficient for more general layouts such as lattice surgery unless the schedule itself is redesigned [2603.01628].

This establishes the technical niche of ZX interleaving: it is not merely a depth optimization, but a method for reshaping error propagation in spacetime so that minimum-depth syndrome extraction remains compatible with full circuit-level distance.

## 2. Surface-code construction and interleaving patterns

The surface-code construction considers **regular tile layouts**, meaning square, tile-like stabilizers together with appropriate two-qubit boundary stabilizers. The standard rotated-surface-code memory circuit already admits a minimum-depth schedule with four layers of CNOT gates, classically associated with the N-shaped ordering for \(Z\) stabilizers and Z-shaped ordering for \(X\) stabilizers. ZX interleaving keeps the same four-layer depth target but replaces the usual orientation rule by an interleaving rule derived from tile motion in spacetime [2603.01628].

Two patterns are central. The first, inherited from the memory-layout construction discussed in relation to McEwen et al. (2023), is
\[
Z \to Z, \qquad X \to X,
\]
meaning that \(Z\) tiles move toward the \(Z\) boundary and \(X\) tiles move toward the \(X\) boundary. The paper describes this as a new ordering, neither N-shaped nor Z-shaped, but still depth-4. The second pattern is the generalization needed for arbitrary layouts:
\[
Z \to X, \qquad X \to Z.
\]
Here \(Z\) tiles move toward the \(X\) boundary and \(X\) tiles move toward the \(Z\) boundary. This additional pattern is required for layouts such as logical Pauli-\(XX\) measurement via lattice surgery, where boundary connectivity differs from the memory case. It uses extra measurement qubits only on the boundaries, but preserves the same minimum CNOT depth and the same full-distance objective [2603.01628].

The design requirements stated for the construction are unusually strict: a simple rule for determining CNOT order from the layout, fault distance equal to code distance for any regular tiling, and no increase in syndrome-extraction round length. The paper argues that existing approaches satisfy at most two of these simultaneously. ZX interleaving is presented as the construction that satisfies all three for arbitrary regular surface-code layouts [2603.01628].

## 3. Decoding-graph mechanism and distance preservation

The decoding-graph interpretation is the conceptual core of ZX interleaving syndrome extraction. In this picture, detectors are graph nodes, graphlike errors are edges, and hook errors appear as shortcut edges spanning across a tile. The fault distance is then the minimum number of edges required to connect opposite logical boundaries. The logical-boundary criterion is stated explicitly: “an error chain that connects the two distinct Z (X) walls works as a logical Pauli Z (X) error.” Full fault distance therefore requires the decoding-graph distance between same-color walls to be at least \(d\) [2603.01628].

ZX interleaving changes the spacetime geometry of the graph. The key claim is that hook-error edges are shortened because tiles move parallel to the hook direction but in the opposite direction. In the paper’s phrasing, such hook errors become “harmless regardless of their direction” and “effectively, they no longer exist.” This is the mechanism by which a four-layer circuit can preserve the full fault distance for arbitrary regular layouts, rather than only for specially oriented memory patches [2603.01628].

The numerical distance results are correspondingly sharp. For memory experiments, the reported fault distances are: hook-avoiding N/Z ordering at \(d\), hook-prone N/Z ordering at \(d/2\), alternating ordering at \(d-1\), and both ZX interleaving variants at \(d\). For lattice-surgery \(XX\) measurement, all methods preserve full fault distance for \(Z\) errors, but for \(X\) errors the asymmetry is pronounced: N/Z ordering gives \(d/2\), alternating gives \(d-1\), and ZX interleaving gives \(d\). The paper identifies this as one of its strongest results, because it isolates the layout regime in which minimum depth and full fault distance were previously not achieved together [2603.01628].

A plausible implication is that ZX interleaving should be understood less as a local CNOT-ordering trick than as a graph-engineering method: it operates by modifying the detector geometry so that the dangerous low-weight homologically nontrivial paths never materialize.

## 4. Circuit structure, hardware constraints, and performance trade-offs

The surface-code schedule preserves the standard minimum-depth rhythm of repeated rounds built from reset \(R\), Hadamard \(H\) on selected measurement qubits, four CNOT layers, a final Hadamard stage, and measurement \(M\). The method explicitly avoids simultaneous execution of measurements or resets with CNOTs, a point emphasized in contrast to prior proposals whose minimum-depth claims depend on such concurrency. An additional implementation detail is that each physical qubit needs coupling to only three neighboring data qubits, in the same hexagonal-grid style associated with McEwen et al. [2603.01628].

The decoding analysis is verified numerically using Stim’s `shortest_graphlike_error` as an upper bound on fault distance and `search_for_undetectable_logical_errors` to confirm the exact distance. Under circuit-level depolarizing noise, with one-qubit depolarizing noise after each 1-qubit gate and two-qubit depolarizing noise after each 2-qubit gate, decoding is performed with PyMatching and Monte Carlo sampling with Sinter. The experiments cover both memory runs with \(d\) rounds and logical Pauli-\(XX\) measurements via lattice surgery [2603.01628].

The logical-error behavior exhibits a nontrivial trade-off. In the low-noise regime, ZX interleaving behaves similarly to the best full-distance implementations in memory experiments and can outperform alternating ordering. However, the interleaving variants introduce additional error events from measurement errors and tile movement, and the threshold is therefore slightly lower than in competing methods, including even the hook-prone N/Z schedule in one variant. The paper reports a crossover: at low physical error rates, ZX interleaving can outperform alternating ordering, whereas at higher physical error rates or larger code distances, alternating ordering can have lower logical error rate [2603.01628].

This trade-off limits any overly simple identification of full fault distance with uniformly superior logical performance. ZX interleaving guarantees the former at minimum depth for arbitrary regular layouts, but its finite-noise performance remains schedule-dependent.

## 5. Generalization to arbitrary qLDPC codes

A broader form of ZX interleaving appears in the compilation framework Auto-Stabilizer-Check (ASC), where syndrome extraction for a general qLDPC code is treated as a global scheduling problem over all stabilizer checks, rather than as two separately compiled \(X\)-only and \(Z\)-only circuits. The code is represented in binary symplectic form by an \(m \times 2n\) check matrix \(H\). Ancilla \(i\) must interact with data qubit \(j\) whenever \(H[i][j]=1\) or \(H[i][j+n]=1\), corresponding to an \(X\)-type or \(Z\)-type incidence in the stabilizer generator. The resulting circuit consists of \(\mathrm{CX}\) and \(\mathrm{CZ}\) gates, together with ancilla preparation and final measurement, and the optimization target is the two-qubit circuit depth in TICKs, where each TICK permits each qubit to participate in at most one two-qubit gate [2603.21499].

The essential interleaving rule is a commutativity proposition. \(X\)- and \(Z\)-stabilizer measurement subroutines need not be compiled in a rigid “all \(X\) first, then all \(Z\)” order. Instead, the compiler may interleave them whenever the parity of the inversion number in the \(\mathrm{CX}\)-\(\mathrm{CZ}\) order over shared data qubits is even. Equivalently, the circuit remains correct when the relative order of shared \(\mathrm{CX}\) and \(\mathrm{CZ}\) gates is swapped an even number of times. This is the formal mechanism by which ASC exploits ZX interleaving to beat naive separated scheduling [2603.21499].

The optimization objective is
\[
\min \; \max_{i,j} \; T[i][j],
\]
where \(T[i][j]\) is the TICK at which ancilla \(i\) interacts with data qubit \(j\). ASC converts this to bounded satisfiability by imposing
\[
\forall i,j \quad T[i][j] \leq T_{max},
\]
together with unique-qubit-occupancy, unique-ancilla-occupancy, exact-check-completion, and even-parity commutativity constraints. The search starts at the lower bound \(\Delta(G)\), the maximum degree of the Tanner graph, and increases \(T_{max}\) up to \(2\Delta(G)\), returning an optimal schedule upon satisfiability and a near-optimal schedule in the presence of solver timeouts [2603.21499].

The reported compilation results are substantial. For IBM’s bivariate bicycle codes, ASC generates depth-7 syndrome-extraction circuits for all reported instances and certifies that no depth-6 circuit exists for those examples, resolving an open question from IBM’s work. Examples including \([[72,12,6]]\), \([[90,8,10]]\), \([[108,8,10]]\), \([[144,12,12]]\), \([[288,12,18]]\), \([[360,12,\le 24]]\), and \([[756,16,\le 34]]\) all compile to depth 7, while ASAP gives depth 15–16 and coloration-based scheduling gives depth 12. Across the benchmark set, ASC reduces circuit depth by roughly 50% and achieves about a \(7\times\)–\(8\times\) suppression of logical error rate under circuit-level depolarizing noise with Stim and BP-OSD decoding [2603.21499].

This suggests that the surface-code notion of ZX interleaving, originally expressed through tile motion and hook-error shortening, has a natural abstraction as a global parity-constrained crossing rule between \(X\)- and \(Z\)-type measurement subroutines.

## 6. Related interpretations, misconceptions, and alternative design philosophies

A common misconception is to equate “ZX interleaving” with ZX-calculus rewriting. The two are related only indirectly. In the surface-code construction, “ZX” refers to interleaving \(Z\)- and \(X\)-stabilizer tiles or subroutines in spacetime. By contrast, a separate circuit-centric line of work studies detector-aware rewrites of phase-free ZX diagrams while preserving MWPM-decodability. There the central object is a detector basis of Pauli webs, and matchability is defined by the sparsity condition
\[
\forall e\in \mathrm{edges}(D),\quad \#\{P\in\mathcal S\mid P(e)\neq I\}\le 2.
\]
Rewrites such as \(r_{\mathrm{elim}}\), \(r_{\mathrm{fuse}}\), \(r_4\), and generalized \(r_{4n}\), \(r_{5n}\), \(r_{6n}\) are shown to preserve this property, enabling extraction of efficiently decodable fault-tolerant syndrome-extraction circuits from CSS matchable, phase-free ZX diagrams [2603.19522].

A second misconception is that interleaving is always the preferred design principle. A contrasting framework based on **left-right circuits** deliberately avoids interleaving gates. It defines non-interleaved circuits as schedules in which either all overlapping \(X\)-type CNOTs precede all overlapping \(Z\)-type CNOTs or vice versa, and uses a left/right partition of the parity-check matrices to create two staggered CNOT blocks. That framework emphasizes low depth, low ancilla idling, and explicit residual-error analysis. It proves that for the gross code \([[144,12,12]]\), no non-interleaving syndrome-extraction circuit can reach circuit distance 12, and it identifies an explicit circuit conjectured to achieve distance 11. At the same time, it states that an interleaved version obtained by changing timing while preserving internal order cannot decrease circuit distance and may increase it [2603.05481].

Taken together, these works locate ZX interleaving syndrome extraction within a broader design landscape. One branch uses interleaving to preserve full fault distance at minimum depth for arbitrary regular surface-code layouts; another lifts the same intuition to global qLDPC compilation through commutativity-constrained scheduling; and a third studies when interleaving should be avoided in favor of analyzable non-interleaved constructions. The resulting picture is not a single algorithmic recipe but a family of methods for controlling hook propagation, decoding structure, and circuit depth in stabilizer measurement.

Source: https://www.emergentmind.com/topics/zx-interleaving-syndrome-extraction