Un-Weyl-ing the Clifford Hierarchy

The teleportation model of quantum computation introduced by Gottesman and Chuang (1999) motivated the development of the Clifford hierarchy. Despite its intrinsic value for quantum computing, the widespread use of magic state distillation, which is closely related to this model, emphasizes the importance of comprehending the hierarchy. There is currently a limited understanding of the structure of this hierarchy, apart from the case of diagonal unitaries (Cui et al., 2017; Rengaswamy et al. 2019). We explore the structure of the second and third levels of the hierarchy, the first level being the ubiquitous Pauli group, via the Weyl (i.e., Pauli) expansion of unitaries at these levels. In particular, we characterize the support of the standard Clifford operations on the Pauli group. Since conjugation of a Pauli by a third level unitary produces traceless Hermitian Cliffords, we characterize their Pauli support as well. Semi-Clifford unitaries are known to have ancilla savings in the teleportation model, and we explore their Pauli support via symplectic transvections. Finally, we show that, up to multiplication by a Clifford, every third level unitary commutes with at least one Pauli matrix. This can be used inductively to show that, up to a multiplication by a Clifford, every third level unitary is supported on a maximal commutative subgroup of the Pauli group. Additionally, it can be easily seen that the latter implies the generalized semi-Clifford conjecture, proven by Beigi and Shor (2010). We discuss potential applications in quantum error correction and the design of flag gadgets.


