Abstract 1 Introduction 2 Preliminaries 3 Proof of Theorem 4 4 Proof of Theorem 5 5 Proof of Theorem 6 6 Construction for Upper Bounds References Appendix A Proof of Theorem 4

Optimal Locality and Parameter Tradeoffs for Subsystem Codes

Samuel Dai ORCID Department of Physics, Northeastern University, Boston, MA, USA Ray Li ORCID Math & CS Department, Santa Clara University, CA, USA Eugene Tang ORCID Departments of Math and Physics, Northeastern University, Boston, MA, USA
Abstract

We study the tradeoffs between the locality and parameters of subsystem codes. We prove lower bounds on both the number and lengths of interactions in any D-dimensional embedding of a subsystem code. Specifically, we show that any embedding of a subsystem code with parameters [[n,k,d]] into D must have at least M interactions of length at least , where

M=Ω(max(k,d)),and=Ω(max(dnD1D,(kd1D1n)D1D)).

We also give tradeoffs between the locality and parameters of commuting projector codes in D-dimensions, generalizing a result of Dai and Li [8]. We provide explicit constructions of embedded codes that show our bounds are optimal in both the interaction count and interaction length.

Keywords and phrases:
Quantum Error Correcting Code, Locality, Subsystem Code, Commuting Projector Code
Funding:
Ray Li: Supported by NSF grant CCF-2347371.
Copyright and License:
[Uncaptioned image] © Samuel Dai, Ray Li, and Eugene Tang; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Hardware Quantum error correction and fault tolerance
; Theory of computation Error-correcting codes
Related Version:
Full Version: https://arxiv.org/pdf/2503.22651 [9]
Acknowledgements:
We thank Andy Liu, Shouzhen Gu, Zhiyang He for helpful feedback on our manuscript.
Editor:
Bill Fefferman

1 Introduction

Quantum computing necessitates the manipulation of fragile states of information. The most promising way towards large-scale fault-tolerant quantum computing involve the extensive use of quantum error-correcting codes (QECCs). Physical implementations of quantum computing hardware naturally favor architectures which are local in 2 or 3 spatial dimensions – architectures where the qubits are embedded in 2 or 3 dimensions, and interactions occur only between qubits that are spatially nearby. On the other hand, it has long been known that the constraint of spatial locality places severe limitations on the parameters of QECCs. For example, the Bravyi-Terhal [7] and Bravyi-Poulin-Terhal (BPT) [6] bounds state that a commuting projector code whose constraints are local in D-dimensions necessarily have code parameters satisfying, respectively,

d=O(nD1D),andkd2D1=O(n). (1)

These bounds suggest that there are tradeoffs between better code performance and the cost of non-local implementation. Consequently, the locality of a QECC becomes another key factor to consider when choosing a code for applications.

What is the quantitative tradeoff between locality and code quality? This problem was initially investigated by Baspin and Krishna [3], who asked, for a quantum low-density parity-check (qLDPC) code in D-dimensions, how many “long-range” interactions must there be, and how long must those interactions be? Baspin and Krishna gave bounds for D-dimensional codes which are nearly optimal in certain parameter settings. For 2-dimensional codes, Dai and Li [8] improved the bounds to be tight across all parameter regimes and also gave matching constructions that saturate the upper bounds (see also Hong, et al. [11], who considered the special case k=1,d=n for 2-dimensional codes). Dai and Li showed that an [[n,k,d]] quantum code embedded in 2 spatial dimensions must have Ω(M) interactions of length Ω(), where

M=max(k,d),and=max(dn,kd2n4). (2)

Both the interaction count M and interaction length are tight in strong ways.

In this paper, we study the locality versus parameter tradeoffs for quantum subsystem codes. Bravyi [5] showed that the BPT bound could be violated by the use of local subsystem codes, providing 2D-local subsystem codes with parameters k,d=Θ(n). Subsystem codes are nevertheless constrained by locality. Bravyi [5] showed that a [[n,k,d]] subsystem code whose gauge generators are local in a D-dimensional lattice embedding satisfies

d=O(nD1D),andkd1D1=O(n). (3)

While previous work has made it clear that outperforming local quantum codes requires copious amounts of long-ranged interactions, it is not a priori clear whether the same requirements hold for subsystem codes. Is it possible that small violations of locality in the gauge generators suffice to define subsystem codes parametrically better than those allowed by Bravyi’s bound? More concretely:

Question 1.

How much non-locality is required for a subsystem code to exceed Bravyi’s bound?

We address Question 1 by demonstrating that subsystem codes, like their commuting projector counterparts, require an extensive number of long-ranged interactions to surpass Bravyi’s bound. We also provide constructions of subsystem codes that show our lower bounds are tight in strong ways. Additionally, we also generalize the results of Dai and Li [8] from 2-dimensions to D-dimensions. Our work establishes optimal bounds on interaction lengths and counts for embeddings of both commuting projector codes and subsystem codes in any number of dimensions.

1.1 Main Result

We study subsystem codes whose gauge generators are not necessarily local. Our main result is a lower bound on the number and length of interactions in any D-dimensional embedding of a [[n,k,d]] subsystem code. Formally, a D-dimensional embedding is a mapping of the code’s n physical qubits into D, such that any two qubits are at distance at least 1.

Theorem 2 (Main Result for Subsystem Codes).

For any D2, there exist constants c0=c0(D)>0 and c1=c1(D)>0 such that the following is true: Any D-dimensional embedding of a nontrivial111Nontrivial here simply means that k>0. [[n,k,d]] subsystem code with kd1D1c1n or dc1nD1D must have at least M interactions of length , where

M=c0max(k,d),and=c0max(dnD1D,(kd1D1n)D1D). (4)

Prior to this work, no such bounds of this form were known for subsystem codes aside from Bravyi’s original bound. While such bounds were known for commuting projector codes, our bound shows that a locality versus parameter trade-off also holds for subsystem codes. Our result also generalizes Bravyi’s bound [5], not only in that we (optimally) address the number and length of long-range interactions, but also in that we handle more general embeddings. Bravyi’s bound [5] considers only embeddings onto a n1/D××n1/D lattice, but our bound applies to arbitrary embeddings, even those not constrained to a O(n1/D)××O(n1/D) box (see Section 3 for further discussion).

Like for stabilizer codes, subsystem codes beyond the “local regime” – above the BPT bound for stabilizer codes, or above the Bravyi bound for subsystem codes – need copious amounts of non-locality. In particular, the number of required long-range interactions Ω(max(k,d)) is the same for both subsystem and stabilizer codes. Additionally, for codes with a large number k of logical qubits, the required length of the long range interactions is similar. For example, a 2-dimensionally embedded asymptotically good subsystem code (with k,d=Ω(n)) needs M=Ω(n) interactions of length =Ω(n) – the worst possible case – just as for stabilizer codes. Our results show that, compared to stabilizer codes, subsystem codes do not offer substantial improvements in locality outside of the “local regime,” though they can offer some quantitative improvements in the interaction length.

