Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Bell difference sampling

Open
QAlgorithms.Papers.Independent.Extend50.P30.bellDifferenceSampling

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

prove2quantum

Let ∣ψ⟩|\psi\rangle∣ψ⟩ be an arbitrary normalized, possibly complex state of nnn qubits. Write pψ(x)=2−n∣⟨ψ∣Wx∣ψ⟩∣2p_\psi(x)=2^{-n}|\langle\psi|W_x|\psi\rangle|^2pψ​(x)=2−n∣⟨ψ∣Wx​∣ψ⟩∣2 for its characteristic distribution, and Πa\Pi_aΠa​ for the four-copy Bell difference measurement outcome aaa. For every phase-space label aaa, the outcome probability is the convolution below. If ψ\psiψ is a stabilizer state, it equals pψ(a)p_\psi(a)pψ​(a).

tr⁡(Πaψ⊗4)=∑xpψ(x)pψ(x+a).\operatorname{tr}(\Pi_a\psi^{\otimes4})=\sum_xp_\psi(x)p_\psi(x+a).tr(Πa​ψ⊗4)=x∑​pψ​(x)pψ​(x+a).

This gives the source's bell difference sampling in the fixed computational-basis and phase conventions.

Formalization Note Pure states carry norm one; stabilizer averages use density matrices to discard global phases. All finite tensor indices are explicitly ordered by copy, then physical qudit.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Extend50_P30
Formal statement
noncomputable section

open scoped BigOperators ComplexConjugate Matrix

namespace QAlgorithms.Papers.Independent.Extend50.P30

open QAlgorithms.Papers.Independent.Information100.P63 (tensorPower)

open QAlgorithms.Papers.Independent.Gap20.P06 (ketBra)

attribute [local instance] Classical.propDecidable

/-- PDF p.19, Theorem 3.2: arbitrary complex pure states and the stabilizer specialization. -/
theorem bellDifferenceSampling (n : ℕ) (v : EuclideanSpace ℂ (ResidueRegister 2 n))
    (hv : ‖v‖ = 1) (a : DiscretePhaseSpace 2 n) :
    QAlgorithms.effectProb (bellDifference n a) (tensorPower 4 (QAlgorithms.pureDensity v)) =
      ∑ x : DiscretePhaseSpace 2 n, characteristicDistribution v x * characteristicDistribution v (x + a) ∧
    (IsStabilizer v →
      QAlgorithms.effectProb (bellDifference n a) (tensorPower 4 (QAlgorithms.pureDensity v)) =
        characteristicDistribution v a) := by sorry

end QAlgorithms.Papers.Independent.Extend50.P30

end
Source
Schur-Weyl Duality for the Clifford Group with Applications: Property Testing, a Robust Hudson Theorem, and de Finetti Representations, arXiv:1712.08628v3, PDF p. 19, theorem-3.2
Read-back

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

For every n∈Nn\in\mathbb Nn∈N, write R=(Z/2Z)nR=(\mathbb Z/2\mathbb Z)^nR=(Z/2Z)n and Z=R×RZ=R\times RZ=R×R. For z=(p,q)∈Zz=(p,q)\in Zz=(p,q)∈Z, define Wz(a,b)=i−∑jval⁡(pj)val⁡(qj)(−1)∑jval⁡(pj)val⁡(aj)W_z(a,b)=i^{-\sum_j\operatorname{val}(p_j)\operatorname{val}(q_j)}(-1)^{\sum_j\operatorname{val}(p_j)\operatorname{val}(a_j)}Wz​(a,b)=i−∑j​val(pj​)val(qj​)(−1)∑j​val(pj​)val(aj​) when a=b+qa=b+qa=b+q, and zero otherwise. Define Bz∈CR×RB_z\in\mathbb C^{R\times R}Bz​∈CR×R by Bz(a,b)=2−n/2Wz(a,b)B_z(a,b)=2^{-n/2}W_z(a,b)Bz​(a,b)=2−n/2Wz​(a,b), write Pw(a,b)=w(a)w(b)‾P_w(a,b)=w(a)\overline{w(b)}Pw​(a,b)=w(a)w(b)​ for a vector’s rank-one matrix, and set Da=∑z∈ZPBz⊗PBz+aD_a=\sum_{z\in Z}P_{B_z}\otimes P_{B_{z+a}}Da​=∑z∈Z​PBz​​⊗PBz+a​​ on four copies of RRR. For every vector v∈CRv\in\mathbb C^Rv∈CR with ∥v∥=1\|v\|=1∥v∥=1, define χv(z)=2−n∣⟨v,Wzv⟩∣2\chi_v(z)=2^{-n}|\langle v,W_zv\rangle|^2χv​(z)=2−n∣⟨v,Wz​v⟩∣2. Then, for every a∈Za\in Za∈Z,

Re⁡tr⁡(DaPv⊗4)=∑z∈Zχv(z)χv(z+a).\operatorname{Re}\operatorname{tr}(D_aP_v^{\otimes4}) =\sum_{z\in Z}\chi_v(z)\chi_v(z+a).Retr(Da​Pv⊗4​)=z∈Z∑​χv​(z)χv​(z+a).

Moreover, if vvv is a stabilizer in the following explicit sense, this same quantity equals χv(a)\chi_v(a)χv​(a): let P={ihWz:0≤h<4, z∈Z}\mathcal P=\{i^hW_z:0\le h<4,\ z\in Z\}P={ihWz​:0≤h<4, z∈Z}; there is a finite subset G⊆PG\subseteq\mathcal PG⊆P containing the identity, closed under multiplication and adjoints, and satisfying A=cI⇒c=1A=cI\Rightarrow c=1A=cI⇒c=1 for every A∈GA\in GA∈G and c∈Cc\in\mathbb Cc∈C, such that Pv=(tr⁡AG)−1AGP_v=(\operatorname{tr}A_G)^{-1}A_GPv​=(trAG​)−1AG​, where AG=∣G∣−1∑P∈GPA_G=|G|^{-1}\sum_{P\in G}PAG​=∣G∣−1∑P∈G​P. Tensor powers here have entries (Pv⊗k)(u,w)=∏j=0k−1Pv(uj,wj)(P_v^{\otimes k})(u,w)=\prod_{j=0}^{k-1}P_v(u_j,w_j)(Pv⊗k​)(u,w)=∏j=0k−1​Pv​(uj​,wj​). The assertion includes n=0n=0n=0.

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