I. INTRODUCTION
Q UANTUM computing provides a fundamentally new approach to computation by exploiting the laws of quantum mechanics that govern our universe. In this computational model, a quantum circuit consists of a sequence of operations each of which is either a quantum gate, characterized by a unitary matrix, or a quantum measurement, characterized by a Hermitian matrix (i.e., an observable) [1]. So, a universal quantum computer must be capable of implementing arbitrary unitary operations and measuring any Hermitian operator on a given set of m qubits. In 1999, Gottesman and Chuang demonstrated that such universal quantum computing can be performed just by using the quantum teleportation protocol if one has access to certain standard resources -Bell-state preparation, Bell-basis measurements, and arbitrary singlequbit rotations [2]. They defined the Clifford hierarchy as part of their proof, and this has proven to be a useful characterization of a large set of unitary operations, both in theory and practice. In fact, in their teleportation model of computation, the level of a unitary in the hierarchy can be interpreted as a measure of complexity of implementing it. Furthermore, this model is closely related to the currently widespread scheme of distilling "magic" states and injecting them via teleportation-like methods in order to fault-tolerantly execute unitary operations on qubits encoded in a quantum error-correcting code [3], [4]. Hence, it is very important to understand the structure of this hierarchy since it has important implications for fault-tolerant quantum computing.
The first level of the hierarchy is the Pauli (or Heisenberg-Weyl) group and the second level is the Clifford group, which is defined as the normalizer of the Pauli group in the unitary group. Subsequent levels C (k) of the hierarchy, for k ≥ 2, are defined recursively as those unitaries that map Pauli matrices to C (k−1) under conjugation [2] (see (23) for the precise definition). While the first two levels form groups, it is known that the higher levels are only finite sets of unitary matrices (up to overall phases) and that even when k → ∞, the hierarchy does not encompass all unitary matrices (see Example II.2). Furthermore, each level is closed under left or right multiplication by Cliffords [5].
It is well-known that the Pauli matrices form an orthonormal basis for all square matrices under the Hilbert-Schmidt inner product [6]. Therefore, a natural question to consider is to determine the Pauli (i.e., Weyl) expansion of all unitaries in the Clifford hierarchy. It is reasonable to expect that the Pauli expansion of elements at a level provides insight into the structure of the hierarchy. Indeed, a subset of the current authors recently identified a special set of diagonal unitary matrices in the hierarchy, called Quadratic Form Diagonal (QFD) gates, and produced formulae for their action on Pauli matrices [7]. In subsequent work, they considered QFD gates constructed as tensor products of integer powers of the "T" gate, T ∶= diag 1, exp iπ 4 . There they examined the result of conjugating Pauli matrices by such gates, and fully characterized the Pauli expansion of the (Clifford) result. Then they used this characterization to understand when such a physical operation preserves the code subspace of a stabilizer quantum error-correcting code [8], [9]. This is fundamental because such codes are necessary to make the quantum computer tolerate noise, and all operations on the encoded information have to be performed by such codespace-preserving physical fault-tolerant operations. Furthermore, for universal quantum computation we need to implement at least one non-Clifford gate, and the T gate is one of the easiest non-Clifford gates to engineer. As a general recipe, one could replace this (tensor product) gate with any high fidelity lab operation and attempt to repeat this process to understand required code structure.
In this paper, we make contributions towards a few related questions about the hierarchy. First, surprisingly, the Pauli support (i.e., the Pauli matrices with non-zero coefficients in the Pauli expansion) of even the well-known Clifford group operations remains unknown. (Note that conjugating a Pauli matrix by the transversal T gate produces a Clifford gate, so the aforementioned result already calculates the Pauli expansion of certain types of Cliffords.) Hence, we study the support of the "elementary" Clifford operations that correspond to the standard Clifford gate-set consisting of Hadamard, Phase, Controlled-NOT (CNOT), and Controlled-Z (CZ) gates.
Second, Zeng et al. [5] considered certain operations called semi-Clifford unitaries in the hierarchy [10], which have the advantage that they require fewer ancillae than general unitaries in the teleportation model of Gottesman and Chuang [11]. They also showed that any semi-Clifford U can be expressed as U = G 1 DG 2 , where D is diagonal and G 1 , G 2 are Clifford operators. Cui et al. [12] have recently characterized the diagonal unitaries in the Clifford hierarchy. We prove a general result that provides an exact decomposition of any semi-Clifford operation in terms of diagonal gates and physical permutation operators composed of CNOTs and Pauli X's. Thus, when combined with [12] and our contribution of characterizing the Pauli support of elementary Cliffords, this essentially produces the Weyl expansion of semi-Cliffords.
Third, Zeng et al. conjectured in the above paper that all unitaries in C (3) are semi-Clifford and all unitaries in C (k) are generalized semi-Clifford for any k. While a semi-Clifford operation maps, by conjugation, a maximal commutative subgroup (MCS) of the Pauli group to another MCS of the Paulis, a generalized semi-Clifford operation maps the span (i.e., complex linear combination) of a MCS to the span of another MCS. It is well-known that for m = 1, 2 qubits all unitaries are semi-Clifford, and for m = 3 qubits the third level is semi-Clifford, so these conjectures are for k = 3 for all m > 3 and for k ≥ 4 for all m ≥ 3, respectively. Gottesman and Mochon have provided a counterexample for C (3) that disproves the semi-Clifford conjecture [13] 1 . Subsequently, Beigi and Shor [14] proved that all unitaries in C (3) are generalized semi-Clifford operations, thereby settling the conjecture. In this paper, we prove the stronger result that for any unitary C from C (3) , there exists a Clifford G such that GC is supported on a MCS of the Pauli group. Our proof uses a much simpler induction argument based on the fact that any third level unitary must map (under conjugation) at least one Pauli to some other Pauli.
Finally, the third level of the hierarchy is of particular interest since any third level gate enables universal quantum computation when combined with the Clifford group [2], [15], [16]. When a C (3) gate acts by conjugation on a Pauli matrix, the result is a Hermitian Clifford, one example being the aforementioned case of choosing a C (3) operation that is a tensor product of integer powers of T. It is well-known that symplectic (or Clifford) transvections form a different generating set for all Cliffords, compared to the standard Clifford gate set mentioned earlier [17], [18], [19]. We prove a necessary and sufficient condition for the Paulis involved in the transvection decomposition of an arbitrary Hermitian Clifford operator. Since expanding the product of transvections provides the Pauli expansion of these Hermitian Cliffords, this can potentially be applied to extend the aforementioned result on characterizing stabilizer codes that support transversal T gates to other gates from C (3) .
As a different application, flag gadgets have recently become popular as a near-term method to detect correlated faults in circuits [20], [21], [22], [23], [24]. The idea is to introduce a multi-qubit Pauli measurement before and after the circuit, using one or more ancilla qubits, such that the extra gadget acts trivially in the case of no errors but catches catastrophic errors otherwise. A key requirement to construct flag gadgets for a specific application circuit is to determine the best Pauli measurement to apply before the circuit and identify the result of "propagating" the Pauli through the circuit, i.e., determine the result of conjugating the Pauli by the circuit. The simplest case is to use a Pauli operator that commutes with the circuit. For this purpose, any Pauli in the centralizer/dual of the support (of the circuit/unitary) would suffice. Hence, our aforesaid results on characterizing Pauli supports can be applied to determine the Paulis that commute with the corresponding circuit. In particular, since flag gadgets are generally applied only to Clifford circuits, our result that any C (3) element is supported on a MCS of the Paulis, up to multiplication by a Clifford, provides a way to determine a Pauli that commutes with a non-Clifford element. Therefore, this insight could be used to design flag gadgets beyond Clifford (subsections of) circuits.

