HaPPY Code and Tensor-Network Models
Guiding question. How can one build a finite-dimensional toy model in which bulk degrees of freedom are redundantly encoded on the boundary, RT surfaces become minimal cuts, and bulk operators have multiple boundary reconstructions?
Main lesson. The HaPPY code is not AdS/CFT. It is a deliberately simplified tensor-network model that makes several structural features of holography exactly visible: an isometric bulk-to-boundary encoding, RT-like minimal cuts, subregion reconstruction, complementary recovery, and redundant logical operators. Its power comes from perfect tensors. Its limitation is also its power: the model is too rigid to contain real bulk dynamics, gravitons, modular physics, or a continuum CFT. Used correctly, it is one of the cleanest laboratories for understanding why holography looks like quantum error correction.
The core dictionary is
where is a tensor-network encoding map. In the HaPPY construction, a boundary region can reconstruct bulk operators in a combinatorially defined region called its greedy wedge. The greedy wedge is a discrete toy analogue of the entanglement wedge:
This page explains the construction, the minimal-cut entropy formula, the operator-pushing algorithm, and the precise sense in which tensor networks illuminate—but do not replace—the continuum theory.
1. Why tensor networks enter holography
Section titled “1. Why tensor networks enter holography”A tensor network is a way of building a complicated quantum state or linear map from small local building blocks. In quantum many-body physics, tensor networks are useful because the network geometry organizes entanglement. In holography, entanglement is already geometrized by RT and HRT surfaces. The temptation is therefore natural:
If each network bond carries a Hilbert space of dimension , cutting one bond can transmit at most units of entropy. A minimal cut through the network then gives an entropy contribution
which resembles the RT formula
This analogy is useful, but it is not enough. A generic tensor network may reproduce an area law without reproducing bulk reconstruction. The HaPPY code is important because it combines a hyperbolic tensor-network geometry with quantum error correction. It makes the following features concrete:
- bulk degrees of freedom are logical degrees of freedom;
- boundary degrees of freedom are physical degrees of freedom;
- erasing part of the boundary need not erase the corresponding bulk information;
- some bulk operators can be represented on several different boundary regions;
- the obstruction to reconstruction is governed by minimal cuts.
The model therefore sits at the intersection of RT geometry and subregion quantum error correction.
2. Perfect tensors
Section titled “2. Perfect tensors”The elementary building block of the HaPPY code is a perfect tensor. Let
be a tensor with legs, each leg carrying a Hilbert space of dimension . We may reinterpret the same tensor as a linear map from any subset of legs to the complementary subset :
The tensor is perfect if, for every bipartition with , this map is proportional to an isometry:
Equivalently, the tensor state is maximally entangled across every balanced or smaller bipartition. For a rank-six perfect tensor, any choice of three legs determines the other three as a unitary map, and any choice of one or two legs maps isometrically into the remaining legs.
A rank-six perfect tensor can be read as an isometry for any bipartition with at most three input legs. This “many isometries at once” property is the algebraic reason that operators can be pushed through the network in different directions.
The word “perfect” should not be read as “generic.” Perfect tensors are highly special. In finite-dimensional quantum information, they are closely related to absolutely maximally entangled states and quantum error-correcting codes. The original HaPPY paper used a six-index tensor related to the five-qubit code. One leg is interpreted as a bulk logical leg and the other legs are used to connect to neighboring tensors or to the boundary.
The perfect-tensor condition has two immediate consequences.
First, it gives local isometricity. If enough legs of a tensor are already controlled, the tensor can be absorbed into a growing region without losing information. This is the basis of the greedy algorithm.
Second, it gives local operator pushing. Suppose is viewed as an isometry from legs to legs . If acts on the input legs, then there exists an operator acting on the output legs such that
For a unitary bipartition, one simply has
For an isometric bipartition, the same equation holds on the image of the isometry, and may be extended arbitrarily away from the code subspace. This is exactly the finite-dimensional analogue of the code-subspace equality familiar from entanglement wedge reconstruction.
3. The HaPPY construction
Section titled “3. The HaPPY construction”The HaPPY code, named after Pastawski, Yoshida, Harlow, and Preskill, places perfect tensors on a negatively curved tiling. The most common schematic version uses a hyperbolic pentagon tiling. Internal legs are contracted with neighboring tensors. Uncontracted legs at the asymptotic boundary become the physical boundary degrees of freedom. Uncontracted legs in the interior become bulk logical degrees of freedom.
The resulting network defines an encoding map
Here
The network should be read as a discretized time slice of AdS. The radial direction is not physical time; it is the emergent holographic direction. Bulk sites deeper in the graph are farther from the boundary and usually require larger boundary regions to reconstruct.
A schematic HaPPY network. Perfect tensors tile a negatively curved disk. Bulk logical legs live in the interior, boundary physical legs live on the outer edge, and a minimal cut through contracted bonds gives the RT-like entropy contribution for a boundary region .
There are two ways to think about the network.
The state viewpoint fixes the bulk logical legs in some state and obtains a many-body boundary state. This is useful for entanglement calculations.
The code viewpoint keeps the bulk logical legs open. The network is then an isometry from bulk logical states to boundary physical states. This is the viewpoint most relevant for bulk reconstruction.
A subtle but important point is that not every arbitrary tensor network with open bulk legs is automatically an isometry. For the HaPPY tilings used in the original construction, the perfect-tensor property and the orientation of the network ensure that the map from all bulk legs to the boundary legs is isometric. This is a strong simplification relative to continuum AdS/CFT, where the existence and size of a code subspace are dynamical questions.
4. Minimal cuts and the RT formula
Section titled “4. Minimal cuts and the RT formula”Consider a boundary region . A cut is a set of internal network bonds whose removal separates from its complement . If each internal bond has dimension , then cutting bonds contributes at most
to the entropy. In a favorable HaPPY network, the minimal cut gives the exact entropy:
This is the discrete analogue of RT:
The comparison suggests the identification
One must be careful, however. In the continuum formula the area is a dynamical gravitational quantity, while in the basic HaPPY code it is just the number of graph edges cut. The graph geometry is fixed. There is no Einstein equation choosing it, no backreaction from matter, and no independent derivation of the bond dimension from a microscopic CFT.
Still, the minimal-cut calculation captures several genuine lessons.
First, entropy is controlled by a bottleneck, not by the volume of the bulk region. This is the discrete version of the holographic area law.
Second, the homology constraint has a graph analogue: the cut must separate from , and the region between and the cut is the discrete entanglement wedge candidate.
Third, competing cuts can lead to phase transitions. For disconnected boundary regions, different cut topologies can dominate, mimicking RT mutual-information transitions. This makes tensor networks a useful playground for understanding Page transitions and island-like saddle switches at the level of graph geometry.
5. The greedy wedge
Section titled “5. The greedy wedge”The most distinctive feature of the HaPPY model is the greedy algorithm. Start with a boundary region . Then repeatedly perform the following step:
If a tensor has at least half of its legs already contained in the growing region, absorb that tensor into the region.
Because the tensor is perfect, absorbing such a tensor is an isometric operation. The process terminates after finitely many steps. The bulk region obtained in this way is the greedy wedge .
The greedy wedge is not defined by causal propagation. It is defined by the error-correcting structure of the tensor network. If a bulk logical leg lies in , then an operator acting on that logical leg can be pushed outward until it is represented only on boundary legs in .
The greedy algorithm starts from a boundary region and absorbs any tensor for which already controls at least half the legs. Perfectness makes each absorption isometric. A bulk operator in the resulting greedy wedge can be pushed through the absorbed tensors to become an operator supported only on .
In formulas, if and is an operator on the corresponding bulk logical degrees of freedom, then there exists such that
for every in the code subspace. Equivalently,
This is the same algebraic form as entanglement wedge reconstruction, but here it is proven by finite-dimensional tensor manipulations rather than by JLMS relative entropy.
The algorithm also explains why bulk reconstruction is redundant. A bulk operator near the center may be pushable to several different large boundary regions. These different boundary operators are not equal as microscopic operators on the full boundary Hilbert space. They are equal only after projection to the code subspace. This is precisely how quantum error correction avoids no-cloning.
6. Operator pushing in detail
Section titled “6. Operator pushing in detail”Let a perfect tensor be viewed as an isometry
An operator acting before the tensor has an output representative
on the image of . Then
When this identity is inserted into a larger tensor network, it says that the operator can be moved across the tensor from the incoming legs to the outgoing legs. Repeating this operation moves a bulk operator outward through the network.
The crucial point is that the choice of “incoming” and “outgoing” legs is flexible. A perfect tensor can be read as an isometry for many different bipartitions. Thus an operator may be pushed through the network along different routes, giving different boundary reconstructions.
In the HaPPY code, this procedure can be made entirely explicit for Pauli operators when the perfect tensor is built from a stabilizer code. Then operator pushing becomes stabilizer manipulation. This is pedagogically useful because one can literally track a logical Pauli operator through the network and see where it lands on the boundary.
However, the clean stabilizer structure is not generic in continuum holography. It gives exact algebraic control at the price of suppressing much of the physics. A stabilizer tensor network has very special entanglement spectra and cannot reproduce the detailed operator spectrum of a strongly coupled CFT.
7. Greedy wedge versus entanglement wedge
Section titled “7. Greedy wedge versus entanglement wedge”The greedy wedge is the part of the network that can be reconstructed by the local greedy algorithm. The graph-theoretic entanglement wedge is the region bounded by and a minimal cut . In many simple HaPPY examples they coincide:
But this equality is not guaranteed. There can be greedy shadows: regions enclosed by minimal cuts but not reachable by the greedy algorithm. In such cases, the minimal-cut entropy and the simple operator-pushing reconstruction do not coincide perfectly.
This mismatch is useful rather than embarrassing. It teaches us that there are several layers of reconstruction:
The continuum theorem is not a greedy local tensor manipulation. In real AdS/CFT, JLMS relative entropy and quantum recovery maps provide the deeper argument. The HaPPY code gives an exactly solvable cartoon of this structure, not its final form.
A related limitation is that the HaPPY network has no natural analogue of modular flow. In continuum reconstruction, modular flow is central: boundary modular evolution and bulk modular evolution are related by JLMS. In a perfect-tensor network, reconstruction is algebraic and combinatorial. This is much simpler, but it misses the analytic complexity of QFT modular Hamiltonians.
8. Complementary recovery and no-cloning
Section titled “8. Complementary recovery and no-cloning”Suppose a bulk operator can be reconstructed on boundary region . If lies outside the entanglement wedge of , then should not reconstruct the same operator independently. Otherwise the same unknown logical degree of freedom would be present in two disjoint boundary systems, violating the no-cloning theorem.
The HaPPY code enforces this geometrically. A bulk site belongs to the greedy wedge of only when the network has enough connectivity from that site to . The complementary region then generally lacks enough legs to push the same operator outward. At the transition surface, reconstruction can fail or become nonunique in a way that reflects the boundary between complementary wedges.
This is the discrete version of complementary recovery:
while operators in the complementary wedge reconstruct on . If a bulk operator lies near the entangling surface or in a central algebra, the simple subsystem language must be refined. The operator-algebra version of QEC handles this more accurately and is the subject of a later page.
The no-cloning point is worth emphasizing. The boundary representatives and for overlapping large regions are not two independent copies of the same bulk information. They are different representatives of the same logical operator acting on the same code subspace:
Outside the image of , the operators may act very differently. Holographic redundancy is not duplication; it is code-subspace equivalence.
9. Secret sharing as the smallest cartoon
Section titled “9. Secret sharing as the smallest cartoon”A useful warm-up for the HaPPY code is a quantum secret-sharing code. In a three-qutrit code, one logical qutrit can be encoded into three physical qutrits so that any two physical qutrits can reconstruct the secret, but any one physical qutrit learns nothing.
This has the same qualitative pattern as a central bulk operator in AdS/CFT:
The HaPPY code is a many-site, geometrized version of this idea. The network decides which boundary regions are large enough by minimal cuts in a hyperbolic graph. The deeper the bulk site, the larger the boundary region required for reconstruction.
This “radial depth equals protection” intuition is extremely useful, but it should not be overinterpreted. In continuum AdS/CFT, radial position is related to energy scale, causal structure, gravitational dressing, and the dynamics of the state. The HaPPY graph captures the redundancy pattern, not the full radial physics.
10. What the HaPPY code captures
Section titled “10. What the HaPPY code captures”The HaPPY model captures several structural facts with unusual clarity.
10.1 RT-like entropy
Section titled “10.1 RT-like entropy”For suitable boundary regions and states, the entropy is computed by a minimal cut:
This reproduces the leading area term of holographic entropy in a discrete setting.
10.2 Subregion duality
Section titled “10.2 Subregion duality”A boundary region reconstructs a bulk region determined by the network geometry. This is the tensor-network version of subregion duality.
10.3 Quantum error correction
Section titled “10.3 Quantum error correction”The same logical bulk operator may have several boundary representatives. This is the finite-dimensional mechanism behind the statement that bulk locality is encoded redundantly in the boundary CFT.
10.4 Entropy inequalities
Section titled “10.4 Entropy inequalities”Minimal-cut entropies obey holographic entropy inequalities such as monogamy of mutual information in many tensor-network models. This makes tensor networks a natural discrete arena for studying the holographic entropy cone.
10.5 Page-transition cartoons
Section titled “10.5 Page-transition cartoons”By changing the boundary region or adding a reservoir-like sector, one can produce minimal-cut transitions that look like Page transitions. This is not a derivation of black hole evaporation, but it is a sharp way to visualize how a dominant entropy saddle can switch.
11. What the HaPPY code misses
Section titled “11. What the HaPPY code misses”The HaPPY code is best used as a microscope for structure, not as a replacement for gravity. Its main limitations are severe.
11.1 No Einstein dynamics
Section titled “11.1 No Einstein dynamics”The geometry is a fixed graph. There is no gravitational action, no Einstein equation, and no dynamical determination of the metric. Minimal cuts are combinatorial, not solutions of geometric extremality equations.
11.2 No true bulk effective field theory
Section titled “11.2 No true bulk effective field theory”The bulk degrees of freedom are finite-dimensional logical qudits. There are no gravitons, gauge constraints, local stress tensor, causal propagation, or continuum scattering.
11.3 No time evolution
Section titled “11.3 No time evolution”The network represents a spatial slice. It does not by itself describe Lorentzian time evolution, HRT surfaces, shock waves, scrambling, or black hole interiors.
11.4 Overly rigid entanglement
Section titled “11.4 Overly rigid entanglement”Perfect tensors produce highly constrained entanglement spectra. Real holographic CFT states have detailed Rényi spectra, modular-flow structure, operator spectra, and corrections.
11.5 No gravitational dressing problem
Section titled “11.5 No gravitational dressing problem”In continuum gravity, local bulk operators are not gauge-invariant until gravitationally dressed. A finite tensor network can mimic redundant representation, but it does not reproduce the full constraint algebra of gravity.
The correct attitude is therefore:
but
12. Beyond HaPPY: other tensor-network models
Section titled “12. Beyond HaPPY: other tensor-network models”The HaPPY code is part of a broader landscape.
Tensor-network models emphasize different aspects of holography. MERA organizes scale and suggests a discrete hyperbolic geometry. HaPPY codes make QEC and operator reconstruction exact. Random tensor networks reproduce RT-like minimal surfaces and bulk-entropy corrections in a large-bond-dimension limit. None of these by itself is full AdS/CFT.
12.1 MERA and scale geometry
Section titled “12.1 MERA and scale geometry”MERA organizes a quantum state by real-space renormalization. Its network direction naturally resembles an energy-scale direction, and critical states can produce a discrete hyperbolic geometry. This makes MERA useful for intuition about why a radial direction might emerge from scale-dependent entanglement.
But MERA has preferred directions and built-in renormalization flow. Continuum AdS/CFT is more symmetric, and the bulk radial direction is not simply a tensor-network layer count in any exact sense.
12.2 Random tensor networks
Section titled “12.2 Random tensor networks”Random tensor networks replace perfect tensors by random tensors, usually studied at large bond dimension. They reproduce RT-like entropy because averaging over random tensors maps the entropy computation to a statistical model whose domain walls become minimal surfaces. With bulk degrees of freedom included, these models can also reproduce FLM-like bulk entropy corrections:
This is closer to the quantum-corrected entropy formula than the simplest HaPPY code. The price is that reconstruction is typically approximate and probabilistic rather than an exact stabilizer-code calculation.
12.3 Hyperinvariant and other holographic networks
Section titled “12.3 Hyperinvariant and other holographic networks”Other tensor-network models attempt to reduce the artifacts of MERA or HaPPY by using more symmetric hyperbolic tilings, non-perfect local tensors, gauge constraints, subsystem codes, or random stabilizer tensors. Each model highlights different aspects of holography: entropy, locality, error correction, algebraic centers, or dynamics. None captures the entire continuum duality.
13. Relation to black hole information
Section titled “13. Relation to black hole information”The connection to black hole information is conceptual but deep. In the island story, late Hawking radiation can reconstruct an island region behind the horizon. In QEC language, the island is part of the entanglement wedge of the radiation:
The HaPPY code gives a finite-dimensional picture of how such a statement can be possible without local signal propagation from the island to the radiation. A logical bulk operator can have a boundary representative on a region that does not causally contain the bulk point in any naive sense. The encoding is nonlocal and redundant.
A minimal-cut transition in a tensor network is also a useful cartoon of the Page transition. Before the transition, the minimal cut avoids the black-hole interior; after the transition, a different cut includes an island-like region. The entropy drops not because a local channel opens, but because the correct fine-grained entropy saddle changes.
This is precisely why tensor networks are helpful: they turn the slogan “the interior is encoded in the radiation” into a concrete algebraic mechanism. They also clarify the danger of the slogan. The encoding is code-subspace-dependent, generally nonlocal, and often computationally difficult to decode. The tensor-network cartoon makes recoverability visible, but it does not by itself solve the microscopic dynamics of evaporation.
14. Common pitfalls
Section titled “14. Common pitfalls”Pitfall 1: “A tensor-network bond is literally a Planck-area surface.”
Section titled “Pitfall 1: “A tensor-network bond is literally a Planck-area surface.””A network bond is a discrete information channel. It can model an area contribution , but it is not literally a geometric surface in a dynamical spacetime.
Pitfall 2: “The HaPPY code proves AdS/CFT is a tensor network.”
Section titled “Pitfall 2: “The HaPPY code proves AdS/CFT is a tensor network.””It does not. It proves that a tensor network can realize several structural features expected of AdS/CFT. The continuum duality is much richer.
Pitfall 3: “Operator pushing is the same as causal propagation.”
Section titled “Pitfall 3: “Operator pushing is the same as causal propagation.””Operator pushing is an algebraic equality inside a code subspace. It is not a physical signal moving through the bulk.
Pitfall 4: “Multiple boundary representations violate no-cloning.”
Section titled “Pitfall 4: “Multiple boundary representations violate no-cloning.””They do not. The different representations are equivalent only on the code subspace. They are not independent physical copies.
Pitfall 5: “The greedy wedge is always the entanglement wedge.”
Section titled “Pitfall 5: “The greedy wedge is always the entanglement wedge.””In simple cases they coincide, but greedy shadows can occur. Continuum entanglement wedge reconstruction is more general than local greedy tensor absorption.
15. Summary
Section titled “15. Summary”The HaPPY code is the cleanest toy model of the slogan
Its perfect tensors make operator pushing exact. Its hyperbolic network makes minimal cuts resemble RT surfaces. Its bulk logical legs and boundary physical legs make the holographic encoding map explicit. Its redundant reconstructions explain how the same bulk operator can be represented on different boundary regions without violating no-cloning.
The model is also deliberately incomplete. It lacks continuum dynamics, gravitons, realistic modular flow, gravitational dressing, and the full operator spectrum of a CFT. Its value is not that it is a microscopic theory of quantum gravity. Its value is that it isolates the kinematic QEC skeleton that later pages will refine using operator algebras, modular flow, and islands.
Exercises
Section titled “Exercises”Exercise 1. Perfect tensor and maximal entanglement
Section titled “Exercise 1. Perfect tensor and maximal entanglement”Let define a normalized state on qudits. Show that if is perfect, then for any subset with , the reduced density matrix is proportional to the identity.
Solution
Choose a bipartition and regard as a linear map
The reduced density matrix on is obtained by contracting the complementary indices:
Perfectness says
After normalizing the state, is fixed so that , giving
Thus is maximally mixed and is maximally entangled with its complement.
Exercise 2. Minimal-cut entropy
Section titled “Exercise 2. Minimal-cut entropy”Consider a tensor network with bond dimension and no open bulk logical legs. Suppose the minimal cut separating boundary region from crosses internal bonds and that the network tensors are perfect in a way that saturates the cut bound. What is ?
Solution
Each cut bond carries a Hilbert space of dimension , so it can contribute at most to the entropy. If the cut bound is saturated and the minimal cut crosses bonds, then
This is the graph analogue of the RT formula. The integer plays the role of the discrete area, while is the entropy per cut bond.
Exercise 3. Operator pushing through an isometry
Section titled “Exercise 3. Operator pushing through an isometry”Let be an isometry, . Given an operator on , define on the image of . Show that on .
Solution
Using the definition of ,
Since is an isometry,
Therefore
This is the algebraic identity behind operator pushing. In a larger tensor network, is one perfect tensor viewed as an isometry across an allowed bipartition.
Exercise 4. Why redundant reconstruction is not cloning
Section titled “Exercise 4. Why redundant reconstruction is not cloning”Suppose two boundary operators and both represent the same bulk logical operator :
Explain why this does not mean the boundary contains two independent copies of the bulk information.
Solution
The two equalities hold only on the code subspace, i.e. on states in the image of the encoding map . They imply
not
as operators on the full boundary Hilbert space. Outside the code subspace, and may act differently. Thus the two boundary regions do not contain independent physical copies of the logical information. They contain different representatives of the same encoded logical operator.
This is exactly how quantum error correction avoids no-cloning: the logical information is encoded nonlocally, and different reconstructions are different ways of accessing the same code-subspace degree of freedom.
Exercise 5. Greedy wedge versus minimal-cut wedge
Section titled “Exercise 5. Greedy wedge versus minimal-cut wedge”Why can a greedy wedge be smaller than the minimal-cut entanglement wedge in a tensor network? What lesson does this teach about continuum entanglement wedge reconstruction?
Solution
The greedy wedge is obtained by a local algorithm: a tensor is absorbed only if at least half of its legs are already controlled by the growing region. A minimal cut, by contrast, is a global optimization problem. It can enclose a region even if no sequence of local greedy absorptions reaches every tensor inside the cut. Such unreached regions are called greedy shadows.
The lesson is that local operator pushing is only one method of reconstruction. Continuum entanglement wedge reconstruction is more general. It follows from relative entropy equality and quantum recovery, not from a literal greedy local tensor algorithm.
Further reading
Section titled “Further reading”- F. Pastawski, B. Yoshida, D. Harlow, and J. Preskill, “Holographic quantum error-correcting codes: toy models for the bulk/boundary correspondence,” arXiv:1503.06237.
- A. Almheiri, X. Dong, and D. Harlow, “Bulk locality and quantum error correction in AdS/CFT,” arXiv:1411.7041.
- P. Hayden, S. Nezami, X.-L. Qi, N. Thomas, M. Walter, and Z. Yang, “Holographic duality from random tensor networks,” arXiv:1601.01694.
- B. Swingle, “Entanglement renormalization and holography,” arXiv:0905.1317.
- D. Harlow, “The Ryu-Takayanagi Formula from Quantum Error Correction,” arXiv:1607.03901.