# No Strings Attached: Boundaries and Defects in the Cubic Code

Cory T. Aitchison<EMAIL_ADDRESS>Centre for Engineered Quantum
Systems, School of Physics, University of Sydney, Sydney, NSW 2006, Australia
Daniel Bulmash  Department of Physics and Center for Theory of Quantum Matter,
University of Colorado Boulder, Boulder, Colorado 80309, USA  Arpit Dua
Department of Physics, California Institute of Technology, Pasadena, CA 91125,
USA  Institute for Quantum Information and Matter, California Institute of
Technology, Pasadena, California 91125, USA  Andrew C. Doherty  Centre for
Engineered Quantum Systems, School of Physics, University of Sydney, Sydney,
NSW 2006, Australia  Dominic J. Williamson  Centre for Engineered Quantum
Systems, School of Physics, University of Sydney, Sydney, NSW 2006, Australia

(July 31, 2023)

###### Abstract

Haah’s cubic code is the prototypical type-II fracton topological order. It
instantiates the no string-like operator property that underlies the favorable
scaling of its code distance and logical energy barrier. Previously, the cubic
code was only explored in translation-invariant systems on infinite and
periodic lattices. In these settings, the code distance scales superlinearly
with the linear system size, while the number of logical qubits within the
degenerate ground space exhibits a complicated functional dependence that
undergoes large fluctuations within a linear envelope. Here, we extend the
cubic code to systems with open boundary conditions and crystal lattice
defects. We characterize the condensation of topological excitations in the
vicinity of these boundaries and defects, finding that their inclusion can
introduce local string-like operators and enhance the mobility of otherwise
fractonic excitations. Despite this, we use these boundaries and defects to
define new encodings where the number of logical qubits scales linearly
without fluctuations, and the code distance scales superlinearly, with the
linear system size. These include a subsystem encoding with open boundary
conditions and a subspace encoding using lattice defects.

###### Contents

  1. I Introduction
    1. I.1 Summary of Results
    2. I.2 Outline of Paper
  2. II Background
    1. II.1 Review of Quantum Error-Correcting Codes
    2. II.2 The Cubic Code
      1. II.2.1  Lattice Symmetries
      2. II.2.2 Encoding Properties
      3. II.2.3 Fracton Mobility
    3. II.3 Numerical Methods
  3. III Boundaries
    1. III.1 Semi-Infinite Boundaries
      1. III.1.1 Boundary Excitations
      2. III.1.2 Periodic Behavior
      3. III.1.3 Translational-Symmetry Violations
    2. III.2 Boundary Seams
  4. IV Superlinear-Distance Boundary Codes
    1. IV.1 Tennis Ball 1
    2. IV.2 Subsystem Codes
  5. V Defects
    1. V.1 Vacancies
    2. V.2 Edge Dislocations
    3. V.3 Screw Dislocations
  6. VI Superlinear-Distance Defect Codes
    1. VI.1 Vacancy Encodings
    2. VI.2 Edge Dislocation Encodings
  7. VII Conclusion
  8. A  Additional Boundary Codes
    1. A.1 Simple Cases
    2. A.2 Tennis Ball 2
    3. A.3 Tube
    4. A.4 Periodic Boundaries
  9. B  Additional Defect Codes
    1. B.1 Additional Vacancy Encodings
    2. B.2 Additional Edge Dislocation Encodings
    3. B.3 Screw Dislocation Encodings
  10. C Additional Material
    1. C.1 Proof of Eq. (9)
    2. C.2 Color Code Correspondence
    3. C.3 Code Availability

##  I Introduction

Quantum computers are required to operate effectively in the presence of
errors and noisy operations [1, 2, 3, 4]. A primitive component of a quantum
computer is the quantum hard drive: a system capable of safely storing quantum
information for long periods of time. In comparison to leading approaches such
as the surface code [5, 6], which require _active_ procedures to continually
detect and correct for errors [7], such a hard drive should be _passively_
self-correcting. To this end, one can envision a system where quantum
information is encoded in an energetic ground state and errors that corrupt
this information are suppressed by macroscopic energy barriers [8].
Unfortunately, this behavior is impossible to achieve in many cases - such as
the surface code - due to no-go theorems that prohibit self-correction in
$(2+1)$D systems [9, 10, 11, 12, 13, 14, 15, 8].

Fortunately, these theorems do not apply to higher spatial dimensions. Already
in $(3+1)$D there are topological codes with no _string-like logical
operators_ that have significantly better energy barriers than any $(2+1)$D
code [16, 17]. The earliest such example is Haah’s _cubic code_ , which was
found via a computational search [16]. The cubic code model is part of a
larger classification of unconventional topological phases of matter, known as
_fracton topological orders_ [18, 19, 16, 20, 21, 17, 22, 23, 24, 25]. In this
classification, topological codes with no string-like operators are called
type-II fracton phases [24]. As a type-II fracton phase, the cubic code only
supports topological excitations that are completely immobile [16]. When used
as an error-correcting code, this immobility results in a code distance that
scales superlinearly with the linear system size i.e.,
$d\sim\mathcal{O}(L^{\alpha})$ for $\alpha>1$, where $L$ is the number of
lattice sites along one axis. Moreover, the minimum energy required to map
between degenerate ground states via local operations - also known as the
energy barrier - scales as $\mathcal{O}(\log(L))$ [26]. This energy barrier
enables the cubic code to be partially self-correcting: its quantum memory
time increases with the system size only up to a finite threshold that
decreases with temperature [26]. For comparison, the surface code in $(2+1)$D
has a memory time independent of system size. This property makes the cubic
code a leading candidate for creating a quantum hard drive in $(3+1)$D.

There are, however, additional features of the cubic code that are undesirable
for applications to quantum error correction (QEC). The number of encoded
qubits, $k$, varies sporadically with the system size [17] (see Fig. 3). In an
actual implementation, achieving a large $k$, therefore, requires the system
to be from a family of carefully chosen system sizes that have large jumps
between them. Moreover, the model was formulated in a translation-invariant
setting with periodic boundary conditions, arranging the physical qubits on a
$3$-torus. This topology is not feasible in a strictly local architecture.

Since the discovery of the cubic code, there has not yet been an examination
into how the model’s topology or geometry may be modified, and how these
modifications may affect its core characteristics, such as its no-string
property or fracton topological order. A significant question is whether open
boundary conditions or the inclusion of lattice defects affect the error-
correcting properties of the code, either by improving or worsening them. In
other codes, including such modifications has the potential to increase the
number of encoded qubits or enable additional fault-tolerant quantum gates [6,
27, 28, 29]. However, in our setting, open boundary conditions and defects
have the potential to introduce string-like operators and reduce the energy
barrier for logical errors.

In this work, we characterize the properties of boundaries and defects in the
cubic code, including their interactions with quasiparticle excitations. We
investigate whether modifying the cubic code by introducing boundaries and
defects can affect the scaling of the number of qubits while maintaining the
superlinear code distance and favorable energy barrier of the periodic model.
We approach this with a combination of analytic arguments, visualizations, and
numerical computations. For the latter, we simulate lattices with up to
approximately $20^{3}$ qubits, and assume a consistent extrapolation for
larger systems.

###  I.1 Summary of Results

Diagram | Notation | Name | Encoded Qubits ($k$) | Logical Weight
---|---|---|---|---
| $(eee;eee)$ | Only $e$ | $0$ | -
| $(eee;mee)$ | One $(m)$ | $0$ | -
| $(mee;eee)$ | One $(m_{ABC})$ | $0$ | -
| $(eee;mem)$ | Two $(m)$ | $2\min\\{L_{x},L_{z}\\}-6$ |  Constant, Superlinear
| $(mem;eee)$ | Two $(m_{ABC})$ | $0$ | -
| $(mee;eme)$ |  $(m)$ & $(m_{ABC})$ | $0$ | -
| $(mem;mee)$ | _Tennis ball 1_ | $2L_{z}$ | Linear, Superlinear
| $(mee;mem)$ | _Tennis ball 2_ | $2L_{z}-6$ |  Constant, Superlinear
|  $(mee;mee)$ | _Tube_ | $2(L_{y}+L_{z}-L_{x})-3$ |  Constant, Linear, Superlinear
| $(mmm;eee)$ | _Half-half 1_ | $0$ | -
| $(eee;mmm)$ | _Half-half 2_ | $4\min\\{L_{x},L_{y},L_{z}\\}-12$ |  Constant, Superlinear
| - | _Triangular_ | $\begin{aligned} 4L-&4\\\ \text{\small$(L=L_{x}=$}&\text{\small$L_{y}=L_{z})$}\end{aligned}$ | Linear, Superlinear
Table 1: Summary of the properties for codes with open boundaries on a lattice
with linear system size $(L_{x},L_{y},L_{z})$, showing the positive faces on
the left and the negative faces on the right diagram. Red and dark red (blue
and light blue) indicate $X$ ($Z$) stabilizers. Vertex stabilizers are implied
when three edges of the same color meet. The half-length edges at the vertices
of the _triangular_ configuration have vertex stabilizers but no edge
stabilizers. The notation column corresponds to the
$(xyz;\bar{x}\bar{y}\bar{z})$ faces of the lattice, where $p$ indicates a
periodic boundary and $e$ and $m$ are open boundaries that interact with $e$
and $m$ excitations respectively. The final column identifies the presence of
at least one logical operator ($\bar{X}$ or $\bar{Z}$) with a minimum weight
that scales with the indicated function of $L_{x},L_{y},$ and/or $L_{z}$.

In this paper, we consider the construction of $X$\- or $Z$-type open
boundaries normal to a crystallographic axis. These boundaries are gapped
using _plaquette_ stabilizers formed from truncated bulk $X$ and $Z$ cube
stabilizers respectively. Both cases exhibit two topologically distinct
interactions with the fractonic excitations: $X$-type boundaries on the
negative-oriented faces of the lattice (and $Z$-type on the positive faces)
condense single fractons. Conversely, $X$-type positive faces (and $Z$-type
negative faces) cause their corresponding fractons to gain a $(2+1)$D mobility
within diagonal subsystems along the surface. These boundary layers have a
direct correspondence to the 6-6-6 color code [30].

Our results demonstrate that the no-string property of the closed cubic code
model is not readily retained in the presence of open boundary conditions.
Because of this, it is nontrivial to construct QEC codes with open boundary
conditions that have the desired superlinear code distance. Table 1 summarizes
the different configurations of open boundary conditions considered in this
paper; none contain only logical operators with superlinear weight. Notably,
however, the scaling of $k$ in all nontrivial cases is now a simple function
of the linear system size $L$ that does not exhibit large fluctuations.

It is nevertheless possible to create a cubic code with open boundary
conditions that has a superlinear distance. For this, we use the _tennis ball
1_ configuration from Table 1. In the corresponding code, logical $\bar{X}$
and $\bar{Z}$ operators stretch between two boundaries in the $\hat{x}$ and
$\hat{y}$ lattice directions respectively. There exist logical $\bar{X}$
operators supported solely near the $+\hat{z}$ face, and $\bar{Z}$ operators
near the $-\hat{z}$ face, that have linear weights. However, those further in
the bulk have weight superlinear in $L$. A subsystem code [31, 32] can be used
to gauge out the logical qubits with either an $\bar{X}$ or $\bar{Z}$ that can
be supported near a boundary face - thus producing a code with superlinear
distance.

Alternatively, with boundary conditions that are periodic in the $\hat{z}$
direction only, we are able to construct stabilizer codes with simple linear
scaling of $k$ and a superlinear code distance without resorting to subsystem
codes. This result, along with other periodic boundary condition codes, is
summarized in Table 2.

In addition to open boundary conditions, we study the inclusion of crystal
lattice defects including vacancies, edge dislocations, and screw
dislocations. Similar to the open boundaries, we focus on configurations that
are aligned with the crystallographic axes. While modified stabilizer terms
are provided for vacancies and edge dislocations, screw dislocations do not
admit additional deformed stabilizers. We explore how condensation of fractons
on defects affects the fracton mobility in the vicinity of these features. We
propose several encodings using defects; configurations such as a pair of edge
dislocations or multiple vacancies wrapped around a periodic boundary can form
stabilizer code families with superlinear distances and a simple linear
scaling of $k$. These results are discussed in detail in Section VI.

To the best of our knowledge, this work constitutes the first exploration of
boundaries and defects in a type-II fracton topological order. Our results
demonstrate that introducing defects and boundaries into the cubic code leads
to encodings with new features that could prove advantageous over encodings
based on periodic boundary conditions. This includes encodings with a number
of logical qubits that scales linearly with the linear system size, without
fluctuations. This work is a first step towards a general theory of
translation symmetry enrichment in type-II fracton topological orders.

Notation | Encoded Qubits ($k$) | Code Distance
---|---|---
$(ppp;ppp)$ | Eq. (6) | Superlinear
$(ppe;ppe)$ | $\frac{1}{2}k_{(ppp;ppp)}+2\tau(L;\;\infty)$ | Linear
$(ppm;ppe)$ | $4\min\\{\tau(L_{x};\;L_{z}),\,\tau(L_{y};\;L_{z})\\}$ | Linear
$(ppe;ppm)$ | 0 | -
$(pmm;pem)$ | $2\tau(L_{x};\;L_{z})$ | Linear
$(pem;pem)$ | $2L_{x}$ | Superlinear∗
$(pem;pme)$ | 0 | -
$(pem;pmm)$ | 0 | -
$(pmm;pmm)$ | 0 | -
$(pmm;pee)$ | 0 | -
$(pee;pmm)$ | 0 | -
Table 2: Summary of the properties for boundary codes on a lattice with linear
system size $(L_{x},L_{y},L_{z})$, where some direction is periodic. In cases
where the behavior of anisotropic systems is unclear, we take
$L_{x}=L_{y}=L_{z}\equiv L$. The notation column corresponds to the
$(xyz;\bar{x}\bar{y}\bar{z})$ faces of the lattice, where $p$ indicates a
periodic boundary and $e$ and $m$ are open boundaries that interact with $e$
and $m$ excitations respectively. $\tau(L_{1};\;L_{2})$ is a fractal-like
function defined in Section III.1.2 that encapsulates the number of string-
like operators that can form logical operators by wrapping around a periodic
boundary. $\,{}^{*}$Superlinearity is only ensured when
$3\\!\nmid\\!\\!L_{x}$, otherwise there are linear-weight operators.

###  I.2 Outline of Paper

This paper is organized as follows: In Section II we present background on
quantum error-correcting codes and outline the key properties of the cubic
code. In Section III we characterize the open boundary conditions of the cubic
code. In Section IV we discuss constructions of superlinear-distance codes. In
Section V we characterize the inclusion of defects - vacancies, edge
dislocations, and screw dislocations. In Section VI we discuss the use of
defects to construct superlinear-distance codes. In Section VII we present our
conclusions. The appendices include a discussion of further open and periodic
boundary codes (Appendix A) and defect codes (Appendix B) considered in this
study. A summary of all the potential boundary encodings is provided in Tables
1 and 2.

