1 of 53

Magic State Cultivation

Craig Gidney

QIP 2025

2 of 53

10 years ago: 99% of every computation is T factories

3 of 53

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

4 of 53

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!

5 of 53

Previous

Slide

This Talk

2014

1e-12 error

1e-12

1e-9

1e-6

(assuming 1e-3 physical noise)

6 of 53

Overview of a Cultivation

Open in Crumble

7 of 53

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"

arXiv:2003.03049

8 of 53

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"

arXiv:2003.03049

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

9 of 53

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

10 of 53

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

11 of 53

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

12 of 53

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

13 of 53

Stage 1: Injection

14 of 53

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)

15 of 53

Stage 2: Cultivation (Kickback Measurement)

Time-Reversed Check (Top Row)

Time-Forward (Bottom Row)

16 of 53

Stage 2: Cultivation (Kickback Measurement at d=5)

Open in Crumble

17 of 53

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.

18 of 53

Stage 3: Escape!

19 of 53

Grafted Color/Surface Code

Light = X

Dark = Z

Red/Green/Blue:�Color Code Region

Overlapping stabilizers are shown inset to avoid ambiguity

20 of 53

Stage 3: Escape!

21 of 53

Decoding the Color Code Region with a Matcher

X Subgraph

Z Subgraph

22 of 53

23 of 53

Benchmarking

24 of 53

Obstacle: How do we sample this?

State vector simulation

✗ Too large. Escape stage has >100 qubits.�

25 of 53

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.

26 of 53

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.

27 of 53

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.�

28 of 53

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?

29 of 53

S gate circuit as a proxy for the T gate circuit

30 of 53

S gate circuit as a proxy for the T gate circuit

1.5x gap

31 of 53

S gate circuit as a proxy for the T gate circuit

2x gap

1.5x gap

32 of 53

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

33 of 53

End-to-end simulations

34 of 53

End-to-end simulations

at 1e-3 noise

d1=5 achieves

1e-9 logical error

35 of 53

End-to-end simulations

halving noise would cut cost by 10x!

36 of 53

End-to-end simulations

halving noise would improve errors 50x!

37 of 53

End-to-end simulations

doubling noise increases cost >100x...

38 of 53

Contrasting With Other Techniques

39 of 53

Cost

(Qubit·Rounds)

Cost of good magic states

Logical Error Rate

40 of 53

Cost

(Qubit·Rounds)

Injection

Cost of good magic states

Logical Error Rate

41 of 53

Cost

(Qubit·Rounds)

Injection

Distillation

Cost of good magic states

Logical Error Rate

42 of 53

Distillation

Cost

(Qubit·Rounds)

Injection

Cultivation

Cost of good magic states

Logical Error Rate

43 of 53

Cost

(Qubit·Rounds)

Cost of good magic states

10x Cheaper

Logical Error Rate

44 of 53

Cost

(Qubit·Rounds)

Cost of good magic states

Removes a nasty

cost discontinuity

Logical Error Rate

45 of 53

Cost

(Qubit·Rounds)

Cost of Cultivation

Cost of Controlled-Not

Cost of good magic states

Logical Error Rate

46 of 53

An example of using it

47 of 53

48 of 53

49 of 53

Summary

50 of 53

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

51 of 53

Bonus Figures

52 of 53

Cost of waiting longer

53 of 53

What if we still need distillation?