---
title: Rotated Surface Code
url: https://www.emergentmind.com/topics/rotated-surface-code-rsc
type: topic
---

# Rotated Surface Code

The rotated surface code (RSC) is a planar CSS stabilizer code that realizes one logical qubit on a square patch with reduced qubit overhead relative to the standard unrotated planar surface code at the same code distance. Across the literature, it is described either as a checkerboard of data qubits on a \(d\times d\) vertex lattice with alternating \(X\)- and \(Z\)-type plaquettes, or as a 45-degree-rotated restriction of the edge-qubit planar code; these descriptions are equivalent at the level of encoded topology but differ in local bookkeeping of boundary checks and ancillas. In the most commonly used resource count for a distance-\(d\) patch, the code parameters are \([[d^2,1,d]]\), with weight-4 bulk stabilizers and reduced-weight boundary stabilizers, and with logical \(X\) and \(Z\) implemented by minimal boundary-to-boundary strings of Pauli operators [2412.01391] [2505.18592] [2312.17057].

## 1. Definitions, lattice conventions, and code parameters

In the checkerboard formulation, the RSC is a planar patch of \(d^2\) data qubits arranged on a \(d\times d\) lattice, with \(X\)-type and \(Z\)-type stabilizers placed on alternating plaquettes. A standard presentation writes
\[
S_p^X=\prod_{i\in p}X_i,\qquad S_p^Z=\prod_{i\in p}Z_i,
\]
with weight-4 bulk checks and reduced-weight boundary checks. The logical operators are minimal strings spanning opposite like-type boundaries; equivalently, the code distance is the minimum length of any nontrivial boundary-to-boundary logical chain [2412.01391] [2505.18592] [2607.05814].

A second common presentation starts from the planar edge-qubit surface code and restricts to a central diamond, producing the “rotated” patch. In that language, site checks \(A_s=\prod_{i\in s}X_i\) and plaquette checks \(B_p=\prod_{i\in p}Z_i\) remain local, while the boundary structure changes relative to the unrotated planar code. This representation is useful for comparing encoders and for discussing biased-noise behavior, because it makes explicit how the rotated geometry alters boundary terms and logical-path geometry [2002.00362] [1812.08186].

The basic parameters used repeatedly across the literature are consistent: a symmetric rotated patch encodes one logical qubit with \(n=d^2\) data qubits and distance \(d\). When ancillas are counted explicitly with one measurement ancilla per stabilizer, the commonly used total physical-qubit count is \(2d^2-1\) [2409.14765] [2204.11404]. The lower-layer choice \(L=5\) in concatenated constructions therefore gives \([[25,1,5]]\) for the data block itself [2505.18592].

Different papers adopt different boundary conventions. Some vertex-based checkerboard treatments describe weight-2 boundary checks, while some edge-qubit or alternative rotated depictions describe weight-3 boundary checks or additional boundary stabilizers. This suggests that boundary weight statements should be interpreted relative to the specific lattice representation and measurement convention, not as a contradiction in the encoded code family [2002.00362] [2409.14765] [2506.04084].

## 2. Resource efficiency relative to unrotated surface codes

A central motivation for the RSC is lower qubit overhead at fixed distance. For the rotated patch, the exact formulas reported for total qubits are
\[
N_{\mathrm{rot}}(d)=2d^2-1,
\]
while for the unrotated planar code
\[
N_{\mathrm{unrot}}(d)=4d^2-4d+1.
\]
These formulas count one measurement ancilla per stabilizer and assume no ancilla reuse [2409.14765].

| Code | Data qubits | Total qubits |
|---|---:|---:|
| Rotated surface code | \(d^2\) | \(2d^2-1\) |
| Unrotated surface code | \(2d^2-2d+1\) | \(4d^2-4d+1\) |

At equal logical error rate under circuit-level noise, the resource advantage is smaller than the naive factor-of-two comparison at fixed distance, but it remains substantial. For \(p=10^{-3}\) and target \(p_L=10^{-12}\) per \(d\) rounds, the rotated code was reported to use \(73.6\pm1.3\%\) of the qubits used by the unrotated code under standard depolarizing noise, and \(75.6\pm1.4\%\) under superconducting-inspired noise; rounded to integer distances, the example given is \(d=27\) for RSC versus \(d=23\) for the unrotated code, corresponding to \(1457/2025\approx72\%\) [2409.14765]. The same work states that the \(\approx 75\%\) ratio persists for physical error rates within a factor of two of \(10^{-3}\) across practically relevant logical error rates [2409.14765].

The rotated layout is therefore not merely a constant-distance reformulation. It changes the qubit-vs-reliability tradeoff in a quantitatively favorable way under realistic circuit-level noise, while retaining the planar, local structure needed for standard syndrome extraction and lattice surgery [2409.14765].