##  II Background

We begin with a brief review of quantum error-correcting codes and self-
correcting quantum memories, before discussing the cubic code in particular.

###  II.1 Review of Quantum Error-Correcting Codes

A quantum error-correcting (QEC) code is a scheme to encode one or more
quantum states within a higher-dimensional Hilbert space in order to provide
the ability to detect and correct a class of errors. Arbitrary errors are
generated by the algebra of single-qubit Pauli errors, spanned by the Pauli
$X$ and $Z$ operators

$X:=\begin{pmatrix}0&1\\\ 1&0\end{pmatrix},\qquad Z:=\begin{pmatrix}1&0\\\
0&-1\end{pmatrix},$ (1)

written in the computational basis $\\{\ket{0},\ket{1}\\}$ corresponding to
the two states of a physical qubit. One approach for constructing QEC codes is
to employ the _stabilizer formalism_ [33, 34]: Consider a system of $n$
physical qubits. We select a commuting collection of (tensor) products of
Pauli operators and consider the stabilizer group $\mathcal{S}$ that they
generate. We require that $-I\notin\mathcal{S}$, where $I$ is the identity
operator. Quantum information is then encoded in the eigenvectors of the
degenerate $+1$-eigenspace common to all elements of $\mathcal{S}$. That is,
any physical measurement of the encoded state using $S_{i}\in\mathcal{S}$
returns a $+1$ value. Importantly, single-qubit $X$ and $Z$ operators anti-
commute with some $S_{i}$, thus mapping any encoded state out of the
$+1$-eigenspace and producing a change in the measurement outcomes. This can
be detected and corrected with appropriate QEC codes.

For a system with $s$ independent stabilizer generators and $n$ physical
qubits, the degeneracy of the $+1$-eigenspace is $2^{n-s}$. Equivalently, the
number of encoded _logical qubits_ that are protected from errors is $k=n-s$.

An effective QEC code should have a large number of encoded qubits but also
should make it difficult for errors to affect the encoded information. A
logical operator, denoted as $\bar{X}$ or $\bar{Z}$, is an operator that
commutes with all stabilizers, yet is not itself in the stabilizer group. In
this way, logical operators act on the encoded states within the
$+1$-subspace, changing the state of the logical qubit while not being
detectable using stabilizer measurements. Effective QEC codes must therefore
make it difficult for errors to create a logical operator (logical error). We
quantify this difficulty in two ways: code distance and energy barriers.

##### Code Distance

Operators that act on encoded quantum states are only uniquely defined modulo
multiplication by stabilizers. The weight of a logical operator - the number
of single-qubit Pauli operators required to construct it - is therefore
variable. The code distance is defined as the minimum weight operator that can
create a logical error on the code, taking into account this multiplication by
stabilizers.

##### Energy Barriers

Additionally, we can consider the physical qubits in a QEC code as forming a
quantum condensed matter system, evolving under a Hamiltonian

$H=-\sum_{i=1}^{s}S_{i}$ (2)

where $\\{S_{i}\\}_{i=1}^{s}$ are spatially-local operators that generate the
stabilizer group $\mathcal{S}$. Since the encoded states belong to the
$+1$-eigenspace of all $S_{i}$, they also correspond to the ground state
(minimum energy state) of this system. Pauli errors then map an encoded state
into the $-1$-eigenspace of some $S_{i}$, thus increasing the energy. These
_flipped_ or _excited_ stabilizers can be interpreted as the location of
excitations or quasiparticles, with emergent behavior such as mobility,
charge, and even braiding statistics. The ability of a code to correct against
local errors is equivalent to the condition of _topological order_ : the state
of the system cannot be determined solely by local operations [35, 7, 36, 37].

Figure 1: Generators of the cubic code stabilizers, comprised of single-qubit
Pauli operators. (Left) The $C_{X}$ operator. (Right) The $C_{Z}$ operator.

The energy barrier of this system is then defined as the minimum energy that
must be surpassed in order to create a logical error by sequentially applying
single-qubit Pauli errors. Importantly, larger energy barriers will cause the
evolution of the system to naturally suppress the creation of logical errors
when at nonzero temperatures. That is, for an energy barrier $E$, entropy
change $S$, temperature $T$ and Boltzmann constant $k_{B}$, the time a system
can remain in its encoded state (quantum memory time) scales approximately via
the Arrhenius Law [38]

$\tau_{\text{lifetime}}\sim\exp\left(\frac{E-TS}{k_{B}T}\right)$ (3)

A _self-correcting quantum memory_ at finite temperature is then defined as a
QEC code where the lifetime grows without bound in the number of physical
qubits, at sufficiently small nonzero temperature [39]. A necessary condition
for this, therefore, is that the energy barrier must grow with the system
size. However, this behavior is impossible in all stabilizer codes formed by
arranging the qubits in $(2+1)$D and demanding the stabilizers be spatially
local [9, 10, 11, 12, 13, 14, 15, 8]. These no-go theorems do not necessarily
apply to higher dimensions. In particular, self-correction is readily possible
in $(4+1)$D [7, 12]. In $(3+1)$D, there have been several attempts at creating
such behavior [40, 13, 39, 41, 42, 8, 38]. One of the more promising
candidates, and one of the only exactly-solvable candidates, is known as the
_cubic code_.

Figure 2: As per Table 3, each single-qubit Pauli operator creates $4$ excitations of cubic code stabilizers, arranged in a tetrahedral shape. Transparency is used to show cubes hidden by the 3D perspective. Charge | Created By | Excited Stabilizer | Color
---|---|---|---
$e$ |  | $C_{X}$ |
$m$ |  | $C_{Z}$ |
Table 3: Elementary charges of the cubic code model. Filled triangles and
circles are used throughout this manuscript to refer to the Pauli operators.
Color refers to the convention for indicating created charges.

###  II.2 The Cubic Code

Initially proposed in Ref. [16], the cubic code is defined on a $(3+1)$D
simple cubic lattice with two qubits at each lattice site and periodically
identified boundaries in all directions, forming a $3$-torus. We use the
notation $XI$ to denote the operator $X\otimes I$ acting on the two qubits at
a particular lattice site, with the identity on all other qubits. The model
has two kinds of stabilizer generators, both with support on a subset of the
16 qubits at the 8 vertices of a unit cube. These generators, referred to here
as $C_{X}$ and $C_{Z}$, are shown in Fig. 1.

Pauli operators create tetrahedral excitation patterns in the neighboring
stabilizers, highlighted in Fig. 2. Following the convention with the surface
code, we denote these two types of excitations as $e$ and $m$ as in Table 3.

####  II.2.1  Lattice Symmetries

Noting the form of the stabilizers and their excitation patterns, there are
three lattice symmetries of the cubic code relevant for discussions in this
paper:

  1. 1.

$3$-fold rotation about $\hat{x}+\hat{y}+\hat{z}$.

  2. 2.

Mirror symmetry about the plane normal to $\hat{x}-\hat{y}$.

  3. 3.

The map $\\{IX\leftrightarrow ZI,IZ\leftrightarrow XI\\}$ combined with
spatial inversion.

These symmetries are used to relate boundaries and defects with different
orientations in later sections.

####  II.2.2 Encoding Properties

The defining property of the cubic code is that all its nontrivial topological
quasiparticle excitations111A nontrivial topological excitation is one that
cannot be created locally. are fundamentally immobile _fractons_. This is
equivalent to a property called “no string-like operators” [16]. A string-like
operator is any operator that creates two constant-sized regions of nontrivial
topological excitations, separated by an arbitrary distance $\Delta$, with a
weight that scales linearly with $\Delta$. In doing so, these operators incur
a maximum energy cost that is independent of $\Delta$. Since such string-like
operators do not exist in the cubic code, fractons cannot be moved large
distances with constant energy. This immobility property is discussed further
in Section II.2.3.

Importantly, this behavior results in a code distance that scales
superlinearly with the linear system size $L$ (the number of sites in each
lattice direction), and an energy barrier that scales logarithmically with
$L$. Although seemingly promising for use in self-correction, we also need to
consider the effects of entropy. The entropy of a system is typically
extensive, scaling polynomially with system size [26]. As per Eq. (3), at
finite temperature there will thus exist a given system size where increasing
$n$ further results in a decrease to the lifetime, as entropic contributions
overwhelm the system. This energy barrier is therefore enough to ensure only
_partial self-correction_ of the system [43]. Nevertheless, it remains one of
the only stabilizer codes to achieve even this behavior.

A key theorem for self-correcting quantum memories is that for there to be no
string-like operators, the ground state degeneracy - or equivalently, the
number of encoded qubits $k$ \- in a $(3+1)$D translation-invariant stabilizer
code must depend on the system size [13]. In the case of the cubic code, $k$
fluctuates significantly, bounded by $2\leq k\leq 4L-2$, where we take a
geometry with equal linear system size $L$ in $x,y,$ and $z$. For notation, we
define

$q_{n}(L)=\begin{cases}1&n|L\\\ 0&\text{otherwise}\end{cases}$ (4)

and

$\zeta(L)=\begin{cases}\operatorname{max}\left\\{2^{z}\,:\,2^{z}|L,\,z\in\mathbb{Z}\right\\}&L\in\mathbb{Z}\\\
0&\text{otherwise}\end{cases}$ (5)

Using this, the exact empirical formula for $2\leq L\leq 200$ is given by (see
Ref. [16])

$k=2\left[1-2q_{2}+2\zeta(L)\left(q_{2}+12q_{15}+60q_{63}\right)\right]$ (6)

where we have written $q_{2}=q_{2}(L)$ etc. for readability. This relationship
is plotted in Fig. 3. A number-theoretic exact formula for $k(L)$ is known for
all $L$ but the formula is cumbersome to write down and not enlightening for
our purposes [44]. Importantly, there is a strong dependence on the exact
divisibility of $L$; changing $L\mapsto L+1$ can cause $k$ to fluctuate by
several orders of magnitude. A guiding question for this work is whether the
scaling can become a more consistent - ideally linear - function of $L$ by
introducing open boundaries and lattice defects.

Figure 3: Number of encoded qubits, $k$, in the periodic cubic code model with
linear system size $(L,L,L)$ in $x,y,z$, as per Eq. (6). The value is bounded
by $2\leq k\leq 4L-2$.

####  II.2.3 Fracton Mobility

As noted previously, there are no string-like operators through the bulk of
the cubic code model. Consequently, the topological quasiparticle excitations
are strictly immobile and cannot be moved through the lattice without
incurring an additional energy penalty that scales with the distance,
$\Delta$. There are three sufficient behaviors, presented below, that describe
this generalized motion and form the basis of our arguments for code distance
and energy barriers in later sections:

Figure 4: Fractal pattern used to expand the separation between a set of $4$
$m$ excitations in the bulk, using repeated $XI$ Pauli operators (purple
circles). The shaded purple regions are used to highlight repeated
applications of the leftmost operator, showing similarities to a Sierpinski
pyramid.

##### Fractal Operators

Firstly, fractons can be moved through the bulk of the model using operators
arranged in the shape of _fractal_ tetrahedra. Originally described in Ref.
[16], the excitation patterns in Fig. 2 can be repeated in a fractal pattern
to create increasingly larger separations of charge, as in Fig. 4. Notably,
doing so requires multiple excitations to move outwards and it involves
intermediary high-energy states. It was from this fractal behavior that the
logarithmic energy barrier of the periodic cubic code was derived [26]. Due to
this fractal nature, this process can create excitations separated by a
distance $\Delta$ where $\Delta=2^{j}$ for $j=0,1,2,\ldots$. This dependence
on powers of $2$ contributes towards the sporadic scaling of logical qubits in
the periodic cubic code: if the width of the lattice is not a power of $2$,
multiple smaller tetrahedra need to be combined in a nontrivial way, wrapping
around the periodic boundary to annihilate all charges. This motivates the
form of Eq. (5).

Figure 5: The $F$ operators that can cascade excitations through the lattice,
as in Fig. 6. (Left) $F_{e}^{xy}$, $F_{e}^{xz}$, and $F_{e}^{yz}$ operators.
The labels indicate the plane and directions along which the excitations can
move. (Right) $F_{m}^{\bar{x}\bar{y}},F_{m}^{\bar{x}\bar{z}}$, and
$F_{m}^{\bar{y}\bar{z}}$ operators, which move excitations in the negative
lattice directions.

##### Cascade Operators

Secondly, excitations can be moved in a _cascading_ operation (using the
terminology from Ref. [29]) that creates additional excitations at each step
of the motion. To highlight this, we introduce three operators for $e$ and
$m$, as in Fig. 5. Using these operators repeatedly creates the cascading
procedure shown in Fig. 6. Importantly, this process moves excitations through
the bulk while requiring a Pauli weight that scales superlinearly with the
distance $\Delta$, and creates additional excitations whose number scales
linearly with $\Delta$. Numerically continuing this process for larger
separations produces the results in Fig. 7.

##### Cage Operators

Thirdly, following the terminology of Ref. [29], a _cage_ operator is a
generalization of a Wilson loop that moves excitations around a closed path in
the bulk, starting and ending from the vacuum state (ground state). This
process is shown in Fig. 8. Notably, the locations of Pauli operators, as well
as the intermediary excitations, occupy a cylindrical shell with the required
height of the cylinder scaling linearly with the radius. When viewed from a
particular direction ($\hat{z}$ in Fig. 8), this height can be compacted,
leaving a $2$D loop. Cage operators are particularly relevant for the
discussion of defects in Section V.

(a) $\Delta=0$ (b)  (c) $\Delta=1$ (d) $\Delta=7$

Figure 6: The “cascading procedure”: The $F_{m}^{\bar{y}\bar{z}}$ operator in
(a) can move excitations in the $-\hat{z}$ direction. Starting with the
excitation pattern in (a), we translate and re-apply $F_{m}^{\bar{y}\bar{z}}$
so that the $\star$ is aligned with the $\star$ in (b). In doing so, the
stabilizers marked by the black squares are flipped. Repeating this at the
$\star$ in (c) removes all excitations in the second row. We can repeat this
process in each row to separate $m$ charges in the $-\hat{z}$ direction.
Larger separations $\Delta$ create additional excitations and the weight of
the operator (number of single-qubit Pauli operators) scales superlinearly
with $\Delta$.

(a) Pauli weight (number of single-qubit Pauli operators) of repeated $F$
operators as the separation between charges ($\Delta$) is increased. A slope
of $>1$ indicates superlinearity, due to the $\log$-$\log$ axes. (b) Upper
bound on the energy cost associated with tunneling a charge between two
boundaries. The data point at the bottom right indicates that the excess
charges have condensed at the other boundary.

