ABSTRACT (original article): The Clifford group plays a central role in quantum information science. It is the building block for many error-correcting schemes and matches the first three moments of the Haar measure over the unitary group -a property that is essential for a broad range of quantum algorithms, with applications in pseudorandomness, learning theory, benchmarking, and entanglement distillation. At the heart of understanding many properties of the Clifford group lies the Clifford commutant: the set of operators that commute with -fold tensor powers of Clifford unitaries. Previous understanding of this commutant has been limited to relatively small values of , constrained by the number of qubits . In this work, we develop a complete theory of the Clifford commutant. Our first result provides an explicit orthogonal basis for the commutant and computes its dimension for arbitrary and . We also introduce an alternative and easy-to-manipulate basis formed by isotropic sums of Pauli operators. We show that this basis is generated by products of permutations -which generate the unitary group commutant- and at most three other operators. Additionally, we develop a graphical calculus allowing a diagrammatic manipulation of elements of this basis. These results enable a wealth of applications: among others, we characterize all measurable magic measures and identify optimal strategies for stabilizer property testing, whose success probability also offers an operational interpretation to stabilizer entropies. Finally, we show that these results also generalize to multi-qudit systems with prime local dimension. CITATION (original article): Bittel, L., Eisert, J., Leone, L., Mele, A. A., & Oliviero, S. F. E. (2025), A complete theory of the Clifford commutant, arXiv:2504.12263. https://doi.org/10.48550/arXiv.2504.12263
In this notebook we give an explicit representation of the Clifford commutant for .
k4,k6,k8
Clifford-Weingarten Calculus. The Clifford group acting on copies of the Hilbert space defines the -design projector , which projects onto the commutant , spanned by the set of reduced Pauli monomials. The Clifford-Weingarten formula expresses the projector as:
k
k
(k)
Φ
cl
Com
⊗k
Cl
n
P
(k)
Φ
cl
∑
Ω,∈P
′
Ω
-1
W
Ω,
′
Ω
′
Ω
where is the Gram matrix with entries tr(). In the large- limit (), the diagonal entries satisfy ≈ while off-diagonal entries satisfy for , where . Each section below implements this formula for .
W
W
Ω,
′
Ω
†
Ω
′
Ω
n
n≥-3k+7
2
k
-1
W
Ω,Ω
-k
d
()
-1
W
Ω,
′
Ω
-(k+1)
d
Ω≠
′
Ω
d
n
2
k4,6,8
Clifford Commutant for k=4
Clifford Commutant for
k=4
In this section, we develop the Clifford Commutant for . The Clifford commutant for can be decomposed in the action of the permutations and of the projector
k4
k4
(4)
Ω
1
1
d
∑
P
⊗4
P
For , the commutant has dimension 30. It is generated by a single nontrivial Pauli monomial together with all 24 permutations in . The 30 basis elements form 6 cosets of acting on , giving a block-structured 30×30 Gram matrix . The Clifford-Weingarten formula at reads:
k4
Com
⊗4
Cl
n
Ω
4
S
4
S
4
Ω
4
(4)
W
k4
(4)
Φ
cl
∑
Ω,∈
′
Ω
P
4
-1
W
Ω,
′
Ω
′
Ω
The matrix S computed below encodes the Gram matrix structure; inverting it yields the Weingarten coefficients used in the twirl expansion.
To build the Clifford Weingarten we need to compute and
tr()
T
σ
T
κ
tr
(4)
Q
T
σ
T
κ
Permutations
Permutations
In[]:=
C
e
C
(12)
C
(123)
C
(1234)
C
(12)(34)
S
4
C
e
C
(12)
C
(123)
C
(1234)
C
(12)(34)
tr(TπTσ)
tr()
T
π
T
σ
In[]:=
tr()
T
π
T
σ
C
e
S
4
S
4
4
d
C
(12)
S
4
S
4
3
d
C
(123)
S
4
S
4
2
d
C
(1234)
S
4
S
4
d
C
(12)(34)
S
4
S
4
2
d
tr(4)QTπTσ
tr
(4)
Q
T
π
T
σ
In[]:=
C
(4)
Q
C
(4)
Q
C
(4)
Q
C
(4)
Q
C
(4)
Q
C
(4)
Q
S
(Q)4
In[]:=
tr
(4)
Q
T
κ
T
′
κ
C
(4)
Q
S
(Q)4
S
(Q)4
3
d
C
(4)
Q
S
(Q)4
S
(Q)4
2
d
C
(4)
Q
S
(Q)4
S
(Q)4
2
d
C
(4)
Q
S
(Q)4
S
(Q)4
2
d
C
(4)
Q
S
(Q)4
S
(Q)4
d
C
(4)
Q
S
(Q)4
S
(Q)4
d
In[]:=
tr
(4)
Q
T
κ
T
σ
C
(4)
Q
S
(Q)4
S
4
3
d
C
(4)
Q
S
(Q)4
S
4
2
d
C
(4)
Q
S
(Q)4
S
4
2
d
C
(4)
Q
S
(Q)4
S
4
2
d
C
(4)
Q
S
(Q)4
S
4
d
C
(4)
Q
S
(Q)4
S
4
d
(4)W
(4)
W
In[]:=
W
(4)
tr()
T
π
T
σ
tr
(4)
Q
T
κ
T
σ
tr
(4)
Q
T
κ
T
σ
d
tr
(4)
Q
T
κ
T
′
κ
Note that here we used instead of since Mathematica protect the symbol power .
W
(4)
(4)
W
Clifford Commutant for k=6
Clifford Commutant for
k=6
In this section, we develop the Clifford Commutant for . The Clifford commutant for can be decomposed in the action of the permutations and of the projector I⊗⊗
k6
k6
(6)
Ω
0
(6)
Ω
1
1
d
∑
P
⊗4
P
(6)
Ω
2
1
d
∑
P
⊗6
P
(6)
Ω
3
1
2
d
∑
P,Q
⊗2
P
⊗2
(PQ)
⊗2
Q
For , the commutant has dimension 4590. The reduced Pauli monomial basis decomposes into four coset classes: (2700 elements, weight-4 Pauli monomials), (720 elements, weight-6 Pauli monomials), (450 elements, products of two weight-4 blocks), and the 720 permutations in . The 4590×4590 Gram matrix inherits a block structure from these coset classes. The Clifford-Weingarten formula at provides the exact twirl projector, with asymptotic corrections at order relative to the leading term. The matrix computed below encodes these inner products; its inverse gives the Weingarten coefficients for the twirl.
k6
Com
⊗6
Cl
n
P
6
Ω
4
Ω
6
Ω
4,4
S
6
(6)
W
k6
-7
d
S
k6
In this notebook, we provide the matrix for , where we remind the definition
S
k6
In[]:=
Out[]//MatrixForm=
720 d(1+d)(2+d)(3+d)(4+d)(5+d) | 720 d(1+d)(2+d)(3+d)(4+d)(5+d) | 720 d(1+d)(2+d)(3+d)(4+d)(5+d) | 720 d(1+d)(2+d)(3+d)(4+d)(5+d) |
720 d(1+d)(2+d)(3+d)(4+d)(5+d) | 12[76+13d+ 2 d d(1+d)(2+d)(4+d) 2 (5+d) | 36 d(1+d)(2+d)(5+d) | 720 d(1+d)(2+d)(4+d)(23+d) |
720 d(1+d)(2+d)(3+d)(4+d)(5+d) | 36 d(1+d)(2+d)(5+d) | 2 d[1+d] | 720 d(1+d)(2+d)(4+d)(23+d) |
720 d(1+d)(2+d)(3+d)(4+d)(5+d) | 720 d(1+d)(2+d)(4+d)(23+d) | 720 d(1+d)(2+d)(4+d)(23+d) | 720(3+d)(5+d) d(1+d)(2+d)(4+d) 2 (23+d) |
In[]:=
Out[]//MatrixForm=
1 720 | 1 720 | 1 720 | 1 720 |
1 720 | d(1+d)(2+d)(4+d) 2 (5+d) 12[76+13d+ 2 d | 1 36 | 1 720 |
1 720 | 1 36 | 1 2 | 1 720 |
1 720 | 1 720 | 1 720 | d(1+d)(2+d)(4+d) 2 (23+d) 720(3+d)(5+d) |
Clifford Commutant for k=8
Clifford Commutant for
k=8
In this section, we develop the Clifford Commutant for . The Clifford commutant for can be decomposed in the action of the permutations and of the projector
k=8
k=8
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
A complete theory of the Clifford commutant
by Lennart Bittel, Jens Eisert, Lorenzo Leone, Antonio A. Mele, Salvatore F.E. Oliviero
Wolfram Community, STAFF PICKS, April, 28, 2026
https://community.wolfram.com/groups/-/m/t/3707421
by Lennart Bittel, Jens Eisert, Lorenzo Leone, Antonio A. Mele, Salvatore F.E. Oliviero
Wolfram Community, STAFF PICKS, April, 28, 2026
https://community.wolfram.com/groups/-/m/t/3707421