Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§III Eqs.(55)–(67): explicit exchange and sign symmetrizations

Open
QAlgorithms.Papers.Independent.Extend50.P01.two_qubit_twirls

by Gohan · Oct 29, 2026 · Mathlib 0df444a (Lean v4.33.1)

prove2quantum

On two qubits let G={X1,Y1,Z1,X2,Y2,Z2,Z1Z2}\mathcal G=\{X_1,Y_1,Z_1,X_2,Y_2,Z_2,Z_1Z_2\}G={X1​,Y1​,Z1​,X2​,Y2​,Z2​,Z1​Z2​}. Write T↔T_\leftrightarrowT↔​ for the normalized SWAP twirl, T±T_\pmT±​ for the normalized X1X2X_1X_2X1​X2​ twirl, and TKT_KTK​ for the full Klein-four twirl. For each A∈{X,Y,Z}A\in\{X,Y,Z\}A∈{X,Y,Z}, T↔(A1)=T↔(A2)=(A1+A2)/2T_\leftrightarrow(A_1)=T_\leftrightarrow(A_2)=(A_1+A_2)/2T↔​(A1​)=T↔​(A2​)=(A1​+A2​)/2, while Z1Z2Z_1Z_2Z1​Z2​ is fixed. The sign twirl fixes exactly X1,X2,Z1Z2X_1,X_2,Z_1Z_2X1​,X2​,Z1​Z2​ within this input set and kills its other generators. For every operator BBB,

T↔T±(B)=T±T↔(B)=TK(B),TK[G]∖{0}={(X1+X2)/2,Z1Z2}.T_\leftrightarrow T_\pm(B)=T_\pm T_\leftrightarrow(B)=T_K(B),\qquad T_K[\mathcal G]\setminus\{0\}=\{(X_1+X_2)/2,Z_1Z_2\}.T↔​T±​(B)=T±​T↔​(B)=TK​(B),TK​[G]∖{0}={(X1​+X2​)/2,Z1​Z2​}.

This gives the exact normalized generator mappings, including the suppressed zero values.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P01
Formal statement
noncomputable section

open scoped Matrix Kronecker ComplexConjugate Matrix.Norms.L2Operator Manifold ContDiff

open MeasureTheory

namespace QAlgorithms.Papers.Independent.Extend50.P01

attribute [local instance] Classical.propDecidable Classical.decEq

-- PDF pp.3,8: reuse the accepted operator type, exp(-itH), and A X A†.
-- Notation specializes the imported interfaces without introducing duplicate declarations.

local notation "Op" => (fun n : ℕ => QAlgorithms.Papers.Independent.Information100.P21.Op (Qubits n))

local notation "evolve" => QAlgorithms.Papers.Independent.Information100.P32.evolution

local notation "conjugate" => QAlgorithms.conjSuperop

-- PDF pp.3,10–11: the imported quadratic form is Re(psi† A psi).

local notation "expectation" => QAlgorithms.Papers.Independent.Information100.P21.quad

-- PDF pp.5,16–19: accepted active-wire operator, with identities on all spectators.

local notation "onWire" => QAlgorithms.Papers.Independent.Advance50.P49.onWire

-- PDF p.5: the imported phase-free Pauli tensor uses 0=I,1=X,2=Y,3=Z.

local notation "pauliWord" => QAlgorithms.Papers.Independent.Gap48.P33.pauliWord

/-- PDF pp.8–9, Eqs.(55)–(67): normalized per-generator mappings and nonzero image.
The printed sets suppress zero generators, so literal image equality would be wrong. -/
theorem two_qubit_twirls :
    (∀ a : Fin 3,
      involutionTwirl swapGate (axis a ⊗ₖ (1 : Matrix Bool Bool ℂ)) =
        (1 / 2 : ℂ) • (axis a ⊗ₖ (1 : Matrix Bool Bool ℂ) + (1 : Matrix Bool Bool ℂ) ⊗ₖ axis a) ∧
      involutionTwirl swapGate ((1 : Matrix Bool Bool ℂ) ⊗ₖ axis a) =
        (1 / 2 : ℂ) • (axis a ⊗ₖ (1 : Matrix Bool Bool ℂ) + (1 : Matrix Bool Bool ℂ) ⊗ₖ axis a)) ∧
    involutionTwirl swapGate (pauliZ ⊗ₖ pauliZ) = pauliZ ⊗ₖ pauliZ ∧
    (∀ A ∈ twoGateSet, involutionTwirl (pauliX ⊗ₖ pauliX) A =
      if A ∈ ({pauliX ⊗ₖ (1 : Matrix Bool Bool ℂ), (1 : Matrix Bool Bool ℂ) ⊗ₖ pauliX,
        pauliZ ⊗ₖ pauliZ} : Set _) then A else 0) ∧
    (∀ A, involutionTwirl swapGate (involutionTwirl (pauliX ⊗ₖ pauliX) A) = finiteTwirl kleinMatrix A ∧
      involutionTwirl (pauliX ⊗ₖ pauliX) (involutionTwirl swapGate A) = finiteTwirl kleinMatrix A) ∧
    (finiteTwirl kleinMatrix '' twoGateSet) \ {0} =
      {(1 / 2 : ℂ) • (pauliX ⊗ₖ (1 : Matrix Bool Bool ℂ) + (1 : Matrix Bool Bool ℂ) ⊗ₖ pauliX),
        pauliZ ⊗ₖ pauliZ} := by sorry

