Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Definitions for Asymptotically Consistent Measures of General Quantum Resources: Discord, Non-Markovianity, and Non-Gaussianity

Definition
QAlgorithms_Papers_Independent_Bridge50_P12

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

prove2quantum

The objects the formalized statements of Asymptotically Consistent Measures of General Quantum Resources: Discord, Non-Markovianity, and Non-Gaussianity (arXiv:2103.05665) are stated in. Each was checked against the paper by a blind read-back and a moderator.

  • normalizedResourceDistance: PDF pp.3,12,14,19, (2), S25, S39, S106: extended distance to normalized free states. D5: no generic attainment on an arbitrary nonclosed set is assumed. Unlike Dependency50.P15.relativeDistance, this optimizes over normalized densities and takes values in ENNReal, rather than over unnormalized operators in EReal.
  • classicalClassical: PDF p.12, S24: diagonal in some independent local ON bases, whose columns are U and V. Density is imposed by normalizedResourceDistance. D2: the joint diagonal runs over A × B, not paired labels.
  • quantumClassical: PDF p.14, S38: block diagonal in some B basis, with arbitrary A blocks. No ON basis restriction on conditional A states. Density is imposed in the distance.
  • ccDephase: PDF p.13, S26: both-party dephasing of THIS input over all product outcomes.
  • qcDephase: PDF pp.14–15, S40: B-only dephasing. The unnormalized conditional-block formula retains every A matrix entry and never divides by a zero probability.
  • weightedOutcomeEntropy: PDF p.16, S62: weighted entropy of an unnormalized A outcome. A zero-probability outcome contributes zero, without choosing a conditional state. This is weighted von Neumann entropy, distinct from the frozen outcomeEntropy functions, which compute Shannon entropy of a classical outcome distribution.
  • measuredConditionalEntropy: PDF p.16, S62: general local measurement operators on B. For normalized measurements and density inputs, these nonnegative terms sum to at most log₂(dim A), so the tsum is summable, including arbitrary discrete outcome sets.
  • measurementDiscord: PDF p.16, S60–S62: discord for measurements on B. HasSum imposes ΣM†M=I. The outcome type is arbitrary, including all finite families without a cardinality bound. On density inputs the infimum domain is nonempty (one identity outcome) and bounded in [0,log₂(dim A)]. The remaining terms are H(B)-H(AB).
  • groupedBipartiteProduct: PDF p.17, S64: rho⊗sigma regrouped as AA':BB', rather than AB:A'B'.
  • markovStates: PDF p.19, S105: zero CMI in bits, in order A×(B×C). The accepted CMI is H(AB)+H(BC)-H(B)-H(ABC). Density is imposed by the distance; no convexity or faithfulness restriction is imposed on the reference state.
  • markovModulus: PDF p.21, S129: equality t=2/3 uses the first branch. For density inputs, h₂ is only evaluated inside [0,1] in the selected branch.
  • gaussianStates: PDF pp.21–22, S130: all displaced Gaussian densities on completed Fock space. Accepted V=2Λ and v=Ωξ give the source's sign and covariance convention. There is no centered-state restriction or photon-number cutoff.
  • nonGaussianity: PDF p.22, S131: extended relative-entropy distance to all Gaussian states in bits; no infinite entropy subtraction. D5: define an infimum value.
  • oscillatorEnergyExpectation: PDF p.22, S139–S140: extended expectation of H=hw a†a in one mode. The coefficient sum is nonnegative and retains infinite energy. This expectation is distinct from Dependency50.P15.oscillatorEnergy, the energy of one basis label.
Definition code
import Mathlib
import Definitions.Def_QAlgorithms_Defs_ExtendedQuantumEntropy
import Definitions.Def_QAlgorithms_Defs_Channel
import Definitions.Def_QAlgorithms_Defs_Ensemble
import Definitions.Def_QAlgorithms_Papers_Independent_Claimed50_P12
import Definitions.Def_QAlgorithms_Papers_Independent_Claimed50_P19
import Definitions.Def_QAlgorithms_Papers_Independent_Frontier18_P07
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P54

/-!
Kuroiwa and Yamasaki, arXiv:2103.05665v4; all pages below are PDF pages.
D2: c-c sums range over independent product outcomes, not equally labeled pairs.
D5: extended infima define distance values; S9/S13 assert attained entropy minima.
General state-QRT and copy-rate interfaces are deferred explicitly in HARD.md.
Compilation and independent moderation are pending the batch handoff.
-/

noncomputable section
open scoped Matrix ComplexConjugate ComplexOrder ENNReal
attribute [local instance] Classical.propDecidable Classical.decEq

namespace QAlgorithms.Papers.Independent.Bridge50.P12

-- Exact frozen normalized-state divergence in bits; no local alias.
open QAlgorithms.Papers.Independent.Information100.P54 (relativeEntropyBits)

