Skip to main content
KetQat

Appearance

Topic · advanced

Clifford+T Synthesis

How arbitrary quantum gates are compiled into the Clifford+T gate set used by fault-tolerant computers - the Clifford group, T-count and T-depth, exact synthesis over the ring Z[1/√2, i], optimal approximation of z-rotations, phase polynomials, and repeat-until-success, mixing, ancilla-assisted and catalytic methods.

ExpositionMachine-checkedUpdated 2026-12-01 · last verified 2026-12-01

AI-assisted text, machine-checked, not yet reviewed by a person. Citations resolve and an automated pass compared the statements with the cited sources. That is not peer review; check the sources for anything you depend on.

Overview

Fault-tolerant quantum computers built from stabilizer codes implement Clifford gates cheaply and the TT gate expensively, through magic states. Their native instruction set is therefore Clifford+T: HH, SS, CNOT and T=diag⁡(1,eiπ/4)T = \operatorname{diag}(1, e^{i\pi/4}), which is approximately universal (Boykin et al.). Synthesis is the task of expressing a desired unitary, exactly or to accuracy ε\varepsilon, as a Clifford+T circuit, and the figure of merit is the number of TT gates.

The field has three layers. Exact synthesis characterises the unitaries that Clifford+T circuits produce exactly: those with entries in the ring Z[1/2,i]\mathbb{Z}[1/\sqrt2, i]. Approximate synthesis of single-qubit rotations reaches T-count about 3log⁡2(1/ε)3\log_2(1/\varepsilon), far below what the generic Solovay–Kitaev theorem gives. Multi-qubit optimisation reduces the T-count and T-depth of whole circuits, using phase polynomials and their connection to Reed–Muller codes. Ancillas, measurement and randomness lower the cost further.

Intuition

Clifford+T matrices have a rigid arithmetic structure: multiplying by HH introduces a factor 1/21/\sqrt2, and TT introduces the eighth root of unity ω=eiπ/4\omega = e^{i\pi/4}. So every entry of a Clifford+T circuit is a number of the form (integer combination of 1,ω,ω2,ω3)/2 k(\text{integer combination of } 1, \omega, \omega^2, \omega^3)/\sqrt2^{\,k}. The exponent kk measures how "deep" the matrix is, and exact synthesis peels it off one layer at a time. Approximate synthesis becomes number theory: find a ring element close to the target phase, then solve an equation so that the matrix is unitary.

At the multi-qubit level, a block of CNOTs and TT gates only computes parities of the input and adds phases to them. The TT gates that are really needed correspond to the parities whose total phase is an odd multiple of π/4\pi/4; everything else is Clifford.

Prerequisites

The quantum circuit model, the Pauli and Clifford groups, and basic algebraic number theory (rings of integers of cyclotomic fields) for the exact-synthesis results.

Mathematical Definitions

DefinitionClifford groupEstablished definition

The Clifford group on nn qubits is

Cn={ U∈U(2n)  :  UPnU†=Pn }/ U(1),\mathcal{C}_n = \bigl\{\, U \in \mathrm{U}(2^n) \;:\; U \mathcal{P}_n U\dagg = \mathcal{P}_n \,\bigr\} \big/ \, \mathrm{U}(1) ,

the normalizer of the Pauli group in the unitary group, with unitaries that differ by a global phase identified. Its elements are Clifford gates, and a circuit made of them is a Clifford circuit.

Generators. With H=12(111−1)H = \tfrac{1}{\sqrt 2}\begin{pmatrix} 1 & 1 \\ 1 & -1 \end{pmatrix}, S=diag⁡(1,i)S = \operatorname{diag}(1, i) and CNOT\mathrm{CNOT}, the conjugation rules are

gate X↦X \mapsto Z↦Z \mapsto
HH ZZ XX
SS YY ZZ
CNOTc→t\mathrm{CNOT}_{c \to t} Xc↦XcXtX_c \mapsto X_c X_t, Xt↦XtX_t \mapsto X_t Zc↦ZcZ_c \mapsto Z_c, Zt↦ZcZtZ_t \mapsto Z_c Z_t

and every element of Cn\mathcal{C}_n is a product of HH, SS and CNOT\mathrm{CNOT} gates on the nn qubits, up to a global phase (Gottesman; section 10.5.2 of Nielsen and Chuang). The CNOT row shows how errors spread: an XX error on the control is copied to the target, and a ZZ error on the target is copied to the control.

