Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Discrimination of the binary coherent signal: Gaussian-operation limit and simple non-Gaussian near-optimal receivers

Definition
QAlgorithms_Papers_Independent_Intake100_P08

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

prove2quantum

The objects the formalized statements of Discrimination of the binary coherent signal: Gaussian-operation limit and simple non-Gaussian near-optimal receivers (arXiv:0706.1038) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • signalAmplitude: PDF pp.1,4: known real phase-aligned amplitude; true labels plus.
  • photonLaw: PDF p.4, Eq.(18): the full number distribution of an oscillator vector. Only normalized vectors are used as states; no photon-number cutoff.
  • countNoClick: PDF p.4, Eq.(18): diagonal on/off effect evaluated on a number law. For physical parameters and normalized laws the series is summable, as the headline statements explicitly assert for every participating law.
  • receiverError: PDF p.5, Eq.(19): average Bayesian error, with equal priors and fixed on/off decoding. The same fixed preprocessing receives both possible inputs.
  • displacementError: PDF p.5, Eqs.(23)--(24): the actual completed-space displacement before one detector. This is defined by the experiment, not its claimed scalar formula. The theorem concludes the realization guards of the accepted operator.
  • IsGaussianUnitary: PDF pp.1,5: all single-mode affine Gaussian unitaries, including squeezing. The genuine Hilbert-space unitary intertwines the actual Weyl displacements by an arbitrary real-linear symplectic map and a real-linear phase. The latter retains all affine displacements. This bounded Weyl characterization avoids exponentiating a totalized unbounded quadratic generator.
  • bpskHomodyneError: PDF p.1: erfc(sqrt(2) alpha)/2 written as its convergent Gaussian tail. This is the equal-prior error of the exact q-homodyne spectral outcome law, whose coherent signals have means plus or minus sqrt(2) alpha and physical variance 1/2. The accepted Dependency50.P17.homodyneError is instead block-code decoding error for a two-sender channel; it is a distinct concept and is not reused.
  • poissonPhotonLaw: PDF p.5, preceding Eq.(26): the infinite Poisson photon-number law. Nonnegative intensity and normalization are concluded below, not assumed.
  • mismatchIntensity: PDF p.5, Eq.(25): total intensity after interference, including the noninterfering portion. delta is the output displacement, possibly complex.
  • imperfectError: PDF pp.5--6, Eqs.(25)--(26): physical Poisson laws and the same fixed on/off decoding. No optimized displacement or error formula is assumed.
  • localOscillator: PDF p.5: finite-beamsplitter local oscillator for output displacement delta. Used only for tau<1. tau=1 is the ideal displacement limit, not this division.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_RealLabelRegisters
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P39

/-!
Takeoka--Sasaki, arXiv:0706.1038v3. The oscillator is the completed countable
Fock space. Three Section III results are stated; HARD.md accounts for all
other nodes. Equal priors, fixed decoding off -> minus / on -> plus, and no
feedback are built into receiverError. The apparatus never receives the sign.
The homodyne comparison uses its exact coherent-state spectral outcome law,
with [q,p]=i, means plus or minus sqrt(2) alpha and variance 1/2. No infinitely squeezed
vector or cutoff is introduced. Compilation and independent moderation pending.
-/

noncomputable section

namespace QAlgorithms.Papers.Independent.Intake100.P08

open MeasureTheory
open scoped BigOperators

open QAlgorithms.Papers.Independent.Dependency50.P39
  (Fock fockKet coherentKet coherentCoefficient CoherentRealized
   displacement DisplacementRealized)

/-- PDF pp.1,4: known real phase-aligned amplitude; true labels plus. -/
def signalAmplitude (alpha : ℝ) (plus : Bool) : ℂ :=
  if plus then (alpha : ℂ) else -(alpha : ℂ)

/-- PDF p.4, Eq.(18): the full number distribution of an oscillator vector.
Only normalized vectors are used as states; no photon-number cutoff. -/
def photonLaw (psi : Fock) (n : ℕ) : ℝ := Complex.normSq (psi n)