/-- PDF pp.3,12,14,19, (2), S25, S39, S106: extended distance to normalized
free states. D5: no generic attainment on an arbitrary nonclosed set is assumed.
Unlike Dependency50.P15.relativeDistance, this optimizes over normalized densities
and takes values in ENNReal, rather than over unnormalized operators in EReal. -/
def normalizedResourceDistance {I : Type} [Fintype I] [DecidableEq I]
    (F : Set (Matrix I I ℂ)) (rho : Matrix I I ℂ) : ℝ≥0∞ :=
  ⨅ sigma : {sigma : Matrix I I ℂ // IsDensityMatrix sigma ∧ sigma ∈ F},
    relativeEntropyBits rho sigma.val

/-- PDF p.12, S24: diagonal in some independent local ON bases, whose columns
are U and V. Density is imposed by normalizedResourceDistance. D2: the joint diagonal
runs over A × B, not paired labels. -/
def classicalClassical {A B : Type} [Fintype A] [Fintype B]
    [DecidableEq A] [DecidableEq B] : Set (Matrix (A × B) (A × B) ℂ) :=
  {rho | ∃ (U : Matrix.unitaryGroup A ℂ) (V : Matrix.unitaryGroup B ℂ),
    let W := Matrix.kronecker (U : Matrix A A ℂ) (V : Matrix B B ℂ)
    ∀ p q : A × B, p ≠ q → (Wᴴ * rho * W) p q = 0}

/-- PDF p.14, S38: block diagonal in some B basis, with arbitrary A blocks.
No ON basis restriction on conditional A states. Density is imposed in the distance. -/
def quantumClassical {A B : Type} [Fintype A] [Fintype B]
    [DecidableEq A] [DecidableEq B] : Set (Matrix (A × B) (A × B) ℂ) :=
  {rho | ∃ V : Matrix.unitaryGroup B ℂ,
    let W := Matrix.kronecker (1 : Matrix A A ℂ) (V : Matrix B B ℂ)
    ∀ a a' : A, ∀ b b' : B, b ≠ b' → (Wᴴ * rho * W) (a,b) (a',b') = 0}

/-- PDF p.13, S26: both-party dephasing of THIS input over all product outcomes. -/
def ccDephase {A B : Type} [Fintype A] [Fintype B]
    [DecidableEq A] [DecidableEq B] (U : Matrix.unitaryGroup A ℂ)
    (V : Matrix.unitaryGroup B ℂ) (rho : Matrix (A × B) (A × B) ℂ) :
    Matrix (A × B) (A × B) ℂ :=
  let W := Matrix.kronecker (U : Matrix A A ℂ) (V : Matrix B B ℂ)
  let X := Wᴴ * rho * W
  W * Matrix.diagonal (fun p => X p p) * Wᴴ

/-- PDF pp.14–15, S40: B-only dephasing. The unnormalized conditional-block
formula retains every A matrix entry and never divides by a zero probability. -/
def qcDephase {A B : Type} [Fintype A] [Fintype B]
    [DecidableEq A] [DecidableEq B] (V : Matrix.unitaryGroup B ℂ)
    (rho : Matrix (A × B) (A × B) ℂ) : Matrix (A × B) (A × B) ℂ :=
  let W := Matrix.kronecker (1 : Matrix A A ℂ) (V : Matrix B B ℂ)
  let X := Wᴴ * rho * W
  W * Matrix.of (fun (p q : A × B) => if p.2 = q.2 then X p q else 0) * Wᴴ

/-- PDF p.16, S62: weighted entropy of an unnormalized A outcome. A
zero-probability outcome contributes zero, without choosing a conditional state.
This is weighted von Neumann entropy, distinct from the frozen outcomeEntropy
functions, which compute Shannon entropy of a classical outcome distribution. -/
def weightedOutcomeEntropy {A : Type} [Fintype A] [DecidableEq A]
    (X : Matrix A A ℂ) : ℝ :=
  let p := X.trace.re
  if p = 0 then 0 else p * vnEntropy (((p⁻¹ : ℝ) : ℂ) • X)

/-- PDF p.16, S62: general local measurement operators on B. For normalized
measurements and density inputs, these nonnegative terms sum to at most log₂(dim A),
so the tsum is summable, including arbitrary discrete outcome sets. -/
def measuredConditionalEntropy {A B O : Type} [Fintype A] [Fintype B]
    [DecidableEq A] [DecidableEq B]
    (rho : Matrix (A × B) (A × B) ℂ) (M : O → Matrix B B ℂ) : ℝ :=
  ∑' k, weightedOutcomeEntropy (traceRight
    ((Matrix.kronecker (1 : Matrix A A ℂ) (M k)) * rho *
      (Matrix.kronecker (1 : Matrix A A ℂ) (M k))ᴴ))

/-- PDF p.16, S60–S62: discord for measurements on B. HasSum imposes ΣM†M=I.
The outcome type is arbitrary, including all finite families without a cardinality
bound. On density inputs the infimum domain is nonempty (one identity outcome)
and bounded in [0,log₂(dim A)]. The remaining terms are H(B)-H(AB). -/
def measurementDiscord {A B : Type} [Fintype A] [Fintype B]
    [DecidableEq A] [DecidableEq B] (rho : Matrix (A × B) (A × B) ℂ) : ℝ :=
  vnEntropy (traceLeft rho) - vnEntropy rho +
    sInf {x : ℝ | ∃ (O : Type) (M : O → Matrix B B ℂ),
      HasSum (fun k => (M k)ᴴ * M k) (1 : Matrix B B ℂ) ∧
      x = measuredConditionalEntropy rho M}

/-- PDF p.17, S64: rho⊗sigma regrouped as AA':BB', rather than AB:A'B'. -/
def groupedBipartiteProduct {A B A2 B2 : Type}
    (rho : Matrix (A × B) (A × B) ℂ) (sigma : Matrix (A2 × B2) (A2 × B2) ℂ) :
    Matrix ((A × A2) × (B × B2)) ((A × A2) × (B × B2)) ℂ :=
  fun p q => rho (p.1.1,p.2.1) (q.1.1,q.2.1) * sigma (p.1.2,p.2.2) (q.1.2,q.2.2)

/-- PDF p.19, S105: zero CMI in bits, in order A×(B×C).
The accepted CMI is H(AB)+H(BC)-H(B)-H(ABC). Density is imposed by the distance;
no convexity or faithfulness restriction is imposed on the reference state. -/
def markovStates {A B C : Type} [Fintype A] [Fintype B] [Fintype C]
    [DecidableEq A] [DecidableEq B] [DecidableEq C] :
    Set (Matrix (A × (B × C)) (A × (B × C)) ℂ) :=
  {rho | QAlgorithms.Papers.Independent.Claimed50.P12.cmi rho = 0}

/-- PDF p.21, S129: equality t=2/3 uses the first branch. For density inputs,
h₂ is only evaluated inside [0,1] in the selected branch. -/
def markovModulus (D : ℕ) (t : ℝ) : ℝ :=
  if t ≤ 2 / 3 then 2 * (t * Real.logb 2 D + binEntropy2 t)
  else t / 2 * Real.logb 2 D + binEntropy2 (t / 2) + Real.logb 2 D

/-- PDF pp.21–22, S130: all displaced Gaussian densities on completed Fock
space. Accepted V=2Λ and v=Ωξ give the source's sign and covariance convention.
There is no centered-state restriction or photon-number cutoff. -/
def gaussianStates (m : ℕ) :
    Set (QAlgorithms.Papers.Independent.Dependency50.P33.State
      (QAlgorithms.Papers.Independent.Claimed50.P19.FockIndex m)) :=
  {rho | ∃ V, QAlgorithms.Papers.Independent.Claimed50.P19.GaussianWithCovariance
    rho.coefficients V}

/-- PDF p.22, S131: extended relative-entropy distance to all Gaussian states
in bits; no infinite entropy subtraction. D5: define an infimum value. -/
def nonGaussianity {m : ℕ}
    (rho : QAlgorithms.Papers.Independent.Dependency50.P33.State
      (QAlgorithms.Papers.Independent.Claimed50.P19.FockIndex m)) : ℝ≥0∞ :=
  ⨅ sigma : {sigma : QAlgorithms.Papers.Independent.Dependency50.P33.State
      (QAlgorithms.Papers.Independent.Claimed50.P19.FockIndex m) // sigma ∈ gaussianStates m},
    QAlgorithms.Papers.Independent.Frontier18.P07.extendedRelativeEntropyNats
      rho.coefficients sigma.val.coefficients / ENNReal.ofReal (Real.log 2)

/-- PDF p.22, S139–S140: extended expectation of H=hw a†a in one mode.
The coefficient sum is nonnegative and retains infinite energy. This expectation
is distinct from Dependency50.P15.oscillatorEnergy, the energy of one basis label. -/
def oscillatorEnergyExpectation (hw : ℝ) (rho : Matrix (Fin 1 → ℕ) (Fin 1 → ℕ) ℂ) : ℝ≥0∞ :=
  ∑' i : Fin 1 → ℕ, ENNReal.ofReal (hw * (i 0 : ℝ)) * ENNReal.ofReal (rho i i).re

/-- Sanity check for the imported divergence: invalid density arguments give infinity. -/

example {I : Type} [Fintype I] [DecidableEq I]
    (rho sigma : Matrix I I ℂ) (h : ¬ (IsDensityMatrix rho ∧ IsDensityMatrix sigma)) :
    relativeEntropyBits rho sigma = ⊤ := by simp [relativeEntropyBits, h]

example {A : Type} [Fintype A] [DecidableEq A]
    (X : Matrix A A ℂ) (h : X.trace.re = 0) : weightedOutcomeEntropy X = 0 := by
  simp [weightedOutcomeEntropy, h]

example {A B A2 B2 : Type}
    (rho : Matrix (A × B) (A × B) ℂ) (sigma : Matrix (A2 × B2) (A2 × B2) ℂ)
    (a a' : A) (b b' : B) (c c' : A2) (d d' : B2) :
    groupedBipartiteProduct rho sigma ((a,c),(b,d)) ((a',c'),(b',d')) =
      rho (a,b) (a',b') * sigma (c,d) (c',d') := by rfl

example (D : ℕ) : markovModulus D (2 / 3) =
    2 * ((2 / 3) * Real.logb 2 D + binEntropy2 (2 / 3)) := by simp [markovModulus]

example (hw : ℝ) : oscillatorEnergyExpectation hw
    (QAlgorithms.Papers.Independent.Claimed50.P19.vacuumKernel 1) = 0 := by
  unfold oscillatorEnergyExpectation
  apply ENNReal.tsum_eq_zero.mpr
  intro i
  by_cases h : i = (fun _ => 0)
  · subst i
    simp [QAlgorithms.Papers.Independent.Claimed50.P19.vacuumKernel]
  · simp [QAlgorithms.Papers.Independent.Claimed50.P19.vacuumKernel, h]

end QAlgorithms.Papers.Independent.Bridge50.P12
Source
Asymptotically Consistent Measures of General Quantum Resources: Discord, Non-Markovianity, and Non-Gaussianity, arXiv:2103.05665v4, https://arxiv.org/abs/2103.05665v4
Read-back

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

QAlgorithms.Papers.Independent.Bridge50.P12.ccDephase

For any finite types A,BA,BA,B with decidable equality, any unitary matrices UUU on AAA and VVV on BBB, and any complex matrix ρ\rhoρ on A×BA\times BA×B, set W=U⊗VW=U\otimes VW=U⊗V and X=W†ρWX=W^\dagger\rho WX=W†ρW. This defines

W diag⁡((Xp,p)p∈A×B) W†,W\,\operatorname{diag}\bigl((X_{p,p})_{p\in A\times B}\bigr)\,W^\dagger,Wdiag((Xp,p​)p∈A×B​)W†,

where the diagonal matrix retains exactly the diagonal entries of XXX and has zero off-diagonal entries. No assumption is made that ρ\rhoρ is a density matrix. Empty index types are allowed, in which case the result is the unique matrix on the empty product.

QAlgorithms.Papers.Independent.Bridge50.P12.classicalClassical

For any finite types A,BA,BA,B, each with decidable equality, this defines the set of all complex matrices ρ\rhoρ indexed by (A×B)×(A×B)(A\times B)\times(A\times B)(A×B)×(A×B) for which there exist unitary matrices UUU on AAA and VVV on BBB such that, with W=U⊗VW=U\otimes VW=U⊗V,

(W†ρW)p,q=0for every p,q∈A×B with p≠q.(W^\dagger\rho W)_{p,q}=0 \qquad\text{for every }p,q\in A\times B\text{ with }p\ne q.(W†ρW)p,q​=0for every p,q∈A×B with p=q.

Thus the transformed matrix is diagonal. Membership imposes no positivity, Hermiticity, or trace condition on ρ\rhoρ. Empty types are allowed; if either factor is empty, the off-diagonal condition is vacuous.

QAlgorithms.Papers.Independent.Bridge50.P12.gaussianStates

For every natural number mmm, including m=0m=0m=0, this defines a set of states indexed by Fm={0,…,m−1}→NF_m=\{0,\ldots,m-1\}\to\mathbb NFm​={0,…,m−1}→N. A state here is a complex matrix XXX on FmF_mFm​ that admits sequences ur,vr∈ℓ2(Fm;C)u_r,v_r\in\ell^2(F_m;\mathbb C)ur​,vr​∈ℓ2(Fm​;C) with ∑r∥ur∥∥vr∥<∞\sum_r\|u_r\|\|v_r\|<\infty∑r​∥ur​∥∥vr​∥<∞ and Xij=∑rur(i)vr(j)‾X_{ij}=\sum_r u_r(i)\overline{v_r(j)}Xij​=∑r​ur​(i)vr​(j)​, whose every finite quadratic form is real and nonnegative, and whose real diagonal is summable with sum 111. Such a state belongs to the defined set exactly when there exists a real matrix VVV on Qm={0,…,m−1}×{0,1}Q_m=\{0,\ldots,m-1\}\times\{0,1\}Qm​={0,…,m−1}×{0,1} such that VVV is positive definite, V+iΩmV+i\Omega_mV+iΩm​ is positive semidefinite, the real series ∑i∈Fm(∑jij)Re⁡Xii\sum_{i\in F_m}(\sum_j i_j)\operatorname{Re}X_{ii}∑i∈Fm​​(∑j​ij​)ReXii​ is summable, and there exists a real vector μ\muμ on QmQ_mQm​ for which, for every real vector vvv on QmQ_mQm​,

∑i∑jXij∏k=0m−1djk,ik ⁣(−v(k,1)+iv(k,0)2)=exp⁡ ⁣(−14∑a,b∈QmvaVabvb+i∑a∈Qmμava).\sum_i\sum_j X_{ij}\prod_{k=0}^{m-1}d_{j_k,i_k}\!\left(\frac{-v_{(k,1)}+iv_{(k,0)}}{\sqrt2}\right) =\exp\!\left(-\frac14\sum_{a,b\in Q_m}v_aV_{ab}v_b +i\sum_{a\in Q_m}\mu_av_a\right).i∑​j∑​Xij​k=0∏m−1​djk​,ik​​(2​−v(k,1)​+iv(k,0)​​)=exp​−41​a,b∈Qm​∑​va​Vab​vb​+ia∈Qm​∑​μa​va​​.

For each vvv, every inner series over jjj and the outer series over iii must be summable. The matrix Ωm\Omega_mΩm​ has block (01−10)\begin{pmatrix}0&1\\-1&0\end{pmatrix}(0−1​10​) on each mode and zero entries between distinct modes, and the coefficients used above are

dr,s(z)=e−∣z∣2/2r! s!∑ℓ=0min⁡(r,s)zr−ℓ(−z‾)s−ℓℓ! (r−ℓ)! (s−ℓ)!.d_{r,s}(z)=e^{-|z|^2/2}\sqrt{r!\,s!} \sum_{\ell=0}^{\min(r,s)} \frac{z^{r-\ell}(-\overline z)^{s-\ell}} {\ell!\,(r-\ell)!\,(s-\ell)!}.dr,s​(z)=e−∣z∣2/2r!s!​ℓ=0∑min(r,s)​ℓ!(r−ℓ)!(s−ℓ)!zr−ℓ(−z)s−ℓ​.

No mean vector is prescribed. At m=0m=0m=0, FmF_mFm​ is a singleton, quadrature vectors are empty, products are 111, and sums over modes or quadratures are 000.

QAlgorithms.Papers.Independent.Bridge50.P12.groupedBipartiteProduct

For arbitrary types A,B,A2,B2A,B,A_2,B_2A,B,A2​,B2​, any complex matrix ρ\rhoρ on A×BA\times BA×B, and any complex matrix σ\sigmaσ on A2×B2A_2\times B_2A2​×B2​, this defines a complex matrix on (A×A2)×(B×B2)(A\times A_2)\times(B\times B_2)(A×A2​)×(B×B2​) by

(ρ⊠σ)((a,a2),(b,b2)), ((a′,a2′),(b′,b2′))=ρ(a,b),(a′,b′) σ(a2,b2),(a2′,b2′).\bigl(\rho\mathbin{\boxtimes}\sigma\bigr)_{((a,a_2),(b,b_2)),\,((a',a_2'),(b',b_2'))} = \rho_{(a,b),(a',b')}\, \sigma_{(a_2,b_2),(a_2',b_2')}.(ρ⊠σ)((a,a2​),(b,b2​)),((a′,a2′​),(b′,b2′​))​=ρ(a,b),(a′,b′)​σ(a2​,b2​),(a2′​,b2′​)​.

No finiteness, decidable equality, positivity, or normalization assumptions are required. Empty types are included.

QAlgorithms.Papers.Independent.Bridge50.P12.markovModulus

For every natural number DDD, including D=0D=0D=0, and every real number ttt, this defines

{2(tlog⁡2D+h2(t)),t≤23,t2log⁡2D+h2(t/2)+log⁡2D,t>23,h2(u)=−ulog⁡u−(1−u)log⁡(1−u)log⁡2.\begin{cases} 2\bigl(t\log_2D+h_2(t)\bigr),&t\le \frac23,\\[2pt] \frac t2\log_2D+h_2(t/2)+\log_2D,&t>\frac23, \end{cases} \qquad h_2(u)=\frac{-u\log u-(1-u)\log(1-u)}{\log2}.{2(tlog2​D+h2​(t)),2t​log2​D+h2​(t/2)+log2​D,​t≤32​,t>32​,​h2​(u)=log2−ulogu−(1−u)log(1−u)​.

There is no restriction 0≤t≤10\le t\le10≤t≤1. The logarithms are the library’s total real logarithms, so the formula remains defined at zero and at negative arguments; in particular, log⁡20=0\log_2 0=0log2​0=0. Equality t=23t=\frac23t=32​ uses the first branch.

QAlgorithms.Papers.Independent.Bridge50.P12.markovStates

For finite types A,B,CA,B,CA,B,C, each with decidable equality, this defines the set of all complex matrices ρ\rhoρ on A×(B×C)A\times(B\times C)A×(B×C) satisfying

S(ρAB)+S(ρBC)−S(ρB)−S(ρ)=0,S(\rho_{AB})+S(\rho_{BC})-S(\rho_B)-S(\rho)=0,S(ρAB​)+S(ρBC​)−S(ρB​)−S(ρ)=0,

where

(ρAB)(a,b),(a′,b′)=∑c∈Cρ(a,(b,c)),(a′,(b′,c)),(ρBC)(b,c),(b′,c′)=∑a∈Aρ(a,(b,c)),(a,(b′,c′)),(\rho_{AB})_{(a,b),(a',b')}=\sum_{c\in C}\rho_{(a,(b,c)),(a',(b',c))},\quad (\rho_{BC})_{(b,c),(b',c')}=\sum_{a\in A}\rho_{(a,(b,c)),(a,(b',c'))},(ρAB​)(a,b),(a′,b′)​=c∈C∑​ρ(a,(b,c)),(a′,(b′,c))​,(ρBC​)(b,c),(b′,c′)​=a∈A∑​ρ(a,(b,c)),(a,(b′,c′))​, (ρB)b,b′=∑c∈C(ρBC)(b,c),(b′,c),S(X)=−Re⁡tr⁡(g[X]),g(x)=xlog⁡2x,(\rho_B)_{b,b'}=\sum_{c\in C}(\rho_{BC})_{(b,c),(b',c)}, \qquad S(X)=-\operatorname{Re}\operatorname{tr}\bigl(g[X]\bigr),\quad g(x)=x\log_2x,(ρB​)b,b′​=c∈C∑​(ρBC​)(b,c),(b′,c)​,S(X)=−Retr(g[X]),g(x)=xlog2​x,

using the real continuous functional calculus. Membership requires only this equality; it does not require ρ\rhoρ to be positive semidefinite or to have trace 111. Empty registers are allowed.

QAlgorithms.Papers.Independent.Bridge50.P12.measuredConditionalEntropy

For finite types A,BA,BA,B with decidable equality, an arbitrary type OOO, any complex matrix ρ\rhoρ on A×BA\times BA×B, and any family MkM_kMk​ of complex matrices on BBB, indexed by k∈Ok\in Ok∈O, put

Kk=IA⊗Mk,(Xk)a,a′=∑b∈B(KkρKk†)(a,b),(a′,b),pk=Re⁡tr⁡Xk.K_k=I_A\otimes M_k,\qquad (X_k)_{a,a'}=\sum_{b\in B}(K_k\rho K_k^\dagger)_{(a,b),(a',b)}, \qquad p_k=\operatorname{Re}\operatorname{tr}X_k.Kk​=IA​⊗Mk​,(Xk​)a,a′​=b∈B∑​(Kk​ρKk†​)(a,b),(a′,b)​,pk​=RetrXk​.

This defines

∑k∈O{0,pk=0,−pk Re⁡tr⁡(g[pk−1Xk]),pk≠0,g(x)=xlog⁡2x,\sum_{k\in O} \begin{cases} 0,&p_k=0,\\ -p_k\,\operatorname{Re}\operatorname{tr}\bigl(g[p_k^{-1}X_k]\bigr),&p_k\ne0, \end{cases} \qquad g(x)=x\log_2x,k∈O∑​{0,−pk​Retr(g[pk−1​Xk​]),​pk​=0,pk​=0,​g(x)=xlog2​x,

using the real continuous functional calculus. The sum is the library’s unconditional infinite sum, which is zero if the family is not summable. The type OOO need not be finite or countable, the family MkM_kMk​ need not satisfy any measurement completeness condition, and ρ\rhoρ need not be a density matrix. Empty outcome or register types are allowed.

QAlgorithms.Papers.Independent.Bridge50.P12.measurementDiscord

For finite types A,BA,BA,B with decidable equality and any complex matrix ρ\rhoρ on A×BA\times BA×B, this defines

S(ρB)−S(ρ)+inf⁡O an arbitrary type, (Mk)k∈O∑k∈OMk†Mk=IB ∑k∈OE(Xk),S(\rho_B)-S(\rho)+ \inf_{\substack{O\text{ an arbitrary type},\ (M_k)_{k\in O}\\ \sum_{k\in O}M_k^\dagger M_k=I_B}} \ \sum_{k\in O} E(X_k),S(ρB​)−S(ρ)+O an arbitrary type, (Mk​)k∈O​∑k∈O​Mk†​Mk​=IB​​inf​ k∈O∑​E(Xk​),

where

(ρB)b,b′=∑a∈Aρ(a,b),(a,b′),(Xk)a,a′=∑b∈B((IA⊗Mk)ρ(IA⊗Mk)†)(a,b),(a′,b),(\rho_B)_{b,b'}=\sum_{a\in A}\rho_{(a,b),(a,b')},\qquad (X_k)_{a,a'}=\sum_{b\in B} \bigl((I_A\otimes M_k)\rho(I_A\otimes M_k)^\dagger\bigr)_{(a,b),(a',b)},(ρB​)b,b′​=a∈A∑​ρ(a,b),(a,b′)​,(Xk​)a,a′​=b∈B∑​((IA​⊗Mk​)ρ(IA​⊗Mk​)†)(a,b),(a′,b)​,

S(Y)=−Re⁡tr⁡(g[Y])S(Y)=-\operatorname{Re}\operatorname{tr}(g[Y])S(Y)=−Retr(g[Y]), g(x)=xlog⁡2xg(x)=x\log_2xg(x)=xlog2​x, and E(X)=0E(X)=0E(X)=0 when p=Re⁡tr⁡X=0p=\operatorname{Re}\operatorname{tr}X=0p=RetrX=0, while E(X)=pS(p−1X)E(X)=pS(p^{-1}X)E(X)=pS(p−1X) otherwise. Brackets denote the real continuous functional calculus. The completeness equation requires that the family of positive matrices actually has unconditional sum IBI_BIB​; the scalar outcome sum uses the total infinite-sum operation and is zero when not summable. No density-matrix assumption on ρ\rhoρ, nonemptiness of the registers, or finiteness or countability of OOO is imposed. The infimum is taken in R\mathbb RR, whose total infimum operation returns zero for an empty set or a set unbounded below.

QAlgorithms.Papers.Independent.Bridge50.P12.nonGaussianity

For every natural number mmm, including zero, and every state ρ\rhoρ indexed by Fm={0,…,m−1}→NF_m=\{0,\ldots,m-1\}\to\mathbb NFm​={0,…,m−1}→N, this defines the extended nonnegative number

N(ρ)=inf⁡σ∈GmR(ρ,σ)ln⁡2,R(X,Y)=sup⁡s⊆Fms finiter(Xs,Ys).\mathcal N(\rho)=\inf_{\sigma\in\mathcal G_m}\frac{\mathcal R(\rho,\sigma)}{\ln2}, \qquad \mathcal R(X,Y)=\sup_{\substack{s\subseteq F_m\\s\text{ finite}}}r(X_s,Y_s).N(ρ)=σ∈Gm​inf​ln2R(ρ,σ)​,R(X,Y)=s⊆Fm​s finite​sup​r(Xs​,Ys​).

Here Xs,YsX_s,Y_sXs​,Ys​ are the principal matrices indexed by sss, and r(A,B)=+∞r(A,B)=+\inftyr(A,B)=+∞ if ker⁡B⊈ker⁡A\ker B\not\subseteq\ker AkerB⊆kerA, while otherwise

r(A,B)=max⁡ ⁣{0,Re⁡tr⁡[Aln⁡A−Aln⁡B+B−A]},r(A,B)=\max\!\left\{0,\operatorname{Re}\operatorname{tr} \bigl[A\ln A-A\ln B+B-A\bigr]\right\},r(A,B)=max{0,Retr[AlnA−AlnB+B−A]},

using spectral functional calculus with logarithm value zero at zero. A state matrix XXX means one admitting Xij=∑rur(i)vr(j)‾X_{ij}=\sum_r u_r(i)\overline{v_r(j)}Xij​=∑r​ur​(i)vr​(j)​ with ur,vr∈ℓ2(Fm;C)u_r,v_r\in\ell^2(F_m;\mathbb C)ur​,vr​∈ℓ2(Fm​;C) and ∑r∥ur∥∥vr∥<∞\sum_r\|u_r\|\|v_r\|<\infty∑r​∥ur​∥∥vr​∥<∞, all finite quadratic forms real and nonnegative, and a summable real diagonal of sum 111. The set Gm\mathcal G_mGm​ consists of such states σ\sigmaσ for which ∑i(∑kik)Re⁡σii\sum_i(\sum_k i_k)\operatorname{Re}\sigma_{ii}∑i​(∑k​ik​)Reσii​ is summable and there exist a real positive definite matrix VVV and real vector μ\muμ on Qm={0,…,m−1}×{0,1}Q_m=\{0,\ldots,m-1\}\times\{0,1\}Qm​={0,…,m−1}×{0,1}, with V+iΩmV+i\Omega_mV+iΩm​ positive semidefinite, satisfying for every real vvv on QmQ_mQm​

∑i∑jσij∏kdjk,ik ⁣(−v(k,1)+iv(k,0)2)=e−vTVv/4+iμTv.\sum_i\sum_j\sigma_{ij}\prod_k d_{j_k,i_k}\!\left(\frac{-v_{(k,1)}+iv_{(k,0)}}{\sqrt2}\right) =e^{-v^{T}Vv/4+i\mu^{T}v}.i∑​j∑​σij​k∏​djk​,ik​​(2​−v(k,1)​+iv(k,0)​​)=e−vTVv/4+iμTv.

All inner and outer series in this equation must be summable; Ωm\Omega_mΩm​ has blocks (01−10)\begin{pmatrix}0&1\\-1&0\end{pmatrix}(0−1​10​), and

dr,s(z)=e−∣z∣2/2r! s!∑ℓ=0min⁡(r,s)zr−ℓ(−z‾)s−ℓℓ!(r−ℓ)!(s−ℓ)!.d_{r,s}(z)=e^{-|z|^2/2}\sqrt{r!\,s!} \sum_{\ell=0}^{\min(r,s)} \frac{z^{r-\ell}(-\overline z)^{s-\ell}}{\ell!(r-\ell)!(s-\ell)!}.dr,s​(z)=e−∣z∣2/2r!s!​ℓ=0∑min(r,s)​ℓ!(r−ℓ)!(s−ℓ)!zr−ℓ(−z)s−ℓ​.

The defining infimum need not be attained or finite, and an empty infimum has value +∞+\infty+∞; the supremum includes the empty principal matrix, whose contribution is zero.

QAlgorithms.Papers.Independent.Bridge50.P12.normalizedResourceDistance

For any finite type III with decidable equality, any set FFF of complex matrices indexed by I×II\times II×I, and any such matrix ρ\rhoρ, this defines an extended nonnegative real number

inf⁡σ∈Fσ positive semidefinitetr⁡σ=1D2(ρ,σ).\inf_{\substack{\sigma\in F\\ \sigma\ \text{positive semidefinite}\\ \operatorname{tr}\sigma=1}} D_2(\rho,\sigma).σ∈Fσ positive semidefinitetrσ=1​inf​D2​(ρ,σ).

Here D2(ρ,σ)=+∞D_2(\rho,\sigma)=+\inftyD2​(ρ,σ)=+∞ if either matrix is not positive semidefinite with trace 111, or if ker⁡σ⊈ker⁡ρ\ker\sigma\not\subseteq\ker\rhokerσ⊆kerρ; otherwise,

D2(ρ,σ)=max⁡ ⁣{0,Re⁡tr⁡(f[ρ]−ρ log⁡[σ])}log⁡2,f(x)=xlog⁡x,D_2(\rho,\sigma)= \frac{\max\!\left\{0,\operatorname{Re}\operatorname{tr} \left(f[\rho]-\rho\,\log[\sigma]\right)\right\}}{\log 2}, \qquad f(x)=x\log x,D2​(ρ,σ)=log2max{0,Retr(f[ρ]−ρlog[σ])}​,f(x)=xlogx,

where brackets denote the real continuous functional calculus and log⁡\loglog is the library’s total real logarithm. There is no assumption that ρ\rhoρ is a density matrix. If FFF contains no density matrix, the infimum is +∞+\infty+∞; this includes the case where III is empty.

QAlgorithms.Papers.Independent.Bridge50.P12.oscillatorEnergyExpectation

For every real number hωh\omegahω and every complex matrix ρ\rhoρ indexed by functions {0}→N\{0\}\to\mathbb N{0}→N, this defines an extended nonnegative number. Identifying such a function with its value nnn at 000, the value is

Ehω(ρ)=∑n=0∞max⁡{hω n,0} max⁡{Re⁡ρnn,0},\mathcal E_{h\omega}(\rho) =\sum_{n=0}^{\infty} \max\{h\omega\,n,0\}\,\max\{\operatorname{Re}\rho_{nn},0\},Ehω​(ρ)=n=0∑∞​max{hωn,0}max{Reρnn​,0},

with the sum taken in [0,+∞][0,+\infty][0,+∞]. There is no positivity, normalization, trace-class, or summability hypothesis on ρ\rhoρ, and no sign assumption on hωh\omegahω; each factor is separately truncated at zero, the n=0n=0n=0 term is zero, the whole value is zero when hω≤0h\omega\le0hω≤0, and the sum may be +∞+\infty+∞.

QAlgorithms.Papers.Independent.Bridge50.P12.qcDephase

For any finite types A,BA,BA,B with decidable equality, any unitary matrix VVV on BBB, and any complex matrix ρ\rhoρ on A×BA\times BA×B, set W=IA⊗VW=I_A\otimes VW=IA​⊗V and X=W†ρWX=W^\dagger\rho WX=W†ρW. This defines WYW†WYW^\daggerWYW†, where

Y(a,b),(a′,b′)={X(a,b),(a′,b′),b=b′,0,b≠b′.Y_{(a,b),(a',b')}= \begin{cases} X_{(a,b),(a',b')},&b=b',\\ 0,&b\ne b'. \end{cases}Y(a,b),(a′,b′)​={X(a,b),(a′,b′)​,0,​b=b′,b=b′.​

Thus only entries connecting distinct BBB-indices are removed in the transformed coordinates. There is no density-matrix assumption on ρ\rhoρ, and empty index types are permitted.

QAlgorithms.Papers.Independent.Bridge50.P12.quantumClassical

For any finite types A,BA,BA,B, each with decidable equality, this defines the set of all complex matrices ρ\rhoρ indexed by (A×B)×(A×B)(A\times B)\times(A\times B)(A×B)×(A×B) for which there exists a unitary matrix VVV on BBB such that, with W=IA⊗VW=I_A\otimes VW=IA​⊗V,

(W†ρW)(a,b),(a′,b′)=0for all a,a′∈A, b,b′∈B with b≠b′.(W^\dagger\rho W)_{(a,b),(a',b')}=0 \qquad \text{for all }a,a'\in A,\ b,b'\in B\text{ with }b\ne b'.(W†ρW)(a,b),(a′,b′)​=0for all a,a′∈A, b,b′∈B with b=b′.

Entries within the same BBB-indexed block are unrestricted. No positivity, Hermiticity, or trace condition is required. Empty types are included; the condition is vacuous if AAA is empty or BBB has at most one element.

QAlgorithms.Papers.Independent.Bridge50.P12.weightedOutcomeEntropy

For any finite type AAA with decidable equality and any complex matrix XXX on AAA, let p=Re⁡tr⁡Xp=\operatorname{Re}\operatorname{tr}Xp=RetrX. This defines the real number

{0,p=0,p S(p−1X),p≠0,S(Y)=−Re⁡tr⁡(g[Y]),g(x)=xlog⁡2x,\begin{cases} 0,&p=0,\\ p\,S(p^{-1}X),&p\ne0, \end{cases} \qquad S(Y)=-\operatorname{Re}\operatorname{tr}\bigl(g[Y]\bigr), \quad g(x)=x\log_2x,{0,pS(p−1X),​p=0,p=0,​S(Y)=−Retr(g[Y]),g(x)=xlog2​x,

where g[Y]g[Y]g[Y] is the real continuous functional calculus and log⁡2\log_2log2​ is the library’s total real logarithm to base 222. No positivity, Hermiticity, or normalization of XXX is assumed; ppp may be negative, and p=0p=0p=0 forces the result to be zero even when X≠0X\ne0X=0. If AAA is empty, its trace is zero and the result is zero.

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