clifford_t_circuit_t_count
def
The T-count of a Clifford+T circuit: the number of T gates in its gate list.
Statement
def clifford_t_circuit_t_count {N : ℕ} (gs : List (CliffordTGate N)) : ℕ- Defined in
- Exact T-counts of Toffoli Layers from an Isotropy Bound, arXiv:2610.01024, Sec. A.3 (T-count of a Clifford+T circuit)
- Verified
- 06 Oct 2026
- Axioms
- none listed
- Built on 1
- 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 3
- clifford_t_circuit_t_count_nilThe empty Clifford+T circuit has T-count 0.
- clifford_t_circuit_t_count_exampleSanity check: the circuit H_0, T_0, T_1 on two qubits has T-count 2.
- clifford_t_circuit_t_count_appendThe T-count of the concatenation of two Clifford+T circuits is the sum of their T-counts.
Lean source view module on GitHub
/-- The number of T gates of a circuit. -/ def clifford_t_circuit_t_count {N : ℕ} (gs : List (CliffordTGate N)) : ℕ := gs.countP fun g => match g with | .t _ => true | _ => false