A. The Binary Symplectic Group
We will denote by GL(n) and Sym(n) the groups of n × n invertible and symmetric matrices over the binary field F 2 , respectively. Addition in F 2 will be denoted by ⊕. The binary symplectic group Sp(2m) ⊂ GL(2m) is the set of 2m × 2m binary matrices that preserve the symplectic inner product in F 2m 2 : where In Sp(2m) we distinguish two subgroups: Then every F ∈ Sp(2m) can be Bruhat-decomposed [25], [26] as where with I m r being the block matrix with I r in upper left corner and 0 else and I m −r = I m − I m r . Here r = rank (C). The semidirect product S of S D and S U corresponds to r = 0, that is, symplectic matrices with C = 0. LetS be the subgroup of S consisting of matrices F D (P)F U (S) with P upper triangular. ThenS has size 2 m(m−1) 2 ⋅2 m(m+1) 2 = 2 m 2 and is a 2-Sylow subgroup of Sp(2m) that contains S U .
Another type of decomposition of Sp(2m) can be achieved via symplectic transvections It is well-known that symplectic transvections generate Sp(2m) [17], [18], [19]. It is shown there that a non-hyperbolic involution can be written as product of r transvections T v1 , . . . , T vr , where r = 2m − dim(Fix(F)) = dim(Res(F)) and The vectors v 1 , . . . , v r can be chosen to be independent, in which case we say that corresponding transvections are independent. On the other hand, a hyperbolic involution can be written as a product of r + 1 transvections (r as above) where at least r of them are independent.

B. Quantum Computation
Fix N = 2 m . The standard basis vectors of C N will be indexed by binary vectors and denoted as kets, that is, e v = v⟩, v ∈ F m 2 , will have 1 in the position indexed by v and 0 else. The Heisenberg-Weyl group is defined as where We will denote by PHW N ∶= HW N {±I N , ±iI N } the projective Heisenberg-Weyl group. Directly by definition, we have We will also define E(a, b) ∶= i ab t D(a, b), which constitute the Hermitian matrices in HW N . If follows by (11) that such matrices satisfy where we view all binary vectors as integer vectors and operations are done modulo 4; see [7, Rem. 1] for the meaning of E(a, b) with (a, b) ∈ Z 2m 4 . If the arithmetic of the arguments of operators E(a, b) were to be done modulo 2 one would have Above, the asterisk stands for the coordinate-wise product. We see that binary arithmetic only ever introduces an additional sign. Thus when the sign is not relevant (e.g., (25)) we will stick to binary arithmetic.
A stabilizer is a commutative subgroup of HW N generated by Hermitian matrices of form ±E(a, b) that does not contain −I N . Thus either E or −E belong to a stabilizer, but not both.
where A and B are k × m matrices obtained by stacking a i 's and b i 's. Since S is abelian, the matrix C = (A B) satisfies CΩC t = 0, and thus the row space of C, denoted rs C, is a self-orthogonal (isotropic) subspace of F 2m 2 , with respect to the symplectic inner product. A maximal stabilizer, or a maximal commutative subgroup (MCS) is a stabilizer of size 2 m . Of particular interest are MCSs We will refer to their elements as X stabilizers and Z stabilizers, respectively. Naturally, we identify X stabilizers with vectors (a, 0) ∈ F 2m 2 and Z stabilizers with vectors is a projection onto F + (S d ), which in turn gives a resolution of the identity [1, Sec. 10.5]:

C. The Clifford Hierarchy
The Clifford hierarchy {C (k) , k ≥ 1} is defined recursively, where the first level is the Heisenberg-Weyl group, and higher levels are defined by By definition, the Clifford group Cliff N is the second level of the hierarchy up to overall phases, that is Cliff N ∶= C (2) U(1).
The following example shows that the Clifford hierarchy does not exhaust U(N ) and also motivates the Weyl expansion.
Thus, since multiplication by Paulis (or even Cliffords) preserves the level, iterative conjugation cannot bring E up to the same level as W.
Let {e 1 , . . . , e 2m } be the standard basis of F 2m 2 , and con- Then the matrix F G whose ith row is c i is a symplectic matrix such that for all c ∈ F 2m 2 . We thus have a group homomorphism In addition, Φ is surjective with kernel ker Φ = PHW N [27], and thus Cliff N PHW N ≅ Sp(2m). Given the decomposition (5), one is naturally interested on preimages of respective symplectic matrices via Φ. Namely, the unitary matrices where H 2 is the 2 × 2 Hadamard matrix, correspond to F D (P), F U (S), and F Ω (r), respectively [28]. Strictly speaking, a preimage Φ −1 (F) is meant up to HW N (and up to a eighth root of unity which we have disregarded throughout [29]).
It follows that Φ(G v ) = T v , and any Clifford transvection is of this form (up to HW N ).
In addition, we mentioned that Sp(2m) is generated by transvections, thus G ∈ Cliff N is a product of Clifford transvections. We have proved the following.
Proposition II.4. Any Clifford matrix G ∈ Cliff N can be written as where S = ⟨E 1 , . . . , E k ⟩ and α E ∈ C.
One of the goals of this paper is to determine the α E 's produced by Clifford matrices. In particular we will see that if E 1 , . . . , E k are independent then α E ∈ {±1, ±i} ; see (62)-(63). If G is Hermitian then F G is an involution, and thus k ∈ {r, r + 1} where r = 2m − dim(Fix(F G )) with at least r transvections being independent.