We also provide matching constructions that show M and are optimal in strong ways (see Figure 2). An asymptotically good qLDPC code [14, 12] has O(M)=O(max(k,d)) interactions of any length (see Theorem 1.3 of [8]). Since a stabilizer code can also be trivially regarded as a subsystem code, this shows that our bounds are tight in terms of interaction count. For optimality in the interaction length, we exhibit subsystem codes embedded in D-dimensions where all interactions are of length at most O() (Theorem 21).

Figure 1: The (asymptotically) optimal interaction count and length for subsystem codes in 2D: A [[n,k,d]] subsystem code need at least Ω(M) interactions of length Ω(), where M is plotted on the left and is plotted on the right. Above, we plot the contours of k vs. d tradeoffs for various values of the Interaction Count or Interaction Length. Everywhere, big-O is suppressed for clarity.
Figure 2: Schematic diagram illustrating the optimality of our lower bounds for all n,k,d: A point (M,L) represents that there is a code with O(M) interactions of length ω(L). Blue shaded region is achievable, red lined region is unachievable. Our lower bound shows that (M,) with Mo(M) and o() is impossible, where M and are the optimal interaction count and length, respectively, given by Theorem 2. There is a construction (good qLDPC code) with O(M) interactions of any length, and another construction (concatenated local code, Theorem 21) with zero interactions of length ω().

1.2 Generalizing [8] to 𝑫-dimensions

We also show that the bounds in [8] can be generalized to D-dimensional embeddings and to commuting projector codes.

Theorem 3 (Generalization of [8] to D-dimensions).

For any D2, there exist constants c0=c0(D)>0 and c1=c1(D)>0 such that the following is true: Any D-dimensional embedding of a nontrivial [[n,k,d]] commuting projector code with kd2D1c1n or dc1nD1D must have at least M interactions of length , where

M=c0max(k,d),and=c0max(dnD1D,(kd2D1n)D12D). (5)

We now compare our works to prior works. First, we note that, when setting D=2, our bound matches the bounds in [8] up to the implied constant. For D>2 dimensions, the only prior bounds we are aware of are due to Baspin and Krishna [3]. Theirs match our bounds up to polylog factors when dkn and when k=Θ(n), and we improve their bounds in the remaining parameter regimes. We also generalize their results; our results hold for all commuting projector codes, whereas theirs hold only for qLDPC codes.

Similar to Theorem 2 and [8], our M and L in Theorem 3 are optimal up to constant factors. Any asymptotically good qLDPC code [14, 12] is a commuting projector code with at most O(M)=O(max(k,d)) interactions of any length. Further, we exhibit stabilizer codes embedded in D dimensions, all of whose interactions are of length at most O(); see Theorem 23.

1.3 Organization of the Paper

We divide the proof of Theorem 2 into two parts:

Theorem 4 (Main Result – Part 1).

For all D2, there exist constants c0=c0(D)>0 and c1=c1(D)>0 such that the following is true: Any D-dimensional embedding of a nontrivial [[n,k,d]] subsystem or commuting projector code with dc1nD1D must have at least c0d interactions of length at least c0dnD1D.

Theorem 5 (Main Result – Part 2).

For all D2, there exist constants c0=c0(D)>0 and c1=c1(D)>0 such that the following is true: Any D-dimensional embedding of a [[n,k,d]] subsystem code with kd1D1c1n must have at least c0k interactions of length at least c0(kd1D1n)D1D.

Theorem 4 implies Theorem 2 in the regime where dk, and Theorem 5 implies Theorem 2 in the regime when dk. Note that Theorem 4 also implies Theorem 3 when dkn. The remaining case of Theorem 3 is when dkn, which we prove in Theorem 6.

Theorem 6 (Generalization of [8] when dkn).

For all D2, there exist constants c0=c0(D)>0 and c1=c1(D)>0 such that the following is true: Any D-dimensional embedding of a [[n,k,d]] commuting projector code with kd2D1c1n must have at least c0k interactions of length c0(kd2D1n)D12D.

2 Preliminaries

Notation and Definitions

We use standard Landau notation O(),Ω(),Θ(),o(),ω(). We also use the notations O~(),Ω~(), which are variants of O() and Ω(), respectively, that ignore logarithmic factors. For example, f(n)=O~(h(n)) means that there exists an integer k such that f(n)=O(h(n)logkn). For a set S, we write SD=defSS2SD.

In D, distance refers to Euclidean (2) distance unless otherwise specified. We sometimes also use the -distance of two points (x,y),(x,y)D, which is max(|xx|,|yy|). A grid tiling is a division of d given by axis aligned hyperplanes equally spaced at a fixed distance w. Throughout, a box is always a set of the form [a1,b1]××[aD,bD]. In particular, boxes contain their boundary and are axis-parallel. A cube is a box all of whose side lengths are equal: b1a1=b2a2==bDaD.

An embedded set in D is a finite set QD with pairwise (2) distance at least 1. A function f:D is finitely supported if f(x)0 for finitely many xD. For a finitely supported function f:D and a region RD, define, by abuse of notation, f(R)=iR;f(i)0f(i). We will be primarily concerned with the finitely supported function given by Definition 8.

2.1 Quantum codes

We associate the pure states of a qubit with unit vectors in 2 and pure n-qubit states with unit vectors in (2)n. Let 𝒫 denote the (single-qubit) Pauli group, which consists of the Pauli matrices 𝖨,𝖷,𝖸,𝖹, and their scalar multiples by {±1,±i}. The n-qubit Pauli group is 𝒫n=𝒫n. Given P𝒫n, its weight |P| is the number of tensor components not equal to 𝖨.

A quantum error-correcting code 𝒞 is a subspace of (2)n. The parameter n is called the (block) length of the code. We define the dimension k of the code to be k=log2(dim𝒞).

Stabilizer Codes

A stabilizer group 𝒮 is an abelian subgroup of the n-qubit Pauli group 𝒫n that does not contain 𝖨. A stabilizer code 𝒬=𝒬(𝒮)(2)n is defined to be the subspace of states left invariant under the action of the stabilizer group 𝒮, i.e. 𝒬={|ψ:𝖲|ψ=|ψ,𝖲𝒮}. Being an abelian group, we can describe 𝒮 by nk independent generators {𝖲1,,𝖲nk}, where k is the dimension of the code. The distance d is the minimum weight of an error E𝒫n that maps a codeword in 𝒬 to another codeword. A quantum code 𝒬 with distance d can correct up to d1 qubit erasures.

Subsystem Codes

A subsystem code is a choice of decomposition of a stabilizer code 𝒞 into a tensor product 𝒞=𝒜, where 𝒜(2)k and (2)g are the logical and gauge parts of 𝒞, respectively. The dimension k of a subsystem code is defined as the number of qubits encoded in its logical subsystem 𝒜. One can view a subsystem code as a stabilizer code that can encode k+g logical qubits, but only k of the logical qubits are actually used to protect information.

