Entangling Logical Qubits Without Physical Operations: A Simple Guide to Phantom Codes

Based on Koh et al., arXiv:2601.20927v1. A deep dive into zero-overhead fault-tolerant entanglement via classical qubit relabelling.

This blog post explains the surprising discovery of phantom codes---quantum error-correcting codes that implement logical CNOT entangling gates using only classical qubit relabelling, achieving zero overhead and perfect fidelity. We cover the motivation, mathematical definition, operating principles, comparison with surface codes and IBM's bivariate bicycle codes, and the hardware platforms most suitable for implementation. The key insight: by placing logical operations at the center of code design rather than treating them as downstream constraints, we can achieve fault-tolerant entanglement at no cost.

1. Motivation: Why Entanglement Is Expensive

Quantum computers require fault-tolerant operation---the ability to run long quantum algorithms despite inevitable hardware noise. Quantum error correction (QEC) is the solution: we spread one logical qubit across many physical qubits, creating redundancy so errors can be detected and corrected without destroying the quantum information.

However, here lies a fundamental bottleneck: entangling gates are the costliest operations in fault-tolerant quantum computation.

The Cost of Conventional Entanglement

In standard QEC codes (surface codes, qLDPC codes), implementing a logical CNOT between two logical qubits requires one of these expensive approaches:

  • Repeated measurement rounds: Extract syndrome information multiple times, increasing circuit depth and exposing the system to noise.
  • Dense two-qubit gate layers: Apply many physical CNOT gates across the codeblock, each one a noise source.
  • Ancillary codeblocks: Allocate additional coded qubits to assist with gate implementation (e.g., magic state distillation for T-gates).

Recent experiments confirm this: logical entangling gates dominate the error budget. In neutral-atom and superconducting qubit experiments, these gates are the leading source of logical errors.

The Phantom Code Insight

What if we could implement logical CNOT gates without any physical operations?

The key observation: for certain codes with special structure, a logical CNOT can be realized by simply permuting (relabelling) the physical qubits. This permutation:

  1. Creates no new entanglement---it only reshuffles existing correlations.
  2. Generates zero errors when the permutation is absorbed into classical circuit compilation (not executed on noisy hardware).
  3. Achieves perfect fidelity (up to machine precision) because no physical operations occur.

This is revolutionary because qubit permutations are the only operations that commute through arbitrary circuits without introducing operator spread. They pass through magic gates, Pauli frame corrections, and everything else unscathed---and then vanish entirely in compilation.

Historical Context

Until recently, only two phantom codes were known:

  1. The \([[12, 2, 4]]\) Carbon code---enabled repeated QEC rounds in trapped-ion experiments.
  2. The \([[2^D, D, 2]]\) hypercube codes---underpinned recent neutral-atom demonstrations of logical-over-physical fidelity gains.

The paper discovers over 100,000 new phantom codes, including infinite families with higher distances, establishing them as a viable general class---not exotic flukes.

2. What Is a Phantom Code? Mathematical Definition

CSS Stabilizer Codes: Brief Recap

A Calderbank-Shor-Steane (CSS) code encodes \(k\) logical qubits in \(n\) physical qubits with distance \(d\), denoted \([[n, k, d]]\). The codespace is defined by commuting stabilizer generators:

\[ S = \langle G_1, G_2, \ldots, G_m \rangle \]

where each \(G_i\) is a product of Pauli operators \(X\) or \(Z\) on physical qubits. For CSS codes:

  • \(X\)-type stabilizers contain only \(X\) and \(I\) operators.
  • \(Z\)-type stabilizers contain only \(Z\) and \(I\) operators.
  • Logical operators similarly separate into \(X\)-type and \(Z\)-type.

Phantom Code Definition

Definition (CSS Phantom Code): An \([[n, k, d]]\) CSS code is phantom if the CNOT\(_{ab}\) gate for every ordered pair \((a, b) \in [k]^2\) with \(a \neq b\) can be implemented via qubit permutations, for some choice of logical basis.

Unpacking the Definition

  • "Every ordered pair": Not just some pairs. The code enables CNOT between all logical qubits---all-to-all connectivity at zero cost.
  • "Via qubit permutations": Only rearrangements of physical qubits; no multi-qubit gates, measurements, or syndrome extraction.
  • "Some choice of logical basis": Different logical basis choices may work; we choose the one making CNOTs achievable.
  • "CSS structure": Scalable architectures require transversal interblock CNOT gates, which CSS codes provide.