Figure 7: Scaling properties of the $F$ operators as the separation between
charges ($\Delta$) is increased, computed by numerically continuing the
process in Fig. 6. This demonstrates a superlinear upper bound on the weight
and a near-linear polynomial upper bound on the energy barrier of a logical
operator. Figure 8: Using $F_{e}^{yz}$ and a new operator, $G$, to move
excitations around a closed path (“cage”) in the $xy$ plane. (a) The
$F_{e}^{yz}$ operator that we use to move excitations in the ${\hat{y}}$
direction. (b) A new operator, which we call $G$ (see Fig. 25 in the
appendix), that can be used to move excitations in the ${\hat{x}}+{\hat{y}}$
direction. (c) Starting with $F_{e}^{yz}$, we move an excitation in the second
column into the ${\hat{x}}+{\hat{y}}$ direction using the tip of the new
operator, $G$. Wireframe cubes indicate the annihilated charges from the
previous step. (d) We then repeat this, using $G$ to move the second
excitation in the second column. (e) We now move all three excitations in the
third column into the ${\hat{x}}+{\hat{y}}$ direction, using $G$. (f) We now
use $F_{e}^{yz}$ to begin to move these charges back in the $-{\hat{y}}$
direction. (g) We continue this process to move the remaining charges back in
the $-{\hat{y}}$ direction. To complete the loop, we would use $G$ once again.
This process can be generalized to larger loops, in other planes, and also
with $m$ charges.

###  II.3 Numerical Methods

In this work, we aim to derive formulae for the number of encoded qubits, $k$,
and the distance, $d$, of variants of the cubic code with defects and modified
boundary conditions. In general, however, it is difficult to rigorously derive
exact equations for these properties. Therefore, we present motivating
discussions, backed up by numerical computations of small system sizes where
we can determine empirical formulae for these results. We then assume a
consistent extrapolation for larger models.

To perform these calculations, the stabilizers in a system of $n$ qubits are
represented by a binary vector in $\mathbb{Z}_{2}^{2n}$, with a $1$
corresponding to a Pauli $X$ or $Z$ acting on a particular qubit [45].
Commutation is a bilinear map between two such vectors, and finding nontrivial
logical operators reduces to determining the kernel of this map when applied
to the stabilizers. In this way, the number of logical operators (or
equivalently, the ground-state degeneracy), and also examples of particular
logical algebras, can be computed exactly for system sizes up to the order of
$20^{3}$ qubits. By restricting to a subset of the physical qubits, we can
also determine the properties of the support of these logical operators. These
results form the basis for the conclusions drawn in the following sections.
Code for these calculations is provided in Appendix C.3.

##  III Boundaries

In this section, we present and analyze formulations of the cubic code that
incorporate combinations of open and periodic boundaries. By doing so, we
identify the behavior of excitations on and near these boundaries, to inform
the discussion of encoding properties in Section IV. We first consider
isolated open boundaries in a semi-infinite system, before combining multiple
boundaries via edges and vertices.

To characterize these boundaries, we introduce the following notation:
Consider a rectangular prism centered at the origin of a Cartesian $(3+1)$D
coordinate system, with the terminating boundaries normal to the axes. In
similar notation to Miller indices, we use $(100$) to denote the boundary that
forms across the positive $x$ side of the prism and $(\bar{1}00$) to denote
the boundary on the negative $x$ side. Additionally, define the _sign_ of a
boundary to be _positive_ for $(100)$, $(010)$, and $(001)$ orientations and
_negative_ for $(\bar{1}00)$, $(0\bar{1}0)$, and $(00\bar{1})$. An additional
notation for specifying the types of stabilizers on these boundary faces is
introduced in Section III.2. It is possible to consider other more general
boundaries, such as those with Miller index $(110)$. We present one such
example in Appendix C.2 but will defer the systematic study of these
boundaries to future work.

###  III.1 Semi-Infinite Boundaries

We first consider the family of semi-infinite systems, such as
$\mathbb{R}^{2}\times(-\infty,0]$ with a single terminating boundary
corresponding to a crystallographic plane, and propose a set of maximal
stabilizer generators to populate this boundary. There are two possible
constructions of translation-invariant Hamiltonian terms that maintain the
required commutation relations with both the neighboring bulk and boundary
stabilizers. These correspond to truncated $C_{X}$ and $C_{Z}$ operators, as
shown in Fig. 9, where the bulk operator is continued outwards and all terms
that lie beyond the system boundaries are ignored. We denote these single-face
(or plaquette) operators as $P_{X}$ and $P_{Z}$.

Figure 9: From top to bottom: Truncated stabilizers on the edges, plaquettes,
and vertices of a finite lattice, formed by taking a section of the bulk
$C_{X},C_{Z}$ stabilizers.

Let $X$-type denote a boundary Hamiltonian consisting of only $P_{X}$, and
$Z$-type for $P_{Z}$. More general configurations are possible, such as the
_triangular_ code in Table 1, but their properties can be explained solely by
a discussion of the purely $X$ or $Z$-type boundaries.

Importantly, the orientation of a boundary affects its behavior. That is, the
boundary Hamiltonian of an $X$-type $(001)$ is not equivalent to that of an
$X$-type $(00\bar{1})$. We see this by observing the two inequivalent forms of
truncated $C_{X},C_{Z}$ operators, as well as the symmetries noted in Section
II.2.1.

Figure 10: Positive (left) and negative (right), $X$-type (red) and $Z$-type
(blue) boundaries, showing the excitation patterns for each combination of
single-qubit Pauli operators.

####  III.1.1 Boundary Excitations

Various applications of Pauli operators on a boundary are shown in Fig. 10.
When a single particle is able to be created or destroyed in isolation by a
local operator in the vicinity of the boundary layer, we refer to this process
as _condensation_. Of note, positive $Z$-type boundaries condense $e$
excitations, while negative $X$-type boundaries condense $m$ excitations; we
refer to these boundaries as $(e)$ and $(m)$ type respectively. However, on
negative $Z$-type and positive $X$-type boundaries, single excitations cannot
be condensed. Instead, to describe their behavior, we introduce three new
charges as subtypes of both the $e$ and $m$: denoted $e_{A},e_{B},e_{C}$ and
$m_{A},m_{B},m_{C}$.

Consider a positive $X$-type boundary in Fig. 11, where we striate the lattice
to color squares along the diagonals as $A,B$, or $C$ (such that an $m$
excitation on an $A$-type square will have an $m_{A}$ charge, etc.).
Importantly, a single $m_{A}$ (or an $m_{A}$ and an $m_{B}$, for example)
cannot be condensed in isolation. Instead, it gains $(2+1)$D mobility along
the boundary plane: $m_{A}$ charges are mobile along the $A$ diagonals via
applications of $IX$, and can hop to other $A$ diagonals using a combination
of $IX,XI$. Equivalent results hold for $m_{B}$ and $m_{C}$. This increased
mobility resembles phenomena observed on the boundaries of type-I fracton
models, like the X-cube model [24, 29].

Moreover, $XI$ creates a topologically nontrivial composite of $m_{A}$,
$m_{B}$, and $m_{C}$ excitations on the boundary. Motivated by these
behaviors, we define the fusion rules

$\displaystyle m_{A}\times m_{A}\sim 1,\quad m_{B}\times$ $\displaystyle
m_{B}\sim 1,\quad m_{C}\times m_{C}\sim 1,$ $\displaystyle m_{A}\times m_{B}$
$\displaystyle\times m_{C}\sim 1$ (7)

that describe how combinations of excitations can be created via local
operators. We note that these are $\mathbb{Z}_{2}\times\mathbb{Z}_{2}$ fusion
rules. An analogous result holds for $e_{A},e_{B}$, and $e_{C}$ by
substituting $m\mapsto e$. Given this fundamentally different behavior to
$(m)$ boundaries, we denote these positive $X$-type boundaries as $(m_{ABC})$,
and similarly $(e_{ABC})$ for negative $Z$-type boundaries. A summary of the
new boundary notation is given in Table 4.

For these charges to be considered topologically distinct, there must not be a
local operator that can fuse $m_{A}\times m_{B}\sim 1$, for example. By
considering the action of $IX$ and $XI$, this is trivially true using only
operators with support on the boundary. Since such a fusion operator will
create excitations only along the boundary, we complete the argument by using
the cleaning process from Refs. [16, 46] to reduce the support of any bulk
operator to just terms on the boundary; we refer the reader there for a more
detailed description. This argument holds when we consider operators
stretching from the $(m_{ABC})$ boundary into the bulk, as long as the
operator does not have support on other boundaries (such as an opposing
$(m)$). Therefore, it is valid to consider $m_{A}$, $m_{B}$, and $m_{C}$ as
distinct charges with the boundary fusion properties above, if they are
separated from additional boundaries by distances larger than the correlation
length of the ground state.

Figure 11: An $X$-type positive boundary, colored to indicate three types of $m$ charges: $m_{A},m_{B}$ and $m_{C}$. Each charge is mobile within its particular set of diagonals. Boundary | Stabiliser | Sign | Color | Behavior
---|---|---|---|---
$(m)$ | $X$ | $-$ |  |  $m$ condenses
$(m_{ABC})$ | $X$ | $+$ |  | Eq. (7)
$(e)$ | $Z$ | $+$ |  |  $e$ condenses
$(e_{ABC})$ | $Z$ | $-$ |  | Eq. (7) (for $e$)
Table 4: Boundary labels based on the type of topological charge that
condenses. Boundary sign is defined as per Section III. Color refers to the
convention used in the figures.

Due to the triplet $\mathbb{Z}_{2}\times\mathbb{Z}_{2}$ fusion nature of these
charges, these fusion rules bear a resemblance to that of the _color code_
[30, 47, 48]. In fact, the color code can be directly transformed into this
$(2+1)$D layer: Consider the hexagonal lattice of the 6-6-6 color code in Fig.
12, with a qubit at each lattice point (white circle). The stabilizers of this
code are the product of $X$ or $Z$ on all $6$ qubits of each hexagon. We begin
the transformation by first overlaying a rhomboidal lattice such that its
vertices lie between exactly two qubits $i,j$, as shown in the inset. Note
that acting on both qubits with $X_{i}X_{j}$, for example, excites the two
adjacent stabilizers on the green hexagons. This is equivalent to exciting two
$A$ squares along the diagonal of the cubic code’s $(m_{ABC})$ using $IX$ in
Fig. 11. Moreover, acting with just $X_{i}I_{j}$ excites the three adjacent
red, green, and blue hexagons - equivalent to exciting $m_{A},m_{B}$, and
$m_{C}$ using $XI$ on the cubic code. Corresponding similarities also apply
for $Z$ operators acting on an $(e_{ABC})$ boundary. We, therefore, have the
following map relating excitations of the color code to excitations of the
cubic code boundaries:

$X_{i}X_{j}\mapsto IX,\,X_{i}I_{j}\mapsto XI,\,Z_{i}Z_{j}\mapsto
ZI,\,I_{i}Z_{j}\mapsto IZ$ (8)

Notably, in the Heisenberg representation this transformation is equivalent to
acting on each $i,j$ pair with a `CNOT` gate, controlled on qubit $j$ [34]. If
we consider the $(m_{ABC})$ boundary on $(100$) and $(e_{ABC})$ on
$(\bar{1}00)$, then this transformation directly maps the truncated boundary
$X$ and $Z$ stabilizers of the cubic code onto the $X$ and $Z$ stabilizers of
the color code. This property is discussed further in Appendix C.2. It remains
an open question as to how or whether this correspondence generalizes to the
bulk stabilizers of the cubic code, and moreover for the other cubic codes
proposed by Haah [16].

Figure 12: A hexagonal color code, with a qubit at each white circle.
Overlayed is a rhomboidal lattice, with vertices corresponding to the lattice
points in the boundary layer of the cubic code. As per the inset, at each
vertex the adjacent two color code qubits $i,j$ are identified with the two
qubits at each cubic code lattice site. To map onto the cubic code stabilizers
a CNOT is used on each pair, controlled on qubit $j$.

####  III.1.2 Periodic Behavior

Consider a lattice that is periodic in $x,y\in[0,L]$ and occupies
$z\in[0,\infty)$. Along the $(00\bar{1})$ face we construct an $(e_{ABC})$
boundary using $P_{Z}$ stabilizers. If $3|L$, then the diagonal striation (as
in Fig. 11) of this boundary layer is self-consistent and we have distinct
$e_{A},e_{B}$, and $e_{C}$ charges that are mobile within their $(2+1)$D
diagonal subspaces. That is, if an $e_{A}$ were to move around the periodic
boundary, it would retain its $e_{A}$ charge. We can thus consider an operator
that creates two $e_{A}$ out of the vacuum, hops one around the periodic
boundary, and annihilates it with the other to create a logical operator -
comparable to those in the $(2+1)$D toric code, for example, [5]. Due to the
two unique charges (as $A\times B\sim C$ by the fusion rules), these surface
string operators define two independent logical operators along an $(e_{ABC})$
or $(m_{ABC})$ boundary. When $3\\!\nmid\\!L$, it can be checked that hopping
an excitation three times around a boundary (to return it to its original
labeling) produces the identity operator.

However, these string operators can be extended to additional layers beyond
the boundary, creating operators that extend into the bulk while requiring
longer periods. To describe this procedure, we consider each $xy$ plane to be
a generalization of the boundary $(e_{ABC})$ layer. That is, acting with $IZ$
or $ZI$ at $z=1$ creates $e_{ABC}$ charges in both the $z=0$ and $z=1$ layers.
Repeating the hopping process at $z=1$ to move an $e_{A}$ around the periodic
boundary will remove all charges in that layer while introducing _residual_
charge at $z=0$. If this residual charge is _trivial_ \- that is, it is
equivalent to the vacuum state up to the fusion operators in Eq. (7) - then
the charge in that layer can also be cleaned away. Importantly, these
processes only deposit residual charge in layers at smaller $z$, not affecting
layers that have already been cleaned of excitations. Since $(e_{ABC})$
restricts any remaining charge from forming beyond the $(00\bar{1})$ face
itself, completing the process by annihilating charges at $z=0$ results in a
(nontrivial) logical operator.

If this process were started instead at $z>1$, then this cleaning can be
continued downwards until either the topmost remaining layer has a nontrivial
residual charge or all charges are annihilated or condensed into the
$(e_{ABC})$ boundary. In this way, nontrivial logical operators can be
constructed at varying depths within the bulk, which wrap around the periodic
boundary and iteratively clean layers of charge down to $z=0$.

Figure 13: Numerical calculation of
$\tau(L_{x},L_{\infty})\equiv\zeta(L_{x}/3)$ from Eq. (5) for increasing
linear system sizes $L_{x}$ with $L_{\infty}\gg L_{x}$. There is a clear
fractal nature to this behavior.

It can be shown (see Appendix C.1) that for a given lattice that is periodic
in linear system size $L$, the maximum number of $z$ layers that can be
cleaned until a nontrivial residual charge is created is

$z_{\text{max}}(L)=\zeta(L/3)$ (9)

