Clifford+T is universal: dense in U(2ⁿ) modulo phase #
Category: 1-Mathlib (CSD-free; staged for upstream). BACKLOG #73, part (f) of R-005, which
it closes: the last residue of the quantum-computing chain that had a Lean shape.
Glossary: https://glossary.constraintsurfacedynamics.com/clifford-t/
Plain-language, CSD-role and formal statements of Clifford+T universality, with this module as
the Lean anchor. Kept symmetric by scripts/check-glossary.sh.
★★ exists_phase_mem_cliffordTmLim: every unitary on m ≥ 1 qubits becomes a limit of
Clifford+T circuits after multiplication by a single global phase. The file assembles the whole
chain and supplies the three joints it was missing.
The exact product (★★ mem_closure_elementary): every unitary on m qubits is a finite,
exact product of CNOTs and single-qubit gates. That is #70's two-level decomposition, then #71's
Gray-code sandwich, then #85's control-count recursion. The joint is ★
block_mem_unitaryGroup_of_ctrlSetOf, the converse of ctrlSet_mem_unitaryGroup: the earlier rows
deliver a controlled gate known to be unitary, while #85 asks for its 2 × 2 block to be unitary,
and the block's unitarity follows by evaluating the relation UᴴU = 1 at the labels that differ only
on the target, where the sum collapses to two terms.
The lift. Sending a 2 × 2 gate to the m-qubit gate on one qubit is a monoid homomorphism
(gateOfHom) and continuous (continuous_gateOf), so it carries the closure of the one-qubit
Clifford+T words into the closure of the m-qubit circuits (★ gateOf_mem_cliffordTmLim). The step
that makes "modulo phase" survive is gateOf_smul: a phase on the block is a global phase on the
gate, because the gate is the block tensored with the identity, so scalars pull straight out. Were
that false the phases of #81 would become relative phases and the argument would not close.
The phases add. The gates that become limits after one global phase are themselves a submonoid
(phaseLim), so the exact product of elementary gates inherits a single phase, the sum of the
factors' phases, without any bookkeeping over lists.
- ★
ctrlSetOf_eq_of_block, ★block_mem_unitaryGroup_of_ctrlSetOf,block_mem_unitaryGroup_of_ctrlGate; isMultiCtrlX_mem_closure,isMultiCtrlGate_mem_closure, ★twoLevel_mem_closure, ★★mem_closure_elementary;gateOf_eq_ctrlSetOf,gateOf_apply_of_agree,gateOf_apply_of_not_agree,gateOf_one,gateOf_mul,gateOf_add,gateOf_smul,gateOfHom,continuous_gateOf;cliffordTGates,cliffordTm,cliffordTmLim,cliffordTm_le_lim,isClosed_cliffordTmLim, ★gateOf_mem_cliffordTmLim;smul_mul_smul_eq,phaseLim,mem_phaseLim_iff,elementary_le_phaseLim, ★★exists_phase_mem_cliffordTmLim.
Honest scope #
⚠️ Density, not exactness, and no gate counts. The statement is membership in a topological
closure: for every unitary and every accuracy there is a Clifford+T circuit that close, which is
what gate synthesis needs, and all that is true of a countable gate set. How the circuit's length
grows as the accuracy tightens is Solovay–Kitaev, BACKLOG #74, deliberately not claimed.
⚠️ m ≥ 1. The m = 0 case is the scalars and carries no gates.
⚠️ The single-qubit factors of the exact product are genuine U(2) elements; it is only after the
approximation step that everything is Clifford+T. The two statements are kept separate on purpose.
References: M. A. Nielsen, I. L. Chuang, Quantum Computation and Quantum Information §4.5
(Theorem 4.1 through §4.5.3); C. M. Dawson, M. A. Nielsen, quant-ph/0505030;
CsdLean4/Mathlib/LinearAlgebra/Matrix/TwoLevel.lean (#70),
CsdLean4/Mathlib/QuantumInfo/MultiControlled.lean (#71),
ControlRecursion.lean (#85) and CliffordTDensity.lean (#81); specs/magic-plan.md;
specs/BACKLOG.md #73; specs/residues.tsv R-005; specs/future-work.md.
A unitary controlled gate has a unitary block #
The decompositions of #70 and #71 deliver a controlled gate and the knowledge that it is unitary;
#85 asks for its 2 × 2 block to be unitary. This is the missing converse of
ctrlSet_mem_unitaryGroup: evaluate the unitarity relation at the labels that differ only on the
target.
Every unitary is an exact product of CNOTs and single-qubit gates #
★ A two-level unitary is a product of CNOTs and single-qubit gates: #71's Gray-code sandwich
fed into #85.
★★ Every unitary on m qubits is an exact product of CNOTs and single-qubit gates —
the two-level decomposition of #70, the Gray-code sandwich of #71 and the control-count recursion
of #85, composed.
Lifting a single-qubit gate to m qubits #
Lifting a single-qubit gate to m qubits is a monoid homomorphism.
Equations
- QuantumInfo.Controlled.gateOfHom j = { toFun := QuantumInfo.Controlled.gateOf j, map_one' := ⋯, map_mul' := ⋯ }
Instances For
Clifford+T on m qubits #
The monoid of Clifford+T circuits on m qubits.
Equations
Instances For
The limits of Clifford+T circuits on m qubits: a closed submonoid.
Equations
Instances For
★ The one-qubit density transfers to m qubits: lifting is a continuous homomorphism, so it
carries the closure of the one-qubit words into the closure of the m-qubit circuits.
Clifford+T is dense in U(2ⁿ) modulo phase #
The gates that become limits of Clifford+T circuits after one global phase. They form a submonoid, which is what lets the phases of the factors add up.
Equations
- One or more equations did not get rendered due to their size.
Instances For
★★ Clifford+T is universal: dense in U(2ⁿ) modulo phase. Every unitary on m ≥ 1 qubits
becomes a limit of Clifford+T circuits after multiplication by a single global phase. This is the
statement R-005 asked for, and it closes it.