---
title: Color Code Hₓᵧ-Cultivation for Magic States
url: https://www.emergentmind.com/topics/color-code-h-cultivation
type: topic
---

# Color Code Hₓᵧ-Cultivation for Magic States

Color Code Hₓᵧ-Cultivation refers to a fault-tolerant protocol for preparing magic states in two-dimensional color codes, specifically targeting logical eigenstates of the operator $M = (X+Y)/\sqrt{2}$ (the so-called Hₓᵧ-type). The approach employs transversal Clifford measurements and post-selection, enabling resource-efficient generation of high-fidelity magic states without relying on traditional multi-level distillation. This protocol leverages unique features of color codes including high encoding rates, transversal Clifford gate implementations, and efficient lattice surgery, and has been demonstrated to outperform previous color-code-based distillation approaches by approximately two orders of magnitude in spacetime resources. Recent advances include integration with the Bravyi–Haah 15-to-1 distillation block and adaption for matchable codes via grafting [2409.07707], as well as the development of alternative cultivation protocols using surface codes and non-local gates [2502.01743].

## 1. Color-Code Architecture and Logical Qubits

The two-dimensional color code is defined on a trivalent, three-colorable lattice, most canonically the hexagonal (6-6-6) tiling. Each vertex hosts a qubit, and every face is assigned one of three colors such that adjacent faces always differ in color. Two stabilizer checks are associated with every face $f$:
- **X-check:** $S_X(f) = \prod_{v\in f} X_v$
- **Z-check:** $S_Z(f) = \prod_{v\in f} Z_v$

A logical patch is a finite region with “color” or “Pauli” boundaries that condense specific anyons. Triangular patches encode a single qubit, while rectangular patches encode two, each logical operator corresponding to shortest string-net operators connecting boundaries:
- $\bar X$ is an X-string-net across all three boundaries (triangle) or red boundaries (rectangle)
- $\bar Z$ is a Z-string-net analogously

Code distance is minimal weight of $\bar X$ or $\bar Z$ ($d$ for triangle, $d_X$, $d_Z$ for rectangle). Syndrome extraction consists of $d$ rounds for spacelike and $d_T$ rounds for timelike error correction, where $d_T = d$ for triangle and $d_T = \min(d_X, d_Z)$ for rectangle.

## 2. Definition and Mechanism of Magic-State Cultivation

Cultivation is a distillation-free protocol preparing logical magic states by projecting a logical codeword onto a Clifford-eigenstate using transversal Clifford measurements and stringent post-selection on check outcomes. Consider the magic state $|A\rangle = |0\rangle + e^{i\pi/4}|1\rangle$, a +1 eigenstate of $M = (X+Y)/\sqrt{2}$, and its encoded logical version $|Ā\rangle$ in the color code.

- **Transversal Implementation:** $M$ acts across all data qubits ($M̄ = \bigotimes_v M_v$).
- **Protocol:** Repeatedly apply transversal $C = e^{-i\pi/4 Z} H$ (or related Clifford), measure all stabilizers, and abort any run with detected flips.
- **Outcome:** The post-selected code block yields the high-fidelity magic state $|Ā\rangle$ if no errors are detected.

This approach bypasses the need for state injection and additional ancilla, exploiting the full transversality of Clifford measurements on color codes. However, the output fidelity decays exponentially with code distance, limiting the lowest achievable logical error rate unless combined with further distillation.

## 3. Circuit Construction, Lattice Surgery, and Grafting

The explicit cultivation circuit for a distance-$d$ triangular patch is:
1. **Initialization:** Start from $|+̄⟩ = |0̄⟩ + |1̄⟩$.
2. **Round Loop:** For $i = 1$ to $N_m$, apply transversal Clifford, measure all stabilizers, abort if any stabilizer flips.
3. **Post-selection:** Output the code block if all rounds pass without error; decode residual errors.

For increased scalability, cultivated states are fed into a 15-to-1 magic-state distillation block using only lattice surgery among color-code patches. Alternatively, after Hₓᵧ measurement cycles, the color code can be *grafted* into a surface code via merges of adjacent plaquette stabilizers, facilitating use of decoders optimized for minimum-weight matching.

- **Grafting Steps:** Merge X- and Z-plaquettes along boundaries, forming weight-6 (or higher) stabilizers, then continue syndrome extraction; bulk stabilizers remain weight-4.
- **Cycle Time Implications:** Grafted rounds require approximately twice the depth (CNOT layers) as weight-4 rounds.
- **Logical Error Suppression:** After post-selection and code expansion, infidelity is suppressed by approximately an additional $O(p^{(\Delta d)/2})$.

## 4. Fidelity Scaling Laws, Error Suppression, and Distillation Boost

Leading-order logical infidelity for cultivation under circuit-level depolarizing noise $p$ is:
$$
\epsilon_{\text{cult}}(d, p) \simeq \alpha \cdot \left( \frac{p}{p_\text{th}} \right)^{\beta d}
$$
with typical parameters: $\alpha \sim O(1),\ p_\text{th} \sim 0.5\%$–$0.6\%,\ \beta \sim 0.5$. Example values (p=10⁻³):
- $d=3$: $\epsilon_\text{cult} \sim 6 \times 10^{-3}$, success $\sim 65\%$
- $d=5$: $\epsilon_\text{cult} \sim 7 \times 10^{-7}$, success $\sim 15\%$