using the notation in Eq. (5). This function is plotted in Fig. 13. Each layer
introduces two additional nontrivial mutually commuting logical operators,
giving

$k=2\zeta(L/3)$ (10)

Note that if $L_{z}<z_{\text{max}}(L)$ and the $(001)$ boundary is of type
$(m)$ or $(m_{ABC})$, then $k=2L_{z}$ since the maximum number of layers
cannot fit in the given lattice. Incorporating this, we define the function

$\tau(L_{1};\;L_{2})=\min\\{\zeta(L_{1}/3),\,L_{2}\\}$ (11)

For rectangular lattices with $L_{x}\neq L_{y}$, then we instead have

$k=2\min\\{\tau(L_{x};\;L_{z}),\,\tau(L_{y};\;L_{z})\\}$ (12)

defined by the shortest path around the periodic boundary. As a result, $k=0$
if one of $L_{x}$ or $L_{y}$ is not a multiple of $3$.

####  III.1.3 Translational-Symmetry Violations

If translational invariance is relaxed, there are additional possible
commuting configurations of the boundary Hamiltonian. The commutation relation
between neighboring plaquette terms is given in Fig 14. Notably, these
relations allow for the construction of a natural _diagonal_ commuting
interface between $P_{X},P_{Z}$ operators, such as the configuration labeled
_triangular_ in Table 1.

Figure 14: Anti-commutation relations for plaquette operators on the boundary.
(Left) When $P_{Z}$ is applied to the blue square on the positive faces of the
lattice, the red squares on the same face correspond to $P_{X}$ that anti-
commute. (Right) When $P_{X}$ is applied to the red square on the negative
faces of the lattice, the blue squares correspond to $P_{Z}$ that anti-
commute.

As with the other boundaries discussed so far, each sector of the mixed
boundary is associated with an $(e),(m),(e_{ABC}),$ or $(m_{ABC})$ behavior.
Due to this equivalence, this paper focuses on pure $X$ and $Z$ boundary
configurations.

###  III.2 Boundary Seams

As in Fig. 9, two adjacent boundaries can be joined along an edge, and three
boundaries at a vertex. These features are required to construct the full
codes discussed in Section IV.

Notably, the plaquette-plaquette commutation relations in Fig. 14 are
equivalent for edge-plaquette commutation since geometrically, neighboring
plaquettes only share support on at most two sites - identical to plaquettes.
Given these constraints, we can thus specify a fully-gapped configuration for
a finite prism such as in Table 1. To describe these configurations, the
notation $(xyz;\bar{x}\bar{y}\bar{z})$ is used to specify the boundary type on
each of the six lattice boundaries (see Fig. 15). For open boundaries, we use
$e$ and $m$ as defined in Table 4, where the $ABC$ subscript is dropped for
readability. Periodic boundaries are denoted by $p$. It is assumed in each
case that the edge and vertex stabilizers are chosen to create a maximally
commuting stabilizer group of local operators (that is, where possible there
are no local Pauli operators with support on a single plaquette, edge, or
vertex that commute with all the stabilizers).

Figure 15: Notation used to specify the choice of boundaries, $(abc;def)$,
where each letter is $e$ or $m$ (as defined in Table 4 and the $ABC$ subscript
is implied), or $p$ for a periodic boundary.

Using this notation, we can revisit the symmetries described in Section
II.2.1:

  1. 1.

$(abc;def)$ is equivalent to $(cab;fde)$ and $(bca;efd)$.

  2. 2.

$(abc;def)$ is equivalent to $(bac;edf)$.

  3. 3.

$(abc;def)$ is equivalent to $(def;abc)$ with all $e\leftrightarrow m$
swapped.

Combined, the first two symmetries imply that for $(abc;def)$, all
permutations of $abc$ produce equivalent codes, given that the same
permutation is also applied to $def$.

##  IV Superlinear-Distance Boundary Codes

A core motivation for this work is to maintain the partial self-correction of
the cubic code, without the requirement of nonlocality to implement a
$3$-torus. Given the discussion in Section II, operators with superlinear
weight (necessary for self-correction) arise when excitations _cascade_
through the bulk of the lattice, while unwanted string-like operators appear
near certain boundary configurations. Motivated by this, we thus consider
codes that contain opposing $(e),(e_{ABC})$ boundaries and opposing
$(m),(m_{ABC})$ boundaries. This specifies four of the six faces of the
lattice, leaving (up to symmetries) a potential three unique configurations.
In the following section, we highlight one such case, dubbed _tennis ball 1_ ,
while the others are discussed in Appendix A.

###  IV.1 Tennis Ball 1

This configuration is constructed with $(e_{ABC})$ and $(m_{ABC})$ on the
remaining two unspecified faces. For example, $(mem;mee)$ as shown in Table 1.

To construct $\bar{X}$ logical operators, $m$ charges must cascade from
$(100)$ and condense at $(\bar{1}00)$ using $F_{m}^{\bar{x}\bar{y}}$ and
$F_{m}^{\bar{x}\bar{z}}$, as shown in Fig. 16. If the $m$ excitations produced
in the cascade cannot appear on the $(001)$ boundary, this procedure produces
an operator with a weight superlinear in $L_{x}$ and an increasing energy
barrier, since excitations must cascade through the bulk by a distance
$L_{x}$. However, if $m$ excitations can be produced on the $(001)$ boundary
during the cascade, these excitations become mobile on the surface and can hop
to the $(\bar{1}00)$ face using a string operator. Hence, any cascade that
begins less than a distance of order $\mathcal{O}(L_{x})$ from the $(001)$
boundary creates a string-like operator: the height is constant in $L_{x}$,
the weight is linear, and the energy cost is constant. An analogous argument
holds for producing $\bar{Z}$ logical operators by cascading $e$ excitations;
only cascades which begin a distance at least $\simeq L_{y}$ from the
$(00\bar{1})$ boundary produce logical operators with superlinear weight.

(a) The $\bar{X}$ logical operators that condense $m$ charges on the
$(\bar{1}00)$ and $(100)$ faces become linear in weight when near the $(001)$
boundary. (b) The $\bar{Z}$ logical operators that condense $e$ charges on the
$(0\bar{1}0)$ and $(010)$ faces become linear in weight when near the
$(00\bar{1})$ boundary.

Figure 16: Logical operators on the first _tennis ball_ configuration,
$(mem;mee)$. Solid shapes indicate repeated applications of the $F$ operators
to cascade $m$ (yellow) and $e$ (cyan) charges. Red faces represent $X$, and
blue for $Z$, stabilizer choices on the boundaries.

Notably, the $\bar{X}$ logical operators extend in the $\hat{z}$ direction and
$\bar{Z}$ in the $-\hat{z}$ direction when cascading. Pairs of $\bar{X}$ and
$\bar{Z}$ must then anti-commute along their shared $xy$-plane. To determine
the number of independent logical pairs, first note that using the _long_ edge
of the $F$ operators to move charges through the bulk is equivalent to the
hopping operator in Fig. 11. We can then identify this cascading procedure
with hopping an $A,B$ or $C$ charge from one boundary to the other, creating
neighboring intermediary excitations that must also be hopped into a
condensing boundary. In a similar argument to Section III.1.2, we, therefore,
expect each layer to contribute $2$ encoded qubits. Since only one
orientation, namely the $xy$ planes, have opposing $e$ and $m$-condensing
boundaries - and therefore can support mutually anti-commuting pairs of both
$e$ and $m$ operators - the scaling is thus expected to be $k=2L_{z}$. We
confirm this by numerically computing the ground state degeneracy for small
values of $L_{x},L_{y},L_{z}$; an example of the computed logical algebra
cleaned into a single $xy$ plane is shown in Fig. 17. This same analysis
cannot be conducted with $xz$ planes, for example, since these will have three
adjoining $m$-type boundaries and only one $e$-type. As with the surface code,
such a configuration does not support any nontrivial logical operators.

(a) $\bar{X}_{1}$ (b) $\bar{Z}_{1}$ (c) $\bar{X}_{2}$ (d) $\bar{Z}_{2}$

Figure 17: Two pairs of logical operators on the first _tennis ball_ code,
$(mem;mee)$, for a linear system size $(11,11,L_{z})$, considering a slice of
the $xy$ plane at some $z$ far from the $(001)$ and $(00\bar{1})$ boundaries.
These were calculated and plotted computationally; A slight jitter is applied
to each point to distinguish when $XI$ and $IX$ occur on the same lattice
point. Note that there are only two such pairs of logical operators that can
be cleaned onto just this particular $xy$ plane. If we consider the plane at
$z+1$ we would find an analogous result of two new independent pairs of
logical operators; in this way, the _tennis ball 1_ code has $k=2L_{z}$
logical pairs.

Notably, this scaling confirms the results in Ref. [49], where Dua et al.
showed that the periodic cubic code can be interpreted as interwoven layers of
toric code. Specifically, a model of linear system size $(L_{x},L_{y},L_{z})$
is equivalent to $2L_{z}$ copies of toric code, up to a unitary that is non-
local in $z$. When placed on open boundaries as done here, the corresponding
surface codes should each contain one encoded qubit, thus giving $k=2L_{z}$
total.

###  IV.2 Subsystem Codes

The presence of the string-like operators initially appears detrimental to the
desired self-correcting behavior of the _tennis ball_ code. However, we can
still ensure a superlinear-distance encoding by using a subsystem code [50].
By treating all logical qubits with linear distance as gauge qubits, the
subsequent dressed logical operators should remain superlinear in weight. We
argue this claim as follows:

First, note that the support of the bare superlinear-weight logical operators
extends further in the $z$ direction than the bare linear-weight logical
operators, by definition. This extra support includes a region in the bulk
where the $\bar{X}$ and $\bar{Z}$ pairs intersect and anti-commute. Since
$\bar{X}$ commutes with all stabilizers and all other $\bar{Z}$ operators
apart from its pair, this anti-commutation relation must be maintained when
multiplied with these other operators. Therefore, the product of bare
superlinear and bare linear weight operators will always contain support on a
region in the bulk of the lattice. This region is either entirely isolated
from the boundary or extends to the boundary. In the former case, by the
properties of the original cubic code, there are no string-like operators in
the bulk of the lattice. For the latter, the operator now occupies a support
that is larger than the original superlinear-weight support, which didn’t
extend to the boundary. In both situations, the dressed operator must still
have superlinear weight.

With _tennis ball 1_ , we can, for example, label all logical operators that
can be supported solely in $z\geq 2L_{z}/3$ or $z\leq L_{z}/3$ as ancillary.
Computing the remaining ground state degeneracy numerically, the number of
logical qubits is

$k=2\left(\left\lfloor\frac{L_{z}}{3}\right\rfloor+(L_{z}\text{ mod
}3)\right)$ (13)

The periodic scaling is a result of specifying discrete lattice points for the
cut-off regions when $3$ may not divide $L_{z}$.

It is therefore possible to modify the family of cubic codes such that we
maintain the superlinear distance and partial self-correction while improving
$k$ to be a simple linear function of $L_{i}$, with only a constant-order
periodic correction. Moreover, these codes do not require any periodic
boundaries and are thus comparably more realistic for implementations in
physical systems.

##  V Defects

Having presented the key properties of boundaries in the cubic code in the
previous section, in the following section we similarly introduce and
characterize three defect types: vacancies, edge dislocations, and screw
dislocations. A discussion of their use in QEC codes is then provided in
Section VI. Defects have been used in previous work to encode additional
quantum information and to perform logical Clifford operations [27, 51, 52,
53, 54, 55, 48, 28].

From a condensed matter perspective, defects are an important consideration
when forming a complete understanding of a given phase of matter. For example,
encircling a defect can induce a lattice translation. Since fractons are
fundamentally immobile, this translation has the potential to cause nontrivial
changes to the fracton topological order [56], such as in the form of
increased mobility.

###  V.1 Vacancies

Vacancies, the removal of lattice sites (and qubits) within the bulk of the
model, behave similarly to boundaries. Stabilizers obtained by truncating the
operators acting on the vacant site still commute with all stabilizers away
from the vacancy and with other truncated stabilizers of the same type. For
simplicity, we consider only vacancies with single choices of truncated
stabilizers, which we denote as $\braket{m}$ and $\braket{e}$ for $X$ and $Z$
respectively. As with the boundaries, these results could be generalized to
more complex constructions, such as $(110)$ orientations or combinations of
$e$ and $m$ faces, in future works.

Vacancy Type | Vacancy Boundary | Stabilizer | Boundary Sign | Behavior
---|---|---|---|---
$\braket{m}$ | $(m)$ | $X$ | $+$ |  $m$ condenses
$\braket{m}$ | $(m_{ABC})$ | $X$ | $-$ | Eq. (7)
$\braket{e}$ | $(e)$ | $Z$ | $-$ |  $e$ condenses
$\braket{e}$ | $(e_{ABC})$ | $Z$ | $+$ | Eq. (7) (for $e$)
Table 5: Terminology for vacancies, analogous to Table 4 for open boundaries.

We identify here three key ways in which bulk excitations interact with nearby
vacancies, the first two of which are equivalent to the boundary interactions.

Firstly, fractons can condense into certain faces of $\braket{m}$ and
$\braket{e}$ vacancies, just as with the exterior lattice boundaries. The
analogous results to Table 4 are summarized in Table 5.

Secondly, if the vacancy extends in a particular direction, such as $\hat{z}$,
mobilized charges on $(m_{ABC})$ and $(e_{ABC})$ faces of the vacancy are able
to repeatedly _hop_ along $\hat{z}$. If the vacancy extends around a lattice
periodic in $z$, and with $3|L_{z}$, then an operator can create two $m_{A}$
out of the vacuum, hop one charge around the periodic boundary and annihilate
it with the other. This is equivalent to the boundary behavior in Section
III.1.2.

Finally, by employing a _cage operator_ , fractons can encircle a vacancy. As
described in Ref. [29] and Section II.2.3, these operators create a set of
fractons out of the vacuum, separate them via a cascading procedure in two
directions, before inverting the cascading operation to bring the excitations
back together to annihilate - returning to the vacuum state. Such an operation
in the bulk will typically be trivial, resulting in a product of stabilizers.
However, the vacancy removes terms from the stabilizer group, causing a cage
that encircles a vacancy to be potentially nontrivial.

(a) At the ends of the dislocation are two _twist_ stabilizer lines (blue),
shaped like trapezoidal prisms. (b) Closed loops in the bulk and around a
twist.

Figure 18: Edge dislocations on the cubic code contain twists (blue). An
operator that moves a fracton around a closed cage (red loop) in the bulk will
no longer be closed when encircling a twist. This translation potentially
increases the mobility of fractons when near a defect. Figure 19: Stabilizers
for the twists occurring at the ends of edge dislocations. There are four
types, corresponding to $T_{X}$ (left pane) and $T_{Z}$ (right pane), as well
as at the bottom and top of the edge dislocation. The stabilizers were found
by considering the commutation with the neighboring bulk $C_{X}$ and $C_{Z}$
stabilizers.

