Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Explicit empty-first-mode conditional update

Open
QAlgorithms.Papers.Independent.Intake100.P22.first_mode_update

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

prove2quantum

Fix a finite number n≥0n\ge0n≥0 of fermionic modes. Let C2n=End⁡(C2n)\mathcal C_{2n}=\operatorname{End}(\mathbb C^{2^n})C2n​=End(C2n) have Hermitian Majorana generators cac_aca​ satisfying cacb+cbca=2δabIc_ac_b+c_bc_a=2\delta_{ab}Ica​cb​+cb​ca​=2δab​I. The symbol map ω\omegaω sends each ordered Majorana monomial linearly to the corresponding ordered Grassmann monomial; it is not multiplicative. Gaussian states, operators, and maps have the meanings of Definitions 1–3 of the paper. All maps act on the full complex operator algebra, including its odd sector.

Assume n≥1n\ge1n≥1. Let ρ\rhoρ be a Gaussian density with real covariance MMM and K12=−K21=1K_{12}=-K_{21}=1K12​=−K21​=1, all other entries zero. Let P0=a1a1†P_0=a_1a_1^\daggerP0​=a1​a1†​, p0=Tr⁡(ρP0)p_0=\operatorname{Tr}(\rho P_0)p0​=Tr(ρP0​), and suppose p0≠0p_0\ne0p0​=0. Then p0>0p_0>0p0​>0, det⁡(I−MK)≠0\det(I-MK)\ne0det(I−MK)=0, and with L=(I−MK)−1ML=(I-MK)^{-1}ML=(I−MK)−1M,

ω(P0ρP0,θ)=p02nexp⁡ ⁣(iθ1θ2+i2∑a,b=32nLabθaθb).\omega(P_0\rho P_0,\theta)=\frac{p_0}{2^n}\exp\!\left(i\theta_1\theta_2+\frac i2\sum_{a,b=3}^{2n}L_{ab}\theta_a\theta_b\right).ω(P0​ρP0​,θ)=2np0​​exp​iθ1​θ2​+2i​a,b=3∑2n​Lab​θa​θb​​.

The output trace equals p0p_0p0​, and P0ρP0/p0P_0\rho P_0/p_0P0​ρP0​/p0​ is a Gaussian density. If det⁡M≠0\det M\ne0detM=0, also p0=12Pf⁡(M)Pf⁡(K−M−1)p_0=\tfrac12\operatorname{Pf}(M)\operatorname{Pf}(K-M^{-1})p0​=21​Pf(M)Pf(K−M−1). No inverse of a singular MMM is used for the update itself. This gives the conditional first-mode evolution, with an empty trailing block at n=1n=1n=1.

Preamble
import Definitions.Def_QAlgorithms_Papers_Independent_Intake100_P22
Formal statement
noncomputable section

open scoped BigOperators Matrix ComplexConjugate ComplexOrder

namespace QAlgorithms.Papers.Independent.Intake100.P22

open QAlgorithms.Papers.Independent.Advance50.P19
  (CARSystem Major monomial wick totalFermionParity)

open QAlgorithms.Papers.Independent.Information100.P21 (Op)

attribute [local instance] Classical.propDecidable Classical.decEq

/-- PDF pp.11-12: explicit conditional empty-first-mode symbol. Nonzero outcome
probability implies the required inverse exists; invertibility of M is needed
only for the signed Pfaffian probability expression. -/
theorem first_mode_update {n : ℕ} (hn : 0 < n) (s : CARSystem n)
    (rho : Op (Qubits n)) (M : Matrix (Major n) (Major n) ℝ) (h : StateWith s rho M)
    (hprob : (rho * modeProjector s ⟨0, hn⟩ false).trace ≠ 0) :
    let p := (rho * modeProjector s ⟨0, hn⟩ false).trace
    let Mc := M.map Complex.ofReal
    let Y := conjSuperop (modeProjector s ⟨0, hn⟩ false) rho
    (1 - Mc * firstK n).det ≠ 0 ∧
      majoranaSymbol s Y = firstOutcomeSymbol p ((1 - Mc * firstK n)⁻¹ * Mc) ∧
      Y.trace = p ∧ 0 < p.re ∧ FermionicGaussianState s (normalizeComplexTrace Y) ∧
      (Mc.det ≠ 0 → p = (1 / 2 : ℂ) * pfaffian Mc * pfaffian (firstK n - Mc⁻¹)) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P22

end
Source
Lagrangian representation for fermionic linear optics, arXiv:quant-ph/0404180v2, PDF p. 11, §VIII: explicit conditional empty-first-mode update
Read-back

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

