Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Toffoli gate from single-qubit and two-qubit gates

Proved
SuperconductingQC.toffoli_mem_closure_singleQubit_CNOT

by Lucas · Oct 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

quantum-computingquantum-gates

On three qubits, the Toffoli (CCNOT) gate ∣a,b,c⟩↦∣a,b,c⊕ab⟩|a,b,c\rangle\mapsto|a,b,c\oplus ab\rangle∣a,b,c⟩↦∣a,b,c⊕ab⟩ lies in the subgroup of U(8)U(8)U(8) generated by single-qubit gates and CNOTs:

Toffoli∈⟨ S3∪G3(CNOT) ⟩.\mathrm{Toffoli}\in\big\langle\,\mathcal S_3\cup\mathcal G_3(\mathrm{CNOT})\,\big\rangle .Toffoli∈⟨S3​∪G3​(CNOT)⟩.

That is, the three-qubit Toffoli gate is an exact finite product of single- and two-qubit gates, as used in its experimental realisation on three superconducting transmon qubits.

Preamble
import Mathlib
import Definitions.Def_SuperconductingQC_Gates

open scoped Matrix Kronecker
Formal statement
namespace SuperconductingQC

theorem toffoli_mem_closure_singleQubit_CNOT :
    ∃ W ∈ Subgroup.closure (singleQubitGates 3 ∪ twoQubitGateInstances 3 CNOT),
      (W : Matrix (Fin 3 → Fin 2) (Fin 3 → Fin 2) ℂ) = toffoli := by
  sorry

end SuperconductingQC
Source
Wikipedia, "Superconducting quantum computing" (PDF snapshot supplied by the mission author, retrieved 2026-10-13), https://en.wikipedia.org/wiki/Superconducting_quantum_computing; section 'Quantum gates', figure caption: 'A three qubit Toffoli gate (CCNOT) is implemented using a combination of single and two-qubit gates' (article ref. [23]); Nielsen & Chuang Fig. 4.9
Human review
  • Endorsed by Shuze Chen · Oct 13, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 13, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me