###  V.2 Edge Dislocations

Edge dislocations in (3+1)D are analogous to those in the (2+1)D surface code
[27], with the additional feature that the dislocation becomes a line
extending into the third spatial dimension, as in Fig. 18. Along the
dislocation line, we include trapezoidal prism stabilizer terms - known as
_twists_ in Refs. [27, 51]. Joining the twists are a region of slanted $C_{X}$
and $C_{Z}$ operators (shown as white in Fig. 18) that naturally commute with
the adjoining bulk stabilizers. For the twists themselves, however, there are
only two choices of stabilizers: one from $X$ terms (denoted $T_{X}$) and
another from $Z$ ($T_{Z}$). These are provided in Fig. 19. Importantly,
although $T_{X}$ and $T_{Z}$ commute at the same location, adjacent $T_{X}$
and $T_{Z}$ anti-commute. Constructing a gapped edge dislocation, therefore,
requires taking either pure $T_{X}$, pure $T_{Z}$, or $T_{X}$ and $T_{Z}$
jointly on every second stabilizer (or some combination of the above). We
could further consider a non-commuting, potentially gapless, Hamiltonian along
the defect including all $T_{X}$ and $T_{Z}$ terms with arbitrary weights. Due
to the commutation relations, this Hamiltonian is seen to be equivalent to two
copies of the $(1+1)D$ quantum Ising model. We proceed to consider only the
pure $T_{X}$ or $T_{Z}$ defects, leaving more complicated configurations to
future work.

As sketched in Fig. 18b, using a cage operator to propagate a fracton around a
twist does not return the fracton to its original position; instead, the
fracton moves by the Burgers vector of the dislocation. The once-immobile
fractons thus gain limited mobility in the vicinity of a twist. This behavior
has the potential to introduce nontrivial logical operators.

As with boundaries and vacancies, bulk excitations can condense onto
particular twists. A $T_{X}$ twist condenses $m$ charges, while $T_{Z}$ twist
condenses $e$. Since an edge dislocation is characterized by two twists, we
denote, for example, $\braket{em}$ to be a $T_{X}$ twist on the positive side
of the pair, and $T_{Z}$ on the negative side.

###  V.3 Screw Dislocations

The final defect type we consider is the _screw dislocation_ , shown in Fig.
20. We label the screw as $\braket{L}$ or $\braket{R}$ by the handedness of
the Burgers vector when traversing around the dislocation. Unlike the edge
dislocation, the screw invokes a translation vector along the defect line
itself. Importantly, this means that a fracton can continuously wind around
the defect via cage operators while translating along the screw. Fractons thus
gain 1D mobility in the vicinity of screw dislocations.

Unlike vacancies and twists, however, for the screw dislocations with a
Burgers vector of $1$ considered here, there is no local operator supported on
the dislocation line that commutes with the bulk stabilizers. Because of this,
$\braket{L}$ and $\braket{R}$ screws have no inherent stabilizer and can
condense both $m$ and $e$ excitations. Notably, this condensation behavior
largely negates any change to the mobility of fractons near this screw, since
individual $e$ and $m$ can be created or destroyed at any location along the
defect, and thus become trivial.

Figure 20: The two independent forms of screw dislocations in a (3+1)D
lattice, such as the cubic code. The screws are labeled by the handedness of
the Burgers vector when traversing around the dislocation. On the left is a
right-handed screw, $\braket{R}$, and on the right is a left-handed screw,
$\braket{L}$.

##  VI Superlinear-Distance Defect Codes

Similar to the discussion of boundary codes in Section IV, in this section we
examine how defects can be used with the cubic code to create QEC codes with
superlinear distances. Further configurations without this property are
discussed in Appendix B. Notably, although there are codes using screw
dislocations with a superlinear distance, the number of encoded qubits there
is constant. We therefore defer the discussion of screw-dislocation codes to
Appendix B.3.

(a) Logical operators between pairs of $\braket{mm}$ twists. One traverses the
gap between two twists on the same dislocation, while the other joins one
twist from each pair. The coloring in this picture was arbitrary: $e$ and $m$
operators can be found in both configurations. (b) Minimum $x$ width required
to support at least one logical operator, as the height $h$ and separation
$\Delta$ increases. Colors show results for different twist types. A linearly-
increasing width indicates that the weight of the operator should be
superlinear in $\Delta=h$.

Figure 21: Pairs of edge dislocations support superlinear-weight logical
operators.

###  VI.1 Vacancy Encodings

Consider a lattice of size
$(L_{x},L_{y},L_{z})=(L_{\infty},L_{\infty},L_{z})$, where $L_{\infty}\gg
L_{z},\kappa$ with $\kappa$ the correlation length of the ground state, such
that interactions with the $x,y$ boundaries are negligible. We also place
periodic boundary conditions in the $z$ direction. Within this, there is an
$\braket{m}$ vacancy of width $(w_{x},w_{y},L_{z})$ such that it extends
around the periodic boundary. We expect that a single vacancy in this
configuration does not modify the ground state degeneracy, since creating and
annihilating $m$ on the same vacancy is trivial. Indeed, this result is
confirmed by numerical computation, in all cases except when $3|L_{z}$. As
discussed in Section III.1.2, $m$ charges gain 1D mobility along a periodic
boundary, producing additional logical operators. This gives a number of
encoded qubits

$k=4\tau(L_{z};\;L_{\infty})$ (14)

where $\tau$ is defined in Eq. (11), with the factor of $4$ arising from the
two unique string-like operators on the two $(m_{ABC})$ boundaries of the
vacancy. These logical operators all have a linear weight.

Once additional $\braket{m}$ vacancies are introduced, however, additional
logical operators arise. Numerically computing the ground state degeneracies,
the number of encoded qubits scales with

$k=2(v-1)L_{z}+4\tau(L_{z};\;L_{\infty})$ (15)

where $v$ is the number of vacancies.

$m$ excitations can now cascade through the bulk from one vacancy to another,
creating an $\bar{X}$ logical operator with a weight that is superlinear in
the vacancy separation $\Delta$ (using the Manhattan distance). Each
additional vacancy introduces an additional independent site for condensation,
thus increasing $k$. Moreover, since translation is a nontrivial action in the
bulk of the model, performing the cascading procedure at different values of
$z$ produces independent operators. This gives the dependence on $L_{z}$.

On the other hand, the $\bar{Z}$ logical operators are formed from cages of
$e$ excitations encircling a vacancy. Importantly, because these cage
operators are moving charges through the bulk around the vacancy, these must
also have a weight that scales superlinearly with the widths $w_{x},w_{y}$. If
these widths were scaled with the separation between the vacancies, this
encoding has the potential to be partially self-correcting (when
$3\\!\nmid\\!L_{z}$), while also supporting a number of encoded qubits that
scale linearly in $L_{z}$ and the number of vacancies.

If the assumption of $L_{x},L_{y}\gg L_{z}$ is relaxed, such as for an
$(mmp;mmp)$ code with $v$ number of $\braket{m}$ vacancies wrapping around the
periodic boundary, we get two additional logical operators per $L_{z}$, giving

$k=2vL_{z}+4\tau(L_{z};\;L_{\infty})$ (16)

in comparison to Eq. (15). This is because $m$ charges can now also cascade
from the vacancies to a boundary.

Overall, this code is a notable improvement over the original cubic code model
and does not require a subsystem code as in Section IV. Unlike vacancies in
the surface code, there is also no significant trade-off between the code
distance and the number of encoded qubits, since $v$ can be kept constant
while using $L_{z}$ to increase $k$, and using the $x,y$ dimensions (vacancy
width and linear system size) to increase the code distance. However, this
construction does require a topology with one periodic direction.

###  VI.2 Edge Dislocation Encodings

A single edge dislocation in the bulk, far from any boundary, encodes no
additional logical qubits.

However, more appealing behavior arises using multiple edge dislocations.
Consider two dislocations, in Fig. 21a, each of height $h$ in the $z$
direction and separated by perpendicular distance $\Delta$ in the $y$
direction. The dislocation line extends along $x$. Numerically computing the
ground space degeneracy yields

$k=4L_{x}+\mathcal{O}(1)$ (17)

for some additional constant arising depending on the exact choice of twist
stabilizers, $\Delta$, and $h$.

Effectively, these logical operators consist of movement of $e$ and $m$
excitations around and between two of the four twists, as in Fig. 21a.
Importantly, because these cage operators are moving charges through the bulk,
the prohibition of string-like operators means that the width of the support
in the $x$ direction must increase with $h$ and $\Delta$. This result is
confirmed by numerically computing the minimum width that supports logical
operators as we scale $\Delta=h$ in Fig. 21b. Slight variations in the widths
are due to the particulars for constructing the operators around the twists.
However, in all cases, we observe an overall linear trend.

If the analysis above is repeated except with open or periodic boundary
conditions in $x$, we observe the same scaling as in Eq. (17). There is an
additional, constant number of logical operators that have support solely on a
single twist and are string-like in the $x$ direction. Unlike the case with
vacancies, these operators remain even if $3\\!\nmid\\!L_{x}$. As with the
case for _tennis ball 1_ , considering a subsystem code to ignore these extra
logical operators may be sufficient to ensure the dressed code has a
superlinear distance as $\Delta$ and $h$ are increased. A rigorous proof of
this solution is deferred to future works.

As with periodic vacancies, pairs of twists provide a promising approach to
improve the cubic code: maintaining the desirable code distance while encoding
a number of qubits that scales linearly with $L_{x}$.

##  VII Conclusion

In this work, we have presented a systematic study of open boundaries and
defects in Haah’s cubic code. We focused on planar $(100)$-like boundaries
normal to the crystallographic axes and constructed $X$\- and $Z$-type open
boundary conditions using truncated plaquette, edge and vertex stabilizer
terms. The interaction of these boundaries with fractonic topological
excitations depends intrinsically on their orientation: $X$-type negative
faces and $Z$-type positive faces condense single fractons of the respective
type, while the opposing faces lead to increased fracton mobility within their
vicinity. These otherwise fractonic excitations become mobile within a
$(2+1)$D diagonal subsystem along the surface. This implies that the
fundamental no string-like operator property of the original cubic code is
violated in the vicinity of these boundaries.

Similar behavior was observed in the vicinity of vacancies, edge dislocations,
and screw dislocations: patterns of fracton condensation that lead to
increased mobility were seen to depend on the orientation and stabilizer type
of each defect. The nontrivial action of translation symmetry on a type-II
fracton topological phase means that encircling a dislocation defect with a
cage operator can also lead to increased topological excitation mobility. We
found that dislocation defect encodings were therefore able to support
additional forms of logical operators that do not appear for encodings
constructed from boundaries and vacancies.

The cubic code is known to form a partially self-correcting quantum memory on
periodic boundary conditions [43]. The absence of any string-like logical
operator is essential to enable such a quantum memory [16]. With this in mind,
we aimed to determine if it is possible to retain the superlinear distance of
the original cubic code model while making the number of encoded qubits scale
as a simple linear function of the linear system size, without sporadic
fluctuation. We have shown that it is possible to achieve this using a
combination of open and periodic boundaries, vacancies, and defects, despite
the no string-like operator property potentially being lost when translation-
invariance is violated by the introduction of defects. For cubic codes with
open boundary conditions - which are typically easier to realize in a physical
implementation - it is possible to achieve a superlinear code distance by
restricting the encoded states to a subsystem, with all dressed logical
operators maintaining a weight that scales superlinearly with the linear
system size. We have shown this to be possible with the _tennis ball 1_ code
construction. It is an open question whether this can be generalized to other
open boundary condition codes, such as those in Appendix A. Our results also
focused on planar $(100)$-like boundaries; it remains an open question as to
whether alternate constructions such as $(110)$ boundaries yield fundamentally
different behavior.

We showed that emergent $(2+1)$D topological order arises on certain open
boundary conditions, supporting particles with increased mobility.
Interestingly, this phase can be unitarily transformed into the 6-6-6 color
code. We leave a further investigation of this correspondence, such as how it
extends into the bulk, to future research. Similarly, it would be interesting
to relate the bulk cubic code defects to defects of the color code [48] on the
boundary. Presumably, the emergent color code on the boundary has an
associated non-invertible anomaly [57] which is a property of the type-II
fracton bulk phase. Understanding the nature of the surface topological order
could uncover further insights into type-II fracton topological order via a
bulk-boundary correspondence.

In this work we have only explored Pauli-$X$ or $Z$ type boundaries of the
cubic code, rather than more complicated mixed or twisted boundary conditions.
We suspect that such boundary conditions exist and are inequivalent to those
we have studied. Our reasoning uses the construction of twisted boundaries via
gauging symmetry-protected topological (SPT) domain walls [58]. For the cubic
code, this allows a construction of boundaries via the gauging duality to a 3D
fractal Ising model [24, 25]. For one type of boundary condition of the
fractal Ising model, the symmetry action on the boundary is simply the action
of the bulk fractal symmetry restricted to the boundary plane. This symmetry
action on the boundary appears to also be a fractal of the form considered in
Ref. [59]. Following Ref. [59], one can consider stacking the fractal Ising
model with a reflected copy of itself such that the resulting boundary fractal
symmetry supports a nontrivial fractal SPT phase. We can then twist the
boundary condition by the associated SPT entangler and gauge the resulting
model to obtain a twisted boundary condition of a cubic code stacked with a
reflected cubic code. We leave the detailed study and classification of such
twisted boundary conditions to future work. We anticipate that existing
constructions of type-II fracton models from layers of fractal SPTs may prove
advantageous for this study [60].

We now highlight several further directions for future consideration. It
remains to be seen how the results in this paper can be generalized to other
type-II fracton topological phases, such as the additional codes introduced in
Ref. [16] or the fractal spin liquid codes [22]. It would be interesting to
relate defects in the latter codes to known defects in $(2+1)$D topological
codes via the fractalization procedure of Ref. [61]. Our work, together with
previous work on type-I fracton phases [29], raises the question of developing
a general theory of boundaries and defects for fracton topological orders. A
promising approach to this is the inclusion of conventional topological
boundaries and defects into the topological defect network framework for
fracton topological order [62, 63, 64]. Another interesting open question is
the development of a notion of Lagrangian algebra objects [65, 66, 67, 68] for
fracton topological orders that can be used to classify possible gapped
boundaries in relation to fracton braiding statistics [69, 70]. A further
challenge is the extension of these concepts to nonabelian fracton models [71,
72, 73, 74, 75, 76, 77, 78].

