Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Two-ancilla universality for triplet and singlet preparations

Open
QAlgorithms.Papers.Independent.Advance50.P49.ancilla_preparations

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

prove2quantum

Use the physical register Hn=(C2)⊗n\mathcal H_n=(\mathbb C^2)^{\otimes n}Hn​=(C2)⊗n. Rotational invariance means commuting with U⊗nU^{\otimes n}U⊗n for every one-qubit unitary UUU. The legal spins are j=n/2−rj=n/2-rj=n/2−r, r=0,…,⌊n/2⌋r=0,\ldots,\lfloor n/2\rfloorr=0,…,⌊n/2⌋, and Πj\Pi_jΠj​ is the actual spectral projector of J2J^2J2 at j(j+1)j(j+1)j(j+1). Write Rab=(XaXb+YaYb+ZaZb)/2R_{ab}=(X_aX_b+Y_aY_b+Z_aZ_b)/2Rab​=(Xa​Xb​+Ya​Yb​+Za​Zb​)/2 and Vk,vk\mathcal V_k,\mathfrak v_kVk​,vk​ for the group of finite compositions of kkk-local invariant gates and its generated real Lie algebra, including scalar phases. Exchange-only circuits contain finite products of e−itRabe^{-itR_{ab}}e−itRab​ with real ttt. Set C0=IC_0=IC0​=I and, for even l>0l>0l>0, Cl=(l/2)!−1∑i1,…,il distinctRi1i2⋯Ril−1ilC_l=(l/2)!^{-1}\sum_{i_1,\ldots,i_l\ \mathrm{distinct}}R_{i_1i_2}\cdots R_{i_{l-1}i_l}Cl​=(l/2)!−1∑i1​,…,il​ distinct​Ri1​i2​​⋯Ril−1​il​​. Extend Cl=0C_l=0Cl​=0 above 2⌊n/2⌋2\lfloor n/2\rfloor2⌊n/2⌋. Its sector eigenvalue is cl(j)=Tr⁡(ClΠj)/Tr⁡(Πj)c_l(j)=\operatorname{Tr}(C_l\Pi_j)/\operatorname{Tr}(\Pi_j)cl​(j)=Tr(Cl​Πj​)/Tr(Πj​). All body-index sums below are over even indices.

For every invariant target unitary VVV, a single finite exchange circuit WWW on the n+2n+2n+2 chain works for every data density matrix ρ\rhoρ and every ancillary density matrix τ\tauτ supported in the triplet:

W(ρ⊗τ)W†=(VρV†)⊗τ.W(\rho\otimes\tau)W^{\dagger}=(V\rho V^{\dagger})\otimes\tau.W(ρ⊗τ)W†=(VρV†)⊗τ.

There is also an exchange circuit with the same property for τ=∣ξ⟩⟨ξ∣\tau=|\xi\rangle\langle\xi|τ=∣ξ⟩⟨ξ∣, ∣ξ⟩=(∣01⟩−∣10⟩)/2|\xi\rangle=(|01\rangle-|10\rangle)/\sqrt2∣ξ⟩=(∣01⟩−∣10⟩)/2​. Both witnesses precede the data, and the triplet witness also precedes τ\tauτ. At the elementary step, for invariant Hermitian FFF supported away from distinct wires a,ba,ba,b,

K=FRab⊗I−F⊗RancK=FR_{ab}\otimes I-F\otimes R_{\mathrm{anc}}K=FRab​⊗I−F⊗Ranc​

is exchange-Lie reachable and acts as FRab−F/2FR_{ab}-F/2FRab​−F/2 on triplet inputs and FRab+3F/2FR_{ab}+3F/2FRab​+3F/2 on singlet inputs. The action identities hold for all vectors. This permits symmetric mixed ancillary preparation as well as the pure zero preparation.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Advance50_P49
Formal statement
noncomputable section

namespace QAlgorithms.Papers.Independent.Advance50.P49

open scoped Classical Matrix ComplexConjugate Matrix.Norms.Frobenius

open MeasureTheory

attribute [local instance 100] LieRing.ofAssociativeRing

-- Specialize the frozen generic aliases without declaring new aliases.

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

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

-- The frozen support predicate takes the support before the operator.

local notation "WireSupported" => QAlgorithms.Papers.Independent.Information100.P69.Supported

/-- PDF pp.4,31–33: two ancillary preparation regimes, uniformly over all triplet
states. The singlet is corrected using p.31. PSD and trace-one are explicit. -/
theorem ancilla_preparations (n : ℕ) (V : Op n) (hV : SymUnitary V) :
    (∃ W : Op (n+2), W ∈ exchangeGroup (n+2) true false ∧
      ∀ (rho : Op n) (tau : Op 2), IsDensityMatrix rho → IsDensityMatrix tau →
        triplet*tau*triplet=tau →
        W*registerTensor rho tau*Wᴴ = registerTensor (V*rho*Vᴴ) tau) ∧
    (∃ W : Op (n+2), W ∈ exchangeGroup (n+2) true false ∧
      ∀ rho : Op n, IsDensityMatrix rho →
        W*registerTensor rho (pureDensity twoQubitSinglet)*Wᴴ = registerTensor (V*rho*Vᴴ) (pureDensity twoQubitSinglet)) ∧
    (∀ (F : Op n) (a b : Fin n) (s : Finset (Fin n)),
      F.IsHermitian → RotationInvariant F → WireSupported s F → a∉s → b∉s → a≠b →
      let K := registerTensor (F*heisenbergExchange a b) (1 : Op 2) - registerTensor F (heisenbergExchange (0 : Fin 2) 1)
      Complex.I • K ∈ exchangeLie (n+2) false false ∧
      (∀ (psi : Vec n) (eta : Vec 2), act triplet eta=eta →
        act K (tensorState psi eta) =
          tensorState (act (F*heisenbergExchange a b-(1/2 : ℂ) • F) psi) eta) ∧
      (∀ psi : Vec n, act K (tensorState psi twoQubitSinglet) =
        tensorState (act (F*heisenbergExchange a b+(3/2 : ℂ) • F) psi) twoQubitSinglet)) := by sorry

