---
title: "Quantum codes on a lattice with boundary — Bravyi 1998"
description: "How quantum codes on a lattice with boundary use local checks and relative homology to protect logical qubits on a planar surface."
canonical: "https://research.elamur.ai/free/en/papers/bravyi-1998-quantum-codes-lattice-boundary/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/bravyi-1998-quantum-codes-lattice-boundary/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [1998](https://md.research.elamur.ai/free/en/papers/1998/) / Quantum codes on a lattice with boundary

# Quantum codes on a lattice with boundary

Paper · 1998 · Sergey B. Bravyi and Alexei Kitaev

**Authors:** [Sergey B. Bravyi](https://md.research.elamur.ai/free/en/authors/sergey-b-bravyi/) and Alexei Kitaev · **Year:** 1998 · **Venue:** arXiv (Cornell University) · **Licence:** [arXiv — non-exclusive license to distribute](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

[**372** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2157276712) · arXiv (Cornell University) · [licence](http://arxiv.org/licenses/nonexclusive-distrib/1.0/)

- [arXiv quant-ph/9811052](https://arxiv.org/abs/quant-ph/9811052)
- [OpenAlex](https://openalex.org/W2157276712)

## Deep dive: Quantum codes on a lattice with boundary

How quantum codes on a lattice with boundary use local checks and relative homology to protect logical qubits on a planar surface. · about 35 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

Protecting quantum information requires a way to distinguish damage to its physical carriers from a change to the information being stored. This paper develops a construction in which small, geometrically nearby groups of qubits provide the checks, while paths across an entire lattice describe changes to the protected information. Its starting point is the toric code, where qubits occupy lattice edges on a torus. The authors show how to retain the essential relationship between local checks and global information when the surface has a boundary, including the case of a finite lattice drawn in the plane.

The crucial choice is how the lattice ends. The authors distinguish an x-boundary from a z-boundary and arrange segments of these types around the edge of the surface. These are different conditions on which checks remain present and where particular kinds of paths may terminate. In the simplest planar construction, alternating x-boundary and z-boundary segments support a logical qubit. The checks still involve only nearby edges, including shortened checks near the boundary. For the rectangular construction, the authors give exact expressions for the physical-qubit count, the independent-check count, and the code distance.

The mathematical tool that makes this work is relative homology. Ordinary homology identifies paths that differ by locally fillable loops. Relative homology extends that idea by allowing endpoints on designated boundary segments. A product of Pauli operators along such a path can preserve every check while changing the encoded information. Paths that differ only by stabilizer operations have the same effect within the protected subspace. This gives a precise way to identify logical operators, count the encoded qubits, and determine the smallest undetectable error that changes their state.

The main results are analytical. A rectangular lattice with the specified boundary arrangement stores a logical qubit, and its distance is the smaller of the relevant lattice dimensions after the boundary convention is taken into account. More broadly, a disk whose perimeter alternates between k x-boundary segments and k z-boundary segments supports k−1 logical qubits. The authors also interpret the boundary conditions through electric and magnetic excitations: each type can disappear at its corresponding boundary. That physical discussion includes an argument for why only these boundary types are possible when the boundary has no gapless excitations, but the full proof is deferred.

### Ideas worth borrowing

Separate local constraints from global information. The checks are attached to vertices and faces, while the protected degrees of freedom are described by paths that cannot be removed through local changes. This separation works because a local rearrangement can preserve the logical action even when it changes the operator’s physical support. A researcher working with constrained systems can borrow the same question: which distinctions remain after every allowed local transformation has been factored out? The useful object may be an equivalence class instead of a particular configuration.

Make boundary rules part of the construction. The planar code does not arise by cutting open the torus and leaving the edge unspecified. The authors define which checks exist near the boundary, which vertices carry no check, and where paths may end. Those choices determine the protected information. The broader engineering lesson is to treat edge cases as part of a system’s formal meaning. In any structure built from local rules, behavior at interfaces can change the global result even when the interior remains familiar.

Distinguish operations by their effect on the valid subspace. Different physical operators can act identically on every codeword. Multiplying an operator by a stabilizer changes its expression without changing its logical action. This is why the authors work with a quotient algebra rather than treating every Pauli product as a separate informational operation. Elsewhere, the same discipline can prevent an implementation from confusing representational variety with meaningful variety. The relevant equivalence must be proved for the intended state space.

Measure failure through the cheapest meaningful violation. The distance calculation asks for the smallest physical support of an operator that passes the checks but changes the encoded information. That is more informative than counting all possible local errors without distinguishing their effects. In another constrained system, an analogous analysis would identify the least costly transformation that preserves the validators while violating the intended meaning. The paper’s particular answer is geometric, but the reusable idea is to define failure operationally before choosing its metric.

Use dual descriptions to expose complementary failure modes. The construction tracks paths on a lattice and on its dual. These support different Pauli actions and are tested by complementary families of checks. Looking at only the original lattice would miss part of the logical structure. A useful general habit is to search for a second representation that makes a complementary constraint or failure visible. Here, the dual description is not an optional illustration; it is required to characterize the logical algebra and the distance.

Keep exact guarantees separate from physical interpretation. The paper proves its encoding and distance statements through stabilizer algebra and relative homology, then discusses boundaries through the behavior of anyonic excitations. The latter discussion explicitly leaves a classification proof for later work. This separation makes the argument easier to assess: the code construction does not depend on treating every part of the physical explanation as a completed theorem. The same writing and research practice helps wherever an exact formal result sits alongside a broader proposed explanation.

### How Mova uses it

For Mova, a small transparent language system implemented in Rust, the useful connection is a way of thinking about constraints and meaningful transformations. There is no basis here for claiming that Mova implements this quantum code, performs quantum error correction, or already contains a component derived from the construction. Any connection should therefore be understood as a possible design influence. The paper’s guarantees concern quantum states and Pauli operators on lattices; they do not establish guarantees for a language system.

A concrete idea Mova could borrow is the distinction between an internal representation and its effect on an accepted state. In the code, an operator may change when multiplied by a stabilizer, yet its action on the encoded information remains the same. A transparent language system could similarly make explicit which representation changes are intended to preserve a result. For example, if alternative internal arrangements are claimed to carry the same analysis, that equivalence should be expressed through inspectable rules. The analogy becomes useful only when those rules and their domain are defined; resemblance to a topological construction is not evidence of semantic correctness.

The boundary treatment offers another possible design lesson. A component may satisfy its local rules internally while still behaving incorrectly at its interface with another component. The authors avoid an unspecified interface by naming the boundary types and assigning different termination rules to them. Mova could adopt the corresponding habit of making interface conditions explicit in Rust data structures and validation logic. Such a design would make it easier to inspect what a component accepts, what it leaves unresolved, and which transformations remain legitimate at a boundary. This is an engineering proposal, not an implementation reported by the paper.

The distance argument suggests a useful form of testing as well. Rather than asking only whether a validator catches obvious corruptions, one can ask what smallest change would preserve all implemented checks while altering an intended outcome. In the quantum code, that question has a precise answer in terms of nontrivial paths. For Mova, both the change metric and the intended outcome would need independent definitions. The paper supplies a pattern for asking the question, but it supplies no evidence that a comparable distance exists for language analysis or that such a measure would predict language-system reliability.

The strongest connection is therefore methodological. Mova could make local checks, global invariants, interface conditions, and equivalence rules separately visible. That would support its aim of transparency by exposing what each check actually establishes. It would not justify calling ordinary software validation quantum protection, and it would not transfer the paper’s encoded-qubit counts or error bounds to language processing. The borrowing is useful precisely when the formal assumptions behind the original result remain clear.

### The problem and its context

#### Why local checks matter

The paper begins from quantum error correction. Its historical starting point is Shor’s discovery of quantum error-correcting codes, followed by a growing collection of constructions. The authors describe most of those examples as additive codes. In this setting, the valid codewords occupy a shared eigenspace of commuting stabilizer operators. Each stabilizer is built from Pauli matrices acting on selected physical qubits. Instead of identifying a valid state by inspecting its amplitudes directly, the construction identifies it through the outcomes of these compatible checks.

A physical qubit is a carrier in the larger system; a logical qubit is information encoded within a subspace of that system. The distinction is central. The purpose of the code is not to dedicate each physical carrier to an independent piece of logical information. It is to distribute the logical state so that sufficiently small errors can be detected and corrected. The stabilizers describe the allowed subspace, while operators that preserve all stabilizers must be examined further: some act trivially on the encoded information, and others perform genuine logical operations.

The authors single out toric codes because their checks are local in a geometric sense. A vertex check touches the edges incident on that vertex, and a face check touches the perimeter of that face. In the square-lattice construction recalled in the paper, a stabilizer involves 4 qubits, and a qubit participates in 4 stabilizers. The important property is bounded participation rather than that particular constant. The code distance can grow while the checks remain confined to small neighborhoods.

This creates a productive division of labor. Geometry determines which physical qubits participate in a check. Topology determines which extended operations can change the encoded state without violating those checks. The authors describe these operations through homology and cohomology with binary coefficients. A path can move locally without changing its topological class, so many visibly different strings of physical actions can represent the same logical operation.

#### What changes when a surface has an edge

The recalled toric construction places the square lattice on a torus, a surface without a boundary. Paths that wrap around the surface can be globally nontrivial even when every local check is satisfied. The authors also note that related constructions can be made on other closed surfaces. Their own question is how to extend this relationship between local checks and topology to a surface that ends.

An edge introduces an ambiguity that does not arise in the same way on a closed surface. A path may terminate there. A face may be incomplete. A vertex may have fewer incident edges, or may be only a free end. If the code is to remain well defined, these situations need explicit rules. The paper’s boundary construction supplies those rules and then shows how to reinterpret the logical operators.

The authors distinguish an x-boundary and a z-boundary. The names belong to a complementary pair of lattice descriptions: the original lattice has free ends on the x-boundary, while the dual lattice has free ends on the z-boundary. As a consequence, a path suitable for one kind of Pauli action has a different permitted endpoint set from a path suitable for the complementary action. This is the geometric reason that ordinary closed loops no longer provide the whole description.

Relative homology handles the change. A relative cycle may have endpoints, provided those endpoints lie in the designated boundary set. It is therefore a way to preserve the algebraic role of a cycle without insisting that every relevant path be closed in the original drawing. The boundary does not merely weaken the code. With the right arrangement, it participates in defining the encoded degrees of freedom.

#### The earlier work the authors identify

The paper treats Kitaev’s toric-code constructions as its immediate technical foundation. It recalls their stabilizers, their logical operators, and their relation to the topology of the torus before changing the underlying surface. This is an extension of an existing framework rather than an unrelated encoding scheme that happens to use a lattice.

The authors also identify a similar construction by Freedman and Meyer, titled “Projective plane and planar quantum codes.” In their acknowledgment, they state that discussion with those researchers helped establish an isomorphism between the constructions. That is a substantial qualification to any novelty claim: the paper presents its own boundary formulation and relative-homology account while explicitly recognizing a closely related construction.

The physical interpretation comes from the earlier anyon discussion cited by the authors. They use it to explain why different excitations can disappear at different boundary types. Their account of the historical context is narrow and technical. It does not survey all approaches to quantum memory, compare implementation technologies, or establish the construction’s practical advantage over every earlier code. Its problem is the mathematical extension from closed surfaces to surfaces with boundary.

### The method, step by step

The construction has no training stage and no data-collection procedure. It defines a family of codes, identifies their logical operations, and proves their storage capacity and distance. The most useful way to follow it is to keep the physical lattice, the check operators, and the equivalence classes of paths distinct until the argument connects them.

Building and analyzing a boundary code The steps in order.

#### Start with the toric checks

The authors first recall a square lattice on the torus. Each edge carries a physical qubit. A vertex receives an operator that applies a Pauli x action to all incident edges:

```
Aₛ = ∏ⱼ∈star(s) σˣⱼ
```

Here, Aₛ is the stabilizer assigned to vertex s. The set star(s) contains the edges meeting at that vertex. The index j identifies an edge and its qubit, σˣⱼ applies the Pauli x matrix to that qubit, and the product combines those actions. Each factor acts on its own physical carrier.

A face receives a complementary operator:

```
Bₚ = ∏ⱼ∈boundary(p) σᶻⱼ
```

Here, Bₚ is the stabilizer for face p. The set boundary(p) contains its perimeter edges, and σᶻⱼ is the Pauli z action on edge j. These face operators inspect a different aspect of the state from the vertex operators. The construction uses both families together.

The checks commute. Geometrically, the overlap between a vertex check and a neighboring face check has the parity needed for their Pauli products to commute. This compatibility allows the valid code subspace to satisfy all the checks at once. Within that subspace, a vertex check obeys:

```
Aₛ|ξ⟩ = |ξ⟩
```

The symbol |ξ⟩ denotes a codeword, meaning a state in the protected subspace. The equation says that Aₛ leaves that state unchanged. It must hold for every vertex that carries such a stabilizer.

The corresponding face condition is:

```
Bₚ|ξ⟩ = |ξ⟩
```

The symbols Bₚ and |ξ⟩ have the same meanings as above. This equation must hold for every checked face. Together, the conditions select the common eigenspace with the required stabilizer outcomes.

Not every toric check is independent. The vertex family satisfies:

```
∏ₛ Aₛ = 1
```

The product runs over all vertices s. The symbol 1 denotes the identity operator. This dependence matters when counting how much of the physical state space the checks remove.

The face family has a corresponding dependence:

```
∏ₚ Bₚ = 1
```

The product now runs over faces p. Again, 1 is the identity. These global dependencies distinguish the toric count from the planar boundary construction, where the authors establish independence of all assigned checks.

For an n×n toric lattice, the physical state space is written as:

```
(ℂ²)⊗²ⁿ²
```

The symbol ℂ² is the state space of a physical qubit, n specifies the square lattice’s size, and the tensor-product exponent 2n² counts its edge qubits. The superscript notation expresses the combined state space of those carriers. The code subspace selected inside it is 4-dimensional and represents two logical qubits.

#### Separate physical operators from logical actions

An operator on the physical state space need not preserve the code. The authors therefore consider the algebra 𝒢 consisting of operators that commute with every stabilizer. Such operators map codewords to codewords. They can still differ in what they do inside the protected subspace.

The logical algebra, written ℒ(C), contains the operations acting on the code subspace C itself. A stabilizer acts there as the identity, so multiplying a physical operator by a stabilizer cannot change its logical action. The authors formalize this by taking a quotient of 𝒢 that identifies the stabilizer differences Aₛ−1 and Bₚ−1 with zero. The quotient removes distinctions that disappear when attention is restricted to C.

This is not merely a change of notation. It is what allows a geometric path to be replaced by another path without changing the encoded operation. A face stabilizer can modify the route of a z-type string, and a vertex stabilizer can modify the route of an x-type string. The resulting physical products may touch different edges while representing the same element of the logical algebra.

The authors package the relevant Pauli products as:

```
Y(c, c*) = (∏ᵢ∈c σᶻᵢ)(∏ⱼ∈c* σˣⱼ)
```

The symbol c denotes a cycle on the original lattice, while c* denotes a cycle on its dual. The indices i and j run over their respective edges. The original and dual edges correspond to the same physical qubits, so both factors act within the same physical system. The letter Y names this combined operator; it should not be read as a claim that the expression is simply a single Pauli y matrix.

Binary coefficients mean that an edge is tracked according to whether it is present or absent in the chain. Combining chains follows this binary structure. The operator space itself still uses complex coefficients. The authors explicitly distinguish these algebraic settings: adding cycles corresponds to multiplying the associated operators, rather than to adding their matrices.

#### Read toric logical operators from global paths

On the torus, the cycles c and c* must be closed. The corresponding Y operators commute with the checks, but their action on C depends only on the cycles’ homology classes. A locally fillable loop gives no new logical action because it can be expressed through stabilizers. A globally nontrivial route can supply one.

The authors select a basis for the torus’s homology and a dual basis for its cohomology, represented by paths on the original and dual lattices. The associated logical operators obey the same commutation relations as the Pauli operators of the encoded qubits. This gives an algebraic identification between the code subspace and the state space of two logical qubits.

This preliminary argument explains what the boundary extension must preserve. The code needs local commuting checks, a class of physical strings that preserve them, and an equivalence relation identifying strings with the same encoded action. The specific change is that the strings will become relative cycles with permitted endpoints, rather than only closed cycles.

#### Define the rectangular boundary lattice

The simplest new construction is a finite square lattice in the plane. Its perimeter alternates between the x-boundary and the z-boundary, with two segments of each type. The drawing convention includes free edge ends. These ends are essential to the definition because they are precisely the vertices that do not receive stabilizers.

For an n×m rectangle, the physical-qubit count is:

```
N = 2nm + n + m + 1
```

Here, N denotes the number of physical qubits, and n and m are the rectangle’s lattice dimensions under the authors’ convention. The expression comes from nm vertical edges and (n+1)(m+1) horizontal edges. Every included edge carries a qubit, so counting edges counts physical carriers.

The existing definitions of the checks remain in force, but the boundary changes which faces and vertices receive them. A complete face gets the usual perimeter product. An incomplete face also gets a face check, using every edge of that face that remains present. A missing boundary edge is not replaced by an additional qubit.

The number of face checks is:

```
N_B = n(m + 1)
```

The symbol N_B denotes the count of B-type stabilizers. The dimensions n and m are the same as in the physical-qubit formula. This count includes the incomplete faces specified by the construction.

Vertex checks are assigned to vertices with 4 or 3 incident edges. The free ends receive none. Their count is:

```
N_A = (n + 1)m
```

The symbol N_A denotes the number of A-type stabilizers. Again, n and m specify the rectangular lattice. The distinction between a shortened checked vertex and an unchecked free end is part of the boundary condition, rather than a detail left to an implementation.

These local rules preserve the essential compatibility of the checks. Near a boundary, the face or vertex support may be shorter, but the complementary construction still permits the joint stabilizer conditions. The authors state that every stabilizer assigned in this planar arrangement is independent. That makes the later dimension count particularly direct.

#### Inspect the explicit example

The paper illustrates the construction with a 2×3 lattice and supplies its full stabilizer list. This is a worked algebraic instance, not a measured device or a numerical simulation. The list allows the reader to see exactly which edge qubits participate in each check, including those next to the boundary.

A shortened vertex check in that example is:

```
Aₛ₁ = σˣV₁s₁ σˣs₁s₄ σˣs₁s₂
```

The symbol Aₛ₁ labels the check at vertex s₁. Each subscript on a Pauli factor names an edge by its endpoints. Thus V₁s₁ is the edge joining the boundary end V₁ to s₁, while s₁s₄ and s₁s₂ are edges joining labeled lattice vertices. All factors use the Pauli x action.

An interior vertex check has a larger support:

```
Aₛ₅ = σˣs₄s₅ σˣs₂s₅ σˣs₅s₆ σˣs₅s₈
```

Here, Aₛ₅ is the stabilizer at s₅, and each factor acts on an edge incident on that vertex. The expression shows how the same definition applies in the interior, where the full star is present. The boundary construction changes the available edges rather than introducing a different kind of vertex operator.

An incomplete face receives:

```
Bₚ₁ = σᶻV₁s₁ σᶻs₁s₄ σᶻV₁s₄
```

The symbol Bₚ₁ names the face check at p₁. Its factors act on the existing edges of that face, using Pauli z rather than Pauli x. The edge labels identify physical carriers in exactly the same way as in the vertex examples.

A complete face in the same drawing receives:

```
Bₚ₂ = σᶻs₁s₂ σᶻs₂s₅ σᶻs₄s₅ σᶻs₁s₄
```

The symbol p₂ identifies the face, and the factors run over its perimeter edges. Together, the examples show that “local check” includes both full interior supports and shortened supports at the boundary. The full list is useful because it makes the abstract boundary convention concrete.

#### Count the protected state space

The total independent-check count is:

```
N_S = 2nm + n + m
```

The symbol N_S denotes the number of independent stabilizers. The dimensions n and m again refer to the rectangular construction. Independence is crucial: merely listing this many checks would not establish the same state-space restriction if some were products of the others.

The authors’ count of logical degrees of freedom is:

```
(2nm + n + m + 1) − (2nm + n + m) = 1
```

The first parenthesized expression counts physical qubits, and the second counts independent stabilizers. The right side is the number of remaining logical qubits. This is the authors’ explicit subtraction, and it establishes a 2-dimensional code subspace C.

The count tells us how much information is encoded, but not yet how to act on it. For that, the paper returns to the commuting-operator algebra and gives the boundary version of the path description. This order matters: a dimension count on its own does not identify logical x and z operations or determine the distance.

#### Replace closed cycles with relative cycles

Write L for the original lattice and L* for the dual. The original lattice’s free ends lie in V, the x-boundary. The dual lattice’s free ends lie in V*, the z-boundary. The authors note that the argument does not depend on whether free ends carrying the same boundary label are treated as distinct vertices or identified.

A chain c is a relative cycle when:

```
∂c ⊆ V
```

The symbol ∂c denotes the boundary of the chain, meaning its endpoint set in the binary description. The set V is the permitted boundary for the original lattice. The condition allows an open path, but requires every endpoint to occur in V. The complementary condition for a dual chain uses V*.

Why does that preserve the checks? An endpoint in the interior would leave an unmatched local incidence that conflicts with a vertex check for a z-type string. At a permitted free end, the corresponding vertex check is absent. The endpoint therefore does not violate a check that the code requires. The dual argument applies to x-type strings and face checks.

The paper offers another way to picture the definition: identify the free ends, and the relative cycle becomes an ordinary cycle in the resulting lattice. This is a mathematical aid for understanding relative cycles, not an instruction to physically connect those qubits. The important feature is which endpoints are treated as allowable in the equivalence relation.

The path operators Y(c,c*) still provide a basis for the algebra of operators commuting with all checks. The authors indicate how to verify this: expand an arbitrary physical operator into Pauli products and impose commutation with the stabilizers. The allowed supports are precisely the relative cycles of the original and dual lattices.

#### Identify logical equivalence through relative homology

The original-lattice strings are classified by:

```
[c] ∈ H₁(L, V, ℤ₂)
```

The brackets [c] denote the relative homology class represented by c. The notation H₁ identifies the group of path classes, L is the lattice, V is the permitted endpoint set, and ℤ₂ specifies binary coefficients. Paths that differ by the appropriate local boundaries represent the same class.

The dual description is related to cohomology by:

```
H₁(L*, V*, ℤ₂) = H¹(L, V, ℤ₂)
```

The left side classifies relative cycles on the dual lattice L* with endpoint set V*. The right side is the corresponding relative cohomology group of L with boundary set V. The equality expresses the dual relationship used to pair complementary logical operations.

The combined classification is:

```
E = H₁(L, V, ℤ₂) ⊕ H₁(L*, V*, ℤ₂)
```

The symbol E denotes the group that records both kinds of relative class. The direct-sum sign means that an element has an original-lattice component and a dual-lattice component. Together, these components label the basis logical operators Y([c],[c*]).

For the rectangle, choose an original-lattice path connecting the separated x-boundary segments:

```
Yᶻ = Y([c₁₂], 0)
```

The operator Yᶻ acts as logical z. The path c₁₂ starts on V₁ and ends on V₂, and [c₁₂] is its nontrivial relative class. The zero indicates that no dual-path component is included.

Choose a complementary path between the z-boundary segments:

```
Yˣ = Y(0, [c*₁₂])
```

The operator Yˣ acts as logical x. The dual path c*₁₂ joins V*₁ to V*₂, and the original-lattice component is zero. The authors establish that these logical generators anticommute, giving the Pauli relationship required for the encoded qubit.

A path that can be removed through stabilizer multiplication has trivial logical action. A path connecting the relevant separated boundary segments cannot be removed in that way. The logical information therefore resides in the distinction between relative classes, not in a unique route through the drawing. This is the boundary counterpart of nontrivial loops on the torus.

#### Determine the smallest undetectable logical error

The paper defines distance through errors that escape syndrome detection while changing the encoded state. A syndrome is the collection of stabilizer-check outcomes. An operator commuting with all stabilizers preserves the required outcomes, but it can still perform a nontrivial logical operation.

Because commuting operators can be expanded in the Y(c,c*) basis, the authors can search through the corresponding path supports. A nontrivial action requires a non-zero relative class in the original or dual component. On the rectangle, this becomes a shortest-path problem between separated boundary segments of the same type.

The rectangular distance is:

```
d = min{n + 1, m + 1}
```

The symbol d is code distance, while n and m are the lattice dimensions under the authors’ convention. The minimum selects the shorter relevant boundary-to-boundary path. The expression incorporates the included boundary edges; simply reading a dimension label as the distance would miss that convention.

The correction guarantee is:

```
t = ⌊(d − 1)/2⌋
```

The symbol t denotes the number of errors the code protects against, d is the distance, and the floor brackets mean taking the greatest integer no larger than the enclosed expression. This is the paper’s stated distance-based guarantee. It is not a measured logical failure probability under a particular noise process.

#### Extend the construction to other surfaces

The square shape is not essential to the topological argument. The authors allow mutually dual lattices with vertices of varying degree and faces of varying size. They describe the general setting as a surface Q whose boundary is split into V and V*. Free ends of the original lattice attach to V, while free ends of the dual attach to V*.

The general logical-qubit count is:

```
m = dim H₁(Q, V, ℤ₂) = dim H₁(Q, V*, ℤ₂)
```

Here, m denotes the number of logical qubits, instead of the rectangular side length used earlier. The symbol dim means the dimension of the indicated binary homology group. The surface is Q, and V and V* are its complementary boundary parts. The notation’s changed use of m should be kept distinct from the rectangle’s dimensions.

The corresponding distance formula is:

```
d = min{min_[c]≠0 |supp(c)|, min_[c*]≠0 |supp(c*)|}
```

The symbol supp(c) denotes the set of lattice edges used by c, and vertical bars count that support. The starred expression does the same for the dual chain c*. Each inner minimum ranges over representatives of non-zero relative classes of the relevant kind. The outer minimum selects whichever complementary family supplies the smaller logical support.

This expression separates topology from the chosen lattice’s geometry. Homology identifies which classes are nontrivial and therefore capable of carrying logical actions. The physical placement and connectivity of edges determine the support required to realize them. Knowing the number of encoded qubits does not by itself determine the distance.

#### Encode more information through boundary segmentation

The authors next take Q to be a disk with alternating boundary segments. There are k x-boundary pieces and k z-boundary pieces. For that arrangement:

```
dim H₁(Q, V, ℤ₂) = k − 1
```

The symbol k counts the pieces of each boundary type. The group dimension therefore gives k−1 encoded qubits. The result makes clear that a disk can carry nontrivial relative classes even though the relevant paths are not noncontractible closed loops of a torus.

The logical z generators may be chosen as:

```
Yᶻᵢ = Y([cᵢ], 0)
```

The index i selects a logical qubit. The path cᵢ joins Vᵢ to Vᵢ₊₁, and its class determines the corresponding z action. The zero again means the dual component is absent.

A dual choice gives:

```
Yˣᵢ = Y(0, [c*ᵢ])
```

The path c*ᵢ joins V*ᵢ to V*ₖ. The authors choose these classes as a dual basis to the original-lattice classes. The index ranges over the encoded qubits, from 1 through k−1, and the pairing supplies the required complementary logical actions.

The drawing with 4+4 boundary pieces illustrates this basis construction. Its role is to show how selected solid and dashed paths represent the logical operators. The general encoding claim comes from relative homology, not from measuring anything in the picture.

#### Interpret the boundaries through excitations

The final part changes viewpoint from a code subspace to a Hamiltonian and its excitations. The authors use topological quantum order to mean nontrivial topological properties of the ground state. They describe four sectors: vacuum, electric charge, magnetic charge, and a combined electric–magnetic sector.

Electric excitations live at vertices, while magnetic excitations live at faces. Their braiding behavior explains why a charge cannot simply disappear in the bulk: removing it would alter the Berry phase associated with another particle’s distant encircling motion. The paper connects this stability to the topological structure rather than to an ordinary long-range interaction.

At the boundary, the possibilities change. An electric charge may disappear at an x-boundary, and a magnetic charge may disappear at a z-boundary. This gives a physical interpretation of the permitted endpoints used in the algebraic construction. A string can terminate without a remaining violation of the appropriate check because that excitation is allowed to be absorbed there.

The authors restrict their boundary-classification claim to a rigid boundary, meaning one without gapless excitations. They argue that the combined electric–magnetic particle cannot disappear at such a boundary because it is fermionic, whereas each elementary charge is bosonic with respect to itself. The complete proof that only the stated rigid boundary types occur is left to other work.

### Experiments and results

#### What kind of evidence the paper provides

The paper contains no experimental dataset, training run, hardware test, or statistical benchmark. Its evidence consists of an explicit construction, stabilizer counts, an operator-algebra characterization, and distance arguments. The main comparison is with the toric code recalled at the start. That comparison establishes what changes when the surface acquires the specified boundary conditions; it does not rank competing implementations by measured reliability.

The absence of empirical trials does not make the results merely suggestive. Within the stated construction, the logical-qubit count and the distance are exact claims. Their evidential basis is mathematical. A reader should therefore assess whether the checks, independence argument, logical-operator classification, and support calculation establish those claims, rather than look for a dataset split or an accuracy score.

The relevant quantities also measure different things. Physical-qubit count describes the carriers used by a lattice. Independent-check count describes the stabilizer restrictions. Code-subspace dimension describes the encoded state space. Distance measures the minimum support of an undetectable nontrivial operation. None of these is interchangeable with an observed error rate or a practical runtime.

#### Toric and rectangular code spaces

The toric construction recalled in the paper has a 4-dimensional code subspace, corresponding to two logical qubits. The rectangular boundary construction has a 2-dimensional code subspace, corresponding to a logical qubit. The following comparison records those dimensions only. The marked boundary construction is the paper’s own setting, and the direction indicates greater state-space dimension rather than an overall judgment of code quality.

Toric and rectangular constructions: code-subspace dimension The rectangular boundary construction retains a nontrivial encoded state space on a planar lattice.

**The numbers**

| System or setting | code-subspace dimension |
| --- | --- |
| Recalled toric code | 4 |
| Rectangular boundary code (this paper) | 2 |

The distinction is explained by the respective check structures and topologies. On the torus, products of all vertex checks and of all face checks introduce dependencies. In the rectangular construction, the assigned checks are independent. The planar count leaves the encoded degree of freedom identified by the relative-path operators.

This is not a comparison at equal physical resources. The authors use different lattice conventions for the recalled torus and the rectangle. The chart therefore cannot establish that either construction is more resource efficient. Its purpose is to make the encoded-space result visible without implying a matched experimental baseline.

The more informative result is that the rectangular construction supports a logical algebra with the required x and z behavior. A state-space count alone could leave open how that information is represented. The boundary-to-boundary paths resolve the question: their nontrivial relative classes supply logical operations, while stabilizer-related path changes leave those operations unchanged.

#### Local supports in the explicit planar example

The supplied 2×3 example makes the local structure inspectable. The complete list identifies vertex checks from Aₛ₁ through Aₛ₉ and face checks from Bₚ₁ through Bₚ₈. Some boundary checks act on 3 edge qubits, while the corresponding full interior checks act on 4. These are supports of specified operators, not averages over samples.

That explicit list matters because locality at a boundary cannot be assumed from the interior alone. The incomplete faces and free edge ends have to be treated consistently. The example shows the actual shortened products that implement the authors’ rules. It therefore provides a concrete instance against which the abstract definition can be read.

The example also clarifies what is absent. The authors do not repeatedly corrupt this lattice and report recovery success. They do not compare decoders or list syndrome-processing times. Their result is that the displayed operators instantiate the code construction and fit the subsequent algebraic account. Its value is exact specification, rather than empirical evidence about operation under noise.

#### The distance result and its conditions

For the n×m rectangle, the distance is d=min{n+1,m+1}. This measures the smallest support of an error that preserves every stabilizer outcome while acting nontrivially on the encoded state. The condition is important: an operator can be undetectable because it is a stabilizer and yet do nothing logically. Distance excludes that harmless case by requiring a genuine change within C.

The shortest-path interpretation gives the result its practical meaning. A nontrivial original-lattice string connects separated x-boundary pieces; a nontrivial dual string connects separated z-boundary pieces. The smaller available support determines the distance. The argument is therefore about the cheapest logical action among both complementary operator families.

The stated correction capacity, ⌊(d−1)/2⌋ errors, follows from the code distance. The paper does not supplement that bound with a particular probability distribution over physical errors. It consequently does not report a success probability for storage over time, a threshold for noisy operations, or a measured benefit from increasing a lattice dimension. Those would require additional assumptions and analysis.

The general-surface result has the same structure. The distance is the minimum support of a representative from either kind of nontrivial relative class. This is a broader analytical characterization than the rectangular formula, but it is not a universal numerical distance for all surfaces with the same boundary pattern. Different lattice realizations can give the same homological capacity while assigning different edge costs to the relevant paths.

#### Boundary pieces and encoded capacity

For a disk, alternating k segments of each boundary type gives k−1 encoded qubits. This extends the simplest rectangle by changing the boundary arrangement rather than introducing a torus. The authors also specify a basis of paths and a complementary dual basis, so the capacity statement is accompanied by a way to identify logical Pauli actions.

The figure with 4+4 boundary pieces is an illustration of that choice. Solid paths represent the original-lattice classes, and dashed paths represent their dual counterparts. No numerical distance for that drawing is stated. It should therefore be used to understand the organization of logical operators, without extracting lengths or an error-correction capacity from its appearance.

Taken together, the results establish a family of codes in which local stabilizers coexist with topology-dependent logical information on bounded surfaces. They do not establish an optimal arrangement of boundary pieces, an optimal lattice embedding, or a best implementation procedure. The paper’s exact outputs are the code construction, the logical-operator description, the capacity formulas, and the distance characterization.

### What the ablations show

The paper contains no ablation experiments; its alternatives are examined through mathematical comparisons, worked examples, and a physical interpretation of the boundary conditions.

#### Closing the surface versus allowing endpoints

The most important comparison is between the recalled toric code and the new bounded lattice. On the torus, the relevant strings are closed cycles. On the bounded lattice, relative cycles may terminate on designated boundary sets. This comparison isolates the conceptual change needed to retain the path-based logical description after introducing an edge.

It does not establish a measured advantage of boundary codes. Instead, it shows that insisting on closed paths would miss legitimate logical operations in the planar setting. The boundary changes what counts as a valid cycle for the code’s purposes. Relative homology is therefore doing substantive work rather than merely renaming the same toric argument.

The comparison also explains why the boundary types must be distinguished. If every endpoint were treated identically, the correspondence between complementary Pauli strings and absent checks would be lost. The authors assign original and dual free ends to different boundary parts. That structure makes the commuting-operator characterization possible.

#### Complete checks versus shortened checks

The explicit lattice compares full interior supports with truncated boundary supports. A complete face uses all its perimeter edges, while an incomplete face uses the edges that remain. Checked boundary vertices can likewise have fewer incident edges than interior vertices. Free ends, however, receive no vertex stabilizer at all.

This is a controlled definitional contrast. The authors change the local incidence structure near the edge and specify exactly how each change affects the check family. The resulting code still has a consistent shared eigenspace and the logical structure subsequently derived. The lesson is that a shortened check and an absent check are distinct design decisions.

No measured result says that a shortened check is easier to implement or more reliable. The paper does not need such a claim for its construction. What the analysis establishes is that these boundary rules support the intended algebra. Any engineering comparison of the resulting operations would require evidence beyond the listed operators.

#### Rectangular geometry versus general dual lattices

The move from a square lattice to general mutually dual lattices tests which parts of the argument depend on the drawing. The homology-based description survives changes to vertex degree and face size. This supports the conclusion that the logical organization is topological instead of an artifact of a particular rectangular arrangement.

There is still a geometric dependence in the distance. A class may remain nontrivial after changing the lattice while requiring a different number of edges to represent it. Therefore, the generalization separates two claims that a picture can easily blur: how many logical degrees of freedom exist, and how much physical support is required to alter them.

This comparison also qualifies the locality statement. The square construction has bounded check sizes given explicitly in the paper. Allowing a face of arbitrary size does not establish the same fixed support bound for every conceivable generalized lattice. The algebraic extension is broad, but a particular locality requirement must still be checked for the chosen lattice family.

#### A simple rectangle versus a segmented disk

The disk construction varies the boundary organization. With k pieces of each type, the relative-homology dimension becomes k−1. The corresponding path bases explain how the additional logical degrees of freedom are distinguished. This is the paper’s analysis of capacity beyond the simplest boundary arrangement.

It is not an optimization study. The authors do not hold the physical-qubit budget constant while varying the number of boundary pieces, nor do they provide matched distances for alternative segment layouts. The result establishes how the topological count changes, while leaving the geometric cost of realizing a desired distance to the particular lattice.

#### Exact code analysis versus boundary classification

The final physical discussion asks whether other rigid boundary conditions could be formed by combining the stated types. The proposed answer uses the particle sectors and their statistics. Electric and magnetic charges may disappear at their respective boundaries, while the combined particle is excluded from the same role by its fermionic character.

This analysis has a different status from the stabilizer and distance arguments. The authors explicitly postpone the full proof of the boundary classification. It supplies a physical rationale for the two boundary types under the rigidity condition, but it is not presented as a complete derivation in this paper. Keeping that distinction visible prevents the interpretive discussion from being mistaken for an additional finished theorem.

### Limitations

#### Limits the authors explicitly identify

The general construction for arbitrary mutually dual lattices is not given as a complete formal definition. The authors explain the surface and boundary structure and state that the preceding arguments extend. This provides a clear mathematical direction, but a reader seeking every detail for an unusual lattice must supply more formal work than is needed for the explicit rectangular example.

The proof that only the stated rigid boundary types are possible is deferred. The paper gives an argument in terms of anyonic sectors and explains why the combined electric–magnetic particle cannot disappear at a rigid boundary. It does not contain the promised full classification proof. That limit applies specifically to the classification claim, rather than undermining the explicit code construction.

Rigidity is itself a stated condition. The boundary must have no gapless excitations for the claimed restriction on boundary types to apply. Removing that condition changes the question. The paper does not establish the same classification for boundaries that carry such excitations, and its explanation should not be generalized beyond the assumption.

The authors also acknowledge the similar Freedman–Meyer construction and the isomorphism identified through discussion. Their formulation can be appreciated for its explicit use of relative homology without treating the underlying planar-code idea as an isolated development. The acknowledgment is part of the paper’s account of its relationship to prior and contemporary work.

#### Limits visible in the setup

There is no empirical noise study. The code distance describes the minimum support of an undetectable logical error, and the correction formula gives the associated bound. These quantities do not specify how often errors occur, how they are correlated, or how a physical system behaves during repeated checking. A practical reliability claim would require those conditions.

The paper does not supply an evaluated decoding procedure. It characterizes when errors are detectable and how nontrivial logical actions appear, but it does not benchmark an algorithm for converting syndrome outcomes into corrections. The existence of a distance-based guarantee should therefore be separated from the cost and behavior of any particular recovery implementation.

Similarly, the code is not evaluated under faulty syndrome measurements. The opening discussion recalls earlier toric-code work, but this construction does not provide a numerical study of imperfect checks. A code’s algebraic stabilizers specify the ideal constraints. They do not, by themselves, quantify the effect of mistakes made while reading those constraints.

No hardware resource comparison is established. The authors count physical qubits and describe local supports, which are important structural quantities. They do not report operation times, control requirements, fabrication constraints, or storage lifetimes. Geometric locality is a mathematical property of the operators here, not a complete implementation assessment.

The generalized lattice discussion also deserves care. If vertices may have arbitrary degree and faces arbitrary size, check support must be assessed for the particular family chosen. The paper’s initial observation that a fixed constant can replace 4 concerns bounded locality. It does not make every possible generalized lattice equally local under a fixed bound.

The disk capacity formula does not come with a universal distance determined only by k. Boundary count controls the dimension of the relative-homology group, while path support depends on the lattice realization. A layout with the desired number of logical qubits still needs an independent distance analysis. Capacity and protection cannot be inferred from each other.

The figures are explanatory constructions rather than sources of additional measured values. The 2×3 drawing has a full operator list, and the 4+4 boundary drawing illustrates logical-path choices. Neither licenses unstated path lengths, physical-qubit totals, or recovery rates read from visual appearance. The stated formulas and claims are the appropriate numerical evidence.

Finally, the paper does not establish a direct application to language processing or ordinary software correctness. Its proofs depend on a specified quantum state space, Pauli algebra, stabilizer constraints, and binary relative homology. Ideas about interfaces, equivalence, and global invariants may travel, but the quantitative guarantees remain attached to those mathematical assumptions.

### What came after

The later citing work identified here is [Quantum algorithms: A survey of applications and end-to-end complexities](https://md.research.elamur.ai/free/en/papers/dalzell-2023-quantum-algorithms-survey-applications-end/), dated 2023. Its title places quantum algorithms, their applications, and their end-to-end complexity within its scope. Its citation establishes that this boundary-code paper appears in a later discussion of quantum computation.

The available information about that survey does not specify which boundary-code result it uses. It does not identify a passage applying relative homology, a resource estimate based on the rectangular code, or a comparison involving the alternating-boundary construction. It would therefore be inaccurate to describe the citation as evidence of a particular extension, implementation, or performance improvement.

The relationship can still be stated meaningfully at the level the evidence supports. This paper provides an exact construction for protected quantum information on surfaces with boundaries. A later survey concerned with quantum applications and full computational costs cites it. That places the construction within the survey’s reference framework, while leaving its precise role in the survey’s argument unspecified.

It is also useful to distinguish that later citation from the connections documented within the boundary-code paper itself. The toric code is its technical starting point. Freedman and Meyer’s planar construction is acknowledged as closely related. The proposed work on anyon stability is where the authors direct the deferred boundary-classification proof. These are different relationships: foundation, related construction, and promised proof, respectively.

The durable contribution that later work can draw on is precise. Boundary conditions are incorporated into a local-check quantum code; logical actions are classified through relative paths on a lattice and its dual; and distance is characterized by the smallest support of a nontrivial class. The later citation does not establish more than that, but the original results already provide a clear bridge between finite planar geometry and protected quantum information.

## Cite

Cite as Sergey B. Bravyi and Alexei Kitaev. 1998. Quantum codes on a lattice with boundary. arXiv (Cornell University).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.48550/arxiv.quant-ph/9811052](https://doi.org/10.48550/arxiv.quant-ph/9811052) · [arXiv quant-ph/9811052](https://arxiv.org/abs/quant-ph/9811052)

```bibtex
@misc{bravyi1998quantum,
  title = {{Quantum codes on a lattice with boundary}},
  author = {Sergey B. Bravyi and Alexei Kitaev},
  year = {1998},
  doi = {10.48550/arxiv.quant-ph/9811052},
  eprint = {quant-ph/9811052},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.quant-ph/9811052}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