Our work leaves open the question of superlinear code distances for subspace
stabilizer encodings in type-II codes with open boundary conditions. It could
be interesting to search for bounds on the best achievable parameters for a
topological subspace stabilizer code with open boundary conditions in
$(3+1)$D. Proving rigorous lower bounds on the code distance and energy
barriers, as well as modifying the decoding algorithms from Ref. [17] and [79]
in the presence of boundaries and defects, would allow us to make a more
definitive judgment on the feasibility of these codes as self-correcting
quantum memories. It would also be useful to consider how lattice defects can
be braided to produce Clifford gate sets, such as with the surface code [27].
Another open direction for future work is calculating the fusion of multiple
twist and screw dislocations to create defects with larger Burgers vectors,
and the relationship between braiding and condensations on these defects. This
raises the challenge of developing a theory of translation symmetry enrichment
for fracton topological orders, extending the $(2+1)$D results of Ref. [52].
This is a promising lens through which to understand the general structure of
fracton topological orders on crystal lattices. We remark that the possible
phenomena exhibited by known fracton models reveal a far richer theory than
the two-dimensional analog [80]. In particular, a general theory should
capture the interplay between subgroups of translation symmetry and
bifurcating entanglement-renormalization group flows satisfied by fracton
topological orders including the cubic code [81, 82, 83, 84].

###### Acknowledgements.

The authors acknowledge fruitful collaboration with Tom Iadecola and Meng
Cheng during the early stages of this work. AD and DB are supported by the
Simons Collaboration on Ultra-Quantum Matter, which is a grant from the Simons
Foundation (651438, AD; 651440, DB). AD is also supported by the Institute for
Quantum Information and Matter, an NSF Physics Frontiers Center (PHY-1733907).
ACD is supported by the Australian Research Council Centre of Excellence for
Engineered Quantum Systems (EQUS, CE170100009). DW is supported by the
Australian Research Council Discovery Early Career Research Award
(DE220100625).

## References

  * Shor [1995] P. W. Shor, Scheme for reducing decoherence in quantum computer memory, Physical Review A 52, R2493 (1995).
  * Steane [1996] A. M. Steane, Error Correcting Codes in Quantum Theory, Physical Review Letters 77, 793 (1996).
  * Shor [1997] P. W. Shor, Fault-tolerant quantum computation (1997), arxiv:quant-ph/9605011 .
  * Preskill [1998] J. Preskill, Fault-Tolerant Quantum Computation, in  _Introduction to Quantum Computation and Information_ (WORLD SCIENTIFIC, 1998) pp. 213–269.
  * Kitaev [2003] A. Y. Kitaev, Fault-tolerant quantum computation by anyons, Annals of Physics 303, 2 (2003), arxiv:quant-ph/9707021 .
  * Bravyi and Kitaev [1998] S. B. Bravyi and A. Y. Kitaev, Quantum codes on a lattice with boundary, arXiv:quant-ph/9811052 (1998), arxiv:quant-ph/9811052 .
  * Dennis  _et al._ [2002] E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, Topological quantum memory, Journal of Mathematical Physics 43, 4452 (2002), arxiv:quant-ph/0110143 .
  * Brown  _et al._ [2016] B. J. Brown, D. Loss, J. K. Pachos, C. N. Self, and J. R. Wootton, Quantum memories at finite temperature, Reviews of Modern Physics 88, 045005 (2016), arxiv:1411.6643 [cond-mat, physics:quant-ph] .
  * Alicki  _et al._ [2009] R. Alicki, M. Fannes, and M. Horodecki, On thermalization in Kitaev’s 2D model, Journal of Physics A: Mathematical and Theoretical 42, 065303 (2009).
  * Bravyi and Terhal [2009] S. Bravyi and B. Terhal, A no-go theorem for a two-dimensional self-correcting quantum memory based on stabilizer codes, New Journal of Physics 11, 043029 (2009).
  * Bravyi  _et al._ [2010a] S. Bravyi, D. Poulin, and B. Terhal, Tradeoffs for Reliable Quantum Information Storage in 2D Systems, Physical Review Letters 104, 050503 (2010a).
  * Alicki  _et al._ [2010] R. Alicki, M. Horodecki, P. Horodecki, and R. Horodecki, On Thermal Stability of Topological Qubit in Kitaev’s 4D Model, Open Systems & Information Dynamics 17, 1 (2010).
  * Yoshida [2011] B. Yoshida, Feasibility of self-correcting quantum memory and thermal stability of topological order, Annals of Physics 326, 2566 (2011).
  * Haah and Preskill [2012] J. Haah and J. Preskill, Logical-operator tradeoff for local quantum codes, Physical Review A 86, 032308 (2012).
  * Landon-Cardinal and Poulin [2013] O. Landon-Cardinal and D. Poulin, Local Topological Order Inhibits Thermal Stability in 2D, Physical Review Letters 110, 090502 (2013).
  * Haah [2011] J. Haah, Local stabilizer codes in three dimensions without string logical operators, Physical Review A 83, 042330 (2011), arxiv:1101.1962 .
  * Haah [2013a] J. Haah, Lattice quantum codes and exotic topological phases of matter, arXiv:1305.6973 [quant-ph] (2013a), arxiv:1305.6973 [quant-ph] .
  * Chamon [2005] C. Chamon, Quantum Glassiness in Strongly Correlated Clean Systems: An Example of Topological Overprotection, Physical Review Letters 94, 040402 (2005).
  * Bravyi  _et al._ [2011] S. Bravyi, B. Leemhuis, and B. M. Terhal, Topological order in an exactly solvable 3D spin model, Annals of Physics 326, 839 (2011).
  * Castelnovo and Chamon [2012] C. Castelnovo and C. Chamon, Topological quantum glassiness, Philosophical Magazine 92, 304 (2012).
  * Kim [2012] I. H. Kim, $3$D local qupit quantum code without string logical operator, arXiv , 9 (2012), arXiv:1202.0052 .
  * Yoshida [2013] B. Yoshida, Exotic topological order in fractal spin liquids, Physical Review B 88, 125122 (2013), arxiv:1302.6248 .
  * Vijay  _et al._ [2015] S. Vijay, J. Haah, and L. Fu, A new kind of topological quantum order: A dimensional hierarchy of quasiparticles built from stationary excitations, Physical Review B 92, 235136 (2015).
  * Vijay  _et al._ [2016] S. Vijay, J. Haah, and L. Fu, Fracton Topological Order, Generalized Lattice Gauge Theory and Duality, Physical Review B 94, 235157 (2016), arxiv:1603.04442 .
  * Williamson [2016] D. J. Williamson, Fractal symmetries: Ungauging the cubic code, Physical Review B 94, 155128 (2016), arxiv:1603.05182 [cond-mat, physics:hep-lat, physics:quant-ph] .
  * Bravyi and Haah [2011] S. Bravyi and J. Haah, On the energy landscape of 3D spin Hamiltonians with topological order, Physical Review Letters 107, 150504 (2011), arxiv:1105.4159 .
  * Bombin [2010a] H. Bombin, Topological Order with a Twist: Ising Anyons from an Abelian Model, Physical Review Letters 105, 030403 (2010a), arxiv:1004.1838 .
  * Brown  _et al._ [2017] B. J. Brown, K. Laubscher, M. S. Kesselring, and J. R. Wootton, Poking holes and cutting corners to achieve Clifford gates with the surface code, Physical Review X 7, 021029 (2017), arxiv:1609.04673 [cond-mat, physics:quant-ph] .
  * Bulmash and Iadecola [2019] D. Bulmash and T. Iadecola, Braiding and Gapped Boundaries in Fracton Topological Phases, Physical Review B 99, 125132 (2019), arxiv:1810.00012 .
  * Bombin and Martin-Delgado [2006] H. Bombin and M. A. Martin-Delgado, Topological Quantum Distillation, Physical Review Letters 97, 180501 (2006).
  * Bacon [2005] D. Bacon, Operator Quantum Error Correcting Subsystems for Self-Correcting Quantum Memories, Physical Review A - Atomic, Molecular, and Optical Physics 73, 10.1103/PhysRevA.73.012340 (2005), arXiv:0506023 [quant-ph] .
  * Poulin [2005] D. Poulin, Stabilizer Formalism for Operator Quantum Error Correction, Physical Review Letters 95, 10.1103/PhysRevLett.95.230504 (2005), arXiv:0508131 [quant-ph] .
  * Calderbank  _et al._ [1997] A. R. Calderbank, E. M. Rains, P. W. Shor, and N. J. A. Sloane, Quantum Error Correction and Orthogonal Geometry, Physical Review Letters 78, 405 (1997).
  * Gottesman [1998] D. Gottesman, The Heisenberg Representation of Quantum Computers, arXiv:quant-ph/9807006 (1998), arxiv:quant-ph/9807006 .
  * Wen [1990] X. G. Wen, Topological Orders in Rigid States, International Journal of Modern Physics B 04, 239 (1990).
  * Bravyi  _et al._ [2010b] S. Bravyi, M. B. Hastings, and S. Michalakis, Topological quantum order: Stability under local perturbations, Journal of Mathematical Physics 51, 093512 (2010b).
  * Wen [2017] X.-G. Wen, Colloquium: Zoo of quantum-topological phases of matter, Reviews of Modern Physics 89, 041004 (2017).
  * Roberts and Bartlett [2020] S. Roberts and S. D. Bartlett, Symmetry-Protected Self-Correcting Quantum Memories, Physical Review X 10, 031041 (2020).
  * Bombin  _et al._ [2013] H. Bombin, R. W. Chhajlany, M. Horodecki, and M. A. Martin-Delgado, Self-correcting quantum computers, New Journal of Physics 15, 055023 (2013).
  * Chesi  _et al._ [2010] S. Chesi, B. Röthlisberger, and D. Loss, Self-correcting quantum memory in a thermal environment, Physical Review A 82, 022305 (2010).
  * Becker  _et al._ [2013] D. Becker, T. Tanamoto, A. Hutter, F. L. Pedrocchi, and D. Loss, Dynamic generation of topologically protected self-correcting quantum memory, Physical Review A 87, 042340 (2013).
  * Brell [2016] C. G. Brell, A proposal for self-correcting stabilizer quantum memories in 3 dimensions (or slightly less), New Journal of Physics 18, 013050 (2016).
  * Bravyi and Haah [2013] S. Bravyi and J. Haah, Analytic and numerical demonstration of quantum self-correction in the 3D Cubic Code, Physical Review Letters 111, 200501 (2013), arxiv:1112.3252 .
  * Haah [2013b] J. Haah, Commuting Pauli Hamiltonians as Maps between Free Modules, Communications in Mathematical Physics 324, 351 (2013b).
  * Gottesman [1997] D. E. Gottesman,  _Stabilizer Codes and Quantum Error Correction_ , Ph.D. thesis, California Institute of Technology (1997).
  * Dua  _et al._ [2019a] A. Dua, I. H. Kim, M. Cheng, and D. J. Williamson, Sorting topological stabilizer models in three dimensions, Physical Review B 100, 155137 (2019a), arxiv:1908.08049 .
  * Bombín [2015] H. Bombín, Gauge color codes: Optimal transversal gates and gauge fixing in topological stabilizer codes, New Journal of Physics 17, 083002 (2015).
  * Kesselring  _et al._ [2018] M. S. Kesselring, F. Pastawski, J. Eisert, and B. J. Brown, The boundaries and twist defects of the color code and their applications to topological quantum computation, Quantum 2, 101 (2018).
  * Dua  _et al._ [2019b] A. Dua, D. J. Williamson, J. Haah, and M. Cheng, Compactifying fracton stabilizer models, Physical Review B 99, 245135 (2019b).
  * Bombin [2010b] H. Bombin, Topological subsystem codes, Physical Review A 81, 032301 (2010b).
  * Brown  _et al._ [2013] B. J. Brown, S. D. Bartlett, A. C. Doherty, and S. D. Barrett, Topological Entanglement Entropy with a Twist, Physical Review Letters 111, 220402 (2013), arxiv:1303.4455 .
  * Barkeshli  _et al._ [2019] M. Barkeshli, P. Bonderson, M. Cheng, and Z. Wang, Symmetry fractionalization, defects, and gauging of topological phases, Physical Review B 100, 10.1103/PhysRevB.100.115147 (2019), arXiv:1410.4540 .
  * You [2019] Y. You, Non-Abelian defects in fracton phases of matter, Physical Review B 100, 075148 (2019).
  * Barkeshli  _et al._ [2022] M. Barkeshli, Y.-A. Chen, S.-J. Huang, R. Kobayashi, N. Tantivasadakarn, and G. Zhu, Codimension 2 defects and higher symmetries in (3+1)D topological phases (2022), arxiv:2208.07367 [cond-mat, physics:hep-th, physics:math-ph, physics:quant-ph] .
  * Krishna and Poulin [2020] A. Krishna and D. Poulin, Topological wormholes: Nonlocal defects on the toric code, Physical Review Research 2, 023116 (2020).
  * Manoj  _et al._ [2021] N. Manoj, K. Slagle, W. Shirley, and X. Chen, Screw dislocations in the X-cube fracton model, SciPost Physics 10, 094 (2021), arxiv:2012.07263 .
  * Ji and Wen [2019] W. Ji and X. G. Wen, Noninvertible anomalies and mapping-class-group transformation of anomalous partition functions, Physical Review Research 1, 10.1103/PhysRevResearch.1.033054 (2019), arXiv:1905.13279 .
  * Yoshida [2017] B. Yoshida, Gapped boundaries, group cohomology and fault-tolerant logical gates, Annals of Physics 377, 387 (2017), arXiv:1509.03626 .
  * Devakul [2019] T. Devakul, Classifying local fractal subsystem symmetry-protected topological phases, Physical Review B 99, 235131 (2019).
  * Williamson and Devakul [2021] D. J. Williamson and T. Devakul, Type-II fractons from coupled spin chains and layers, Physical Review B 103, 155140 (2021).
  * Devakul and Williamson [2021] T. Devakul and D. J. Williamson, Fractalizing quantum codes, Quantum 5, 438 (2021).
  * Slagle  _et al._ [2019] K. Slagle, D. Aasen, and D. Williamson, Foliated field theory and string-membrane-net condensation picture of fracton order, SciPost Physics 6, 10.21468/scipostphys.6.4.043 (2019), arXiv:1812.01613 .
  * Aasen  _et al._ [2020] D. Aasen, D. Bulmash, A. Prem, K. Slagle, and D. J. Williamson, Topological defect networks for fractons of all types, Physical Review Research 2, 043165 (2020).
  * Song  _et al._ [2023a] Z. Song, A. Dua, W. Shirley, and D. J. Williamson, Topological Defect Network Representations of Fracton Stabilizer Codes, PRX Quantum 4, 010304 (2023a).
  * Levin [2013] M. Levin, Protected Edge Modes without Symmetry, Physical Review X 3, 021009 (2013).
  * Beigi  _et al._ [2011] S. Beigi, P. W. Shor, and D. Whalen, The Quantum Double Model with Boundary: Condensations and Symmetries, Communications in Mathematical Physics 306, 663 (2011), arXiv:1006.5479 .
  * Kitaev and Kong [2012] A. Kitaev and L. Kong, Models for Gapped Boundaries and Domain Walls, Communications in Mathematical Physics 313, 351 (2012), arXiv:1104.5047 .
  * Kong [2014] L. Kong, Anyon condensation and tensor categories, Nuclear Physics B 886, 436 (2014), arXiv:1307.8244 .
  * Pai and Hermele [2019] S. Pai and M. Hermele, Fracton fusion and statistics, Physical Review B 100, 10.1103/PhysRevB.100.195136 (2019), arXiv:1903.11625 .
  * Song  _et al._ [2023b] H. Song, N. Tantivasadakarn, W. Shirley, and M. Hermele, Fracton Self-Statistics,  (2023b), arXiv:2304.00028 .
  * Vijay and Fu [2017] S. Vijay and L. Fu, A Generalization of Non-Abelian Anyons in Three Dimensions,  (2017), arXiv:1706.07070 .
  * Prem  _et al._ [2019] A. Prem, S. J. Huang, H. Song, and M. Hermele, Cage-Net Fracton Models, Physical Review X 9, 10.1103/PhysRevX.9.021010 (2019), arXiv:1806.04687 .
  * Song  _et al._ [2019] H. Song, A. Prem, S. J. Huang, and M. A. Martin-Delgado, Twisted fracton models in three dimensions, Physical Review B 99, 10.1103/PhysRevB.99.155118 (2019), arXiv:1805.06899 .
  * Prem and Williamson [2019] A. Prem and D. Williamson, Gauging permutation symmetries as a route to non-Abelian fractons, SciPost Physics 7, 068 (2019), arXiv:1905.06309 .
  * Bulmash and Barkeshli [2019] D. Bulmash and M. Barkeshli, Gauging fractons: Immobile non-Abelian quasiparticles, fractals, and position-dependent degeneracies, Physical Review B 100, 10.1103/PhysRevB.100.155146 (2019), arXiv:1905.05771 .
  * Williamson and Cheng [2023] D. J. Williamson and M. Cheng, Designer non-Abelian fractons from topological layers, Physical Review B 107, 10.1103/PhysRevB.107.035103 (2023), arXiv:2004.07251 .
  * Sullivan  _et al._ [2021] J. Sullivan, T. Iadecola, and D. J. Williamson, Planar p-string condensation: Chiral fracton phases from fractional quantum Hall layers and beyond, Physical Review B 103, 10.1103/PhysRevB.103.205301 (2021), arXiv:2010.15127 .
  * Tantivasadakarn  _et al._ [2021] N. Tantivasadakarn, W. Ji, and S. Vijay, Non-Abelian hybrid fracton orders, Physical Review B 104, 10.1103/PhysRevB.104.115117 (2021), arXiv:2106.03842 .
  * Brown and Williamson [2020] B. J. Brown and D. J. Williamson, Parallelized quantum error correction with fracton topological codes, Physical Review Research 2, 013303 (2020), arxiv:1901.08061 .
  * Else and Thorngren [2019] D. V. Else and R. Thorngren, Crystalline topological phases as defect networks, Physical Review B 99, 10.1103/PhysRevB.99.115116 (2019), arXiv:1810.10539 .
  * Evenbly and Vidal [2014] G. Evenbly and G. Vidal, Class of highly entangled many-body states that can be efficiently simulated, Physical Review Letters 112, 240502 (2014), arXiv:1210.1895 .
  * Haah [2014] J. Haah, Bifurcation in entanglement renormalization group flow of a gapped spin model, Physical Review B - Condensed Matter and Materials Physics 89, 75119 (2014), arXiv:1310.4507 .
  * Shirley  _et al._ [2018] W. Shirley, K. Slagle, Z. Wang, and X. Chen, Fracton Models on General Three-Dimensional Manifolds, Physical Review X 8, 10.1103/PhysRevX.8.031051 (2018), arXiv:1712.05892 .
  * Dua  _et al._ [2019c] A. Dua, P. Sarkar, D. J. Williamson, and M. Cheng, Bifurcating entanglement-renormalization group flows of fracton stabilizer models, PHYSICAL REVIEW RESEARCH 2, 33021 (2019c), arXiv:1909.12304 .
  * Kitaev [1997] A. Yu. Kitaev, Quantum Error Correction with Imperfect Gates, in  _Quantum Communication, Computing, and Measurement_, edited by O. Hirota, A. S. Holevo, and C. M. Caves (Springer US, Boston, MA, 1997) pp. 181–188.
  * Alloul  _et al._ [2009] H. Alloul, J. Bobroff, M. Gabay, and P. J. Hirschfeld, Defects in correlated metals and superconductors, Reviews of Modern Physics 81, 45 (2009).

