Let a circuit be written over Clifford gates, gates and Toffoli (or CCZ) gates, with Pauli measurements and classical feed-forward allowed.
- The T count is the number of and gates; the Toffoli count is the number of Toffoli or CCZ gates. Each non-Clifford gate consumes one magic state (T state or CCZ state) in a fault-tolerant implementation.
- The T depth is the smallest number of layers into which the non-Clifford gates can be partitioned so that the gates within a layer can be applied simultaneously, given the circuit's dependencies, with Clifford gates allowed anywhere in between.
The counts are linked by gate identities: a Toffoli gate costs seven gates in the standard ancilla-free circuit and four with an ancilla and a measurement (Jones); a temporary logical AND computes the AND of two qubits into a fresh ancilla with four gates and uncomputes it with none, using a measurement (Gidney). Arbitrary single-qubit rotations are approximated to precision by Clifford+T sequences with T count about (Ross and Selinger).
In architectures where Clifford operations are absorbed into Pauli measurements (Litinski), the T count sets the number of magic states and the T depth, multiplied by the time per non-Clifford layer, bounds the runtime from below. When each layer must wait for decoded measurement results before the next can start, the relevant depth is the number of such dependent steps (the reaction depth or measurement depth), and the time per step includes the reaction time of the classical control system, as in the estimate of Gidney and Ekerå.