We can define a subsystem code by starting with a stabilizer code 𝒮 given by nkg independent stabilizer generators, with k+g logical qubits associated with k+g pairs of logical operators X¯1,Z¯1,,X¯k+g,Z¯k+g. The first k logical qubits are used to encode information, and the last g logical qubits are called gauge qubits. The gauge group of the subsystem is the group 𝒢=𝒮,X¯k+1,Z¯k+1,,X¯k+g,Z¯k+g. Given the gauge group 𝒢, the code’s stabilizer group 𝒮 can be recovered as the center of 𝒢, so a subsystem code is uniquely defined by its gauge group. Any stabilizer code can be equivalently regarded as a subsystem code whose gauge group is abelian, so stabilizer codes form a subset of subsystem codes.

For subsystem codes, we make a distinction between bare logical operations, which act trivially on the gauge qubits, and dressed logical operators, which may not. Formally, (non-trivial) bare logical operators are elements of 𝖢(𝒢)𝒢, where 𝖢(𝒢) denotes the centralizer of 𝒢, and (non-trivial) dressed logical operators are elements of 𝖢(𝒮)𝒢. Note that for stabilizer codes there is no distinction. The distance d of a subsystem code is defined as the minimum weight of a non-trivial dressed logical operator, i.e., d=minP𝖢(𝒢)𝒢|P|. We will sometime denote a subsystem code 𝒞 with n physical qubits, k logical qubits, distance d, and g gauge qubits by 𝒞=[[n,k,d,g]].

Commuting Projector Codes

A commuting projector code 𝒞()n is a subspace defined by a set of pairwise commuting projections {Π1,,Πm}. The code 𝒞 is the subspace of states left invariant by all projections Πi. Every stabilizer code is also a commuting projector code where the defining projections are of Pauli type, i.e., Πi=(𝖨+Pi)/2, for some Pauli operator Pi𝒫n. For the purposes of establishing our locality bounds, the only properties we need of commuting projector codes is the fact that all the properties of correctable sets for stabilizer codes, i.e., those listed in Lemma 11, continue to hold without modification for commuting projector codes [10]. Finally, we note that while stabilizer codes can be considered a subset of both subsystem and commuting projector codes, there is no direct relation between subsystem and commuting projector codes themselves.

Quantum codes in 𝑫 dimensions

Given a finite set S, an embedding of S into D is a map ι:SD such that ι(si)ι(sj)1 for all distinct si,sjS. The image ι(S) is then said to be an embedded set. Throughout, the embedding map will usually be implicit. We identify the qubits Q of a quantum code with a D-dimensional embedded set, which we continue to call QD by abuse of notation. By further abuse of notation, we refer to QD as the embedding of the qubits Q. When the set of qubits Q is understood, given a subset VQ, we write V¯=defQV to denote the complement of V in Q.

Definition 7 (Interactions).

Given an embedding QD of a quantum code C, either a commuting projector code or a subsystem code, interactions of the code are defined with respect to a specific set of generators for that code. In the case that C is a commuting projector code with defining projections {Π1,,Πm}, we say that a pair of qubits q,pQ define an interaction if p and q are both in the support of some projection Πi. Similarly, if C is a subsystem code with a set of generators {G1,,Gm} for its gauge group, we say that p,qQ define an interaction if p and q are both in the support of some gauge generator Gi. In both cases, the length of an interaction (p,q) is defined to be the 2 distance between p and q.

Interactions are always defined with respect to a particular set of generators (either projector or gauge), but throughout we assume that the generator set is fixed (but otherwise arbitrary), and thus the set of interactions is fixed as well. Note that for subsystem codes, interactions are always defined with respect to gauge generators and not stabilizer generators. In particular, since each stabilizer generator is generally a product of multiple gauge generators, it is possible for a subsystem code to have local gauge generators, but non-local stabilizer generators. Indeed, it is only in such cases that a separation in the locality bounds for stabilizer and subsystem codes is possible.

In the proofs of our results, we typically consider a fixed interaction length . We then refer to an interaction as bad if the length is at least and as good if the length is less than . Intuitively, good interactions are easier to deal with for our proof; they are effectively local, and can be treated in a similar to how local interactions are treated in the original proofs of the BPT and Bravyi bounds. To control the number of bad interactions, we introduce the following function that counts the number of bad interactions that a particular qubit participates in:

Definition 8 (Interaction counter).

Given a quantum code with a D-dimensional embedding QD, let f:D denote the interaction counting function, where f(q) for qQ equals the number of interactions of length at least that qubit q participates in, and f()=0 outside of Q.

Correctable sets

Like in previous works [2, 3, 1, 8], we analyze the limitations of quantum codes using correctable sets. Intuitively, a subset UQ of qubits is correctable if the code can correct the erasure of the qubits in U. We state the definition of a correctable set for completeness, though we only interface with the definition indirectly using Lemmas 11, 12, and 13.

Definition 9 (Correctable set).

Let UQ be a subset of qubits in a quantum code, and let U¯=Q\U. Let 𝒟[U¯] and 𝒟[Q] denote the space of density operators associated with the sets of qubits U¯ and Q respectively. The set U is correctable if there exists a recovery channel :𝒟[U¯]𝒟[Q] such that for any code state ρ, we have (TrU(ρ))=ρ.

For an embedded set of qubits QD, we will say that a region RD is correctable if the subset of all qubits contained in R is a correctable subset. As an abuse of terminology, we will often refer to subsets of qubits as regions. For stabilizer and commuting projector codes, a region being correctable is equivalent to having no non-trivial logical operators supported on that region. For subsystem codes, a region UQ is correctable if and only if no non-trivial dressed logical operators are supported on U. Note that U being correctable also implies that no non-trivial bare logical operators are supported on U, but the converse does not necessarily hold. This motivates the following definition.

Definition 10 (Dressed-Cleanable).

If there are no non-trivial bare logical operators supported on a region UQ, then we say that U is dressed-cleanable [15].

We use the following notions in Lemma 11 to reason about correctable sets in subsystem codes and commuting projector codes. In a quantum code with qubits Q, say sets U1,,UQ are decoupled if there are no interactions between two distinct Ui’s. For a set UQ, let U=+UU be the boundary of U, where +U denotes the outer boundary of U, the set of qubits outside U that have an interaction with U, and U=+U¯ is the inner boundary of U.

Lemma 11 ([7, 10, 15]).

Let Q be the qubits of a [[n,k,d]] commuting projector or subsystem code 𝒞.

  1. 1.

    Subset Closure: Let UQ be a correctable set. Then any subset WU is correctable.

  2. 2.

    Distance Property: Let UQ with |U|<d. Then U is correctable.

  3. 3.

    Union Lemma: Let U1,,U be decoupled, and let each Ui be correctable. If 𝒞 is a subsystem code, then i=1Ui is dressed-cleanable. If 𝒞 is a commuting projector code, then i=1Ui is correctable.

  4. 4.

    Expansion Lemma: Let U,TQ be correctable sets such that TU. Then TU is correctable.

A key point in Lemma 11 is that the union lemma differs for commuting projector and subsystem codes. For subsystem codes, the union of decoupled and correctable sets is not necessarily correctable – only dressed-cleanable [15]. In general, being dressed-cleanable is weaker than being correctable. One of the major problems with generalizing Theorem 3 from commuting projector codes to subsystem codes is that the union lemma for subsystem codes only allows the conclusion that the union of correctable sets is dressed-cleanable. This version of the union lemma is too weak to adapt the original proof of Theorem 3 to subsystem codes. Instead, we take an alternative approach in proving Theorem 4 which is based solely on the expansion lemma.

