Flip‑Vine Codes: 2D-Local Quantum LDPC Design
- Flip‑Vine Codes are 2D-local quantum LDPC stabilizer codes that alternate measurement rounds to achieve weak self-duality and enable transversal single-qubit Clifford gates.
- They arrange active measure and routing qubits on a planar square grid using iSWAP and CZ primitives, maintaining 2D locality and independent measurement constraints.
- Empirical performance shows these codes reduce qubit overhead and enhance logical error suppression compared to surface codes at matched circuit distances.
Searching arXiv for the cited paper and closely related work on vine codes, directional codes, and weakly self-dual CSS transversality. Flip‑Vine Codes are a variant of Vine Codes: 2D-local quantum LDPC stabilizer codes implemented on a planar square grid with nearest-neighbor two-qubit gates native to superconducting platforms. In the flip-vine construction, active measure qubits flip their Pauli type between QEC rounds and measure both an stabilizer in odd rounds and a stabilizer in even rounds on identical data-qubit support. This makes the CSS code weakly self-dual under appropriate boundary conditions and directly enables transversal single-qubit Clifford gates, while retaining implementation by nearest-neighbor iSWAP- and CZ-equivalent primitives, resets, and measurements on a planar square chip (Nixon et al., 18 Jun 2026).
1. Definition and code architecture
A Vine Code is specified by a step sequence and a layout. The step sequence is an ordered list of eight possible nearest-neighbor entangling steps between measure and data qubits, and the layout specifies the initial pattern of - and -type measure qubits. Qubits are arranged such that each measure qubit has four nearest-neighbor data qubits. The eight steps are upper-case cardinal directions , executed as iSWAP-like controlled--SWAP gates denoted CXSWAP, and lower-case directions , executed as CZ-like controlled- gates denoted CX. The upper-case steps move the qubit via a SWAP, whereas the lower-case steps do not move. Stabilizer supports then trace “vines” across the lattice as measure qubits follow the step sequence, mixing longer-range support from CXSWAP with local offshoots from CX (Nixon et al., 18 Jun 2026).
A Flip‑Vine Code is obtained by choosing an even-length step sequence of weight and a subset of measure qubits that are active; the complementary subset 0 are routing qubits. In odd rounds, active 1-type measure qubits in 2 measure 3 stabilizers, and in even rounds they flip type and measure the partner 4 stabilizer of the same support; the same alternation applies to active 5-type measure qubits. Routing qubits traverse the same paths but perform only SWAP-like operations, never entangling with data. This “flip” construction is the defining feature of the family.
The principal architectural motivation is hardware compatibility. Vine and flip-vine codes are implementable on a planar square grid using only nearest-neighbor two-qubit iSWAP and CZ gates, up to single-qubit Cliffords, together with resets and measurements. Routing qubits are inserted only where connectivity is required and are aggressively minimized. Relative to Directional Codes, the construction broadens the step set from iSWAP-only dynamics to both iSWAP-like and CZ-like primitives, introduces open boundaries through routing qubits, and adds weak self-duality plus transversal single-qubit Clifford gates. Relative to surface and tile codes, the intended trade-off is higher rate and distance at similar circuit depth with fewer data and measure qubits, at the cost of modest routing overhead near boundaries.
2. CSS formulation, locality, and measurement constraints
For any vine or flip-vine instance, the stabilizer code is CSS, with parity-check matrices 6 and 7 formed by listing the data-qubit supports of all 8- and 9-type stabilizers as binary row vectors. The standard commutation condition is
0
Code parameters are written as 1, and the circuit distance 2 is defined as the minimum weight of an undetectable logical fault through the full syndrome extraction circuit, including hook errors, computed by an exact distance finder referred to as dist-m4ri “connected cluster” (Nixon et al., 18 Jun 2026).
The Tanner graph is 2D-local. Each row of 3 or 4 has weight 5, the step-sequence length, except near open boundaries where operators are truncated. At each layer, a measure qubit couples only to nearest-neighbor data qubits, but the dynamic walk over layers realizes extended stabilizer support. This is the central mechanism by which the construction preserves planar nearest-neighbor circuitry while generating nonlocal stabilizer supports.
A key scheduling condition is the independent measurement constraint. Let 6 be the set of data qubits, and for each measure qubit 7, let 8 denote its sequence of data contacts. Independent measurement requires that for any 9-type measure qubit 0 and 1-type measure qubit 2, the set
3
has even cardinality. This guarantees that, at the time of measurement, the measure qubits are not entangled or interleaved.
The construction also uses displacement multisets 4, 5, 6, and 7. The layout must be chosen so that any two measure qubits separated by a vector in 8 are of the same Pauli type; this ensures the commutation and independent measurement conditions. For the flip-vine construction, a further proposition links odd stabilizer overlaps to 9: if 0 and 1 are data-qubit supports with 2 and 3, then
4
This criterion is used to ensure that flipped partner stabilizers commute.
3. Planar square-grid realization and boundary engineering
The standard layout assumes alternating rows of 5- and 6-type measure qubits, with data qubits occupying the other grid sites so that every measure qubit has four data neighbors in the cardinal directions. A step sequence is then a word over 7. Upper-case directions apply CXSWAP between a measure qubit and the adjacent data qubit and swap positions; lower-case directions apply CX without a swap. Data qubits follow the reverse step sequence to measure and routing qubits. Odd rounds trace forward, and even rounds trace backward, or in the flip-vine setting flip roles and measure the opposite Pauli stabilizer (Nixon et al., 18 Jun 2026).
Open boundaries are created by cutting a finite parallelogram patch defined by vectors 8 and 9 and truncating or removing stabilizers that extend out of bounds. Pauli 0 boundaries are placed along edges parallel to 1 and 2 boundaries along edges parallel to 3, or vice versa. Any 4 stabilizer intersecting a 5 boundary is removed; any 6 stabilizer intersecting an 7 boundary is removed; and any stabilizer intersecting its own boundary is truncated to in-bounds support.
Because step sequences still move qubits near the boundary, routing qubits are introduced where necessary to maintain nearest-neighbor connectivity while replacing entangling actions by SWAP-like transport. Practically, the construction uses single-layer CZSWAP with the routing qubit reset to 8, yielding effective SWAP without entanglement in the absence of errors. Routing qubits are measured at the end of the round to form flag detectors.
Routing minimization proceeds in three phases. Phase 1 replaces long SWAP paths by shorter equivalent paths whenever the resulting circuit has identical space-time non-SWAP gate locations. Phase 2 removes SWAP-then-measure and reset-then-SWAP events by sliding measurement or reset into the qubit’s final position. Phase 3 deletes routing qubits that no longer participate in any gate. In a distance-10 example, these heuristics reduced routing qubits by approximately 9, specifically from 0 to 1 for the sequence 2 on a square patch.
The boundary framework is not limited to the familiar 3 boundaries of surface and tile codes. The construction also gives “colored” boundaries equivalent, up to finite-depth circuits, to the 2D color code. These boundaries condense a Lagrangian subgroup of anyons defined by commuting tunneling operators of a given color and Pauli label, truncate the remaining stabilizers consistently, and in flip-vine cases preserve identical 4 supports, weak self-duality, and transversality.
4. Weak self-duality and transversal Clifford structure
The defining algebraic property of Flip‑Vine Codes is weak self-duality under periodic boundary conditions or certain generalized open boundaries. Because each active measure qubit supports both an 5 and a 6 stabilizer with identical data-qubit support in alternating rounds, one has 7 up to qubit permutation. This immediately yields a transversal Hadamard:
8
Applying 9 to every data qubit swaps 0 and 1 stabilizers and realizes a logical tensor product of Hadamards on all encoded qubits (Nixon et al., 18 Jun 2026).
A transversal phase gate exists when there is a bipartition of data qubits into sets 2 and 3 such that for every 4 stabilizer 5,
6
Then
7
implements a transversal logical 8 on all encoded qubits. In particular, any flip-vine with weight-8 stabilizers admits the trivial bipartition 9 all data, 0, so applying 1 to all data qubits implements logical 2.
These transversality criteria are situated in the standard weak self-dual CSS framework and are satisfied in flip-vine codes because the flip enforces identical supports for 3 and 4 stabilizers, while the relevant weight and parity constraints are enforced by construction and boundary choice. No transversal 5 gate is claimed; non-Clifford gates are instead supplied by magic-state methods.
An explicit parity-check example is given by the flip-vine sequence 6 on a triangular patch. This yields an exact 2D color code of distance 7 encoding one logical qubit, equivalent to the Steane code 8 with weak self-duality 9, where
0
All 1 stabilizers have weight 2, pairwise overlaps are even, and 3, so transversal 4 and 5 exist.
5. Instances, circuits, and empirical performance
The paper reports representative vine-code patches with open boundaries and matched-distance comparisons to surface-code baselines. Several examples are singled out as promising candidates.
| Instance | Parameters | Note |
|---|---|---|
| 6, rotated | 7 | 8, total qubits 9 |
| 00, vertical parallelogram | 01 | 02, total qubits 03 |
| 04, horizontal parallelogram | 05 | 06 |
| 07, horizontal parallelogram | 08 | 09 |
| 10, rotated | 11 | routing 12, total 13 |
| 14, vertical parallelogram | 15 | routing 16, total 17 |
For periodic flip-vine tori, the enumeration found many weakly self-dual instances with large data-qubit savings relative to toric or surface-code baselines. Examples include 18 with parameters 19 and data-qubit ratio 20, 21 with 22 and ratio 23, 24 with 25 and ratio 26, and 27 with 28 and ratio 29.
Syndrome extraction is organized layer by layer along the step sequence. For each upper-case step, a CXSWAP is applied and the measure qubit advances along its vine; for each lower-case step, a CX is applied and positions remain unchanged. Near boundaries, deleted neighbors are handled by SWAP-like transport using CZSWAP against a reset routing qubit, or by skipping the gate if no movement is needed. Hook-error suppression depends on the independent-measurement condition, and for all listed small-distance patches the reported verification finds 30 equal to the code distance, with no distance-reducing hooks.
Circuit-level noise simulations use the SI1000 superconducting-inspired noise model with strength 31. The model includes two-qubit depolarizing noise after CX, CZ, and CXSWAP of strength 32; single-qubit depolarizing noise after 33 of strength 34; reset errors in the complementary Pauli basis of strength 35; measurement classical readout error 36 plus post-measure depolarization 37; and idle depolarization of strength 38 during unitary layers and 39 during measurement or reset layers. Simulations use at least 40 Monte Carlo shots or at least 41 errors per circuit.
At 42, the rotated 43 patches show that 44-basis memory is nearly an order-of-magnitude better in logical error than a matched-distance surface code at 45, while 46-basis memory is comparable at the same distance. The reported asymmetry is attributed to patch entropics and slight 47 versus 48 imbalances in certain cuts. A simple empirical scaling model,
49
is reported to capture the approximate exponential decay of logical error with circuit distance below pseudothresholds.
Overhead comparisons are one of the central results. At matched circuit distance, the rotated 50 patch at 51 uses total qubits 52 versus the surface code’s 53, corresponding to a 54 total saving, with data-plus-measure ratio approximately 55, corresponding to a 56 saving. At distance 57, the same family attains total ratio approximately 58, an 59 saving, with data-plus-measure ratio approximately 60, a 61 saving. For 62 at 63, the data-plus-measure ratio is approximately 64, a 65 saving, and total ratio is approximately 66, a 67 saving. For the rotated 68 family, the asymptotic coefficient comparison gives 69 in the quadratic-plus-linear fit 70, suggesting increasing benefits with distance (Nixon et al., 18 Jun 2026).
6. Search methodology, fault-tolerant role, and scope of the term
The construction is supported by an exhaustive search over step sequences up to stabilizer weight 71. Sequences are filtered by four validity conditions: commutativity, independent measurement, topological order, and patch connectivity. Duplicates are then removed by 72 sequence symmetry, by replacing sequences that begin or end with CXSWAP by equivalent CX moves to eliminate fruitless swaps, and by 73 support symmetry when different sequences yield identical data support. The reported outcome is 74 unique topologically ordered sequences, with 75 having 76 and 77 having 78; before support-equivalent reduction there are 79 sequences. Small patches are validated by exact circuit-distance computation.
Flip-vine instances are identified using 80. Routing lattices are constructed from seed measure qubits so that any measure pair separated by a vector in 81 are not both active, guaranteeing that flipped partner stabilizers commute. Active measure qubits then support both 82 and 83 stabilizers of identical support in alternating rounds, while routing qubits follow SWAP-only paths. Periodic tori of the form 84, 85 are searched for weak self-duality and distance.
In fault-tolerant architecture, the principal role of Flip‑Vine Codes is to provide transversal single-qubit Clifford gates together with 2D-local nearest-neighbor implementation. The available transversal operations are logical basis swaps via 86 and logical phase rotations via 87 when the bipartition condition holds, without ancilla overhead. No transversal 88 is provided. The intended non-Clifford mechanism is magic-state cultivation or distillation; the paper states that weakly self-dual and doubly-even flip-vine instances align with known color-code-like cultivation schemes and that adapting quasi-triorthogonal distance-optimized gadgets to flip-vine geometry is promising future work.
Several open questions remain explicit. These include faster high-accuracy decoders specialized to vine Tanner structure, systematic design of generalized boundaries including Pauli-89 and exotic patch shapes, integration into full-stack lattice surgery with magic-state cultivation and distillation, exploration of hyperbolic embeddings and higher-valency tilings, Floquet generalizations of flip-vine dynamics, and hardware co-optimization of iSWAP, CZ, leakage mitigation, and routing-qubit flag handling.
A separate point of terminology is that the phrase “vine” also appears in a non-quantum combinatorial context. The paper “Inside the Binary Reflected Gray Code: Flip-Swap Languages in 2-Gray Code Order” studies flip-swap languages on binary strings, where the leftmost 90 may be flipped or swapped one position to the right, and the “vine” intuition refers to rightward growth of that leftmost 91 under repeated swap operations (Sawada et al., 2021). That framework concerns cyclic 92-Gray codes and flip-swap posets rather than quantum LDPC stabilizer codes.