---
title: Pentagon Holographic QECC
url: https://www.emergentmind.com/topics/pentagon-holographic-quantum-error-correcting-code
type: topic
---

# Pentagon Holographic QECC

The Pentagon Holographic Quantum Error Correcting Code—often referred to as the HaPPY code—is a stabilizer-based, tensor-network quantum error correcting code (QECC) constructed via hyperbolic pentagonal tilings. Primarily, it serves as a discrete, exactly solvable toy model that captures the relationship between holographic duality (notably the AdS/CFT correspondence) and quantum information theory through geometric realization of entanglement, code properties, and bulk/boundary duality. The code is built from contracted copies of rank-6 “perfect tensors” (each encoding the $\llbracket5,1,3\rrbracket$ five-qubit code) arranged on the $\{5,4\}$ hyperbolic tiling, resulting in a family of quantum codes with favorable encoding rates and remarkable connections to gravitational features such as the Ryu–Takayanagi formula [1503.06237, 2109.08158, 1905.03268, 1908.09253, 2410.22861].

## 1. Perfect Tensor Construction and Tiling

The foundational building block is a **perfect tensor** $T_{i_1 i_2 i_3 i_4 i_5 i_6}$, where each index $i_k \in \{0, 1\}$, satisfying the property that for any bipartition of the six legs into three inputs and three outputs, the associated linear map is an isometry. This tensor can be explicitly constructed from the $\llbracket5,1,3\rrbracket$ stabilizer code plus one auxiliary qubit and is cyclically symmetric regarding partitioning [1503.06237, 2109.08158].

The network geometry arises by tessellating the Poincaré disk with regular pentagons (Schläfli symbol $\{5,4\}$, with four pentagons at each vertex). At each pentagon, a copy of the perfect tensor is placed. Edges shared between pentagons correspond to contracted tensor indices, while uncontracted indices on the boundary represent the code’s physical (boundary) qubits, and those dangling into the bulk are logical (bulk) qubits [2109.08158, 2410.22861].

## 2. Isometric Encoding and Stabilizer Structure

Composing all tensors and summing over contracted indices defines a global isometry,
$$
V: \bigotimes_{p = 1}^{N_\text{bulk}} \mathbb{C}^2 \longrightarrow \bigotimes_{b = 1}^{N_\text{boundary}} \mathbb{C}^2
$$
with $V^\dagger V = I_\text{bulk}$, thus encoding $k = N_\text{bulk}$ logical qubits into $n = N_\text{boundary}$ physical qubits [1503.06237, 2410.22861]. The code is a pure quantum stabilizer code, and the local stabilizers from each seed $\llbracket5,1,3\rrbracket$ code propagate to boundary-local stabilizers:
$$
S^X_{f} = \bigotimes_{i \in \partial f} X_i, \quad S^Z_{f} = \bigotimes_{i \in \partial f} Z_i
$$
for each pentagon face $f$ whose contracted boundary $\partial f$ is mapped to the outermost layer [2410.22861]. Logical operators associated with bulk indices push to products of Pauli operators along boundary geodesics, with the minimal support scaling linearly with the number of tiling layers [2109.08158, 1908.09253].

## 3. Entanglement and Ryu–Takayanagi Formula

Entanglement entropy in the HaPPY code saturates a discrete version of the Ryu–Takayanagi (RT) formula. For any connected boundary region $A$, the von Neumann or Rényi entropy $S(A)$ is given by the length (number of cuts) of the minimal discrete surface $\gamma_A$ separating $A$ from its complement,
$$
S(A) = |\gamma_A| \cdot \log 2
$$
This holds exactly due to the perfect tensor property and negative-curvature hyperbolic geometry [1503.06237, 1905.03268, 2601.04467]. In the Majorana-dimer and ZX-calculus descriptions, each crossing dimer along geodesic $\gamma_A$ or spider-fusion operation in the ZX diagram similarly yields this scaling, reproducing both the surface area law and the holographic entropy correspondence [1905.03268, 2601.04467].

## 4. Error Correction, Logical Operators, and Bulk/Boundary Duality