/-- PDF p.4, Eq.(18): diagonal on/off effect evaluated on a number law.
For physical parameters and normalized laws the series is summable, as the
headline statements explicitly assert for every participating law. -/
def countNoClick (eta nu : ℝ) (law : ℕ → ℝ) : ℝ :=
  Real.exp (-nu) * ∑' n : ℕ, (1 - eta) ^ n * law n

/-- PDF p.5, Eq.(19): average Bayesian error, with equal priors and fixed
on/off decoding. The same fixed preprocessing receives both possible inputs. -/
def receiverError (alpha eta nu : ℝ) (preprocess : Fock → Fock) : ℝ :=
  (countNoClick eta nu (photonLaw (preprocess (coherentKet (signalAmplitude alpha true)))) +
    1 - countNoClick eta nu
      (photonLaw (preprocess (coherentKet (signalAmplitude alpha false))))) / 2

/-- PDF p.5, Eqs.(23)--(24): the actual completed-space displacement before
one detector. This is defined by the experiment, not its claimed scalar formula.
The theorem concludes the realization guards of the accepted operator. -/
def displacementError (alpha eta nu : ℝ) (delta : ℂ) : ℝ :=
  receiverError alpha eta nu (fun psi => displacement delta psi)

/-- PDF pp.1,5: all single-mode affine Gaussian unitaries, including squeezing.
The genuine Hilbert-space unitary intertwines the actual Weyl displacements by
an arbitrary real-linear symplectic map and a real-linear phase. The latter
retains all affine displacements. This bounded Weyl characterization avoids
exponentiating a totalized unbounded quadratic generator. -/
def IsGaussianUnitary (U : Fock ≃ₗᵢ[ℂ] Fock) : Prop :=
  ∃ S : ℂ →ₗ[ℝ] ℂ,
    (∀ z w : ℂ, (star (S z) * S w).im = (star z * w).im) ∧
    ∃ ell : ℂ →ₗ[ℝ] ℝ, ∀ (z : ℂ) (psi : Fock),
      U (displacement z psi) =
        Complex.exp (Complex.I * (ell z : ℂ)) • displacement (S z) (U psi)

/-- PDF p.1: erfc(sqrt(2) alpha)/2 written as its convergent Gaussian tail.
This is the equal-prior error of the exact q-homodyne spectral outcome law,
whose coherent signals have means plus or minus sqrt(2) alpha and physical variance 1/2.
The accepted Dependency50.P17.homodyneError is instead block-code decoding
error for a two-sender channel; it is a distinct concept and is not reused. -/
def bpskHomodyneError (alpha : ℝ) : ℝ :=
  (∫ x : ℝ in Set.Ici (Real.sqrt 2 * alpha), Real.exp (-(x ^ 2))) / Real.sqrt Real.pi

/-- PDF p.5, preceding Eq.(26): the infinite Poisson photon-number law.
Nonnegative intensity and normalization are concluded below, not assumed. -/
def poissonPhotonLaw (intensity : ℝ) (n : ℕ) : ℝ :=
  Real.exp (-intensity) * intensity ^ n / (Nat.factorial n : ℝ)

/-- PDF p.5, Eq.(25): total intensity after interference, including the
noninterfering portion. delta is the output displacement, possibly complex. -/
def mismatchIntensity (alpha tau xi : ℝ) (delta : ℂ) (plus : Bool) : ℝ :=
  (1 - xi) * (tau * alpha ^ 2 + Complex.normSq delta) +
    xi * Complex.normSq
      ((Real.sqrt tau : ℂ) * signalAmplitude alpha plus + delta)

