---
title: Locality vs Quantum Codes
url: https://www.emergentmind.com/topics/locality-vs-quantum-codes
type: topic
---

# Locality vs Quantum Codes

Locality versus Quantum Codes

Quantum error-correcting codes, especially those intended for scalable quantum computing and storage, must balance the algebraic demands of robustness (distance, rate) against acute constraints on physical or interaction locality. This trade-off is sharply distinct from the classical regime and is governed by a set of quantitative and qualitative limitations inherent to quantum information, many of which have only recently been rigorously characterized. The interplay between locality (geometric or logical), code parameters, and the structure of quantum codes is now a central theme traversing the theory and practice of quantum error correction.

## 1. Modeling Locality in Quantum Codes

Quantum code locality refers to restrictions on the support of stabilizer generators (or more generally, code checks), locality of recovery operations, and geometric layout of qubits and couplings. The definition is context-dependent:

- **Geometric locality**: Each code generator (stabilizer or gauge) acts nontrivially only on qubits situated within a bounded spatial region, e.g., adjacent qubits on a 2D or 3D lattice [1011.3529][2309.16104].
- **Logical locality (LDPC)**: Each check acts on at most $w=O(1)$ qubits, and each qubit participates in at most $O(1)$ checks ("quantum LDPC") [2202.13641][2106.00765].
- **Local recovery**: For locally recoverable codes (qLRCs), a single-qubit erasure can be corrected by operations on some constant number $r$ of surrounding qubits [2411.01504][2311.08653].

The notion of *interaction length* is made precise when codes are embedded into low-dimensional space: e.g., a planar code has only short-range (local) interactions, whereas quantum LDPC codes with distance scaling faster than $n^{1/2}$ necessarily require long-range checks as quantified below [2409.15203][2109.10982].

## 2. Fundamental Locality–Parameter Trade-offs

Geometric and logical locality impose hard constraints on the achievable code parameters—dimension $k$, distance $d$, and block length $n$—in quantum codes.

- **Bravyi–Poulin–Terhal (BPT) Bound**: Any 2D-local stabilizer code with $n$ physical qubits, $k$ logical qubits, and distance $d$ must satisfy
  $$
  k d^2 \leq O(n)
  $$
  This cannot be violated by codes whose stabilizers are strictly geometrically local in 2D [1011.3529][2409.15203].

- **Higher-dimensional generalization**: For codes local in $D$ dimensions, optimal codes satisfy 
  $$
  d = O\left(n^{(D-1)/D}\right), \quad k = O\left(n^{(D-2)/D}\right)
  $$
  and the energy barrier scales as $E = O\left(n^{(D-2)/D}\right)$ [2309.16104].

- **Logical operator weight–distance trade-off**: For any $D$-dimensional code, the minimal support $\tilde d$ of a logical operator and code distance $d$ satisfy
  $$
  \tilde{d} \cdot d^{1/(D-1)} = O(n)
  $$
  which severely limits self-correction in low dimensions [1011.3529].

- **Quantum LDPC with rate/distance above local bounds**: Good quantum LDPC codes ($k,d = \Omega(n)$, $w=O(1)$) are impossible with strictly local interactions in 2D or 3D [2106.00765][1610.07478][2409.15203].

- **Impossibility of local correctability**: In contrast to classical LCCs, quantum codes cannot allow more than one disjoint recovery set per qubit, due to the no-cloning property [2311.08653].

## 3. Quantitative Locality vs Code Parameters: Recent Optimal Bounds

Recent results have fully characterized the penalties for exceeding locality-imposed thresholds:

- **Sharp lower bounds on non-locality [2409.15203]**: For a quantum stabilizer code embedded in 2D, if $kd^2 > c n$ for some constant $c$, then:
  - At least $\Omega(\max(k,d))$ interactions (edges in the interaction graph) must have length at least
    $$
    \ell^* = \max\left(\frac{d}{\sqrt{n}}, \left(\frac{kd^2}{n}\right)^{1/4}\right)
    $$
    This quantifies the required number and length of long-range checks to breach the BPT regime.
  - These bounds are tight, being matched by (i) truncated/padded good quantum LDPC codes for count, and (ii) concatenated codes with surface codes for length.

- **Stacked architectures and beyond**: In physical architectures admitting only a small number of very long-range links (e.g., "stacked codes"), the best achievable code distances and rates are still polynomially bounded away from the LDPC optimum and are quantitatively ruled out for families like hypergraph product and balanced product codes [2409.15203][2109.10982].

## 4. Local Testability, Expansion, and the Quantum–Classical Contrast

Local testability—the ability to detect proximity to the code space by checking a constant-sized random subset of constraints—depends critically on the interaction graph structure:

- **Quantum Locally Testable Codes (qLTCs)**: 
  - Defined via a soundness function $R(\delta)$, giving the probability a random check is violated as a function of distance $\delta$ to the code [1310.5664].
  - Unlike the classical case, strong small-set expansion in the interaction graph *decreases* qLTC soundness: $R(\delta) \leq O(\varepsilon) k\delta$ when the graph is a $\varepsilon$-expander, due to monogamy-of-entanglement—each qudit cannot fail many checks simultaneously. This is the opposite of the classical LTC situation, where expansion boosts soundness.
  - Even in the "worst" topologies, quantum codes exhibit an "alphabet gap" $r(\delta) \leq 1 - 1/d^2$ (where $d$ is the qudit dimension), and a further quantum gap $<1$ for $k \geq 4$ due to monogamy effects [1310.5664].

