Definitions for Coherent-state constellations and polar codes for thermal Gaussian channels
DefinitionQAlgorithms_Papers_Independent_Intake100_P74The objects the formalized statements of Coherent-state constellations and polar codes for thermal Gaussian channels (arXiv:1603.05970) are stated in. Each was checked against the paper by a blind read-back and a moderator.
coherentEntry: PDF p.2: normalized coherent projector on the complete number basis.positivePState: PDF pp.5,8: positive coherent mixture. On probability measures every coefficient is bounded and integrable. Density means relative to d²z, not d²z/pi. Unlike Support50.P06.coherentMixture, the prior is any probability measure, including atomic constellations; it is not restricted to complexNormal N 0.HasThermalMoments: PDF p.5: all first/second ladder moments, both conjugates and both mixed-product orderings. HasSum excludes divergent-tsum default values.constellationPoint: PDF p.5, (7): amplitude z=sqrt(N/2)(x+iy).finiteConstellationState: PDF p.5, (7)--(8): independent finite probability masses, not densities. The two coordinate laws need only be separately centered and standardized.realGaussian: PDF p.7, (14): centered real Gaussian density for v>0.awgnDensity: PDF pp.5,7, (18): actual output density of sqrt(s)X+G, where G is an independent standard normal. No input moment premise.classicalCollision: PDF p.8, (19): positive collision integral against N(0,1+s). The denominator has positive variance on the stated s>=0 domain.classicalChiSquare: PDF pp.5,7: collision minus one; collision>=1 on probability inputs.realKernel: PDF p.7, (16): finite nonnegative Gaussian kernel for every s>=0.quantumCollision: PDF p.8: Tr[rho tau^(-1/2) rho tau^(-1/2)] as a positive Fock-entry sum. At vacuum a nonzero entry outside the reference support gives infinity. This is not the generally different Tr[rho² tau^(-1)].quantumChiSquare: PDF pp.5,8: extended quantum chi-square in the paper's convention.coherentCollisionKernel: PDF p.8, (22): t_N corrects printed t_n; the cross term is 2 t_N Re(z conjugate(w)). Only N>0 is used. This scalar positive kernel is distinct from Dependency50.P10.complexKernel, a matrix nullspace.outputAmplitudeLaw: PDF pp.2,5,7: the channel output's actual positive-P law, with independent coordinates and independent planar Gaussian noise. Nc=0 uses a Dirac mass; k=1 with independent Nc>=0 includes additive noise.constellationOutput: PDF p.7, Lemma 1: complete Fock output of the specified input mixture. No complementary channel or operational capacity is assigned by this definition.comparisonSnr: PDF pp.5,7: comparison SNR, used only at positive output energy.finiteRealLaw: PDF p.5: explicit finite real law, with masses rather than a density.singleModeEntropy: PDF pp.2,5: actual spectral von Neumann entropy, in nats, with a bijection between the one-mode occupation string and its number label.classicalInformationGap: PDF p.5, (9a): Holevo-information gap after cancellation of the common conditional displaced-thermal entropy g(Nc). The quantity is computed from the actual output, not a freely chosen rate scalar. On standardized laws the output entropy is finite and at most g(k²N+Nc). Infinite entropy is explicit.randomWalkPoint: PDF p.3: standardized symmetric walk with m-1 steps, m>=2.randomWalkLaw: PDF p.3: the m possible walk positions have their binomial probabilities.normalHermite: PDF pp.3--4: probabilists' Hermite polynomial, for standard normal weight.gaussHermiteWeight: PDF pp.3--4: standard Gaussian quadrature weight at a root x of H_m. This is m!/(m² H_(m-1)(x)²); it is only used for m>=2.gaussHermiteLaw: PDF pp.3--4: m real roots of H_m with the standard-normal quadrature weights. Roots are simple for m>=1, so the finset loses no multiplicities. There is no arbitrary choice of a grid or normalization.gapExponent: PDF p.6: exact fixed-channel exponential rate, only used for k,N>0.
import Mathlib
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P33
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P39
import Definitions.Def_QAlgorithms_Papers_Independent_Next46_P32
import Definitions.Def_QAlgorithms_Papers_Independent_Support50_P14
/-! Lacerda--Renes--Scholz, arXiv:1603.05970v3. Complete countable Fock
basis, without photon cutoff. Divergent positive sums/integrals stay infinite.
All new definitions are paper-local. Deferred nodes are in HARD.md/GAPS.json.
Compilation and independent moderation are pending batch handoff. -/
noncomputable section
namespace QAlgorithms.Papers.Independent.Intake100.P74
open MeasureTheory
open scoped BigOperators ENNReal
open QAlgorithms.Papers.Independent.Dependency50.P33 (IsDensity)
open QAlgorithms.Papers.Independent.Dependency50.P39 (coherentCoefficient thermalMatrix)
open QAlgorithms.Papers.Independent.Support50.P14 (photonEnergy)
open QAlgorithms.Papers.Independent.Next46.P32 (complexNormal spectralEntropyNats)
open QAlgorithms.Papers.Independent.Claimed50.P39 (thermalProbability g)
attribute [local instance] Classical.propDecidable Classical.decEq
/-! Frozen reuse: thermalMatrix uses covariance parameter a=2N+1, so vacuum
is thermalMatrix 1. photonEnergy is reused on occupation strings of Fin 1,
relabeling rho via (a,b) ↦ rho (a 0) (b 0). No frozen body is copied.
The general positive-P mixture and scalar coherent collision kernel have
distinct descriptive names because the same short frozen names have
incompatible domains and meanings, as recorded in ASSESSMENT.json. -/
/-- PDF p.2: normalized coherent projector on the complete number basis. -/
def coherentEntry (z : ℂ) (i j : ℕ) : ℂ :=
coherentCoefficient z i * star (coherentCoefficient z j)
/-- PDF pp.5,8: positive coherent mixture. On probability measures every
coefficient is bounded and integrable. Density means relative to d²z, not d²z/pi.
Unlike Support50.P06.coherentMixture, the prior is any probability measure,
including atomic constellations; it is not restricted to complexNormal N 0. -/
def positivePState (mu : Measure ℂ) : Matrix ℕ ℕ ℂ :=
fun i j => ∫ z, coherentEntry z i j ∂mu
/-- PDF p.5: all first/second ladder moments, both conjugates and both
mixed-product orderings. HasSum excludes divergent-tsum default values. -/
def HasThermalMoments (rho : Matrix ℕ ℕ ℂ) (N : ℝ) : Prop :=
HasSum (fun n : ℕ => (Real.sqrt (n + 1 : ℝ) : ℂ) * rho (n + 1) n) 0 ∧
HasSum (fun n : ℕ => (Real.sqrt (n + 1 : ℝ) : ℂ) * rho n (n + 1)) 0 ∧
HasSum (fun n : ℕ =>
(Real.sqrt ((n + 1 : ℝ) * (n + 2 : ℝ)) : ℂ) * rho (n + 2) n) 0 ∧
HasSum (fun n : ℕ =>
(Real.sqrt ((n + 1 : ℝ) * (n + 2 : ℝ)) : ℂ) * rho n (n + 2)) 0 ∧
HasSum (fun n : ℕ => (n : ℂ) * rho n n) (N : ℂ) ∧
HasSum (fun n : ℕ => (n + 1 : ℂ) * rho n n) ((N + 1 : ℝ) : ℂ)
/-- PDF p.5, (7): amplitude z=sqrt(N/2)(x+iy). -/
def constellationPoint (N : ℝ) (x y : ℝ) : ℂ :=
(Real.sqrt (N / 2) : ℂ) * ((x : ℂ) + Complex.I * (y : ℂ))
/-- PDF p.5, (7)--(8): independent finite probability masses, not densities.
The two coordinate laws need only be separately centered and standardized. -/
def finiteConstellationState {m l : ℕ} (N : ℝ)
(p : Fin m → ℝ) (q : Fin l → ℝ) (x : Fin m → ℝ) (y : Fin l → ℝ) :
Matrix ℕ ℕ ℂ :=
fun a b => ∑ i : Fin m, ∑ j : Fin l,
((p i * q j : ℝ) : ℂ) * coherentEntry (constellationPoint N (x i) (y j)) a b
/-- PDF p.7, (14): centered real Gaussian density for v>0. -/
def realGaussian (v t : ℝ) : ℝ :=
Real.exp (-t ^ 2 / (2 * v)) / Real.sqrt (2 * Real.pi * v)
/-- PDF pp.5,7, (18): actual output density of sqrt(s)X+G, where
G is an independent standard normal. No input moment premise. -/
def awgnDensity (s : ℝ) (mu : Measure ℝ) (y : ℝ) : ℝ≥0∞ :=
∫⁻ x, ENNReal.ofReal (realGaussian 1 (y - Real.sqrt s * x)) ∂mu
/-- PDF p.8, (19): positive collision integral against N(0,1+s).
The denominator has positive variance on the stated s>=0 domain. -/
def classicalCollision (s : ℝ) (mu : Measure ℝ) : ℝ≥0∞ :=
∫⁻ y : ℝ, (awgnDensity s mu y) ^ 2 /
ENNReal.ofReal (realGaussian (1 + s) y)
/-- PDF pp.5,7: collision minus one; collision>=1 on probability inputs. -/
def classicalChiSquare (s : ℝ) (mu : Measure ℝ) : ℝ≥0∞ :=
classicalCollision s mu - 1
/-- PDF p.7, (16): finite nonnegative Gaussian kernel for every s>=0. -/
def realKernel (s x y : ℝ) : ℝ :=
(1 + s) / Real.sqrt (1 + 2 * s) *
Real.exp (-s / (2 * (1 + 2 * s)) * (s * (x - y) ^ 2 - 2 * x * y))
/-- PDF p.8: Tr[rho tau^(-1/2) rho tau^(-1/2)] as a positive Fock-entry
sum. At vacuum a nonzero entry outside the reference support gives infinity.
This is not the generally different Tr[rho² tau^(-1)]. -/
def quantumCollision (rho : Matrix ℕ ℕ ℂ) (N : ℝ) : ℝ≥0∞ :=
if N = 0 then
if ∀ i j : ℕ, i ≠ 0 ∨ j ≠ 0 → rho i j = 0 then
ENNReal.ofReal (Complex.normSq (rho 0 0)) else ⊤
else
∑' ij : ℕ × ℕ, ENNReal.ofReal
(Complex.normSq (rho ij.1 ij.2) /
Real.sqrt (thermalProbability N ij.1 * thermalProbability N ij.2))
/-- PDF pp.5,8: extended quantum chi-square in the paper's convention. -/
def quantumChiSquare (rho : Matrix ℕ ℕ ℂ) (N : ℝ) : ℝ≥0∞ :=
quantumCollision rho N - 1
/-- PDF p.8, (22): t_N corrects printed t_n; the cross term is
2 t_N Re(z conjugate(w)). Only N>0 is used. This scalar positive
kernel is distinct from Dependency50.P10.complexKernel, a matrix nullspace. -/
def coherentCollisionKernel (N : ℝ) (z w : ℂ) : ℝ :=
(N + 1) * Real.exp (-Complex.normSq z - Complex.normSq w +
2 * Real.sqrt ((N + 1) / N) * (z * star w).re)
/-- PDF pp.2,5,7: the channel output's actual positive-P law, with
independent coordinates and independent planar Gaussian noise. Nc=0 uses
a Dirac mass; k=1 with independent Nc>=0 includes additive noise. -/
def outputAmplitudeLaw (k Nc N : ℝ) (mu nu : Measure ℝ) : Measure ℂ :=
Measure.map (fun t : (ℝ × ℝ) × ℂ =>
(k : ℂ) * constellationPoint N t.1.1 t.1.2 + t.2)
((mu.prod nu).prod (complexNormal Nc 0))
/-- PDF p.7, Lemma 1: complete Fock output of the specified input mixture.
No complementary channel or operational capacity is assigned by this definition. -/
def constellationOutput (k Nc N : ℝ) (mu nu : Measure ℝ) : Matrix ℕ ℕ ℂ :=
positivePState (outputAmplitudeLaw k Nc N mu nu)
/-- PDF pp.5,7: comparison SNR, used only at positive output energy. -/
def comparisonSnr (k Nc N : ℝ) : ℝ :=
k ^ 2 * N /
(Real.sqrt ((k ^ 2 * N + Nc) * (k ^ 2 * N + Nc + 1)) - k ^ 2 * N)
example : coherentEntry 0 0 0 = 1 := by
simp [coherentEntry, coherentCoefficient]
example : thermalMatrix 1 0 0 = 1 := by
norm_num [thermalMatrix]
example (x y : ℝ) : realKernel 0 x y = 1 := by
simp [realKernel]
example (N : ℝ) : coherentCollisionKernel N 0 0 = N + 1 := by
simp [coherentCollisionKernel]
example (x y : ℝ) : constellationPoint 0 x y = 0 := by
simp [constellationPoint]
/-- PDF p.5: explicit finite real law, with masses rather than a density. -/
def finiteRealLaw {m : ℕ} (p x : Fin m → ℝ) : Measure ℝ :=
∑ i : Fin m, ENNReal.ofReal (p i) • Measure.dirac (x i)
/-- PDF pp.2,5: actual spectral von Neumann entropy, in nats, with a
bijection between the one-mode occupation string and its number label. -/
def singleModeEntropy (rho : Matrix ℕ ℕ ℂ) : ℝ≥0∞ :=
spectralEntropyNats (fun a b : Fin 1 → ℕ => rho (a 0) (b 0))
/-- PDF p.5, (9a): Holevo-information gap after cancellation of the common
conditional displaced-thermal entropy g(Nc). The quantity is computed from
the actual output, not a freely chosen rate scalar. On standardized laws the
output entropy is finite and at most g(k²N+Nc). Infinite entropy is explicit. -/
def classicalInformationGap (k Nc N : ℝ) (mu : Measure ℝ) : ℝ≥0∞ :=
let H := singleModeEntropy (constellationOutput k Nc N mu mu)
if H = ⊤ then ⊤ else ENNReal.ofReal (g (k ^ 2 * N + Nc)) - H
/-- PDF p.3: standardized symmetric walk with m-1 steps, m>=2. -/
def randomWalkPoint (m : ℕ) (j : Fin m) : ℝ :=
(2 * (j.val : ℝ) - ((m - 1 : ℕ) : ℝ)) / Real.sqrt ((m - 1 : ℕ) : ℝ)
/-- PDF p.3: the m possible walk positions have their binomial probabilities. -/
def randomWalkLaw (m : ℕ) : Measure ℝ :=
finiteRealLaw
(fun j : Fin m => (Nat.choose (m - 1) j.val : ℝ) / (2 : ℝ) ^ (m - 1))
(randomWalkPoint m)
/-- PDF pp.3--4: probabilists' Hermite polynomial, for standard normal weight. -/
def normalHermite (m : ℕ) : Polynomial ℝ :=
(Polynomial.hermite m).map (Int.castRingHom ℝ)
/-- PDF pp.3--4: standard Gaussian quadrature weight at a root x of H_m.
This is m!/(m² H_(m-1)(x)²); it is only used for m>=2. -/
def gaussHermiteWeight (m : ℕ) (x : ℝ) : ℝ :=
(Nat.factorial m : ℝ) /
((m : ℝ) ^ 2 * ((normalHermite (m - 1)).eval x) ^ 2)
/-- PDF pp.3--4: m real roots of H_m with the standard-normal quadrature
weights. Roots are simple for m>=1, so the finset loses no multiplicities.
There is no arbitrary choice of a grid or normalization. -/
def gaussHermiteLaw (m : ℕ) : Measure ℝ :=
∑ x ∈ (normalHermite m).roots.toFinset,
ENNReal.ofReal (gaussHermiteWeight m x) • Measure.dirac x
/-- PDF p.6: exact fixed-channel exponential rate, only used for k,N>0. -/
def gapExponent (k Nc N : ℝ) : ℝ :=
2 * Real.log ((1 + comparisonSnr k Nc N) / comparisonSnr k Nc N)
example : randomWalkPoint 2 (0 : Fin 2) = -1 := by
norm_num [randomWalkPoint]
example : gaussHermiteWeight 2 1 = 1 / 2 := by
norm_num [gaussHermiteWeight, normalHermite, Polynomial.hermite]
end QAlgorithms.Papers.Independent.Intake100.P74
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Intake100.P74.HasThermalMoments
For an arbitrary complex matrix and any real number , this predicate requires all six complex sums below to converge to the indicated values, with convergence taken over the net of finite subsets of :
All real coefficients and right-hand sides are embedded in . No positivity, self-adjointness, or density-matrix assumption on , and no nonnegativity assumption on , is included.
QAlgorithms.Papers.Independent.Intake100.P74.awgnDensity
For any real number , measure on , and real number , this defines an extended nonnegative real number
where the integral is the nonnegative Lebesgue integral and embeds into . The measure need not be finite or normalized, and the result may be infinite. Negative is allowed; for , the square root is zero, so the integrand is independent of .
QAlgorithms.Papers.Independent.Intake100.P74.classicalChiSquare
For any real and any measure on , let
This defines in , so subtraction is truncated at zero: its value is for finite , and for . Here embeds , both integrals are nonnegative Lebesgue integrals, and the outer measure is Lebesgue measure. No normalization or parameter restrictions are assumed; negative-input real square roots and real division by zero are zero, while extended nonnegative division satisfies and for .
QAlgorithms.Papers.Independent.Intake100.P74.classicalCollision
For any real and any measure on , define
The declaration defines the extended nonnegative real number
where the outer integral uses Lebesgue measure and means embedded in . There are no restrictions on or . Real square roots of negative inputs and real division by zero are zero; division in instead gives and a positive numerator divided by zero equal to .
QAlgorithms.Papers.Independent.Intake100.P74.classicalInformationGap
For arbitrary real numbers and a measure on , set and define a matrix by
where is the pushforward of by , with and, for , Lebesgue density . Let be the infimum of over all summable nonnegative weights of total one and vectors satisfying , with each positive-weight vector normalized and distinct positive-weight vectors orthogonal; an empty collection of such resolutions gives . The definition is
Thus subtraction is truncated at zero. There are no positivity, probability, or integrability assumptions: nonintegrable matrix entries have integral zero, real square roots of negative arguments are zero, and the total real logarithm is zero at zero and equals for nonzero .
QAlgorithms.Papers.Independent.Intake100.P74.coherentCollisionKernel
For every real number and complex numbers , this defines the real number
There is no positivity assumption on . Division by zero is defined to give zero, and the real square root of a negative number is zero; in particular, at the value is .
QAlgorithms.Papers.Independent.Intake100.P74.coherentEntry
For every complex number and natural numbers , including zero, this defines the complex number
The factorials and square roots are real numbers embedded in . In particular, the powers use , including when .
QAlgorithms.Papers.Independent.Intake100.P74.comparisonSnr
For all real numbers , this defines
No sign or nonvanishing assumptions are imposed. The real square root is zero when its argument is negative, and the quotient is zero whenever its denominator is zero.
QAlgorithms.Papers.Independent.Intake100.P74.constellationOutput
For arbitrary real numbers and measures on , this defines the complex matrix indexed by whose entries are
where is the pushforward of by . Here , while for its Lebesgue density is . No normalization or integrability hypotheses are imposed, and the definition does not assert that is a density matrix; a nonintegrable entry has integral zero under the total integral convention. Negative gives the zero measure, and makes the constellation contribution zero.
QAlgorithms.Papers.Independent.Intake100.P74.constellationPoint
For any real numbers , this defines
There is no restriction on . The real square root is zero on nonpositive inputs, so the result is zero whenever .
QAlgorithms.Papers.Independent.Intake100.P74.finiteConstellationState
For any natural numbers , real number , and real families and , this defines a complex matrix indexed by natural numbers by setting and
The real weights are embedded in ; they need not be nonnegative or sum to one. If either indexing family is empty, the matrix is zero. Negative is allowed, with .
QAlgorithms.Papers.Independent.Intake100.P74.finiteRealLaw
For every natural number and arbitrary real families and , this defines the measure
on . Negative weights contribute zero, and weights at repeated points add. The weights need not sum to one. When , the measure is zero.
QAlgorithms.Papers.Independent.Intake100.P74.gapExponent
For arbitrary real numbers , define
Then the defined real number is
There are no positivity or nonzero-denominator assumptions. All operations use total real-valued conventions: division by zero is zero, the real square root of a negative number is zero, and . In particular, if the displayed denominator defining is zero, then and the defined exponent is zero.
QAlgorithms.Papers.Independent.Intake100.P74.gaussHermiteLaw
For every natural number , this defines the measure on
where and , with integer coefficients converted to real coefficients. Each distinct real root is included once, irrespective of multiplicity. Division by zero gives zero. For the root set is empty and the measure is zero; for the measure is .
QAlgorithms.Papers.Independent.Intake100.P74.gaussHermiteWeight
For every natural number and real number , this defines
where is the real-coefficient Hermite polynomial with and . No root condition on is required. Division by zero gives zero, so the weight is zero for and whenever the denominator vanishes.
QAlgorithms.Papers.Independent.Intake100.P74.normalHermite
For every natural number , this defines the real-coefficient polynomial obtained from the integer-coefficient Hermite polynomial by converting each coefficient from an integer to a real number. The convention is
so this includes and gives the constant polynomial one in that case.
QAlgorithms.Papers.Independent.Intake100.P74.outputAmplitudeLaw
For arbitrary real numbers and arbitrary measures on , this defines the measure on obtained by pushing forward under
where , and, for , has density
with respect to Lebesgue measure on . Neither nor is required to be a probability measure. For , is the zero measure; for , the factor is zero.
QAlgorithms.Papers.Independent.Intake100.P74.positivePState
For any measure on , this defines the matrix indexed by whose entries are
There is no assumption that is finite or a probability measure, and no integrability hypothesis is imposed. Each entry uses the complex Bochner integral, which is defined to be zero if its integrand is not integrable.
QAlgorithms.Papers.Independent.Intake100.P74.quantumChiSquare
For any complex matrix and any real , define by taking when and all entries outside vanish, and when and some entry outside is nonzero; when , take
This declaration defines using subtraction in : it is for finite , and when . The map embeds the nonnegative part of a real number. No density or parameter restrictions are included; negative-input real square roots and real division by zero are zero, so zero denominators inside the summands contribute zero.
QAlgorithms.Papers.Independent.Intake100.P74.quantumCollision
For any complex matrix and real number , this defines an element of as follows. If and whenever or , its value is ; if and that vanishing condition fails, its value is . If , set
Here embeds , and the sum is an extended nonnegative sum. No density-matrix or positivity assumption on , or nonnegativity assumption on , is imposed. All divisions inside each summand are real divisions, so a zero denominator makes that summand zero; a negative square-root argument also produces a zero denominator. In particular, gives value zero for every .
QAlgorithms.Papers.Independent.Intake100.P74.randomWalkLaw
For every natural number , this defines the finite measure on
The coefficients are converted to nonnegative extended-real weights when scaling the point masses. Natural-number subtraction is truncated at zero, and division by zero gives zero. Consequently, gives the zero measure and gives .
QAlgorithms.Papers.Independent.Intake100.P74.randomWalkPoint
For every natural number and index with , this defines
where the subtraction defining is natural-number subtraction before conversion to a real number. For there is no possible index ; for , the sole point is zero because division by zero gives zero.
QAlgorithms.Papers.Independent.Intake100.P74.realGaussian
For every pair of real numbers , this defines
No positivity assumption on is imposed. Real division by zero is defined to be zero, and the real square root of a negative number is zero; consequently this function is zero for every whenever .
QAlgorithms.Papers.Independent.Intake100.P74.realKernel
For arbitrary real numbers , this defines the real number
There is no restriction on . Real square roots of negative numbers and real division by zero are defined to be zero, so this expression is zero whenever .
QAlgorithms.Papers.Independent.Intake100.P74.singleModeEntropy
For any complex matrix , this defines an element of by viewing as the kernel on functions and taking the following infimum, equivalently written using their identification with :
The infimum ranges over nonnegative real weights and vectors such that the weights are summable with sum one, whenever , distinct vectors with positive weights are orthogonal, and
Vectors with zero weight have no normalization or orthogonality requirements. No density assumption on is made; if there is no such resolution, the infimum is . The term at is zero.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.