end QAlgorithms.Papers.Independent.Advance50.P49

end
Source
Rotationally-Invariant Circuits: Universality with the exchange interaction and two ancilla qubits, arXiv:2202.01963v1, PDF p. 4, Two-ancilla universality for triplet and singlet preparations
Read-back

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

For every natural number nnn, including 000, let Hn=C{0,1}n\mathcal H_n=\mathbb C^{\{0,1\}^n}Hn​=C{0,1}n, and let VVV be a unitary operator on Hn\mathcal H_nHn​ commuting with R⊗nR^{\otimes n}R⊗n for every unitary 2×22\times22×2 matrix RRR. Write σα(a)\sigma_\alpha^{(a)}σα(a)​ for a standard Pauli matrix on wire aaa and the identity elsewhere, and put Eab=12∑α=X,Y,Zσα(a)σα(b)E_{ab}=\frac12\sum_{\alpha=X,Y,Z}\sigma_\alpha^{(a)}\sigma_\alpha^{(b)}Eab​=21​∑α=X,Y,Z​σα(a)​σα(b)​. On two ancillary qubits define Pt=12(E01+32I)P_{\mathrm t}=\frac12(E_{01}+\frac32I)Pt​=21​(E01​+23​I) and χ=(∣01⟩−∣10⟩)/2\chi=(|01\rangle-|10\rangle)/\sqrt2χ=(∣01⟩−∣10⟩)/2​, with ∣x⟩|x\rangle∣x⟩ the coordinate unit vector at bit string xxx. Tensor products below concatenate the data and ancillary registers, with entries (A⊗B)xy=AxdydBxaya(A\otimes B)_{xy}=A_{x_{\mathrm d}y_{\mathrm d}}B_{x_{\mathrm a}y_{\mathrm a}}(A⊗B)xy​=Axd​yd​​Bxa​ya​​, and vector amplitudes (ψ⊗η)x=ψxdηxa(\psi\otimes\eta)_x=\psi_{x_{\mathrm d}}\eta_{x_{\mathrm a}}(ψ⊗η)x​=ψxd​​ηxa​​. There exists WWW that is a finite product of matrices exp⁡(−itEa,a+1)\exp(-itE_{a,a+1})exp(−itEa,a+1​) on the n+2n+2n+2 wires, with arbitrary real ttt, such that, for every pair of positive semidefinite, trace-one matrices ρ\rhoρ on the data register and τ\tauτ on the two ancillary qubits satisfying PtτPt=τP_{\mathrm t}\tau P_{\mathrm t}=\tauPt​τPt​=τ,

W(ρ⊗τ)W†=(VρV†)⊗τ.W(\rho\otimes\tau)W^\dagger=(V\rho V^\dagger)\otimes\tau.W(ρ⊗τ)W†=(VρV†)⊗τ.

There also exists a possibly different WWW in that same generated monoid such that, for every positive semidefinite, trace-one data matrix ρ\rhoρ, W(ρ⊗∣χ⟩⟨χ∣)W†=(VρV†)⊗∣χ⟩⟨χ∣W(\rho\otimes|\chi\rangle\langle\chi|)W^\dagger=(V\rho V^\dagger)\otimes|\chi\rangle\langle\chi|W(ρ⊗∣χ⟩⟨χ∣)W†=(VρV†)⊗∣χ⟩⟨χ∣. Finally, for every data operator FFF, data wires a,ba,ba,b, and finite data-wire set sss, if FFF is Hermitian, commutes with every R⊗nR^{\otimes n}R⊗n, satisfies WireSupported⁡(s,F)\operatorname{WireSupported}(s,F)WireSupported(s,F), and a,b∉sa,b\notin sa,b∈/s with a≠ba\ne ba=b, define K=(FEab)⊗I−F⊗E01K=(FE_{ab})\otimes I-F\otimes E_{01}K=(FEab​)⊗I−F⊗E01​, where the last exchange acts on the two ancillas. The definition of WireSupported⁡\operatorname{WireSupported}WireSupported is not present in the supplied code. Then iKiKiK belongs to the smallest real Lie subalgebra of operators on Hn+2\mathcal H_{n+2}Hn+2​ containing iEcdiE_{cd}iEcd​ for all distinct wires c,dc,dc,d; for every data vector ψ\psiψ and ancillary vector η\etaη satisfying Ptη=ηP_{\mathrm t}\eta=\etaPt​η=η, K(ψ⊗η)=((FEab−12F)ψ)⊗ηK(\psi\otimes\eta)=((FE_{ab}-\frac12F)\psi)\otimes\etaK(ψ⊗η)=((FEab​−21​F)ψ)⊗η; and, for every data vector ψ\psiψ, K(ψ⊗χ)=((FEab+32F)ψ)⊗χK(\psi\otimes\chi)=((FE_{ab}+\frac32F)\psi)\otimes\chiK(ψ⊗χ)=((FEab​+23​F)ψ)⊗χ. These vector identities impose no normalization hypothesis on ψ\psiψ or η\etaη; the conditions requiring two distinct data wires have no instances when n<2n<2n<2.

Human review
  • Endorsed by Shuze Chen · Oct 29, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Gohan · Oct 29, 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