Symplectic action. A Clifford gate UU maps XaZbX^{a} Z^{b} to ±Xa′Zb′\pm X^{a'} Z^{b'} (up to the phase convention for YY), and (a∣b)↦(a′∣b′)(a \mid b) \mapsto (a' \mid b') is a linear map of F22n\F_2^{2n} that preserves the symplectic inner product, because conjugation preserves commutation. This gives a surjective homomorphism from Cn\mathcal{C}_n onto the symplectic group Sp(2n,2)\mathrm{Sp}(2n, 2) whose kernel consists of the Pauli operators themselves; a Clifford gate is therefore specified, up to phase, by a 2n×2n2n \times 2n binary symplectic matrix together with 2n2n sign bits (Calderbank, Rains, Shor and Sloane; Dehaene and De Moor).

Uses. Clifford gates map stabilizer groups to stabilizer groups, so they map stabilizer codes to stabilizer codes and stabilizer states to stabilizer states; every stabilizer code has an encoding circuit made of Clifford gates (Gottesman). The Clifford group is the second level of the Clifford hierarchy, and Clifford circuits alone are classically simulable by the Gottesman–Knill theorem.

DefinitionClifford hierarchyEstablished definition

Let Pn\mathcal{P}_n be the Pauli group on nn qubits. Define sets of nn-qubit unitaries recursively by

C1=Pn,Ck+1={ U  :  UPU†∈Ck  for every P∈Pn }.\mathcal{C}_1 = \mathcal{P}_n , \qquad \mathcal{C}_{k+1} = \big\{\, U \;:\; U P U\dagg \in \mathcal{C}_k \ \text{ for every } P \in \mathcal{P}_n \,\big\} .

The sets are nested, Ck⊆Ck+1\mathcal{C}_k \subseteq \mathcal{C}_{k+1}. The second level C2\mathcal{C}_2 is the Clifford group, the normaliser of the Pauli group. For k≥3k \ge 3 the set Ck\mathcal{C}_k is not a group, but it is closed under multiplication by Clifford gates on either side.

Examples: HH, SS and CNOT are in C2\mathcal{C}_2. The gates T=diag⁡(1,eiπ/4)T = \operatorname{diag}(1, e^{i\pi/4}), controlled-SS and CCZ\mathrm{CCZ} are in C3\mathcal{C}_3 and not in C2\mathcal{C}_2; for instance TXT†=e−iπ/4SXT X T\dagg = e^{-i\pi/4} S X, which is a Clifford gate. More generally diag⁡(1,e2πi/2k)\operatorname{diag}(1, e^{2\pi i/2^{k}}) lies in Ck\mathcal{C}_k.

The hierarchy was introduced by Gottesman and Chuang to classify the gates that can be applied by teleportation: a gate U∈CkU \in \mathcal{C}_k can be implemented by consuming a resource state prepared with UU and applying a correction from Ck−1\mathcal{C}_{k-1} that depends on a Pauli measurement outcome. For k=3k = 3 the correction is a Clifford gate, which is why third-level gates are the ones supplied by magic states.

DefinitionT count, T depth and Toffoli countEstablished definition