III. SUPPORT OF THE CLIFFORD GROUP
The set Thus any matrix M ∈ M N (C) is a linear combination We are interested in sums of Pauli matrices that yield Clifford matrices. The support of M ∈ M N (C) as in (32) with respect to E N is defined as When dealing with the support, we will conveniently switch between the two equivalent definitions. Thus E(c) ∈ supp(M) iff Tr(M † E(c)) ≠ 0. We say in this case that M is supported on supp(M).
Thus, to avoid the additional scaling factor, we will use matrices D(c) when computing supports/traces. Corollary III.2. Any Clifford matrix G is supported either on a group S or on a coset E 0 S depending on whether G has trace or not.
Proof. Observe that E ∈ HW N is traceless unless E = I N . Thus, for G as in (30) we have that Tr(G) ≠ 0 iff E 0 ∈ S. It also follows that supp(G) = E 0 S. Remark III.3. One can easily construct non-Clifford matrices supported on a subgroup. For instance, it follows easily from Proposition III.9 that T ⊗m is supported on the subspace {0}× F m 2 , or alternatively, on the subgroup Z N of diagonal Paulis. Thus, Corollary III.2 does not completely characterize Cliff N . In fact, for any G ∈ Cliff N , we have which implies that the support of G is an invariant subspace of F G .
By definition, in order to understand G ∈ Cliff N it is sufficient to understand its action on HW N , which thanks to (26) can be understood via the action of the corresponding symplectic matrix F G on F 2m 2 . Consider the fixed space Fix(F G ) from (7).
that is, iff E(c) either commutes or anticommutes with G.
Let us now consider the Pauli matrices that commute with G, that is It is then clear that the quotient Fix(F G ) C G captures the Pauli matrices that anticommute with G. We will denote by (•) ⊥s the dual w.r.t. the symplectic inner product (1). With this notation we have the following.
Proposition III.4. supp(G) ⊆ C ⊥s G . Proof. We will show the reverse inclusion of the complements. Indeed, let c ∈ F 2m 2 be such that c ∉ C ⊥s G . Then, there exists v ∈ C G such that ⟨ c v ⟩ s = 1. It follows that E(v) commutes with G and anticommutes with E(c). Thus which in turn implies Tr(GE(c)) = 0, and hence c ∉ supp(G).
Next, we completely characterize the supports of elementary Clifford matrices (27) in terms of the invariants (7)-(8) of the defining symplectic matrices.
As a consequence, the support of diagonal Cliffords is completely characterized by the row/column space of the associated symmetric S.
Then supp(G Ω (r)) = (1 r , 0 2m−r ) ⊕ D r , where 1 r denotes the all ones vector of size r. As a consequence, partial Hadamard matrices G Ω (r) are supported on a coset of Res(F Ω (r)).
For a ∈ F m 2 we will denote Fix a (P) = {v ∈ F m 2 v ⊕ vP = aP}. With this notation we have On the other hand, for x ∈ Fix a (P) we have x ⊕ Fix(P) = Fix a (P). Indeed, the forward containment is trivial and equality follows due to equal cardinalities. Thus, if Fix a (P) ≠ ∅, we have that D(a, b) ∈ supp(G) iff b ∈ Fix(P) ⊥ . Next, recall the subspace Res(P) from (8). We have that Fix a (P) ≠ ∅ iff a ∈ Res(P −1 ). We conclude that G D (P) is supported on Res(P −1 ) × Fix(P) ⊥ ⊂ F 2m 2 . Then by definition Fix(P) ⊥ = Res(P).
Consider the maps χ S ∶ w → wSw t and χ b ∶ w → +2wb t , and put χ S,b ∶= χ S + χ b . For v, w ∈ W we have where the last equality follows by the fact that wS = 0 mod 2.
Thus the map w → i χ S,b (w) is a character of W . It follows that D(0, b) ∈ supp(G) iff χ S,b (w) = 0 for all w ∈ W . By the above argument, it also follows that Tr(G) ≠ 0 iff χ S (w) = 0 for all w ∈ W . In this case, (47) reduces to ∑ w∈W (−1) wb t ≠ 0, which holds iff b ∈ W ⊥ . Similarly, Tr(G) = 0 iff χ S is not the trivial map. Since χ S is an evenvalued linear map (mod 4) then there exists c (depending on S) such that χ S (w) = 2wc t . But then it is clear that χ S,b is the zero map iff c ⊕ b ∈ W ⊥ iff b ∈ c ⊕ W ⊥ . It follows that supp(G) = {0} × (c ⊕ W ⊥ ) for any such c as above.
(3) Consider G = G Ω (r) for 0 ≤ r ≤ m, and let us first handle r = m, which corresponds to the fully occupied Hadamard matrix in N = 2 m dimensions. In this case, we have The above yields Then, for r < m, a similar argument implies that D(a, b) ∈ supp(G) iff a 1∶r + b 1∶r = 1 r and a r+1∶m = b r+1∶m = 0 m−r . The proof is concluded with the observation that D r = Res(F Ω (r)).
Remark III.6. Let P ∈ GL(m) and S ∈ Sym(m), and put G = G D (P)G U (S). Then G = ∑ v∈F m 2 i vSv t vP⟩⟨v , which in turn yields, Now the analysis continues as in Proposition III.5(2); see also [31,Lem. 6] for further details.
Example III.7. We saw from Proposition III.5 that matrices G D (P) are supported on a subspace/subgroup. This is of course consistent with Corollary III.2 since these matrices always have trace. Indeed, entry (1,1) is always 1 since 0P = 0. The CNOT gate is of form G D (P) where We have Res(P −1 ) = {00, 01} and Fix(P) ⊥ = {00, 10}. Thus, supp(CNOT) = {0000, 0010, 0100, 0110}, as one can directly verify. Here we have m = 2 and CNOT corresponds to the symplectic F CNOT = F D (P), which is a hyperbolic involution with Fix(F CNOT ) = supp(CNOT). Note also that Fix(F CNOT ) = C CNOT , and thus equality in Proposition III.4 can be achieved. In addition F = T 0010 T 0100 T 0110 . On the complex domain we have where E 1 = E(00, 10), E 2 = E(01, 00). It follows that CNOT is supported on the MCS generated by E 1 and E 2 .
Example III.8. (1) Let b ∈ F m 2 and consider the symmetric

