Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Wick Pfaffian formula from the Gaussian symbol

Open
QAlgorithms.Papers.Independent.Intake100.P22.wick_correlators

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.

Let ρ\rhoρ be a Gaussian density with real skew covariance MMM, defined by ω(ρ,θ)=2−ne(i/2)θTMθ\omega(\rho,\theta)=2^{-n}e^{(i/2)\theta^TM\theta}ω(ρ,θ)=2−ne(i/2)θTMθ. For p≥0p\ge0p≥0 and strictly increasing indices 1≤a1<⋯<a2p≤2n1\le a_1<\cdots<a_{2p}\le2n1≤a1​<⋯<a2p​≤2n, let M∣aM|_aM∣a​ be the indicated principal submatrix. Then

Tr⁡(ρ ipca1⋯ca2p)=Pf⁡(M∣a).\operatorname{Tr}(\rho\,i^p c_{a_1}\cdots c_{a_{2p}})=\operatorname{Pf}(M|_a).Tr(ρipca1​​⋯ca2p​​)=Pf(M∣a​).

The empty product and empty Pfaffian are both one. This determines higher even correlators from the two-point covariance.

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 p.4, Eq.(17): Wick's Pfaffian formula follows from the Grassmann
Gaussian definition. Printed c_(2p) is corrected to c_(a_(2p)), as fixed by the
index list immediately after the display. The empty correlator is included. -/
theorem wick_correlators {n : ℕ} (s : CARSystem n) (rho : Op (Qubits n))
    (M : Matrix (Major n) (Major n) ℝ) (h : StateWith s rho M)
    (p : ℕ) (a : Fin (2 * p) → Major n) (ha : StrictMono a) :
    (rho * ((Complex.I ^ p) • monomial s (List.ofFn a))).trace =
      pfaffian (fun i j => (M (a i) (a j) : ℂ)) := by sorry

end QAlgorithms.Papers.Independent.Intake100.P22

end
Source
Lagrangian representation for fermionic linear optics, arXiv:quant-ph/0404180v2, PDF p. 4, §IV, Eq.(17): Wick formula for Gaussian-state correlators
Read-back

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

Let n≥0n\ge 0n≥0, let Qn={0,1}nQ_n=\{0,1\}^nQn​={0,1}n, and let sss consist of Hermitian matrices c0,…,c2n−1c_0,\ldots,c_{2n-1}c0​,…,c2n−1​ on CQn\mathbb C^{Q_n}CQn​ satisfying cicj+cjci=2δijIc_i c_j+c_j c_i=2\delta_{ij}Ici​cj​+cj​ci​=2δij​I. For an increasing finite set SSS of indices, write cSc_ScS​ for their ordered product, with c∅=Ic_\varnothing=Ic∅​=I. Use exterior variables θ0,…,θ2n−1\theta_0,\ldots,\theta_{2n-1}θ0​,…,θ2n−1​, with θi2=0\theta_i^2=0θi2​=0 and θiθj=−θjθi\theta_i\theta_j=-\theta_j\theta_iθi​θj​=−θj​θi​, and put θS=∏i∈S↑θi\theta_S=\prod_{i\in S}^{\uparrow}\theta_iθS​=∏i∈S↑​θi​ and exp⁡∧(q)=∑k=02nqk/k!\exp_\wedge(q)=\sum_{k=0}^{2n}q^k/k!exp∧​(q)=∑k=02n​qk/k!. Suppose ρ\rhoρ is positive semidefinite with tr⁡ρ=1\operatorname{tr}\rho=1trρ=1, and MMM is a real 2n×2n2n\times2n2n×2n matrix satisfying

MT=−M,∑S2−ntr⁡(cS†ρ)θS=2−nexp⁡∧ ⁣(i2∑j,kMjkθjθk).M^{\mathsf T}=-M,\qquad \sum_S 2^{-n}\operatorname{tr}(c_S^\dagger\rho)\theta_S =2^{-n}\exp_\wedge\!\left(\frac{i}{2}\sum_{j,k}M_{jk}\theta_j\theta_k\right).MT=−M,S∑​2−ntr(cS†​ρ)θS​=2−nexp∧​​2i​j,k∑​Mjk​θj​θk​​.

For every p≥0p\ge0p≥0 and every strictly increasing map a:{0,…,2p−1}→{0,…,2n−1}a:\{0,\ldots,2p-1\}\to\{0,\ldots,2n-1\}a:{0,…,2p−1}→{0,…,2n−1},

tr⁡ ⁣(ρ ipca(0)⋯ca(2p−1))=Pf⁡ ⁣((Ma(j),a(k))j,k=02p−1).\operatorname{tr}\!\left(\rho\,i^p c_{a(0)}\cdots c_{a(2p-1)}\right) =\operatorname{Pf}\!\left((M_{a(j),a(k)})_{j,k=0}^{2p-1}\right).tr(ρipca(0)​⋯ca(2p−1)​)=Pf((Ma(j),a(k)​)j,k=02p−1​).

Here the Pfaffian is the recursive pairing sum: its value on the empty list is 111, and on an ordered list (i0,…,ir−1)(i_0,\ldots,i_{r-1})(i0​,…,ir−1​) it is ∑j=1r−1(−1)j−1Mi0ij\sum_{j=1}^{r-1}(-1)^{j-1}M_{i_0i_j}∑j=1r−1​(−1)j−1Mi0​ij​​ times the corresponding value after deleting i0i_0i0​ and iji_jij​. The case p=0p=0p=0 asserts tr⁡ρ=1\operatorname{tr}\rho=1trρ=1; when p>np>np>n, no map satisfying the strict increase hypothesis exists.

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