/-- PDF pp.5--6, Eqs.(25)--(26): physical Poisson laws and the same fixed
on/off decoding. No optimized displacement or error formula is assumed. -/
def imperfectError (alpha eta nu tau xi : ℝ) (delta : ℂ) : ℝ :=
  (countNoClick eta nu (poissonPhotonLaw (mismatchIntensity alpha tau xi delta true)) +
    1 - countNoClick eta nu
      (poissonPhotonLaw (mismatchIntensity alpha tau xi delta false))) / 2

/-- PDF p.5: finite-beamsplitter local oscillator for output displacement delta.
Used only for tau<1. tau=1 is the ideal displacement limit, not this division. -/
def localOscillator (tau : ℝ) (delta : ℂ) : ℂ :=
  delta / (Real.sqrt (1 - tau) : ℂ)

example : signalAmplitude 0 true = signalAmplitude 0 false := by
  simp [signalAmplitude]

example : photonLaw (fockKet 0) 0 = 1 := by
  simp [photonLaw, fockKet, lp.single_apply]

example (eta nu : ℝ) :
    countNoClick eta nu (fun n : ℕ => if n = 0 then 1 else 0) = Real.exp (-nu) := by
  simp [countNoClick]

example : coherentCoefficient 0 0 = 1 := by
  norm_num [coherentCoefficient]

example : poissonPhotonLaw 0 0 = 1 := by
  norm_num [poissonPhotonLaw]

example (n : ℕ) : poissonPhotonLaw 0 (n + 1) = 0 := by
  simp [poissonPhotonLaw]

example : IsGaussianUnitary (LinearIsometryEquiv.refl ℂ Fock) := by
  refine ⟨LinearMap.id, ?_, 0, ?_⟩
  · intro z w
    rfl
  · intro z psi
    simp

example (alpha : ℝ) (delta : ℂ) (plus : Bool) :
    mismatchIntensity alpha 1 1 delta plus =
      Complex.normSq (signalAmplitude alpha plus + delta) := by
  simp [mismatchIntensity]

example (delta : ℂ) : localOscillator 0 delta = delta := by
  simp [localOscillator]

example (eta nu : ℝ) (preprocess : Fock → Fock) :
    receiverError 0 eta nu preprocess = 1 / 2 := by
  simp [receiverError, signalAmplitude] <;> ring

end QAlgorithms.Papers.Independent.Intake100.P08
Source
Discrimination of the binary coherent signal: Gaussian-operation limit and simple non-Gaussian near-optimal receivers, arXiv:0706.1038v3, https://arxiv.org/abs/0706.1038v3
Read-back

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

QAlgorithms.Papers.Independent.Intake100.P08.IsGaussianUnitary

For a complex-linear isometric equivalence UUU from ℓ2(N;C)\ell^2(\mathbb N;\mathbb C)ℓ2(N;C) onto itself, the predicate holds precisely when there exist real-linear maps S:C→CS:\mathbb C\to\mathbb CS:C→C and ℓ:C→R\ell:\mathbb C\to\mathbb Rℓ:C→R such that, for every z,w∈Cz,w\in\mathbb Cz,w∈C,

Im⁡ ⁣(S(z)‾S(w))=Im⁡(z‾w),\operatorname{Im}\!\bigl(\overline{S(z)}S(w)\bigr) =\operatorname{Im}(\overline z w),Im(S(z)​S(w))=Im(zw),

and, for every z∈Cz\in\mathbb Cz∈C and every ψ∈ℓ2(N;C)\psi\in\ell^2(\mathbb N;\mathbb C)ψ∈ℓ2(N;C),

U(D(z)ψ)=eiℓ(z)D(S(z))(Uψ).U(D(z)\psi)=e^{i\ell(z)}D(S(z))(U\psi).U(D(z)ψ)=eiℓ(z)D(S(z))(Uψ).

The vector ψ\psiψ is unrestricted, including the zero vector. Here, with ene_nen​ denoting the standard basis, D(z)D(z)D(z) is a chosen continuous complex-linear operator whose matrix entries are