2.
(2) Let S be a diagonal matrix with diagonal d S . Let r = wt(d S ) be the number of non-zero elements in d S . In this case F U (S) is a product of transvections T vn where v n = (0, b n ) where b n is the nth nonzero row of S. Then from which we may also conclude that Tr(G U (S)) ≠ 0.
We end this section by computing the supports of the local Clifford group (Cliff 2 ) ⊗m ⊂ Cliff N .
Proposition III.9 (Support of local Clifford group).
Proof. The result follows immediately by the fact that the trace function is multiplicative on pure tensors.

IV. ON HERMITIAN CLIFFORD MATRICES
Hermitian Clifford matrices, on top of being interesting on their own right, they also play a prominent role on understanding the third level of the Clifford hierarchy C (3) . Indeed, by definition, CHW N C † ⊂ Cliff N for all C ∈ C (3) . The conjugate action preserves traces and the Hermitian property. Thus, other than the identity, only traceless Clifford matrices can emerge from conjugate action with a third level matrix. With the same notation as in Proposition II.4, we see that G is traceless iff E 0 ∉ S. Further, CEC † must also be a Hermitian Clifford matrix for any Hermitian Pauli matrix E. The corresponding symplectic matrix Φ(CEC † ) is an involution, and symplectic matrices emerging in this way must commute. This fact, although elementary, is crucial because any group of commuting involutions is conjugate with some subgroup of S U from (4). This means that, for instance, the CNOT gate (or any Clifford matrix of form G D (P)) cannot emerge from a third level action, despite F CNOT being a symplectic involution; see also Example III.7.
We have mentioned that any Clifford matrix, is, up to a multiplication by a Pauli, a product of transvections. We have the following structural results if the transvections involved are independent.
Theorem IV.1. Let E n = E(c n ), n = 1, . . . , k, be a set of k independent Hermitian Pauli matrices. Let also E 0 = E(c 0 ) be a Hermitian Pauli matrix. Then, the Clifford matrix is Hermitian iff E 0 anticommutes with all E n and all E n commute with each other. As a consequence, if G is Hermitian then it is also traceless.
Proof. Let C ∶= (A B) be the k × 2m binary matrix whose nth row is c n = (a n , b n ). Since all the E n are independent we have that rank (C) = k. Using (12) we have that whereC is the k × k matrix whose (i, j) entry is a j b i t − a i b j t mod 4 if i < j and 0 else. If we write c 0 = (a 0 , b 0 ), then (62) can be further rewritten as (63) It follows immediately that G is Hermitian iff all coefficients in (63) are ±1.
By looking at the standard basis of F k 2 , i.e., d = e n , and corresponding coefficients, we see that a n b 0 t ⊕ a 0 b n t = 1 for n = 1, . . . , k, which in turn means that E 0 anticommutes with E n . To show that E j , E n commute, consider d of weight two with ones in positions j, n. This corresponds to looking at the For the converse, one could argue similarly to show that the coefficients in (63) are ±1. However, we point out here that the statement follows immediately from (61).
Finally, for Hermitian G as in (61) we argued that E 0 anticommutes with all E n . Thus E 0 cannot be contained in the commutative group generated by all E n . As we have mentioned earlier, this implies that G is traceless.
Remark IV.2. Recall Proposition II.4 where a Clifford matrix G is written as a generic sum of Hermitian matrices E. In (63) we have explicitly computed the coefficients α E , and evidently, they are of form i Q(v) , v ∈ F m 2 where Q is a quadratic form mod 4. This generalizes a result of [28] (see also [30]) where the authors showed that the coefficients of diagonal Clifford matrices are determined by a quadratic form. Indeed, diagonal Clifford matrices are of form G U (S), S ∈ Sym(m), and we see the aforementioned quadratic form in (46)-(47).
Remark IV.3. If G ∈ Cliff N is Hermitian, we mentioned that the corresponding symplectic matrix F G must be an involution, which we also mentioned can be written as a product of k ∈ {r, r + 1} transvections, r = 2m − dim(Fix(F G )), where at least r are independent. Theorem IV.1 settles the scenario when F G is a product of only independent transvections. When the additional transvection T r+1 is dependent of the other r transvections, then multiplying G = T 1 ⋯T r with T r+1 may preserve the support of G (see Example III.7) or reduce the support of G. In the latter instance the supported is reduced by half. Keeping track of the support of GT r+1 becomes tedious and involves sign chasing that depends on the commutativity relation of T 1 , . . . , T r .

