Traces of Pauli operators, and orthogonality of the Pauli family #
This file computes the trace of every Pauli operator toMatrix u and, from it, the trace
pairing Tr((toMatrix s)ᴴ * toMatrix t) of any two. The result is the orthogonality relation
Tr(s s') = δ_{s,s'} that def:pauli_basis attaches to the normalized n-qubit Pauli basis.
The paper uses that relation in two places: for the normalization of the Pauli 2-norm (the norm
entering apd:eq:def_high_weight_norm), and in the proof of apd:thm:local_flow_k_local, where
the traces Tr(P O^{(g)}) are the coordinates of an orthonormal expansion — which is what makes
conjugation act as an orthogonal matrix on coefficient vectors.
Main results #
char_sum:∑_b (-1)^{u ⬝ᵥ b} = 2^nifu = 0and0otherwise.trace_toMatrix_of_x_ne_zero,trace_toMatrix_of_x_eq_zero: the trace of a Pauli operator.trace_star_toMatrix_mul: the trace pairing of two Pauli operators, with its two special casestrace_star_toMatrix_mul_eq_zero(orthogonality) andtrace_star_toMatrix_mul_self(squared Hilbert–Schmidt norm2^n).trace_star_toMatrix_mul_phaseMul: phase variants of one string are not orthogonal.
The shape of the statement, and the trap in it #
Pauli/Matrix.lean represents the whole phase-extended group, 4·4^n elements. That family is
not orthogonal and cannot be: toMatrix (phaseMul 1 s) = i · toMatrix s, so a string and its
phase multiples are collinear. What is true, and what this file proves, is that the trace pairing
sees exactly the (x, z) data:
Tr((toMatrix s)ᴴ * toMatrix t) = 0 unless s.x = t.x and s.z = t.z,
with the value 2^n · i^{phase} when they do agree. So the orthogonal family is the 4^n signless
classes, and a statement of orthogonality over PauliString n itself would be false. Anything
downstream that wants an orthonormal basis has to choose a phase normalization first:
Pauli/Coeff.lean chooses the self-adjoint representative herm, and Pauli/Tensor.lean the
positive tensor-product representative tensorRepresentative.
How it is proved #
Everything reduces to one character sum. The diagonal of toMatrix u is empty unless u.x = 0,
because the entry at (a, a) is non-zero only where a = a + u.x; so
Tr (toMatrix u) = 0 if u.x ≠ 0,
Tr (toMatrix u) = i^{u.phase} · ∑_b (-1)^{u.z ⬝ᵥ b} if u.x = 0,
and the sum is 2^n at u.z = 0 and 0 otherwise. The pairing statement then follows from
toMatrix_star and toMatrix_mul, since (star s * t).x = s.x + t.x in characteristic two.
The character sum #
∑_{b ∈ {0,1}^n} (-1)^{u ⬝ᵥ b} is the orthogonality relation for the additive characters of
(ZMod 2)^n, and the engine of everything below.
There are two natural proofs. The one used here factorizes the sign over sites and swaps the sum
with the product; the alternative pairs b with b + eᵢ at a site where u is on and cancels
signs, via Finset.sum_ninvolution. The factorized proof is preferred because it is shorter,
because it proves both branches from one identity rather than arguing u = 0 separately, and
because negOnePow_sum and negOnePow_dotProduct are reusable on their own.
The diagonal #
The trace #
A Pauli operator with a non-trivial X-part is traceless: it is a permutation matrix pattern
with no fixed points.
Orthogonality #
The trace pairing sees the (x, z) data and nothing else. This is the relation
Tr(s s') = δ_{s,s'} of def:pauli_basis, stated for the phase-extended group rather than for a
normalized basis — which is the form that holds for PauliString n, since the group itself is
not an orthogonal family.
The trace pairing of two Pauli operators. Zero unless the two strings carry the same
X- and Z-parts; 2^n times a fourth root of unity when they do.
Every Pauli operator has squared Hilbert–Schmidt norm 2^n. With the 2^{-n/2} normalization
of def:pauli_basis this is the diagonal case Tr(s s) = 1 of its orthonormality relation.
Phase variants are not orthogonal, and this records why the orthogonal family is the 4^n
signless classes rather than the 4·4^n group elements: i·s pairs with s to give 2^n · i,
not 0. Anything that wants an orthonormal basis must normalize the phase first.