Sign in
← Atlas
Exact & formalOperatorsMagic state distillation

Magic T state

The single-qubit magic state |T⟩ = T|+⟩, the standard resource state consumed by gate teleportation to implement a fault-tolerant non-Clifford T gate.

magic statet-gatefault tolerancenon-clifford

Atlas stars stay in the public catalog. Saving this entry to your workspace starts an unstarred private copy.

Fault-tolerant architectures implement Clifford gates cheaply via transversal operations but cannot implement T transversally on most codes; magic-state distillation sidesteps this by consuming noisy copies of |T⟩ to purify a smaller number of high-fidelity copies, which are then injected via teleportation.

Circuit & simulation
050%
150%
What this takes and returns
TakesNothingWhat joins here

Nothing goes in, and that is what this entry is: a pipeline starts here. There is no upstream to choose — what you pick is what comes after.

Nothing in the Atlas meets this end.

Returns1 qubitWhat joins here

Returns a 1-qubit register a next stage can take. This is the end that joins.

14 entries meet this end. Named below.

Prepares a state. Nothing goes in, and what comes out is a register another stage can take. See all 12 →

Where the map uses this

This record is an instance of an object the map names, so these are the processes that consume or produce one. None of them is about this record in particular.

State you can prepare 5 of 33 processes

How it works

The magic TT state is

T=T+=12(0+eiπ/41),T=(100eiπ/4).|T\rangle = T|+\rangle = \frac{1}{\sqrt2}\big(|0\rangle + e^{i\pi/4}|1\rangle\big), \qquad T = \begin{pmatrix}1 & 0\\ 0 & e^{i\pi/4}\end{pmatrix}.

Why it is "magic." Every Clifford-stabilized single-qubit state has a Bloch vector pointing along ±x^,±y^,\pm\hat x, \pm\hat y, or ±z^\pm\hat z. T|T\rangle's Bloch vector is (cosπ4,sinπ4,0)=(1/2,1/2,0)(\cos\tfrac{\pi}{4}, \sin\tfrac{\pi}{4}, 0) = (1/\sqrt2, 1/\sqrt2, 0) — exactly bisecting the XX and YY axes — so it is stabilized only by the non-Pauli, non-Clifford operator cos(π/4)X+sin(π/4)Y\cos(\pi/4)X+\sin(\pi/4)Y. States outside the stabilizer octahedron have positive stabilizer Rényi entropy (a standard magic monotone) and a Wigner representation that goes negative, which is precisely the resource Clifford circuits cannot generate from scratch and cannot amplify: the Gottesman–Knill theorem says Clifford circuits acting on stabilizer states can be simulated efficiently classically, so some non-stabilizer input is required for the circuit to be classically hard, i.e. potentially universal.

Gate teleportation with T|T\rangle. To apply TT to an unknown state ψ|\psi\rangle fault-tolerantly: prepare T|T\rangle on an ancilla, apply CNOT with ψ|\psi\rangle as control, measure the ancilla in the XX basis, and apply a Clifford correction (SS or identity) depending on the outcome. This consumes one copy of T|T\rangle and one classical bit per TT gate, moving the hard part of fault tolerance from "implement a non-Clifford gate transversally" to "produce clean copies of one specific state."

Distillation. Because physical T|T\rangle preparation is noisy, Bravyi and Kitaev's 15-to-1 distillation protocol takes 15 noisy copies with error ϵ\epsilon and outputs 1 copy with error O(ϵ3)O(\epsilon^3), using only Clifford operations plus measurement — the polynomial suppression is what makes large fault-tolerant T-gate counts (needed for e.g. Shor's algorithm or quantum chemistry) practically achievable.

Implementation
Native
magic_t_state.py
from qiskit import QuantumCircuit
from qiskit.quantum_info import Statevector

qc = QuantumCircuit(1)
qc.h(0)
qc.t(0)

sv = Statevector.from_instruction(qc)
print(sv)  # [0.7071+0.j, 0.5+0.5j]  ==  (|0> + e^{i*pi/4}|1>)/sqrt(2)
print("Bloch:", sv.data)


FINAL_CIRCUIT = qc
Quantum vs classical

Classical baseline

Use a classical state-vector or matrix simulation at the same width, precision, and measurement objective.

Quantum claim

The quantum record demonstrates a state or operator behavior; it does not make classical simulation or communication costs disappear.

How to compare

Compare fidelity, samples, gate depth, noise, memory, and the cost of preparing and reading the state.

Declared gaps

Nobody has reviewed this record for gaps yet.

Literature & references
Universal Quantum Computation with ideal Clifford gates and noisy ancillas2004 · Sergei Bravyi, Alexei Kitaev

Introduces magic-state distillation, the 15-to-1 protocol, and the definition of the T magic state used here.

arxiv.org/abs/quant-ph/0403025