The usefulness of reasoning about correctable sets is that the sizes of the correctable sets in a quantum code directly give bounds on the parameters:

Lemma 12 (AB Lemma – Implicit in [5], Section VIII).

Suppose that the qubits Q of a [[n,k,d]] subsystem code can be partitioned as Q=AB. If A is dressed-cleanable, then k|B|.

Lemma 13 (ABC Lemma [6]).

Suppose that the qubits Q of a [[n,k,d]] commuting projector code can be partitioned as Q=ABC. If A and B are correctable, then k|C|.

2.2 Geometric Lemmas

In this section, we give two lemmas about D-dimensional embeddings of sets. The first, Lemma 14, allows us to generalize our results from lattice embeddings to arbitrary embeddings.

Lemma 14 (Point Density).

Let RD be a box with side lengths L1LD. Suppose QD is an embedded set. Then

|RQ|2Dvol(BD)i=1D(1+Li) (6)

where BD is the unit ball in D.

We refer the reader to [9] for the proof.

The second lemma, Lemma 15, utilizes the probabilistic method to generate a grid tiling that allows us to maintain a convenient distribution of the qubits and bad interactions in our embeddings (see Figure 3).

Lemma 15 (Tiling Lemma).

Let X,YD be two multi-sets. Let w and be positive integers with w4. There exists a tiling of D using hypercubes of side length w such that:

  1. 1.

    at most a (4D/w)2 fraction of points in X are within -distance 2 of a codimension-2 face of some hypercube,

  2. 2.

    at most a 8D/w fraction of points in Y are within -distance 2 of a codimension-1 face of any hypercube.

We refer the reader to [9] for the proof.

Figure 3: Tiling Lemma: for fixed sets of points X and Y and a random width-w grid tiling, we expect a O(2/w2) fraction of X to be within a O() of a grid codimension-2 face, and a O(/w) fraction of Y to be within O() of a codimension-1 face.

3 Proof of Theorem 4

We now prove Theorem 4, which covers the dk case of Theorem 2, our lower bound for subsystem codes. This also covers the dkn case of Theorem 3, our generalization of [8] to D-dimensions.

Theorem (Theorem 4, restated).

For all D2, there exist constants c0=c0(D)>0 and c1=c1(D)>0 such that the following is true: Any D-dimensional embedding of a nontrivial [[n,k,d]] subsystem or commuting projector code with dc1nD1D must have at least c0d interactions of length at least c0dnD1D.

As mentioned after the statement of Lemma 11, the Union Lemma for subsystem codes is substantially weaker than the corresponding result for commuting projector codes. Without the ability to conclude that the union of correctable sets remains correctable, we cannot directly generalize the techniques previously employed in the proofs of the generalized BPT bound, which required alternating applications of the expansion and union lemmas [2, 8]. This poses a challenge for subsystem codes since we only obtain a dressed-cleanable set after the union lemma, and there is no straightforward way to continue with the expansion lemma, which requires correctable sets.

In view of these challenges, we take an alternative approach to the proof of Theorem 4 by repeatedly – and exclusively – applying the expansion lemma to a carefully crafted subset of qubits in order to grow our correctable region. To do this, we grow our correctable region by sweeping across our set of qubits QD one dimension at a time, changing directions and moving into a new dimension whenever the expansion process in unable to continue in the previous dimensions. The brunt of the proof is showing that this process never gets stuck, and that we are eventually able to grow our correctable set without obstruction to encompass the entire set of qubits Q. In this way, we are able to bypass the usage of the union lemma altogether.

We point out that the usual way of doing this expansion [7, 6, 8] – starting with a d1/D××d1/D box and repeatedly adding the boundary – does not work for general D-dimensional embeddings. For general embeddings, the qubits may not be constrained to an O(n1/D)××O(n1/D) box, so, at some step, the uncontrolled expansion boundaries could contain more than d qubits, in which case we cannot apply the expansion lemma. For example, consider qubits embedded in 2-dimensions in a n2/3×n2/3 square, with Ω(n) qubits distributed within n1/3 of the box’s boundary, and the remainder randomly distributed in the square. If we expand a rectangle from anywhere inside the square, applications of the expansion lemma fail when we approach the boundary. The easiest D-dimensional embeddings to realize are ones on a lattice structure contained in a O(n1/D)××O(n1/D) box; our general statement shows that more creative embeddings like the one above cannot save on locality.

The general expansion process is quite involved in D-dimensions. We refer the reader to Appendix A for an extended exposition of the 2-dimensional case as an illustration of the basic idea of the proof, as well as the full proof in Ddimensions.

4 Proof of Theorem 5

We now prove Theorem 5, which covers the kd case of Theorem 2, our lower bound for subsystem codes.

Theorem (Theorem 5, restated).

For all D2, there exist constants c0=c0(D)>0 and c1=c1(D)>0 such that the following is true: Any D-dimensional embedding of a [[n,k,d]] subsystem code with kd1D1c1n must have at least c0k interactions of length at least c0(kd1D1n)D1D.

First, we state two lemmas that help us find large correctable sets in a D-dimensional embedding of a quantum code. The first is a generalization of the “holographic principle” for error correction in [5], which shows that the area, rather than the volume, governs the size of correctable sets. Recall that f(V) counts the number of interactions involving qubits in V with length at least (see Definition 8).

Lemma 16 (Holographic Principle).

Suppose we have a [[n,k,d]] quantum code (either commuting projector or subsystem) with an embedding QD, and suppose 18Dd1/D. Let VQ be the subset of qubits contained in a box with sides of length at most

w0=def(vol(BD)24D+1Dd)1D1. (7)

If f(V)d/10, then V is correctable.

We refer the reader to [9] for the formal proof.

If we divide D into cubes using Lemma 15, most cubes will be “good” in that they contain d long-ranged interactions (see footnote 5 of [8]). Lemma 16 then says that all the good cubes are correctable. How do we handle the cubes with large numbers of bad qubits? In [8], the solution was to further subdivide the bad cubes into sufficiently small rectangles, most of which then contains a sufficiently small number of bad qubits. The same strategy works in D-dimensions:

Lemma 17 (Subdivision).

Let w, and d1 be positive real numbers. Let f:D be a finitely supported function. Let R be a h×wD1 box, with h5 and f(R)d1. Then there exists a division of R by hyperplanes orthogonal to x1 into boxes R1,,Rm such that:

  1. 1.

    Each box has dimensions hi×wD1, with hi5.

  2. 2.

    Each Ri satisfies either (i) f(Ri)d1 or (ii) has hi10.

  3. 3.

    The number of boxes m is at most 2f(R)d1.

We refer the reader to [9] for the formal proof.

Finally, we collect a few inequalities that we will frequently use in the proof of Theorems 5 and 6.

Lemma 18.

Let

w0=(vol(BD)24D+1Dd)1D1,andc=vol(BD)1D400αD (8)

for some α1. Suppose that satisfies cd1D. Then we have

  1. 1.

    2Dvol(BD)(2w0)D1=d16D,

  2. 2.

    w0100αD,

  3. 3.

    w0190D(d)1D1.

