AFTD Auto-Formalizing Theoretical Domains

clifford_t_circuit_matrix

def

The unitary of a Clifford+T circuit given as a list of gates, the first gate of the list acting first: g_k ... g_2 g_1.

Statement

noncomputable def clifford_t_circuit_matrix {N : ℕ} (gs : List (CliffordTGate N)) : Matrix (Fin N → Bool) (Fin N → Bool) ℂ
Defined in
Exact T-counts of Toffoli Layers from an Isotropy Bound, arXiv:2610.01024, Sec. A.3 (unitary of a Clifford+T circuit)
Verified
06 Oct 2026
Axioms
none listed
Built on 2
  • clifford_t_gate_matrixThe matrix of a Clifford+T gate in the computational basis indexed by bit strings x : Fin N -> Bool: H on qubit i has entry (-1)^{x_i…
  • CliffordTGateA gate of a Clifford+T circuit on N qubits: a Hadamard H on qubit i, a phase gate S on qubit i, a CNOT with control c and target t (c…
Used by 2

Lean source view module on GitHub

/-- The unitary of a circuit, its gates applied in list order (the first gate acts first). -/
noncomputable def clifford_t_circuit_matrix {N : ℕ} (gs : List (CliffordTGate N)) : Matrix (Fin N → Bool) (Fin N → Bool) ℂ :=
  gs.foldl (fun U g => clifford_t_gate_matrix g * U) 1
See it in the graphDiscuss this resultChallenge it