Introduction
Each T T T gate in a fault-tolerant Clifford+T T T computation consumes a distilled magic state, and in surface-code layouts the distillation factories take a large share of the qubits and the runtime [1 ] . A compiled circuit gives an upper bound on the T T T -count, but only for the compiler that produced it, and to know how much room any compiler has left one needs a lower bound that is cheap to compute and close to the true count.
Toffoli gates account for much of the T T T -count of reversible arithmetic, phase oracles and the control logic of select operations, and they rarely come alone. For a layer of m m m Toffolis on disjoint qubits, Campbell and Howard [2 ] found a circuit with 6 m + 1 6m+1 6 m + 1 T T T gates, against 7 m 7m 7 m for compiling the Toffolis one at a time. At m = 1 m=1 m = 1 the value 7 is classical, and Campbell and Howard report the value 13 at m = 2 m=2 m = 2 as known, a six-qubit case that exhaustive decoding settles. For m ≥ 3 m \ge3 m ≥ 3 optimality was open, and the best lower bounds we know of grow like 3 m 3m 3 m (stabilizer nullity [3 ] ) or about 3.71 m 3.71m 3.71 m (the amortized stabilizer Rényi entropy bound of Zhu et al. [4 ] , which we evaluate exactly in Table 1). This paper proves that 6 m + 1 6m+1 6 m + 1 is optimal for every m m m among Hadamard-free circuits.
Theorem 1 (the parallel Toffoli layer (informal version of Theorem 35 ). A layer of m m m disjoint CCZ gates, the diagonal core of a layer of m m m parallel Toffolis, has T T T -count exactly 6 m + 1 6m+1 6 m + 1 over {CNOT, T T T } circuits.
The model here is the Hadamard-free one: circuits of CNOT and T T T gates, with diagonal Clifford gates free. It is the natural model for diagonal gates, the one in which Amy and Mosca’s characterization below holds, and the one in which phase-polynomial optimizers such as TODD [5 ] work, as does AlphaTensor-Quantum [6 ] when its ancilla gadgets are switched off. Clean ancillas do not lower the T T T -count in this model (Corollary 13 ), so every bound below also covers circuits that use them. It differs from the ancilla-free Clifford+T T T model, which allows internal Hadamards but no ancillas, and in which Gosset et al. showed by exhaustive search that a single Toffoli needs seven T T T gates [7 ] . Measurement changes the count. With temporary AND gates and measurement [8 , 9 ] the layer costs about 4 m 4m 4 m T T T gates, so the bound does not limit fault-tolerant compilers that use them. It limits the resynthesis of Hadamard-free phase blocks, which is the step TODD and gadget-free AlphaTensor-Quantum perform and the step the certificates of § 2.7 audit. The supplementary notes [10 ] discuss how far the bounds extend to circuits with internal Hadamards, approximation and measurement.
Existing lower bounds
For diagonal gates the exact T T T -count is known in principle. Amy and Mosca [11 ] showed that it equals the distance from a fixed word to a punctured Reed–Muller code, and no polynomial-time algorithm is known for that decoding problem. In coding theory the cosets of Reed–Muller codes have been studied mainly through covering radii and through classifications of cubic forms modulo quadratics [12 , 13 ] , which parametrize the cubic part of the cosets of R M ( n − 4 , n ) ∗ \mathrm{RM}(n-4,n)^* RM ( n − 4 , n ) ∗ . To our knowledge, exact minimum weights for direct sums of cubic monomials had not been determined. For general Clifford+T T T circuits optimizing the T T T -count is NP-hard [14 ] . Meet-in-the-middle search [15 ] and exact counting [16 ] work for a few qubits only.
Magic monotones give lower bounds without a search. Robustness of magic [17 ] , channel robustness [18 ] , stabilizer extent [19 ] and stabilizer Rényi entropies [20 , 4 ] all bound the T T T -count, but computing them on a general gate takes exponential time. Stabilizer nullity [21 ] is the exception on the gates studied here (Proposition 28 computes it by Gaussian elimination), but it gives 3 for CCZ, whose T T T -count is 7. A quantity that cannot increase under stabilizer operations with feedforward also bounds circuits that measure and correct. Such circuits implement CCZ with four T T T gates [8 ] , so an argument that reaches 7 has to use unitarity (Remark 30).
The isotropy argument
A { C N O T , T } \{\mathrm{CNOT}, T\} { CNOT , T } circuit applies each of its t t t T T T gates to a parity of the input bits. Record, for each qubit a a a , the vector c a ∈ F 2 t c_a \in\mathbb{F}_2^t c a ∈ F 2 t that marks which T T T gates involve a a a . When the target’s phase has no linear or quadratic part, a condition we call pure-cubic, every c a c_a c a has even weight and every pair has even overlap. This is the case of vanishing quadratic part of Campbell and Howard’s Lemma 3 [2 ] , and it says that the span of the c a c_a c a is a self-orthogonal subspace of F 2 t \mathbb{F}_2^t F 2 t . A self-orthogonal subspace has dimension at most t / 2 t/2 t /2 , so t t t is at least twice the rank of the parity matrix.
The rank, in turn, is bounded below by the cubic part of the phase. The rank of any flattening of the signature tensor of Heyfron and Campbell [5 ] bounds its symmetric rank from below, a standard fact, and in our language the rank of the parity matrix is at least n − d n-d n − d , where d d d is the dimension of the radical of the cubic moment form, the directions along which the cubic part of the phase degenerates. Combining the two bounds gives t ≥ 2 ( n − d ) t \ge2(n-d) t ≥ 2 ( n − d ) , twice what nullity gives, and a parity argument adds one more when the gate is not Clifford. Campbell and Howard use self-orthogonality to compute a cost that sets CCZ factors aside and is zero on every product of CCZ gates [2 Def. 2, Lemma 3] . The flattening bound applied to t t t itself gives only t ≥ n − d t \ge n-d t ≥ n − d , the nullity of a pure-cubic gate. The doubling appears only once the flattening bound is applied to the rank of the parity matrix instead. We call the result the isotropy floor. For m m m disjoint CCZ gates d = 0 d=0 d = 0 and n = 3 m n=3m n = 3 m , so the floor is 6 m + 1 6m+1 6 m + 1 . Campbell and Howard do determine the T T T -count of every controlled diagonal Clifford exactly [2 Thm. 5] , but for m ≥ 2 m \ge2 m ≥ 2 the layer is not a controlled unitary in any CNOT basis (Remark 34), so their theorem does not reach it. Beyond the pure-cubic case, the general floor and the identity ν = n − d ∗ \nu=n-d^* ν = n − d ∗ below carry the rest of the paper, including every benchmark certificate, since none of the certified blocks is pure-cubic.
The weights, overlaps and triple counts of the columns are the moments of the gate, and they do not depend on the circuit. Every quantity in the floor is a rank or a kernel dimension of a matrix built from them, so Gaussian elimination computes it without a search over circuits. For a gate given as a { C N O T , T } \{\mathrm{CNOT},T\} { CNOT , T } circuit the moments follow from propagating parities through the CNOTs. For a gate given as a Boolean function (a Toffoli network, a phase oracle or a QAOA cost layer) they follow from the function directly.
Contributions
The diagonal gates of the third Clifford level are those whose phase polynomial over Z 8 \mathbb{Z}_8 Z 8 has degree at most three. A T T T gate contributes a linear term, CS a quadratic one and CCZ a cubic one. We write δ ( U ) \delta(U) δ ( U ) for the least number of T T T gates in any { C N O T , T } \{\mathrm{CNOT},T\} { CNOT , T } circuit for U U U .
Every diagonal level-three gate on n n n qubits has δ ( U ) ≥ 2 ( n − d ∗ ) − r \delta(U) \ge2(n-d^*)-r δ ( U ) ≥ 2 ( n − d ∗ ) − r (Theorem 25 ). Here d ∗ d^* d ∗ is the radical dimension of the full moment tensor, the cubic moment form together with the lower moments, and r r r is the rank of the quadratic moments. Both take O ( n 3 ) O(n^3) O ( n 3 ) word operations. The floor is never below the stabilizer nullity ν \nu ν , which equals n − d ∗ n-d^* n − d ∗ on this class, and on non-Clifford pure-cubic gates it is 2 ν + 1 2\nu+1 2 ν + 1 (Corollaries 29 and 23). An upper bound computed in the same time brackets every gate (Proposition 32 ).
Besides the parallel layer, the floor is exact on a layer whose blocks share single qubits, when the shared qubits can be routed along a forest in which each block has at most three neighbors (Proposition 41 ). There the count is 6 m + 1 − 2 η 6m+1-2\eta 6 m + 1 − 2 η , where η \eta η counts the excess incidences. For
m m m Toffolis fanned out from one control the floor recovers Campbell and Howard’s exact count 4 m + 3 4m + 3 4 m + 3 (Theorem 39). On a general controlled diagonal Clifford the floor is within one of their count (Proposition 44 ).
PyZX [22 ] implements a phase-block optimizer based on Heyfron and Campbell’s tensor-decomposition algorithm TODD [5 ] . On its output for 24 benchmark circuits the floor proves 193 of 311 blocks optimal at the best of five seeds (186 to 193 across seeds), relative to the optimizer’s block partition, against 113 for nullity, and 37 of the 72 blocks too large to decode exactly, against 15. On all 515 blocks small enough to decode, across two optimizers, it is within two of the true T T T -count (§ 2.7 ).
The floor also gives 6 k + 1 6k + 1 6 k + 1 for the GF ( 2 k ) \operatorname{GF}(2^k) GF ( 2 k ) multiplication oracle, against 3 k 3k 3 k for nullity (§ 2.7 ). Further results are in the supplementary notes [10 ] : a census of pure-cubic gates with n ≤ 6 n \le6 n ≤ 6 , exact counts for cubics that factor, permutation gates and further applications, higher levels of the hierarchy and circuits beyond the Hadamard-free model.
In § 2 we go through the whole argument for a single CCZ before stating the general results. Related work is discussed in § 3 and open problems in § 4 . All proofs are in the appendices.
Technical overview
We start with a single CCZ. The argument that its T T T -count is seven already contains every idea of the general bound, so we give it in full before stating the general results.
Warm-up: the T T T -count of CCZ
The gate CCZ maps ∣ x ⟩ ↦ ( − 1 ) x 1 x 2 x 3 ∣ x ⟩ |x\rangle\mapsto(-1)^{x_1x_2x_3}|x\rangle ∣ x ⟩ ↦ ( − 1 ) x 1 x 2 x 3 ∣ x ⟩ . A { C N O T , T } \{\mathrm{CNOT}, T\} { CNOT , T } circuit can only produce phases that are eighth roots of unity, because T = diag ( 1 , e 2 π i / 8 ) T = \operatorname{diag}(1,e^{2\pi i/8}) T = diag ( 1 , e 2 π i /8 ) , and ( − 1 ) b = e 2 π i ( 4 b ) / 8 (-1)^b = e^{2\pi i(4b)/8} ( − 1 ) b = e 2 π i ( 4 b ) /8 is one of them. We therefore describe a diagonal gate by its phase polynomial ϕ : F 2 n → Z 8 \phi\colon\mathbb{F}_2^n \to\mathbb{Z}_8 ϕ : F 2 n → Z 8 , where ∣ x ⟩ |x\rangle ∣ x ⟩ picks up e 2 π i ϕ ( x ) / 8 e^{2\pi i\phi(x)/8} e 2 π i ϕ ( x ) /8 . For CCZ,
ϕ ( x ) = 4 x 1 x 2 x 3 . (1) \phi(x) = 4x_1x_2x_3. \tag*{(1)} ϕ ( x ) = 4 x 1 x 2 x 3 . (1)
A T T T gate applied to the parity y ⋅ x y \cdot x y ⋅ x of some input bits multiplies the state by e 2 π i ( y ⋅ x ) / 8 e^{2\pi i(y\cdot x)/8} e 2 π i ( y ⋅ x ) /8 , reading the bit y ⋅ x y \cdot x y ⋅ x as the integer 0 or 1. A circuit for ϕ \phi ϕ amounts to a choice of coefficients α y ∈ Z 8 \alpha_y \in\mathbb{Z}_8 α y ∈ Z 8 , one per parity, with ∑ y α y ( y ⋅ x ) ≡ ϕ ( x ) \sum_y \alpha_y (y \cdot x) \equiv\phi(x) ∑ y α y ( y ⋅ x ) ≡ ϕ ( x ) for all x x x . For CCZ one choice is the inclusion-exclusion identity
4 x 1 x 2 x 3 ≡ x 1 + x 2 + x 3 − ( x 1 ⊕ x 2 ) − ( x 1 ⊕ x 3 ) − ( x 2 ⊕ x 3 ) + ( x 1 ⊕ x 2 ⊕ x 3 ) ( m o d 8 ) . (2) 4x_1x_2x_3 \equiv 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) \pmod{8}. \tag*{(2)} 4 x 1 x 2 x 3 ≡ x 1 + x 2 + x 3 − ( x 1 ⊕ x 2 ) − ( x 1 ⊕ x 3 ) − ( x 2 ⊕ x 3 ) + ( x 1 ⊕ x 2 ⊕ x 3 ) ( mod 8 ) . (2)
Since S S S adds 2 to a coefficient and Z Z Z adds 4, only the odd coefficients need a T T T gate, and the coefficient − 1 ≡ 7 -1 \equiv7 − 1 ≡ 7 is a T † T^\dagger T † . The seven terms give the familiar seven-T T T circuit, in which CNOTs move each parity onto a wire and back:
Figure 5.
The parity each T T T acts on is written beneath it.
Other choices of coefficients give other circuits. The sets of parities whose T T T gates multiply to a diagonal Clifford form a linear code, a punctured Reed–Muller code [11 ] , so the circuits for a gate form one coset of that code and δ ( U ) \delta(U) δ ( U ) is the minimum weight in the coset. Finding that weight is a decoding problem with no known polynomial-time algorithm, and the rest of this section bounds it from below without solving it.
Isotropy
Fix any circuit and list its t t t odd parities as the rows of a matrix Y Y Y over F 2 \mathbb{F}_2 F 2 , one row per T T T gate and one column per qubit. For the circuit above, taking the rows in the order of (2),
Y T = ( 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 1 0 1 1 1 ) . (3) Y^{\mathsf{T}} =
\begin{pmatrix}
1 & 0 & 0 & 1 & 1 & 0 & 1 \\
0 & 1 & 0 & 1 & 0 & 1 & 1 \\
0 & 0 & 1 & 0 & 1 & 1 & 1
\end{pmatrix}. \tag*{(3)} Y T = 1 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 1 1 . (3)
Write c a ∈ F 2 t c_a \in\mathbb{F}_2^t c a ∈ F 2 t for column a a a of Y Y Y , so that c a c_a c a marks the T T T gates that involve qubit a a a . The weight of c a c_a c a counts the parities containing a a a , and the overlap ⟨ c a , c b ⟩ \langle c_a,c_b\rangle ⟨ c a , c b ⟩ counts those containing both a a a and b b b . Their values mod 2 are the order-one and order-two moments of the gate, and since by Fact 15 they are the same for every circuit implementing it, any one circuit computes them. We call a phase pure-cubic when all of its order-one and order-two moments vanish. CCZ is pure-cubic, since every column has weight four and every pair of columns overlaps in two places. For a pure-cubic gate, then,
⟨ c a , c b ⟩ = 0 for all a , b , including a = b . (4) \langle c_a,c_b\rangle= 0 \qquad\text{for all } a,b,\text{ including }a=b. \tag*{(4)} ⟨ c a , c b ⟩ = 0 for all a , b , including a = b . (4)
The column space C = span { c 1 , … , c n } C = \operatorname{span}\{c_1,\ldots,c_n\} C = span { c 1 , … , c n } is therefore self-orthogonal, C ⊆ C ⊥ C \subseteq C^\perp C ⊆ C ⊥ . Since dim C ⊥ = t − dim C \dim C^\perp= t-\dim C dim C ⊥ = t − dim C ,
t ≥ 2 dim C = 2 rank Y . (5) t \ge2\dim C = 2\operatorname{rank}Y. \tag*{(5)} t ≥ 2 dim C = 2 rank Y . (5)
The rank, and the extra one
To bound rank Y Y Y we count parities three qubits at a time. Let T a b c T_{abc} T ab c be the parity of the number of rows of Y Y Y that contain all of a a a , b b b and c c c . For distinct a , b , c a,b,c a , b , c this is
T a b c = ∑ j = 1 t ( c a ) j ( c b ) j ( c c ) j ( m o d 2 ) , (6) T_{abc} = \sum_{j=1}^{t}(c_a)_j(c_b)_j(c_c)_j \pmod{2}, \tag*{(6)} T ab c = j = 1 ∑ t ( c a ) j ( c b ) j ( c c ) j ( mod 2 ) , (6)
and, like the lower moments, it depends only on the gate. These numbers form a symmetric trilinear form, the cubic moment form. For CCZ only one row, x 1 ⊕ x 2 ⊕ x 3 x_1 \oplus x_2 \oplus x_3 x 1 ⊕ x 2 ⊕ x 3 , contains all three qubits, so T 123 = 1 T_{123}=1 T 123 = 1 is the only nonzero entry. Fixing one argument in a direction w ∈ F 2 n w \in\mathbb{F}_2^n w ∈ F 2 n gives a matrix T ( w ) b c = ∑ a w a T a b c T(w)_{bc} = \sum_a w_aT_{abc} T ( w ) b c = ∑ a w a T ab c , and the radical R R R is the set of w w w with T ( w ) = 0 T(w)=0 T ( w ) = 0 . For CCZ,
T ( w ) = ( 0 w 3 w 2 w 3 0 w 1 w 2 w 1 0 ) , T(w) =
\begin{pmatrix}
0 & w_3 & w_2 \\
w_3 & 0 & w_1 \\
w_2 & w_1 & 0
\end{pmatrix}, T ( w ) = 0 w 3 w 2 w 3 0 w 1 w 2 w 1 0 ,
which vanishes only at w = 0 w=0 w = 0 , so R = { 0 } R=\{0\} R = { 0 } and d = dim R = 0 d=\dim R=0 d = dim R = 0 .
Now suppose a combination of columns vanishes, ∑ a w a c a = 0 \sum_a w_ac_a=0 ∑ a w a c a = 0 . Substituting into (6) gives T ( w ) b c = ∑ j ( c b ) j ( c c ) j ( ∑ a w a ( c a ) j ) = 0 T(w)_{bc} = \sum_j(c_b)_j(c_c)_j\left(\sum_a w_a(c_a)_j\right)=0 T ( w ) b c = ∑ j ( c b ) j ( c c ) j ( ∑ a w a ( c a ) j ) = 0 , so w ∈ R w\in R w ∈ R . The kernel of Y Y Y is contained in the radical, and
rank Y ≥ n − d . (7) \operatorname{rank}Y \ge n-d. \tag*{(7)} rank Y ≥ n − d . (7)
Together with (5) this gives t ≥ 2 ( n − d ) t \ge2(n-d) t ≥ 2 ( n − d ) for every circuit, which is 6 for CCZ.
Could a circuit for CCZ use exactly six T T T gates? Its three columns would be independent by (7) , so C C C would have dimension three, half of six, and (5) would be tight: C = C ⊥ C=C^\perp C = C ⊥ . Every column has even weight, so the all-ones vector 1 ∈ F 2 6 \mathbf{1}\in\mathbb{F}_2^6 1 ∈ F 2 6 is orthogonal to every column and lies in C ⊥ = C C^\perp=C C ⊥ = C . Then 1 = ∑ a ∈ S c a \mathbf{1}=\sum_{a\in S}c_a 1 = ∑ a ∈ S c a for some nonempty set S S S of qubits. Substituting this into (6) with w w w the indicator of S S S gives T ( w ) b c = ⟨ c b , c c ⟩ = 0 T(w)_{bc}=\langle c_b,c_c\rangle=0 T ( w ) b c = ⟨ c b , c c ⟩ = 0 , so w w w is a nonzero element of the radical. That contradicts R = { 0 } R=\{0\} R = { 0 } (Lemma 21). Hence δ ( C C Z ) ≥ 7 \delta(\mathrm{CCZ})\ge7 δ ( CCZ ) ≥ 7 , and the circuit above shows equality. On three qubits this value is classical, but the argument never decodes, so it runs unchanged on any number of qubits.
The argument used purity twice, for the self-orthogonality (4) and to remove the coincident-index terms in (6) . For a general phase the full moment tensor and its radical R ∗ R^* R ∗ take the place of T T T and R R R . The extra one used R = { 0 } R=\{0\} R = { 0 } . When d > 0 d>0 d > 0 we first split off the radical directions, and the argument applies to what remains, which recovers the extra one for every non-Clifford pure-cubic gate (Corollary 23). Figure 1 (PDF p. 6) summarizes the computation.
Figure 1 (PDF p. 6). The isotropy floor, end to end, with the § 2.1 example beside it. The figure shows the pure-cubic case, and § 2.5 gives the general floor. At CCZ the floor returns 7 and the seven-T T T construction meets it, so δ ( C C Z ) = 7 \delta(\mathrm{CCZ})=7 δ ( CCZ ) = 7 .
Many gates at once
The same computation applies to m m m disjoint CCZs on n = 3 m n=3m n = 3 m qubits. Their cubic moment form is block-diagonal, each block has a trivial radical, and so d = 0 d=0 d = 0 and the floor is 2 n + 1 = 6 m + 1 2n+1=6m+1 2 n + 1 = 6 m + 1 . The construction of Campbell and Howard [2 Cor. 1] meets it (Proposition 41, drawn at m = 2 m=2 m = 2 in Figure 2 ), which proves Theorem 1.
Figure 2. Splicing two CCZ blocks (Lemma 40). The struck T T T on wire a a a is deleted. Each T T T of the second block acts on wire a a a while it holds x a ⊕ ( σ ⋅ x ) x_a \oplus(\sigma\cdot x) x a ⊕ ( σ ⋅ x ) , for the parity σ \sigma σ printed above it. (a) Disjoint blocks. The seven lifted T T T s have coefficients summing to 1, as for any CCZ (2) , so together they restore the deleted phase on x a x_a x a , and the pair costs 13 rather than 14. This is the 6 m + 1 6m+1 6 m + 1 construction of Theorem 35 at m = 2 m=2 m = 2 . (b) Blocks sharing qubit c c c . The lift of the parity { c } \{c\} { c } would be x a ⊕ x c x_a \oplus x_c x a ⊕ x c , which the first block already carries with the opposite sign, so both T T T s on that parity cancel and are left out. The remaining 11 T T T s meet the floor 2 n + 1 2n+1 2 n + 1 of Lemma 38 . Both circuits restore their wires and implement the product of the two CCZ gates exactly.
Stabilizer nullity adds over tensor products and gives only 3 m 3m 3 m for the layer. Table 1 compares the three bounds.
The general floor
Many gates that arise in practice, such as a Toffoli network compiled together with nearby S S S and T T T gates, have order-one and order-two moments that do not vanish. We keep those lower moments in a matrix.
Table 1: Lower bounds on a layer of m m m disjoint CCZ gates. The amortized stabilizer Rényi entropy (SRE) bound of Zhu et al. [4 ] has rate σ = ( 5 − log 2 11 ) / ( 2 − log 2 3 ) = 3.7118 … \sigma= (5 - \log_2 11)/(2 - \log_2 3) = 3.7118\ldots σ = ( 5 − log 2 11 ) / ( 2 − log 2 3 ) = 3.7118 … per CCZ, the amortized entropy of CCZ divided by that of one T T T gate. This value of the bound is computed exactly, not estimated (§ 3 ). The isotropy floor meets the construction for every m m m .
Table 1.
Definition 2 (cubic moment form and radical). For distinct a a a , b b b , c c c the order-three moment T a b c T_{abc} T ab c is the parity of the number of odd parities containing all three, and T a b c = 0 T_{abc}=0 T ab c = 0 when two indices coincide. The resulting symmetric trilinear form on F 2 n \mathbb{F}_2^n F 2 n is the cubic moment form . Its slice in direction w ∈ F 2 n w\in\mathbb{F}_2^n w ∈ F 2 n is the matrix T ( w ) b c = ∑ a w a T a b c T(w)_{bc}=\sum_a w_aT_{abc} T ( w ) b c = ∑ a w a T ab c , and its radical is R = { w : T ( w ) = 0 } R=\{w:T(w)=0\} R = { w : T ( w ) = 0 } , with d = dim R d=\dim R d = dim R . The moments of orders one and two form the symmetric quadratic moment matrix Q Q Q , of rank r r r . Placing them at coincident indices gives the full moment tensor, whose radical R ∗ R^* R ∗ has dimension d ∗ d^* d ∗ .
The full moment tensor is the signature tensor of Heyfron and Campbell [5 ] . In their language δ \delta δ is its symmetric rank over F 2 \mathbb{F}_2 F 2 , and what follows is a lower bound on that rank.
Theorem 3 (the isotropy floor (informal version of Theorem 25 ).) Every diagonal level-three gate U U U on n n n qubits satisfies δ ( U ) ≥ 2 ( n − d ∗ ) − r ≥ ν \delta(U)\ge2(n-d^*)-r\ge\nu δ ( U ) ≥ 2 ( n − d ∗ ) − r ≥ ν , where ν = n − d ∗ \nu=n-d^* ν = n − d ∗ is its stabilizer nullity. Both d ∗ d^* d ∗ and r r r are computed from the moments in O ( n 3 ) O(n^3) O ( n 3 ) word operations.
On a pure-cubic gate r = 0 r=0 r = 0 and the theorem gives 2 ν 2\nu 2 ν , to which the parity step of the warm-up adds one when the gate is not Clifford. We use isotropy floor for 2 ν + 1 2\nu+1 2 ν + 1 in that case and for 2 ( n − d ∗ ) − r 2(n-d^*)-r 2 ( n − d ∗ ) − r otherwise. The quadratic moments weaken the bound. The floor exceeds nullity by ν − r \nu-r ν − r (Corollary 29 ), so a gate with r = ν r=\nu r = ν gets nothing beyond nullity.
Where the floor is exact
Suppose any two blocks share at most one qubit, and let η = 3 m − n \eta=3m-n η = 3 m − n count the excess incidences. Such a layer is still non-degenerate, so its floor is 2 n + 1 = 6 m + 1 − 2 η 2n+1=6m+1-2\eta 2 n + 1 = 6 m + 1 − 2 η (Lemma 38 ). On a shared wire two T T T gates of opposite sign cancel (Figure 2 ), and by splicing circuits together along the shared qubits we can meet the floor whenever, for each shared qubit, the blocks containing it can be joined by a tree so that the union of these trees is a forest in which every block has at most three neighbors (Proposition 41 ). A fan-out of m m m Toffolis from one control is of this kind, and there the floor recovers Campbell and Howard’s exact count 4 m + 3 4m+3 4 m + 3 [2 Thm. 5] . Once the sharing closes a cycle the floor can be loose. The smallest example is three blocks that meet pairwise in different qubits, { 0 , 1 , 2 } \{0,1,2\} { 0 , 1 , 2 } , { 0 , 3 , 4 } \{0,3,4\} { 0 , 3 , 4 } and { 1 , 3 , 5 } \{1,3,5\} { 1 , 3 , 5 } , with floor 13 and T T T -count 15 (Remark 42).
Solving the moment equations from the top down, triples first, produces an explicit circuit, so every gate also gets an upper bound W ( s ) W(s) W ( s ) in O ( n 3 ) O(n^3) O ( n 3 ) time (Proposition 32 ).
Applications
The multiplication oracle of GF ( 2 k ) \operatorname{GF}(2^k) GF ( 2 k ) acts as U k ∣ x , y , z ⟩ = ( − 1 ) z ⋅ ( x ∗ y ) ∣ x , y , z ⟩ U_k\lvert x,y,z\rangle= (-1)^{z\cdot(x*y)}\lvert x,y,z\rangle U k ∣ x , y , z ⟩ = ( − 1 ) z ⋅ ( x ∗ y ) ∣ x , y , z ⟩ on 3 k 3k 3 k qubits. It is non-degenerate, so δ ( U k ) ≥ 6 k + 1 \delta(U_k) \ge6k+1 δ ( U k ) ≥ 6 k + 1 (Proposition 45 ). Since bilinear complexity gives circuits with O ( k ) O(k) O ( k ) T T T gates, the count is Θ ( k ) \Theta(k) Θ ( k ) . At k = 2 k=2 k = 2 exact decoding gives 17, the count of the best published circuits [23 ] . AlphaTensor-Quantum had already shown with an SMT solver that no decomposition of the signature tensor is shorter [6 §3.1] (Remark 46).
The floor can also be applied to each phase block of an optimizer’s output. We call an output block certified when its floor equals its T T T -count after repeated parities in the block are merged, since then no { C N O T , T } \{\mathrm{CNOT},T\} { CNOT , T } resynthesis of that block can do better. On the output of PyZX’s TODD-based phase-block optimizer [5 , 22 ] for the 24 standard reversible benchmarks [15 , 24 ] that it finishes within four minutes, the floor certifies 193 of 311 blocks and nullity 113 at the best of five optimizer seeds (186 to 193 across seeds). Of the 72 blocks with 7 to 28 active qubits, too large for exact decoding, the floor certifies 37 and nullity 15. The certificates are relative to the optimizer’s choice of Hadamard positions and blocks (Appendix § 9 .§ 2 ).
Related work
Beverland, Campbell, Howard and Kliuchnikov [21 ] introduced stabilizer nullity as a state monotone, which also bounds circuits with adaptive feedforward, and Jiang and Wang [3 ] defined its unitary version. Apart from the related monotones of [21 ] and the flattening bound on the symmetric rank discussed below, we know of no other lower bound that is efficiently computable on all diagonal level-three gates. Jiang and Wang also show that the nullity of a unitary can be twice that of a state it prepares. The Choi state has no such gap, since its nullity equals that of the unitary [3 ] . That factor of two is unrelated to ours, which compares the T T T -count with the unitary nullity. We prove δ ≥ 2 ν + 1 \delta\ge2\nu+1 δ ≥ 2 ν + 1 on every non-Clifford pure-cubic gate (Corollary 23), with equality on layers whose blocks share single qubits along a forest. The supplementary notes [10 ] add equality on cubics that factor and on every pure-cubic gate with n ≤ 5 n \le5 n ≤ 5 .
Campbell and Howard [2 ] gave the 6 m + 1 6m+1 6 m + 1 construction for m m m disjoint CCZ gates [2 Thm. 6, Cor. 1] . Their controlled-unitary theorem [2 Thm. 5] gives, through Lempel’s factorization, the exact T T T -count of every controlled diagonal Clifford among ancilla-free circuits. This class includes layers whose blocks all share one control, and on it our floor comes within one of their count (Proposition 44 ). It excludes the disjoint layer for m ≥ 2 m \ge2 m ≥ 2 and every other layer of blocks sharing at most one qubit (Remark 34). The step that needs the control is in their converse [2 App. C] : it splits the parities by whether they touch the control qubit and bounds each half by an optimal Lempel factorization of the target’s quadratic form, which requires a qubit through which every cubic monomial passes. Their Lemma 3 is the self-orthogonality we start from. For disjoint layers, the earlier lower bounds were the nullity 3 m 3m 3 m [3 ] and the amortized stabilizer Rényi entropy bound of Zhu et al. [4 ] , which gives about 3.71 m 3.71m 3.71 m (Table 1). This is the exact value of that bound on the layer, not an estimate. The amortized entropy of a single CCZ equals the entropy 5 − log 2 11 5-\log_2 11 5 − log 2 11 of its Choi state [4 App. D, Thm. S13] . The amortized entropy is subadditive under composition, because ancillas are included in its supremum, so on the layer it is at most m ( 5 − log 2 11 ) m(5-\log_2 11) m ( 5 − log 2 11 ) , and it is at least the Choi-state entropy [4 Cor. 4] , which is additive over the blocks. The bound is proved for unitary circuits. For general gates we evaluate only the Choi-state form of the bound, the strongest exponential-time measure we compared with (see the supplementary notes [10 ] ). Seddon and Campbell [18 ] define channel robustness and magic capacity, which also bound the T T T -count of multi-qubit operations. Both are optimizations over stabilizer decompositions whose size grows superexponentially with n n n .
Heyfron and Campbell [5 ] phrase T T T -count optimization as decomposing the signature tensor of a phase polynomial into few symmetric rank-one terms. Their TODD compiler and AlphaTensor-Quantum [6 ] search for such decompositions, and Khoruzhii, Gelß and Pokutta [25 ] match or improve the counts of these searches with tensor decomposition over F 2 \mathbb{F}_2 F 2 at much lower cost. The signature tensor is our full moment tensor, so δ \delta δ is its symmetric rank and the floor is a lower bound on that rank. The rank of a flattening also bounds the symmetric rank from below, which is our inequality rank Y ≥ n − d \operatorname{rank} Y \ge n-d rank Y ≥ n − d . We combine it with isotropy, which doubles the bound. For symmetric matrices the minimal decomposition over F 2 \mathbb{F}_2 F 2 is known from Lempel [26 ] (see also Seroussi and Lempel [27 ] ), and the − r -r − r term of Theorem 25 uses the same count of alternating forms. AlphaTensor-Quantum found 17 for the GF(4) multiplier and showed with an SMT solver that no decomposition of its signature tensor is shorter [6 §3.1] . Khoruzhii, Gelß and Pokutta [13 ] classify cubic forms by their alternating rank, an invariant different from the radical used here.
In Amy and Mosca’s characterization [11 ] the T T T -count is a decoding problem, and the floor bounds its optimum from below without solving it. Kam et al. [28 ] bound the T T T -count left after exact post-processing by the denominator exponent of the matrix entries. That certificate gives nothing for the gates studied here, whose entries are eighth roots of unity and have no denominator.
Girish, May, Parham and Yuen [29 ] use communication complexity to prove that the n n n -controlled Toffoli needs Ω ( n ) \Omega(n) Ω ( n ) magic, and Gosset, Kothari and Wu [30 ] bound state preparation through Pauli postselection. These bounds are asymptotic, and the first also covers adaptive circuits if measurements are counted together with magic. Gosset, Kothari and Zhang [31 ] bound the T T T -count of a reversible Boolean function below by its non-adaptive parity decision tree complexity minus one, for unitary circuits and, at zero error, for adaptive ones. That complexity is at most the number n n n of inputs, so the bound stays below the nullity n n n of a non-degenerate cubic gate. Our bounds are per gate and exact on specific families, but the factor of two over nullity needs the absence of feedforward (see the supplementary notes [10 ] ).
In magic-state distillation and code design, Bravyi and Haah [32 ] , Nezami and Haah [33 ] and Rengaswamy et al. [34 ] use related self-orthogonality conditions (triorthogonality and the CSS-T condition) to control distillation rates and transversal T T T gates. Those works use the conditions to constrain code parameters. The closest in method is Nezami and Haah’s bound n ≥ 2 k n \ge2k n ≥ 2 k for triorthogonal codes [33 Lemma 7] , which counts orthonormal vectors supported on half of the coordinates, where the isotropy step bounds the dimension of a self-orthogonal span. We use only the weaker pairwise version (even column weights and even pairwise overlaps) and obtain from it a lower bound on the T T T -count of a given gate. Read on the columns of Y Y Y , triorthogonality asks every triple overlap to be even, that is T = 0 T=0 T = 0 , which makes a pure-cubic gate Clifford. Generalized triorthogonality [35 ] and synthillation [2 ] allow the odd triple overlaps that encode CCZ, but they are used to construct codes and circuits, and we know of no lower bound from them that reaches the layer.
Discussion and open problems
The isotropy floor is not monotone under stabilizer operations with feedforward, which is why it can exceed the factor 4 / 3 4/3 4/3 over nullity that limits every such monotone on CCZ. The cost is that the bound depends on the circuit model. We prove it here for Hadamard-free circuits. The supplementary notes [10 ] extend it to some circuits with internal Hadamards and to higher levels of the Clifford hierarchy, show that under adaptive feedforward only nullity is known to hold, and collect the open problems on those models.
Within the Hadamard-free model the floor is exact on the layers of Appendix § 8 , and Conjecture 43 states when the sharing floor is attained. Open Problems 4–6 collect the main gaps that remain.
Open Problem 4 (internal Hadamards). Does t ≥ δ ( U ) t \ge\delta(U) t ≥ δ ( U ) hold for every measurement-free Clifford+T T T circuit with clean ancillas that implements a diagonal level-three gate U U U ? The supplementary notes [10 ] prove it with at most two internal Hadamards, when the correction is Clifford, at maximal output rank, and for temporary-AND compilations under conditions on how the AND values are used.
Open Problem 5 (where the floor is exact). Which non-Clifford pure-cubic gates have δ = 2 ν + 1 \delta= 2\nu+ 1 δ = 2 ν + 1 ? The floor is exact on every pure-cubic gate with n ≤ 5 n \le5 n ≤ 5 , on layers whose blocks share single qubits along a forest, on cubics that factor, but not on three blocks that meet pairwise in different qubits (Remark 42) or on two of the five classes of cubic forms at n = 6 n = 6 n = 6 [10 ] .
Open Problem 6 (the missing unit on controlled unitaries). On a controlled diagonal Clifford that is not pure-cubic and has μ \mu μ odd, the floor is one below Campbell and Howard’s exact count (Proposition 44). Is there an efficiently computable bound that recovers the parity step of their converse [2 App. C] on every diagonal level-three gate?
For field multiplication the ranks of the individual slices sharpen the floor 6 k + 1 6k + 1 6 k + 1 , and they also bound the number of Toffoli gates in Hadamard-free circuits, a bound that survives measurement and feedforward. These results will appear separately.
Organization of the appendices
The sections above can be read on their own. Appendix § 5 collects notation and standard facts, with a table of symbols. Appendix § 7 proves the floor and its ceiling, and Appendix § 8 proves the exact counts for Toffoli layers and compares the floor with Campbell and Howard’s count on controlled unitaries. Appendix § 9 treats field multiplication and the benchmarks.
Preliminaries
This appendix fixes the notation used in the rest of the paper, collected in Table 2 . It recalls the facts about bilinear forms and Reed–Muller codes that the proofs need, with citations in place of proofs. It then states the Amy–Mosca correspondence in terms of moments, the form in which the later appendices use it, and defines the cubic moment form, its radicals and the stabilizer nullity. The gates CCZ, CS and T serve as running examples.
Table 2. Notation. A subset A ⊆ [ n ] A\subseteq[n] A ⊆ [ n ] and a vector y ∈ F 2 n y\in\mathbb{F}_2^n y ∈ F 2 n are identified through y = 1 A y=1_A y = 1 A . Calligraphic A \mathcal{A} A is reserved for the shift group.
Bilinear forms and isotropic subspaces
The lower bounds of Appendix § 7 come from a dimension count for subspaces on which the dot product vanishes. We work over F 2 = { 0 , 1 } \mathbb{F}_2 = \{0, 1\} F 2 = { 0 , 1 } , where addition is XOR and multiplication is AND. Write ⟨ u , v ⟩ = ∑ i = 1 t u i v i m o d 2 \langle u, v\rangle= \sum_{i=1}^{t} u_i v_i \bmod2 ⟨ u , v ⟩ = ∑ i = 1 t u i v i mod 2 for the dot product on F 2 t \mathbb{F}_2^t F 2 t and V ⊥ = { w : ⟨ u , w ⟩ = 0 ∀ u ∈ V } V^\perp= \{w : \langle u,w\rangle= 0\ \forall u \in V\} V ⊥ = { w : ⟨ u , w ⟩ = 0 ∀ u ∈ V } for a subspace V ⊆ F 2 t V \subseteq\mathbb{F}_2^t V ⊆ F 2 t . The form is non-degenerate, so dim V + dim V ⊥ = t \dim V + \dim V^\perp= t dim V + dim V ⊥ = t . A subspace V V V is totally isotropic if V ⊆ V ⊥ V \subseteq V^\perp V ⊆ V ⊥ . In characteristic 2 a vector can be orthogonal to itself, since ⟨ u , u ⟩ = wt ( u ) m o d 2 \langle u,u\rangle= \operatorname{wt}(u) \bmod2 ⟨ u , u ⟩ = wt ( u ) mod 2 is the parity of its Hamming weight wt ( u ) \operatorname{wt}(u) wt ( u ) .
For example, the three columns of the matrix Y Y Y in (3) , read in F 2 7 \mathbb{F}_2^7 F 2 7 , each have weight four and every two of them share two coordinates. All their dot products vanish, so their span is a totally isotropic subspace of dimension 3 in F 2 7 \mathbb{F}_2^7 F 2 7 .
Lemma 7. If V ⊆ F 2 t V \subseteq\mathbb{F}_2^t V ⊆ F 2 t is totally isotropic then dim V ≤ t / 2 \dim V \le t/2 dim V ≤ t /2 .
Proof. V ⊆ V ⊥ V \subseteq V^\perp V ⊆ V ⊥ gives dim V ≤ dim V ⊥ = t − dim V \dim V \le\dim V^\perp= t - \dim V dim V ≤ dim V ⊥ = t − dim V .
The rank of the dot product restricted to a subspace can be computed from any spanning set. This is standard [36 ] .
Lemma 8. Let C = span { c 1 , … , c n } ⊆ F 2 t C=\operatorname{span}\{c_1,\ldots,c_n\}\subseteq\mathbb{F}_2^t C = span { c 1 , … , c n } ⊆ F 2 t and let G G G be the n × n n\times n n × n Gram matrix G a b = ⟨ c a , c b ⟩ G_{ab}=\langle c_a,c_b\rangle G ab = ⟨ c a , c b ⟩ . Then the rank of the dot product restricted to C C C equals rank F 2 G \operatorname{rank}_{\mathbb{F}_2}G rank F 2 G , and the radical C ∩ C ⊥ C\cap C^\perp C ∩ C ⊥ of the restricted form has dimension dim C − rank G \dim C-\operatorname{rank}G dim C − rank G .
The radical C ∩ C ⊥ C\cap C^\perp C ∩ C ⊥ in this lemma is a subspace of F 2 t \mathbb{F}_2^t F 2 t , whose coordinates are parities. The radicals R R R and R ∗ R^* R ∗ of §A.4 are different objects. They are subspaces of F 2 n \mathbb{F}_2^n F 2 n , whose coordinates are qubits, and they are defined by the moment tensor.
Linear and Reed–Muller codes
The T T T -count of a diagonal gate is a distance to a Reed–Muller code (§A.4), and we use only the following facts [36 ] . A binary linear code of length L L L is a subspace C ⊆ F 2 L C\subseteq\mathbb{F}_2^L C ⊆ F 2 L with dual C ⊥ C^\perp C ⊥ taken with respect to the dot product. The syndrome of a vector is its list of inner products with a basis of C ⊥ C^\perp C ⊥ . Two vectors have the same syndrome exactly when they lie in the same coset v + C v+C v + C , and a coset leader is a vector of minimum weight in its coset. Minimum-distance decoding asks for the codeword nearest to a given vector v v v . If c c c is that codeword, then v ⊕ c v\oplus c v ⊕ c is a coset leader of v + C v+C v + C . Two operations change the length of a code by one. Puncturing C C C at a coordinate deletes that coordinate from every codeword. Shortening keeps the codewords that vanish there and then deletes it. The dual of a punctured code is the shortened dual.
The Reed–Muller code RM ( r , m ) \operatorname{RM}(r,m) RM ( r , m ) consists of the evaluation vectors, over all 2 m 2^m 2 m points of the Boolean polynomials of degree at most r r r in m m m variables. It has dimension ∑ i ≤ r ( m i ) \sum_{i\le r}\binom{m}{i} ∑ i ≤ r ( i m ) and minimum distance 2 m − r 2^{m-r} 2 m − r , attained by the indicators of ( m − r ) (m-r) ( m − r ) -flats (cosets of ( m − r ) (m-r) ( m − r ) -dimensional subspaces). Its dual is RM ( m − r − 1 , m ) \operatorname{RM}(m-r-1,m) RM ( m − r − 1 , m ) . We write RM ( r , m ) ∗ \operatorname{RM}(r,m)^* RM ( r , m ) ∗ for RM ( r , m ) \operatorname{RM}(r,m) RM ( r , m ) punctured at the all-zeros coordinate. The code that matters below is RM ( n − 4 , n ) ∗ \operatorname{RM}(n-4,n)^* RM ( n − 4 , n ) ∗ , of length 2 n − 1 2^n-1 2 n − 1 . For n ≤ 3 n\le3 n ≤ 3 it is the zero code, since RM ( r , m ) = { 0 } \operatorname{RM}(r,m)=\{0\} RM ( r , m ) = { 0 } for r < 0 r<0 r < 0 . At n = 4 n=4 n = 4 it is RM ( 0 , 4 ) ∗ = { 0 , 1 } \operatorname{RM}(0,4)^*=\{0,1\} RM ( 0 , 4 ) ∗ = { 0 , 1 } , whose one nonzero codeword is the all-ones vector on the 15 nonzero points of F 2 4 \mathbb{F}_2^4 F 2 4 .
Lemma 9 (uniform minimum distance). For every n ≥ 4 n\ge4 n ≥ 4 , RM ( n − 4 , n ) ∗ \operatorname{RM}(n-4,n)^* RM ( n − 4 , n ) ∗ has minimum distance 15.
Proof. Puncturing lowers the weight of a codeword by at most one, so the minimum distance is at least 2 4 − 1 = 15 2^4-1=15 2 4 − 1 = 15 . A 4-flat through the origin has weight 16 in RM ( n − 4 , n ) \operatorname{RM}(n-4,n) RM ( n − 4 , n ) and weight 15 after puncturing.
Phase polynomials and the T T T -count
The quantity bounded throughout the paper is the T T T -count of a Hadamard-free circuit, and this subsection defines it together with the two invariance properties used later. The circuits are Clifford+T T T , where the Clifford group is generated by H H H , S = diag ( 1 , i ) S=\operatorname{diag}(1,i) S = diag ( 1 , i ) and CNOT, and T = diag ( 1 , ω ) T=\operatorname{diag}(1,\omega) T = diag ( 1 , ω ) with ω = e i π / 4 \omega=e^{i\pi/4} ω = e iπ /4 . Identify y ∈ F 2 n y\in\mathbb{F}_2^n y ∈ F 2 n with the set { i : y i = 1 } ⊆ [ n ] \{i:y_i=1\}\subseteq[n] { i : y i = 1 } ⊆ [ n ] . The parity indexed by y y y is the function x ↦ y ⋅ x = ⨁ i ∈ y x i x\mapsto y\cdot x=\bigoplus_{i\in y}x_i x ↦ y ⋅ x = ⨁ i ∈ y x i . Every Boolean function f : F 2 n → F 2 f:\mathbb{F}_2^n\to\mathbb{F}_2 f : F 2 n → F 2 is uniquely a XOR of monomials ∏ i ∈ A x i \prod_{i\in A}x_i ∏ i ∈ A x i , and its degree is the largest ∣ A ∣ |A| ∣ A ∣ that occurs.
A Hadamard-free circuit on n n n qubits built from CNOT and T T T is diagonal and applies a sum of T T T -rotations on parities of the input,
U ∣ x ⟩ = ω ϕ ( x ) ∣ x ⟩ , ϕ ( x ) = ∑ y ∈ F 2 n α y ( y ⋅ x ) m o d 8 , α y ∈ Z 8 . (8) U|x\rangle=\omega^{\phi(x)}|x\rangle,\qquad\phi(x)=\sum_{y\in\mathbb{F}_2^n}\alpha_y(y\cdot x)\bmod8,\qquad\alpha_y\in\mathbb{Z}_8. \tag*{(8)} U ∣ x ⟩ = ω ϕ ( x ) ∣ x ⟩ , ϕ ( x ) = y ∈ F 2 n ∑ α y ( y ⋅ x ) mod 8 , α y ∈ Z 8 . (8)
We call ϕ \phi ϕ the phase polynomial and the list ( α y ) y (\alpha_y)_y ( α y ) y a representation of U U U . A diagonal level-three gate is a unitary of this form, equivalently, up to a global phase, a diagonal gate in the third level of the Clifford hierarchy [37 ] . A T T T adds 1 to one coefficient α y \alpha_y α y , an S S S adds 2 and a Z Z Z adds 4. Two gates on the same parity merge by adding their coefficients. Only odd coefficients require a T T T gate, and merging never increases the number of odd coefficients. The T T T -count of a representation is therefore the number t t t of odd α y \alpha_y α y .
Write δ ( U ) \delta(U) δ ( U ) for the minimum of t t t over all representations of U U U , counting T T T and T † T^\dagger T † alike and treating diagonal Clifford gates as free. The circuit model is Hadamard-free Clifford+T T T in this sense. A lower bound on δ \delta δ also bounds such circuits with any number of clean ancillas (Corollary 13 ). The standard example is CCZ, whose inclusion–exclusion representation (2) has an odd coefficient on each of the seven parities indexed by the nonempty subsets of { 1 , 2 , 3 } \{1,2,3\} { 1 , 2 , 3 } , so t = 7 t=7 t = 7 for it.
Lemma 10 (Clifford bi-invariance). Let C , C ′ C,C' C , C ′ lie in the group generated by CNOT, X X X and the diagonal Cliffords, and let C U C ′ CUC' C U C ′ be diagonal. Then δ ( C U C ′ ) = δ ( U ) \delta(CUC')=\delta(U) δ ( C U C ′ ) = δ ( U ) .
Proof. Every element of the group is D P DP D P with D D D a diagonal Clifford and P P P an affine permutation x ↦ L x ⊕ b x\mapsto Lx\oplus b x ↦ Lx ⊕ b built from CNOT and X X X . Writing C = D 1 P 1 C=D_1P_1 C = D 1 P 1 and C ′ = P 2 D 2 C'=P_2D_2 C ′ = P 2 D 2 , the product C U C ′ = D 1 ( P 1 U P 1 − 1 ) ( P 1 P 2 ) D 2 CUC'=D_1(P_1UP_1^{-1})(P_1P_2)D_2 C U C ′ = D 1 ( P 1 U P 1 − 1 ) ( P 1 P 2 ) D 2 is diagonal only if P 1 P 2 = I P_1P_2=I P 1 P 2 = I , so C U C ′ = D 1 ( P 1 U P 1 − 1 ) D 2 CUC'=D_1(P_1UP_1^{-1})D_2 C U C ′ = D 1 ( P 1 U P 1 − 1 ) D 2 . Conjugation by P 1 P_1 P 1 replaces the parity y ⋅ x y\cdot x y ⋅ x by ( L − T y ) ⋅ x ⊕ ( L − T y ) ⋅ b (L^{-T}y)\cdot x\oplus(L^{-T}y)\cdot b ( L − T y ) ⋅ x ⊕ ( L − T y ) ⋅ b . This is a bijection on nonzero parities that changes a coefficient α y \alpha_y α y at most to − α y -\alpha_y − α y and adds a global phase, so odd coefficients stay odd. A diagonal Clifford adds only even coefficients (S S S adds 2, Z Z Z adds 4, and C Z CZ C Z adds 2, 2, 6 on x i x_i x i , x j x_j x j , x i ⊕ x j x_i \oplus x_j x i ⊕ x j ). The number of odd coefficients is therefore unchanged in every representation, and the minimum is preserved.
Lemma 11 (restriction monotonicity). Let U U U be a diagonal level-three gate on n n n qubits and S ⊆ [ n ] S \subseteq[n] S ⊆ [ n ] , and write U ∣ S U|_S U ∣ S for the gate induced by fixing the inputs outside S S S to 0. Then δ ( U ) ≥ δ ( U ∣ S ) \delta(U) \ge\delta(U|_S) δ ( U ) ≥ δ ( U ∣ S ) .
Proof. Take any representation of U U U , a multiset of parities y y y with coefficients α y \alpha_y α y . Setting x j = 0 x_j = 0 x j = 0 for j ∉ S j \notin S j ∈ / S sends the parity y ⋅ x y \cdot x y ⋅ x to ( y ∩ S ) ⋅ x (y \cap S) \cdot x ( y ∩ S ) ⋅ x , so the restricted multiset represents U ∣ S U|_S U ∣ S . Two parities may become equal, in which case their coefficients add and an odd pair can become even. A parity may also vanish, contributing nothing. Neither can raise the odd count, so the restricted representation has at most as many odd parities. Minimizing over representations gives δ ( U ∣ S ) ≤ δ ( U ) \delta(U|_S) \le\delta(U) δ ( U ∣ S ) ≤ δ ( U ) .
Two further facts concern the robustness of the model, and both follow from the same count of odd coefficients. The T T T -count is subadditive, so circuits for parts of a phase can be composed (Lemma 12 ). Clean ancillas do not lower it when the circuit has no internal Hadamards (Corollary 13 ). For a phase polynomial ϕ \phi ϕ we write δ ( ϕ ) \delta(\phi) δ ( ϕ ) for δ \delta δ of the gate ∣ x ⟩ ↦ ω ϕ ( x ) ∣ x ⟩ |x\rangle\mapsto\omega^{\phi(x)}|x\rangle ∣ x ⟩ ↦ ω ϕ ( x ) ∣ x ⟩ .
Lemma 12 (δ \delta δ is subadditive). For phase polynomials ϕ 1 , ϕ 2 \phi_1,\phi_2 ϕ 1 , ϕ 2 on the same n n n qubits, δ ( ϕ 1 + ϕ 2 ) ≤ δ ( ϕ 1 ) + δ ( ϕ 2 ) \delta(\phi_1+\phi_2) \le\delta(\phi_1)+\delta(\phi_2) δ ( ϕ 1 + ϕ 2 ) ≤ δ ( ϕ 1 ) + δ ( ϕ 2 ) .
Proof. Take representations of ϕ 1 \phi_1 ϕ 1 and ϕ 2 \phi_2 ϕ 2 with δ ( ϕ 1 ) \delta(\phi_1) δ ( ϕ 1 ) and δ ( ϕ 2 ) \delta(\phi_2) δ ( ϕ 2 ) odd coefficients. Adding their coefficients parity by parity gives a representation of ϕ 1 + ϕ 2 \phi_1+\phi_2 ϕ 1 + ϕ 2 . A coefficient of the sum is odd only if one of the two summands is odd, so the sum has at most δ ( ϕ 1 ) + δ ( ϕ 2 ) \delta(\phi_1)+\delta(\phi_2) δ ( ϕ 1 ) + δ ( ϕ 2 ) odd coefficients.
Corollary 13 (clean ancillas without internal Hadamards). Let K K K be a { C N O T , T } \{\mathrm{CNOT},T\} { CNOT , T } circuit on n + k n+k n + k qubits (no internal Hadamards) with K ∣ x ⟩ ∣ 0 k ⟩ = ω ϕ ( x ) ∣ x ⟩ ∣ 0 k ⟩ K|x\rangle|0^k\rangle=\omega^{\phi(x)}|x\rangle|0^k\rangle K ∣ x ⟩ ∣ 0 k ⟩ = ω ϕ ( x ) ∣ x ⟩ ∣ 0 k ⟩ for all x x x , implementing the diagonal level-three gate U U U . Then its T T T -count satisfies t ≥ δ ( U ) t \ge\delta(U) t ≥ δ ( U ) .
Proof. Write the input as z = ( x , c ) ∈ F 2 n + k z=(x,c)\in\mathbb{F}_2^{n+k} z = ( x , c ) ∈ F 2 n + k . At every point of K K K each wire carries a parity y ⋅ z y\cdot z y ⋅ z of the input, and a T T T or T † T^\dagger T † on that wire contributes ± 1 \pm1 ± 1 to the coefficient of y y y . Hence K ∣ z ⟩ = ω Φ ( z ) ∣ L z ⟩ K|z\rangle=\omega^{\Phi(z)}|Lz\rangle K ∣ z ⟩ = ω Φ ( z ) ∣ L z ⟩ , where L ∈ G L ( n + k , F 2 ) L\in GL(n+k,\mathbb{F}_2) L ∈ G L ( n + k , F 2 ) is the permutation applied by the CNOT gates and Φ ( z ) = ∑ y α y ( y ⋅ z ) m o d 8 \Phi(z)=\sum_y\alpha_y(y\cdot z)\bmod8 Φ ( z ) = ∑ y α y ( y ⋅ z ) mod 8 is a phase polynomial ((8) ) on n + k n+k n + k qubits with at most t t t odd coefficients. The hypothesis on K K K gives L ( x , 0 ) = ( x , 0 ) L(x,0)=(x,0) L ( x , 0 ) = ( x , 0 ) and Φ ( x , 0 ) ≡ ϕ ( x ) ( m o d 8 ) \Phi(x,0)\equiv\phi(x)\pmod8 Φ ( x , 0 ) ≡ ϕ ( x ) ( mod 8 ) for every x x x . Thus L ( x , c ) = ( x + L 12 c , L 22 c ) L(x,c)=(x+L_{12}c,L_{22}c) L ( x , c ) = ( x + L 12 c , L 22 c ) for some matrices L 12 , L 22 L_{12},L_{22} L 12 , L 22 , and ϕ \phi ϕ is the phase polynomial of K K K restricted to the ancillas in 0. Setting c = 0 c=0 c = 0 sends each parity y ⋅ z y\cdot z y ⋅ z to ( y ∩ [ n ] ) ⋅ x (y\cap[n])\cdot x ( y ∩ [ n ]) ⋅ x , as in the proof of Lemma 11. Parities that coincide merge and parities that vanish drop out, so the restricted list is a representation of U U U with at most t t t odd coefficients. Hence δ ( U ) ≤ t \delta(U)\le t δ ( U ) ≤ t .
The Amy–Mosca correspondence and the moment reformulation
All bounds in the later appendices are statements about a few low-order parities of the odd parity set, and this subsection shows why those parities determine the gate. Reducing the coefficients in ((8) ) modulo 2 gives the residue s = Res 2 ( U ) = ( α y m o d 2 ) y ∈ F 2 2 n − 1 s=\operatorname{Res}_2(U)=(\alpha_y\bmod2)_{y\in\mathbb{F}_2^{2^n-1}} s = Res 2 ( U ) = ( α y mod 2 ) y ∈ F 2 2 n − 1 , indexed by nonzero parities, which records the parities that carry an odd phase. Amy and Mosca [11 ] proved that two representations implement the same gate up to a diagonal Clifford if and only if their residues differ by a codeword of RM ( n − 4 , n ) ∗ \operatorname{RM}(n-4,n)^* RM ( n − 4 , n ) ∗ . Hence
δ ( U ) = dist ( Res 2 ( U ) , RM ( n − 4 , n ) ∗ ) = min c ∈ RM ( n − 4 , n ) ∗ wt ( Res 2 ( U ) ⊕ c ) . (9) \delta(U)=\operatorname{dist}\left(\operatorname{Res}_2(U),\operatorname{RM}(n-4,n)^*\right)=\min_{c\in\operatorname{RM}(n-4,n)^*}\operatorname{wt}\left(\operatorname{Res}_2(U)\oplus c\right). \tag*{(9)} δ ( U ) = dist ( Res 2 ( U ) , RM ( n − 4 , n ) ∗ ) = c ∈ RM ( n − 4 , n ) ∗ min wt ( Res 2 ( U ) ⊕ c ) . (9)
The degree n − 4 n-4 n − 4 has a short explanation. Expand each parity over Z \mathbb{Z} Z by inclusion–exclusion,
y ⋅ x = ∑ ∅ ≠ A ⊆ y ( − 2 ) ∣ A ∣ − 1 ∏ i ∈ A x i . y\cdot x=\sum_{\varnothing\ne A\subseteq y}(-2)^{|A|-1}\prod_{i\in A}x_i. y ⋅ x = ∅ = A ⊆ y ∑ ( − 2 ) ∣ A ∣ − 1 i ∈ A ∏ x i .
Modulo 8 the terms with ∣ A ∣ ≥ 4 |A|\ge4 ∣ A ∣ ≥ 4 vanish, so a parity contributes to the monomial ∏ i ∈ A x i \prod_{i\in A}x_i ∏ i ∈ A x i only for ∣ A ∣ ≤ 3 |A|\le3 ∣ A ∣ ≤ 3 , with weight 1, − 2 -2 − 2 or 4. A set S S S of parities, each with coefficient 1, therefore gives the phase ∑ 1 ≤ ∣ A ∣ ≤ 3 ( − 2 ) ∣ A ∣ − 1 N A ∏ i ∈ A x i \sum_{1\le|A|\le3}(-2)^{|A|-1}N_A\prod_{i\in A}x_i ∑ 1 ≤ ∣ A ∣ ≤ 3 ( − 2 ) ∣ A ∣ − 1 N A ∏ i ∈ A x i , where N A N_A N A counts the parities in S S S that contain A A A . This phase is a diagonal Clifford, a sum of multiples of 2 x i 2x_i 2 x i and of 4 x i x j 4x_ix_j 4 x i x j , exactly when every N A N_A N A with 1 ≤ ∣ A ∣ ≤ 3 1\le|A|\le3 1 ≤ ∣ A ∣ ≤ 3 is even. In other words, the indicator of S S S must be orthogonal to every monomial ∏ i ∈ A y i \prod_{i\in A}y_i ∏ i ∈ A y i with 1 ≤ ∣ A ∣ ≤ 3 1\le|A|\le3 1 ≤ ∣ A ∣ ≤ 3 . These monomials span RM ( 3 , n ) \operatorname{RM}(3,n) RM ( 3 , n ) shortened at y = 0 y=0 y = 0 , whose dual is RM ( n − 4 , n ) ∗ \operatorname{RM}(n-4,n)^* RM ( n − 4 , n ) ∗ . For CCZ the cubic monomial is the one that fails. Among the seven parities of (2) only x 1 ⊕ x 2 ⊕ x 3 x_1\oplus x_2\oplus x_3 x 1 ⊕ x 2 ⊕ x 3 contains { 1 , 2 , 3 } \{1,2,3\} { 1 , 2 , 3 } , while every singleton and every pair lies in an even number of them.
Definition 14 (moments). For a set S ⊆ F 2 n ∖ { 0 } S\subseteq\mathbb{F}_2^n\setminus\{0\} S ⊆ F 2 n ∖ { 0 } of parities and A ⊆ [ n ] A\subseteq[n] A ⊆ [ n ] , the moment is
M A ( S ) = ∣ { y ∈ S : A ⊆ y } ∣ m o d 2. M_A(S)=\left|\{y\in S:A\subseteq y\}\right|\bmod2. M A ( S ) = ∣ { y ∈ S : A ⊆ y } ∣ mod 2. For a vector s ∈ F 2 2 n − 1 s\in\mathbb{F}_2^{2^n-1} s ∈ F 2 2 n − 1 , M A ( s ) M_A(s) M A ( s ) is the moment of its support.
The moment M A M_A M A is the syndrome coordinate of S S S against the monomial ∏ i ∈ A y i \prod_{i\in A}y_i ∏ i ∈ A y i , so the derivation above gives the following operational form of (9) .
Fact 15 (moment form of Amy–Mosca). For 1 ≤ ∣ A ∣ ≤ 3 1\le|A|\le3 1 ≤ ∣ A ∣ ≤ 3 the moment M A ( s ) M_A(s) M A ( s ) takes the same value M A ( U ) M_A(U) M A ( U ) on every residue s s s of U U U . Two residues lie in the same coset of RM ( n − 4 , n ) ∗ \operatorname{RM}(n-4,n)^* RM ( n − 4 , n ) ∗ if and only if these moments agree, and
δ ( U ) = min { ∣ S ∣ : M A ( S ) = M A ( U ) for all 1 ≤ ∣ A ∣ ≤ 3 } . \delta(U)=\min\{|S|:M_A(S)=M_A(U)\text{ for all }1\le|A|\le3\}. δ ( U ) = min { ∣ S ∣ : M A ( S ) = M A ( U ) for all 1 ≤ ∣ A ∣ ≤ 3 } . The moment M ∅ M_{\varnothing} M ∅ and the moments with ∣ A ∣ ≥ 4 |A|\ge4 ∣ A ∣ ≥ 4 are unconstrained.
We write M A M_A M A for M A ( U ) M_A(U) M A ( U ) when the gate is clear. In the language of Heyfron and Campbell [5 ] the moments with ∣ A ∣ ≤ 3 |A|\le3 ∣ A ∣ ≤ 3 are the entries of the signature tensor, and δ ( U ) \delta(U) δ ( U ) is its symmetric rank. The isotropy floor of Appendix § 7 is computed from two objects built out of these moments. The first uses only the order-three moments.
Definition 16 (pure-cubic gate, cubic moment form, radical). A gate is pure-cubic if M A = 0 M_A=0 M A = 0 for all 1 ≤ ∣ A ∣ ≤ 2 1\le|A|\le2 1 ≤ ∣ A ∣ ≤ 2 . The cubic moment form of a gate is the symmetric tensor with T a b c = M { a , b , c } T_{abc}=M_{\{a,b,c\}} T ab c = M { a , b , c } for distinct a , b , c a,b,c a , b , c and T a b c = 0 T_{abc}=0 T ab c = 0 otherwise. For w ∈ F 2 n w\in\mathbb{F}_2^n w ∈ F 2 n the matrix T ( w ) q r = ∑ a w a T a q r T(w)_{qr}=\sum_a w_aT_{aqr} T ( w ) q r = ∑ a w a T a q r is the slice of T T T in direction w w w . The radical of T T T is the set of directions whose slice vanishes,
R = { w ∈ F 2 n : ∑ a w a T a q r = 0 ∀ q , r } , d = dim R , R=\left\{w\in\mathbb{F}_2^n:\sum_a w_aT_{aqr}=0\ \forall q,r\right\},\qquad d=\dim R, R = { w ∈ F 2 n : a ∑ w a T a q r = 0 ∀ q , r } , d = dim R , and T T T is non-degenerate when d = 0 d=0 d = 0 .
For CCZ every singleton and every pair lies in an even number of the seven parities of (2), so CCZ is pure-cubic, and T 123 = 1 T_{123}=1 T 123 = 1 is the only nonzero entry up to symmetry. The slice T ( w ) T(w) T ( w ) has entries w 3 , w 2 , w 1 w_3,w_2,w_1 w 3 , w 2 , w 1 in positions { 1 , 2 } \{1,2\} { 1 , 2 } , { 1 , 3 } \{1,3\} { 1 , 3 } , { 2 , 3 } \{2,3\} { 2 , 3 } and vanishes only at w = 0 w=0 w = 0 , so R = { 0 } R=\{0\} R = { 0 } and d = 0 d=0 d = 0 (§ 2.1 ). The same gate on four qubits, with the fourth idle, has T ( e 4 ) = 0 T(e_4)=0 T ( e 4 ) = 0 , so R = ⟨ e 4 ⟩ R=\langle e_4\rangle R = ⟨ e 4 ⟩ and d = 1 d=1 d = 1 .
The second object keeps the moments of orders one and two as well. They are placed in a matrix, and at the coincident indices of a three-index tensor.
Definition 17 (quadratic moment matrix, full moment tensor). The quadratic moment matrix of a gate is Q ∈ F 2 n × n Q \in\mathbb{F}_2^{n \times n} Q ∈ F 2 n × n with Q a b = M { a , b } Q_{ab}=M_{\{a,b\}} Q ab = M { a , b } for a ≠ b a\ne b a = b and Q a a = M { a } Q_{aa}=M_{\{a\}} Q aa = M { a } , of rank r = rank F 2 Q r=\operatorname{rank}_{\mathbb{F}_2}Q r = rank F 2 Q . The gate is a pure quadratic if M A = 0 M_A=0 M A = 0 for all ∣ A ∣ ∈ { 1 , 3 } |A|\in\{1,3\} ∣ A ∣ ∈ { 1 , 3 } . The full moment tensor has entries M { a , p , q } M_{\{a,p,q\}} M { a , p , q } for all a , p , q ∈ [ n ] a,p,q\in[n] a , p , q ∈ [ n ] , where coincident indices give moments of order one or two. Its radical is
R ∗ = { w ∈ F 2 n : ∑ a w a M { a , p , q } = 0 ∀ p , q } , d ∗ = dim R ∗ . R^*=\left\{w\in\mathbb{F}_2^n:\sum_a w_aM_{\{a,p,q\}}=0\ \forall p,q\right\},\qquad d^*=\dim R^*. R ∗ = { w ∈ F 2 n : a ∑ w a M { a , p , q } = 0 ∀ p , q } , d ∗ = dim R ∗ .
For CS the identity 2 x 1 x 2 = x 1 + x 2 − ( x 1 ⊕ x 2 ) 2x_1x_2=x_1+x_2-(x_1\oplus x_2) 2 x 1 x 2 = x 1 + x 2 − ( x 1 ⊕ x 2 ) gives the residue on the parities { 1 } \{1\} { 1 } , { 2 } \{2\} { 2 } and { 1 , 2 } \{1,2\} { 1 , 2 } . Each singleton lies in two of them and the pair in one, so M { 1 } = M { 2 } = 0 M_{\{1\}}=M_{\{2\}}=0 M { 1 } = M { 2 } = 0 and M { 1 , 2 } = 1 M_{\{1,2\}}=1 M { 1 , 2 } = 1 . The gate is a pure quadratic with
Q = ( 0 1 1 0 ) , r = 2. Q=\begin{pmatrix}0&1\\1&0\end{pmatrix},\qquad r=2. Q = ( 0 1 1 0 ) , r = 2.
There are no triples on two qubits, so T = 0 T=0 T = 0 and d = 2 d=2 d = 2 . The full tensor sees Q Q Q through its coincident indices. Taking p = q = 1 p=q=1 p = q = 1 and then p = q = 2 p=q=2 p = q = 2 in the definition of R ∗ R^* R ∗ forces w 2 = 0 w_2=0 w 2 = 0 and w 1 = 0 w_1=0 w 1 = 0 , so R ∗ = { 0 } R^*=\{0\} R ∗ = { 0 } and d ∗ = 0 d^*=0 d ∗ = 0 . The two radicals can therefore differ by the whole space.
Given the moments, computing d d d , d ∗ d^* d ∗ and r r r is Gaussian elimination on at most n 2 n^2 n 2 rows of length n n n . This takes O ( n 3 ) O(n^3) O ( n 3 ) operations on n n n -bit words, or O ( n 4 ) O(n^4) O ( n 4 ) bit operations. On a pure-cubic gate Q = 0 Q=0 Q = 0 , r = 0 r=0 r = 0 and R ∗ = R R^*=R R ∗ = R .
The pure-cubic locus is invariant under CNOT relabelling, which the exact counts of Appendix § 8 use.
Stabilizer nullity and the shift group
Stabilizer nullity is the standard magic monotone against which the isotropy floor is compared in Appendix § 7 . For a ∈ F 2 n a\in\mathbb{F}_2^n a ∈ F 2 n write X a = ⨂ i X a i X^a=\bigotimes_iX^{a_i} X a = ⨂ i X a i . The shift group of a diagonal level-three gate U U U is
A = { a ∈ F 2 n : X a U X a = λ U P for some phase λ and diagonal Pauli P } . \mathcal{A}=\left\{a\in\mathbb{F}_2^n:X^aUX^a=\lambda UP\text{ for some phase }\lambda\text{ and diagonal Pauli }P\right\}. A = { a ∈ F 2 n : X a U X a = λ U P for some phase λ and diagonal Pauli P } .
Since X a U X a ∣ x ⟩ = ω ϕ ( x ⊕ a ) ∣ x ⟩ X^aUX^a|x\rangle=\omega^{\phi(x\oplus a)}|x\rangle X a U X a ∣ x ⟩ = ω ϕ ( x ⊕ a ) ∣ x ⟩ , a direction a a a lies in A \mathcal{A} A if and only if
ϕ ( x ⊕ a ) − ϕ ( x ) ≡ c + 4 ℓ ( x ) ( m o d 8 ) for all x , \phi(x\oplus a)-\phi(x)\equiv c+4\ell(x)\pmod8\qquad\text{for all }x, ϕ ( x ⊕ a ) − ϕ ( x ) ≡ c + 4 ℓ ( x ) ( mod 8 ) for all x ,
for some constant c ∈ Z 8 c\in\mathbb{Z}_8 c ∈ Z 8 and some affine function ℓ : F 2 n → F 2 \ell:\mathbb{F}_2^n\to\mathbb{F}_2 ℓ : F 2 n → F 2 . Conjugating a diagonal Pauli by X b X^b X b gives a diagonal Pauli up to sign, so A \mathcal{A} A is a subgroup of F 2 n \mathbb{F}_2^n F 2 n . For a diagonal gate the unitary stabilizer nullity of Jiang and Wang [3 ] (see also [21 ] ) is
ν = n − dim A = n − log 2 ∣ A ∣ , \nu=n-\dim\mathcal{A}=n-\log_2|\mathcal{A}|, ν = n − dim A = n − log 2 ∣ A ∣ ,
and we take this as its definition. Proposition 28 identifies A \mathcal{A} A with R ∗ R^* R ∗ .
For CCZ the phase is ϕ = 4 f \phi= 4f ϕ = 4 f with f = x 1 x 2 x 3 f = x_1x_2x_3 f = x 1 x 2 x 3 . Since 4 z m o d 8 4z \bmod8 4 z mod 8 depends only on z m o d 2 z \bmod2 z mod 2 , the difference ϕ ( x ⊕ a ) − ϕ ( x ) \phi(x \oplus a) - \phi(x) ϕ ( x ⊕ a ) − ϕ ( x ) is 4 times the derivative f ( x ⊕ a ) ⊕ f ( x ) f(x \oplus a) \oplus f(x) f ( x ⊕ a ) ⊕ f ( x ) , whose quadratic part a 1 x 2 x 3 ⊕ a 2 x 1 x 3 ⊕ a 3 x 1 x 2 a_1x_2x_3 \oplus a_2x_1x_3 \oplus a_3x_1x_2 a 1 x 2 x 3 ⊕ a 2 x 1 x 3 ⊕ a 3 x 1 x 2 is nonzero for every a ≠ 0 a \ne0 a = 0 . So A = { 0 } A = \{0\} A = { 0 } and ν ( C C Z ) = 3 \nu(\mathrm{CCZ}) = 3 ν ( CCZ ) = 3 . For T T T the difference ϕ ( x ⊕ 1 ) − ϕ ( x ) = 1 − 2 x \phi(x \oplus1) - \phi(x) = 1 - 2x ϕ ( x ⊕ 1 ) − ϕ ( x ) = 1 − 2 x is not of the form c + 4 ℓ ( x ) c + 4\ell(x) c + 4 ℓ ( x ) , so ν ( T ) = 1 \nu(T) = 1 ν ( T ) = 1 . For CS the phase is ϕ = 2 x 1 x 2 \phi= 2x_1x_2 ϕ = 2 x 1 x 2 . The shifts e 1 e_1 e 1 , e 2 e_2 e 2 and e 1 ⊕ e 2 e_1 \oplus e_2 e 1 ⊕ e 2 give the differences 2 x 2 − 4 x 1 x 2 2x_2 - 4x_1x_2 2 x 2 − 4 x 1 x 2 , 2 x 1 − 4 x 1 x 2 2x_1 - 4x_1x_2 2 x 1 − 4 x 1 x 2 and 2 − 2 x 1 − 2 x 2 2 - 2x_1 - 2x_2 2 − 2 x 1 − 2 x 2 . None has the form c + 4 ℓ ( x ) c + 4\ell(x) c + 4 ℓ ( x ) , so ν ( C S ) = 2 \nu(\mathrm{CS}) = 2 ν ( CS ) = 2 .
The isotropy floor
This appendix proves the bounds summarized in Figure 1 (PDF p. 6) , whose single-gate case is worked in § 2.1 . The floor is proved first for pure-cubic gates (§B.1) and then for every diagonal level-three gate (§B.2), and the radical it depends on is identified with the stabilizer nullity (§B.3). Rigidity below weight eight (§B.4) and a ceiling computable in O ( n 3 ) O(n^3) O ( n 3 ) (§B.5) follow.
The notation is that of Appendix A. For a diagonal level-three gate U U U we write M A M_A M A for the moment of any residue of U U U , which by Fact 15 depends only on U U U . Fix a representation of U U U with odd parities y 1 , … , y t y_1,\ldots,y_t y 1 , … , y t . Let Y ∈ F 2 t × n Y \in\mathbb{F}_2^{t \times n} Y ∈ F 2 t × n be the matrix whose rows are the y j y_j y j , and let c a ∈ F 2 t c_a \in\mathbb{F}_2^t c a ∈ F 2 t be its a a a -th column, the indicator of which parities contain qubit a a a . The key identities are
⟨ c a , c b ⟩ = ∑ j ( y j ) a ( y j ) b = M { a , b } , ⟨ c a , c a ⟩ = ∑ j ( y j ) a = M { a } , (10) \langle c_a,c_b\rangle= \sum_j (y_j)_a(y_j)_b = M_{\{a,b\}}, \qquad\langle c_a,c_a\rangle= \sum_j (y_j)_a = M_{\{a\}}, \tag*{(10)} ⟨ c a , c b ⟩ = j ∑ ( y j ) a ( y j ) b = M { a , b } , ⟨ c a , c a ⟩ = j ∑ ( y j ) a = M { a } , (10)
and, for the triple products with a , b , q a,b,q a , b , q distinct,
∑ j ( c a ) j ( c b ) j ( c q ) j = M { a , b , q } , (11) \sum_j (c_a)_j(c_b)_j(c_q)_j = M_{\{a,b,q\}}, \tag*{(11)} j ∑ ( c a ) j ( c b ) j ( c q ) j = M { a , b , q } , (11)
which equals T a b q T_{abq} T ab q on the pure-cubic locus.
The pure-cubic case
This subsection is the warm-up of § 2.1 with CCZ replaced by an arbitrary pure-cubic gate. The steps are the same. The columns of Y Y Y span a self-orthogonal code (Lemma 19 ), the kernel of Y Y Y lies in the radical (Lemma 20 ), and the all-ones vector supplies the extra one (Lemma 21 ). The lower bound compares the dimension of the column code with the radical of the cubic moment form T T T .
Lemma 19 (isotropic columns). For a pure-cubic gate, every representation has t ≥ 2 rank Y t \ge2\operatorname{rank} Y t ≥ 2 rank Y .
Proof. By (10), a pure-cubic gate has ⟨ c a , c b ⟩ = M { a , b } = 0 \langle c_a,c_b\rangle= M_{\{a,b\}} = 0 ⟨ c a , c b ⟩ = M { a , b } = 0 for a ≠ b a \ne b a = b and ⟨ c a , c a ⟩ = M { a } = 0 \langle c_a,c_a\rangle= M_{\{a\}} = 0 ⟨ c a , c a ⟩ = M { a } = 0 . Hence C = span { c a } C = \operatorname{span}\{c_a\} C = span { c a } is totally isotropic, and Lemma 7 gives dim C ≤ t / 2 \dim C \le t/2 dim C ≤ t /2 . Since column rank equals row rank, rank Y = dim C ≤ t / 2 \operatorname{rank} Y = \dim C \le t/2 rank Y = dim C ≤ t /2 .
The moments bound the rank of Y Y Y from below.
Lemma 20 (rank versus radical). Let y 1 , … , y t y_1,\ldots,y_t y 1 , … , y t be the odd parities of a representation of a diagonal level-three gate U U U , with matrix Y Y Y and columns c a c_a c a as above. Then ker Y ⊆ R ∗ \ker Y \subseteq R^* ker Y ⊆ R ∗ , and hence rank Y ≥ n − d ∗ \operatorname{rank} Y \ge n-d^* rank Y ≥ n − d ∗ . On a pure-cubic gate R ∗ = R R^* = R R ∗ = R , so rank Y ≥ n − d \operatorname{rank} Y \ge n-d rank Y ≥ n − d .
Proof. For any indices a , p , q a,p,q a , p , q , distinct or not, the sum ∑ j ( c a ) j ( c p ) j ( c q ) j \sum_j(c_a)_j(c_p)_j(c_q)_j ∑ j ( c a ) j ( c p ) j ( c q ) j counts the y j y_j y j that contain the set { a , p , q } \{a,p,q\} { a , p , q } , since ( c a ) j 2 = ( c a ) j (c_a)_j^2 = (c_a)_j ( c a ) j 2 = ( c a ) j . The y j y_j y j form a residue of U U U , so by Fact 15 this count is M { a , p , q } M_{\{a,p,q\}} M { a , p , q } modulo 2. If Y w = 0 Yw = 0 Y w = 0 then ∑ a w a c a = 0 \sum_a w_ac_a = 0 ∑ a w a c a = 0 in F 2 t \mathbb{F}_2^t F 2 t , and
∑ a w a M { a , p , q } = ∑ j ( c p ) j ( c q ) j ( ∑ a w a ( c a ) j ) = 0. (12) \sum_a w_a M_{\{a,p,q\}} = \sum_j(c_p)_j(c_q)_j\left(\sum_a w_a(c_a)_j\right) = 0. \tag*{(12)} a ∑ w a M { a , p , q } = j ∑ ( c p ) j ( c q ) j ( a ∑ w a ( c a ) j ) = 0. (12)
This is the condition w ∈ R ∗ w \in R^* w ∈ R ∗ of Definition 17. Hence ker Y ⊆ R ∗ \ker Y \subseteq R^* ker Y ⊆ R ∗ , and rank Y = n − dim ker Y ≥ n − d ∗ \operatorname{rank} Y = n-\dim\ker Y \ge n-d^* rank Y = n − dim ker Y ≥ n − d ∗ . On a pure-cubic gate the moments of order one and two vanish, so the coincident-index entries of the full tensor are zero and R ∗ = R R^* = R R ∗ = R .
In the non-degenerate case a parity refinement adds one to the resulting bound, as it did for CCZ in § 2.1 .
Lemma 21 (radical contraction of the all-ones vector). Let C = span { c a } ⊆ F 2 t \mathcal{C} = \operatorname{span}\{c_a\} \subseteq\mathbb{F}_2^t C = span { c a } ⊆ F 2 t for a pure-cubic gate , and suppose the all-ones vector 1 ∈ F 2 t \mathbf{1} \in\mathbb{F}_2^t 1 ∈ F 2 t lies in C \mathcal{C} C , say 1 = ∑ a ∈ S c a \mathbf{1} = \sum_{a \in S} c_a 1 = ∑ a ∈ S c a with S ⊆ [ n ] S \subseteq[n] S ⊆ [ n ] . Then 1 S ∈ R \mathbf{1}_S \in R 1 S ∈ R .
That is, ∑ a ∈ S T p q a = 0 \sum_{a \in S} T_{pqa} = 0 ∑ a ∈ S T pq a = 0 for all p , q ∈ [ n ] p,q \in[n] p , q ∈ [ n ] .
Proof. For p = q p=q p = q every entry T p p a T_{ppa} T pp a is 0 by definition, so there is nothing to prove. Fix p ≠ q p \ne q p = q . Because 1 \mathbf{1} 1 is all ones, ( c p ) j ( c q ) j = ( c p ) j ( c q ) j 1 j (c_p)_j(c_q)_j = (c_p)_j(c_q)_j1_j ( c p ) j ( c q ) j = ( c p ) j ( c q ) j 1 j for each coordinate j j j . Substituting 1 = ∑ a ∈ S c a \mathbf{1} = \sum_{a \in S} c_a 1 = ∑ a ∈ S c a gives
∑ j ( c p ) j ( c q ) j = ∑ j ( c p ) j ( c q ) j ( ∑ a ∈ S c a ) j = ∑ a ∈ S ∑ j ( c p ) j ( c q ) j ( c a ) j . \sum_j (c_p)_j(c_q)_j = \sum_j (c_p)_j(c_q)_j\left(\sum_{a \in S}c_a\right)_j = \sum_{a \in S}\sum_j (c_p)_j(c_q)_j(c_a)_j. j ∑ ( c p ) j ( c q ) j = j ∑ ( c p ) j ( c q ) j ( a ∈ S ∑ c a ) j = a ∈ S ∑ j ∑ ( c p ) j ( c q ) j ( c a ) j .
The left-hand side is ⟨ c p , c q ⟩ = M { p , q } \langle c_p,c_q\rangle= M_{\{p,q\}} ⟨ c p , c q ⟩ = M { p , q } , which is 0 because the gate is pure-cubic. On the right, an index a ∈ S a \in S a ∈ S distinct from p p p and q q q contributes M { p , q , a } = T p q a M_{\{p,q,a\}} = T_{pqa} M { p , q , a } = T pq a by (11). An index a ∈ { p , q } a \in\{p,q\} a ∈ { p , q } contributes ∑ j ( c p ) j ( c q ) j = M { p , q } = 0 \sum_j(c_p)_j(c_q)_j = M_{\{p,q\}} = 0 ∑ j ( c p ) j ( c q ) j = M { p , q } = 0 , which agrees with T p q a = 0 T_{pqa}=0 T pq a = 0 at coincident indices. Hence ∑ a ∈ S T p q a = 0 \sum_{a \in S}T_{pqa}=0 ∑ a ∈ S T pq a = 0 , so 1 S \mathbf{1}_S 1 S contracts T T T to zero, which is the condition 1 S ∈ R \mathbf{1}_S \in R 1 S ∈ R .
Theorem 22 (cubic lower bound). Let U U U be a pure-cubic gate on n n n qubits whose cubic tensor has radical dimension d d d . Then δ ( U ) ≥ 2 ( n − d ) \delta(U) \ge2(n-d) δ ( U ) ≥ 2 ( n − d ) , and δ ( U ) ≥ 2 n + 1 \delta(U) \ge2n+1 δ ( U ) ≥ 2 n + 1 if d = 0 d=0 d = 0 .
Proof. Fix a representation and let ρ = rank Y \rho= \operatorname{rank} Y ρ = rank Y , the dimension of the row space span { y j } \operatorname{span}\{y_j\} span { y j } . Lemma 20 gives ρ ≥ n − d \rho\ge n-d ρ ≥ n − d , and with Lemma 19, t ≥ 2 ρ ≥ 2 ( n − d ) t \ge2\rho\ge2(n-d) t ≥ 2 ρ ≥ 2 ( n − d ) .
For the extra one, suppose d = 0 d=0 d = 0 and, for contradiction, that some representation has t = 2 n t=2n t = 2 n . Then dim C = ρ = n = t / 2 \dim\mathcal{C}=\rho=n=t/2 dim C = ρ = n = t /2 , so by Lemma 7 the inclusion C ⊆ C ⊥ \mathcal{C} \subseteq\mathcal{C}^{\perp} C ⊆ C ⊥ is an equality and C \mathcal{C} C is maximal isotropic. The all-ones vector satisfies ⟨ 1 , c a ⟩ = M { a } = 0 \langle\mathbf{1},c_a\rangle= M_{\{a\}}=0 ⟨ 1 , c a ⟩ = M { a } = 0 for every a a a , so 1 ∈ C ⊥ = C \mathbf{1} \in\mathcal{C}^{\perp}=\mathcal{C} 1 ∈ C ⊥ = C . Write 1 = ∑ a ∈ S c a \mathbf{1}=\sum_{a \in S}c_a 1 = ∑ a ∈ S c a with S S S nonempty (nonempty because 1 ≠ 0 \mathbf{1}\ne0 1 = 0 for t ≥ 1 t\ge1 t ≥ 1 ). By Lemma 21, 1 S ∈ R = { 0 } \mathbf{1}_S \in R=\{0\} 1 S ∈ R = { 0 } , forcing S = ∅ S=\varnothing S = ∅ , a contradiction. Hence no representation has t = 2 n t=2n t = 2 n , and since t ≥ 2 n t\ge2n t ≥ 2 n already, every representation has t ≥ 2 n + 1 t\ge2n+1 t ≥ 2 n + 1 . Taking the minimum, δ ( U ) ≥ 2 n + 1 \delta(U)\ge2n+1 δ ( U ) ≥ 2 n + 1 .
The extra one survives a nonzero radical. The radical directions split off as idle qubits, and the non-degenerate case applies to what remains.
Corollary 23 (the extra one for every non-Clifford pure-cubic gate). Let U U U be a pure-cubic gate on n n n qubits whose cubic tensor is nonzero, so that d < n d<n d < n . Then δ ( U ) ≥ 2 ( n − d ) + 1 \delta(U) \ge2(n-d)+1 δ ( U ) ≥ 2 ( n − d ) + 1 .
Proof. Align R R R to the last d d d coordinates by a CNOT relabelling (an invertible F 2 \mathbb{F}_2 F 2 -linear change of the x x x -variables, which preserves δ \delta δ by Lemma 10, preserves d d d and transforms the moments covariantly). Let f f f be the cubic form with tensor T T T , so that U U U has phase 4 f 4f 4 f up to a diagonal Clifford factor. Since T a p q = 0 T_{apq}=0 T a pq = 0 whenever any index lies in R R R , the form f f f has no monomial meeting a radical coordinate. Up to a diagonal Clifford factor, which changes neither δ \delta δ nor d d d , it follows that U = U ′ ⊗ I d U=U'\otimes I_d U = U ′ ⊗ I d with U ′ U' U ′ a non-degenerate pure-cubic gate on the first n − d n-d n − d qubits. Then δ ( U ) = δ ( U ′ ) \delta(U)=\delta(U') δ ( U ) = δ ( U ′ ) . A representation of U ′ U' U ′ is one of U U U , which gives ≤ \le ≤ . Restricting any representation of U U U by setting the d d d radical inputs to 0 (Lemma 11) turns each parity into a parity of the first n − d n-d n − d variables or a constant, without increasing the odd count, which gives ≥ \ge ≥ . Hence δ ( U ) = δ ( U ′ ) ≥ 2 ( n − d ) + 1 \delta(U)=\delta(U')\ge2(n-d)+1 δ ( U ) = δ ( U ′ ) ≥ 2 ( n − d ) + 1 by the non-degenerate case of Theorem 22.
Remark 24 (prior work on the pure-cubic floor). That a pure-cubic synthesis matrix has columns of even weight and even pairwise overlap is Campbell and Howard’s Lemma 3 with vanishing quadratic matrix [2 ] , and it is also implicit in the triorthogonal codes of Bravyi and Haah [32 ] . The rank step, Lemma 20, is the standard flattening bound on the symmetric rank of Heyfron and Campbell’s signature tensor [5 ] , and combining it with isotropy doubles it for every pure-cubic gate. On controlled unitaries this recovers part of [2 Thm. 5] . The extra one comes from the all-ones vector (Lemma 21), in the spirit of the parity step of their converse [2 App. C] .
The general case
For an arbitrary gate the column Gram matrix is the quadratic moment matrix Q Q Q , of rank r r r , and the columns no longer span an isotropic code. Restricting to the radical of Q Q Q would lose 2 r 2r 2 r . The proof below loses only r r r , because the radical of the form on the column code is isotropic and has codimension r r r there.
Theorem 25 (general lower bound). Let U U U be a diagonal level-three gate on n n n qubits, with r r r the rank of its quadratic moment matrix and d ∗ d^* d ∗ the dimension of the radical R ∗ R^* R ∗ of its full moment tensor (§A.4). Then
δ ( U ) ≥ 2 ( n − d ∗ ) − r . \delta(U) \ge2(n-d^*)-r. δ ( U ) ≥ 2 ( n − d ∗ ) − r .
Proof. Fix a representation, put C = span { c a } C=\operatorname{span}\{c_a\} C = span { c a } and ρ = dim C = rank Y \rho=\dim C=\operatorname{rank}Y ρ = dim C = rank Y . By (10) the Gram matrix of the columns is Q Q Q , so by Lemma 8 the radical C ∩ C ⊥ C\cap C^\perp C ∩ C ⊥ of the dot product restricted to C C C has dimension ρ − r \rho-r ρ − r . It lies in C ⊥ C^\perp C ⊥ , which has dimension t − ρ t-\rho t − ρ because the dot product on F 2 t \mathbb{F}_2^t F 2 t is non-degenerate. Hence ρ − r ≤ t − ρ \rho-r\le t-\rho ρ − r ≤ t − ρ , that is t ≥ 2 ρ − r t\ge2\rho-r t ≥ 2 ρ − r . Lemma 20 gives ρ ≥ n − d ∗ \rho\ge n-d^* ρ ≥ n − d ∗ , and so t ≥ 2 ( n − d ∗ ) − r t\ge2(n-d^*)-r t ≥ 2 ( n − d ∗ ) − r . □ \square □
For CS the residue { 1 } \{1\} { 1 } , { 2 } \{2\} { 2 } , { 1 , 2 } \{1,2\} { 1 , 2 } has columns c 1 = ( 1 , 0 , 1 ) c_1=(1,0,1) c 1 = ( 1 , 0 , 1 ) and c 2 = ( 0 , 1 , 1 ) c_2=(0,1,1) c 2 = ( 0 , 1 , 1 ) , so ρ = r = 2 \rho=r=2 ρ = r = 2 and d ∗ = 0 d^*=0 d ∗ = 0 . The theorem gives t ≥ 2 t\ge2 t ≥ 2 , one below δ ( C S ) = 3 \delta(\mathrm{CS})=3 δ ( CS ) = 3 .
For a pure-cubic gate the order-≤ 2 \le2 ≤ 2 moments vanish, so r = 0 r=0 r = 0 and d ∗ = d d^*=d d ∗ = d , and Theorem 25 reduces to the first part of Theorem 22. Off the pure-cubic locus the full-tensor radical R ∗ R^* R ∗ is needed, as the next example shows.
Example 26 (the cubic radical alone is not enough). Take the three-qubit gate with M { 0 , 2 } = M { 1 , 2 } = M { 0 , 1 , 2 } = 1 M_{\{0,2\}}=M_{\{1,2\}}=M_{\{0,1,2\}}=1 M { 0 , 2 } = M { 1 , 2 } = M { 0 , 1 , 2 } = 1 and all other moments 0. Its cubic tensor has the single entry T 012 = 1 T_{012}=1 T 012 = 1 , so d = 0 d=0 d = 0 . The quadratic matrix has rank r = 2 r=2 r = 2 and kernel ⟨ e 0 ⊕ e 1 ⟩ \langle e_0\oplus e_1\rangle ⟨ e 0 ⊕ e 1 ⟩ , and this vector also annihilates the cubic part of the full tensor, so R ∗ = ⟨ e 0 ⊕ e 1 ⟩ R^*=\langle e_0\oplus e_1\rangle R ∗ = ⟨ e 0 ⊕ e 1 ⟩ and d ∗ = 1 d^*=1 d ∗ = 1 . At n = 3 n=3 n = 3 the code RM ( − 1 , 3 ) ∗ \operatorname{RM}(-1,3)^* RM ( − 1 , 3 ) ∗ is zero, so the residue is unique. Solving the moments as in Proposition 32 gives the residue { 0 , 1 , 2 } \{0,1,2\} { 0 , 1 , 2 } , { 0 , 1 } \{0,1\} { 0 , 1 } , { 2 } \{2\} { 2 } , and δ = 3 \delta=3 δ = 3 . Theorem 25 gives 2 ( 3 − 1 ) − 2 = 2 ≤ 3 2(3-1)-2=2\le3 2 ( 3 − 1 ) − 2 = 2 ≤ 3 , while substituting d d d for d ∗ d^* d ∗ would give 2 ( 3 − 0 ) − 2 = 4 > δ 2(3-0)-2=4>\delta 2 ( 3 − 0 ) − 2 = 4 > δ .
Stabilizer nullity and the radical
Stabilizer nullity ν = n − log 2 ∣ A ∣ \nu=n-\log_2|\mathcal{A}| ν = n − log 2 ∣ A ∣ (§A.5) is the standard efficiently computable lower bound on T T T -count. This subsection shows that the shift group A \mathcal{A} A is the full-tensor radical R ∗ R^* R ∗ , so that the isotropy floor and ν \nu ν can be compared directly.
We first compare R ∗ R^* R ∗ with the kernel of Q Q Q .
Lemma 27 (the quadratic rank is bounded by the tensor corank). R ∗ ⊆ ker Q R^*\subseteq\ker Q R ∗ ⊆ ker Q , and hence r ≤ n − d ∗ r\le n-d^* r ≤ n − d ∗ .
Proof. Taking p = q = a p=q=a p = q = a in the defining condition of R ∗ R^* R ∗ collapses the coincident indices to order-≤ 2 \le2 ≤ 2 moments and gives ∑ b w b M { a , b } = 0 \sum_b w_b M_{\{a,b\}}=0 ∑ b w b M { a , b } = 0 for every a a a , with M { a , a } = M { a } M_{\{a,a\}}=M_{\{a\}} M { a , a } = M { a } . That is ( Q w ) a = 0 (Qw)_a=0 ( Qw ) a = 0 . Hence R ∗ ⊆ ker Q R^*\subseteq\ker Q R ∗ ⊆ ker Q and d ∗ ≤ n − r d^*\le n-r d ∗ ≤ n − r . □ \square □
Proposition 28 (the shift group is the full-tensor radical). For every diagonal level-three gate, A = R ∗ \mathcal{A}=R^\ast A = R ∗ . Hence ν = n − d ∗ \nu=n-d^\ast ν = n − d ∗ .
The proof reduces membership w ∈ A w\in\mathcal{A} w ∈ A to a condition on a function L w L_w L w modulo 4 4 4 and reads that condition one binary digit at a time. Modulo 2 2 2 it says Q w = 0 Qw=0 Qw = 0 , which is the coincident-index part of w ∈ R ∗ w\in R^\ast w ∈ R ∗ . Modulo 4 4 4 , once Q w = 0 Qw=0 Qw = 0 , it says that the contractions of w w w with the cubic moments vanish, which is the rest. The gate CCZ with w = e 1 w=e_1 w = e 1 is followed through both levels.
Proof. Write ϕ ( x ) = ∑ y α y ( y ⋅ x ) \phi(x)=\sum_y\alpha_y(y\mathbin{\cdot}x) ϕ ( x ) = ∑ y α y ( y ⋅ x ) with α y ∈ Z 8 \alpha_y\in\mathbb{Z}_8 α y ∈ Z 8 , reading each parity y ⋅ x ∈ { 0 , 1 } ⊂ Z y\mathbin{\cdot}x\in\{0,1\}\subset\mathbb{Z} y ⋅ x ∈ { 0 , 1 } ⊂ Z as an integer. Since y ⋅ ( x ⊕ w ) = y ⋅ x y\mathbin{\cdot}(x\mathbin{\oplus}w)=y\mathbin{\cdot}x y ⋅ ( x ⊕ w ) = y ⋅ x when y ⋅ w = 0 y\mathbin{\cdot}w=0 y ⋅ w = 0 and y ⋅ ( x ⊕ w ) = 1 − y ⋅ x y\mathbin{\cdot}(x\mathbin{\oplus}w)=1-y\mathbin{\cdot}x y ⋅ ( x ⊕ w ) = 1 − y ⋅ x otherwise, we have the identity over Z \mathbb{Z} Z
ϕ ( x ⊕ w ) − ϕ ( x ) = C w − 2 L w ( x ) , C w : = ∑ y ⋅ w = 1 α y , L w ( x ) : = ∑ y ⋅ w = 1 α y ( y ⋅ x ) . \phi(x\mathbin{\oplus}w)-\phi(x)=C_w-2L_w(x),\qquad C_w:=\sum_{y\mathbin{\cdot}w=1}\alpha_y,\qquad L_w(x):=\sum_{y\mathbin{\cdot}w=1}\alpha_y(y\mathbin{\cdot}x). ϕ ( x ⊕ w ) − ϕ ( x ) = C w − 2 L w ( x ) , C w := y ⋅ w = 1 ∑ α y , L w ( x ) := y ⋅ w = 1 ∑ α y ( y ⋅ x ) .
By §A.5, w ∈ A w\in\mathcal{A} w ∈ A iff ϕ ( x ⊕ w ) − ϕ ( x ) ≡ const + 4 ( affine ) ( m o d 8 ) \phi(x\mathbin{\oplus}w)-\phi(x)\equiv\text{const}+4(\text{affine})\pmod8 ϕ ( x ⊕ w ) − ϕ ( x ) ≡ const + 4 ( affine ) ( mod 8 ) , which holds iff
L w ≡ const + 2 ( affine ) ( m o d 4 ) . (13) L_w\equiv\text{const}+2(\text{affine})\pmod4. \tag*{(13)} L w ≡ const + 2 ( affine ) ( mod 4 ) . (13)
Split α y = ε y + 2 h y \alpha_y=\varepsilon_y+2h_y α y = ε y + 2 h y with ε y = α y m o d 2 \varepsilon_y=\alpha_y\bmod2 ε y = α y mod 2 the residue bit, and put T w : = { y : y ⋅ w = 1 , ε y = 1 } \mathcal{T}_w:=\{y:y\mathbin{\cdot}w=1,\ \varepsilon_y=1\} T w := { y : y ⋅ w = 1 , ε y = 1 } . Then L w = S w + 2 D w L_w=S_w+2D_w L w = S w + 2 D w with S w ( x ) = ∑ y ∈ T w ( y ⋅ x ) S_w(x)=\sum_{y\in\mathcal{T}_w}(y\mathbin{\cdot}x) S w ( x ) = ∑ y ∈ T w ( y ⋅ x ) and D w ( x ) = ∑ y ⋅ w = 1 h y ( y ⋅ x ) D_w(x)=\sum_{y\mathbin{\cdot}w=1}h_y(y\mathbin{\cdot}x) D w ( x ) = ∑ y ⋅ w = 1 h y ( y ⋅ x ) . Modulo 4 4 4 the second term is 2 ( D w m o d 2 ) 2(D_w\bmod2) 2 ( D w mod 2 ) , and D w m o d 2 D_w\bmod2 D w mod 2 is an F 2 \mathbb{F}_2 F 2 -linear function of x x x because each parity y ⋅ x y\mathbin{\cdot}x y ⋅ x is, so the even part of α \alpha α contributes only an allowed 2 ( affine ) 2(\text{affine}) 2 ( affine ) and never obstructs (12). For the odd part use the carry identity for { 0 , 1 } \{0,1\} { 0 , 1 } -valued u i u_i u i ,
∑ i u i ≡ ( ⨁ i u i ) + 2 ∑ i < j u i u j ( m o d 4 ) . \sum_i u_i\equiv\left(\bigoplus_i u_i\right)+2\sum_{i<j}u_i u_j\pmod4. i ∑ u i ≡ ( i ⨁ u i ) + 2 i < j ∑ u i u j ( mod 4 ) .
which gives S w ≡ ( σ w ⋅ x ) + 2 q w ( m o d 4 ) S_w\equiv(\sigma_w\mathbin{\cdot}x)+2q_w\pmod4 S w ≡ ( σ w ⋅ x ) + 2 q w ( mod 4 ) with σ w : = ⨁ y ∈ T w y \sigma_w:=\bigoplus_{y\in\mathcal{T}_w}y σ w := ⨁ y ∈ T w y and q w ( x ) : = ∑ y < y ′ ∈ T w ( y ⋅ x ) ( y ′ ⋅ x ) m o d 2 q_w(x):=\sum_{y<y'\in\mathcal{T}_w}(y\mathbin{\cdot}x)(y'\mathbin{\cdot}x)\bmod2 q w ( x ) := ∑ y < y ′ ∈ T w ( y ⋅ x ) ( y ′ ⋅ x ) mod 2 .
The mod-2 level is Q Q Q . The a a a -th bit σ a \sigma_a σ a of σ w \sigma_w σ w is
∑ y ∈ T w y a = ∑ y : y a = 1 ε y ( y ⋅ w ) = ∑ b w b ∑ y ⊇ { a , b } ε y = ∑ b w b M { a , b } = ( Q w ) a . \sum_{y\in\mathcal{T}_w}y_a=\sum_{y:y_a=1}\varepsilon_y(y\mathbin{\cdot}w)=\sum_b w_b\sum_{y\supseteq\{a,b\}}\varepsilon_y=\sum_b w_bM_{\{a,b\}}=(Qw)_a. y ∈ T w ∑ y a = y : y a = 1 ∑ ε y ( y ⋅ w ) = b ∑ w b y ⊇ { a , b } ∑ ε y = b ∑ w b M { a , b } = ( Qw ) a .
If σ w ≠ 0 \sigma_w\ne0 σ w = 0 then L w m o d 2 = σ w ⋅ x L_w\bmod2=\sigma_w\mathbin{\cdot}x L w mod 2 = σ w ⋅ x is a nonconstant function of x x x , so (12) fails. Hence Q w = 0 Qw=0 Qw = 0 is necessary. For CCZ and w = e 1 w=e_1 w = e 1 the set T w \mathcal{T}_w T w consists of { 1 } \{1\} { 1 } , { 1 , 2 } \{1,2\} { 1 , 2 } , { 1 , 3 } \{1,3\} { 1 , 3 } and { 1 , 2 , 3 } \{1,2,3\} { 1 , 2 , 3 } , whose sum σ w \sigma_w σ w is 0 0 0 , as it must be since Q = 0 Q=0 Q = 0 .
The mod-4 level is the tensor. Assume σ w = 0 \sigma_w=0 σ w = 0 , so L w ≡ 2 ( q w + linear ) L_w\equiv2(q_w+\text{linear}) L w ≡ 2 ( q w + linear ) and (12) holds iff q w q_w q w is affine. Expanding ( y ⋅ x ) ( y ′ ⋅ x ) = ∑ a , b y a y b ′ x a x b (y\mathbin{\cdot}x)(y'\mathbin{\cdot}x)=\sum_{a,b}y_ay'_b x_ax_b ( y ⋅ x ) ( y ′ ⋅ x ) = ∑ a , b y a y b ′ x a x b over F 2 \mathbb{F}_2 F 2 and using x a 2 = x a x_a^2=x_a x a 2 = x a , the coefficient of x a x b x_ax_b x a x b with a ≠ b a\ne b a = b in q w q_w q w is
∑ { y , y ′ } ⊆ T w ( y a y b ′ + y b y a ′ ) = ∑ y , y ′ ∈ T w y ≠ y ′ y a y b ′ = σ a σ b − ∑ y ∈ T w y a y b = ∑ y ∈ T w y a y b , \sum_{\{y,y'\}\subseteq\mathcal{T}_w}(y_ay'_b+y_by'_a)=\sum_{\substack{y,y'\in\mathcal{T}_w\\y\ne y'}}y_ay'_b=\sigma_a\sigma_b-\sum_{y\in\mathcal{T}_w}y_ay_b=\sum_{y\in\mathcal{T}_w}y_ay_b, { y , y ′ } ⊆ T w ∑ ( y a y b ′ + y b y a ′ ) = y , y ′ ∈ T w y = y ′ ∑ y a y b ′ = σ a σ b − y ∈ T w ∑ y a y b = y ∈ T w ∑ y a y b ,
using σ w = 0 \sigma_w=0 σ w = 0 in the last step. As before ∑ y ∈ T w y a y b = ∑ e w e ∑ y ⊇ { a , b , e } ε y = ∑ e w e M { a , b , e } \sum_{y\in\mathcal{T}_w}y_ay_b=\sum_e w_e\sum_{y\supseteq\{a,b,e\}}\varepsilon_y=\sum_e w_eM_{\{a,b,e\}} ∑ y ∈ T w y a y b = ∑ e w e ∑ y ⊇ { a , b , e } ε y = ∑ e w e M { a , b , e } . Thus q w q_w q w is affine iff ∑ e w e M { a , b , e } = 0 \sum_e w_eM_{\{a,b,e\}}=0 ∑ e w e M { a , b , e } = 0 for all a ≠ b a\ne b a = b . For CCZ and w = e 1 w=e_1 w = e 1 the coefficient of x 2 x 3 x_2x_3 x 2 x 3 counts the one element { 1 , 2 , 3 } \{1,2,3\} { 1 , 2 , 3 } of T w \mathcal{T}_w T w containing { 2 , 3 } \{2,3\} { 2 , 3 } , so it equals M { 1 , 2 , 3 } = 1 M_{\{1,2,3\}}=1 M { 1 , 2 , 3 } = 1 . Hence e 1 ∉ A e_1\notin\mathcal{A} e 1 ∈ / A , in agreement with ν ( C C Z ) = 3 \nu(\mathrm{CCZ})=3 ν ( CCZ ) = 3 .
Together with the a = b a=b a = b conditions from the mod-2 level, w ∈ A w\in\mathcal{A} w ∈ A iff ∑ e w e M { a , b , e } = 0 \sum_e w_eM_{\{a,b,e\}}=0 ∑ e w e M { a , b , e } = 0 for all a , b a,b a , b , which is the condition w ∈ R ∗ w\in R^\ast w ∈ R ∗ . Hence A = R ∗ \mathcal{A}=R^\ast A = R ∗ and ν = n − log 2 ∣ A ∣ = n − d ∗ \nu=n-\log_2|\mathcal{A}|=n-d^\ast ν = n − log 2 ∣ A ∣ = n − d ∗ . □ \square □
In particular ν \nu ν is computable from the moments M A M_A M A in O ( n 3 ) O(n^3) O ( n 3 ) time by Gaussian elimination. On the pure-cubic locus the moments of order at most two vanish, so R ∗ = R R^* = R R ∗ = R and ν = n − d ∗ \nu= n-d^* ν = n − d ∗ . Corollary 23 therefore reads δ ≥ 2 ν + 1 \delta\ge2\nu+ 1 δ ≥ 2 ν + 1 on every non-Clifford pure-cubic gate.
Corollary 29 (the floor dominates stabilizer nullity). For every diagonal level-three gate, 2 ( n − d ∗ ) − r ≥ ν 2(n-d^*)-r \ge\nu 2 ( n − d ∗ ) − r ≥ ν , with equality iff r = n − d ∗ r=n-d^* r = n − d ∗ .
Proof. By Proposition 28 , ν = n − d ∗ \nu=n-d^* ν = n − d ∗ , so 2 ( n − d ∗ ) − r − ν = ( n − d ∗ ) − r 2(n-d^*)-r-\nu=(n-d^*)-r 2 ( n − d ∗ ) − r − ν = ( n − d ∗ ) − r , which is ≥ 0 \ge0 ≥ 0 by Lemma 27.
Table 3 collects the invariants of the running examples. The rows for CS and Example 26 show that the + 1 +1 + 1 does not extend off the pure-cubic locus, and that there even δ ≥ 2 ν \delta\ge2\nu δ ≥ 2 ν fails, since both have ν = 2 \nu=2 ν = 2 and δ = 3 \delta=3 δ = 3 . The general floor is 2 ν − r 2\nu-r 2 ν − r (Corollary 29 ).
Table 3. Invariants of the running examples. The floor is 2 ν + 1 2\nu+1 2 ν + 1 on the pure-cubic rows CCZ and CCZ ⊗ \otimes ⊗ CCZ (Corollary 23) and 2 ( n − d ∗ ) − r 2(n-d^*)-r 2 ( n − d ∗ ) − r on the others (Theorem 25 ). The values of δ \delta δ come from Lemma 31 for the first three rows, from Theorem 35 for CCZ ⊗ \otimes ⊗ CCZ and from Example 26 for the last row. The value for CCZ ⊗ \otimes ⊗ T T T , and every other entry, was checked by exact decoding.
Remark 30 (comparison with stabilizer nullity). For the non-degenerate pure-cubic gates stabilizer nullity gives ν = n \nu=n ν = n (for example ν ( C C Z ) = 3 \nu(\mathrm{CCZ})=3 ν ( CCZ ) = 3 ), so Theorem 22 is a factor-two improvement at the same O ( n 3 ) O(n^3) O ( n 3 ) cost. No magic monotone under stabilizer operations with feedforward can match it, since such a monotone also bounds adaptive circuits, in which CCZ costs four T T T gates [8 ] . Appendix § 8 gives families on which the floor is attained.
Rigidity
Several exact values in this paper need only that a light residue cannot be lightened further. The next statement is immediate from the Amy–Mosca correspondence [11 ] and the minimum distance 15 of Lemma 9.
Lemma 31 (rigidity radius). If a diagonal level-three gate has a residue of Hamming weight ℓ ≤ 7 \ell\le7 ℓ ≤ 7 , then δ = ℓ \delta=\ell δ = ℓ .
Proof. For n ≤ 3 n \le3 n ≤ 3 the code R M ( n − 4 , n ) ∗ \mathrm{RM}(n-4,n)^* RM ( n − 4 , n ) ∗ is zero, every gate has a single residue, and δ = ℓ \delta=\ell δ = ℓ for every ℓ \ell ℓ . For n ≥ 4 n \ge4 n ≥ 4 and any nonzero codeword c ∈ R M ( n − 4 , n ) ∗ c \in\mathrm{RM}(n-4,n)^* c ∈ RM ( n − 4 , n ) ∗ , the triangle inequality and Lemma 9 give
wt ( Res 2 ⊕ c ) ≥ wt ( c ) − ℓ ≥ 15 − ℓ ≥ 8 > ℓ . \operatorname{wt}(\operatorname{Res}_2 \oplus c) \ge\operatorname{wt}(c)-\ell\ge15-\ell\ge8 > \ell. wt ( Res 2 ⊕ c ) ≥ wt ( c ) − ℓ ≥ 15 − ℓ ≥ 8 > ℓ .
The residue itself is thus the strict minimum-weight coset leader, and by (9), δ = ℓ \delta=\ell δ = ℓ . The threshold ℓ ≤ 7 = ⌊ ( 15 − 1 ) / 2 ⌋ \ell\le7=\lfloor(15-1)/2\rfloor ℓ ≤ 7 = ⌊( 15 − 1 ) /2 ⌋ is the unique-decoding radius.
For example δ ( T ) = 1 \delta(T)=1 δ ( T ) = 1 , δ ( C S ) = 3 \delta(\mathrm{CS})=3 δ ( CS ) = 3 and δ ( C C Z ) = 7 \delta(\mathrm{CCZ})=7 δ ( CCZ ) = 7 for all n n n . Above weight seven a weight-15 codeword can lower the residue weight.
An upper bound, also in O ( n 3 ) O(n^3) O ( n 3 )
A lower bound alone does not say how far a given circuit is from optimal. Solving the moment conditions from the top down gives an upper bound that is also computable in O ( n 3 ) O(n^3) O ( n 3 ) . Write M ( U ) = ( M A ) 1 ≤ ∣ A ∣ ≤ 3 M(U) = (M_A)_{1 \le|A| \le3} M ( U ) = ( M A ) 1 ≤ ∣ A ∣ ≤ 3 for the moment vector of U U U . By Fact 15 it is a complete invariant of U U U modulo diagonal Cliffords and determines the coset of every residue s = Res 2 ( U ) s = \operatorname{Res}_2(U) s = Res 2 ( U ) , so the ceiling W ( s ) W(s) W ( s ) below is computed from M ( U ) M(U) M ( U ) and is the same for every residue of U U U .
The moment map F 2 2 n − 1 → F 2 ( n 1 ) + ( n 2 ) + ( n 3 ) \mathbb{F}_2^{2^n-1} \to\mathbb{F}_2^{\binom{n}{1}+\binom{n}{2}+\binom{n}{3}} F 2 2 n − 1 → F 2 ( 1 n ) + ( 2 n ) + ( 3 n ) has kernel RM ( n − 4 , n ) ∗ \operatorname{RM}(n-4,n)^* RM ( n − 4 , n ) ∗ . Restricted to the parities of weight at most three it is triangular in the subset order, hence already surjective, and Proposition 32 solves it explicitly. In particular some residue, the canonical one, uses no parity of weight four or more. A residue of minimum weight may need such parities, as for two disjoint CCZ gates, whose canonical residue has weight 14 while δ = 13 \delta= 13 δ = 13 (Theorem 35 ).
Proposition 32 (canonical residue ceiling). Let U U U be any diagonal level-three gate with moments M A M_A M A , 1 ≤ ∣ A ∣ ≤ 3 1 \le|A| \le3 1 ≤ ∣ A ∣ ≤ 3 . Define z z z on the parities of weight at most three by solving downwards,
z A = M A ( ∣ A ∣ = 3 ) , z A = M A ⊕ ⨁ y ⊇ A ∣ y ∣ = 3 z y ( ∣ A ∣ = 2 ) , z A = M A ⊕ ⨁ y ⊇ A ∣ y ∣ ≤ 3 z y ( ∣ A ∣ = 1 ) , z_A = M_A \quad(|A| = 3), \qquad z_A = M_A \mathbin{\oplus} \bigoplus_{\substack{y \supseteq A \\ |y|=3}} z_y \quad(|A| = 2), \qquad z_A = M_A \mathbin{\oplus} \bigoplus_{\substack{y \supseteq A \\ |y| \le3}} z_y \quad(|A| = 1), z A = M A ( ∣ A ∣ = 3 ) , z A = M A ⊕ y ⊇ A ∣ y ∣ = 3 ⨁ z y ( ∣ A ∣ = 2 ) , z A = M A ⊕ y ⊇ A ∣ y ∣ ≤ 3 ⨁ z y ( ∣ A ∣ = 1 ) , and z y = 0 z_y = 0 z y = 0 for ∣ y ∣ ≥ 4 |y| \ge4 ∣ y ∣ ≥ 4 . Then z z z is a residue for U U U , so
δ ( U ) ≤ W ( s ) : = wt ( z ) , \delta(U) \le W(s) := \operatorname{wt}(z), δ ( U ) ≤ W ( s ) := wt ( z ) , and δ ( U ) = W ( s ) \delta(U) = W(s) δ ( U ) = W ( s ) whenever W ( s ) ≤ 7 W(s) \le7 W ( s ) ≤ 7 .
Proof. By Fact 15 the moments of order ≤ 3 \le3 ≤ 3 determine the coset, and by the triangularity noted above parities of weight at most three suffice. Solving downwards, at each ∣ A ∣ |A| ∣ A ∣ the supersets of A A A have already been fixed, so z A z_A z A is determined and by construction M A ( z ) = ⨁ y ⊇ A z y = M A M_A(z) = \bigoplus_{y \supseteq A} z_y = M_A M A ( z ) = ⨁ y ⊇ A z y = M A for every A A A with 1 ≤ ∣ A ∣ ≤ 3 1 \le|A| \le3 1 ≤ ∣ A ∣ ≤ 3 . Hence z z z lies in the coset of U U U and δ ≤ wt ( z ) \delta\le\operatorname{wt}(z) δ ≤ wt ( z ) , δ \delta δ being the minimum weight over that coset. Equality below 8 is Lemma 31 . The construction takes O ( n 3 ) O(n^3) O ( n 3 ) time and involves no decoding.
On the two pure loci the ceiling has a closed form.
Corollary 33 (the ceiling on the pure loci). For a pure-cubic gate with monomial set F F F the ceiling is W ( s ) = w ( F ) : = # { A : 1 ≤ ∣ A ∣ ≤ 3 , # { S ∈ F : A ⊆ S } odd } W(s) = w(F) := \#\{A : 1 \le|A| \le3,\ \#\{S \in F : A \subseteq S\}\ \text{odd}\} W ( s ) = w ( F ) := # { A : 1 ≤ ∣ A ∣ ≤ 3 , # { S ∈ F : A ⊆ S } odd } . For a pure quadratic with moment graph E E E it is e + odd e + \operatorname{odd} e + odd , the edge count plus the number of odd-degree vertices.
Proof. For a pure-cubic gate, z A = [ A ∈ F ] z_A = [A \in F] z A = [ A ∈ F ] at ∣ A ∣ = 3 |A| = 3 ∣ A ∣ = 3 . At ∣ A ∣ = 2 |A| = 2 ∣ A ∣ = 2 , M A = 0 M_A = 0 M A = 0 gives z A = # { S ∈ F : A ⊆ S } z_A = \#\{S \in F : A \subseteq S\} z A = # { S ∈ F : A ⊆ S } , and at A = { a } A = \{a\} A = { a } the weight-three parities through a a a contribute deg F ( a ) \deg_F(a) deg F ( a ) while the weight-two parities contribute ∑ b ≠ a # { S ∈ F : { a , b } ⊆ S } = 2 deg F ( a ) ≡ 0 \sum_{b \ne a} \#\{S \in F : \{a,b\} \subseteq S\} = 2\deg_F(a) \equiv0 ∑ b = a # { S ∈ F : { a , b } ⊆ S } = 2 deg F ( a ) ≡ 0 , so z { a } = deg F ( a ) z_{\{a\}} = \deg_F(a) z { a } = deg F ( a ) and the total weight is w ( F ) w(F) w ( F ) . For a pure quadratic the weight-three level is empty, z { a , b } = E a b z_{\{a,b\}} = E_{ab} z { a , b } = E ab and z { a } = deg E ( a ) z_{\{a\}} = \deg_E(a) z { a } = deg E ( a ) , giving e + odd e + \operatorname{odd} e + odd .
The cubic and quadratic formulas are two cases of one construction, and unlike w ( F ) w(F) w ( F ) the ceiling W ( s ) W(s) W ( s ) applies to mixed-degree phase polynomials. Theorem 25 , with the extra one of Corollary 23 on the pure-cubic locus, and Proposition 32 therefore bracket every gate between two quantities computed from the moments in O ( n 3 ) O(n^3) O ( n 3 ) .
A phase polynomial with t t t terms yields the moments in O ( t n 3 ) O(tn^3) O ( t n 3 ) time. When the two ends of the bracket coincide they determine δ \delta δ .
Exact T T T -counts of Toffoli layers
On a layer of m m m disjoint CCZ gates the isotropy floor of Appendix § 7 is attained, and δ = 6 m + 1 \delta= 6m + 1 δ = 6 m + 1 . Every proof below has this shape, with the floor on one side and an explicit representation that meets it on the other. Layers whose blocks share a common pair are exact too, as are layers whose shared qubits can be routed along a forest of maximum degree three. Outside that class the floor only brackets δ \delta δ . The appendix ends by comparing the floor with Campbell and Howard’s exact count on controlled unitaries (§C.2).
Toffoli layers
A Toffoli layer is, up to Hadamards on the targets, a product of CCZ gates on triples of qubits, the blocks of the layer. We treat disjoint blocks first. When blocks overlap in single qubits the floor drops by 2 for each incidence beyond one per qubit, and the splicing construction of §C.1.3 meets the lower floor whenever the overlaps route along a forest of maximum degree three.
Disjoint blocks
A Toffoli gate is a CCZ conjugated by Hadamards on the target, so a parallel Toffoli layer of m m m gates on disjoint qubits is, up to Clifford gates, a layer of m m m disjoint CCZ gates on n = 3 m n = 3m n = 3 m qubits. Write L m = ⨂ i = 1 m C C Z i L_m = \bigotimes_{i=1}^{m} \mathrm{CCZ}_i L m = ⨂ i = 1 m CCZ i for this layer. At m = 1 m = 1 m = 1 the seven-T T T circuit is standard [15 ] , and Gosset, Kliuchnikov, Mosca and Russo [7 ] proved it optimal among ancilla-free Clifford+T T T circuits by exact search. In the Hadamard-free model the value 7 is immediate, since RM ( − 1 , 3 ) ∗ = { 0 } \operatorname{RM}(-1, 3)^* = \{0\} RM ( − 1 , 3 ) ∗ = { 0 } and the coset of CCZ is a single word of weight 7. Campbell and Howard’s controlled-unitary paper [2 ] shows that m m m disjoint CCZ gates need at most 6 m + 1 6m + 1 6 m + 1 T T T gates [2 Cor. 1, Sec. IV.A] and reports the value 13 at m = 2 m = 2 m = 2 as known [2 Ex. IV.2] , without a proof. That case has six qubits, and exhaustive coset decoding confirms it. Stabilizer nullity is additive under tensor product [3 , 21 ] , so it gives 3 m 3m 3 m . In the work citing [2 , 11 , 5 ] we found no lower bound on the layer above 3 m 3m 3 m or the roughly 3.71 m 3.71m 3.71 m of the amortized stabilizer Rényi entropy [4 ] , so to our knowledge the lower bound of Theorem 35 for m ≥ 3 m \ge3 m ≥ 3 is new. Campbell and Howard’s controlled-unitary theorem is exact [2 Thm. 5] , but it does not apply here.
Remark 34 (which layers are controlled unitaries). Let f f f be a sum of m ≥ 2 m \ge2 m ≥ 2 cubic monomials on blocks that pairwise share at most one qubit. Then U f U_f U f is a controlled unitary in some CNOT basis, up to a diagonal Clifford factor, only if all blocks share one qubit, as in the fan-out. In particular the disjoint layer L m L_m L m with m ≥ 2 m \ge2 m ≥ 2 is not one. A controlled unitary with control ℓ \ell ℓ and a diagonal Clifford target has cubic part ℓ ⋅ q \ell\cdot q ℓ ⋅ q modulo quadratics, which vanishes on the hyperplane ℓ = 0 \ell= 0 ℓ = 0 , and the cubic part is well defined in every CNOT basis (Remark 18). Pick i i i in the support of ℓ \ell ℓ and restrict f f f to ℓ = 0 \ell= 0 ℓ = 0 by substituting for x i x_i x i . A block B B B not containing i i i keeps its monomial. The substitution turns a monomial x i x j x k x_i x_j x_k x i x j x k into monomials that contain x j x k x_j x_k x j x k , and none of them equals the monomial of B B B , since B B B shares at most one qubit with { i , j , k } \{i, j, k\} { i , j , k } . Hence f f f stays cubic on ℓ = 0 \ell= 0 ℓ = 0 unless every block contains i i i . Since this holds for every i i i in the support of ℓ \ell ℓ , all blocks share a qubit.
Theorem 35 (Toffoli-layer optimality). For every m ≥ 1 m \ge1 m ≥ 1 , δ ( L m ) = 6 m + 1 \delta(L_m) = 6m + 1 δ ( L m ) = 6 m + 1 , and every { C N O T , T } \{\mathrm{CNOT}, T\} { CNOT , T } circuit for the CCZ layer with clean ancillas uses at least 6 m + 1 6m + 1 6 m + 1 T T T gates (Corollary 13). Hence no Clifford+T T T circuit for the parallel Toffoli layer whose Hadamards all lie in the two target layers uses fewer than 6 m + 1 6m + 1 6 m + 1 T T T gates.
Proof. For the lower bound, note that the layer is pure-cubic, with T p q r = 1 T_{pqr} = 1 T pq r = 1 exactly when { p , q , r } \{p, q, r\} { p , q , r } is a block. Its radical is trivial: if w ∈ R w \in R w ∈ R , taking q , r q, r q , r to be two qubits of a block forces w w w to vanish on the third, and ranging over the three pairs of each block gives w = 0 w=0 w = 0 . Hence d = 0 d=0 d = 0 , and Theorem 22 gives δ ( L m ) ≥ 6 m + 1 \delta(L_m) \ge6m+1 δ ( L m ) ≥ 6 m + 1 .
For the upper bound, Campbell and Howard’s construction gives δ ( L m ) ≤ 6 m + 1 \delta(L_m) \le6m+1 δ ( L m ) ≤ 6 m + 1 [2 Cor. 1] . An explicit set of 6 m + 1 6m+1 6 m + 1 parities, and hence a { C N O T , T } \{\mathrm{CNOT},T\} { CNOT , T } circuit, also follows from Proposition 41 with η = 0 \eta=0 η = 0 , which splices m m m copies of the seven-parity CCZ circuit by case (i) of Lemma 40. Since the lower and upper bounds agree, δ ( L m ) = 6 m + 1 \delta(L_m)=6m+1 δ ( L m ) = 6 m + 1 .
Implemented separately, the m m m gates cost 7 m 7m 7 m . Figure 2 a draws the construction at m = 2 m=2 m = 2 , and Proposition 41 below rebuilds it by splicing.
Corollary 36 (controlled-parity layers). A controlled-parity gate applies ( − 1 ) x a x b ⨁ i ∈ P x i (-1)^{x_a x_b \bigoplus_{i\in P}x_i} ( − 1 ) x a x b ⨁ i ∈ P x i for a nonempty qubit set P P P disjoint from { a , b } \{a,b\} { a , b } . A single controlled-parity gate has δ = 7 \delta=7 δ = 7 for every ∣ P ∣ |P| ∣ P ∣ , and a layer of m m m such gates on disjoint qubit sets has δ = 6 m + 1 \delta=6m+1 δ = 6 m + 1 .
Proof. Let C C C be the Clifford that, in each block, XORs the parity qubits P i P_i P i onto one representative wire. Conjugating the layer by C C C replaces each controlled-parity by a CCZ on three wires, on disjoint triples. Hence the layer equals C − 1 ( ⨂ i C C Z i ) C C^{-1}(\bigotimes_i \mathrm{CCZ}_i)C C − 1 ( ⨂ i CCZ i ) C , and since δ \delta δ is Clifford bi-invariant its T T T -count is δ ( L m ) = 6 m + 1 \delta(L_m)=6m+1 δ ( L m ) = 6 m + 1 by Theorem 35 . For m = 1 m=1 m = 1 the block is a single CCZ, giving δ = 7 \delta=7 δ = 7 .
A single controlled-parity gate has nullity ν = 3 \nu=3 ν = 3 for every ∣ P ∣ |P| ∣ P ∣ .
Overlapping blocks
The Toffoli blocks of practical oracles rarely act on disjoint qubits. Controlled layers and swap tests share a common control among many gates, and the carry logic of a ripple-carry adder links consecutive Toffolis through shared carries. For m m m blocks covering n n n qubits, write η = 3 m − n \eta= 3m - n η = 3 m − n for the number of excess incidences , the qubit incidences in excess of one per qubit. When the blocks pairwise share at most one qubit the floor is 6 m + 1 − 2 η 6m + 1 - 2\eta 6 m + 1 − 2 η (Lemma 38 ), so each excess incidence lowers it by 2. When all blocks share a pair of qubits the layer collapses to a single CCZ (Remark 37). Figure 3 sets the three regimes side by side,
Figure 3. Sharing qubits interpolates the cost of a CCZ layer. Disjoint blocks give d = 0 d = 0 d = 0 on n = 3 m n = 3m n = 3 m qubits and cost 6 m + 1 6m + 1 6 m + 1 (Theorem 35 ). Fanning every block out of one shared control keeps d = 0 d = 0 d = 0 but drops n n n to 2 m + 1 2m + 1 2 m + 1 , so the cost falls to exactly 4 m + 3 4m + 3 4 m + 3 (Theorem 39 ). Each single-qubit merge lowers the floor by two (Lemma 38 ), and the T T T -count follows it when the shared qubits route along a forest (Proposition 41 ). Sharing a full pair sends d d d to n − 3 n - 3 n − 3 , and the layer is Clifford-equivalent to a single gate, δ = 7 \delta= 7 δ = 7 , for every m m m (Remark 37).
6 m + 1 → share one qubit 4 m + 3 → share a pair 7. 6m + 1 \xrightarrow{\text{share one qubit}} 4m + 3 \xrightarrow{\text{share a pair}} 7. 6 m + 1 share one qubit 4 m + 3 share a pair 7.
Remark 37 (layers sharing a pair of qubits). If all m ≥ 2 m \ge2 m ≥ 2 blocks share a pair of qubits, the tensor is degenerate. For m m m blocks { a , b , c i } \{a,b,c_i\} { a , b , c i } through a common pair { a , b } \{a,b\} { a , b } , the radical relations give R = { w supported on the c i with ∑ i w c i = 0 } R = \{w\text{ supported on the }c_i\text{ with }\sum_i w_{c_i} = 0\} R = { w supported on the c i with ∑ i w c i = 0 } , of dimension n − 3 n - 3 n − 3 . The gate is pure-cubic, so the floor 2 ( n − d ) + 1 2(n - d) + 1 2 ( n − d ) + 1 of Corollary 23 equals 7. The layer is Clifford-equivalent to a single CCZ (Corollary 36), so δ = 7 \delta= 7 δ = 7 for every m m m and the floor is attained.
Lemma 38 (linear overlap keeps the tensor non-degenerate). Let B 1 , … , B m B_1,\ldots,B_m B 1 , … , B m be distinct CCZ blocks (triples) covering n n n qubits, such that every pair of qubits lies in at most one block (the blocks form a linear 3-uniform hypergraph: pairwise intersections have size at most one). Then the union’s cubic tensor is non-degenerate, so δ ( ∑ i CCZ B i ) ≥ 2 n + 1 \delta\left(\sum_i \operatorname{CCZ}_{B_i}\right) \ge2n + 1 δ ( ∑ i CCZ B i ) ≥ 2 n + 1 . With η = 3 m − n \eta= 3m - n η = 3 m − n excess incidences this is the sharing floor δ ≥ 6 m + 1 − 2 η \delta\ge6m + 1 - 2\eta δ ≥ 6 m + 1 − 2 η .
Proof. Let w ∈ R w \in R w ∈ R and let p p p be any qubit, lying in some block B = { p , q , r } B = \{p,q,r\} B = { p , q , r } . The pair { q , r } \{q,r\} { q , r } is contained in B B B and, by linearity, in no other block, so the radical relation at ( q , r ) (q,r) ( q , r ) is ∑ a w a T a q r = w p = 0 \sum_a w_a T_{aqr} = w_p = 0 ∑ a w a T a q r = w p = 0 . This holds for every covered qubit, so R = 0 R = 0 R = 0 and Theorem 22 applies with d = 0 d = 0 d = 0 . □
Splicing along a forest
The floor of Lemma 38 is not attained on every linear pattern (Remark 42). The construction below attains it whenever the shared qubits route along a forest of maximum degree three. Its case (i) is the gate-synthesis construction of Campbell and Howard’s subadditivity theorem [2 Thm. 6] in the language of parity sets. Case (ii) and the routing of Proposition 41 are our formulation, and the single shared control of case (ii) is already covered by their fan-out count.
The commonest overlap in practice is a single control shared by every block, as in a controlled layer. It is the simplest case of the construction, a path along which every splice is of case (ii).
Theorem 39 (fan-out layer). Let U m = ∏ i = 1 m C C Z 0 , a i , b i U_m = \prod_{i=1}^{m}\mathrm{CCZ}_{0,a_i,b_i} U m = ∏ i = 1 m CCZ 0 , a i , b i be m m m CCZ gates sharing the single control qubit 0, on n = 2 m + 1 n = 2m + 1 n = 2 m + 1 qubits. Then
δ ( U m ) = 4 m + 3 for every m ≥ 1. \delta(U_m) = 4m + 3 \qquad\text{for every } m \ge1. δ ( U m ) = 4 m + 3 for every m ≥ 1. Proof. For the lower bound, note that the blocks pairwise share only qubit 0, a linear hypergraph, so Lemma 38 gives δ ≥ 2 n + 1 = 4 m + 3 \delta\ge2n + 1 = 4m + 3 δ ≥ 2 n + 1 = 4 m + 3 .
For the upper bound, take the tree F 0 F_0 F 0 for the shared qubit 0 to be the path B 1 , … , B m B_1,\ldots,B_m B 1 , … , B m , so F F F has maximum degree two, and apply Proposition 41 below with η = m − 1 \eta= m - 1 η = m − 1 . Each of the m − 1 m - 1 m − 1 splices is case (ii) of Lemma 40, so the weight is 7 + 4 ( m − 1 ) = 4 m + 3 7 + 4(m - 1) = 4m + 3 7 + 4 ( m − 1 ) = 4 m + 3 , which equals the floor.
Sharing one control among m m m Toffolis thus saves 2 ( m − 1 ) 2(m - 1) 2 ( m − 1 ) T T T -gates against the parallel layer. By Lemma 38 and Corollary 13, no Hadamard-free { C N O T , T } \{\mathrm{CNOT}, T\} { CNOT , T } implementation with clean ancillas saves more. Adaptive circuits and circuits with internal Hadamards are not covered by this statement. Campbell and Howard obtained this count and its optimality from their controlled-unitary theorem [2 Thm. 5] . Here it is the floor of Lemma 38, attained by splicing. The comparison with their theorem on general controlled unitaries is Proposition 44.
Splicing builds a parity set for a union of blocks from parity sets for the parts. It deletes one parity y y y of the current set and adds the parities of the new block, each XORed with y y y . The lifted parities supply the deleted phase on y y y , so the splice costs one gate less than the new block alone. If the new block shares a qubit c c c with the current set, the lift of { c } \{c\} { c } can coincide with a parity y ∪ { c } y \cup\{c\} y ∪ { c } already present, and the two gates on it cancel.
For example, take the blocks { a , b , c } \{a,b,c\} { a , b , c } and { c , d , e } \{c,d,e\} { c , d , e } and splice at y = { a } y = \{a\} y = { a } . Delete { a } \{a\} { a } from the seven parities of the first block, leaving { b } \{b\} { b } , { c } \{c\} { c } , { a , b } \{a,b\} { a , b } , { a , c } \{a,c\} { a , c } , { b , c } \{b,c\} { b , c } and { a , b , c } \{a,b,c\} { a , b , c } . Adding a a a to the seven parities of the second block gives { a , c } \{a,c\} { a , c } , { a , d } \{a,d\} { a , d } , { a , e } \{a,e\} { a , e } , { a , c , d } \{a,c,d\} { a , c , d } , { a , c , e } \{a,c,e\} { a , c , e } , { a , d , e } \{a,d,e\} { a , d , e } and { a , c , d , e } \{a,c,d,e\} { a , c , d , e } . The parity { a , c } \{a,c\} { a , c } now appears twice and drops out, so 6 + 7 − 2 = 11 6 + 7 - 2 = 11 6 + 7 − 2 = 11 parities remain. This is the floor 2 n + 1 2n + 1 2 n + 1 at n = 5 n = 5 n = 5 , and Figure 2 (b) draws the circuit.
Lemma 40 (splicing). Call a set S S S of parities pure-cubic odd if ∣ S ∣ |S| ∣ S ∣ is odd and M A ( S ) = 0 M_A(S) = 0 M A ( S ) = 0 for ∣ A ∣ ∈ { 1 , 2 } |A| \in\{1,2\} ∣ A ∣ ∈ { 1 , 2 } , and call its block set B ( S ) = { A : ∣ A ∣ = 3 , M A ( S ) = 1 } B(S) = \{A : |A| = 3,\ M_A(S) = 1\} B ( S ) = { A : ∣ A ∣ = 3 , M A ( S ) = 1 } . The set C C Z ( B ) \mathrm{CCZ}(B) CCZ ( B ) , the seven nonempty subsets of a block, is pure-cubic odd with ∣ C C Z ( B ) ∣ = 7 |\mathrm{CCZ}(B)| = 7 ∣ CCZ ( B ) ∣ = 7 and block set { B } \{B\} { B } . Let P , P ′ P, P' P , P ′ be pure-cubic odd on supports X = ⋃ σ ∈ P σ X = \bigcup_{\sigma\in P}\sigma X = ⋃ σ ∈ P σ and X ′ = ⋃ σ ∈ P ′ σ X' = \bigcup_{\sigma\in P'}\sigma X ′ = ⋃ σ ∈ P ′ σ with ∣ X ∩ X ′ ∣ ≤ 1 |X \cap X'| \le1 ∣ X ∩ X ′ ∣ ≤ 1 , let y ∈ P y \in P y ∈ P with y ∩ X ′ = ∅ y \cap X' = \varnothing y ∩ X ′ = ∅ , and write P ′ ⊕ y = { σ ∪ y : σ ∈ P ′ } P' \oplus y = \{\sigma\cup y : \sigma\in P'\} P ′ ⊕ y = { σ ∪ y : σ ∈ P ′ } for the lift of P ′ P' P ′ by y y y . Then
P ⋆ y P ′ : = ( P ∖ { y } ) △ ( P ′ ⊕ y ) P \mathbin{\star_y} P' := (P \setminus\{y\}) \mathbin{\triangle} (P' \oplus y) P ⋆ y P ′ := ( P ∖ { y }) △ ( P ′ ⊕ y ) is pure-cubic odd with block set B ( P ) △ B ( P ′ ) B(P) \mathbin{\triangle} B(P') B ( P ) △ B ( P ′ ) , and
if X ∩ X ′ = ∅ X \cap X' = \varnothing X ∩ X ′ = ∅ then ∣ P ⋆ y P ′ ∣ = ∣ P ∣ + ∣ P ′ ∣ − 1 |P \mathbin{\star_y} P'| = |P| + |P'| - 1 ∣ P ⋆ y P ′ ∣ = ∣ P ∣ + ∣ P ′ ∣ − 1 .
if X ∩ X ′ = { c } X \cap X' = \{c\} X ∩ X ′ = { c } , { c } ∈ P ′ \{c\} \in P' { c } ∈ P ′ and y ∪ { c } ∈ P y \cup\{c\} \in P y ∪ { c } ∈ P , then ∣ P ⋆ y P ′ ∣ = ∣ P ∣ + ∣ P ′ ∣ − 3 |P \mathbin{\star_y} P'| = |P| + |P'| - 3 ∣ P ⋆ y P ′ ∣ = ∣ P ∣ + ∣ P ′ ∣ − 3 .
Proof. Since y ∩ X ′ = ∅ y \cap X' = \varnothing y ∩ X ′ = ∅ , each lifted parity σ ∪ y \sigma\cup y σ ∪ y is a disjoint union. A block lies inside the support that carries it and ∣ X ∩ X ′ ∣ ≤ 1 |X \cap X'| \le1 ∣ X ∩ X ′ ∣ ≤ 1 , so B ( P ) B(P) B ( P ) and B ( P ′ ) B(P') B ( P ′ ) are disjoint. The lift satisfies M A ( P ′ ⊕ y ) = [ A ∖ X ′ ⊆ y ] ⋅ M A ∩ X ′ ( P ′ ) M_A(P' \oplus y) = [A \setminus X' \subseteq y] \cdot M_{A \cap X'}(P') M A ( P ′ ⊕ y ) = [ A ∖ X ′ ⊆ y ] ⋅ M A ∩ X ′ ( P ′ ) , with M ∅ ( P ′ ) : = ∣ P ′ ∣ m o d 2 M_{\varnothing}(P') := |P'| \mathbin{\mathrm{mod}} 2 M ∅ ( P ′ ) := ∣ P ′ ∣ mod 2 . If A ∩ X ′ = ∅ A \cap X' = \varnothing A ∩ X ′ = ∅ the lifted term is [ A ⊆ y ] [A \subseteq y] [ A ⊆ y ] , which cancels against the deletion of y y y . This is where oddness of ∣ P ′ ∣ |P'| ∣ P ′ ∣ is used. If A ∩ X ′ ≠ ∅ A \cap X' \ne\varnothing A ∩ X ′ = ∅ then the deleted y y y contributes nothing, since y y y misses X ′ X' X ′ . If moreover ∣ A ∩ X ′ ∣ ≤ 2 |A \cap X'| \le2 ∣ A ∩ X ′ ∣ ≤ 2 , which includes every A A A with A ∖ X ′ ≠ ∅ A \setminus X' \ne\varnothing A ∖ X ′ = ∅ , then M A ∩ X ′ ( P ′ ) = 0 M_{A \cap X'}(P') = 0 M A ∩ X ′ ( P ′ ) = 0 because P ′ P' P ′ is pure-cubic. Otherwise A ⊆ X ′ A \subseteq X' A ⊆ X ′ and the lifted term is M A ( P ′ ) M_A(P') M A ( P ′ ) . Hence M A ( P ⋆ y P ′ ) = M A ( P ) + [ A ⊆ X ′ ] M A ( P ′ ) M_A(P \star_y P') = M_A(P) + [A \subseteq X']M_A(P') M A ( P ⋆ y P ′ ) = M A ( P ) + [ A ⊆ X ′ ] M A ( P ′ ) for 1 ≤ ∣ A ∣ ≤ 3 1 \le|A| \le3 1 ≤ ∣ A ∣ ≤ 3 , which gives pure-cubcity and the block set B ( P ) ⊔ B ( P ′ ) B(P) \sqcup B(P') B ( P ) ⊔ B ( P ′ ) . A symmetric difference changes the size by an even number, so ∣ P ⋆ y P ′ ∣ = ∣ P ∣ − 1 + ∣ P ′ ∣ ≡ 1 ( m o d 2 ) |P \star_y P'| = |P| - 1 + |P'| \equiv1 \pmod2 ∣ P ⋆ y P ′ ∣ = ∣ P ∣ − 1 + ∣ P ′ ∣ ≡ 1 ( mod 2 ) .
It remains to count. Distinct σ ∈ P ′ \sigma\in P' σ ∈ P ′ give distinct lifts, since each σ \sigma σ lies in X ′ X' X ′ and y y y misses X ′ X' X ′ . A lift σ ∪ y \sigma\cup y σ ∪ y can equal a parity of P P P only if σ ⊆ X \sigma\subseteq X σ ⊆ X , that is σ ⊆ X ∩ X ′ \sigma\subseteq X \cap X' σ ⊆ X ∩ X ′ . In case (i) this is impossible, so the symmetric difference is a disjoint union of size ( ∣ P ∣ − 1 ) + ∣ P ′ ∣ (|P| - 1) + |P'| ( ∣ P ∣ − 1 ) + ∣ P ′ ∣ . In case (ii) it forces σ = { c } \sigma= \{c\} σ = { c } , and the lift { c } ∪ y \{c\} \cup y { c } ∪ y equals the parity y ∪ { c } y \cup\{c\} y ∪ { c } of P P P , which differs from the deleted y y y because c ∉ y c \notin y c ∈ / y (as y y y misses X ′ X' X ′ ). That single pair cancels, and the size is ( ∣ P ∣ − 1 ) + ∣ P ′ ∣ − 2 (|P| - 1) + |P'| - 2 ( ∣ P ∣ − 1 ) + ∣ P ′ ∣ − 2 .
Proposition 41 (tree-shaped overlap attains the sharing floor). Let a layer of m m m blocks with linear overlap have η \eta η excess incidences. Suppose that for each shared qubit q q q there is a tree F q F_q F q on the blocks containing q q q , with edges labelled q q q , such that the union F F F of these trees is a spanning forest of the block set of maximum degree three. Splicing along F F F by Lemma 40, taking case (ii) on each of the η \eta η edges of F F F and case (i) on the remaining m − 1 − η m - 1 - \eta m − 1 − η splices, yields a representation of weight
7 + 4 η + 6 ( m − 1 − η ) = 6 m + 1 − 2 η . 7 + 4\eta+ 6(m - 1 - \eta) = 6m + 1 - 2\eta. 7 + 4 η + 6 ( m − 1 − η ) = 6 m + 1 − 2 η . By Lemma 38 this weight is optimal, so δ = 6 m + 1 − 2 η \delta= 6m + 1 - 2\eta δ = 6 m + 1 − 2 η .
Proof. We first count the weight, assuming that each splice meets the hypotheses of its case. We then show that a new block meets the placed support only in the qubit that joins it to its parent, and finally that its parent still has a free pair of parities to splice at.
Root each tree of F F F at any block. Since F F F has maximum degree three, the root has at most three children and every other block at most two. Order the blocks so that the components of F F F come one after another and every block follows its parent. Start from CCZ ( B ) \operatorname{CCZ}(B) CCZ ( B ) for the first block and splice in the others one at a time, taking P P P to be the current set and P ′ = CCZ ( B ) P' = \operatorname{CCZ}(B) P ′ = CCZ ( B ) for the new block B B B , of support X ′ = B X' = B X ′ = B . Lemma 40 keeps the current set pure-cubic odd and adds B B B to its block set, so the final set has the moments of the layer and represents it (Fact 15 ). Case (i) adds 6 to the weight and case (ii) adds 4. The tree F q F_q F q has one edge fewer than the number of blocks containing q q q , so F F F has 3 m − n = η 3m - n = \eta 3 m − n = η edges, and there are m − 1 − η m - 1 - \eta m − 1 − η splices between components. The weight is therefore 7 + 4 η + 6 ( m − 1 − η ) 7 + 4\eta+ 6(m - 1 - \eta) 7 + 4 η + 6 ( m − 1 − η ) , once each splice is shown to meet the hypotheses of its case.
The first block of a component shares no qubit with the placed blocks, since blocks in different components are disjoint, so case (i) applies with any placed y y y , which misses B B B . Now let B B B be the child of K K K in F c F_c F c . Suppose a placed block B ′ B' B ′ contains a qubit q ≠ c q \ne c q = c of B B B . Then B ′ ≠ K B' \ne K B ′ = K , since K K K already meets B B B in c c c and the overlap is linear. The tree F q F_q F q joins B B B to B ′ B' B ′ by a path whose first edge is labelled q q q . The placed blocks of the component form a subtree of F F F that contains K K K and not B B B , so B B B also reaches B ′ B' B ′ by a path whose first edge is B K BK B K , labelled c c c . These are two different paths in the forest F F F , a contradiction. Hence the placed support meets B B B in { c } \{c\} { c } alone, and any placed y y y with c ∉ y c \notin y c ∈ / y misses B B B .
It remains to find y y y with c ∉ y c \notin y c ∈ / y and y y y , y ∪ { c } y \cup\{c\} y ∪ { c } both in the current set. For a placed block K K K , let y K y_K y K be the y y y of the splice that placed it, with y K = ∅ y_K = \varnothing y K = ∅ for the very first block. The first block of a later component is placed by case (i), so its y K y_K y K is the y y y used there. For a block K K K with a parent, let c K c_K c K be the qubit joining them. Call a pair ( σ ∪ y K , σ ∪ { c } ∪ y K ) (\sigma\cup y_K, \sigma\cup\{c\} \cup y_K) ( σ ∪ y K , σ ∪ { c } ∪ y K ) with ∅ ≠ σ ⊆ K ∖ { c } \varnothing\ne\sigma\subseteq K \setminus\{c\} ∅ = σ ⊆ K ∖ { c } a port of K K K for c c c . It is a valid choice of y y y for a child of K K K through c c c , since y K y_K y K is disjoint from K K K by the hypothesis of Lemma 40, so c ∉ σ ∪ y K c \notin\sigma\cup y_K c ∈ / σ ∪ y K . The current set satisfies the following invariant for every placed block K K K .
( ∗ ) (*) ( ∗ ) Until the component of K K K is complete, the current set contains σ ∪ y K \sigma\cup y_K σ ∪ y K for every σ ∈ CCZ ( K ) \sigma\in\operatorname{CCZ}(K) σ ∈ CCZ ( K ) , except σ = { c K } \sigma= \{c_K\} σ = { c K } when K K K has a parent and except the two parities of each port of K K K already used by a child.
Indeed, a later splice deletes only its own y y y and the parity y ∪ { c } y \cup\{c\} y ∪ { c } it cancels, and the ports used are disjoint. By the count in Lemma 40, the lifts added at each splice differ from every parity already present except the one cancelled, so parities emitted for different blocks stay distinct and no splice below another block removes a parity of K K K .
By ( ∗ ) (*) ( ∗ ) it suffices that the children of K K K can be given disjoint ports that avoid the parity { c K } ∪ y K \{c_K\} \cup y_K { c K } ∪ y K . A root K = { a , b , c } K = \{a,b,c\} K = { a , b , c } has at most three children and a block K = { c K , u , v } K = \{c_K,u,v\} K = { c K , u , v } with a parent has at most two. The table gives, for each pattern of children, the port assigned to each child in order, written before the lift by y K y_K y K .
Table 1 (PDF p. 27).
Every other pattern at a root is one of the three root rows, or a subset of one, after relabelling, and the remaining patterns at a non-root block follow by exchanging u u u and v v v . In every row the ports are disjoint and none contains the parity { c K } \{c_K\} { c K } .
The degree bound in the hypothesis is used only through the table in the proof, which handles at most three neighbors per block. With η = 0 \eta= 0 η = 0 and F F F edgeless the proposition splices the m m m blocks by case (i) into a representation of weight 7 + 6 ( m − 1 ) = 6 m + 1 7 + 6(m - 1) = 6m + 1 7 + 6 ( m − 1 ) = 6 m + 1 , the upper bound of Theorem 35 . It also covers the chain layer B i = { c i − 1 , u i , c i } B_i = \{c_{i-1},u_i,c_i\} B i = { c i − 1 , u i , c i } on n = 2 m + 1 n = 2m + 1 n = 2 m + 1 qubits, the CCZ layer on the carry triples of a ripple-carry adder (not the adder itself, which reuses each carry as the next control). Each carry c i c_i c i with 1 ≤ i < m 1 \le i < m 1 ≤ i < m lies in B i B_i B i and B i + 1 B_{i+1} B i + 1 only, so F F F is the path B 1 , … , B m B_1,\ldots,B_m B 1 , … , B m , and the CCZ layer on these blocks has T T T -count 4 m + 3 4m + 3 4 m + 3 for every m m m . Figure 4 draws the forest for this chain.
Figure 4. The splice forest of Proposition 41 on a chain layer of four blocks B i = { c i − 1 , u i , c i } B_i = \{c_{i-1}, u_i, c_i\} B i = { c i − 1 , u i , c i } , together with a disjoint fifth block. Each block is drawn as a triangle on its three qubits. Below, the forest F F F has one edge per shared carry, labelled by that carry. Splicing a child along an edge of F F F is case (ii) of Lemma 40 and adds 4 T T T s. A block that starts a new component is spliced by case (i) and adds 6. The first block costs 7.
The block-overlap graph of a layer has the blocks as vertices, two blocks adjacent when they share a qubit. For a connected component C C C of it, write m C m_C m C for its blocks, n C n_C n C for its qubits and η C = 3 m C − n C \eta_C = 3m_C - n_C η C = 3 m C − n C for its excess incidences. The edges of F F F inside C C C number η C \eta_C η C . A connected component always has η C ≥ m C − 1 \eta_C \ge m_C - 1 η C ≥ m C − 1 , so the construction needs η C = m C − 1 \eta_C = m_C - 1 η C = m C − 1 for every C C C , and in addition a choice of the trees F q F_q F q whose union has maximum degree at most three. The global inequality η ≤ m − 1 \eta\le m - 1 η ≤ m − 1 does not suffice, since a triangle of blocks placed beside a disjoint fourth block satisfies it while its triangle component does not.
Remark 42 (the sharing floor on a component with η C ≥ m C \eta_C \ge m_C η C ≥ m C ). Once some component has η C ≥ m C \eta_C \ge m_C η C ≥ m C no forest exists, and the floor can fail to be attained. The smallest instance is a triangle of blocks, { 0 , 1 , 2 } , { 0 , 3 , 4 } , { 1 , 3 , 5 } \{0,1,2\}, \{0,3,4\}, \{1,3,5\} { 0 , 1 , 2 } , { 0 , 3 , 4 } , { 1 , 3 , 5 } on n = 6 n = 6 n = 6 . The overlap is linear and the radical is trivial, so Lemma 38 gives 6 m + 1 − 2 η = 13 6m + 1 - 2\eta= 13 6 m + 1 − 2 η = 13 , but exact Reed–Muller coset decoding returns δ = 15 \delta= 15 δ = 15 . The canonical residue has weight 15 and is its own coset leader, so the ceiling of Proposition 32 certifies the same value from above and the bracket is [ 13 , 15 ] [13, 15] [ 13 , 15 ] with δ \delta δ at its upper end. Up to relabelling the only other linear covering pattern at n ≤ 6 n \le6 n ≤ 6 with η ≥ m \eta\ge m η ≥ m , the four blocks { 0 , 1 , 2 } \{0, 1, 2\} { 0 , 1 , 2 } , { 0 , 3 , 4 } \{0, 3, 4\} { 0 , 3 , 4 } , { 1 , 3 , 5 } \{1, 3, 5\} { 1 , 3 , 5 } , { 2 , 4 , 5 } \{2, 4, 5\} { 2 , 4 , 5 } , also has floor 13 and δ = 15 \delta= 15 δ = 15 , while every pattern at n ≤ 6 n \le6 n ≤ 6 with η ≤ m − 1 \eta\le m - 1 η ≤ m − 1 attains the floor.
When η C = m C − 1 \eta_C = m_C - 1 η C = m C − 1 , any choice of the trees F q F_q F q inside C C C has union a spanning tree of the blocks of C C C , so for m C ≤ 4 m_C \le4 m C ≤ 4 the degree condition holds automatically. In general it is not implied by η C = m C − 1 \eta_C = m_C - 1 η C = m C − 1 . Suppose one qubit lies in three blocks and each other qubit of those blocks lies in one further block (m = 9 m = 9 m = 9 , n = 19 n = 19 n = 19 ). Then η C = m C − 1 \eta_C = m_C - 1 η C = m C − 1 , but every choice of the trees F q F_q F q gives some block four neighbors in F F F .
Remark 42 and a search of small covering patterns (in the supplementary notes [10 ] ) support the following dichotomy.
Conjecture 43 (dichotomy for the sharing floor). A linear-overlap layer attains 6 m + 1 − 2 η 6m + 1 - 2\eta 6 m + 1 − 2 η if and only if every connected component of its block-overlap graph satisfies η C = m C − 1 \eta_C = m_C - 1 η C = m C − 1 .
The example with m = 9 m = 9 m = 9 above shows that the routing of Proposition 41 does not prove the “if” direction in general.
Controlled unitaries
Campbell and Howard determined the T T T -count of every controlled diagonal Clifford exactly [2 Thm. 5] . We compare the floor with their count.
Write the target as the square of a diagonal level-three gate U t U_t U t , as in their theorem. The quantity μ \mu μ below counts the T T T gates that U t U_t U t needs once its CCZ content is free. It depends only on the order-one and order-two phases of U t U_t U t , which are the only phases of U t U_t U t that survive in U t 2 U_t^2 U t 2 .
Proposition 44 (the floor on controlled unitaries). Let U = ∣ 0 ⟩ ⟨ 0 ∣ ⊗ I + ∣ 1 ⟩ ⟨ 1 ∣ ⊗ U t 2 U = |0\rangle\langle0| \otimes I + |1\rangle\langle1| \otimes U_t^2 U = ∣0 ⟩ ⟨ 0∣ ⊗ I + ∣1 ⟩ ⟨ 1∣ ⊗ U t 2 , controlled on a control qubit h h h , with U t U_t U t a diagonal level-three gate on the other n − 1 n - 1 n − 1 qubits. Then U t 2 U_t^2 U t 2 is a diagonal Clifford with trivial global phase. Let μ \mu μ be the least T T T -count of U t U_t U t up to CCZ gates. Suppose U U U is not Clifford. If U U U is pure-cubic, its isotropy floor is 2 μ + 1 2\mu+ 1 2 μ + 1 . Otherwise it is 2 μ 2\mu 2 μ .
Proof. We compute the moments of U U U and express μ \mu μ through Lempel’s theorem by the rank of the matrix Γ \Gamma Γ of order-≤ 2 \le2 ≤ 2 moments of U t U_t U t . The radical R ∗ R^* R ∗ , which gives the floor, then follows from Γ \Gamma Γ . The normalization of U t 2 U_t^2 U t 2 is that of [2 Thm. 5] . Over Z \mathbb{Z} Z , the parity y ⋅ x ∈ { 0 , 1 } y \cdot x \in\{0,1\} y ⋅ x ∈ { 0 , 1 } equals ∑ ∅ ≠ A ⊆ y ( − 2 ) ∣ A ∣ − 1 ∏ a ∈ A x a \sum_{\varnothing\ne A \subseteq y}(-2)^{|A|-1}\prod_{a\in A}x_a ∑ ∅ = A ⊆ y ( − 2 ) ∣ A ∣ − 1 ∏ a ∈ A x a , by induction from u ⊕ v = u + v − 2 u v u\oplus v=u+v-2uv u ⊕ v = u + v − 2 uv . If ϕ A \phi_A ϕ A is the coefficient of ∏ a ∈ A x a \prod_{a\in A}x_a ∏ a ∈ A x a in a phase polynomial ∑ y α y ( y ⋅ x ) \sum_y\alpha_y(y\cdot x) ∑ y α y ( y ⋅ x ) , then ϕ A ≡ ( − 2 ) ∣ A ∣ − 1 ∑ y ⊇ A α y ( m o d 8 ) \phi_A\equiv(-2)^{|A|-1}\sum_{y\supseteq A}\alpha_y\pmod{8} ϕ A ≡ ( − 2 ) ∣ A ∣ − 1 ∑ y ⊇ A α y ( mod 8 ) for ∣ A ∣ ≤ 3 |A|\leq3 ∣ A ∣ ≤ 3 , and the moment of the gate is M A = ( ϕ A / 2 ∣ A ∣ − 1 ) m o d 2 M_A=(\phi_A/2^{|A|-1})\bmod2 M A = ( ϕ A / 2 ∣ A ∣ − 1 ) mod 2 .
The phase of U t U_t U t is g = ∑ i g i x i + ∑ i < j g i j x i x j + ∑ i < j < k g i j k x i x j x k g=\sum_i g_i x_i+\sum_{i<j}g_{ij}x_ix_j+\sum_{i<j<k}g_{ijk}x_ix_jx_k g = ∑ i g i x i + ∑ i < j g ij x i x j + ∑ i < j < k g ij k x i x j x k with every g i j g_{ij} g ij even and every g i j k ≡ 0 ( m o d 4 ) g_{ijk}\equiv0\pmod{4} g ij k ≡ 0 ( mod 4 ) , so U t 2 U_t^2 U t 2 has phase 2 ∑ i λ i x i + 4 ∑ i < j β i j x i x j 2\sum_i\lambda_i x_i+4\sum_{i<j}\beta_{ij}x_ix_j 2 ∑ i λ i x i + 4 ∑ i < j β ij x i x j with λ i = g i m o d 4 \lambda_i=g_i\bmod4 λ i = g i mod 4 and β i j = g i j / 2 m o d 2 \beta_{ij}=g_{ij}/2\bmod2 β ij = g ij /2 mod 2 . The phase of U U U is therefore
ϕ = x h ( 2 ∑ i λ i x i + 4 ∑ i < j β i j x i x j ) . \phi=x_h\left(2\sum_i\lambda_i x_i+4\sum_{i<j}\beta_{ij}x_ix_j\right). ϕ = x h ( 2 i ∑ λ i x i + 4 i < j ∑ β ij x i x j ) .
and its only nonzero moments are M { h , i } = θ i : = λ i m o d 2 M_{\{h,i\}}=\theta_i:=\lambda_i\bmod2 M { h , i } = θ i := λ i mod 2 and M { h , i , j } = β i j M_{\{h,i,j\}}=\beta_{ij} M { h , i , j } = β ij . Let Γ \Gamma Γ be the symmetric ( n − 1 ) × ( n − 1 ) (n-1)\times(n-1) ( n − 1 ) × ( n − 1 ) matrix with Γ i i = θ i \Gamma_{ii}=\theta_i Γ ii = θ i and Γ i j = β i j \Gamma_{ij}=\beta_{ij} Γ ij = β ij . It is the matrix of order-≤ 2 \leq2 ≤ 2 moments of U t U_t U t , and Γ ≠ 0 \Gamma\ne0 Γ = 0 because U U U is not Clifford.
A product of CCZ gates changes only order-3 moments, and every order-3 moment vector is that of such a product (Fact 15). Hence μ \mu μ is the least number of parities of F 2 n − 1 \mathbb{F}_2^{n-1} F 2 n − 1 with order-≤ 2 \leq2 ≤ 2 moments Γ \Gamma Γ , that is, the least number of rows of a matrix Y Y Y with Y ⊤ Y = Γ Y^\top Y=\Gamma Y ⊤ Y = Γ in the convention of Appendix B, the quantity μ [ U t ] \mu[U_t] μ [ U t ] of [2 ] . By Lempel’s theorem [26 ] this is rank Γ \Gamma Γ when Γ \Gamma Γ has a nonzero diagonal entry and rank Γ + 1 \Gamma+1 Γ + 1 otherwise. When U U U is pure-cubic every θ i \theta_i θ i vanishes, so Γ \Gamma Γ is alternating, its rank is even and μ \mu μ is odd. The floor 2 μ + 1 2\mu+1 2 μ + 1 is then consistent with the exact count of [2 Thm. 5] .
A vector w = ( w ′ , w h ) w=(w',w_h) w = ( w ′ , w h ) lies in R ∗ R^* R ∗ when ∑ b w b M { b , p , q } = 0 \sum_b w_bM_{\{b,p,q\}}=0 ∑ b w b M { b , p , q } = 0 for all p , q p,q p , q . Taking p , q ≠ h p,q\ne h p , q = h gives w h Γ p q = 0 w_h\Gamma_{pq}=0 w h Γ pq = 0 , so w h = 0 w_h=0 w h = 0 . Taking p = h p=h p = h and q = j ≠ h q=j\ne h q = j = h then gives ( Γ w ′ ) j = 0 (\Gamma w')_j=0 ( Γ w ′ ) j = 0 . Taking p = q = h p=q=h p = q = h gives θ ⋅ w ′ = 0 \theta\cdot w'=0 θ ⋅ w ′ = 0 , which follows from Γ w ′ = 0 \Gamma w'=0 Γ w ′ = 0 , since θ ⋅ x = x ⊤ Γ x = 0 \theta\cdot x=x^\top\Gamma x=0 θ ⋅ x = x ⊤ Γ x = 0 for every x ∈ ker Γ x\in\ker\Gamma x ∈ ker Γ . Hence R ∗ = ker Γ × { 0 } R^*=\ker\Gamma\times\{0\} R ∗ = ker Γ × { 0 } and n − d ∗ = rank Γ + 1 n-d^*=\operatorname{rank}\Gamma+1 n − d ∗ = rank Γ + 1 .
If θ ≠ 0 \theta\ne0 θ = 0 , the gate is not pure-cubic. Its quadratic moment matrix is then nonzero only in row and column h h h , where it equals θ \theta θ . Hence r = 2 r=2 r = 2 , and the floor is 2 ( rank Γ + 1 ) − 2 = 2 rank Γ = 2 μ 2(\operatorname{rank}\Gamma+1)-2=2\operatorname{rank}\Gamma=2\mu 2 ( rank Γ + 1 ) − 2 = 2 rank Γ = 2 μ . If θ = 0 \theta=0 θ = 0 , the gate is pure-cubic with R = R ∗ R=R^* R = R ∗ , so by Corollary 23 its floor is 2 ( n − d ) + 1 = 2 rank Γ + 3 2(n-d)+1=2\operatorname{rank}\Gamma+3 2 ( n − d ) + 1 = 2 rank Γ + 3 . Then Γ \Gamma Γ has zero diagonal and μ = rank Γ + 1 \mu=\operatorname{rank}\Gamma+1 μ = rank Γ + 1 , so the floor is 2 μ + 1 2\mu+1 2 μ + 1 .
Campbell and Howard’s controlled-unitary theorem [2 Thm. 5] gives the exact count 2 μ 2\mu 2 μ when μ \mu μ is even and 2 μ + 1 2\mu+1 2 μ + 1 when μ \mu μ is odd. The floor is therefore exact on every pure-cubic controlled unitary, the fan-out included, and on every controlled unitary with μ \mu μ even. It is one below the exact count otherwise. The missing unit is the parity step of their converse [2 App. C] .
Applications
This appendix applies the floor to the multiplication oracles of GF ( 2 k ) \operatorname{GF}(2^k) GF ( 2 k ) and then certifies the output of two circuit optimizers block by block.
Field multiplication
Multiplication in GF ( 2 k ) \operatorname{GF}(2^k) GF ( 2 k ) is the inner loop of binary-field elliptic-curve arithmetic [38 ] . Its phase oracle is a trilinear form, so the floor applies directly. Throughout this subsection x x x , y y y and z z z are the three k k k -qubit registers of the oracle, so here y y y is a register and not a parity y j y_j y j of a representation.
Proposition 45 (floor for field-multiplication oracles). Let U k ∣ x , y , z ⟩ = ( − 1 ) z ⋅ ( x ∗ y ) ∣ x , y , z ⟩ U_k|x,y,z\rangle=(-1)^{z\cdot(x*y)}|x,y,z\rangle U k ∣ x , y , z ⟩ = ( − 1 ) z ⋅ ( x ∗ y ) ∣ x , y , z ⟩ be the multiplication phase oracle of GF ( 2 k ) \operatorname{GF}(2^k) GF ( 2 k ) on n = 3 k n=3k n = 3 k qubits (* the field product, ⋅ \cdot ⋅ the coordinate dot). Then U k U_k U k is pure-cubic with a non-degenerate tensor, and δ ( U k ) ≥ 6 k + 1 \delta(U_k)\geq6k+1 δ ( U k ) ≥ 6 k + 1 .
Proof. The phase is the trilinear form z ⋅ ( x ∗ y ) z \cdot(x * y) z ⋅ ( x ∗ y ) , homogeneous cubic, so the gate is pure-cubic with T x q y r z l = [ bit l of e q ∗ e r ] T_{x_qy_rz_l} = [\text{bit }l\text{ of }e_q * e_r] T x q y r z l = [ bit l of e q ∗ e r ] and no other entries across registers. Let w = ( w x , w y , w z ) ∈ R w=(w_x,w_y,w_z)\in R w = ( w x , w y , w z ) ∈ R . Contracting against the pairs ( y r , z l ) (y_r,z_l) ( y r , z l ) gives 0 = ∑ q ( w x ) q T x q y r z l = bit l of ( w x ∗ e r ) 0=\sum_q (w_x)_qT_{x_qy_rz_l}=\text{bit }l\text{ of }(w_x*e_r) 0 = ∑ q ( w x ) q T x q y r z l = bit l of ( w x ∗ e r ) for all r , l r,l r , l , so w x ∗ e r = 0 w_x*e_r=0 w x ∗ e r = 0 for every basis element. A field has no zero divisors, so w x = 0 w_x=0 w x = 0 . Symmetrically w y = 0 w_y=0 w y = 0 , and contracting against ( x q , y r ) (x_q,y_r) ( x q , y r ) gives w z ⋅ ( e q ∗ e r ) = 0 w_z\cdot(e_q*e_r)=0 w z ⋅ ( e q ∗ e r ) = 0 with the products spanning GF ( 2 k ) \operatorname{GF}(2^k) GF ( 2 k ) (for fixed r r r the products e q ∗ e r e_q*e_r e q ∗ e r form a basis, as multiplication by e r ≠ 0 e_r\ne0 e r = 0 is invertible), so w z = 0 w_z=0 w z = 0 . Hence d = 0 d=0 d = 0 and Theorem 22 gives δ ≥ 2 n + 1 = 6 k + 1 \delta\ge2n+1=6k+1 δ ≥ 2 n + 1 = 6 k + 1 .
Remark 46 (the GF(4) multiplier). At k = 1 k=1 k = 1 the oracle is CCZ and the floor 7 is tight. At k = 2 k=2 k = 2 the lower bounds are the nullity 6 and the isotropy floor 6 k + 1 = 13 6k+1=13 6 k + 1 = 13 . Exact Reed–Muller coset decoding shows that the merged phase-polynomial residue of weight 17 is its own coset leader, so δ ( U 2 ) = 17 \delta(U_2)=17 δ ( U 2 ) = 17 and the term-by-term expansion is optimal once parities are merged. The unmerged schoolbook expansion has weight 35.
Since δ ( U ) \delta(U) δ ( U ) is the symmetric rank of the signature tensor (Appendix § 5 ), the value 17 was already established by AlphaTensor-Quantum [6 ] , whose Z3 search finds no symmetric decomposition of that tensor with fewer terms. The coset decoding reproduces it independently. The value certifies published circuits optimal within a natural class. The reversible multiplier ∣ x , y , z ⟩ ↦ ∣ x , y , z ⊕ x ∗ y ⟩ \lvert x,y,z\rangle\mapsto\lvert x,y,z\oplus x*y\rangle ∣ x , y , z ⟩ ↦ ∣ x , y , z ⊕ x ∗ y ⟩ is U k U_k U k conjugated by Hadamards on the output register, so no multiplier circuit whose Hadamards all lie in those two layers uses fewer than δ ( U k ) \delta(U_k) δ ( U k ) T T T gates. The best published T T T -count for the GF(4) multiplier is 17, both from a subquadratic multiplier with the FastTODD optimizer [23 ] and from AlphaTensor-Quantum [6 ] .
Remark 47 (linear growth of field-oracle T T T -counts). The floor 6 k + 1 6k+1 6 k + 1 is linear while the explicit circuits are not: schoolbook multiplication uses Θ ( k 2 ) \Theta(k^2) Θ ( k 2 ) CCZs and Karatsuba-style circuits Θ ( k 1.58 ) \Theta(k^{1.58}) Θ ( k 1.58 ) [39 , 40 ] . The T T T -count itself is nevertheless linear in k k k , as the tensor rank shows. Write μ 2 ( k ) \mu_2(k) μ 2 ( k ) for the tensor rank of GF ( 2 k ) \operatorname{GF}(2^k) GF ( 2 k ) multiplication as an F 2 \mathbb{F}_2 F 2 -bilinear map. The T T T -count is within a factor 7 of it,
μ 2 ( k ) ≤ δ ( U k ) ≤ 7 μ 2 ( k ) . \mu_2(k)\le\delta(U_k)\le7\mu_2(k). μ 2 ( k ) ≤ δ ( U k ) ≤ 7 μ 2 ( k ) .
For the lower bound, restrict a representation’s cubic tensor to index triples with one leg in each register. The restriction is the multiplication tensor, so the number of parities is at least its rank. For the upper bound, a rank-μ \mu μ decomposition T = ∑ i = 1 μ a i ⊗ b i ⊗ c i T=\sum_{i=1}^{\mu}a_i\otimes b_i\otimes c_i T = ∑ i = 1 μ a i ⊗ b i ⊗ c i rewrites the phase as ∑ i ( a i ⋅ x ) ( b i ⋅ y ) ( c i ⋅ z ) \sum_i(a_i\cdot x)(b_i\cdot y)(c_i\cdot z) ∑ i ( a i ⋅ x ) ( b i ⋅ y ) ( c i ⋅ z ) , a product of μ \mu μ gates, each a CCZ on three linear forms in different registers (a CCZ conjugated by CNOT gates) contributing seven parities. Since μ 2 ( k ) = Θ ( k ) \mu_2(k)=\Theta(k) μ 2 ( k ) = Θ ( k ) over F 2 \mathbb{F}_2 F 2 for every extension degree, by a Chudnovsky-type algorithm on a descent of a Garcia–Stichtenoth tower [41 , 42 ] , we get δ ( U k ) = Θ ( k ) \delta(U_k)=\Theta(k) δ ( U k ) = Θ ( k ) . The floor therefore has the right order of growth. The known constants in the linear bound are too large to compete with the explicit circuits.
Sharper floors from the ranks of individual slices, and brackets against the best published multipliers, will appear with the Toffoli-count bounds of §4.
Certifying the optimizers
This subsection is the record behind § 2.7 . The method runs PyZX’s TODD-based phase-block optimizer (PyZX 0.10.3, phase_block_optimize) on each circuit of the Feynman suite (commit d2c382a2). The run takes every circuit with input T T T -count at most 400, one circuit per process under a four-minute cutoff. Of the 21 circuits left out, 18 exceed the T T T -count limit and three (gf2^6_mult, gf2^7_mult and qcla_adder_10) reach the cutoff. The scripts, logs and per-block records are in the repository [43 ] . The phase-block optimizer shuffles matrix columns at random, so each circuit is run at seeds 0 to 4. We report seed 4, whose outputs have the lowest total T T T -count (1878, against 1880 to 1891). It is also the seed with the most certified blocks. Across the five seeds the outputs have 309 to 311 blocks, of which the floor certifies between 186 and 193 and nullity between 111 and 114. Among blocks with at least four T T T gates the floor certifies 116 to 123 and nullity 40 to 44. Table 4 shows eight representative circuits. The optimized circuit is partitioned with PyZX’s own greedy block rule. Each block’s phase polynomial is bounded with the floor 2 ( n − d ∗ ) − r 2(n-d^*)-r 2 ( n − d ∗ ) − r , or 2 ν + 1 2\nu+1 2 ν + 1 on the pure-cubic locus, and exact coset decoding is added whenever a block has at most six active qubits.
Table 4. Eight representative circuits of the suite at seed 4. The totals row is over all 24 circuits that the phase-block optimizer finishes within the cutoff, and the full table is in the supplementary notes [10 ] . Certified counts blocks whose floor equals their count, and by ν \nu ν those that stabilizer nullity alone certifies. T T T merged is the count after parities are merged inside each block, and max gap the largest per-block difference between that count and the floor. Decoded counts blocks small enough to decode exactly, at floor those whose exact count equals the floor, and at count those whose exact count equals the optimizer’s.
A certified block has T T T -count equal to δ \delta δ of its diagonal, so for this block partition and these Hadamard positions no { C N O T , T } \{\mathrm{CNOT},T\} { CNOT , T } resynthesis of the block uses fewer T T T gates. Every exact value falls inside the bracket. None of the certified blocks is pure-cubic, so every certificate comes from the general floor of Theorem 25 . The block floors bound only circuits on the same qubits with the same partition.
Two circuits show what lies outside that scope. On csum_mux_9 the block floors sum to 73, while AlphaTensor-Quantum reports 71 using 42 qubits instead of 30 [6 ] . The twelve multipliers and mod5_4 are the only circuits of the suite that are mismatch-free as a whole, meaning that no Toffoli uses an earlier target as a control. On mod5_4 a Hadamard on one wire turns the circuit into a CNOT network times a pure-cubic diagonal gate with d = 2 d=2 d = 2 , whose floor 2 ( 5 − 2 ) + 1 = 7 2(5-2)+1=7 2 ( 5 − 2 ) + 1 = 7 is the optimum AlphaTensor-Quantum reports from a Z3 search [6 ] . The phase-block optimizer splits mod5_4 into two blocks of total T T T -count 8, one above this whole-circuit optimum, so its two certificates hold relative to that block partition.
In the G F ( 2 k ) \mathrm{GF}(2^k) GF ( 2 k ) multipliers every Toffoli targets the output register, which is never used as a control. The files group the Toffolis into two blocks, each conjugated by Hadamards on the output register, with the CNOT network of the modular reduction on that register between them. Conjugated by those Hadamards the reduction network is again a CNOT network, so the circuit is a Hadamard layer, a CNOT network times a diagonal gate, and a Hadamard layer. It maps ∣ x , y , z ⟩ ↦ ∣ x , y , L z ⊕ x ∗ y ⟩ |x,y,z\rangle\mapsto|x,y,Lz\oplus x*y\rangle ∣ x , y , z ⟩ ↦ ∣ x , y , L z ⊕ x ∗ y ⟩ for an invertible L L L , which is the multiplier up to a CNOT network on the output, so Remark 46 applies to it. The structure and the radical are checked for all twelve benchmark multipliers, k = 4 k=4 k = 4 to 256 [43 ] .
Every pure-cubic block small enough to decode is suboptimal. There are three, a single CCZ up to CNOTs in the phase-block optimizer’s output for grover_5 and blocks of mod5_4 and csum_mux_9 in the output of phase teleportation. Each carries one T T T gate more than its floor 2 ν + 1 2\nu+ 1 2 ν + 1 , and decoding shows that the floor is its exact count. Among the 239 blocks with at least four T T T gates (not the decoded blocks of Table 5 ), the floor certifies 121 and nullity 41, and the largest certified block has 22 T T T gates. Exact decoding is affordable up to six active qubits, and the floor matters most beyond that. Of the 72 blocks with 7 to 28 active qubits it certifies 37, against 15 for nullity. Phase teleportation [44 ] gives a similar picture, with 252 of 337 blocks certified on 27 circuits against 141 for nullity (248 of 318 on the 24 circuits both optimizers finish), 125 against 14 among blocks with at least four T T T gates, and 33 against 17 among the 61 blocks beyond decoding (7 to 34 active qubits), the largest with 36 T T T gates on 23 active qubits. For the 515 blocks small enough to decode exactly, the floor was never more than two below the true count.
Table 5. The distance from the floor to the exact T T T -count, over every block with at most six active qubits, where exact coset decoding is affordable. Distance 0 means the floor is exact on the block.
Since the floor is never below ν \nu ν (Corollary 29 ), every block that nullity certifies is certified by the floor too. Exact decoding finds five suboptimal blocks, one each in grover_5, ham15-low and mod_mult_55 and two in hwb6, and saves 8 T T T gates on them. The two largest gaps, 51 on gf2^5_mult and 25 on gf2^4_mult, are on multipliers, where the single block carries the floor 6 k + 1 6k + 1 6 k + 1 of U k U_k U k .
Table 5 gives the distance from the floor to the exact T T T -count on every block small enough to decode, for both optimizers. On the output of the phase-block optimizer the total gap between block counts and floors is 237 T T T gates. It splits as 81 of floor slack on the 239 decoded blocks, 8 of excess over the optimum on the five suboptimal ones, and 148 on the 72 blocks of 7 to 28 active qubits that decoding cannot reach, of which 35 carry a nonzero gap.
The certificate does not depend on the optimizer. Phase teleportation [44 ] changes only the location and value of phases, so its output is bounded with the same block rule. The per-circuit record for it, and the full version of Table 4 , are in the supplementary notes [10 ] .
Acknowledgments
The author thanks Michele Mosca and Vlad Gheorghiu for hosting and mentoring this work through an undergraduate research award at the University of Waterloo in the summer of 2026, and Matthew Amy for a helpful discussion that motivated the topic.
AI Disclosure
The author conceived the isotropy floor and proved the main results of this paper: the cubic and general lower bounds (Theorems 22 and 25 ), the identity ν = n − d ∗ \nu= n - d^* ν = n − d ∗ (Proposition 28 ), the optimality of the Toffoli layer (Theorem 35 ) and the splicing construction (Proposition 41 ). Generative artificial intelligence tools (Claude Opus 4.5, Claude Opus 5.5 and Claude Fable) assisted with the secondary results, including those of the supplementary notes, with the verification code and the benchmark experiments, and with drafting the text. The author reviewed and verified all of this assistance, including every argument, line of code and passage of text, and takes full responsibility for the content of this work.