Key Structural Properties

Theorem 1: Any logical circuit of CNOT gates acting on \(2^a\) codeblocks (\(a \in \mathbb{N}\)) can be implemented in physical depth at most \(4(2^a - 1)\), up to a residual permutation of logical qubits.
Theorem 2 (Hamming Bound): An \([[n, k, d]]\) CSS phantom code satisfies \(\eta(2^k - 1) \leq B(n, d)\), where \(\eta\) is the number of weight-\(d\) logical operators of the same equivalence class.

3. How Do Phantom Codes Work? Mechanics of Zero-Cost Gates

The Fundamental Principle: Permutations Commute

The magic enabling phantom codes is a simple fact: Qubit permutations \(\sigma \in S_n\) are the only quantum operations that commute through arbitrary circuits without introducing operator spread.

Operator spread means a single-qubit error becomes multi-qubit after a gate. Permutations avoid this because the operator weights and locality properties are preserved. In contrast, single-qubit Clifford gates (like \(S, H, T\)) break this property.

Implementing CNOT via Permutation: An Example

Consider the smallest phantom code, \([[4, 2, 2]]\):

\[ \text{Stabilizers: } X_1 X_2 X_3 X_4, \quad Z_1 Z_2 Z_3 Z_4 \] \[ \text{Logical Part (Basis 1): } X_1 = XXII, \quad X_2 = XIXI, \quad Z_1 = ZIZI, \quad Z_2 = ZZII \]