## 3. Syndrome extraction, schedules, and hook-error control

Syndrome extraction in the RSC is typically ancilla mediated. A representative schedule resets ancillas, performs four ordered layers of CNOTs between ancillas and neighboring data qubits, and then measures ancillas to obtain \(X\)- and \(Z\)-type syndromes [2412.01391]. Stim’s rotated-surface-code circuit generator is likewise described as compiling one full round of all \(X\) and \(Z\) checks per code cycle, with four entangling steps for bulk weight-4 checks and two for boundary checks [2607.05814].

A recurring circuit-level issue is the control of hook errors, namely ancilla-originated correlated two-qubit data faults produced mid-syndrome-extraction. Traditional rotated-code scheduling uses geometry-dependent N-shaped and Z-shaped CNOT orderings so that hooks are oriented away from logical operators [2409.14765] [2602.09099]. The diagonal schedule replaces this with a globally uniform rule: all \(X\)-plaquettes use one diagonal ordering and all \(Z\)-plaquettes another, causing hooks to lie along plaquette diagonals instead of horizontal or vertical logical directions. The reported consequence is preservation of full circuit-level distance together with a minimal period of 6 time steps on hardware that supports parallel measurement, reset, and gate operations, compared to 7 for traditional mixed-orientation schedules [2602.09099].

This scheduling simplification matters beyond memory experiments. The same diagonal-scheduling paper reports applicability to spatial junctions, spatial Hadamard gates, and patch rotation, with equivalent or improved logical error rates and simplified circuit construction [2602.09099]. In modular settings, optimized interface geometry plays a comparable role: for rotated patches coupled across noisy links, a zigzag boundary is used to avoid 2–2 splits of weight-4 checks, thereby mitigating boundary hook errors and preserving full \(X\)- and \(Z\)-distance under direct links, gate teleportation, and CAT-state gadgets [2503.04968].

## 4. Logical operators, Clifford operations, and encoding circuits

At the logical level, the RSC supports the standard surface-code operator structure: \(L_X\) connects rough or \(X\)-type boundaries, \(L_Z\) connects smooth or \(Z\)-type boundaries depending on convention, and minimal logical weight is \(d\) [2412.01391] [2204.11404]. Several recent works focus on implementing logical Clifford operations while preserving the rotated patch’s lower qubit overhead.

One direction uses reconfigurable neutral-atom arrays to realize a transversal Clifford set on rotated patches. A logical \(H\) is implemented by transversal Hadamards on all data qubits followed by an effective \(\pi/2\) patch rotation realized as two reflections, using horizontally aligned and diagonally aligned 2D-AODs. A logical \(S\) is implemented as a fold-transversal operation embedded inside a single syndrome-extraction round, exploiting a half-cycle state in which the joint data-plus-ancilla system is equivalent to an unrotated surface code plus a few unentangled boundary qubits. Together with transversal logical CNOT between patches, this yields a transversal logical Clifford set \(\{H,S,\mathrm{CNOT}\}\) on the RSC in that hardware model [2412.01391].

A distinct experimental route uses code deformation and lattice surgery on distance-three rotated patches. Merge and split, patch expansion and shrinkage, and domain-wall/twist-defect deformations have been composed into logical routing, logical CNOT, and single-qubit \(H\) and \(S\) gates on a 107-qubit superconducting processor, all with multi-round syndrome extraction and neural-network decoding and without post-selection [2607.01473]. In that deformation picture, corners of the rotated patch function as twist defects, and boundary-frame permutations implement the geometric action of Clifford gates [2607.01473].

Encoding has also become a topic in its own right. Earlier local unitary encoders for the rotated code used a 4-layer inductive growth step \(L\to L+2\), giving total depth \(2L+O(1)\) under nearest-neighbor locality [2002.00362]. More recent work reduces this to depth \(d+[d\bmod 2]\) for a distance-\(d\) rotated code by using depth-2 inductive growth circuits \(d\to d+2\) with only nearest-neighbor CNOTs, and proves \(d+O(1)\) optimality within the inductive construction paradigm [2509.09779]. A separate non-local unitary encoder uses a code conversion \(\mathrm{Rot}\,d\to \mathrm{Reg}\,d\to \mathrm{Rot}(2d-1)\) in four parallel CNOT layers, achieving logarithmic-in-\(d\) growth depth for repeated distance doubling and enabling preparation of logical \(Y\)-eigenstates and other Clifford eigenstates [2506.04084].

## 5. Decoding, noise models, and logical-error behavior

