# Does the real Clifford group contain all real diagonal gates? all permutation gates?

The real Pauli group is the subgroup of $$O_{2^n}(\mathbb{R})$$ generated by products and tensor products of $$X$$ and $$Z$$ (this deviates from the usual Pauli group in that only real Paulis are allowed, in other words there is no global phase of $$i$$).

The real Clifford group is defined to be the normalizer in $$O_{2^n}(\mathbb{R})$$ of the real Pauli group.

The real Clifford group is finite of size $$2^{n^2+n+2}(2^n-1)\prod_{j=1}^{n-1}(4^j-1)$$ see https://arxiv.org/abs/math/0001038

According to the same reference the real Clifford group contains all diagonal gates of the form $$diag((−1)^{q(v)}+a)$$ where $$q$$ is a binary quadratic form and $$a$$ is $$0$$ or $$1$$. The real Clifford group also contains all permutation matrices that correspond to the action of an element of $$AGL(n,2)$$ on the $$2^n$$ basis vectors.

These two types of gates are mentioned in the context of a "convenient generating set" for the real Clifford group. Are all real diagonal gates and all permutation matrices in the in the real Clifford group? (I assume not because Toffoli is a permutation matrix that is not in the Clifford group) Or are the diagonal gates in terms of quadratic forms and the permutation matrices correspond to $$AGL(n,2)$$ the only diagonal and permuation gates, respectively, in the real Clifford group?

• I might be misunderstanding the question but I dont see how the group could contain all real diagonal matrices (of which there are infinitely many) if it is a finite group. Nov 30, 2022 at 7:38
• I'm assuming everything is a gate meaning it's unitary so ya I just mean real diagonal unitary matrices of which there are $2^{2^n}$ for $n$ Qubits, good question! Nov 30, 2022 at 20:12
• Ah, of course. I was being a bit slow. :/ Nov 30, 2022 at 20:33

I assume by "real diagonal" you mean diagonal with $$\pm1$$ entries since, at least in the quantum arena, we're talking about unitaries.
By extension, if I take Toffoli and pre- and post-multiply the target qubit by a Hadamard gate, I get controlled-controlled-$$Z$$, which is real diagonal but not in the real Toffoli group.
• Ok cool this is exactly the kind of argument I was looking for. $CCX=$Toffoli is a permutation that isn't Clifford and $CCZ$ is a diagonal that isn't Clifford since its just some Hadamards times Toffoli. This all requires at least 3 qubits. For $n=1$ it's obvious that all permutations and all diagonals are Clifford (in fact they are Pauli). What about for $n=2$ qubits? Are all permutations and all diagonals in the 2 qubit Clifford group? Nov 30, 2022 at 15:26
• Ya all permutations and real diagaonal gates are in there you just need Paulis and controlled $X$ and controlled $Z$. $X \otimes X$ corresponds to the permutation $(14)(23)$, and CNOT corresponds to $(34)$. So $(X \otimes X)CNOT$ corresponds to $(1423)$ and any $n$ cycle together with any transposition (like CNOT) generates all of $S_n$, in this case generates all of $S_4$. It is also true that all real diagonal gates are in the 2 qubit Clifford group. The group of real diagonal gates is $2^4$ and is generated by $-I \otimes I, I\otimes Z, Z \otimes I, CZ$ Dec 1, 2022 at 19:51