Let a circuit be written over Clifford gates, TT gates and Toffoli (or CCZ) gates, with Pauli measurements and classical feed-forward allowed.

  • The T count NTN_T is the number of TT and T†T\dagg gates; the Toffoli count NTofN_{\mathrm{Tof}} 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 DTD_T 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 TT 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 TT gates and uncomputes it with none, using a measurement (Gidney). Arbitrary single-qubit ZZ rotations are approximated to precision ε\varepsilon by Clifford+T sequences with T count about 3log⁡2(1/ε)3 \log_2(1/\varepsilon) (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å.

DefinitionRepeat-until-success circuitEstablished definition

Let VV be a target unitary on a data register. A repeat-until-success (RUS) circuit for VV is a unitary circuit WW on the data register and mm ancilla qubits, followed by a measurement of the ancillas in the computational basis, such that for every data state ∣ψ⟩\ket{\psi}

W(∣ψ⟩⊗∣0m⟩)=∑y∈{0,1}mpy  (Fy∣ψ⟩)⊗∣y⟩,W \left(\ket{\psi} \otimes \ket{0^m}\right) = \sum_{y \in \{0,1\}^m} \sqrt{p_y}\; (F_y \ket{\psi}) \otimes \ket{y} ,

where each FyF_y is unitary, py≥0p_y \ge 0 does not depend on ∣ψ⟩\ket{\psi}, the set of success outcomes YsY_{\mathrm{s}} has Fy=VF_y = V (up to a global phase) for y∈Ysy \in Y_{\mathrm{s}}, and for every failure outcome the operator FyF_y belongs to a class whose inverse is cheap (in the Clifford+T setting, a Clifford gate). On failure, Fy†F_y\dagg is applied and the circuit is run again. The number of attempts is geometric with success probability p=∑y∈Yspyp = \sum_{y \in Y_{\mathrm{s}}} p_y, so the expected cost is the cost of one attempt divided by pp, and the output is exactly V∣ψ⟩V\ket{\psi} whenever the procedure halts.

RUS circuits over Clifford+T were introduced for single-qubit synthesis by Paetznick and Svore and synthesised efficiently for arbitrary single-qubit targets by Bocharov, Roetteler and Svore. Because the number of attempts is random, an RUS gate has a variable duration, which a fault-tolerant schedule must accommodate.

Theorems

EquationOrder of the Clifford groupEstablished result
∣Cn∣=2 n2+2n∏j=1n(4j−1)\abs{\mathcal{C}_n} = 2^{\,n^2 + 2n} \prod_{j=1}^{n} \left(4^{j} - 1\right)

The Clifford group maps onto the binary symplectic group Sp(2n,F2)\mathrm{Sp}(2n, \F_2) with kernel the 4n4^n Pauli operators modulo phase, and ∣Sp(2n,F2)∣=2n2∏j=1n(4j−1)\abs{\mathrm{Sp}(2n, \F_2)} = 2^{n^2}\prod_{j=1}^{n}(4^j - 1); multiplying by 4n4^n gives the formula (Koenig and Smolin, who also give an O(n3)O(n^3) algorithm to index and sample its elements). For n=1n = 1: 23⋅3=242^{3}\cdot 3 = 24, the rotation group of the cube. For n=2n = 2: 28⋅3⋅15=115202^{8}\cdot 3 \cdot 15 = 11520. The super-exponential growth, 22n2+O(n)2^{2n^2 + O(n)}, is why Clifford circuits are compiled from canonical forms rather than looked up.

Holds when
  • Clifford unitaries are identified when they differ by a global phase.
TheoremExact synthesis over Clifford+TEstablished result

Single qubit. A unitary U∈U(2)U \in U(2) can be written exactly as a product of HH and TT gates (equivalently, of single-qubit Clifford and TT gates) if and only if every entry of UU lies in Z[1/2,i]\mathbb{Z}[1/\sqrt{2}, i]. Moreover there is an efficient classical algorithm that produces a circuit for such a UU using the minimal possible number of HH and of TT gates (Kliuchnikov, Maslov and Mosca).

Many qubits. An nn-qubit unitary has an exact representation as a Clifford+T circuit using ancillas initialised to and returned in ∣0⟩\ket{0} if and only if its entries lie in Z[1/2,i]\mathbb{Z}[1/\sqrt{2}, i]; one ancilla always suffices (Giles and Selinger, proving a conjecture of Kliuchnikov, Maslov and Mosca). Giles and Selinger also characterise which such operators need no ancilla.

The key quantity in the single-qubit algorithm is the smallest denominator exponent: every element of the ring can be written as z/2 kz/\sqrt{2}^{\,k} with z∈Z[ω]z \in \mathbb{Z}[\omega], and multiplying by a suitably chosen factor of the form HTjH T^{j} lowers this exponent by one, so a greedy reduction brings it below a small constant (4 in their analysis), where a precomputed table of the finitely many remaining unitaries finishes the circuit. Since the ring is countable and dense in C\C, the theorem also explains why generic rotations need approximation rather than exact synthesis.

Holds when
  • Clifford+T means circuits over HH, SS, CNOT and T=diag⁡(1,ω)T = \operatorname{diag}(1, \omega) with ω=eiπ/4\omega = e^{i\pi/4}; equality is exact (global phases ωk\omega^k allowed, which are themselves Clifford+T expressible on one qubit).
  • Z[1/2,i]\mathbb{Z}[1/\sqrt{2}, i] is the smallest subring of C\C containing 1/21/\sqrt{2} and ii; it also contains ω=(1+i)/2\omega = (1+i)/\sqrt{2}.
TheoremOptimal ancilla-free Clifford+T approximation of z-rotationsEstablished result

For every angle θ\theta and ε>0\varepsilon > 0, the probabilistic algorithm of Ross and Selinger

  • with access to a factoring oracle, returns an ancilla-free Clifford+T circuit WW with ∥W−Rz(θ)∥≤ε\norm{W - R_z(\theta)} \le \varepsilon of the smallest T-count among all such circuits;
  • without the oracle, under a mild number-theoretic hypothesis, runs in expected time polynomial in log⁡(1/ε)\log(1/\varepsilon) and returns a circuit of T-count m+O(log⁡log⁡(1/ε))m + O(\log\log(1/\varepsilon)), where mm is the T-count of the second-best solution;
  • in the typical case produces T-count
3log⁡2(1/ε)+O(log⁡log⁡(1/ε)).3 \log_2(1/\varepsilon) + O\big(\log\log(1/\varepsilon)\big).

The method reduces approximation to two problems over the ring Z[1/2,i]\mathbb{Z}[1/\sqrt{2}, i]: a two-dimensional grid problem, enumerating ring elements uu close to e−iθ/2e^{-i\theta/2} in a thin region of the unit disc (and whose Galois conjugate lies in the unit disc), and a norm equation ∣t∣2=1−∣u∣2\abs{t}^2 = 1 - \abs{u}^2 to complete uu to a unitary with entries in the ring; the result is then turned into a circuit by exact synthesis. An earlier algorithm of Selinger achieves T-count 4log⁡2(1/ε)+K4\log_2(1/\varepsilon) + K with K≈10K \approx 10 for zz-rotations and proves a worst-case lower bound of the same form, 4log⁡2(1/ε)−94\log_2(1/\varepsilon) - 9, for certain zz-rotations.

Holds when
  • Target Rz(θ)R_z(\theta), accuracy ε\varepsilon in operator norm, single-qubit Clifford+T circuits with no ancillas or measurements.
  • Optimality relies on a factoring oracle; the classical runtime bound relies on a stated number-theoretic hypothesis.
TheoremPhase-polynomial form of CNOT+T circuitsEstablished result

(a) Normal form. Every such circuit CC satisfies, for all x∈F2nx \in \F_2^n,

C∣x⟩=ω p(x)∣Lx⟩,p(x)=∑a∈F2n∖{0}ca (a⋅x) mod 8,C \ket{x} = \omega^{\,p(x)} \ket{L x}, \qquad p(x) = \sum_{a \in \F_2^n \setminus \{0\}} c_a\, (a \cdot x) \bmod 8 ,

with LL an invertible n×nn \times n matrix over F2\F_2 and coefficients ca∈Z8c_a \in \Z_8.

(b) Counting odd terms. If CC contains tt gates TcT^{c} with cc odd, then the representation produced in (a) has at most tt parities with odd coefficient. Conversely, for any LL and any coefficients (ca)(c_a) with kk odd coefficients, there is a circuit of this form implementing ∣x⟩↦ωp(x)∣Lx⟩\ket{x} \mapsto \omega^{p(x)}\ket{Lx} that contains exactly kk gates TcT^{c} with cc odd.

(c) Non-uniqueness. Different coefficient vectors can define the same function p:F2n→Z8p : \F_2^n \to \Z_8; for example 4x1+4x2+4(x1⊕x2)≡0(mod8)4x_1 + 4x_2 + 4(x_1 \oplus x_2) \equiv 0 \pmod 8. Amy and Mosca proved that minimising the number of odd coefficients over representations of the same pp, and hence the T-count over CNOT+T circuits, is equivalent to minimum-distance decoding of the length-(2n−1)(2^n - 1) vector of odd coefficients in the punctured Reed–Muller code RM(n−4,n)∗\mathcal{RM}(n-4, n)^*. For n≤3n \le 3 that code contains only the zero word, so the number of odd coefficients is already minimal.

The representation is the basis of the T-par optimiser of Amy, Maslov and Mosca.

Holds when
  • The circuit acts on nn qubits and uses only CNOT and the diagonal gates Tc=diag⁡(1,ωc)T^{c} = \operatorname{diag}(1, \omega^{c}), ω=eiπ/4\omega = e^{i\pi/4}, c∈Z8c \in \Z_8 (so S=T2S = T^2, Z=T4Z = T^4); no ancillas or measurements.
  • A parity a⋅x=a1x1⊕⋯⊕anxna \cdot x = a_1 x_1 \oplus \cdots \oplus a_n x_n is read as the integer 0 or 1 when it appears in a phase.
Proof · Proof of the phase-polynomial form

(a) Invariant. After the first ss gates, claim that Cs∣x⟩=ωps(x)∣Lsx⟩C_s \ket{x} = \omega^{p_s(x)} \ket{L_s x} with LsL_s invertible over F2\F_2 and ps=∑aca(s)(a⋅x)p_s = \sum_a c^{(s)}_a (a \cdot x). Initially L0=IL_0 = I, p0=0p_0 = 0. Write ℓq\ell_q for row qq of LsL_s, so wire qq currently holds the parity ℓq⋅x\ell_q \cdot x; the rows are linearly independent and hence nonzero.

  • A CNOT with control qq and target rr replaces row rr by ℓr⊕ℓq\ell_r \oplus \ell_q. This is an invertible row operation, so Ls+1L_{s+1} is invertible; the phase is unchanged.
  • TcT^{c} on wire qq multiplies ∣Lsx⟩\ket{L_s x} by ωc (ℓq⋅x)\omega^{c\,(\ell_q \cdot x)}, so ps+1=ps+c (ℓq⋅x)p_{s+1} = p_s + c\,(\ell_q \cdot x), i.e. cℓq(s+1)=cℓq(s)+cc^{(s+1)}_{\ell_q} = c^{(s)}_{\ell_q} + c; LL is unchanged.

Induction over the gates gives (a), with the coefficients obtained by summing the powers applied whenever a wire carried each parity.

(b) Counting. By the construction in (a), the final coefficient cac_a is the sum of the powers cc of the gates applied while some wire carried parity aa. If cac_a is odd, at least one of those powers is odd. Distinct aa with odd cac_a therefore need distinct odd-power gates, so there are at most tt of them.

For the converse, let a(1),…,a(m)a^{(1)}, \dots, a^{(m)} be the parities with ca≠0c_a \ne 0, of which kk have odd coefficient. For each jj in turn: choose a wire qq such that a(j)a^{(j)} has a 1 in position qq; apply CNOTs from every other wire rr with ar(j)=1a^{(j)}_r = 1 onto qq, so wire qq holds a(j)⋅xa^{(j)} \cdot x; apply Tca(j)T^{c_{a^{(j)}}} to wire qq; then undo the CNOTs in reverse order. Each block contributes exactly ca(j)(a(j)⋅x)c_{a^{(j)}} (a^{(j)} \cdot x) to the phase and leaves the wires as they were. Finally apply a CNOT circuit implementing x↦Lxx \mapsto L x (any invertible matrix over F2\F_2 is a product of elementary row operations, each a CNOT, possibly after reordering wires, and a wire permutation is a product of SWAPs, each three CNOTs). The resulting circuit implements ∣x⟩↦ωp(x)∣Lx⟩\ket{x} \mapsto \omega^{p(x)} \ket{L x} with exactly one gate TcT^{c} for each nonzero cac_a, of which exactly kk have odd cc; the others are SS, ZZ or S†S\dagg, which are Clifford. This is the representation used by Amy, Maslov and Mosca.

Arbitrary single-qubit unitaries are handled through an Euler decomposition into three zz-rotations (and Cliffords), see the Z–Y–Z decomposition, which roughly triples the T-count. For the circuit-level picture in which every T gate becomes a π/8\pi/8 rotation about a multi-qubit Pauli operator, see Clifford+T circuits as Pauli rotations.

Worked Examples

The T-count of CCZ and Toffoli

CCZ∣x1x2x3⟩=(−1)x1x2x3∣x1x2x3⟩=ω4x1x2x3∣x1x2x3⟩\mathrm{CCZ}\ket{x_1 x_2 x_3} = (-1)^{x_1 x_2 x_3}\ket{x_1 x_2 x_3} = \omega^{4 x_1 x_2 x_3}\ket{x_1x_2x_3}. Using u⊕v=u+v−2uvu \oplus v = u + v - 2uv and u⊕v⊕w=u+v+w−2(uv+vw+uw)+4uvwu \oplus v \oplus w = u + v + w - 2(uv + vw + uw) + 4uvw for bits, one checks the integer identity

4x1x2x3=x1+x2+x3−(x1⊕x2)−(x1⊕x3)−(x2⊕x3)+(x1⊕x2⊕x3).4x_1x_2x_3 = x_1 + x_2 + x_3 - (x_1 \oplus x_2) - (x_1 \oplus x_3) - (x_2 \oplus x_3) + (x_1 \oplus x_2 \oplus x_3).

Indeed ∑i<j(xi⊕xj)=2∑ixi−2∑i<jxixj\sum_{i<j}(x_i \oplus x_j) = 2\sum_i x_i - 2\sum_{i<j} x_i x_j, and substituting leaves 4x1x2x34x_1x_2x_3. This is a phase polynomial with seven parities, all with odd coefficient: TT on the four parities with coefficient +1+1 and T†T\dagg on the three with −1-1. So CCZ, and Toffoli =(I⊗I⊗H) CCZ (I⊗I⊗H)= (I \otimes I \otimes H)\,\mathrm{CCZ}\,(I \otimes I \otimes H), have T-count at most 7. Because n=3n = 3, the punctured Reed–Muller code in the phase polynomial theorem is trivial and 7 is optimal among ancilla-free CNOT+T circuits; Gosset, Kliuchnikov, Mosca and Russo showed by exhaustive search that no three-qubit Clifford+T circuit for Toffoli, without ancillas, uses fewer than 7. With an ancilla and a measurement, four suffice (Jones). For T-depth, Amy, Maslov, Mosca and Roetteler found an ancilla-free Toffoli of T-depth 3.

A rotation that is not exactly synthesisable

Rz(π/4)=e−iπ/8TR_z(\pi/4) = e^{-i\pi/8} T is exactly synthesisable. Rz(π/8)R_z(\pi/8) is not, even up to a global phase: if eiφRz(π/8)e^{i\varphi}R_z(\pi/8) had entries in Z[1/2,i]\mathbb{Z}[1/\sqrt2, i], the ratio of its diagonal entries, eiπ/8e^{i\pi/8}, would lie in the field Q(ω)\mathbb{Q}(\omega) generated by that ring. But eiπ/8e^{i\pi/8} is a primitive 16th root of unity, of degree φ(16)=8\varphi(16) = 8 over Q\mathbb{Q}, while Q(ω)\mathbb{Q}(\omega) has degree φ(8)=4\varphi(8) = 4. So Rz(π/8)R_z(\pi/8) must be approximated; by the Ross–Selinger theorem a typical target at ε=10−10\varepsilon = 10^{-10} costs about 3log⁡2(1010)≈3×33.2≈1003\log_2(10^{10}) \approx 3 \times 33.2 \approx 100 TT gates plus a lower-order term.

A rotation budget

An algorithm with N=106N = 10^6 arbitrary zz-rotations and a total synthesis-error budget of 10−210^{-2} in operator norm can allot ε=10−8\varepsilon = 10^{-8} to each rotation, because operator-norm errors add at most linearly. The leading term is then 3log⁡2(108)≈3×26.6≈803\log_2(10^{8}) \approx 3 \times 26.6 \approx 80 TT gates per rotation, about 8×1078 \times 10^{7} in total. Randomly mixing between nearby approximations makes the errors add incoherently, so that, roughly, each rotation needs only ε≲1/N\varepsilon \lesssim 1/\sqrt{N} rather than 1/N1/N (Hastings); equivalently a shorter sequence reaches the same diamond-norm accuracy (Campbell).

Algorithms and Implementations

  • Exact single-qubit synthesis (Kliuchnikov, Maslov and Mosca): greedy reduction of the denominator exponent, optimal in HH- and T-count.
  • Exact multi-qubit synthesis (Giles and Selinger): column reduction to a Clifford+T circuit with at most one ancilla.
  • Rotation synthesis (Ross and Selinger): grid problems plus norm equations, near-optimal T-count in expected polylogarithmic time.
  • Repeat-until-success. Allowing an ancilla, measurement and retries, Paetznick and Svore report an expected T-count scaling as 1.26log⁡2(1/ε)−3.531.26\log_2(1/\varepsilon) - 3.53 for zz-rotations, about 38 at ε=10−10\varepsilon = 10^{-10} against about 100 for ancilla-free synthesis, and Bocharov, Roetteler and Svore give a polynomial-time synthesis algorithm with numerical evidence of an expected T-count about 2.5 times below 3log⁡2(1/ε)3\log_2(1/\varepsilon).
  • Ancilla-assisted approximation. With at most two ancillas, Kliuchnikov, Maslov and Mosca reach O(log⁡(1/ε))O(\log(1/\varepsilon)) gates, asymptotically optimal for a constant number of ancillas.
  • Catalysis. A resource state can be used and returned intact. For instance Gidney and Fowler convert one CCZ magic state into two T states with the help of a T state that is returned, so CCZ factories also serve T-heavy circuits.
  • Circuit-level optimisation. T-par (Amy, Maslov and Mosca) re-synthesises phase-polynomial blocks to reduce T-count and T-depth, and Amy and Mosca connect optimal T-count to Reed–Muller decoding.

Limitations and Common Pitfalls

  • T-count is a proxy. It ignores the cost of Clifford operations, routing and the latency of feed-forward; in lattice-surgery architectures T-depth and reaction time can dominate runtime.
  • Accuracy measures differ. Operator-norm, diamond-norm and average-fidelity errors are not interchangeable; mixing results are stated in diamond norm, deterministic synthesis in operator norm.
  • Expected versus worst-case cost. RUS circuits have random duration and an expected T-count; a schedule needs a tail bound, not only the mean.
  • Optimality is relative to a model. "Optimal" T-counts are optimal for a stated class of circuits (ancilla-free, single-qubit, CNOT+T); allowing ancillas, measurement or catalysts changes the answer, as the Toffoli example shows.
  • Do not use Solovay–Kitaev for Clifford+T in practice. Its sequences, of length O(log⁡3.97(1/ε))O(\log^{3.97}(1/\varepsilon)) in the analysis of Dawson and Nielsen, are far longer than number-theoretic synthesis.

State of the Art

As of 2026-11, the deterministic ancilla-free benchmark for zz-rotations is the Ross–Selinger algorithm, with typical T-count 3log⁡2(1/ε)+O(log⁡log⁡(1/ε))3\log_2(1/\varepsilon) + O(\log\log(1/\varepsilon)); measurement-assisted (RUS) and mixing methods reduce the expected or effective count by constant factors, as reported in the papers cited above. This section summarises those publications and is not a survey of compiler benchmarks.

Builds on

Open in the knowledge graph

Contributions about this record

Nobody has published a contribution about it yet.

Publish a result, reproduction or commentPropose a correction to this page

References

  1. P. Oscar Boykin, Tal Mor, Matthew Pulver, … Farrokh Vatan (2000). A new universal and fault-tolerant quantum basis. Information Processing Letters 75, 101-107. doi:10.1016/S0020-0190(00)00084-3
  2. Vadym Kliuchnikov, Dmitri Maslov, Michele Mosca (2013). Fast and efficient exact synthesis of single qubit unitaries generated by Clifford and T gates. Quantum Information and Computation 13, 607-630. doi:10.26421/QIC13.7-8-4arXiv:1206.5236
  3. Brett Giles, Peter Selinger (2013). Exact synthesis of multiqubit Clifford+T circuits. Physical Review A 87, 032332. doi:10.1103/PhysRevA.87.032332arXiv:1212.0506
  4. Neil J. Ross, Peter Selinger (2016). Optimal ancilla-free Clifford+T approximation of z-rotations. Quantum Information and Computation 16(11-12), 901-953. arXiv:1403.2975
  5. Peter Selinger (2015). Efficient Clifford+T approximation of single-qubit operators. Quantum Information and Computation 15, 159-180. doi:10.26421/QIC15.1-2-10arXiv:1212.6253
  6. Matthew Amy, Dmitri Maslov, Michele Mosca (2014). Polynomial-time T-depth Optimization of Clifford+T circuits via Matroid Partitioning. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 33, 1476-1489. doi:10.1109/TCAD.2014.2341953arXiv:1303.2042
  7. Matthew Amy, Michele Mosca (2019). T-Count Optimization and Reed–Muller Codes. IEEE Transactions on Information Theory 65, 4771-4784. doi:10.1109/TIT.2019.2906374arXiv:1601.07363
  8. Matthew Amy, Dmitri Maslov, Michele Mosca, Martin Roetteler (2013). A meet-in-the-middle algorithm for fast synthesis of depth-optimal quantum circuits. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 32, 818-830. doi:10.1109/TCAD.2013.2244643arXiv:1206.0758
  9. David Gosset, Vadym Kliuchnikov, Michele Mosca, Vincent Russo (2014). An algorithm for the T-count. Quantum Information and Computation 14, 1261-1276. doi:10.26421/QIC14.15-16-1arXiv:1308.4134
  10. Cody Jones (2013). Novel constructions for the fault-tolerant Toffoli gate. Physical Review A 87, 022328. doi:10.1103/PhysRevA.87.022328arXiv:1212.5069
  11. Adam Paetznick, Krysta M. Svore (2014). Repeat-Until-Success: Non-deterministic decomposition of single-qubit unitaries. Quantum Information and Computation 14, 1277-1301. doi:10.26421/QIC14.15-16-2arXiv:1311.1074
  12. Alex Bocharov, Martin Roetteler, Krysta M. Svore (2015). Efficient synthesis of universal Repeat-Until-Success circuits. Physical Review Letters 114, 080502. doi:10.1103/PhysRevLett.114.080502arXiv:1404.5320
  13. Earl Campbell (2017). Shorter gate sequences for quantum computing by mixing unitaries. Physical Review A 95, 042306. doi:10.1103/PhysRevA.95.042306arXiv:1612.02689
  14. M. B. Hastings (2017). Turning gate synthesis errors into incoherent errors. Quantum Information and Computation 17, 488-494. doi:10.26421/QIC17.5-6-7arXiv:1612.01011
  15. Vadym Kliuchnikov, Dmitri Maslov, Michele Mosca (2013). Asymptotically optimal approximation of single qubit unitaries by Clifford and T circuits using a constant number of ancillary qubits. Physical Review Letters 110, 190502. doi:10.1103/PhysRevLett.110.190502arXiv:1212.0822
  16. Craig Gidney, Austin G. Fowler (2019). Efficient magic state factories with a catalyzed |CCZ> to 2|T> transformation. Quantum 3, 135. doi:10.22331/q-2019-04-30-135arXiv:1812.01238
  17. Christopher M. Dawson, Michael A. Nielsen (2006). The Solovay-Kitaev algorithm. Quantum Information and Computation 6, 81-95. doi:10.26421/QIC6.1-6arXiv:quant-ph/0505030
  18. Michael A. Nielsen, Isaac L. Chuang (2010). Quantum Computation and Quantum Information (10th Anniversary Edition). Cambridge University Press. doi:10.1017/CBO9780511976667
  19. Daniel Gottesman (1998). The Heisenberg Representation of Quantum Computers. arXiv:quant-ph/9807006
  20. Daniel Gottesman (1997). Stabilizer Codes and Quantum Error Correction. PhD thesis, California Institute of Technology. arXiv:quant-ph/9705052
  21. A. R. Calderbank, E. M. Rains, P. W. Shor, N. J. A. Sloane (1998). Quantum error correction via codes over GF(4). IEEE Transactions on Information Theory 44 (4), 1369-1387. doi:10.1109/18.681315arXiv:quant-ph/9608006
  22. Jeroen Dehaene, Bart De Moor (2003). Clifford group, stabilizer states, and linear and quadratic operations over GF(2). Physical Review A 68, 042318. doi:10.1103/PhysRevA.68.042318arXiv:quant-ph/0304125
  23. Daniel Gottesman, Isaac L. Chuang (1999). Demonstrating the viability of universal quantum computation using teleportation and single-qubit operations. Nature 402, 390-393. doi:10.1038/46503
  24. Craig Gidney (2018). Halving the cost of quantum addition. Quantum 2, 74. doi:10.22331/q-2018-06-18-74arXiv:1709.06648
  25. Craig Gidney, Martin Ekerå (2021). How to factor 2048 bit RSA integers in 8 hours using 20 million noisy qubits. Quantum 5, 433 (arXiv preprint 2019). doi:10.22331/q-2021-04-15-433arXiv:1905.09749
  26. Daniel Litinski (2019). A Game of Surface Codes: Large-Scale Quantum Computing with Lattice Surgery. Quantum 3, 128. doi:10.22331/q-2019-03-05-128arXiv:1808.02892
  27. Robert Koenig, John A. Smolin (2014). How to efficiently select an arbitrary Clifford group element. Journal of Mathematical Physics 55, 122202. doi:10.1063/1.4903507arXiv:1406.2170

Contributors

  • KetQat maintainers · @ketqatConceptualization; Supervision (CRediT roles)
  • Claude (AI drafting assistant)Writing, original draft (CRediT roles)

Review history

  1. Automated source check · Pass · 2026-12-01 · Independent automated verification pass (AI, not the drafting session)

    Topic body only (embedded records carry their own states). CCZ phase-polynomial identity verified on all 8 inputs; degree argument for R_z(pi/8) (primitive 16th root, degree 8 vs Q(omega) degree 4) re-derived; numbers recomputed (3 log2 1e10 = 99.7, 3 log2 1e8 = 79.7, 1.26 log2 1e10 - 3.53 = 38.3). Compared with abstracts: Gosset et al. (1308.4134, Toffoli needs 7 T), Amy et al. (1206.0758, T-depth 3 Toffoli), Jones (1212.5069), Kliuchnikov-Maslov-Mosca ancillae (1212.0822, up to two ancillas, O(log 1/eps), optimal), Hastings (1612.01011, eps <~ 1/N coherent), Campbell (1612.02689, diamond-norm mixing), Paetznick-Svore (1311.1074), Bocharov-Roetteler-Svore (1404.5320), Ross-Selinger (1403.2975), Giles-Selinger (1212.0506), Gidney-Fowler (1812.01238), Amy-Mosca (1601.07363).

Revision history

  1. 2026-12-01Content release 2.1.0: 35 more topics, an independent source check of every record, intake hardening (#17)80537b7e
  2. 2026-11-30KetQat Commons: free learning paths, knowledge records, research problems, literature intake (#14)571c9b10

Current revision ff576232062e4ab3. Source file knowledge/records/topic/clifford-t-synthesis.md in the content repository (readable there once it is public).