(D(z)en)m=e−∣z∣2/2m! n!∑j=0min⁡(m,n)zm−j(−z‾)n−jj! (m−j)! (n−j)!(D(z)e_n)_m= e^{-|z|^2/2}\sqrt{m!\,n!} \sum_{j=0}^{\min(m,n)} \frac{z^{m-j}(-\overline z)^{n-j}}{j!\,(m-j)!\,(n-j)!}(D(z)en​)m​=e−∣z∣2/2m!n!​j=0∑min(m,n)​j!(m−j)!(n−j)!zm−j(−z)n−j​

for all m,n∈Nm,n\in\mathbb Nm,n∈N, if such an operator exists, and is zero otherwise. The predicate itself does not separately assert that these chosen operators realize their prescribed matrices.

QAlgorithms.Papers.Independent.Intake100.P08.bpskHomodyneError

For every real number α\alphaα, define

H(α)=1π∫[2 α,∞)e−x2 dx,H(\alpha)=\frac{1}{\sqrt{\pi}} \int_{[\sqrt2\,\alpha,\infty)}e^{-x^2}\,dx,H(α)=π​1​∫[2​α,∞)​e−x2dx,

where the integral is with respect to Lebesgue measure on R\mathbb RR. The integration region includes its lower endpoint, and α\alphaα is unrestricted, including zero and negative values.

QAlgorithms.Papers.Independent.Intake100.P08.countNoClick

For arbitrary real numbers η,ν\eta,\nuη,ν and an arbitrary function p:N→Rp:\mathbb N\to\mathbb Rp:N→R, define

Cη,ν(p)=e−ν∑n=0∞(1−η)np(n).C_{\eta,\nu}(p)=e^{-\nu}\sum_{n=0}^{\infty}(1-\eta)^n p(n).Cη,ν​(p)=e−νn=0∑∞​(1−η)np(n).

There are no assumptions that ppp is nonnegative, normalized, or summable, or that η∈[0,1]\eta\in[0,1]η∈[0,1] or ν≥0\nu\ge0ν≥0. The sum is the totalized real infinite sum, which equals zero when the family is not summable. The term at n=0n=0n=0 uses (1−η)0=1(1-\eta)^0=1(1−η)0=1, including when η=1\eta=1η=1.

QAlgorithms.Papers.Independent.Intake100.P08.displacementError

For arbitrary α,η,ν∈R\alpha,\eta,\nu\in\mathbb Rα,η,ν∈R and δ∈C\delta\in\mathbb Cδ∈C, define

Eα,η,ν(δ)=e−ν∑n=0∞(1−η)n∣(D(δ)c(α))n∣2+1−e−ν∑n=0∞(1−η)n∣(D(δ)c(−α))n∣22.E_{\alpha,\eta,\nu}(\delta)= \frac{e^{-\nu}\sum_{n=0}^{\infty}(1-\eta)^n |(D(\delta)c(\alpha))_n|^2 +1-e^{-\nu}\sum_{n=0}^{\infty}(1-\eta)^n |(D(\delta)c(-\alpha))_n|^2}{2}.Eα,η,ν​(δ)=2e−ν∑n=0∞​(1−η)n∣(D(δ)c(α))n​∣2+1−e−ν∑n=0∞​(1−η)n∣(D(δ)c(−α))n​∣2​.

Here c(β)c(\beta)c(β) is a chosen vector in ℓ2(N;C)\ell^2(\mathbb N;\mathbb C)ℓ2(N;C) with coordinates e−∣β∣2/2βn/n!e^{-|\beta|^2/2}\beta^n/\sqrt{n!}e−∣β∣2/2βn/n!​, if such a vector exists, and is zero otherwise. Writing ene_nen​ for the standard basis vector, D(z)D(z)D(z) is a chosen continuous complex-linear operator on this Hilbert space satisfying (D(z)en)m=dmn(z)(D(z)e_n)_m=d_{mn}(z)(D(z)en​)m​=dmn​(z) for every m,n∈Nm,n\in\mathbb Nm,n∈N, if any such operator exists, and is the zero operator otherwise, where