The RSC has been analyzed under code-capacity, phenomenological, and circuit-level noise, with decoders ranging from MWPM to belief-propagation hybrids and neural decoders. Under code-capacity depolarizing noise, concatenating random \((3,4)\)-HGP codes with lower-layer rotated patches of \(L=5\) yields an average pseudo-threshold \(p_{\mathrm{th}}^c=0.157\), compared with the rotated-surface-code pseudo-threshold \(p_{\mathrm{th}}^s=0.1776\) used in that work; the hierarchical scheme is reported to outperform plain RSC in both qubit efficiency and logical error rate for \(s\ge 4\), \(d\ge 25\), and physical error rates around or less than \(10^{-2}\) [2505.18592].

Under circuit-level memory noise, the low-\(p_L\) scaling of the rotated code has been fitted as
\[
p_L=\alpha (p/\beta)^{\gamma d-\delta},
\]
with different fit parameters for standard depolarizing and superconducting-inspired models. The rotated code uses fewer qubits than the unrotated code at equal \(p_L\), but the unrotated code can have lower \(p_L\) at the same \(d\), which is why equal-error-rate rather than equal-distance comparison is operationally relevant [2409.14765].

Several decoder developments are specifically RSC-oriented. Progressive-Proximity Bit-Flipping achieves a threshold of about \(7\%\) on the rotated planar code over the binary symmetric channel with perfect measurements, with \(O(n)\) complexity and no dynamic memory allocation [2402.15924]. A distributed neural-network decoder under depolarizing code-capacity noise with perfect measurements partitions the syndrome into overlapping \(d_{\mathrm{tile}}=3\) tiles and was reported to match Blossom and monolithic neural decoders at \(d=5,7,9\) while addressing training-space explosion [1901.10847]. More recently, an adaptive confidence-gated decoder combines a neural fast path with MWPM refinement; at \(d=7\), routing only \(3.30\%\) to \(6.19\%\) of syndromes to MWPM improves end-to-end logical accuracy from \(99.21\%\) to \(99.81\%\) depending on confidence threshold, with neural throughput saturating near \(4.58\times 10^5\) shots/s at batch size 512 on CPU [2607.05814].

Realistic-noise simulation has also been carried out for a distance-5 rotated code under local stochastic noise plus coherent over-rotations. In that setting, the low-\(p\) logical error rate was fitted as \(p_L=A[(1+\alpha c^2)p]^\xi\) with \(A\approx 6.5\times 10^5\), \(\xi\approx 2.92\), and \(\alpha\approx 0.872\), after reducing the explicit simulation from 49 physical qubits to 26 by delaying syndrome measurements and reusing ancillas in the simulation [2204.11404].

## 6. Variants, architectural roles, and current research directions

The RSC functions both as a standalone code and as a building block inside broader fault-tolerant architectures. In hierarchical quantum error correction, it appears as a nearest-neighbor-compatible lower layer under qLDPC upper layers, with lattice surgery mediating inter-block operations on planar hardware [2505.18592]. In the Hierarchical Logical Processor, standard rotated patches act as level-0 cores while elongated rotated patches act as shuttle buses; at \(p=10^{-3}\), an HLP based on the \([[256,194,4]]\) code is reported to achieve 3–4 times higher qubit efficiency than standard RSC and to reduce space overhead relative to the yoked surface code by 100–200 physical qubits per logical qubit while shortening the logical error-correction cycle time by a factor of 20–30 [2606.22594].

The RSC is also a baseline against which denser planar codes are compared. A recent hex-grid twist-defect architecture uses rotated patches as the compute and hot-storage baseline, while claiming up to \(4.5\times\) the encoding rate of a rotated patch for dense cold storage and retaining rotated patches for low-latency surgery and factories [2605.30455]. In magic-state distillation analyses, rotated patches with rectilinear twist defects are arranged into compact rectangular factories, including a \(d\)-by-\(3d\) \(|T\rangle\) factory requiring up to \(15d\) error-correction cycles and a \(3d\)-by-\(2d\) \(|CCZ\rangle\) factory requiring up to \(10.5d\) cycles [2603.05409].

Under biased noise, the rotated geometry has further distinctive behavior. For highly biased dephasing-equivalent noise, closely related rotated layouts can achieve a \(50\%\) threshold in the infinite-bias limit with polynomial-time decoding, and the sub-threshold logical-failure rate depends strongly on geometry and boundary conditions [1812.08186]. Analytic small-\(p\) studies of rotated and XZZX variants also show that combining rotation with XZZX on rectangular lattices can collapse asymmetric distances to \(\min\{d_X,d_Z\}\), making the combined modification suboptimal in that setting [2312.17057].

A plausible implication is that the RSC has become less a single fixed code than a reference geometry around which scheduling, decoding, code deformation, modular interfaces, and concatenated architectures are now co-designed. The common thread across these developments is that the rotated patch retains the local syndrome-extraction structure and low data-qubit overhead of the surface-code family while admitting unusually rich boundary engineering and hardware-aware transformations [2412.01391] [2602.09099] [2607.01473].

Source: https://www.emergentmind.com/topics/rotated-surface-code-rsc