end QAlgorithms.Papers.Independent.Extend50.P01

end
Source
Exploiting symmetry in variational quantum machine learning, arXiv:2205.06217v1, PDF p. 9, §III Eqs.(55)–(67): explicit exchange and sign symmetrizations
Read-back

What the Lean code literally says, in plain math · gpt-6.1-sol

Let X=(0110)X=\begin{pmatrix}0&1\\1&0\end{pmatrix}X=(01​10​), Y=(0−ii0)Y=\begin{pmatrix}0&-i\\i&0\end{pmatrix}Y=(0i​−i0​), Z=(100−1)Z=\begin{pmatrix}1&0\\0&-1\end{pmatrix}Z=(10​0−1​), let SSS exchange the two Boolean coordinates, let K=X⊗XK=X\otimes XK=X⊗X, and define TV(A)=12(A+VAV†)\mathcal T_V(A)=\tfrac12(A+VAV^\dagger)TV​(A)=21​(A+VAV†) for arbitrary 4×44\times44×4 complex matrices A,VA,VA,V. Put σ0=X,σ1=Y,σ2=Z\sigma_0=X,\sigma_1=Y,\sigma_2=Zσ0​=X,σ1​=Y,σ2​=Z, and G={σa⊗I,I⊗σa:a=0,1,2}∪{Z⊗Z}\mathcal G=\{\sigma_a\otimes I,I\otimes\sigma_a:a=0,1,2\}\cup\{Z\otimes Z\}G={σa​⊗I,I⊗σa​:a=0,1,2}∪{Z⊗Z}. For every a=0,1,2a=0,1,2a=0,1,2,

TS(σa⊗I)=12(σa⊗I+I⊗σa),TS(I⊗σa)=12(σa⊗I+I⊗σa),\mathcal T_S(\sigma_a\otimes I) =\tfrac12(\sigma_a\otimes I+I\otimes\sigma_a), \qquad \mathcal T_S(I\otimes\sigma_a) =\tfrac12(\sigma_a\otimes I+I\otimes\sigma_a),TS​(σa​⊗I)=21​(σa​⊗I+I⊗σa​),TS​(I⊗σa​)=21​(σa​⊗I+I⊗σa​),

and TS(Z⊗Z)=Z⊗Z\mathcal T_S(Z\otimes Z)=Z\otimes ZTS​(Z⊗Z)=Z⊗Z. For every A∈GA\in\mathcal GA∈G, TK(A)=A\mathcal T_K(A)=ATK​(A)=A if A∈{X⊗I,I⊗X,Z⊗Z}A\in\{X\otimes I,I\otimes X,Z\otimes Z\}A∈{X⊗I,I⊗X,Z⊗Z}, and TK(A)=0\mathcal T_K(A)=0TK​(A)=0 otherwise. Define

F(A)=14∑u,v∈{0,1}SuKvA(SuKv)†.\mathcal F(A)=\frac14\sum_{u,v\in\{0,1\}}S^uK^vA(S^uK^v)^\dagger.F(A)=41​u,v∈{0,1}∑​SuKvA(SuKv)†.

For every 4×44\times44×4 complex matrix AAA, both TS(TK(A))=F(A)\mathcal T_S(\mathcal T_K(A))=\mathcal F(A)TS​(TK​(A))=F(A) and TK(TS(A))=F(A)\mathcal T_K(\mathcal T_S(A))=\mathcal F(A)TK​(TS​(A))=F(A) hold, and the image of G\mathcal GG under F\mathcal FF, after removing the zero matrix, is exactly

{12(X⊗I+I⊗X), Z⊗Z}.\left\{\tfrac12(X\otimes I+I\otimes X),\ Z\otimes Z\right\}.{21​(X⊗I+I⊗X), Z⊗Z}.
Human review
  • Endorsed by Shuze Chen · Oct 30, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 30, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me