- **Quantum PCP and PCPP reductions**: Quantum analogues of PCP-of-proximity imply a direct reduction from quantum PCPs to qLTCs in the stabilizer setting, but this bridge remains open for general non-commuting Hamiltonians [1310.5664].

- **Discrepancy and expansion**: Merely having a "random-like" high-dimensional expander topology (small discrepancy) is *insufficient* for linear-distance quantum LDPC codes; additional algebraic structure is necessary, in sharp contrast to the classical expander code paradigm [1610.07478].

## 5. Constructing Quantum Codes under Locality and Connectivity Constraints

Various architecturally relevant strategies have been developed to approach the locality–performance barrier:

- **Quantum LDPC (graph-theoretic approach)**: The code's *connectivity graph* (vertices: qubits; edges: support-overlaps of stabilizers) governs the achievable trade-off.
  - If all separators in the connectivity graph are sublinear, then $d=O($separator$)$; to have both linear $k$ and $d$ requires the code's graph to be an expander [2106.00765].
  - Codes local in $D$-dimensional Euclidean or hyperbolic space achieve at best $d=O(n^{1-1/D})$, with similar rate constraints.

- **Codes from subdivision**: Recent constructions subdivide the square-complex structure of explicit good qLDPC codes and embed the subdivision into $\mathbb{R}^D$, saturating BPT-style locality–distance–rate bounds up to (removable) polylog factors, and with matching energy barriers [2309.16104].

- **Bivariate bicycle, trivariate bicycle, and small LDPC codes**: Hybrid designs balance locality and overhead, yielding codes with weight-4 or weight-6 checks, moderate-range couplers, and substantial improvement over 2D-local surface codes for moderate code sizes [2507.09690][2404.17676].

- **Hierarchical or concatenated architectures**: To reconcile geometric locality with scalability (threshold), one concatenates a good quantum LDPC code (as outer code) with a log-length inner surface code, producing "hierarchical" codes: $K = \Omega(N/\log^2 N)$ logical bits, $D(N) = \Omega(N^{\delta}/\log^{2\delta} N)$ distance, with constant-depth local circuits and superpolynomial error reduction below threshold [2303.04798].

- **Quantum locally recoverable codes (qLRCs)**: Constructions based on good polynomials or Tamo–Barg structures give CSS codes with optimal quantum Singleton-like bound trade-offs among dimension, distance, and locality for any block length and local repair parameter $r$, with efficient decoding and, in the folded variant, practical spatial locality [2411.01504][2311.08653].

## 6. Extensions: Energy Barriers, Logical Operators, and Fault-Tolerance

- **Logical Operator Geometry and Energy Barriers**: Locality constrains not just code distance, but also the shape and minimal support of logical operators, and hence the code’s thermal stability:
  - In 2D, all codes with geometric locality admit string-like logical operators; the maximal energy barrier is $O(1)$ and self-correction is impossible [1011.3529].
  - 3D codes with strictly local cube stabilizers can be constructed to forbid all string logical operators (Haah codes and variants with $p \geq 5$), but the energy barrier grows only logarithmically with system size due to forced "fractal" error structures [1202.0052].

- **Locality-preserving logical operators**: In $d$-dimensional topological codes, gates that preserve locality (support expands by at most constant thickness) are constrained to lie in the $d$th level of the Clifford hierarchy [1709.00020]. Stacked surface codes admit full Clifford LPLOs in 2D, and CCZ (non-Clifford) LPLOs in 3D.

- **Sublinear-weight parity-checks and transversal non-Clifford gates**: Subsystem code product constructions now achieve $[[N,\Theta(N),\Theta(N)]], w = O(N^\varepsilon)$ for any fixed $\varepsilon > 0$ and support transversal CCZ gates; efficient multivariate-Prony decoders make these codes practically fault-tolerant despite sublinear locality [2510.06798]. This resolves longstanding conjectures on the existence and structure of such codes.

## 7. Implications and Open Questions

The quantum locality–code parameter landscape displays a series of fundamental differences from the classical case:

- Local constraints that boost soundness, testability, and code performance in classical setting are, due to quantum entanglement restrictions, often detrimental or strongly limiting for quantum codes.
- Even high-dimensional expansion or random-like geometry is insufficient; algebraic constructions with tailored (often non-expander) structure are essential to achieve good parameter regimes.
- There is a sharp, quantifiable resource cost to exceeding 2D-locality-imposed bounds, both in the number and length of long-range interactions needed, and in the necessity of abandoning geometric or hardware-friendly layouts for high-performance codes.
- For scalable quantum error correction, architecture-aware code design—trading between locality, overhead, and implementable syndrome extraction—is indispensable.

Open problems include the existence of qLTCs matching classical LTCs in all parameters, further clarifying the quantum PCP/qLTC/NLTS relationships, and the construction of truly self-correcting quantum memories with locality restrictions [1310.5664][2411.01504][1610.07478].

Source: https://www.emergentmind.com/topics/locality-vs-quantum-codes