Magic plays a dual role in quantum computation: it promotes stabilizer dynamics from efficient classical simulability to computational universality, but also challenges fault-tolerant architectures, since non-stabilizer operations are harder to protect against noise. Magic state distillation addresses this issue, yet existing protocols remain largely tailored to specific assumptions about the input or noise model and, more fundamentally, no general information-theoretic theory of optimal magic-state conversion currently exists. Here we develop such a characterization for pure qubit states through universal magic state concentration: a fixed stabilizer protocol that converts a few copies of an unknown pure non-stabilizer qubit state into an exact target magic state. Motivated by the impossibility of exact
T-state concentration, we build six- and eight-copy protocols producing an exact
CCZ state, with six copies being minimal. Their success probabilities are governed by the linearized order-three stabilizer Rényi entropy
M3lin. We show that this connection is structural: for up to nine input copies,
M3lin fully determines the success probability of every universal Clifford-invariant stabilizer protocol. Remarkably, this characterization persists asymptotically: our constructions achieve optimal rates among universal single-output protocols and remain optimal up to logarithmic factors among arbitrary stabilizer protocols. As a corollary, we show that any unknown pure non-stabilizer state suffices for universal quantum computation via probabilistic
CCZ-state injection. Together, these results identify the stabilizer Rényi entropy as a fundamental operational quantity in magic state distillation.
We propose a family of error-detecting stabilizer codes with an encoding rate of
1/3 that permit a transversal implementation of the gate $T=\mathrm{exp}(\ensuremath{-}i\ensuremath{\pi}Z/8)$ on all logical qubits. These codes are used to construct protocols for distilling high-quality ``magic'' states $T\left|+\right\ensuremath{\rangle}$ by Clifford group gates and Pauli measurements. The distillation overhead scales as $O({\mathrm{log}}^{\ensuremath{\gamma}}(1/\ensuremath{\epsilon}))$, where $\ensuremath{\epsilon}$ is the output accuracy and $\ensuremath{\gamma}={\mathrm{log}}_{2}(3)\ensuremath{\approx}1.6$. To construct the desired family of codes, we introduce the notion of a triorthogonal matrix, a binary matrix in which any pair and any triple of rows have even overlap. Any triorthogonal matrix gives rise to a stabilizer code with a transversal
T gate on all logical qubits, possibly augmented by Clifford gates. A powerful numerical method for generating triorthogonal matrices is proposed. Our techniques lead to a twofold overhead reduction for distilling magic states with accuracy $\ensuremath{\epsilon}\ensuremath{\sim}{10}^{\ensuremath{-}12}$ compared with previously known protocols.
Magic states, by allowing non-Clifford gates through gate teleportation, are important building blocks of fault-tolerant quantum computation. Magic state distillation protocols aim to create clean copies of magic states from many noisier copies. However, the prevailing protocols require substantial qubit overhead. We present a distillation protocol based on permutation-invariant gnu codes, as small as two qubits. The two-qubit protocol achieves a 0.5 error threshold and 1/2 distillation rate, surpassing prior schemes for comparable codes. Our protocol furthermore distils magic states with arbitrary magic by varying the position of the ideal input states on the Bloch sphere. We achieve this by departing from the usual magic state distillation formalism, allowing the use of non-Clifford gates in the distillation protocol, and allowing the form of the output state to differ from the input state. Our protocol is compatible for use in tandem with existing magic state distillation protocols to enhance their performance.
Producing high-fidelity magic states using the smallest possible number of physical qubits and operations stands as a very important challenge to achieve fault-tolerant quantum computation at scale. Besides emerging proposals for alternative methods such as cultivation, magic state distillation remains essential for achieving very low error rates. Known distillation protocols are usually built through quantum codes derived from triorthogonal matrices. Here, exploiting the specific noise structure present in magic state distillation protocols, we show that classical error-correcting codes offer a simpler framework for deriving these protocols. This formulation is particularly well suited to systematic numerical and analytical studies of distillation protocols involving a fixed number of qubits. Specifically, we use a SAT solver to derive a series of no-go theorems that relate key figures of merit, including the number of qubits and the factory distance. In particular, considering the standard implementation as a circuit of Z-diagonal Pauli product rotations followed by measurements, we show that no
T-to-
T distillation protocol on fewer than eight qubits can exceed distance 3, and no
T-to-
CCZ protocol distance 2. Our results also include new such distillation protocols with the smallest number of qubits for a given distance in the literature, namely distance 4 and 5
T-to-
T protocols supported on 10 and 11 qubits, as well as distance 3 and 4
T-to-
CCZ distillation protocols supported on 9 and 10 qubits. Finally, going beyond unitary circuits by recycling qubits through mid-circuit measurement and reinitialization, we obtain an implementation of the distance-5
49T-to-
1T protocol on only 5 active qubits.
Magic-state factories are a major cost of fault-tolerant quantum computing, yet how few noisy inputs they need is known only for restricted protocols. We show that, for tolerating input faults, any stabilizer protocol, however adaptive, postselected or multistage, is no better than a projection onto one stabilizer code, and that for rational targets a fault pattern is harmful exactly when its complement is. Searches over all codes show that quadratic distillation of one T state needs exactly nine inputs and that the eight-input CCZ factory is optimal. At order
d, one T state needs
n≥2d.
In order to circumvent that no universal set of gates can be achieved on a given quantum error-correcting codes, additional gates can be performed through magic state injection. This however requires to have access to high fidelity magic state, which can be obtained by the distillation of low quality states to fewer higher quality ones. In this paper, we provide a family of distillation protocols able to produce diagonal states at every level of the Clifford hierarchy. This family is obtained recursively using code doubling techniques and leveraging qubit recycling, the fact that some idle qubits of the protocols can be measured and re-used. At a given level of the Clifford hierarchy, we show that the protocols we derive can be performed at arbitrary high distance on a fix number of logical qubits. This family recovers many known efficient protocols, and uncovers new ones, such as a
111→1 protocol for
∣T⟩ state distillation at distance
7, which are the most compact in term of volume. Finally, we discuss possible extension of this framework for distillation protocols producing more than one output state.