Resource Cost of Distillation
Distillation works, but it is expensive, and for many proposed algorithms the magic-state factory dominates the qubit count and runtime of the whole machine. This lesson estimates that cost.
Counting raw states: the distillation tree
A multi-round factory is a tree. Each -to- block consumes inputs and produces output. To feed an -round factory, each of the inputs to the top block is itself the output of a -round sub-factory, and so on. Ignoring post-selection rejection, the number of raw magic states consumed per final distilled output is
The number of rounds is set by how far the error must fall. Starting from raw error and iterating :
To reach a target of , two rounds suffice ( while is not yet good enough). So raw magic states per distilled output — before accounting for batches thrown away on a nontrivial syndrome.
Space and time on a surface code
In a surface-code architecture each of those (or ) magic-state inputs is an encoded logical qubit occupying a patch of physical qubits, and the Clifford circuit of the protocol is realized by lattice surgery over many code cycles. A useful rule of thumb from the Fowler–Devitt–Jones analyses is that a single-level -to- factory occupies on the order of – logical-qubit-tiles and takes on the order of code cycles (with the code distance), so a two-level factory costs roughly the square of that.[^fowler-surface] Historically, factories were projected to consume the majority of the physical qubits in a fault-tolerant machine running, say, Shor's algorithm.
Why the cost matters — and recent progress
Because count drives factory throughput, two research directions attack the cost:
- Better protocols / lower overhead. Triorthogonal codes and block codes amortize many outputs per block; catalyzed conversions cut the per- cost substantially.[^gidney-fowler]
- Reducing count in the algorithm. Fewer non-Clifford gates means fewer magic states; this is the point of -count optimization.
Litinski's re-analysis argued that, with careful surface-code layout, distillation is "not as costly as you think" — a single well-designed factory can keep up with a realistic algorithm's demand.[^litinski] Still, the basic accounting stands: every logical costs one distilled magic state, and each of those costs a tree of raw inputs plus the spacetime to error-correct them all.
Try it
For raw input error and target output error , find the smallest number of rounds of -to- distillation and return the raw-state cost per distilled output. Drive the recurrence yourself.
[^fowler-surface]: Fowler, Mariantoni, Martinis, Cleland, Surface codes, arXiv:1208.0928. [^gidney-fowler]: Gidney, Fowler, Efficient magic state factories…, arXiv:1812.01238. [^litinski]: Litinski, Magic State Distillation: Not as Costly as You Think, arXiv:1905.06903.
Sign in on the full site to ask questions and join the discussion.