dmn(z)=e−∣z∣2/2m! n!∑j=0min⁡(m,n)zm−j(−z‾)n−jj! (m−j)! (n−j)!.d_{mn}(z)=e^{-|z|^2/2}\sqrt{m!\,n!} \sum_{j=0}^{\min(m,n)} \frac{z^{m-j}(-\overline z)^{n-j}}{j!\,(m-j)!\,(n-j)!}.dmn​(z)=e−∣z∣2/2m!n!​j=0∑min(m,n)​j!(m−j)!(n−j)!zm−j(−z)n−j​.

No parameter restrictions or realization assumptions are part of this definition, and each infinite real sum is zero if its summands are not summable.

QAlgorithms.Papers.Independent.Intake100.P08.imperfectError

For arbitrary α,η,ν,τ,ξ∈R\alpha,\eta,\nu,\tau,\xi\in\mathbb Rα,η,ν,τ,ξ∈R and δ∈C\delta\in\mathbb Cδ∈C, put

I±=(1−ξ)(τα2+∣δ∣2)+ξ∣δ±τ α∣2.I_\pm=(1-\xi)(\tau\alpha^2+|\delta|^2) +\xi|\delta\pm\sqrt{\tau}\,\alpha|^2.I±​=(1−ξ)(τα2+∣δ∣2)+ξ∣δ±τ​α∣2.

The defined error is

e−ν∑n=0∞(1−η)ne−I+I+nn!+1−e−ν∑n=0∞(1−η)ne−I−I−nn!2.\frac{ e^{-\nu}\sum_{n=0}^{\infty}(1-\eta)^n e^{-I_+}\dfrac{I_+^n}{n!} +1- e^{-\nu}\sum_{n=0}^{\infty}(1-\eta)^n e^{-I_-}\dfrac{I_-^n}{n!} }{2}.2e−ν∑n=0∞​(1−η)ne−I+​n!I+n​​+1−e−ν∑n=0∞​(1−η)ne−I−​n!I−n​​​.

The square root is the real square root, hence is zero for negative τ\tauτ, and its value and α\alphaα are embedded in C\mathbb CC in the intensities. No positivity, normalization, convergence, or parameter-range hypotheses occur in the definition. Infinite real sums use the convention of returning zero for a nonsummable family, and zeroth powers, including 000^000, equal one.

QAlgorithms.Papers.Independent.Intake100.P08.localOscillator

For every real number τ\tauτ and complex number δ\deltaδ, the defined complex value is

L(τ,δ)=δ1−τ,L(\tau,\delta)=\frac{\delta}{\sqrt{1-\tau}},L(τ,δ)=1−τ​δ​,

with the real square root embedded in C\mathbb CC. No restriction on τ\tauτ is imposed. When τ≥1\tau\ge1τ≥1, the square root is zero and complex division by zero is defined to give zero, so L(τ,δ)=0L(\tau,\delta)=0L(τ,δ)=0 for every δ\deltaδ.

QAlgorithms.Papers.Independent.Intake100.P08.mismatchIntensity

For arbitrary real numbers α,τ,ξ\alpha,\tau,\xiα,τ,ξ, a complex number δ\deltaδ, and a Boolean value bbb, define