We are now ready to prove Theorem 5.

Proof of Theorem 5.

We give a proof by contradiction, where we first assume that we have an embedding of a subsystem code with k logical qubits that has few long interactions, and then show that the code’s dimension must actually be less than k. With hindsight, choose c0=vol(BD)1D400D. Note that we have c01/(200D)1/400 for D2. Choose c1=(1/c0)DD1. Suppose we have a [[n,k,d]] subsystem code with a D-dimensional embedding QD satisfying kd1D1c1n. Let

=c0(kd1D1n)D1D, (9)

and note that we have 1c0d1D<18Dd1D, where the first upper bound follows from kn, and the lower bound from kd1D1c1n.

Now assume for the sake of contradiction that the embedding QD has at most c0k interactions of length . Call an interaction long if its length is at least and short otherwise. Call a qubit vQ bad if it participates in a long interaction and good otherwise. Then the function f(v) counts the number of long interactions that the qubit v participates in. By assumption, there are at most c0k long interactions, so the total number of bad qubits is at most vQf(v)2c0k. Now we construct a division of D into 𝒜 that outlines the partition of the qubits Q=AB. Let

w0=(vol(BD)24D+1Dd)1D1 (10)

as in Lemma 16. It follows from Lemma 18(2) that w0100D. Apply Lemma 15 with Y=Q (and with X arbitrary). This produces a tiling of D into cubes {Sm}mD of side length w0, where at most 8Dw0n qubits of Q are within distance 2 of some codimension-1 face of some cube. We call a cube Sm good if f(Sm)<d/10 and bad otherwise. Now apply Lemma 17, with d1=d/10, to decompose each bad cube Sm into boxes Rm,1,,Rm,nm. All boxes obtained in this way will also be called bad. This process results in a division of D into good cubes and bad boxes. It follows from Lemma 17 (item 3) that the total number of bad boxes is no more than

m:Smbad2f(Sm)d/10m2f(Sm)d/1020dmf(Sm)40dc0k<k10d. (11)

Now we define the division 𝒜 as follows:

  • is the set of all points within distance 2 of some codimension-1 face of either a good cube Sm or a bad box Rm,i.

  • 𝒜 is the set of points not in .

Note that we can perturb the tiling slightly in order to ensure that no qubits lie on the boundary of any subregion of 𝒜 or .

Having constructed the division, we will now construct a corresponding partition of qubits Q=AB such that A is dressed-cleanable and |B|<k. This will give us our desired contradiction from Lemma 12. We define the partition Q=AB as follows:

  • A is the set of all good qubits in region 𝒜.

  • B is the set of all remaining qubits. These are either good qubits in region or bad qubits.

It remains to check that A is dressed-cleanable and that |B|<k. We refer the reader to [9] for the formal proof.

5 Proof of Theorem 6

Figure 4: The division of the plane into regions 𝒜 (lined blue), (red and pink crosshatch), and 𝒞 (solid yellow) for the proof of Theorem 6. The region (pink crosshatch) is also indicated in the figure on the right. These regions inform our qubit division Q=ABC. We use this division in different ways for the cases kd and dk. When kd (left), we ignore , and also subdivide any bad squares into bad rectangles. When dk (right), there are no bad squares, but we need to explicitly consider the region .

We now prove Theorem 6, which, together with Theorem 4, yields Theorem 3, our generalization of the main result of [8] to case of D-dimensional embeddings.

Theorem (Theorem 6, restated).

For all D2, there exist constants c0=c0(D)>0 and c1=c1(D)>0 such that the following is true: Any D-dimensional embedding of a [[n,k,d]] commuting projector code with kd2D1c1n must have at least c0k interactions of length c0(kd2D1n)D12D.

Proof.

For dkn, the result follows from Theorem 4, so it suffices to consider the case where dkn. With hindsight, choose c0=vol(BD)1D800D2, and let c1=(1/c0)2DD1. Note that c01/(400D2)1/400. Suppose we have a [[n,k,d]] commuting projector code with a D-dimensional embedding QD satisfying kd2D1c1n. Let

=c0(kd2D1n)D12D. (12)

Note that we have 1c0d1D18Dd1D, where the lower bound follows from kd2D1c1n and the first upper bound from the kn.

Now assume for the sake of contradiction that the embedding QD has at most c0max(k,d) interactions of length . Call an interaction long if its length is at least and short otherwise. Call a qubit vQ bad if it participates in a long interaction and good otherwise. The function f(v) counts the number of long interactions that the qubit v participates in. By assumption, the total number of long interactions is at most c0max(k,d), so the total number of bad qubits is at most vQf(v)2c0max(k,d). We will construct a division of D into subsets 𝒜𝒞 that will inform the partition of the qubits Q=ABC. Let

w0=(vol(BD)24D+1Dd)1D1, (13)

as in Lemma 16. Note that it follows from Lemma 18 that w0200D2 and w0190D(d/)1D1.

Apply Lemma 15 with X=Q and with Y as the multiset where each qubit v appears with multiplicity f(v). This gives a partition of D into a set of cubes {Sm}mD of side length w0. By construction, at most 16D22w02n qubits of Q are within distance 2 of a codimension-2 face of some cube, and at most 8Dw02c0max(k,d) bad interactions involve a qubit within distance 2 of a codimension-1 face of some cube. We call a cube Sm good if f(Sm)<d/10 and bad otherwise. Now apply Lemma 17 to decompose each bad cube into boxes Rm,1,,Rm,nm. All boxes obtained by subdividing a bad cube will also be called bad. This process results in a division of D into good cubes and bad boxes. By Lemma 17 (item 3), the total number of bad boxes is no more than

m:Smbad2f(Sm)d/10m2f(Sm)d/1020dmf(Sm)40dc0max(k,d)<max(k,d)10d. (14)

Now we define the division 𝒜𝒞 as follows:

  • 𝒞 is the set of all points within distance 2 of some codimension-2 face of a good cube Sm or a bad box Rm,i.

  • is the set of all points not already in 𝒞 and within distance of some codimension-1 face of a good cube Sm or bad box Rm,i.

  • is the set of all points not already in 𝒞 and within distance 2 of some codimension-1 face of a good cube Sm.

  • 𝒜 is the set of points not in or 𝒞.

Note that we can perturb the tiling slightly in order to ensure that no qubits lie on the boundary of any subregion of 𝒜, , , or 𝒞.

Having defined the division of D, we will now construct our partition of qubits Q=ABC. A sketch of the high-level ideas are as follows: We aim to define our qubit partition with the goal of having A,B be correctable, and |C|<k. This will lead to the desired contradiction using Lemma 13. There are two cases to consider, depending on whether kd or kd. When kd, we have 2c0kk bad qubits, which can then be directly placed in C without affecting the requirement that |C|<k. When kd, we have 2c0dd bad qubits, and the set of all bad qubits is itself correctable. Our chosen division of D implies that very few bad qubits can interact with the qubits in , so the union lemma suggests that we can add almost all of the bad qubits to while preserving its correctability. We now continue with our proof, divided into the two cases kd and kd.