**Post-growth:** By code expansion (e.g. from $d_\text{cult}=3$ to $d_m=7$), infidelity further drops (e.g. $6 \times 10^{-3} \to 3 \times 10^{-5}$ with $\lesssim 20\%$ additional rejection).

**Distillation Boost:** Injecting cultivated states (infidelity $\sim 3 \times 10^{-5}$) into a 15-to-1 distillation block, the output infidelity drops to $\sim 2 \times 10^{-16}$ at $p = 10^{-3}$, far below single-level distillation or standalone cultivation performance. Distillation introduces a leading $O(p^3)$ error term due to undetected faulty T-measurements.

## 5. Resource Overhead, Space-Time Volume, and Practical Scalability

Resource quantification is via spacetime volume:
$$
\text{Spacetime} = (\#\text{data qubits} + \#\text{syndrome qubits}) \times \text{time steps} \div \text{success probability}
$$
**Resource benchmarks at $p = 10^{-3}$:**

| Protocol                  | Qubits × Steps | Effective Spacetime | Typical Infidelity | Scrappage/Success |
|---------------------------|----------------|--------------------|--------------------|-------------------|
| Cultivation-only (d=5)    | $300 \times 50$| $1.5 \times 10^4$  | $\sim 7 \times 10^{-7}$ | $85\%$ scrappage |
| 15→1 Distillation         | $2.4k \times 512$ | $1.2 \times 10^6$ | $\sim 10^{-7}$        | $98\%$ success    |
| Cultivation + Distil      | $5.3k \times 759$ | $4.0 \times 10^6$ | $\sim 10^{-9}$        | $99.6\%$ success  |
| Previous best (color code)| —                | $6.6 \times 10^9$ | $\sim 10^{-9}$        | —                 |
| Surface code (Litinski)   | —                | $3.0 \times 10^6$ | $\sim 10^{-9}$        | —                 |

This demonstrates that color-code cultivation, especially when combined with the 15-to-1 distillation, achieves resource overhead within a factor $\sim 2$ of optimized surface-code protocols and drastically surpasses previous color-code-based distillation schemes [2409.07707].

## 6. Thresholds, Scaling, and Post-Selection

Memory thresholds for the color code (using the concatenated MWPM decoder) are:
- Triangular dZ: $p_\text{th} \approx 0.24\%$
- Rectangular dZ: $p_\text{th} \approx 0.42\%$
- Rectangular dX: $p_\text{th} \approx 0.58\%$
- Timelike: $p_\text{th} \approx 0.62\%$

Logical failure scales as:
$$
p_{\text{fail}}(p,d) = \alpha \left( \frac{p}{p_{\text{th}}} \right)^{\beta d + \eta} [1 + \epsilon (p/p_\text{th})^{\zeta d^\lambda}]
$$
with $\beta \approx 0.54$–$0.60$, $\lambda \approx 0.7$–$0.9$. For cultivation, post-selection based on decoder's logical gap ($\lesssim 20\%$ abort rate) can suppress infidelity by factors $\sim 10^3$.

Erasure qubits, if detectable (leakage $e \gg p$), can be post-selected without compromising logical error, albeit reducing overall acceptance rate.

## 7. Comparative Protocols: Hₓᵧ- vs. CX-Cultivation and Platform Considerations

The Hₓᵧ-cultivation protocol leverages transversality of $H_{XY} = \exp[i (\pi/4)(X \otimes Y + Y \otimes X)]$ on triangular color codes, enabling direct logical magic state preparation with local CNOT gates. Alternatively, CX-cultivation uses Toffoli (CCX) gates to project pairs of surface codes via a GHZ ancilla, expanding afterwards without grafting.

Key trade-offs:
- **Hₓᵧ-cultivation:** Optimal for local 2D devices, lower overhead at $p \gtrsim 10^{-4}$. Advantageous erasure acceptance due to fewer data qubits.
- **CX-cultivation:** Simplifies implementation for platforms with native multi-qubit gates (Rydberg atoms, trapped ions), slightly higher qubit-cycles and attempts per kept shot.

For superconducting platforms restricted to CNOTs, Hₓᵧ-cultivation plus surface-code grafting provides the lowest overhead. For architectures with native long-range connectivity, CX-cultivation becomes preferable [2502.01743].

## Summary

Color code Hₓᵧ-cultivation enables fault-tolerant, resource-efficient preparation of high-fidelity magic states by combining transversal Clifford measurement (cultivation) and advanced lattice surgery distillation blocks. When integrated with optimized distillation, infidelities $\lesssim 10^{-16}$ are achieved at $p = 10^{-3}$ using only $\mathcal{O}(10^4)$ qubits, with thresholds, scaling, and protocol efficiency competitive with or surpassing surface-code schemes. Further improvements in decoder performance may render color-code cultivation-distillation the most resource-effective pathway for scalable quantum computing [2409.07707][2502.01743].

Source: https://www.emergentmind.com/topics/color-code-h-cultivation