##  Appendix A  Additional Boundary Codes

Configurations such as _tennis ball 1_ , vacancies around periodic boundaries,
and pairs of twists have the potential to be partially self-correcting, while
having a number of encoded qubits that scales linearly in some macroscopic
quantity. However, this behavior is not true for the majority of other
configurations. In this section, we present the remaining results from a
systematic study of all boundary configurations (up to symmetries, and with
pure $(100)$-like planar boundaries). A discussion on defects is provided in
Appendix B.

We first consider models with open boundary conditions on all six faces,
before also addressing combinations with periodic boundaries. We perform a
systematic search over all configurations, up to symmetries, and their key
results are summarized in Tables 1 and 2.

###  A.1 Simple Cases

Following the construction in Section III, we first verify that our boundary
conditions produce gapped surface Hamiltonians. To do so, we construct an
$(L_{x},L_{y},L_{z})$ model with only $X$ or $Z$ stabilizers on all faces:
$(eee;eee)$ or $(mmm;mmm)$. Numerically, we verify that all configurations
(tested up to reasonable lattice sizes) contain a non-degenerate ground state
- or equivalently, no encoded qubits. Intuitively, this agrees with our
analysis so far. Consider $(mmm;mmm)$. Using either the cascading procedure or
the fractal tetrahedra, one can consider $m$ excitations moving between two or
more opposing boundaries of the lattice, creating an operator that commutes
with the stabilizers. However, no product of $Z$ operators can create and
annihilate $e$ excitations to produce a nontrivial $\bar{Z}$ logical operator.
There are thus no encoded logical qubits and an equivalent argument holds for
$(eee;eee)$.

For similar reasons, if one face is replaced with the opposing boundary type,
such as $(mmm;emm)$, we again see no encoded logical qubits. As with other
stabilizer codes, creating an excitation on a boundary and then condensing it
back into the same boundary does not constitute a nontrivial operation [6].

###  A.2 Tennis Ball 2

In addition to the first _tennis ball_ code discussed in Section IV.1, there
are two additional configurations that we argued may have a superlinear
distance. The second _tennis ball_ code is specified using $(e)$ and $(m)$ on
the remaining two faces. Consider the case shown in Table 1, with $(mee;mem)$.

The logical operators can be constructed by a similar cascading procedure to
_tennis ball 1_ , except now acting along a diagonal direction (see Fig. 22).
As with the first _tennis ball_ , not all such logical operators are
superlinear. Indeed, those localized near the $(\bar{1}\bar{1}0)$ and $(011)$
edges are constant-weight with respect to the linear system size. That is, as
$L_{x},L_{y},L_{z}$ are increased, there will remain a number of logical
operators with constant support, localized near those edges.

(a) The $\bar{X}$ logical operators that condense $m$ charges on the
$(\bar{1}00)$ and $(00\bar{1})$ faces can be constant-weight as the lattice
size increases. (b) The $\bar{Z}$ logical operators that condense $e$ charges
on the $(010)$ and $(001)$ faces can also be constant-weight as the lattice
size increases.

Figure 22: Logical operators on the second _tennis ball_ configuration,
$(mee;mem)$. Solid shapes indicate repeated applications of the $F$ operators
to cascade $m$ (yellow) and $e$ (cyan) charges. Red faces represent $X$, and
blue for $Z$, stabilizer choices on the boundaries.

Numerically computing the ground state degeneracy, we arrive at a number of
encoded qubits

$k=2L_{z}-6$ (18)

with the constant offset in comparison to _tennis ball 1_ due to the inclusion
of vertex stabilizer terms, which would otherwise be incorporated as local
logical operators. Note that the analysis here can also be generalized to
explain the scaling of encoded qubits for $(eee;mem)$ and $(eee;mmm)$ in Table
1 (the latter of which has a logical algebra constructed from two independent
sets of these diagonal operators).

As with _tennis ball 1_ , this code, therefore, does not generally have a
superlinear distance. However, it may be possible to generalize the arguments
for the subsystem code to also reduce these logical operators into
superlinear-weight dressed operators. The specifics of this approach are left
as a future consideration.

###  A.3 Tube

The third code, _tube_ , is specified with $(e)$ and $(e_{ABC})$ \- or
equivalently, $(m)$ and $(m_{ABC})$ \- on the remaining two faces. In Table 1,
we have chosen $(mee;mee)$.

The $\bar{X}$ logical operators must cascade $m$ charges between the $(m)$ and
$(m_{ABC})$ boundaries, as these are the only possible condensation sites.
Such a cascading procedure must incur a superlinear weight as it moves through
the bulk of the lattice. Unlike with the _tennis ball_ configurations, there
is no adjacent $(m_{ABC})$ face on which the cascade can be cut-off, and there
are thus no linear-weight operators for $\bar{X}$. On the other hand, $e$
charges can move as strings along the $(e_{ABC})$ boundary of $(00\bar{1})$ as
in _tennis ball 1_ , and can also form local operators between the $(e)$
boundaries of $(010)$ and $(001)$ as in _tennis ball 2_. This configuration,
therefore, improves the $\bar{X}$ distance while reducing the distance for
$\bar{Z}$ errors.

Numerically computing the ground state degeneracy for small system sizes
yields a number of encoded qubits

$k=2(L_{y}+L_{z}-L_{x})-3$ (19)

We can heuristically explain this by considering the cascading of $m$ charges
from $(100)$ to $(\bar{1}00)$. Using $F_{m}^{\bar{x}\bar{y}}$, we can create
$m$ on $(100)$ and push them in the $-\hat{x}$ direction. Since the support of
the operator increases in width with distance, the maximum distance that the
charge can be pushed is $L_{y}$ before the operator encounters an $(e)$
boundary, beyond which it is confined. Using $F_{m}^{\bar{x}\bar{z}}$, the
accumulated charges can be cascaded a further $L_{z}$ distance towards
$(\bar{1}00)$. If $L_{x}>L_{y}+L_{z}$ we should thus get no logical operators.
For each $L_{x}<L_{y}+L_{z}$, we expect two additional independent logical
operators, accounting for the two unique condensation operators. The constant
factor of $3$ again arises due to the particular choice of edge and vertex
stabilizers on the boundary seams.

###  A.4 Periodic Boundaries

There are further configurations possible that include mixtures of periodic
and open boundary conditions. All possible combinations, up to symmetry, are
summarized in Table 2.

As discussed in Section II and Ref. [17], the ground state degeneracy of
$(ppp;ppp)$ is highly dependent on the specific value of $L$. This is because
the logical operators are formed from combinations of fractal tetrahedra with
excitations at the four vertices. When $L$ is a power of $2$, these tetrahedra
tessellate perfectly and the number of encoded qubits scales as $k=4L-2$. For
other values of $L$, the tetrahedra need to be combined in particular ways,
possibly wrapping around the periodic boundaries multiple times, leading to a
nontrivial function for $k$, as defined in Eq. (6).

For $(ppe;ppe)$, these tetrahedral operators in $Z$ remain as logical
operators, condensing $e$ at the open boundaries or in a similar process to
$(ppp;ppp)$. However, the tetrahedra from $X$ create $m$ excitations that
cannot condense at the open boundaries, and thus these operators are no longer
logical. This reduces the number of encoded qubits by a factor of $2$ compared
to $(ppp;ppp)$. Additionally, the periodic behavior described in Section
III.1.2 now applies, resulting in additional logical operators when $3|L$.
This leads to a scaling

$k=\frac{1}{2}k_{(ppp;ppp)}+2\tau(L;\;\infty)$ (20)

when $L_{x}=L_{y}=L$. Because the $e$ excitations can condense at both
boundaries in $z$, and the periodic behavior is unaffected by $L_{z}$, this
scaling only depends on $L_{x},L_{y}$. Note that the string operators on
$(00\bar{1})$ are not confined by the $(001)$ face, since $e$ excitations are
able to condense there, hence the $\tau$ scaling is also unbounded by $L_{z}$.

In the case of $(ppm;ppe)$ boundaries, single $m$ or $e$ excitations are not
condensed at either boundary, and we have $(m_{ABC})$ and $(e_{ABC})$ on
$(001)$ and $(00\bar{1})$ respectively. The logical operators here are
described by the discussion in Section III.1.2, and this process can occur on
both $(00\bar{1})$ and $(001)$, giving twice as many. For $(pmm;pem)$, a
similar behavior occurs, with string operators on the $(e_{ABC})$ face of
$(00\bar{1})$ wrapping around the periodic-$x$ boundary.

However, for $(ppe;ppm)$ there are no encoded logical operators. Neither the
$(001)$ $(e)$ boundary nor the $(00\bar{1})$ $(m)$ boundary support string
operators.

Finally, $(pem;pem)$ can be explained using the cascading procedure. As with
$(mem;eem)$ \- a rotation of the _tennis ball 1_ configuration in Section IV
such that $z$ becomes $x$ \- there are $k=2L_{x}$ encoded qubits. Indeed, the
logical operators here are equivalent: excitations are created at $(e_{ABC})$
or $(m_{ABC})$, and cascade towards $(e)$ or $(m)$ where they are condensed.
These operators can be confined to single $yz$ planes, leading to the linear
dependence on $L_{x}$. The periodic boundaries in $x$ do not impede or alter
this process. However, when $3|L_{x}$, some of these operators can be written
as strings across the $(e_{ABC})$ and $(m_{ABC})$ boundaries. We therefore get
$4\tau(L_{x};\;\infty)\leq 4L_{x}/3$ number of linear-weight operators,
leaving a minimum of $2L_{x}/3$ superlinear-weight operators. To avoid this
behavior or the need for a subsystem code, linear system size can be
restricted to $3\\!\nmid\\!\\!L_{x}$. In such cases, since the cascading
operators form a complete logical algebra and no further linear or constant-
weight operators are introduced, we, therefore, expect $(pem;pem)$ to be a
stabilizer code with distance that is superlinear in $L_{y},L_{z}$.

##  Appendix B  Additional Defect Codes

We now present the remaining results regarding the use of screw and edge
dislocations in the bulk, adding to the discussions in Section VI.

Figure 23: Two $\braket{m}$ vacancies of size $(w_{ix},w_{iy},w_{iz})$ for
$i=1,2$ separated by a Manhattan distance $\Delta$ in the bulk.

###  B.1 Additional Vacancy Encodings