Case 1: 𝒌𝒅.

We define the partition of qubits Q=ABC as follows:

  • C is the set of qubits in region 𝒞, along with all bad qubits.

  • B is the set of all good qubits in region

  • A is the set of all good qubits in region 𝒜.

It’s clear that this is indeed a partition of Q. It remains to show that A,B are correctable, and that |C|<k. This gives us a contradiction with the fact that A and B are correctable through Lemma 13. We refer the reader to [9] for the formal proof.

Case 2: 𝒅𝒌.

From equation (13), the total number of bad boxes is at most max(k,d)/(10d)=1/10, which is less than 1. It follows that there are no bad boxes in this case, only good cubes. We define the partition of qubits Q=ABC in this case as follows:

  • C consists of the set of qubits in region 𝒞, together with all qubits participating in a long interaction with a qubit in (including the bad qubits in ).

  • B is the set of good qubits in region , together with the bad qubits not in C.

  • A is the set of good qubits in region 𝒜.

It’s clear that this is a partition of the qubits in Q. It remains to check that A,B are correctable and |C|<k. This gives us our desired contradiction using Lemma 13. We refer the reader to [9] for the formal proof.

We have obtained a contradiction in both the dk and dk cases, and this completes the proof of the theorem.

6 Construction for Upper Bounds

The bounds derived in Theorems 2 and 3 are tight in both the interaction count M and the interaction length . Tightness is shown by constructing explicit examples of embedded codes which saturate the interaction count or length. For the interaction count, it suffices to consider an asymptotically good quantum low-density parity-check (qLDPC) code [14, 12], which has O(M)=O(max(k,d)) interactions of any length. Since a stabilizer code can also be regarded as a subsystem code with zero gauge qubits, this shows that both Theorem 2 and 3 are tight in terms of interaction count. This is covered by Theorem 1.3 of [8].

We now describe constructions that show the interaction length is optimal in Theorem 2 and Theorem 3. In both cases, we construct a code that saturates the bound for interaction length by concatenating an asymptotically good qLDPC code with a geometrically local code which saturates the Bravyi and BPT bounds, respectively.

6.1 Subsystem codes

We start by showing the interaction length for subsystem codes (Theorem 2) is optimal. We will define a concatenated subsystem code composed of an asymptotically good qLDPC code, together with a subsystem code which is geometrically local in D-dimensions and saturates the Bravyi bound. For the local subsystem code, we employ the “wire code” construction of Baspin and Williamson [4].

Theorem 19 (Wire code [4]).

For all D2, there exists an ε>0 such that, for all positive integers n there exists a subsystsem code with parameters [[n,εnD1D,εnD1D]] that has a set of gauge generators that are O(1)-local in a D-dimensional embedding.

The concatenation procedure for subsystem codes is formally identical to the process for stabilizer codes. Namely, if 𝒞1=[[n1,k1]] and 𝒞2=[[n2,k2]] are subsystem codes, then their concatenation 𝒞2𝒞1 is defined using n2 blocks of the inner code 𝒮1 and k1 copies of the outer code 𝒞2. Let qij be the ith logical qubit of the jth 𝒮1 block. Then the concatenated code is defined by replacing the jth physical qubit of the ith 𝒞2 block with qij.

Lemma 20 (Concatenated Subsystem Codes).

Let 𝒞1=[[n1,k1,d1,g1]] and 𝒞2=[[n2,k2,d2,g2]] be two subsystem codes. Then there exists a subsystem code 𝒞=𝒞2𝒞1=[[n1n2,k1k2,dd1d2,k1g2+n2g1]], called the concatenation of 𝒞2 and 𝒞1

Theorems 19 and 20 together give the desired construction. We state the result below and refer the reader to [9] for the formal proof.

Theorem 21 (Optimality of Interaction Length for Subsystem Codes).

For all D2, there exists a constant c1=c1(D)>0 such that the following holds: for all n,k,d>0 with k,dn satisfying kd1D1c1n or dc1nD1D, there exists an [[n,k,d]] subsystem code with a D-dimensional embedding containing no interactions of length at least

=max(dnD1D,(kd1D1n)D1D). (15)

6.2 Commuting Projector Codes

We now show the interaction length in Theorem 3 is optimal. The construction is very similar to the one used in Theorem 1.3 of [8], except generalized to D-dimensions. In 2D, the surface code offers a simple and natural candidate for a geometrically local code that saturates the BPT bound. In higher dimensions, we instead use the family of “subdivided codes” constructed by Lin, Wills and Hsieh [13].

Theorem 22 (Subdivided code [13]).

For all D2, there exists an ε>0 such that, for all positive integers n there exists a stabilizer code with parameters [[n,εnD2D,εnD1D]] that has a set of stabilizer generators that are O(1)-local in a D-dimensional embedding.

The optimality of the interaction length follows by concatenating a good qLDPC code with the subdivided code. We refer the reader to [9] for the formal proof.

Theorem 23 (Optimality of Interaction Length for Stabilizer Codes).

For all D2, there exists a constant c1=c1(D)>0 such that the following holds: for all n,k,d>0 with k,dn satisfying either kd2D1c1n or dc1nD1D, there exists a [[n,k,d]] quantum stabilizer code with a D-dimensional embedding containing no interactions of length at least

=max(dnD1D,(kd2D1n)D12D). (16)

References

  • [1] Nouédyn Baspin, Venkatesan Guruswami, Anirudh Krishna, and Ray Li. Improved rate-distance trade-offs for quantum codes with restricted connectivity. Quantum Science and Technology, 10(1):015021, 2024.
  • [2] Nouédyn Baspin and Anirudh Krishna. Connectivity constrains quantum codes. Quantum, 6:711, 2022.
  • [3] Nouédyn Baspin and Anirudh Krishna. Quantifying nonlocality: How outperforming local quantum codes is expensive. Physical Review Letters, 129(5):050505, 2022.
  • [4] Nouédyn Baspin and Dominic Williamson. Wire codes. arXiv preprint arXiv:2410.10194, 2024.
  • [5] Sergey Bravyi. Subsystem codes with spatially local generators. Physical Review A, 83(1), January 2011. doi:10.1103/physreva.83.012320.
  • [6] Sergey Bravyi, David Poulin, and Barbara Terhal. Tradeoffs for reliable quantum information storage in 2D systems. Physical Review Letters, 104(5):050503, 2010. doi:10.1103/PhysRevLett.104.050503.
  • [7] Sergey Bravyi and Barbara Terhal. A no-go theorem for a two-dimensional self-correcting quantum memory based on stabilizer codes. New Journal of Physics, 11(4):043029, 2009. doi:10.1088/1367-2630/11/4/043029.
  • [8] Samuel Dai and Ray Li. Locality vs quantum codes. In Proceedings of the 57th Annual ACM Symposium on Theory of Computing, pages 677–688, 2025.
  • [9] Samuel Dai, Ray Li, and Eugene Tang. Optimal locality and parameter tradeoffs for subsystem codes. arXiv preprint arXiv:2503.22651, 2025.
  • [10] Jeongwan Haah and John Preskill. Logical-operator tradeoff for local quantum codes. Physical Review A, 86(3), September 2012. doi:10.1103/physreva.86.032308.
  • [11] Yifan Hong, Matteo Marinelli, Adam M Kaufman, and Andrew Lucas. Long-range-enhanced surface codes. Physical Review A, 110(2):022607, 2024.
  • [12] Anthony Leverrier and Gilles Zémor. Quantum tanner codes. In 2022 IEEE 63rd Annual Symposium on Foundations of Computer Science (FOCS), pages 872–883. IEEE, 2022.
  • [13] Xingjian Li, Ting-Chun Lin, and Min-Hsiu Hsieh. Transform arbitrary good quantum ldpc codes into good geometrically local codes in any dimension. arXiv preprint arXiv:2408.01769, 2024.
  • [14] Pavel Panteleev and Gleb Kalachev. Asymptotically good quantum and locally testable classical ldpc codes. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing, pages 375–388, 2022.
  • [15] Fernando Pastawski and Beni Yoshida. Fault-tolerant logical gates in quantum error-correcting codes. Physical Review A, 91(1), January 2015. doi:10.1103/physreva.91.012305.