Ib=(1−ξ)(τα2+∣δ∣2)+ξ∣τ sb+δ∣2,sb={α,b is true,−α,b is false,I_b=(1-\xi)\bigl(\tau\alpha^2+|\delta|^2\bigr) +\xi\left|\sqrt{\tau}\,s_b+\delta\right|^2, \qquad s_b= \begin{cases} \alpha,&b\text{ is true},\\ -\alpha,&b\text{ is false}, \end{cases}Ib​=(1−ξ)(τα2+∣δ∣2)+ξ​τ​sb​+δ​2,sb​={α,−α,​b is true,b is false,​

where α\alphaα and τ\sqrt{\tau}τ​ are embedded in C\mathbb CC inside the absolute value. No bounds on the real parameters are assumed, and IbI_bIb​ is not required to be nonnegative. The real square root is zero for τ<0\tau<0τ<0; in that case the formula reduces to (1−ξ)τα2+∣δ∣2(1-\xi)\tau\alpha^2+|\delta|^2(1−ξ)τα2+∣δ∣2.

QAlgorithms.Papers.Independent.Intake100.P08.photonLaw

For any vector ψ\psiψ in the complex Hilbert space ℓ2(N;C)\ell^2(\mathbb N;\mathbb C)ℓ2(N;C) and any n∈Nn\in\mathbb Nn∈N, including n=0n=0n=0, the value of the photon law at nnn is ∣ψn∣2|\psi_n|^2∣ψn​∣2. The definition does not require ψ\psiψ to have norm one, so it does not require these values to sum to one; the zero vector gives the identically zero law.

QAlgorithms.Papers.Independent.Intake100.P08.poissonPhotonLaw

For any real intensity ttt and any n∈Nn\in\mathbb Nn∈N, including zero, define

pt(n)=e−ttnn!.p_t(n)=e^{-t}\frac{t^n}{n!}.pt​(n)=e−tn!tn​.

There is no assumption that t≥0t\ge0t≥0; negative intensities can therefore give negative values. The factorial denominator is always nonzero. At t=0t=0t=0, the convention 00=10^0=100=1 gives p0(0)=1p_0(0)=1p0​(0)=1 and p0(n)=0p_0(n)=0p0​(n)=0 for n>0n>0n>0.

QAlgorithms.Papers.Independent.Intake100.P08.receiverError

For arbitrary α,η,ν∈R\alpha,\eta,\nu\in\mathbb Rα,η,ν∈R and any function P:ℓ2(N;C)→ℓ2(N;C)P:\ell^2(\mathbb N;\mathbb C)\to\ell^2(\mathbb N;\mathbb C)P:ℓ2(N;C)→ℓ2(N;C), define

Eα,η,ν(P)=e−ν∑n=0∞(1−η)n∣(Pc(α))n∣2+1−e−ν∑n=0∞(1−η)n∣(Pc(−α))n∣22.E_{\alpha,\eta,\nu}(P)= \frac{e^{-\nu}\sum_{n=0}^{\infty}(1-\eta)^n |(P c(\alpha))_n|^2 +1-e^{-\nu}\sum_{n=0}^{\infty}(1-\eta)^n |(P c(-\alpha))_n|^2}{2}.Eα,η,ν​(P)=2e−ν∑n=0∞​(1−η)n∣(Pc(α))n​∣2+1−e−ν∑n=0∞​(1−η)n∣(Pc(−α))n​∣2​.

Here real amplitudes are embedded in C\mathbb CC, and c(β)c(\beta)c(β), for β∈C\beta\in\mathbb Cβ∈C, is a chosen vector in ℓ2(N;C)\ell^2(\mathbb N;\mathbb C)ℓ2(N;C) whose coordinates satisfy

c(β)n=e−∣β∣2/2βnn!c(\beta)_n=e^{-|\beta|^2/2}\frac{\beta^n}{\sqrt{n!}}c(β)n​=e−∣β∣2/2n!​βn​

if such a vector exists, and is the zero vector otherwise. The function PPP need not be linear, continuous, or norm preserving, and no restrictions are placed on the three real parameters. Each real infinite sum is interpreted as zero if its summands are not summable; this definition alone supplies no bound on the resulting error.

QAlgorithms.Papers.Independent.Intake100.P08.signalAmplitude

For any real number α\alphaα and Boolean value bbb, the complex signal amplitude is α\alphaα, viewed as a complex number, when bbb is true, and −α-\alpha−α when bbb is false. No nonnegativity assumption is imposed on α\alphaα; when α=0\alpha=0α=0, both values are zero.

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