Goal: Implement CNOT\(_{12}\). Solution: Swap qubits 1 and 3. After this relabelling, the new logical operators satisfy \(\text{new } X_1' = IXXI = X_1 X_2 \text{ (old values)}\), which is exactly the CNOT action on \(X\)-type operators.

Compilation Absorbs the Cost

The compiler updates qubit labels in all subsequent operations to reflect the permutation. This is a classical bookkeeping operation---zero quantum cost. This is different from physically executing SWAP gates, which would incur errors.

4. Logical Operations on Phantom Codes

Beyond the zero-cost CNOT gates, what other logical operations are available?

Automorphism Cliffords

Column permutations of the stabilizer matrix that preserve the row span implement logical Clifford operations. For \([[4, 2, 2]]\), swapping the first and second halves implements logical \(H^{\otimes 2}\).

Diagonal Magic Gates

By applying non-uniform single-qubit \(Z\)-rotations on physical qubits, we can implement logical diagonal gates (\(T, \sqrt{T}\)). The sum of all angles is chosen so that the logical computational-basis states are preserved up to state-dependent phases.

Remark: These magic gates are typically distance-2 effective distance, limiting the fault-tolerance of magic distillation.

Fold-Diagonal Gates

By embedding the code into a larger auxiliary code, we find logical operations implementable via patterned two-qubit diagonal interactions (\(S_i S_j\) gates). Example: The \([[20, 2, 6]]\) phantom code supports the full logical Clifford group via fold-\(S_i S_j\) gates and teleported Hadamards.

Fundamental Limitation

Theorem 3: A stabilizer code supporting logical gate \(U\) via qubit permutations cannot admit strictly transversal logical gate \(V\) acting on any number of codeblocks where \([U^{\otimes b}, V] \neq 0\).

Implication: Phantom codes cannot support strictly transversal Hadamard, \(S\), \(CZ\), or magic gates that anticommute with the permutation CNOTs. This forces the use of auxiliary techniques (magic state distillation).

5. Code Discovery: How to Find Phantom Codes

Method 1: Exhaustive Enumeration (n ≤ 14)

Enumerate all \(2.71 \times 10^{10}\) inequivalent CSS codes. For each, use Boolean satisfiability (SAT) solving to check if a permutation implements CNOT for every pair. Result: \(1.39 \times 10^5\) phantom codes found.

Method 2: SAT-Based Code Discovery (n > 14)

Treat stabilizer generators \(H_X\) and \(H_Z\) as free variables in a SAT instance and search for matrices that yield a phantom code with parameters \([[n, k, d]]\).

Method 3: Phantom Quantum Reed-Muller Codes

Construct codes analytically from classical Reed-Muller codes. Starting from hypercube \([[2^D, D, 2]]\), each reduction of \(k\) by one doubles the distance \(d\) at fixed \(n\). Examples: \([[16, 3, 4]], [[64, 4, 8]], [[64, 5, 4]]\).

Method 4: Binarization and Concatenation

To reach \(d > \sqrt{n}\), start with a GF(4) qudit code, binarize to qubits, and concatenate with the \([[4, 2, 2]]\) phantom code. Examples: \([[12, 2, 4]], [[20, 2, 6]]\).

6. Phantom Codes vs. Surface Codes vs. Bivariate Bicycle Codes

Property Surface Code Bivariate Bicycle Phantom Code
Qubits per logical~1000--2000~144--288~64--256
In-block CNOT costGates + roundsGates + roundsZero
Fidelity per CNOT\((1-p)^{O(d)}\)\((1-p)^{O(1)}\)Perfect
LDPC structure?YesYesNo
Connectivity2D GridDegree-3 PlanarAll-to-all
Syndrome extractionBare-ancillaBare-ancillaSteane-style

7. Hardware Platforms: Which Technologies Benefit Most?

  • Neutral-Atom Arrays (Most Favorable): Naturally support long-range interactions via Rydberg blockade. Parallel transversal gates execute in depth \(O(2^a)\). Bluvstein et al. (Nature 2024) already used a phantom code (hypercube) for gain demos.
  • Trapped-Ion Systems (High Impact): Have global connectivity via shared vibrational modes. Zero-cost entanglement is crucial when parallel mechanisms are limited. The Carbon code \([[12, 2, 4]]\) was used in demonstrations.
  • Superconducting Qubits (Limited): Current 2D grids conflict with non-local stabilizers. Could be relevant with architectural changes (3D or chip-stacking).

8. Experimental Validation: Benchmarking Against Surface Codes

Benchmarked \([[64, 4, 8]]\) phantom qRM code against optimized surface codes under circuit-level noise (\(p = 10^{-3}\)).

  • Benchmark 1 (GHZ Preparation): Phantom code achieved 56× improvement in logical infidelity with ~2× fewer qubits than \(d=8\) surface codes.
  • Benchmark 2 (Trotterized Simulation): 8-body Ising Hamiltonian simulation (2400 logical gates). Logical infidelity reduction of 94× vs. \(d=6\) surface code and 10× vs. \(d=8\).
  • Trade-off: The 24× preselection overhead (due to complex state prep) is far outweighed by the 50-90× fidelity gain.

9. Limitations and Open Questions

  • Low Encoding Rate: \(k = O(\log n)\). In-block CNOT fraction decreases as logical width increases. Scaling requires concatenation.
  • Non-LDPC: Prevents simple bare-ancilla syndrome extraction and suggests a fundamental incompatibility with current LDPC techniques.
  • Magic Gate Ceiling: Transversal magic gates found are only distance-2 effective.
  • Error Threshold: Estimated at \(\sim 0.1\%\), lower than surface codes (\(\sim 1\%\)).

10. Conclusion

Phantom codes represent a paradigm shift: by placing logical operations at the center of code design, we uncover fundamentally new capabilities. They transition from exotic curiosities to a broad family with practical advantages under realistic noise. Phantom codes represent a complementary direction to high-rate qLDPC codes, providing zero-cost gates where density and connectivity allow.

Final Thought: zero-overhead fault-tolerant entanglement is not a dream---it is a structural property of phantom codes.

References

  1. Koh, J. M., Gong, A., Diaconu, A. C., et al. (2026). Entangling logical qubits without physical operations. arXiv:2601.20927v1.
  2. Bluvstein, D., et al. (2025). A fault-tolerant neutral-atom architecture for universal quantum computation. Nature, 649, 39--47.
  3. Bluvstein, D., Evered, S. J., et al. (2024). Logical quantum processor based on reconfigurable atom arrays. Nature, 626, 58--65.
  4. Reichardt, B. W., et al. (2024). Demonstration of quantum computation and error correction with a tesseract code. arXiv:2409.04628.
  5. Cain, M., et al. (2024). Correlated decoding of logical algorithms with transversal gates. Physical Review Letters, 133, 240602.
← Back to Blog