Appendix A Proof of Theorem 4

In this appendix, we first give a detailed sketch of the proof of Theorem 4 for the case of 2-dimensional embeddings. This is meant as a simplified illustration of the proof idea in the general D-dimensional case, which may be difficult to visualize. We then give the full proof in D-dimensions.

A.1 Detailed Sketch of Theorem 4 in 𝟐-dimensions

Let Q be a 2-dimensional embedding of a subsystem code 𝒞=[[n,k,d]] satisfying d32n. Without loss of generality, we may assume that all of our qubits are contained in the interior of a large square [,A]×[,A], for some integer A. We remove a border of width so that we do not have to worry about edge cases later in our proof. Suppose for the sake of contradiction that there exists at most d/4 interactions of length at least =d32n. Note that our choice of code parameters ensures that we have 1n/32. We will call any qubit participating in a length interaction a bad qubit. Let B be the set of all bad qubits. Then by assumption, |B|d/2. Given any region R2, we will say that R is correctable if and only if QR is correctable.

The basic idea of the proof is as follows. We wish to show that, given our assumption on the number of long interactions, a small correctable region can be iteratively grown without bound using the expansion lemma. Eventually the correctable region will encompass the entire set of qubits Q, which is a contradiction with our initial assumption that the code is non-trivial. We do this by first expanding along the x1-direction, and then switching to the x2-direction whenever we are unable to continue in the x1-direction. The details for the two cases are given below.

A.1.1 Expansion in the 𝒙𝟏-direction

Let us imagine starting with a region of the form of a vertical strip V[a1]=[0,a1]×, for some a1>0. If a1<, then V[a1] contains no qubits by assumption, so it is vacuously correctable. Now, given an existing correctable region of the form V[a1], we wish to apply the expansion lemma to obtain a larger correctable set of the form V[a1+]. This will be possible provided that the number of qubits in the boundary of V[a1] is sufficiently small so that the boundary set itself is correctable. We will formalize this requirement by saying that a number a1 is “good” if the density of qubits around the line x=a1 is low. Formally, a1 is a good x1-coordinate if the set [ai,a1+]× contains at most n qubits, and bad otherwise.

The boundary of V[a1] consists of all qubits within a distance of the line x=a1, together with a subset of the bad qubits. Therefore the boundary is a subset of B[a1,a1+]×. If a1 is good, then by definition this subset contains at most

d/2+n=d/2+d/32<d (17)

qubits, and is hence correctable. It follows by expansion and subset closure that if V[a1] is correctable and a1 is good, then V[a1+]V[a1]V[a1] is also correctable. This gives us an easy way to grow the sets V[a1]. However, this process cannot continue indefinitely, since there is no guarantee at each step that the new coordinate a1+ is good. When a1+ is a bad coordinate, our expansion process gets stuck. To get unstuck, we will fill in the stretch around the bad coordinate a1+ by expanding in the x2-direction. After this gap containing bad x1-coordinates has been filled, we can continue expanding in the x1-direction until we reach our next obstacle.

A.1.2 Stuck in the 𝒙𝟏-direction, expand along the 𝒙𝟐-direction

Now we formalize the process of expanding in the x2 direction. Given a bad coordinate a1, we will define Next(a1) to be the “next available” good coordinate. More precisely, we define

Next(a1)=infG>a1+γ, (18)

where G>a1 is the set of all good coordinates larger than a1, and γ>0 is a sufficiently small value so that we actually have Next(a1)G>a1.222The small constant γ is necessary since the set of good coordinates is an open set, and as such does not contain its own infimum. A bit of thought reveals that it is sufficient to take γ smaller than the minimum element of qq{|q1q1|,||q1q1|2|}, where q1,q1 denote the x1-coordinates of qubits q,qQ. Given a set V[a1] where a1 is good but a1+ is bad, let us define V[a1,a2] to be

V[a1,a2]=V[a1]([a1,Next(a1+)]×[0,a2])=([0,a1]×)([a1,Next(a1+)]×[0,a2]). (19)

We will call sets V[a1,a2] defined this way legal sets. Our goal is to show that given a correctable legal set V[a1,a2], we can always apply expansion in the x2-direction to obtain a new correctable legal set V[a1,a2+].

The key observation now is that the additional block [a1,Next(a1+)]×[0,a2] in V[a1,a2] must be thin in the x1-direction. Indeed, the entire interval [a1+,Next(a1+)γ] consists of bad coordinates. Any strip of width 2 centered around a bad coordinate contains at least n qubits, and since we only have a total of n qubits, the set [a1+,Next(a1+)γ]× can fit at most n/ such strips inside. It follows that we have

Next(a1+)γa1<2n+2, (20)

which implies

Next(a1+)a1<2n+4. (21)

Now, consider the boundary of a correctable legal set V[a1,a2]. This will be a subset of

B [a1,a1+]×S1
[Next(a1+),Next(a1+)+]×S2
[a1,Next(a1+)]×[a2,a2+]S3. (22)

Since a1 and Next(a1+) are good coordinates, we have

|QS1|+|QS2|2n (23)

by assumption. By Lemma 14, the number of qubits in the subset S3 is bounded above by

|QS3|4π(2+1)(2n+4+1)9n. (24)

Therefore the boundary of V[a1,a2] contains at most

|B|+|QS1|+|QS2|+|QS3|d2+11n=2732d<d (25)

qubits, and is hence correctable. It follows by expansion and subset closure that if V[a1,a2] is a correctable legal set, then V[a1,a2+] is again a correctable legal set. We can therefore continue expanding in the x2-direction until we reach V[a1,A]=V[Next(a1+)]. This is a vertical strip with a good boundary coordinate Next(a1+). We can therefore return to the previous case and proceed to expand along the x1-direction again. This process can now continue indefinitely, alternating between the x1 and x2-directions whenever we get stuck again. In this way, starting from an initial correctable set, say the vacuously correctable region V[/2], we can iteratively grow our correctable region without bound to encompass the entire set of qubits Q. Thus we arrive at our desired contradiction.

