Magic State Cultivation
Craig Gidney
QIP 2025
10 years ago: 99% of every computation is T factories
Major improvements over the past 10 years
- Postselected injection is way better� Li 2014 arXiv:1410.7808
- Surface code lattice surgery is way more compact than braiding� Horsman+ arXiv:1111.4022� Fowler+ arXiv:1808.06709� Litinski arXiv:1808.02892
- The distillation partially protects the host code� Litinski arXiv:1905.06903��- Use soft information to discard suspicious runs� Bombin+ arXiv:2212.00813� Gidney+ arXiv:2312.04522
Major improvements over the past 10 years
- Postselected injection is way better� Li 2014 arXiv:1410.7808
- Surface code lattice surgery is way more compact than braiding� Horsman+ arXiv:1111.4022� Fowler+ arXiv:1808.06709� Litinski arXiv:1808.02892
- The distillation partially protects the host code� Litinski arXiv:1905.06903��- Use soft information to discard suspicious runs� Bombin+ arXiv:2212.00813� Gidney+ arXiv:2312.04522
Very different from a list of theory advances!
Previous
Slide
This Talk
2014
1e-12 error
1e-12
1e-9
1e-6
(assuming 1e-3 physical noise)
Overview of a Cultivation
Open in Crumble
Initial magic state cultivation paper
- Prepare a color code storing noisy |T⟩
�- Check the |T⟩ by phase kickback into GHZ
- Prepare a ghz state |0…0⟩+|1…1⟩
- Use it to control a transversal HXY
- Reveal kickback by X basis measurement
�- Check repeatedly to decrease error
Chamberland et al 2020
"Very low overhead fault-tolerant magic state preparation using redundant ancilla encoding and flag qubits"
Initial magic state cultivation paper
- Prepare a color code storing noisy |T⟩
�- Check the |T⟩ by phase kickback into GHZ
- Prepare a ghz state |0…0⟩+|1…1⟩
- Use it to control a transversal HXY
- Reveal kickback by X basis measurement
�- Check repeatedly to decrease error
Chamberland et al 2020
"Very low overhead fault-tolerant magic state preparation using redundant ancilla encoding and flag qubits"
Or was it H Goto 2016 "Minimizing resource overheads for fault-tolerant preparation of encoded states of the Steane code"?��Unfortunately we'll never know because it's closed access
Prior refinement to magic state cultivation
Cultivation works at 10-3 noise!��
You can use simple grid connectivity!
Itogawa et al 2024�"Even more efficient magic state distillation by zero-level distillation" arXiv:2403.03991
This is a 15-to-1 distillation jammed into a color code
1T + 7T+7T = 15T
There are 35 triplets of T -> ZT errors that make it fail
Cultivation vs Distillation
Cultivation
- Gradually improve one state
- Key operations are physical� (within one color code)
- Can't reach arbitrarily low error� (cost wall from postselection)
- Ends by escaping to a large code
Distillation
- Turn many states into fewer better states
- Key operations are logical� (across many surface codes)
- Reaches arbitrarily low error� (just keep iterating it)
- States always in sufficiently large codes
Our Improvements
- Grow color code incrementally
- Pair up T checks to reduce their cost
- Use superdense color code cycle
- Escape to a large surface code by grafting
- Decode color code via postselected matching
Was 1e-4 error → Now 2e-9 error
3→5
1→3
Escape
5→15
Wait for decoder
Stage 1: Injection
Stage 2: Cultivation
Grow the color code
Stabilize the color code
Double-check the T state (using kickback measurement)
Repeat (until approaching the postselection cost wall)
Stage 2: Cultivation (Kickback Measurement)
Time-Reversed Check (Top Row)
Time-Forward (Bottom Row)
Stage 2: Cultivation (Kickback Measurement at d=5)
Open in Crumble
Escaping small code distance by growing the color code
Chromobius was so bad at this I almost dropped the whole idea
Definitely not intrinsically bad. We need a better decoder.
Stage 3: Escape!
Grafted Color/Surface Code
Light = X
Dark = Z
Red/Green/Blue:�Color Code Region
Overlapping stabilizers are shown inset to avoid ambiguity
Stage 3: Escape!
Decoding the Color Code Region with a Matcher
X Subgraph
Z Subgraph
Benchmarking
Obstacle: How do we sample this?
State vector simulation
✗ Too large. Escape stage has >100 qubits.�
Obstacle: How do we sample this?
State vector simulation
✗ Too large. Escape stage has >100 qubits.�Stabilizer simulation� ✗ Too picky. Can't handle the T gates.�
Obstacle: How do we sample this?
State vector simulation
✗ Too large. Escape stage has >100 qubits.�Stabilizer simulation� ✗ Too picky. Can't handle the T gates.�Tensor network simulation� ✗ Too interconnected. Dozens of color code cycles.�
Obstacle: How do we sample this?
State vector simulation
✗ Too large. Escape stage has >100 qubits.�Stabilizer simulation� ✗ Too picky. Can't handle the T gates.�Tensor network simulation� ✗ Too interconnected. Dozens of color code cycles.�Stabilizer decomposition� ✓arxiv:2202.09202 does some comparable sized simulations� ✗ Too slow. Minutes per shot. Want billions of shots.�
Obstacle: How do we sample this?
State vector simulation
✗ Too large. Escape stage has >100 qubits.�Stabilizer simulation� ✗ Too picky. Can't handle the T gates.�Tensor network simulation� ✗ Too interconnected. Dozens of color code cycles.�Stabilizer decomposition� ✓arxiv:2202.09202 does some comparable sized simulations� ✗ Too slow. Minutes per shot. Want billions of shots.�Replace T gates with S gates� ✓Easy and fast to simulate. Circuit still functions (distills S|+⟩ instead of T|+⟩).� ? How accurate is this?
S gate circuit as a proxy for the T gate circuit
S gate circuit as a proxy for the T gate circuit
1.5x gap
S gate circuit as a proxy for the T gate circuit
2x gap
1.5x gap
S gate circuit as a proxy for the T gate circuit
Don't understand why it changes.
For now: assume it's 2x.
2x gap
1.5x gap
End-to-end simulations
End-to-end simulations
at 1e-3 noise
d1=5 achieves
1e-9 logical error
End-to-end simulations
halving noise would cut cost by 10x!
End-to-end simulations
halving noise would improve errors 50x!
End-to-end simulations
doubling noise increases cost >100x...
Contrasting With Other Techniques
Cost
(Qubit·Rounds)
Cost of good magic states
Logical Error Rate
Cost
(Qubit·Rounds)
Injection
Cost of good magic states
Logical Error Rate
Cost
(Qubit·Rounds)
Injection
Distillation
Cost of good magic states
Logical Error Rate
Distillation
Cost
(Qubit·Rounds)
Injection
Cultivation
Cost of good magic states
Logical Error Rate
Cost
(Qubit·Rounds)
Cost of good magic states
10x Cheaper
Logical Error Rate
Cost
(Qubit·Rounds)
Cost of good magic states
Removes a nasty
cost discontinuity
Logical Error Rate
Cost
(Qubit·Rounds)
Cost of Cultivation
≈�Cost of Controlled-Not
Cost of good magic states
Logical Error Rate
An example of using it
Summary
Summary
Cultivation is 10x cheaper than prior work� One T gate ≈ two CNOT gates
�Cultivation reaches 2e-9 error (from noise strength 1e-3)� within 10x of relevance to factoring 2048 bit numbers
Cultivation fits in small spaces� A hallway wide enough to route logical qubits is large enough for cultivation
Reducing noise improves cultivation dramatically� If physical qubits improve 10% per year, we might never need distillation
Bonus Figures
Cost of waiting longer
What if we still need distillation?