V. ON (GENERALIZED) SEMI-CLIFFORD MATRICES
For k ≥ 3 the levels C (k) of the Clifford hierarchy do not form a group, and thus a complete characterization becomes challenging. In [5] the authors use the notion of semi-Clifford matrices to achieve partial results. A unitary matrix U ∈ U(N ) is called semi-Clifford if there exists a MCS S 1 ⊂ HW N such that S 2 = US 1 U † is also MCS. Since the Clifford group Cliff N permutes stabilizers of a given dimension, a Clifford matrix is trivially semi-Clifford. It is shown in [5] that for m = 1, 2 qubits the Clifford hierarchy is comprised of semi-Clifford matrices, and for m = 3 qubits the third level C (3) is comprised of semi-Clifford matrices. Moreover, they show that for m > 2 qubits that there exist non semi-Clifford matrices in each level C (k) , k > 3, and conjecture that the third level C (3) is comprised of semi-Cliffords for any number of qubits. The conjecture was disproved by Gottesman and Mochon via a counterexample with m = 7 qubits; see [32]. On the other hand, the diagonal elements of each level, denoted C (k) d do form a group [5,Prop. 4], and are completely characterized in [12]. The QFD gates of [7] represent all 1-and 2-local diagonal gates in the hierarchy, and thus forming a particularly nice subclass of diagonal gates.
Remark V.1. Multiplying by Clifford matrix preserves the levels of the hierarchy. Thus, without loss of generality, we will consider semi-Clifford matrices (and any matrix in the hierarchy) up to multiplication by Clifford matrices. This enables us to adjust any semi-Clifford U matrix so that it fixes any given given MCS S. Indeed, assume US 1 U † = S 2 . Let G 1 , G 2 ∈ Cliff N be such that G 1 SG † 1 = S 1 and G 2 S 2 G † 2 = S. Then G 2 UG 1 is a semi-Clifford matrix that fixes S. As mentioned earlier, by [27, Alg. 1], there exists G 3 ∈ Cliff N such that G 3 G 2 UG 1 fixes S pointwise.
Theorem V.2. Let C ∈ C (k) be a unitary matrix that fixes the group of diagonal Paulis Z N = E(0 m , I m ). Then C = DE(a, 0)G D (P), for some diagonal D ∈ C (k) d , P ∈ GL(m), and a ∈ F m 2 . We will make use of the structure of first order Reed-Muller codes to prove Theorem V.2. Let C = {(vb t mod 2) v∈F m 2 b ∈ F m 2 }. Then, the first-order Reed-Muller code is the linear The automorphism group of RM(1, m) is the general affine group GA(m) of maps v → vP ⊕ a, P ∈ GL(m), a ∈ F m 2 ; see [33,Chapter 13] for instance.
Proof of Theorem V.2. Assume that C ∈ C (k) fixes Z N , and let v ∈ C N be a common eigenvector of all D(0, b) ∈ Z N . Then, by assumption, we have which in turn implies that Cv is also a common eigenvector of Z N . Thus C maps the common eigenvector v⟩ to another common eigenvector which is of the form α v π(v)⟩ for some π(v) ∈ F m 2 and α v ∈ C. In other words, C is a monomial map, that is C = DΠ, where D is the diagonal matrix with entry α v in position π(v) and Π is the permutation v → π(v). The assumption C ∈ C (k) implies D ∈ C (k) d . By construction, the diagonals of Paulis in Z N are of form ±((−1) vb t ) v∈F m 2 , and we point out that the exponents of such diagonals are precisely the elements of RM(1, m). Thus Π induces an isometry on RM(1, m), which as we mentioned must be an invertible affine map. The result now follows.
Remark V.3. In [5] it was shown that a semi-Clifford C ∈ C (k) d is of the form C = G 1 DG 2 for some G 1 , G 2 ∈ Cliff N and D ∈ C (k) d . Theorem V.2 further extends this result by characterizing the Clifford matrices that appear into decomposition of C. Thus, we obtain a complete characterization of semi-Clifford elements in the Clifford hierarchy. We believe that this result, along with the notion of the support can be used in many applications, e.g., design of flag gadgets.
The argument of Theorem V.2 holds in a slightly more general setting. and (2) Let C be a unitary matrix that fixes the span of Z N , that is, C maps any diagonal to another diagonal. Then C is a monomial matrix. In particular, any semi-Clifford matrix is a monomial matrix up to some Clifford correction; see also [5,Prop. 2].
Let C ∈ C (3) be such that it fixes some subgroupŜ (of HW N ) under conjugation; see also Remark V.1. Then, by [27,Alg. 1], there exists G ∈ Cliff N , produced as a sequence of transvections, such thatĈ ∶= GC fixesŜ point-wise. LetŜ ⊥s be all the Pauli matrices that commute with elements ofŜ. Proceeding similarly as in the proof of Proposition III.4 we have the following.
Proposition V.5. supp(Ĉ) ⊂Ŝ ⊥s , and thus supp(C) ⊂ S ∶= Corollary V.6. Let C be a unitary matrix and S be a MCS. If C fixes S pointwise then supp(C) ⊂ S. The converse is also true. This property characterizes semi-Clifford matrices up to multiplication by Clifford. In particular, as for Hermitian Clifford matrices, we have that C is supported on a commutative subgroup.
In the reminder of this section we show that Corollary V.6 holds for the entire third level C (3) of the hierarchy (always up to Cliffords). Note that this is not a trivial step because, as mentioned before, there exist elements in C (3) that are not semi-Cliffords [32].
Lemma V.7. For C ∈ C (3) there exists a PauliẼ such that CẼC † is also a Pauli. As a consequence, there exists a Clifford correction G such that GC fixes (i.e., commutes with) some Pauli matrix.
Proof. Let C ∈ C (3) and consider the map where Φ is the map from (26) and PHW N is the projective form of HW N that ignores phases. Then ker ϕ C ⊂ PHW N has size 2 k for some k ≥ 0. So, we see that G ∶= im ϕ C ⊂ Sp(2m) has size 2 2m−k . Let G act on F 2m 2 ∖ {0}. Since the size of an orbit must divide the size of the group G, each orbit has size a power of 2 as well. However, since the orbits partition a set of size 2 2m −1 (odd), there must exist an orbit of odd size, and that size must be 2 0 = 1. This means that there exists 0 ≠ c ∈ F 2m 2 that is fixed by all symplectic matrices Φ(CEC † ). The definition of Φ yields that the Hermitian PauliẼ ∶= E(c) either commutes or anticommutes with all CEC † . In other words for all Paulis E. Now putC =ẼCẼ. Let also σ E = ±1 be such thatẼE = σ E EẼ. We have that which combined with (68) yields for all Paulis E. Now it is easy to see that CC † is a Pauli E ′ , and thus (69) implies CẼC † = E ′Ẽ .
Remark V.8. The proof of Lemma V.7 could have been concluded using the language of stabilizer codes. With the same notation, letẼ be such that it either commutes or anticommutes with all CEC † ∈ Cliff N . Now consider the stabilizer group S = ⟨Ẽ⟩ and the corresponding stabilizer codes F ε ∶= F ε (S), for ε = ±1 (see (20)). We have that CEC † F ε = ±F ε for all Paulis E. In other words, for any v ∈ F ε , we have Express C = ∑ E α E E and sum both sides in (71) to obtain In other words, εẼCv = ε ′ Cv, and thus C permutes {F ε }. This is equivalent with C mappingẼ to some other Pauli.
Next we prove the main result about the support of gates in C (3) , which can then be straightforwardly used to show that every gate in C (3) is generalized semi-Clifford. Recall that a generalized semi-Clifford matrix is a unitary matrix that maps under conjugation the span of some MCS to the span of some other MCS.
Theorem V.9. Let C be a unitary matrix from C (3) . Then there exists a Clifford G such that GC is supported on a maximal commutative subgroup of HW N .
Proof. From Lemma V.7 we know that there exists some Clifford H such that HC commutes with some E ∈ HW N . Now consider the group S = ⟨E⟩ and its normalizer in HW N which we denote by S ⊥s . Then, since HC preserves S under conjugation, it is a valid logical operator for the [[m, m − 1]] stabilizer code defined by S, i.e., it maps code states (+1 eigenvectors of E) to code states. Denote this logical (m − 1)qubit operation realized by HC as C H .
First, it has already been shown in [5] that operations in C (3) are semi-Clifford for 1 and 2 qubits. Using Corollary V.6, this automatically means that up to some Clifford correction such gates are supported on a MCS. Therefore, we consider the induction hypothesis that for (m − 1) qubits, any C (3) element is supported on a MCS, up to multiplication by some Clifford. Applying this hypothesis for C H above, we see that there exists some (m − 1)-qubit logical Clifford G ′ such that G ′ C H is supported on a MCS (of size 2 m−1 ). Note that a logical Clifford operation is defined by its action on logical Paulis. Let this MCS be generated by logical (m − 1)-qubit Paulis E 1 , E 2 , . . . , E m−1 , and let E 1 , E 2 , . . . , E m−1 ∈ S ⊥s form their respective physical m-qubit realizations in HW N . These realizations are automatically defined once 2(m − 1) m-qubit Pauli operations are chosen to be the appropriate physical realizations of the logical X and Z on the (m − 1) logical qubits. As G ′ C H is supported on E i 's, it clearly commutes with each one of them. Hence, by taking G ′ to be an m-qubit Clifford that forms a physical realization of G ′ , we see that G ′ (HC) commutes with each E i . Note that, by definition of realizing a logical gate, such a G ′ must preserve the stabilizer S, i.e., commute with E, and act on E i as G acts on E i .
Finally, consider the group ⟨E, E 1 , E 2 , . . . , E m−1 ⟩. This is clearly a MCS and (G ′ H)C fixes it pointwise. Therefore, by applying Corollary V.6 we see that GC ∶= (G ′ H)C is supported on this MCS. This completes the induction. Lemma V.7 constitutes a crucial property of the third level C (3) of the Clifford hierarchy. This property is of course exclusive to the third level because we highly rely on the fact that im φ C is a subgroup of Cliff N . This in turn enables an induction argument on the number of qubits, rather than the typical induction arguments on the levels of the Clifford hierarchy. It is worth mentioning that the "up to Clifford" is indeed necessary throughout the paper. For instance, with regards to Lemma V.7, the physical Clifford permutation If C ∈ C (3) is supported on a MCS S then it trivially fixes the span of S, and therefore C is a generalized semi-Clifford matrix. The converse is not true since, for instance, even the CNOT gate fixes Z 4 but obviously is not supported on Z 4 .
In fact, any gate G D (P) fixes Z N by construction but is not supported on Z N (see Proposition III.5(1)).
Proof. By Theorem V.9, there exists a Clifford correction G such that GC is supported on a MCS S. Then GC fixes the span of S, and C maps the span of S to the span of G † SG. Thus C is generalized semi-Clifford.

