DEV Community

Cover image for Quantum Error Correction Zootopia
Doraking
Doraking

Posted on

Quantum Error Correction Zootopia

On the journey of learning quantum computing, there is a vast labyrinth that everyone wanders into at least once. Its name is "Quantum Error Correction (QEC)".

Opening textbooks, you encounter veterans like "Shor codes" and "Surface codes," but once you venture into the sea of research papers, you find countless "new species of codes" inhabiting it. The place that comprehensively collects and classifies such codes is the Error Correction Zoo (EC Zoo), managed by Victor V. Albert and others.

Looking at this site, a certain movie's worldview suddenly overlaps. Yes, it's Zootopia.

Imagine a world where diverse animals, from small mice to giant elephants, coexist under the common law called "Stabilizer Formalism." In this article, I will liken the residents of the EC Zoo to the characters of Zootopia and introduce them along with their mathematical definitions.


1. Topological Square: The Bond of Partners

The center of the story is the duo of topological codes active on the front lines of current quantum computer development (on 2D chips).

🐰 Judy Hopps = Surface Code

Judy Hopps from Zootopia standing on a 2D grid lattice representing quantum qubits, holding a magnifying glass to check for errors (stabilizers).

"Any hardware can implement me!"
The absolute protagonist of the current QEC world. Defined only by adjacent interactions on a 2D grid, it can be implemented on many hardware platforms such as superconducting circuits and neutral atoms.

【Overview】
The surface code is defined on an L×LL \times L 2D square lattice. Physical qubits are placed on the edges (or vertices) of the lattice, and stabilizer operators are defined at vertices (Star) and faces (Plaquette).

Av=istar(v)Xi,Bp=iboundary(p)Zi A_v = \prod_{i \in \text{star}(v)} X_i, \quad B_p = \prod_{i \in \text{boundary}(p)} Z_i

All of these commute with each other ( [Av,Bp]=0[A_v, B_p] = 0 ), and the code space C\mathcal{C} is defined as the state having an eigenvalue of +1 for all stabilizers.

C=ψAvψ=ψ,Bpψ=ψ,v,p \mathcal{C} = { |\psi\rangle \mid A_v |\psi\rangle = |\psi\rangle, B_p |\psi\rangle = |\psi\rangle, \forall v, p }

Logical operators XˉL,ZˉL\bar{X}_L, \bar{Z}_L are formed as strings crossing the lattice. This structure of "protecting the whole with only local checks" is exactly her straightforward investigative style.

Original Paper:
S. B. Bravyi and A. Y. Kitaev, "Quantum codes on a lattice with boundary" (1998)

🦊 Nick Wilde = Color Code

Nick Wilde from Zootopia standing on a complex hexagonal lattice colored in Red, Green, and Blue, showcasing dexterity with quantum gates.

"You guys are simple black and white (X or Z), but I'm three colors."
A topological code like Judy, but with a more complex "trivalent graph (a lattice paintable with three colors)." He has the dexterity to perform specific logical gates like magic.

【Overview】
Color codes are typically defined on 2D hexagonal lattices (like honeycomb structures), where each face is painted with one of three colors (R, G, B).
Unlike the surface code, both XX -type and ZZ -type stabilizers are defined for each face ff .

SXf=ifXi,SZf=ifZi S_X^f = \prod_{i \in f} X_i, \quad S_Z^f = \prod_{i \in f} Z_i

Nick's greatest weapon (his con-artist dexterity) is the ability to implement transversal Clifford gates.
While implementing a Hadamard gate HH on a normal surface code requires complex operations, on a color code, a parallel operation HnH^{\otimes n} on each physical bit directly becomes a logical Hadamard Hˉ\bar{H} .

Hˉ=i=1nHi \bar{H} = \bigotimes_{i=1}^n H_i

Original Paper:
H. Bombin and M. A. Martin-Delgado, "Topological Quantum Distillation" (2006)


2. Zootopia Police Department (ZPD): Organization and Discipline

The police department protecting the peace of the city has codes with unique but strict structures.

🐆 Benjamin Clawhauser = Steane Code

Benjamin Clawhauser from Zootopia visualized as a friendly guide to CSS codes, surrounded by donuts representing topology.

"I love donuts (holes) and CSS!"
The receptionist is the friendly [[7,1,3]][[7, 1, 3]] code. A representative CSS code based on the classical Hamming code [7,4,3][7,4,3] , it is a basic form loved by everyone.

【Overview】
The Steane code is a CSS code defined using a classical parity check matrix HclH_{cl} .
For 7 physical bits, it has the following stabilizer generators:

g1=IIIXXXXg2=IXXIIXXg3=XIXIXIXg4=IIIZZZZg5=IZZIIZZg6=ZIZIZIZ \begin{aligned} g_1 &= IIIXXXX \\ g_2 &= IXXIIXX \\ g_3 &= XIXIXIX \\ g_4 &= IIIZZZZ \\ g_5 &= IZZIIZZ \\ g_6 &= ZIZIZIZ \end{aligned}

The first three are XX stabilizers, and the last three are ZZ stabilizers. He is also used as a building block for Chief Bogo (mentioned later), serving as the beloved mascot and basic unit of the organization.

Original Paper:
A. M. Steane, "Error Correcting Codes in Quantum Theory" (1996)

🐃 Chief Bogo = Quantum Golay Code

Chief Bogo from Zootopia representing the robust and symmetric Quantum Golay Code, standing firm against errors.

"I will not tolerate any objections to my symmetry!"
A heavyweight with a massive and robust structure of [[23, 1, 7]]. A quantum version of the classical Golay code, boasting extremely high symmetry and defensive power.

【Overview】
The quantum Golay code is created from the classical "perfect code," the Golay code G23\mathcal{G}_{23} , using the CSS construction method.
The code parameters are [[23,1,7]][[23, 1, 7]] . That is, it uses 23 qubits and has a distance of d=7d=7 (can correct up to 3 errors).

Its stabilizer group S\mathcal{S} is deeply related to sporadic simple groups like the Mathieu groups M23M_{23} and M24M_{24} , possessing mathematically extremely beautiful (and strict) symmetry.
While lacking the flexibility of topological codes, it is an old-fashioned tough code that never lets go of an error once caught.

Original Paper:
A. M. Steane, "Error Correcting Codes in Quantum Theory" (1996)


3. City Hall and the Underworld: Light and Shadow

The powerful figures moving this city. Their abilities (formulas) are powerful and distinctive.

🦁 Mayor Lionheart = Shor Code

Mayor Lionheart from Zootopia representing the foundational Shor Code, showing a concatenated structure of qubits.

"I built this paradise (QEC)."
The first quantum error-correcting code in history, [[9,1,3]][[9, 1, 3]] . The great founder who proved that quantum error correction is possible.

【Overview】
The Shor code is created by concatenating a 3-qubit "bit-flip code" and a "phase-flip code." The logical states 0L,1L|0_L\rangle, |1_L\rangle are described as follows:

0L=(000+111)(000+111)(000+111)221L=(000111)(000111)(000111)22 \begin{aligned} |0_L\rangle &= \frac{(|000\rangle + |111\rangle)(|000\rangle + |111\rangle)(|000\rangle + |111\rangle)}{2\sqrt{2}} \\ |1_L\rangle &= \frac{(|000\rangle - |111\rangle)(|000\rangle - |111\rangle)(|000\rangle - |111\rangle)}{2\sqrt{2}} \end{aligned}

This redundant structure became the first shield to protect quantum states from decoherence.

Original Paper:
P. W. Shor, "Scheme for reducing decoherence in quantum computer memory" (1995)

🐑 Assistant Mayor Bellwether = Bacon-Shor Code

Assistant Mayor Bellwether from Zootopia manipulating gauge degrees of freedom, representing the subsystem Bacon-Shor Code.

"I look like just an assistant mayor, don't I? But I have 'gauges'."
At first glance, she looks like a normal stabilizer code, but she is a subsystem code that manipulates "gauge degrees of freedom." She has the face of a mastermind who rewrites the system behind the scenes.

【Overview】
The Bacon-Shor code has not only a normal stabilizer group S\mathcal{S} but also a gauge group G\mathcal{G} .
In an L×LL \times L lattice, gauge operators act on adjacent two qubits.

GijX=Xi,jXi,j+1,GijZ=Zi,jZi+1,j G_{ij}^X = X_{i,j} X_{i,j+1}, \quad G_{ij}^Z = Z_{i,j} Z_{i+1,j}

Stabilizers are defined by products of these gauge operators (e.g., S=Gi,jXGi,j+1XS = G_{i,j}^X G_{i,j+1}^X ).
Her terror lies in the ability to apply gauge operators without destroying logical information. This is called "Gauge Fixing," allowing dynamic manipulation of the error correction procedure (or the ending of the story) depending on the situation.

Original Paper:
D. Bacon, "Operator quantum error-correcting subsystems for self-correcting quantum memories" (2006)

🐀 Mr. Big = 5-qubit Code

Mr. Big from Zootopia representing the compact and perfect 5-qubit code, freezing wasteful qubits.