Correctability derives from the isometric property of perfect tensors. For erasures, provided the erased region is below a critical fractional size, all bulk information can be reconstructed from the complement boundary region; quantitatively, this threshold is associated with the ratio $R = k / n < 1$ [1908.09253]. The code's distance $d$ equals the minimal boundary region whose erasure destroys correctability for a given bulk logical qubit; $d \sim 2L + 1$ for $L$ layers [2410.22861]. Logical operators in the bulk can be “pushed” by successive isometries to products of boundary operators, explicitly manifesting entanglement wedge reconstruction and subregion duality as in the AdS/CFT correspondence [1503.06237, 1905.03268].

Table: Key Quantities (for $L$ layers)

| Layers $L$ | $n$ (physical) | $k$ (logical) | $d$ (distance) | Rate $R$  |
|:----------:|:--------------:|:-------------:|:--------------:|:---------:|
| 0          | 5              | 1             | 3              | 0.20      |
| 1          | 35             | 7             | 3              | 0.20      |
| 2          | 215            | 43            | 5              | 0.20      |

These quantities follow $n(L) = 6^{L+1} - 1$, $k(L) = (6^{L+1} - 1)/5$, $d(L) = 2L+1$; asymptotic rate $R \rightarrow 0.20$ [2410.22861, 1908.09253].

## 5. Decoding, Fault Tolerance, and Performance

Decoding can be accomplished via tensor contraction (in $\mathcal{O}(n^{2.37})$ for the LEGO_HQEC tensor-network decoder), Gaussian elimination, or integer-optimization-based minimum weight decoders [2410.22861]. The pure (maximal-rate) pentagon code exhibits zero threshold under both erasure and Pauli depolarizing noise: logical error probability decays only polynomially, not exponentially, with code size due to logarithmic distance scaling. However, “zero-rate” variants obtained by gauge fixing bulk indices (freezing bulk qubits) can attain thresholds $\sim 18\%$ [2410.22861].

Stabilizers remain geometrically local on the boundary, facilitating syndrome extraction with bounded-weight measurements. The full encoding and decoding circuits can be constructed via a sequence of $CZ$, $CX$, and $H$ gates guided by the contracted graph and optimized for minimal long-range interactions [2209.08954].

## 6. Alternative Representations: Majorana Dimers and ZX-Calculus

The code state admits a Majorana-dimer representation: the tensor network contracts to a configuration in which boundary Majorana pairs (dimers) correspond to shortest paths (“bit threads”) through the bulk. The entanglement structure, operator mapping, and saturating RT surface follow transparently from this geometric dimer correspondence [1905.03268].

In the ZX-calculus formalism, each perfect tensor is realized as a six-node ZX “graph state” subdiagram. The global code appears as a contraction of spiders with Hadamard edges mapped to the pentagon tiling, and all code properties (stabilizers, logicals, entropy, toy black holes) are encoded and computable in the diagrammatic calculus [2601.04467].

## 7. Rate Bounds, Extensions, and Limitations

The pentagon code achieves an asymptotic boundary-to-bulk code rate
$$
R = \lim_{n \to \infty} \frac{N_\text{bulk}}{N_\text{boundary}} = \frac{1}{5}
$$
for the tile-completion inflation rule on the $\{5,4\}$ tessellation, as proven via the hyperbolic isoperimetric inequality [1908.09253, 2410.22861]. This $R<1$ ensures nonzero erasure threshold under perfect erasure decoding, but performance under generic noise is determined by the code’s logarithmic distance and thus does not show a finite threshold without additional gauge fixing [2410.22861]. Extensions to larger seed codes, alternative tilings (e.g., $\{4,5\}$, “XP” tensors), or non-stabilizer constructions are tractable in the tensor-network formalism [1908.09253, 2410.22861].

Open challenges include optimal decoding under general noise, scaling and threshold behavior for finite sizes, and explicit realization of non-Clifford logical gates—basic versions of the HaPPY code lack transversal $T$ (non-Clifford) gates [2109.08158].

---

The pentagon holographic quantum error correcting code forms a canonical model for the interplay between hyperbolic geometry, holographic duality, and quantum information, providing a template for both theoretical advances in quantum gravity and practical approaches to quantum error correction [1503.06237, 2410.22861, 2209.08954, 1908.09253].

Source: https://www.emergentmind.com/topics/pentagon-holographic-quantum-error-correcting-code