VI. CONCLUSIONS AND FUTURE RESEARCH
In this paper we study the Clifford hierarchy via the Pauli/Weyl expansion/support. First, we consider the Clifford group, that is, the second level of the hierarchy. We show that every element of the group is supported on a subgroup of the Pauli group (or a coset, when traceless). Additionally, we give a closed form description of the support of elementary group elements, and show that the coefficients are determined by a quadratic form modulo 4. We argue that the Hermitian elements of the group play a prominent role on understanding the third level of the hierarchy. For this reason, we treat them separately, and among other things, we show that they are supported on a commutative subgroup of the Pauli group (or a coset). Next, we consider the third level of the hierarchy. Our treatment is up to Clifford equivalence, which, at any rate, preservers the levels of the hierarchy. We show that, up to such equivalence, every third level matrix commutes with at least one Pauli matrix. This constitutes the main building block of a powerful induction argument on the number of qubits, which we use to prove that every third level matrix, up to Clifford equivalence, is supported on a maximal commutative subgroup of the Pauli group. We believe that such induction argument can be further exploited in various aspects of quantum computation and quantum error-correction.
In future research, we will consider the behaviour of the support under elementary transformations such as multiplication and conjugation (which, surprisingly, is unknown). This, among other things, would give a closed form description of the support of any Clifford group element. Next, with the ultimate goal of completely characterizing the third level of the hierarchy, we will consider the converse. That is, finding sufficient conditions under which a unitary U, supported on some MCS, belongs to the third level. We expect the coefficients to be (scaled) eighth roots of unity that are perhaps determined by third-order Reed-Muller codes. Finally, we will use the structural results of this paper to develop flag gadgets for third level operators, as well as reduce circuit complexity for these operators.