Transversal Cliffords: a Pauli string factorises, and the transversal Hadamard swaps X and Z #
Category: 1-Mathlib (CSD-free; staged for upstream). BACKLOG #62 (b), the general half.
A Pauli string is a tensor product over the qubits — which is obvious on paper and needs saying
once in Lean, because pauliMat a b is defined by its entries and blockKron by a product over the
blocks. Once said, the conjugation rule of a transversal gate is the single-qubit rule raised to
the tensor power, and that is the whole mechanism of transversality.
permMat σ— the matrix of a basis permutation, with the row/column reindexing lemmas (permMat_mul_apply,mul_permMat_apply) and, for an involution,permMat_conjTranspose,permMat_mul_self,permMat_mem_unitaryGroup. A transversalCNOTis one of these;onePauli u v— the single-qubit PauliX^u Z^v, and ★★pauliMat_eq_blockKron:pauliMat a b = ⨂ᵢ onePauli (aᵢ) (bᵢ);hGateM_mul_onePauliand ★hGateM_conj_onePauli—H X^u Z^v H = (−1)^{uv} X^v Z^u, the four cases ofH X H = Z,H Z H = X;hadTransversal n— the Hadamard on every qubit, withhadTransversal_mul_selfandhadTransversal_conjTranspose(it is its own inverse and Hermitian);- ★★
hadTransversal_conj_pauliMat— the transversal Hadamard exchanges theX- andZ-labels of every Pauli string:H^{⊗n} X^a Z^b H^{⊗n} = (−1)^{a·b} X^b Z^a. For a CSS code, wherea · b = 0on the stabiliser labels, the sign is1and the group is preserved — which is what the consumer (Empirical/QM/QEC/SteaneFaultyGate.lean) spends it on.
Honest scope #
⚠️ Nothing here is about a code: these are identities in the Pauli group and its normaliser. That
a particular transversal gate preserves a particular code space is the code's business, and needs
the code's labels (for the Steane code, the CSS condition bdot_rowComb_rowComb).
⚠️ The Schrödinger-picture action of a transversal gate on encoded states is not here. What the conjugation rule gives is the Heisenberg picture: where the logical Paulis go.
References: M. Nielsen, I. Chuang, Quantum Computation and Quantum Information §10.4.2
(transversal gates), §10.5.8; A. Steane, PRL 77 (1996); specs/BACKLOG.md #62;
specs/steane-plan.md; specs/future-work.md.
Permutation matrices #
The matrix of a basis permutation: the gate that sends |w⟩ to |σ w⟩. A transversal
CNOT is one of these, which is why its logical action needs no amplitudes.
Instances For
A permutation matrix on the left reindexes the rows by the permutation.
A Pauli string is a tensor product over the qubits #
The single-qubit Hadamard on a Pauli #
H X^u Z^v = (−1)^{uv} X^v Z^u H: the Hadamard moved across a Pauli, with one factor of H on
each side, so the √2 never has to be squared.
★ H X^u Z^v H = (−1)^{uv} X^v Z^u — the four cases H I H = I, H X H = Z,
H Z H = X, H (XZ) H = −XZ.
The transversal Hadamard #
The transversal Hadamard: the Hadamard on every one of the n qubits.
Equations
- QuantumInfo.hadTransversal n = QuantumInfo.blockKron fun (x : Fin n) => QuantumInfo.CliffordT.hGateM
Instances For
★★ The transversal Hadamard exchanges the X- and Z-labels of a Pauli string, with the
sign (−1)^{a·b}: the single-qubit rule raised to the tensor power. On a CSS code's stabiliser
labels a · b = 0, so the group is preserved elementwise.