For every positive natural number nnn, let Q={0,1}nQ=\{0,1\}^nQ={0,1}n, J={0,…,2n−1}J=\{0,\ldots,2n-1\}J={0,…,2n−1}, and let s=(ca)s=(c_a)s=(ca​) be Hermitian complex matrices on CQ\mathbb C^QCQ satisfying cacb+cbca=2δabIc_ac_b+c_bc_a=2\delta_{ab}Ica​cb​+cb​ca​=2δab​I. For S⊆JS\subseteq JS⊆J, let cSc_ScS​ be the increasing product, with c∅=Ic_\varnothing=Ic∅​=I, and define X^=∑S2−ntr⁡(cS†X)θS\widehat X=\sum_S2^{-n}\operatorname{tr}(c_S^\dagger X)\theta_SX=∑S​2−ntr(cS†​X)θS​. Exterior generators anticommute and square to zero, and exp⁡∧,2n(q)=∑k=02nqk/k!\exp_{\wedge,2n}(q)=\sum_{k=0}^{2n}q^k/k!exp∧,2n​(q)=∑k=02n​qk/k!. Let ρ\rhoρ be a positive semidefinite complex Q×QQ\times QQ×Q matrix with tr⁡ρ=1\operatorname{tr}\rho=1trρ=1, and let MMM be a real J×JJ\times JJ×J matrix with MT=−MM^{\mathsf T}=-MMT=−M and

ρ^=2−nexp⁡∧,2n ⁣(i2∑a,bMabθaθb).\widehat\rho=2^{-n} \exp_{\wedge,2n}\!\left(\frac{i}{2}\sum_{a,b}M_{ab}\theta_a\theta_b\right).ρ​=2−nexp∧,2n​​2i​a,b∑​Mab​θa​θb​​.

Put P0=12(I+ic0c1)P_0=\tfrac12(I+ic_0c_1)P0​=21​(I+ic0​c1​), and assume tr⁡(ρP0)≠0\operatorname{tr}(\rho P_0)\ne0tr(ρP0​)=0. Define p=tr⁡(ρP0)∈Cp=\operatorname{tr}(\rho P_0)\in\mathbb Cp=tr(ρP0​)∈C, let McM_cMc​ be MMM regarded as a complex matrix, put Y=P0ρP0†Y=P_0\rho P_0^\daggerY=P0​ρP0†​, and let FFF be the complex J×JJ\times JJ×J matrix with F01=1F_{01}=1F01​=1, F10=−1F_{10}=-1F10​=−1, and every other entry zero. Then det⁡(I−McF)≠0\det(I-M_cF)\ne0det(I−Mc​F)=0, and, with L=(I−McF)−1McL=(I-M_cF)^{-1}M_cL=(I−Mc​F)−1Mc​,

Y^=p2nexp⁡∧,2n ⁣(iθ0θ1+i2∑a,b∈Ja≥2, b≥2Labθaθb),tr⁡Y=p,Re⁡p>0.\widehat Y =\frac{p}{2^n}\exp_{\wedge,2n}\!\left( i\theta_0\theta_1+ \frac{i}{2}\sum_{\substack{a,b\in J\\a\ge2,\ b\ge2}} L_{ab}\theta_a\theta_b\right), \qquad \operatorname{tr}Y=p,\qquad \operatorname{Re}p>0.Y=2np​exp∧,2n​​iθ0​θ1​+2i​a,b∈Ja≥2, b≥2​∑​Lab​θa​θb​​,trY=p,Rep>0.

Furthermore, Z=(tr⁡Y)−1YZ=(\operatorname{tr}Y)^{-1}YZ=(trY)−1Y is positive semidefinite with trace 111, and there exists a real skew matrix NNN such that Z^=2−nexp⁡∧,2n(i2∑a,bNabθaθb)\widehat Z=2^{-n}\exp_{\wedge,2n}(\frac{i}{2}\sum_{a,b}N_{ab}\theta_a\theta_b)Z=2−nexp∧,2n​(2i​∑a,b​Nab​θa​θb​). If det⁡Mc≠0\det M_c\ne0detMc​=0, then

p=12pf⁡(Mc)pf⁡(F−Mc−1).p=\frac12\operatorname{pf}(M_c)\operatorname{pf}(F-M_c^{-1}).p=21​pf(Mc​)pf(F−Mc−1​).

Here the Pfaffian uses the full increasing index list; its empty-list value is 111, and recursively pairing the first index with the jjj-th member of the remaining list contributes the matrix entry times (−1)j(-1)^j(−1)j times the value on the list with that pair removed. The positive-nnn hypothesis supplies indices 0,10,10,1; at n=1n=1n=1, the displayed sum over indices at least 222 is empty.

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

    Confirmed by the moderator at approval.

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