Figure 5: Sketch of the expansion process in 2 dimensions. The blue region is V[a1] and the pink region is [a1,Next(a1+)]×[0,a2]. The crosshatched region (labeled F in the proof of Theorem 4) contains the boundary of V[a1,a2].

A.2 Proof of Theorem 4 in 𝑫-dimensions

For notational convenience, we grow the correctable region from low coordinates to high coordinates for this proof. For a set S, we write SD=SS2SD.

Proof.

With hindsight, set c1=2(6DD/vol(BD))D/(D1). Suppose n,k,d are code parameters with dc1nD1D. With hindsight, choose

=vol(BD)6DDn(D1)/Dd, (26)

so that 1<<n1/D4DD. Let Q be a D-dimensional embedding of a [[n,k,d]] subsystem code 𝒞 with dk, and suppose there are at most d/4 interactions of length at least .

Let B denote the set of qubits participating in long range interactions, so that |B|d/2. Without loss of generality, we may assume all the qubits are in the box [,A]D for some large integer A. Choose a sufficiently small constant γ>0. With hindsight, γ less than the minimum nonzero element of i[D],qq{|qiqi|,||qiqi|2|} suffices.

For i=1,,D1, call real number xi i-good if i1×[xi,xi+]×Di has at most n(D1)/D qubits and i-bad otherwise. By convention, we will consider every real number to be i-good when i=D. An i-bad number represents an i-th-coordinate-value where we would “get stuck” and need to start expanding in a different direction.

For i=1,,D1 and an i-bad real number x, let Nexti(x) be the maximum value such that all values in the interval [x,Nexti(x)γ] are i-bad (Nexti(x) is undefined if x is i-good). Note, as γ is sufficiently small, that Nexti(x) is always i-good when it is defined.

For a1,,ai, with iD, let

V[a1,,ai] =[0,a1]×D1
[a1,Next1(a1+)]×[0,a2]×D2
[a1,Next1(a1+)]×[a2,Next2(a2+)]×[0,a3]×D3
[a1,Next1(a1+)]××[ai1,Nexti1(ai1+)]×[0,ai]×Di. (27)

Call such a set V[a1,a2,,ai] legal if (i) aj is j-good for all j{1,,i} and (ii) aj+ is j-bad for j{1,,i1}. We grow a large correctable set of the above form using the following four properties:

  1. 1.

    (If possible, expand in ith dimension): If iD, the set V[a1,,ai] is correctable and legal, and V[a1,,ai1,ai+] is legal, then V[a1,,ai1,ai+] is correctable.

    We apply the expansion lemma. Note that the boundary is a subset of

    F =defB
    ([a1,a1+]×D1)
    ([Next1(a1+),Next1(a1+)+]×D1)
    (i2×[ai1,ai1+]×Di+1)
    (i2×[Nexti1(ai1+),Nexti1(ai1+)+]×Di+1)
    (i1×[ai,ai+]×Di). (28)

    Since V[a1,,ai] is legal, the values aj and Next(aj+) are j-good for j{1,,i} and j{1,,i1}, respectively. By definition of i-good, each set in the above union, other than B, has at most n(D1)/D qubits. Thus, F has at most d/2+(2D1)n1/D<d qubits, so F is correctable. It follows that V[a1,,ai]F is correctable, and by Subset Closure, V[a1,,ai1,ai+] is correctable.

  2. 2.

    (Stuck in i-th dimension, start in (i+1)-th-dimension): If V[a1,a2,,ai] is correctable and legal, and V[a1,,ai1,ai+] is not legal, then V[a1,,ai,0] is correctable and legal.

    The set V[a1,,ai,0] is correctable by definition as V[a1,,ai,0]=V[a1,,ai]. It is legal also by definition, as we assume ai is i-good but ai+ is i-bad, and 0 is trivially (i+1)-good.

  3. 3.

    (Expand in D-th dimension): If V[a1,a2,,aD] is correctable and legal, then V[a1,,aD1,aD+] is correctable and legal.

    It is legal as every real number is D-good by definition. For correctable, we again use the expansion lemma. Following part 1, the boundary is a subset of

    F =defB
    ([a1,a1+]×D1)
    ([Next1(a1+),Next1(a1+)+]×D1)
    (D2×[aD1,aD1+]×)
    (D2×[NextD1(aD1+),NextD1(aD1+)+]×)
    [a1,Next1(a1+)]××[aD1,NextD1(aD1+)]×[aD,aD+]. (29)

    As in part 1, we have |B|d/2, and all but the last set in the union above has size at most n(D1)/D. We now bound the size of the last set in F. Since [aj+,Nextj(aj+)γ] is j-bad for all j, a counting argument yields

    Nextj(aj+)(aj+)2n1/D+2. (30)

    To see this, pack strips of width 2 in the jth dimension into j1×[aj+,Nextj(aj+)]×Dj. Each strip has at least n1/D qubits by definition of being j-bad. There are at most n qubits, so there are at most n/(n(D1)/D) packed strips, so the total width satisfies

    Nextj(aj+)(aj+)2nn(D1)/D+2=2n1/D+2. (31)

    We conclude Nextj(aj+)aj2n1/D+3. Hence, the last box has at most

    (2n1/D+3+1)D1(2+1)<6Dvol(BD)n(D1)/D (32)

    qubits inside by Lemma 14. The total boundary thus has at most

    d2+(2D2)n(D1)/D+6Dvol(BD)n(D1)/D<d (33)

    qubits. It follows that F is correctable, so V[a1,,aD]F is correctable, and by Subset Closure, V[a1,,aD1,aD+] is correctable.

  4. 4.

    (Finish (i+1)-th-dimension, get unstuck in i-th dimension): If V[a1,,ai+1] is correctable and legal, and Aai+1<A, then V[a1,,ai1,Nexti(ai+)] is correctable.

    The set is correctable because V[a1,,ai1,Nexti(ai+)] equals V[a1,,ai,], which equals V[a1,,ai+1]. It is legal because Nexti(ai) is not j-bad by definition of Nexti.

We can repeatedly apply these properties to get that the set of all qubits is correctable by induction. Here are the details. Let t1,t2,, be the enumeration of the Atot=(A+1)+(A+1)2++(A+1)D tuples in {0,1,2,,A}D, in lexicographical order. Define the lexicographical index of a region V[a1,,ai] as the largest α such that tα is lexicographically less than or equal to (a1,,ai)D. We prove by induction that, for all rAtot, there exists a correctable and legal set with lexicographical index at least r. For the base case, V[0]= is clearly correctable and legal. For the induction step, suppose we have a correctable and legal set V[a1,,ai] with lexicographical index r. The above items shows that we can find a region with strictly larger lexicographical index: If aiA, either i=1, in which case we are done, or i2 and we apply item 4 – the lexicographical index increases because Nexti(ai+)ai1. Otherwise, if i=D, we apply item 3. Otherwise, if V[a1,,ai+] is legal, we apply item 1, and if not, we apply item 2. This completes the induction.

Since the entire set of qubits Q is correctable, an application of the AB Lemma (12) with A=Q and B= implies that k=0. This contradicts our assumption that the code is nontrivial.