"Ice 'em." (Wasteful qubits, that is.)
[[5, 1, 3]]. The theoretical minimum size. The don of the underworld with perfect symmetry who allows absolutely no waste.

【Overview】
The smallest code capable of correcting a single qubit error. Its stabilizer generators have a beautiful structure created by cyclically shifting Pauli operators.

g1=XZZXIg2=IXZZXg3=XIXZZg4=ZXIXZg5=ZZXIX \begin{aligned} g_1 &= X Z Z X I \\ g_2 &= I X Z Z X \\ g_3 &= X I X Z Z \\ g_4 &= Z X I X Z \\ g_5 &= Z Z X I X \end{aligned}

Since this code is not a CSS code, XX and ZZ are mixed. Though small, it possesses the strongest correction ability, truly a "small but mighty" existence.

Original Paper:
R. Laflamme et al., "Perfect Quantum Error Correcting Code" (1996)


4. Unique Citizens: The Pinnacle of Diversity

Zootopia also has unique codes adapted to special environments.

🦥 Flash = Floquet Code

Flash from Zootopia representing the Floquet Code, where logical qubits emerge dynamically over time steps.

"Wait... until... the cycle... ends..."
Incomprehensible in a static picture. A dynamic code defined together with "time".

【Overview】
Floquet codes do not have a fixed stabilizer group but are defined by an Instantaneous Stabilizer Group (ISG) S(t)\mathcal{S}(t) where the measurement basis changes at each time step tt .
For example, on a honeycomb lattice, measurements are switched at each time step as follows:

t(mod3)=0:Check XX on horizontal edgest(mod3)=1:Check YY on diagonal edgest(mod3)=2:Check ZZ on vertical edges t \pmod 3 = 0: \text{Check } XX \text{ on horizontal edges} \\ t \pmod 3 = 1: \text{Check } YY \text{ on diagonal edges} \\ t \pmod 3 = 2: \text{Check } ZZ \text{ on vertical edges}

The reaction is slow (you have to wait 3 steps for information to gather), but by continuing observations, logical qubits dynamically emerge.

Original Paper:
M. B. Hastings and J. Haah, "Dynamically Generated Logical Qubits" (2021)

🦊 Finnick = GKP Code

Finnick from Zootopia representing the GKP Code, a small character hiding an infinite-dimensional continuous variable Hilbert space.

"Thought I was a baby? I'm infinite-dimensional on the inside."
Looks like a single mode (small), but inside possesses an infinite-dimensional Hilbert space of Continuous Variables.

【Overview】
The Gottesman-Kitaev-Preskill (GKP) code is defined in the phase space of position operator q^\hat{q} and momentum operator p^\hat{p} .
Stabilizers are described by the following displacement operators D(α)D(\alpha) :

Sq=ei2πq^,Sp=ei2πp^ S_q = e^{i 2\sqrt{\pi} \hat{q}}, \quad S_p = e^{-i 2\sqrt{\pi} \hat{p}}

The logical state (codeword) is expressed as a superposition of "grid points" in phase space.

0ˉnZq=2nπ |\bar{0}\rangle \propto \sum_{n \in \mathbb{Z}} |q = 2n\sqrt{\pi}\rangle

A con artist of a different species (actually highly functional) with a structure fundamentally different from discrete qubits (other animals).

Original Paper:
D. Gottesman, A. Kitaev, and J. Preskill, "Encoding a qubit in an oscillator" (2001)


Conclusion: Future Star

🎤 Gazelle = qLDPC Codes

Gazelle from Zootopia on stage, representing the high-efficiency, scalable qLDPC Codes that break current limitations.

"Try Everything! (Break the limits!)"
The new era superstar breaking the trade-off between rate and distance.

【Overview】
Currently, the most attention is on Quantum Low-Density Parity-Check (qLDPC) codes.
The parity check matrix HH is a sparse matrix, and the weights of rows and columns are kept to a constant order.

[HX,HZT]=0,wt(row),wt(col)=O(1) [H_X, H_Z^T] = 0, \quad \text{wt}(row), \text{wt}(col) = O(1)

Especially recent discoveries like Bivariate Bicycle codes have amazing properties where both logical bit count kk and distance dd scale linearly with physical qubit count nn ( k,dnk, d \propto n ).
Researchers around the world are enthusiastic about her stage, which scales efficiently beyond the "limits of surface codes (area law)".

Original Paper:
S. Bravyi et al., "High-threshold and low-overhead fault-tolerant quantum memory" (2024)


The EC Zoo is updated daily, and new species are born.
By deciphering the "DNA" called mathematical formulas, the personality and survival strategy of each code become visible. I hope you will also find your favorite code at the EC Zoo.

Top comments (0)