We now examine codes that incorporate vacancies into both a bulk model and
those involving boundaries. Consider a non-periodic lattice with
$L_{\infty}\gg\kappa$ in $x,y,z$, where $\kappa$ is the correlation length of
the system such that any interaction with boundary conditions can be deemed
negligible. One $\braket{m}$ or $\braket{e}$ vacancy of any size does not
support any logical operators, since any action that creates and condenses
charges on the same vacancy is trivial modulo the stabilizers. This is
consistent with results from the surface code [85, 27].

A similar result is found with one $\braket{m}$ and one $\braket{e}$ vacancy
separated in the bulk, since no excitation can condense at both vacancies.

However, consider two $\braket{m}$ vacancies, each of width
$(w_{ix},w_{iy},w_{iz})$ where $i=1,2$, separated by a Manhattan distance
$\Delta$. This is shown in Fig. 23. $m$ excitations can cascade in the
negative direction, moving between the two vacancies. Since cascading produces
additional excitations proportional to the distance traversed, we expect this
procedure to be a logical operator only if the negative vacancy is large
enough to condense these excitations. Without loss of generality, assume the
two vacancies are separated in $z$, with $i=1$ being in the negative
direction. We thus have the condition that $k>0$ only if $\Delta\lesssim
w_{1x}+w_{1y}$.

Numerically computing the ground state degeneracy confirms this result, and
provides a number of encoded qubits

$k=2(w_{1x}+w_{1y}-\Delta)+c$ (21)

where

$c=\begin{cases}1&\left[3\,|\,(1+w_{1x}+w_{1y})\right]\;\cap\;\left[w_{1x}+w_{1y}=\Delta\right]\\\
0&\text{otherwise}\end{cases}$ (22)

as shown in Fig. 24. Here, $c$ is a correction factor arising when composing
$F_{m}$ operators results in a deviation to the distance reached for a given
width.

Figure 24: Numerical computation of the encoded qubits in a pair of
$\braket{m}$ vacancies oriented along the ${z}$ direction, separated by
distance $\Delta$. The vacancy in the negative direction has size
$(w_{1x},w_{1y},w_{1z})=(w_{x},1,1)$, where $w_{x}$ is varied in the figure,
and the positive vacancy has $(1,1,1)$. We see the relationship in Eq. (21),
with the slight deviations when $w_{x}=1,4,7$ due to the non-uniformity of
composing $F_{m}$ operators.

Note that the positive vacancy widths do not affect the scaling, since it only
needs one lattice point to condense the tip of the cascading operators. The
opposite result holds for $\braket{e}$ vacancies, where $w_{2}$ affects the
scaling, rather than $w_{1}$.

These cascading operators give a form for the $\bar{X}$ logical operators. On
the other hand, $\bar{Z}$ logical operators are expected to be formed from
moving $e$ charges around the $\braket{m}$ vacancy itself, similar to the
periodic case. Unlike those vacancies, however, many of these cage operators
can be cleaned onto a pyramidal region near the $\hat{x}+\hat{y}+\hat{z}$
vertex of the vacancy and therefore will be local and constant-weight,
independent of $(w_{ix},w_{iy},w_{iz})$. This is problematic for the
construction of a superlinear-distance error correction code, and it is
nontrivial to determine if a subsystem approach is sufficient to create
superlinear-weight dressed logical operators. Crucially, the existing lemmas
rely on bulk properties that no longer hold in the vicinity of a defect, and
so this remains an open question for future research. It, therefore, appears
that periodic vacancies provide a more suitable method for improving $k$ while
maintaining the partial self-correction properties.

###  B.2 Additional Edge Dislocation Encodings

As mentioned, a single edge dislocation (a pair of twists) in the bulk far
from any boundaries do not increase the ground state degeneracy. On periodic
boundary conditions (such that the dislocation line extends around the
periodic direction), the string-like operators seen in other configurations
emerge when $3|L$.

However, there are additional linear-weight operators. Consider a
$\braket{ee}$ dislocation extending in the $x$ direction. Acting on one
trapezoidal prism in the twist with the $T_{X}$ operator creates excitations
in the neighboring $T_{Z}$ stabilizers by nature of their anti-commutation. By
repeating $T_{X}$ on every second trapezoidal prism, these excitations can
move along the defect line. Therefore, if $2|L_{x}$, these excitations can
wrap around the periodic boundary and annihilate. There are two such operators
that do this, depending on the starting position. If $L_{x}$ is not a multiple
of $2$, these excitations can wrap around the periodic boundary twice,
annihilating again. In this case, there is only one unique operator: the
product of $T_{X}$ on all trapezoidal prisms.

Although the period-3 strings are independent when constructed on either of
the two $e$ twists, these new operators formed on either twist are equivalent
modulo stabilizers. Therefore, combining these two behaviors we get a scaling
of

$k=8\tau(L_{x};\;L)+\begin{cases}2&2|L_{x}\\\ 1&\text{otherwise}\end{cases}$
(23)

where $L$ is the appropriate linear system size to confine the string-like
operators. An equivalent result also holds for $\braket{mm}$. For mixed twists
$\braket{me},\braket{em}$, the factor of ${2,1}$ does not appear since the
corresponding anti-commuting logical operator spans the separation between the
two twists, which must therefore both be of the same type.

###  B.3 Screw Dislocation Encodings

A single $\braket{R}$ or $\braket{L}$ screw situated far from any boundary has
no logical operators. When extending around a periodic boundary, the period-3
strings are present. Since both $e$ and $m$ can condense on a screw
dislocation due to the lack of any stabilizer terms, we get twice as large a
contribution to the number of encoded qubits per screw. For one screw
extending in the $z$ direction, we get

$k=4\tau(L_{z};\;L_{\infty})$ (24)

For multiple screws, we first consider the case when the net Burgers vector is
zero. That is, we have one $\braket{L}$ and one $\braket{R}$ separated by a
Manhattan distance $\Delta$. Computing the ground state degeneracy, we find
the number of encoded qubits to be

$k=4\tau(L_{z};\;L_{\infty})+2q_{2}(\Delta)$ (25)

using the function $q$ from Eq. (4). Unlike edge dislocations, we thus have a
number of additional encoded qubits independent of the system size.
Heuristically, this is linked to the idea that the action of the screw
dislocation introduces mobility along the defect. Spatially-translated
operators are now no longer necessarily independent. Since these additional
logical operators are spanning the bulk between the two screws, we expect this
configuration to have a superlinear distance, scaling with $\Delta$. However,
the constant $k$ value means that these encodings are not ideal candidates in
our search for improvements to the cubic code. Although $k$ could be increased
by potentially introducing additional screws, this runs into a similar problem
observed in the surface code: increasing the weight involves increasing the
separation between screws while increasing $k$ involves increasing the number
of screws. Achieving both simultaneously results in the system size increasing
significantly [11].

From a physical perspective, a nonzero Burgers vector would have a macroscopic
effect on the bulk of the material, rather than just on a localized region,
and is thus unlikely to be created in isolation [86]. Nevertheless, we can
still consider the effect of two $\braket{R}$ or $\braket{L}$ screws in the
bulk. In this case, the formula is

$k=4\left\lfloor\frac{L_{z}-1}{2}\right\rfloor+4\tau(L_{z};\;L_{\infty})+2q_{2}(\Delta)$
(26)

gaining an additional set of logical operators that increases in number with
$L_{z}$.

##  Appendix C Additional Material

###  C.1 Proof of Eq. (9)

We first note the following lemma:

######  Lemma 1.

Let $P$ be a local set of ($X$ or $Z$) Pauli operators with nontrivial
excitations occurring on the dual lattice sites $S$, with $|S|>1$. Choose an
arbitrary site $s\in S$ to be the “anchor” of $P$. Define the new operator
$P^{\prime}$ by: for each $s_{i}\in S$, apply the operator $P$, translated so
that the anchor point acts on $s_{i}$. Then, the pattern of excitations
created by $P^{\prime}$ is the pattern created by $P$, scaled by a factor of
$2$ in all directions.

We now present the proof of Eq. (9):

###### Proof.

First, consider the case where $3\\!\nmid\\!\\!L$. Here, the coloring of
$A,B,C$ is not consistent across the periodic boundary. An operator that moves
$e_{A}$ across the boundary will transmute it into an $e_{B}$, for example.
Repeating this will transmute $e_{B}$ into an $e_{C}$. Applying it a final
time will return $e_{C}$ back into $e_{A}$, annihilating with the original
charge. However, $e_{A}\times e_{B}\times e_{C}\sim 1$, and hence we have
effectively moved a trivial charge around the boundary - therefore producing a
trivial operator. This gives $z_{\text{max}}(L)=0$ when $3\\!\nmid\\!\\!L$ as
required.

We now demonstrate the arguments for $L=3,6,9$, before generalizing these
results to arbitrary $L$.

Consider $L=3$. We employ the operator $G$, first shown in Fig. 8, drawn into
a 2D plane as in Fig. 25 such that all excitations are only of type $e_{A}$.

Figure 25: The operator $G$, constructed out of $IZ$ and $ZZ$ terms, which
moves $e$ excitations along a line. In this representation, creating two
$e_{A}$ in the top layer, for example, will also create an $e_{A}$ in the
second and third layers. Considering the plane indicated by the dashed lines
as a $2$D grid of just the $A$ diagonal gives the representation on the right,
where each square corresponds to a location along that diagonal. This
representation is used in Fig. 26.

Translating by $1$ to the right and reapplying $G$ two more times creates the
pattern in Fig. 26a. Identifying the first and fourth columns via periodic
boundary conditions produces an operator that commutes with all stabilizers in
the topmost layer. In the next layer down, the residual charge is
$e_{A}^{3}\sim e_{A}$ and therefore nontrivial. This gives
$z_{\text{max}}(3)=1$, and we denote this operator $O_{3}$.

For $L=6$, we repeat $O_{3}$ twice, producing the excitation pattern in Fig.
26b. Notably, each excitation in Fig. 26a is now paired with another
excitation, separated by a distance $\Delta=3$ horizontally. We thus apply
$O_{3}$ onto each of the six excitation locations to the left of the dashed
line, annihilating them. The residual charge created by this action produces
the pattern in Fig. 26d. As predicted by Lemma 1, this is the same as that in
Fig. 26a, but scaled by a factor of $2$. We now have a nontrivial residual
charge in the third layer from the top, giving $z_{\text{max}}(6)=2$. We
denote this operator as $O_{6}$.

For $L=9$, we cannot simply repeat $O_{6}$ twice. Instead, to annihilate all
excitations in the topmost layer we must apply $O_{3}$ three times. Unlike
with $O_{6}$, the residual net charge in the second layer is now nontrivial
since the residual charge from $O_{3}$ is repeated thrice. We therefore again
get that $z_{\text{max}}(9)=z_{\text{max}}(3)=1$.

This process can be continued for arbitrary $L$. For each, $z_{\text{max}}$ is
determined by the largest-support operator $O_{j}$ such that $j|L$, where
$j=3,6,12,24,\ldots=3\cdot 2^{z}$ for $z\in\mathbb{Z}$. Moreover, by Lemma 1
each $O_{j}$ is equivalent to $O_{j/2}$ scaled by a factor of $2$, and
therefore extends twice as far before reaching nontrivial residual charge.
Since $O_{3}$ produces $z_{\text{max}}=1$, we thus get that $O_{j}$ produces
$z_{\text{max}}=j/3$.

This gives the result

$z_{\text{max}}(L)=\text{max}\left\\{2^{z}\,:\,(3\cdot
2^{z}|L),\,z\in\mathbb{Z}\right\\}$ (27)

for $3|L$, and $z_{\text{max}}(L)=0$ otherwise, as required. ∎

Although this proof relied on a square lattice, it can be generalized to an
arbitrary $L_{x},L_{y}$ by taking the minimum of $z_{\text{max}}(L_{x})$ and
$z_{\text{max}}(L_{y})$. Moreover, although we used here a diagonal $G$
operator, equivalent fractal behavior emerges for operators confined to
planes, such as the $F$ operators used in the body of this paper.

Figure 26: (a) Repeating the operator in Fig. 25 three times produces this
excitation pattern. The resulting operator is named $O_{3}$. If the first and
fourth columns are identified via a periodic boundary, this commutes with all
stabilizers in the first row. (b) Repeating the operator in (a) twice produces
this excitation pattern, with a period of $6$. (c) Applying $O_{3}$ onto the
square indicated by the leftmost red circle annihilates two charges in the
second layer, while flipping the squares indicated by the red outline. (d)
Applying $O_{3}$ to each of the $6$ charges to the left of the dashed line in
(b) produces an excitation pattern that is equivalent to (a) but scaled by a
factor of $2$. This resulting operator is called $O_{6}$. Figure 27: Two forms
of the boundaries on the 6-6-6 color code: (a) Boundaries that condense a
single color, in this case green. (b) Boundaries that condense a single Pauli
charge, determined by which stabilizers are removed from the boundary group.
Overlayed is the rhomboidal lattice used to construct the correspondence with
the cubic code boundaries. Circles on the faces indicate charges, while
colored circles on the vertices indicate acting with an $X$ (or equivalently
$Z$) Pauli operator.  Figure 28: (a) A boundary on the $(100)$ face of the
cubic code, which condenses only one charge type, such as $m_{A}$. The
excitation and coloring shown are equivalent to that in Fig. 27. (b) The two
forms of the stabilizers that are placed along the boundary. Note that the two
terms anticommute when on the same location, but commute when neighboring in
the $x$ direction.

###  C.2 Color Code Correspondence

As discussed in Section III.1.1, there is a direct correspondence between the
$(e_{ABC})$ and $(m_{ABC})$ boundaries, and the $(2+1)$D color code. Ref. [48]
showed that these color codes have $6$ distinct gapped boundaries, defined by
their Lagrangian subgroups [65]. We should therefore be able to identify
equivalent representations in the boundary layers of the cubic code. Two of
these boundaries directly correspond to the $e$ and $m$-condensing edges of
the cubic code discussed in the body of this manuscript. A third corresponds
to taking products of $X$ and $Z$ stabilizers such that a combined $em$
particle condenses. The remaining three, however, represent distinct behavior
not discussed previously. In the color code, these three additional boundaries
condense just red, green, or blue anyons, as in Fig. 27. Correspondingly, in
the cubic code, we should observe the condensation of just $A$, $B$, or $C$
charges. These boundaries are shown in Fig. 28. Notably, the new $X$ and $Z$
stabilizer terms anticommute when at the same location, but commute when
placed adjacent on the $x$ direction. Therefore, we can construct a full
$(3+1)$D model with this boundary by alternating the $X$ and $Z$ stabilizers
corresponding to the triangular prisms.

It remains an open question how these boundaries affect the encoding
properties of the cubic code model. Moreover, future works should investigate
the generalization of color code twist defects [48] to the cubic code model,
and how their results interplay with the analysis of twists conducted in this
paper.

###  C.3 Code Availability

All numerical evaluations were performed using `Julia`, the code for which can
be found at https://github.com/corytaitchison/cubic-code.