Definitions for A Hierarchy of Information Quantities for Finite Block Length Analysis of Quantum Tasks
DefinitionQAlgorithms_Papers_Independent_Advance50_P02The objects the formalized statements of A Hierarchy of Information Quantities for Finite Block Length Analysis of Quantum Tasks (arXiv:1208.1478) are stated in. Each was checked against the paper by a blind read-back and a moderator.
PositiveTraceSubnormalized: PDF pp.6--7: the source's strictly positive-trace subnormalized states.negLog: PDF p.8, Definition 4: -log_2, explicitly extended at zero.extendedTestingDivergence: PDF p.8, Definition 4. Reuses the accepted extended testing entropy, adapting its argument order. The beta optimization is nonempty/bounded on the theorem domains.smoothedMaxRelativeEntropy: PDF pp.7--8, Definition 2: nearby strictly positive-trace subnormalized states, with positive scale t=2^lambda. Includes Lemma 2's subnormalized centers.lowProjector: PDF p.14, Definition 8: weak spectral projector, including zero eigenvalues.spectrumMass: PDF p.14: actual quantum threshold mass, without logarithms at zero.spectrumEntropy: PDF p.14, Definition 8: empty/unbounded sets give negative/positive infinity.classicalThresholdMass: PDF p.2, (2): classical threshold mass, permitting Q=0 at positive P.classicalSpectrumDivergence: PDF p.2, (2): extended-real classical information spectrum.relativeMean: PDF pp.7,19: finite relative entropy in bits, used only on the support domain. Kernel log values are irrelevant after weighting by rho.centeredRelativeVariance: PDF p.19, correcting Definition 1 p.7: accepted centered pair variance in bits.PositiveSpectralPresentation: PDF p.14: arbitrary finite index, nonnegative eigenvalues, and full unitary reconstruction of this PSD matrix. Unlike Information100.P53.SpectralData, no ordering or Fin-index presentation is imposed.eigenbasisOverlapSquared: PDF p.14: overlap squared of the two eigenvectors.nsSpectralPresentation: PDF p.14: adapt column eigenvectors to the accepted NS row-vector presentation.nsProbability: PDF p.14: Nussbaum--Szkola P, including zero-probability entries.nsReferenceWeight: PDF p.14: Nussbaum--Szkola Q; need not have total mass one.classicalMean: PDF p.19: classical mean, used only on the finite-likelihood domain.classicalVariance: PDF p.19: centered classical information variance.classicalThirdCentralMoment: PDF p.19: third absolute central moment (the cube of the printed T).weightPower: PDF pp.2,18: products of classical weights, including the empty product.empiricalMeanMass: Eq.(31), PDF p.18: CDF of the empirical mean of n independent log likelihoods. Used with n>0 and support inclusion; zero-P atoms carry zero mass.distinctEigenvalueSet: PDF p.14: distinct spectral values, counting the kernel once.distinctCount: PDF pp.13--14: number of distinct eigenvalues, not dimension or rank.eigenspaceProjector: PDF p.14: projection onto one whole eigenspace.spectralSpread: PDF p.17: spread for an invertible PSD operator; only used there.positiveSpectralFactor: PDF pp.17--18: corrected positive bin count. Printed 2*ceil(lambda)=0 for flat spectra. The proof requires l>0; use l=max(1,ceil(lambda)). For singular sigma use the separately proved nu branch, without evaluating log(0).identityTensor: PDF p.7: identity on A tensored with the reference on B.positiveTraceSmoothedMinEntropy: PDF p.8, Definition 3: normalized reference optimization on B.conditionalTesting: PDF p.8, Definition 5: optimized conditional testing entropy.cqBlockMatrix: PDF pp.7--8: unnormalized positive classical blocks, allowing zero labels.processBlocks: PDF pp.7--8: arbitrary many-to-one processing, constructed from input.NormalizedBlocks: PDF p.7: normalized CQ states expressed as positive blocks.cqMarginal: PDF p.7: the actual B marginal.conditionOnClassical: PDF p.9, Proposition 7: reorder XAB to A(XB).joinClassical: PDF p.9, Proposition 7: reorder XAB to (XA)B.labelCount: PDF p.9: positive-probability support size.PublicRandomSeed: PDF pp.10--12: independent public seed of arbitrary finite size.Extractor: PDF p.10: arbitrary seeded hashes to a finite output alphabet.extractionOutput: PDF p.10: output retaining the public seed.extractionIdeal: PDF p.10: same seed cqMarginal, uniform output, one common reference.extractionSecurity: PDF p.10, Definition 6: extractionSecurity optimized over one normalized sigma_B.extractionLength: PDF p.10, Definition 6: maximal INTEGER length; arbitrary output cardinality. The set is nonempty/bounded on normalized CQ sources with e<1.Compressor: PDF pp.11--12: seeded encoder and seed/message-dependent decoder POVM.compressionError: PDF p.12, Definition 7: actual source/seed average error.compressionLength: PDF p.12, Definition 7: minimal INTEGER length.blocksPower: PDF p.20: independent CQ copies in the product classical basis.conditionalMean: PDF pp.7,20: conditional entropy, actual marginal.cqConditionalVariance: PDF pp.19--20: centered conditional pair variance.gaussianCenter: PDF p.19: Gaussian approximation, including V=0.LogarithmicRemainder: PDF p.19: two-sided O(log n), constants before blocklength.ConstantRemainder: PDF p.19, (33): two-sided O(1).liftIsometry: PDF p.8: the actual isometry U tensor identity_B.nsTensorP: PDF p.14: NS P for product eigenbases, independently computed from the product eigenvalues and the eigenbasisOverlapSquared of product eigenvectors.nsTensorQ: PDF p.14: NS Q for the same product eigenbases.supportedSpread: PDF p.21: spread after restricting a marginal to its positive support.finiteBins: PDF p.21: positive-bin correction, including a flat nonzero marginal.intervalSup: PDF p.21: lower/upper optimization over a half-open real interval, in EReal.intervalInf: PDF p.21: infimum counterpart, retaining infinite limiting values.monotoneInverse: Lemma 18, PDF p.22: generalized inverse with extended endpoints.inverseRate: PDF p.22: optimization over ALL real threshold sequences.thresholdRate: PDF p.22: threshold spectrum with its exact limsup/non-strict or liminf/strict constraint.pauliP: Appendix A, PDF pp.24--25: explicit NS probabilities, total P=1.pauliQ: Appendix A, PDF pp.24--25: reference weights, total Q=2(p^2+(1-p)^2) on the nontrivial NS support. Remaining zero-P entries are irrelevant to Ds.binomialBelow: Appendix A, PDF p.25: F(k-1;n,p), with F(-1)=0 at k=0.binomialCutoff: Appendix A, PDF p.25: maximum k in 0,...,n with F(k-1)<=epsilon. For 0<=epsilon<1 the set contains 0 and larger k>n never qualify.PairSequence: PDF pp.21--23: arbitrary finite pairs; slot k is source blocklength k+1. Dimensions can vary and no iid, support or variance property is built in.StateSequence: PDF p.22: both sequences consist of normalized quantum states.ErrorConstraint: PDF pp.22--23: the two different asymptotic error constraints.quantumSpectrumRate: PDF p.22: source thresholds are 2^((k+1)R), in bits.optimizedEntropySequenceRate: PDF pp.22--23: one-shot rates, optimizing all [0,1]-valued error sequences.VaryingRegisterTests: PDF p.23: one genuine effect at each blocklength, without a free rate variable.testError: PDF p.23: actual type-I error of an effect.testRate: PDF p.23: actual type-II exponent, including zero type-II error.operationalTestingRate: PDF p.23: operational B and the strict-error sup form of B-dagger.testingConverseRate: PDF p.23: universal converse threshold defining B-dagger.SpectralControl: PDF p.23: the source's sufficient polynomial spectral condition. The positive-eigenvalue alternative is on the supported restriction and explicitly retains support inclusion. Constants and thresholds precede k.nsSequence: PDF p.23: classical NS distributions as diagonal matrices; testing arbitrary effects on diagonal states equals randomized classical testing.smoothMaxEndpoint: PDF p.23: explicit endpoint continuation for smoothing parameter one, by its monotone left limit, rather than a finite real default.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Defs_MatrixMapPositivity
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P63
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P71
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P06
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P30
import Definitions.Def_QAlgorithms_Papers_Independent_Information100_P67
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P26
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P28
import Definitions.Def_QAlgorithms_Papers_Independent_Dependency50_P36
import Definitions.Def_QAlgorithms_Papers_Independent_Bridge50_P50
/-! Tomamichel--Hayashi, arXiv:1208.1478v3. Binary logarithms throughout.
Extended-real optimizations preserve empty sets and infinite values. Matching accepted
primitives are imported; source-specific interfaces have distinct names. Local definitions
have complete bodies. Source corrections/deferrals are recorded with this unit.
Compilation and independent moderation are pending the batch handoff. -/
noncomputable section
open Filter
open scoped BigOperators Matrix ComplexOrder ComplexConjugate Matrix.Norms.L2Operator Topology
namespace QAlgorithms.Papers.Independent.Advance50.P02
attribute [local instance] Classical.propDecidable Classical.decEq
open QAlgorithms.Papers.Independent.Information100.P63
(Mat tensorPower logTwo normalQuantile testingBeta)
open QAlgorithms.Papers.Independent.Information100.P71 (SupportIncluded supportPower)
open QAlgorithms (effectProb)
open QAlgorithms.Papers.Independent.Information100.P06 (Below)
open QAlgorithms.Papers.Independent.Information100.P30 (tensorMap)
open QAlgorithms.Papers.Independent.Information100.P67 (purifiedDistance)
open QAlgorithms.Papers.Independent.Dependency50.P26 (TracePreserving)
open QAlgorithms.Papers.Independent.Dependency50.P28 (pinch)
variable {I J A B X Z : Type} [Fintype I] [DecidableEq I]
[Fintype J] [DecidableEq J] [Fintype A] [DecidableEq A]
[Fintype B] [DecidableEq B] [Fintype X] [DecidableEq X]
[Fintype Z] [DecidableEq Z]
/-- PDF pp.6--7: the source's strictly positive-trace subnormalized states. -/
def PositiveTraceSubnormalized (a : Mat I) : Prop :=
QAlgorithms.Papers.Independent.Information100.P67.IsSubnormalized a ∧ 0 < a.trace.re
/-- PDF p.8, Definition 4: -log_2, explicitly extended at zero. -/
def negLog (x : ℝ) : EReal := if x = 0 then ⊤ else (-logTwo x : ℝ)
/-- PDF p.8, Definition 4. Reuses the accepted extended testing entropy, adapting its argument order.
The beta optimization is nonempty/bounded on the theorem domains. -/
def extendedTestingDivergence (e : ℝ) (rho sigma : Mat I) : EReal :=
QAlgorithms.Papers.Independent.Dependency50.P36.testingEntropy rho sigma e
/-- PDF pp.7--8, Definition 2: nearby strictly positive-trace subnormalized
states, with positive scale t=2^lambda. Includes Lemma 2's subnormalized centers. -/
def smoothedMaxRelativeEntropy (e : ℝ) (rho sigma : Mat I) : EReal :=
sInf {d : EReal | ∃ tau : Mat I, PositiveTraceSubnormalized tau ∧ purifiedDistance rho tau ≤ e ∧
∃ t : ℝ, 0 < t ∧ Below tau ((t : ℂ) • sigma) ∧ d = (logTwo t : ℝ)}
/-- PDF p.14, Definition 8: weak spectral projector, including zero eigenvalues. -/
def lowProjector (rho sigma : Mat I) (R : ℝ) : Mat I :=
cfc (fun x : ℝ => if x ≤ 0 then (1 : ℝ) else 0)
(rho - ((Real.rpow 2 R : ℝ) : ℂ) • sigma)
/-- PDF p.14: actual quantum threshold mass, without logarithms at zero. -/
def spectrumMass (rho sigma : Mat I) (R : ℝ) : ℝ :=
effectProb rho (lowProjector rho sigma R)
/-- PDF p.14, Definition 8: empty/unbounded sets give negative/positive infinity. -/
def spectrumEntropy (e : ℝ) (rho sigma : Mat I) : EReal :=
sSup {r : EReal | ∃ R : ℝ, spectrumMass rho sigma R ≤ e ∧ r = (R : EReal)}
/-- PDF p.2, (2): classical threshold mass, permitting Q=0 at positive P. -/
def classicalThresholdMass {K : Type} [Fintype K] (P Q : K → ℝ) (R : ℝ) : ℝ :=
∑ z, if P z ≤ Real.rpow 2 R * Q z then P z else 0
/-- PDF p.2, (2): extended-real classical information spectrum. -/
def classicalSpectrumDivergence {K : Type} [Fintype K] (e : ℝ) (P Q : K → ℝ) : EReal :=
sSup {r : EReal | ∃ R : ℝ, classicalThresholdMass P Q R ≤ e ∧ r = (R : EReal)}
/-- PDF pp.7,19: finite relative entropy in bits, used only on the support domain.
Kernel log values are irrelevant after weighting by rho. -/
def relativeMean (rho sigma : Mat I) : ℝ :=
effectProb rho (cfc logTwo rho - cfc logTwo sigma)
/-- PDF p.19, correcting Definition 1 p.7: accepted centered pair variance in bits. -/
def centeredRelativeVariance (rho sigma : Mat I) : ℝ :=
QAlgorithms.Papers.Independent.Dependency50.P36.pairInformationVariance rho sigma
/-- PDF p.14: arbitrary finite index, nonnegative eigenvalues, and full unitary
reconstruction of this PSD matrix. Unlike Information100.P53.SpectralData, no
ordering or Fin-index presentation is imposed. -/
structure PositiveSpectralPresentation (rho : Mat I) where
value : I → ℝ
nonnegative : ∀ i, 0 ≤ value i
vectors : Mat I
unitary : vectorsᴴ * vectors = 1
decomposition : rho = vectors * Matrix.diagonal (fun i => (value i : ℂ)) * vectorsᴴ
/-- PDF p.14: overlap squared of the two eigenvectors. -/
def eigenbasisOverlapSquared {rho sigma : Mat I} (r : PositiveSpectralPresentation rho) (s : PositiveSpectralPresentation sigma)
(x y : I) : ℝ :=
Complex.normSq (∑ i, conj (r.vectors i x) * s.vectors i y)
/-- PDF p.14: adapt column eigenvectors to the accepted NS row-vector presentation. -/
def nsSpectralPresentation {rho : Mat I} (r : PositiveSpectralPresentation rho) :
QAlgorithms.Papers.Independent.Bridge50.P50.NSSpectralData I :=
⟨r.value, fun x i => r.vectors i x⟩
/-- PDF p.14: Nussbaum--Szkola P, including zero-probability entries. -/
def nsProbability {rho sigma : Mat I} (r : PositiveSpectralPresentation rho) (s : PositiveSpectralPresentation sigma) : I × I → ℝ :=
QAlgorithms.Papers.Independent.Bridge50.P50.nsP (nsSpectralPresentation r) (nsSpectralPresentation s)
/-- PDF p.14: Nussbaum--Szkola Q; need not have total mass one. -/
def nsReferenceWeight {rho sigma : Mat I} (r : PositiveSpectralPresentation rho) (s : PositiveSpectralPresentation sigma) : I × I → ℝ :=
QAlgorithms.Papers.Independent.Bridge50.P50.nsQ (nsSpectralPresentation r) (nsSpectralPresentation s)
/-- PDF p.19: classical mean, used only on the finite-likelihood domain. -/
def classicalMean {K : Type} [Fintype K] (P Q : K → ℝ) : ℝ :=
∑ z, P z * (logTwo (P z) - logTwo (Q z))
/-- PDF p.19: centered classical information variance. -/
def classicalVariance {K : Type} [Fintype K] (P Q : K → ℝ) : ℝ :=
∑ z, P z * (logTwo (P z) - logTwo (Q z) - classicalMean P Q) ^ 2
/-- PDF p.19: third absolute central moment (the cube of the printed T). -/
def classicalThirdCentralMoment {K : Type} [Fintype K] (P Q : K → ℝ) : ℝ :=
∑ z, P z * |logTwo (P z) - logTwo (Q z) - classicalMean P Q| ^ 3
/-- PDF pp.2,18: products of classical weights, including the empty product. -/
def weightPower {K : Type} (n : ℕ) (P : K → ℝ) : (Fin n → K) → ℝ :=
fun z => ∏ i, P (z i)
/-- Eq.(31), PDF p.18: CDF of the empirical mean of n independent log
likelihoods. Used with n>0 and support inclusion; zero-P atoms carry zero mass. -/
def empiricalMeanMass {K : Type} [Fintype K] (n : ℕ) (P Q : K → ℝ) (R : ℝ) : ℝ :=
∑ z : Fin n → K, if (∑ i : Fin n, (logTwo (P (z i)) - logTwo (Q (z i)))) / n ≤ R
then weightPower n P z else 0
/-- PDF p.14: distinct spectral values, counting the kernel once. -/
def distinctEigenvalueSet (sigma : Mat I) : Finset ℝ :=
if h : sigma.IsHermitian then Finset.univ.image h.eigenvalues else ∅
/-- PDF pp.13--14: number of distinct eigenvalues, not dimension or rank. -/
def distinctCount (sigma : Mat I) : ℕ := (distinctEigenvalueSet sigma).card
/-- PDF p.14: projection onto one whole eigenspace. -/
def eigenspaceProjector (sigma : Mat I) (v : ℝ) : Mat I :=
cfc (fun x : ℝ => if x = v then (1 : ℝ) else 0) sigma
/-- PDF p.17: spread for an invertible PSD operator; only used there. -/
def spectralSpread (sigma : Mat I) : ℝ :=
logTwo (sSup (distinctEigenvalueSet sigma : Set ℝ)) - logTwo (sInf (distinctEigenvalueSet sigma : Set ℝ))
/-- PDF pp.17--18: corrected positive bin count. Printed 2*ceil(lambda)=0 for
flat spectra. The proof requires l>0; use l=max(1,ceil(lambda)). For singular
sigma use the separately proved nu branch, without evaluating log(0). -/
def positiveSpectralFactor (sigma : Mat I) : ℕ :=
if sigma.PosDef then min (2 * max 1 (Nat.ceil (spectralSpread sigma))) (distinctCount sigma)
else distinctCount sigma
/-- PDF p.7: identity on A tensored with the reference on B. -/
def identityTensor (A : Type) [DecidableEq A] (sigma : Mat B) : Mat (A × B) :=
fun i j => if i.1 = j.1 then sigma i.2 j.2 else 0
/-- PDF p.8, Definition 3: normalized reference optimization on B. -/
def positiveTraceSmoothedMinEntropy (e : ℝ) (rho : Mat (A × B)) : EReal :=
sSup {h : EReal | ∃ sigma : Mat B, QAlgorithms.IsDensityMatrix sigma ∧
h = -smoothedMaxRelativeEntropy e rho (identityTensor A sigma)}
/-- PDF p.8, Definition 5: optimized conditional testing entropy. -/
def conditionalTesting (e : ℝ) (rho : Mat (A × B)) : EReal :=
sSup {h : EReal | ∃ sigma : Mat B, QAlgorithms.IsDensityMatrix sigma ∧
h = -extendedTestingDivergence e rho (identityTensor A sigma)}
/-- PDF pp.7--8: unnormalized positive classical blocks, allowing zero labels. -/
def cqBlockMatrix (blocks : X → Mat B) : Mat (X × B) :=
fun i j => if i.1 = j.1 then blocks i.1 i.2 j.2 else 0
/-- PDF pp.7--8: arbitrary many-to-one processing, constructed from input. -/
def processBlocks (f : X → Z) (blocks : X → Mat B) : Z → Mat B :=
fun z => ∑ x, if f x = z then blocks x else 0
/-- PDF p.7: normalized CQ states expressed as positive blocks. -/
def NormalizedBlocks (blocks : X → Mat B) : Prop :=
(∀ x, (blocks x).PosSemidef) ∧ (∑ x, (blocks x).trace.re) = 1
/-- PDF p.7: the actual B marginal. -/
def cqMarginal (blocks : X → Mat B) : Mat B := ∑ x, blocks x
/-- PDF p.9, Proposition 7: reorder XAB to A(XB). -/
def conditionOnClassical (blocks : X → Mat (A × B)) : Mat (A × (X × B)) :=
fun i j => if i.2.1 = j.2.1 then blocks i.2.1 (i.1,i.2.2) (j.1,j.2.2) else 0
/-- PDF p.9, Proposition 7: reorder XAB to (XA)B. -/
def joinClassical (blocks : X → Mat (A × B)) : Mat ((X × A) × B) :=
fun i j => if i.1.1 = j.1.1 then blocks i.1.1 (i.1.2,i.2) (j.1.2,j.2) else 0
/-- PDF p.9: positive-probability support size. -/
def labelCount (blocks : X → Mat B) : ℕ :=
(Finset.univ.filter fun x => 0 < (blocks x).trace.re).card
/-- PDF pp.10--12: independent public seed of arbitrary finite size. -/
structure PublicRandomSeed where
size : ℕ
probability : Fin size → ℝ
nonnegative : ∀ s, 0 ≤ probability s
total : ∑ s, probability s = 1
/-- PDF p.10: arbitrary seeded hashes to a finite output alphabet. -/
structure Extractor (X : Type) where
seed : PublicRandomSeed
outputs : ℕ
outputs_positive : 0 < outputs
hash : Fin seed.size → X → Fin outputs
/-- PDF p.10: output retaining the public seed. -/
def extractionOutput (P : Extractor X) (blocks : X → Mat B) :
Mat (Fin P.seed.size × (Fin P.outputs × B)) :=
fun i j => if i.1 = j.1 ∧ i.2.1 = j.2.1 then
(P.seed.probability i.1 : ℂ) *
(∑ x, if P.hash i.1 x = i.2.1 then blocks x i.2.2 j.2.2 else 0) else 0
/-- PDF p.10: same seed cqMarginal, uniform output, one common reference. -/
def extractionIdeal (P : Extractor X) (sigma : Mat B) :
Mat (Fin P.seed.size × (Fin P.outputs × B)) :=
fun i j => if i.1 = j.1 ∧ i.2.1 = j.2.1 then
((P.seed.probability i.1 / P.outputs : ℝ) : ℂ) * sigma i.2.2 j.2.2 else 0
/-- PDF p.10, Definition 6: extractionSecurity optimized over one normalized sigma_B. -/
def extractionSecurity (P : Extractor X) (blocks : X → Mat B) : ℝ :=
sInf {d : ℝ | ∃ sigma : Mat B, QAlgorithms.IsDensityMatrix sigma ∧
d = purifiedDistance (extractionOutput P blocks) (extractionIdeal P sigma)}
/-- PDF p.10, Definition 6: maximal INTEGER length; arbitrary output cardinality.
The set is nonempty/bounded on normalized CQ sources with e<1. -/
def extractionLength (e : ℝ) (blocks : X → Mat B) : ℕ :=
sSup {l : ℕ | ∃ P : Extractor X, (l : ℝ) ≤ logTwo P.outputs ∧ extractionSecurity P blocks ≤ e}
/-- PDF pp.11--12: seeded encoder and seed/message-dependent decoder POVM. -/
structure Compressor (X B : Type) [Fintype X] [Fintype B] [DecidableEq B] where
seed : PublicRandomSeed
messages : ℕ
messages_positive : 0 < messages
encode : Fin seed.size → X → Fin messages
decode : Fin seed.size → Fin messages → X → Mat B
positive : ∀ s m x, (decode s m x).PosSemidef
complete : ∀ s m, ∑ x, decode s m x = 1
/-- PDF p.12, Definition 7: actual source/seed average error. -/
def compressionError (P : Compressor X B) (blocks : X → Mat B) : ℝ :=
1 - ∑ s, P.seed.probability s * ∑ x, effectProb (blocks x) (P.decode s (P.encode s x) x)
/-- PDF p.12, Definition 7: minimal INTEGER length. -/
def compressionLength (e : ℝ) (blocks : X → Mat B) : ℕ :=
sInf {m : ℕ | ∃ P : Compressor X B, logTwo P.messages ≤ (m : ℝ) ∧
compressionError P blocks ≤ e}
/-- PDF p.20: independent CQ copies in the product classical basis. -/
def blocksPower (n : ℕ) (blocks : X → Mat B) : (Fin n → X) → Mat (Fin n → B) :=
fun x i j => ∏ k, blocks (x k) (i k) (j k)
/-- PDF pp.7,20: conditional entropy, actual marginal. -/
def conditionalMean (blocks : X → Mat B) : ℝ :=
-relativeMean (cqBlockMatrix blocks) (identityTensor X (cqMarginal blocks))
/-- PDF pp.19--20: centered conditional pair variance. -/
def cqConditionalVariance (blocks : X → Mat B) : ℝ :=
centeredRelativeVariance (cqBlockMatrix blocks) (identityTensor X (cqMarginal blocks))
/-- PDF p.19: Gaussian approximation, including V=0. -/
def gaussianCenter (n : ℕ) (D V e : ℝ) : ℝ :=
n * D + Real.sqrt ((n : ℝ) * V) * normalQuantile e
/-- PDF p.19: two-sided O(log n), constants before blocklength. -/
def LogarithmicRemainder (f : ℕ → EReal) (center : ℕ → ℝ) : Prop :=
∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, 2 ≤ n0 ∧ ∀ n ≥ n0,
((center n - C * logTwo n : ℝ) : EReal) ≤ f n ∧
f n ≤ ((center n + C * logTwo n : ℝ) : EReal)
/-- PDF p.19, (33): two-sided O(1). -/
def ConstantRemainder (f : ℕ → EReal) (center : ℕ → ℝ) : Prop :=
∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, 1 ≤ n0 ∧ ∀ n ≥ n0,
((center n - C : ℝ) : EReal) ≤ f n ∧ f n ≤ ((center n + C : ℝ) : EReal)
example : negLog 0 = ⊤ := by simp [negLog]
example : logTwo 1 = 0 := by simp [logTwo]
example (P : I → ℝ) (x : Fin 0 → I) : weightPower 0 P x = 1 := by simp [weightPower]
example (rho sigma : Mat I) : centeredRelativeVariance rho sigma =
QAlgorithms.Papers.Independent.Dependency50.P36.pairInformationVariance rho sigma := by
rfl
example (blocks : X → Mat B) (i j : B) (x : X) :
cqBlockMatrix blocks (x,i) (x,j) = blocks x i j := by simp [cqBlockMatrix]
example (blocks : X → Mat B) (a b : Fin 0 → B) (x : Fin 0 → X) :
blocksPower 0 blocks x a b = 1 := by simp [blocksPower]
/-- PDF p.8: the actual isometry U tensor identity_B. -/
def liftIsometry (U : Matrix I A ℂ) : Matrix (I × B) (A × B) ℂ :=
fun i j => U i.1 j.1 * (if i.2 = j.2 then (1 : ℂ) else 0)
/-- PDF p.14: NS P for product eigenbases, independently computed from the
product eigenvalues and the eigenbasisOverlapSquared of product eigenvectors. -/
def nsTensorP {rho sigma : Mat I} (r : PositiveSpectralPresentation rho) (s : PositiveSpectralPresentation sigma)
(n : ℕ) (z : Fin n → I × I) : ℝ :=
(∏ k, r.value (z k).1) * Complex.normSq
(∑ a : Fin n → I, conj (∏ k, r.vectors (a k) (z k).1) *
(∏ k, s.vectors (a k) (z k).2))
/-- PDF p.14: NS Q for the same product eigenbases. -/
def nsTensorQ {rho sigma : Mat I} (r : PositiveSpectralPresentation rho) (s : PositiveSpectralPresentation sigma)
(n : ℕ) (z : Fin n → I × I) : ℝ :=
(∏ k, s.value (z k).2) * Complex.normSq
(∑ a : Fin n → I, conj (∏ k, r.vectors (a k) (z k).1) *
(∏ k, s.vectors (a k) (z k).2))
/-- PDF p.21: spread after restricting a marginal to its positive support. -/
def supportedSpread (sigma : Mat I) : ℝ :=
logTwo (sSup (distinctEigenvalueSet sigma : Set ℝ)) - logTwo (QAlgorithms.minPositiveEigenvalue sigma)
/-- PDF p.21: positive-bin correction, including a flat nonzero marginal. -/
def finiteBins (n : ℕ) (sigma : Mat I) : ℕ :=
max 1 (Nat.ceil ((n : ℝ) * supportedSpread sigma))
/-- PDF p.21: lower/upper optimization over a half-open real interval, in EReal. -/
def intervalSup (a b : ℝ) (f : ℝ → ℝ) : EReal :=
sSup {v : EReal | ∃ x : ℝ, a ≤ x ∧ x < b ∧ v = (f x : EReal)}
/-- PDF p.21: infimum counterpart, retaining infinite limiting values. -/
def intervalInf (a b : ℝ) (f : ℝ → ℝ) : EReal :=
sInf {v : EReal | ∃ x : ℝ, a ≤ x ∧ x < b ∧ v = (f x : EReal)}
/-- Lemma 18, PDF p.22: generalized inverse with extended endpoints. -/
def monotoneInverse (g : ℝ → ℝ) (e : ℝ) : EReal :=
sSup {r : EReal | ∃ R : ℝ, g R ≤ e ∧ r = (R : EReal)}
/-- PDF p.22: optimization over ALL real threshold sequences. -/
def inverseRate (g : ℕ → ℝ → ℝ) (e : ℝ) (strict : Bool) : EReal :=
sSup {v : EReal | ∃ a : ℕ → ℝ,
(if strict then liminf (fun n => (a n : EReal)) atTop < (e : EReal)
else limsup (fun n => (a n : EReal)) atTop ≤ (e : EReal)) ∧
v = liminf (fun n => monotoneInverse (g n) (a n)) atTop}
/-- PDF p.22: threshold spectrum with its exact limsup/non-strict or liminf/strict constraint. -/
def thresholdRate (g : ℕ → ℝ → ℝ) (e : ℝ) (strict : Bool) : EReal :=
sSup {r : EReal | ∃ R : ℝ,
(if strict then liminf (fun n => (g n R : EReal)) atTop < (e : EReal)
else limsup (fun n => (g n R : EReal)) atTop ≤ (e : EReal)) ∧ r = (R : EReal)}
/-- Appendix A, PDF pp.24--25: explicit NS probabilities, total P=1. -/
def pauliP (p : ℝ) : Fin 4 → ℝ := ![p/2, p/2, (1-p)/2, (1-p)/2]
/-- Appendix A, PDF pp.24--25: reference weights, total Q=2(p^2+(1-p)^2)
on the nontrivial NS support. Remaining zero-P entries are irrelevant to Ds. -/
def pauliQ (p : ℝ) : Fin 4 → ℝ := ![p^2, p^2, (1-p)^2, (1-p)^2]
/-- Appendix A, PDF p.25: F(k-1;n,p), with F(-1)=0 at k=0. -/
def binomialBelow (n : ℕ) (p : ℝ) (k : ℕ) : ℝ :=
∑ j ∈ Finset.range k, if j ≤ n then (Nat.choose n j : ℝ) * p^j * (1-p)^(n-j) else 0
/-- Appendix A, PDF p.25: maximum k in 0,...,n with F(k-1)<=epsilon.
For 0<=epsilon<1 the set contains 0 and larger k>n never qualify. -/
def binomialCutoff (n : ℕ) (p e : ℝ) : ℕ :=
((Finset.range (n+1)).filter fun k => binomialBelow n p k ≤ e).sup id
/-- PDF pp.21--23: arbitrary finite pairs; slot k is source blocklength k+1.
Dimensions can vary and no iid, support or variance property is built in. -/
structure PairSequence where
Index : ℕ → Type
finite : ∀ k, Fintype (Index k)
decidable : ∀ k, DecidableEq (Index k)
rho : ∀ k, Mat (Index k)
sigma : ∀ k, Mat (Index k)
attribute [instance] PairSequence.finite PairSequence.decidable
/-- PDF p.22: both sequences consist of normalized quantum states. -/
def StateSequence (S : PairSequence) : Prop :=
∀ k, QAlgorithms.IsDensityMatrix (S.rho k) ∧ QAlgorithms.IsDensityMatrix (S.sigma k)
/-- PDF pp.22--23: the two different asymptotic error constraints. -/
def ErrorConstraint (a : ℕ → ℝ) (e : ℝ) (strict : Bool) : Prop :=
if strict then liminf (fun n => (a n : EReal)) atTop < (e : EReal)
else limsup (fun n => (a n : EReal)) atTop ≤ (e : EReal)
/-- PDF p.22: source thresholds are 2^((k+1)R), in bits. -/
def quantumSpectrumRate (S : PairSequence) (e : ℝ) (strict : Bool) : EReal :=
thresholdRate (fun k R => spectrumMass (S.rho k) (S.sigma k) ((k+1 : ℕ)*R)) e strict
/-- PDF pp.22--23: one-shot rates, optimizing all [0,1]-valued error sequences. -/
def optimizedEntropySequenceRate (H : ℕ → ℝ → EReal) (e : ℝ) (strict : Bool) : EReal :=
sSup {v : EReal | ∃ a : ℕ → ℝ, (∀ k, 0 ≤ a k ∧ a k ≤ 1) ∧
ErrorConstraint a e strict ∧
v = liminf (fun k => (((1 : ℝ)/(k+1 : ℕ) : ℝ) : EReal) * H k (a k)) atTop}
/-- PDF p.23: one genuine effect at each blocklength, without a free rate variable. -/
def VaryingRegisterTests (S : PairSequence) :=
{Q : ∀ k, Mat (S.Index k) // ∀ k, QAlgorithms.IsEffect (Q k)}
/-- PDF p.23: actual type-I error of an effect. -/
def testError (S : PairSequence) (Q : VaryingRegisterTests S) (k : ℕ) : ℝ :=
effectProb (S.rho k) (1 - Q.val k)
/-- PDF p.23: actual type-II exponent, including zero type-II error. -/
def testRate (S : PairSequence) (Q : VaryingRegisterTests S) : EReal :=
liminf (fun k => (((1 : ℝ)/(k+1 : ℕ) : ℝ) : EReal) *
negLog (effectProb (S.sigma k) (Q.val k))) atTop
/-- PDF p.23: operational B and the strict-error sup form of B-dagger. -/
def operationalTestingRate (S : PairSequence) (e : ℝ) (strict : Bool) : EReal :=
sSup {v : EReal | ∃ Q : VaryingRegisterTests S,
ErrorConstraint (testError S Q) e strict ∧ v = testRate S Q}
/-- PDF p.23: universal converse threshold defining B-dagger. -/
def testingConverseRate (S : PairSequence) (e : ℝ) : EReal :=
sInf {r : EReal | ∃ R : ℝ, r = (R : EReal) ∧
∀ Q : VaryingRegisterTests S, (R : EReal) ≤ testRate S Q →
(e : EReal) ≤ liminf (fun k => (testError S Q k : EReal)) atTop}
/-- PDF p.23: the source's sufficient polynomial spectral condition. The
positive-eigenvalue alternative is on the supported restriction and explicitly
retains support inclusion. Constants and thresholds precede k. -/
def SpectralControl (S : PairSequence) : Prop :=
(∃ C : ℝ, 0 < C ∧ ∃ d k0 : ℕ, ∀ k ≥ k0,
(distinctCount (S.sigma k) : ℝ) ≤ C * (k+1 : ℕ)^d) ∨
(∃ C : ℝ, 0 < C ∧ ∃ d k0 : ℕ, ∀ k ≥ k0,
SupportIncluded (S.rho k) (S.sigma k) ∧
0 < QAlgorithms.minPositiveEigenvalue (S.sigma k) ∧
-logTwo (QAlgorithms.minPositiveEigenvalue (S.sigma k)) ≤ C * (k+1 : ℕ)^d)
/-- PDF p.23: classical NS distributions as diagonal matrices; testing arbitrary
effects on diagonal states equals randomized classical testing. -/
def nsSequence (S : PairSequence) (r : ∀ k, PositiveSpectralPresentation (S.rho k))
(s : ∀ k, PositiveSpectralPresentation (S.sigma k)) : PairSequence where
Index k := S.Index k × S.Index k
finite _ := inferInstance
decidable _ := Classical.decEq _
rho k := Matrix.diagonal (fun z => (nsProbability (r k) (s k) z : ℂ))
sigma k := Matrix.diagonal (fun z => (nsReferenceWeight (r k) (s k) z : ℂ))
/-- PDF p.23: explicit endpoint continuation for smoothing parameter one,
by its monotone left limit, rather than a finite real default. -/
def smoothMaxEndpoint (a : ℝ) (rho sigma : Mat I) : EReal :=
if a < 1 then smoothedMaxRelativeEntropy a rho sigma
else sInf {v : EReal | ∃ b : ℝ, 0 ≤ b ∧ b < 1 ∧ v = smoothedMaxRelativeEntropy b rho sigma}
/-- Sanity: no seed-dependent choice of the reference in the ideal state. -/
example (P : Extractor X) (sigma : Mat B) (s : Fin P.seed.size)
(z : Fin P.outputs) (i j : B) :
extractionIdeal P sigma (s,(z,i)) (s,(z,j)) =
((P.seed.probability s / P.outputs : ℝ) : ℂ) * sigma i j := by
simp [extractionIdeal]
example (n : ℕ) (p : ℝ) : binomialBelow n p 0 = 0 := by simp [binomialBelow]
example (g : ℕ → ℝ → ℝ) (e : ℝ) :
ErrorConstraint (fun n => g n 0) e false =
(limsup (fun n => (g n 0 : EReal)) atTop ≤ (e : EReal)) := rfl
/-- Sanity: the NS adapter preserves the specified column eigenvector. -/
example {rho : Mat I} (r : PositiveSpectralPresentation rho) (x i : I) :
(nsSpectralPresentation r).vector x i = r.vectors i x := by
rfl
end QAlgorithms.Papers.Independent.Advance50.P02
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Advance50.P02.Compressor
For finite types , with decidable equality on , a compressor consists of a finite seed distribution with , a positive natural number of messages, an encoding function , and complex matrices indexed by . Every must be positive semidefinite, and for every seed and message they must satisfy . Seed probabilities may vanish, and the seed size is necessarily positive. Neither nor is explicitly required to be nonempty; when is empty and is nonempty, the completeness equation cannot hold.
QAlgorithms.Papers.Independent.Advance50.P02.ConstantRemainder
For any extended real sequence and real sequence , this predicate means that there exist a real constant and a natural number such that, for every natural number ,
with the real bounds embedded into the extended reals. Thus is finite from onward, while its earlier values are unrestricted.
QAlgorithms.Papers.Independent.Advance50.P02.ErrorConstraint
For every real sequence , real number , and Boolean parameter , this predicate means
The limits inferior and superior are taken after embedding the sequence into the extended real numbers, so infinite values are allowed. There are no bounds or probability assumptions on or .
QAlgorithms.Papers.Independent.Advance50.P02.Extractor
For any type , an extractor consists of a finite seed distribution , with nonnegative real probabilities summing to one, a positive natural number of outputs, and a function . The seed size is necessarily positive, but individual seed probabilities may vanish. No finiteness or nonemptiness assumption on , and no further condition on , is imposed.
QAlgorithms.Papers.Independent.Advance50.P02.LogarithmicRemainder
For any sequence of extended real numbers and any real sequence , this predicate means that there exist a real constant and a natural number such that, for every natural number ,
where the real bounds are regarded as extended real numbers. In particular, must be finite for all ; no condition is imposed on earlier terms.
QAlgorithms.Papers.Independent.Advance50.P02.NormalizedBlocks
For finite index types and any family of complex matrices indexed by , this predicate means precisely that every is positive semidefinite and
It does not require each block to have trace , and zero blocks are permitted. If or is empty, the sum is , so the predicate cannot hold.
QAlgorithms.Papers.Independent.Advance50.P02.PairSequence
This structure consists of a family of index types , one for every natural number , together with a specified finite enumeration and decidable equality on each , and two families of complex square matrices indexed by . The index types may vary with , may be empty, and include an index type at . No positivity, trace, normalization, or relation between the matrices is required.
QAlgorithms.Papers.Independent.Advance50.P02.PositiveSpectralPresentation
For a finite index type with decidable equality and a specified complex matrix indexed by , a presentation consists of real numbers for every and a complex matrix indexed by , together with the requirements
Here is the conjugate transpose. The numbers may be zero or repeated and are not required to be ordered or sum to one. Empty is included, with vacuous scalar conditions and the corresponding empty-matrix equalities.
QAlgorithms.Papers.Independent.Advance50.P02.PositiveTraceSubnormalized
For a finite index type with decidable equality and a complex matrix indexed by , this predicate means that is positive semidefinite and its real trace satisfies . Trace one is not required. If is empty, the strict positivity condition cannot hold.
QAlgorithms.Papers.Independent.Advance50.P02.PublicRandomSeed
A public random seed consists of a natural number and real numbers , indexed by , satisfying for every and . Zero probabilities are permitted. Although the size is specified as an arbitrary natural number, these conditions exclude , since an empty sum is zero.
QAlgorithms.Papers.Independent.Advance50.P02.SpectralControl
For a sequence consisting of finite index types with decidable equality and arbitrary complex matrices on them, the declaration defines the following disjunction: either there exist and natural numbers such that, for every , the number of distinct eigenvalues of is at most ; or there exist and natural numbers such that, for every ,
Here the distinct-eigenvalue set is defined to be the image of the real eigenvalue list when is Hermitian and the empty set otherwise. The quantity is the minimum of the strictly positive entries in the ascending eigenvalue list, or if no such entry exists; for a non-Hermitian matrix that ascending list is defined to be identically . Thus the first alternative counts eigenvalues for a non-Hermitian matrix, whereas the second alternative requires a strictly positive eigenvalue. The exponent and cutoff may be , the two alternatives may use different constants, and no density assumption is part of this predicate.
QAlgorithms.Papers.Independent.Advance50.P02.StateSequence
For a sequence consisting of finite index types with decidable equality and complex matrices on , this predicate means that, for every natural number , including zero, both matrices are positive semidefinite and satisfy . These hypotheses cannot hold at an index for which is empty, since the trace of an empty matrix is zero.
QAlgorithms.Papers.Independent.Advance50.P02.VaryingRegisterTests
For every sequence consisting of finite index types with decidable equality and complex matrices on those types, this defines the type of families of complex square matrices on such that, for every natural number , including zero, both and are positive semidefinite. No normalization or positivity is required of , and no additional relation between the tests at different indices is imposed; empty index types are allowed.
QAlgorithms.Papers.Independent.Advance50.P02.binomialBelow
For every pair of natural numbers , including zero, and every real number , this defines
Indices contribute zero explicitly, and the subtraction is natural-number subtraction, truncated at zero. The sum is zero when , and powers with exponent zero equal , including . No assumption is imposed, so the expression is not required to be a probability.
QAlgorithms.Papers.Independent.Advance50.P02.binomialCutoff
For every natural number , including zero, and every pair of real numbers , this defines the largest satisfying
with value if no such exists. In particular, is never considered, and when the result is always . Neither nor is restricted to a probability range.
QAlgorithms.Papers.Independent.Advance50.P02.blocksPower
For arbitrary types , every natural number , and every family of complex matrices indexed by , this definition assigns to each tuple the matrix on with entries
No finiteness, positivity, or normalization assumptions are imposed. For , both tuple index types consist of the unique empty tuple, and the empty product gives the single matrix entry .
QAlgorithms.Papers.Independent.Advance50.P02.centeredRelativeVariance
For any finite index type with decidable equality and arbitrary complex matrices indexed by , put
The defined real number is . Here , the scalar logarithm is total with , and the real self-adjoint functional calculus returns zero on non-Hermitian inputs. There are no density-matrix or support assumptions and no division by . For empty , the value is zero.
QAlgorithms.Papers.Independent.Advance50.P02.classicalMean
For any finite type and arbitrary real functions , define , using the total real logarithm, for which and when . This definition returns
There are no nonnegativity, normalization, or support assumptions on . In particular, zero and negative weights are permitted; if is empty, the value is zero.
QAlgorithms.Papers.Independent.Advance50.P02.classicalSpectrumDivergence
For any finite type , real , and arbitrary real-valued functions , this defines the extended real supremum
No nonnegativity or normalization conditions are imposed on , and is unrestricted. The supremum of an empty set is , while an unbounded set gives . If is empty, the value is for and for .
QAlgorithms.Papers.Independent.Advance50.P02.classicalThirdCentralMoment
For any finite type and arbitrary real functions , put and
This definition returns . The logarithm uses the total real convention and for . The weights need not be nonnegative or normalized, and no support condition is assumed; consequently the result need not be nonnegative. For empty , it is zero.
QAlgorithms.Papers.Independent.Advance50.P02.classicalThresholdMass
For any finite type , arbitrary real-valued functions , and real , this defines
Equality at the threshold is included. Neither function is required to be nonnegative or normalized. If is empty, the sum is zero.
QAlgorithms.Papers.Independent.Advance50.P02.classicalVariance
For any finite type and arbitrary real functions , put and
This definition returns . The real logarithm is total, with and for . No nonnegativity, normalization, or support conditions are imposed, so the returned value is not required to be nonnegative. For empty , it is zero.
QAlgorithms.Papers.Independent.Advance50.P02.compressionError
For finite types , with decidable equality on , a compressor with finite seed probabilities , , positive message count , encoding function , and positive semidefinite decoding matrices satisfying , and any complex matrices on , compression error is
No positivity or normalization is imposed on , so the definition does not require this real number to lie between zero and one. An empty sum over gives error one.
QAlgorithms.Papers.Independent.Advance50.P02.compressionLength
For finite types , with decidable equality on , any real , and arbitrary complex matrices on , compression length is the infimum in of the natural numbers for which there exist a finite seed distribution , , a positive natural message count , an encoding function , and positive semidefinite decoding matrices on satisfying for every , such that
Neither the matrices nor the tolerance have additional constraints. If the defining set is nonempty, the result is its least natural number; if it is empty, the natural-number infimum is zero.
QAlgorithms.Papers.Independent.Advance50.P02.conditionOnClassical
For index types and any family of complex matrices indexed by , this definition returns a matrix indexed by whose entries are
Equality of labels is decided classically. No positivity, normalization, or nonemptiness assumption is imposed.
QAlgorithms.Papers.Independent.Advance50.P02.conditionalMean
For finite types , both with decidable equality, and any family of complex matrices on , define matrices on by
The conditional mean is
where means applying through the total real continuous functional calculus. No positivity, normalization, or support-inclusion hypothesis is imposed. Empty or is allowed and gives zero through the empty trace; the scalar logarithm uses its total real convention, including .
QAlgorithms.Papers.Independent.Advance50.P02.conditionalTesting
For finite index types with decidable equality, any real , and any complex matrix indexed by , this definition returns
in the extended real numbers. Here is indexed by , and has entry between and when , and entry otherwise. To define , first take the real infimum
Then if , and otherwise. No positivity or normalization assumption on , and no restriction on , is imposed. An empty real infimum here has value , so it gives and contribution ; an empty outer supremum also has value , including when is empty.
QAlgorithms.Papers.Independent.Advance50.P02.cqBlockMatrix
For index types and any family of complex matrices indexed by , this definition returns the matrix indexed by with entries
Equality of labels is decided classically. The blocks need not be positive semidefinite or normalized, and either index type may be empty.
QAlgorithms.Papers.Independent.Advance50.P02.cqConditionalVariance
For finite types , both with decidable equality, and arbitrary complex matrices on , let be the block-diagonal matrix on with block at label , and let be block diagonal with the same block at every label. Set
where denotes the total real continuous functional calculus and . The defined conditional variance is the real number
No positivity, normalization, support inclusion, or nonnegativity of the result is assumed. Empty or is included and gives zero; scalar logarithms use the total real convention .
QAlgorithms.Papers.Independent.Advance50.P02.cqMarginal
For a finite label type , any index type , and any family of complex matrices indexed by , this definition returns
No positivity or normalization is assumed. If is empty, the result is the zero matrix.
QAlgorithms.Papers.Independent.Advance50.P02.distinctCount
For any finite index type with decidable equality and any complex matrix indexed by , this definition returns the cardinality of the finite set of its real Hermitian eigenvalues, counting each distinct value once, when is Hermitian. It returns zero when is not Hermitian, and also when is empty.
QAlgorithms.Papers.Independent.Advance50.P02.distinctEigenvalueSet
For any finite index type with decidable equality and any complex matrix indexed by , this definition returns the finite set of real eigenvalues supplied by the Hermitian spectral decomposition if is Hermitian, with repeated values included only once. If is not Hermitian, it returns the empty set. Empty is allowed and gives the empty set.
QAlgorithms.Papers.Independent.Advance50.P02.eigenbasisOverlapSquared
Let be any finite index type with decidable equality, and let be complex matrices indexed by . A positive spectral presentation of consists of nonnegative real numbers and a complex matrix satisfying and ; similarly, let present , with and . For any , this definition returns
Neither matrix is required to have trace one. The type may be empty, in which case there are no choices of .
QAlgorithms.Papers.Independent.Advance50.P02.eigenspaceProjector
For any finite index type with decidable equality, any complex matrix indexed by , and any real number , this definition applies real continuous functional calculus to with the function that equals one at and zero everywhere else. For Hermitian , the result is the orthogonal projector onto its -eigenspace, and is zero if is absent from the spectrum. For non-Hermitian , this functional calculus returns zero. No positivity, trace normalization, or nonemptiness of is assumed.
QAlgorithms.Papers.Independent.Advance50.P02.empiricalMeanMass
For any finite type , natural number , arbitrary real functions , and real threshold , let , with the total real logarithm conventions and for . This definition returns
There are no distribution or support assumptions. At , the empty sum divided by zero is zero and the empty product is one, so the result is one if and zero otherwise. If is empty and , the result is zero.
QAlgorithms.Papers.Independent.Advance50.P02.extendedTestingDivergence
For any finite index type with decidable equality, real , and arbitrary complex matrices indexed by , let
where this infimum is taken in the real numbers. The defined value is , regarded as an extended real number, if , and otherwise. There are no density-matrix assumptions or restrictions on . In particular, an empty feasible set has real infimum , giving .
QAlgorithms.Papers.Independent.Advance50.P02.extractionIdeal
For any types , an extractor on with seed distribution , positive output count , and hash function, and any complex matrix indexed by , the ideal extraction matrix is indexed by triples and has entries
Here and . The hash function does not enter this formula, and need not be positive or normalized. The denominator is nonzero by the extractor’s positive output count.
QAlgorithms.Papers.Independent.Advance50.P02.extractionLength
For finite types , with decidable equality on , any real tolerance , and arbitrary complex matrices on , extraction length is the supremum in of the natural numbers for which there exists a finite seed distribution , , a positive natural output count , and a hash function , such that and the real infimum over positive semidefinite trace-one matrices on of
is at most . The matrices and , indexed by , vanish between unequal seed or output labels; within a fixed block they equal and , respectively. Matrix functions use total real continuous functional calculus, and scalar square roots use the total real square root. No normalization or positivity of , or nonnegativity of , is required. An empty real infimum is zero; the natural-number supremum is zero if its defining set is empty or unbounded.
QAlgorithms.Papers.Independent.Advance50.P02.extractionOutput
For a finite type , any type , an extractor with seed probabilities , seed size , positive output count , and hash function , and any family of complex matrices indexed by , the extraction output is the complex matrix indexed by triples whose entries are
The seed probabilities are nonnegative and sum to one. No positivity or normalization is required of the matrices ; if is empty, this output is the zero matrix.
QAlgorithms.Papers.Independent.Advance50.P02.extractionSecurity
For finite types , with decidable equality on , an extractor with seed probabilities , positive output count , and hash function , and arbitrary complex matrices indexed by , extraction security is the real infimum, over all positive semidefinite matrices on with , of
Here is zero unless and , in which case it equals ; has the same zero entries and otherwise equals . Matrix square roots denote the total real continuous functional calculus with the real square-root function; scalar real square roots are zero on negative arguments. No positivity or normalization of the is assumed. The real infimum uses the total convention giving zero for an empty or unbounded-below set; in particular, when is empty there is no trace-one , so this definition gives zero.
QAlgorithms.Papers.Independent.Advance50.P02.finiteBins
For every natural number , including , and every complex matrix indexed by a finite type with decidable equality, this defines the natural number
Here is the set of distinct real eigenvalues when is Hermitian and is empty otherwise; is its least strictly positive eigenvalue, or if none exists. The real supremum of the empty set is , uses the total real logarithm with , and is the least natural number at least , hence is for . The result is always at least , and equals when or when is non-Hermitian; no positivity assumption is imposed.
QAlgorithms.Papers.Independent.Advance50.P02.gaussianCenter
For every natural number and all real numbers , this defines the real number
No positivity assumption on or restriction on is imposed. The real square root is zero on negative arguments, and the real infimum is defined to be zero when its set is empty or unbounded below. The definition includes , when its value is zero.
QAlgorithms.Papers.Independent.Advance50.P02.identityTensor
For any index type with decidable equality, any index type , and any complex matrix indexed by , this definition returns the matrix indexed by whose entries are
No finiteness, positivity, or normalization assumption is required; either index type may be empty.
QAlgorithms.Papers.Independent.Advance50.P02.intervalInf
For arbitrary real endpoints and any function , this defines
where the values of are embedded in the extended reals before taking the infimum. No continuity, boundedness, or ordering of the endpoints is assumed. If , the set is empty and the result is ; on a nonempty interval the result can be .
QAlgorithms.Papers.Independent.Advance50.P02.intervalSup
For arbitrary real endpoints and any function , this defines
where the values of are embedded in the extended reals before taking the supremum. No continuity, boundedness, or ordering of the endpoints is assumed. If , the set is empty and the result is ; on a nonempty interval the result can be .
QAlgorithms.Papers.Independent.Advance50.P02.inverseRate
For an arbitrary family , real , and Boolean flag , this defines
where all suprema and limit inferiors are in the extended reals and the outer supremum ranges over all real sequences satisfying when is true, or when it is false. There is no monotonicity assumption on , and the sequences are not required to be bounded or to lie in . An empty inner threshold set has supremum , an unbounded one has supremum , and an empty outer feasible set also gives .
QAlgorithms.Papers.Independent.Advance50.P02.joinClassical
For index types and any family of complex matrices indexed by , this definition returns a matrix indexed by whose entries are
Equality of labels is decided classically. No positivity, normalization, or nonemptiness assumption is imposed.
QAlgorithms.Papers.Independent.Advance50.P02.labelCount
For finite index types and any family of complex matrices indexed by , this definition returns
It counts labels with strictly positive real trace. No positivity or normalization of the blocks is assumed, so a nonzero block with zero or negative real trace is not counted. The result is if or is empty.
QAlgorithms.Papers.Independent.Advance50.P02.liftIsometry
For index types and any complex matrix with rows indexed by and columns indexed by , this defines the matrix with rows indexed by and columns indexed by whose entries are
This is . The definition itself imposes no isometry assumption on , and permits empty index types.
QAlgorithms.Papers.Independent.Advance50.P02.lowProjector
For any finite index type with decidable equality, arbitrary complex matrices indexed by , and real , this defines the real self-adjoint functional calculus of with scalar function for and for . When is Hermitian, it is the orthogonal projector onto the sum of its eigenspaces with nonpositive eigenvalues, including the zero eigenspace. If is not Hermitian, the functional calculus returns the zero matrix. No positivity or normalization assumptions are imposed on or .
QAlgorithms.Papers.Independent.Advance50.P02.monotoneInverse
For any function and any real , this defines
with real embedded in the extended reals before taking the supremum. No monotonicity assumption is part of this definition. An empty feasible set gives , and a feasible set unbounded above gives .
QAlgorithms.Papers.Independent.Advance50.P02.negLog
For every real number , this defines an extended real value equal to when , and equal to otherwise. Negative are included: the scalar logarithm is the total real logarithm, for which when .
QAlgorithms.Papers.Independent.Advance50.P02.nsProbability
Let be any finite index type with decidable equality, and let be positive spectral presentations of complex matrices : their real values are nonnegative, their matrices satisfy , and , . This definition returns the real function on given by
There is no trace-one assumption, so normalization of this function as a probability distribution is not required. Empty is allowed.
QAlgorithms.Papers.Independent.Advance50.P02.nsReferenceWeight
Let be any finite index type with decidable equality, and let be positive spectral presentations of complex matrices : their real values are nonnegative, their matrices satisfy , and , . This definition returns the real function on given by
Neither matrix is required to have trace one, and the resulting weights need not sum to one. Empty is allowed.
QAlgorithms.Papers.Independent.Advance50.P02.nsSequence
Let specify finite index types with decidable equality and complex matrices for every . Suppose that, for each , supplies nonnegative real numbers and a square complex matrix satisfying and , and similarly supplies nonnegative and with and . The declaration constructs a new sequence on the finite registers , using classical decidable equality, whose two matrices are diagonal with respective diagonal entries
All off-diagonal entries are zero. Neither trace-one normalization nor nonempty registers are required, so these weights are not assumed to sum to .
QAlgorithms.Papers.Independent.Advance50.P02.nsSpectralPresentation
Let be any finite index type with decidable equality, let be a complex matrix indexed by , and let consist of nonnegative real values and a complex matrix satisfying and . This definition constructs spectral data whose value at is and whose vector indexed by has coordinate at . The resulting data record contains only these values and vectors. No trace normalization or nonemptiness of is assumed.
QAlgorithms.Papers.Independent.Advance50.P02.nsTensorP
For a finite type with decidable equality, complex matrices indexed by , and spectral presentations , satisfying , , , and , this defines a real number for every natural and every sequence :
The squared modulus is the complex norm squared. No trace normalization of either matrix is required. For , both products are empty products, has one element, and the defined value is , including when is empty.
QAlgorithms.Papers.Independent.Advance50.P02.nsTensorQ
For a finite type with decidable equality, complex matrices indexed by , and spectral presentations , satisfying , , , and , this defines a real number for every natural and every sequence :
The squared modulus is the complex norm squared. Neither matrix is assumed to have trace . At , the empty products and the single term indexed by give value , even for empty .
QAlgorithms.Papers.Independent.Advance50.P02.operationalTestingRate
Let consist of finite index types with decidable equality and arbitrary complex matrices on , for every . For an arbitrary real and Boolean parameter , consider every sequence for which both and are positive semidefinite. Define
where and for , using the total real logarithm. The declaration defines
The limits and supremum are taken in the extended reals. There is no requirement that or that the matrices are density matrices; an empty set of admissible test sequences has supremum .
QAlgorithms.Papers.Independent.Advance50.P02.optimizedEntropySequenceRate
For every function , real number , and Boolean , this defines
where the error condition is when , and when . All limits and the supremum are taken in the extended real numbers, and is embedded there before multiplication. The bounds hold for every , including zero; there are no further assumptions on or . If no admissible sequence exists, the value is ; in particular, this occurs in the strict case when .
QAlgorithms.Papers.Independent.Advance50.P02.pauliP
For every real number , this defines a real-valued function on by
There is no restriction on . The four values sum to , but they are all nonnegative only when .
QAlgorithms.Papers.Independent.Advance50.P02.pauliQ
For every real number , this defines a real-valued function on by and . There is no restriction on and no normalization requirement; the sum of its four values is .
QAlgorithms.Papers.Independent.Advance50.P02.positiveSpectralFactor
For a finite index type with decidable equality and any complex matrix indexed by , form , the set of distinct eigenvalues if is Hermitian and the empty set otherwise, and write . If is positive definite, this definition returns
otherwise it returns . Here is the least natural number at least , with value for ; empty real suprema and infima and have value . In particular, the result is whenever is empty.
QAlgorithms.Papers.Independent.Advance50.P02.positiveTraceSmoothedMinEntropy
For finite index types with decidable equality, any real , and any complex matrix indexed by , this definition returns the supremum in the extended real numbers of over all positive semidefinite matrices indexed by with , where if and is otherwise. For matrices , the quantity is the extended-real infimum of over matrices and real numbers satisfying , , , , and
Matrix square roots in this formula use the real continuous functional calculus, and real square roots return on negative arguments. No density-matrix assumption on or restriction on is imposed. An empty inner feasible set gives ; an empty outer set gives , as happens when is empty. For , every inner feasible set is empty and the result is .
QAlgorithms.Papers.Independent.Advance50.P02.processBlocks
For a finite label type , index types , a function , and any family of complex matrices indexed by , this definition returns the family indexed by given by
Equality in the condition is decided classically. No positivity or normalization is required. A label with no preimage receives the zero matrix; if is empty, every output block is zero.
QAlgorithms.Papers.Independent.Advance50.P02.quantumSpectrumRate
For every sequence of finite index types with decidable equality and complex matrices on , every real , and every Boolean , let
where is applied by the matrix functional calculus; in particular, its value at zero is . This definition is the extended-real supremum of all real such that
The limits are computed in the extended reals. No density-matrix assumptions are imposed here, and the supremum is if there are no qualifying real , or if they are unbounded above.
QAlgorithms.Papers.Independent.Advance50.P02.relativeMean
For any finite index type with decidable equality and arbitrary complex matrices indexed by , this defines
Here is the real self-adjoint functional calculus, returning zero on non-Hermitian inputs. The scalar logarithm is total, with and for negative . No positivity, normalization, or support inclusion is required. For empty , the value is zero.
QAlgorithms.Papers.Independent.Advance50.P02.smoothMaxEndpoint
For a finite index type with decidable equality, arbitrary complex matrices on , and any real , define
with the infimum taken in the extended reals over all matrices and real satisfying these conditions. Here
and matrix square roots use continuous functional calculus with the real square-root function. The declaration defines
Thus uses the second branch, as does every larger , whereas negative uses the first branch. No positivity or normalization is required of , and the real square roots and logarithms retain their total definitions; an empty feasible set in either extended-real infimum gives .
QAlgorithms.Papers.Independent.Advance50.P02.smoothedMaxRelativeEntropy
For any finite index type with decidable equality, real , and arbitrary complex matrices indexed by , this is the extended real infimum of over matrices and real numbers satisfying , , , , and
Here denotes the real self-adjoint functional calculus applied to , which returns zero for a non-Hermitian input, and real square roots of negative numbers are defined to be zero. Neither nor is required to be a density matrix. An empty feasible set gives ; in particular, this occurs when is empty.
QAlgorithms.Papers.Independent.Advance50.P02.spectralSpread
For a finite index type with decidable equality and any complex matrix indexed by , let be the finite set of its distinct real eigenvalues when is Hermitian, and let otherwise. This definition returns
The suprema and infima here are taken in , where the empty-set values used by these operations are both , and the real logarithm is total with . Thus the result is when is empty, including for non-Hermitian matrices and empty . No positivity assumption is imposed on or its eigenvalues.
QAlgorithms.Papers.Independent.Advance50.P02.spectrumEntropy
For any finite index type with decidable equality, real , and arbitrary complex matrices indexed by , this is
with the supremum taken in the extended real numbers. The functional calculus gives the projector onto the nonpositive eigenspaces when its input is Hermitian, including zero eigenvalues, and gives zero otherwise. No positivity, normalization, or restrictions on are assumed. An empty set gives , and a set unbounded above gives . For example, when , the value is if and if .
QAlgorithms.Papers.Independent.Advance50.P02.spectrumMass
For any finite index type with decidable equality, arbitrary complex matrices indexed by , and real , this defines
Here is the real self-adjoint functional calculus: for a Hermitian input, the indicated matrix projects onto its nonpositive eigenspaces, including its kernel; for a non-Hermitian input, it is zero. No density-matrix assumptions are required, so the defined real number is not required by the definition to be a probability.
QAlgorithms.Papers.Independent.Advance50.P02.supportedSpread
For a complex matrix indexed by a finite type with decidable equality, this defines
where is the finite set of distinct real eigenvalues if is Hermitian, and is empty otherwise; is the least strictly positive eigenvalue if one exists, and is otherwise. Both the supremum and the result are real-valued, with . Here , where and for nonzero real . No Hermitian, positivity, normalization, or nonemptiness hypothesis is required; in particular, a non-Hermitian matrix, a zero matrix, or a matrix on an empty index type has supported spread .
QAlgorithms.Papers.Independent.Advance50.P02.testError
For every sequence of finite index types with decidable equality and complex matrices on , every family for which and are positive semidefinite at every natural index, and every natural number , including zero, this defines the real number
There is no density-matrix assumption on , so the definition does not require this number to lie in ; for an empty , it equals zero.
QAlgorithms.Papers.Independent.Advance50.P02.testRate
Let specify, for each integer , a finite index type with decidable equality and two complex matrices indexed by . Let be a sequence of effects, meaning and are positive semidefinite for every . Put and define when , and otherwise, where uses the total real logarithm. The declaration defines the extended-real number
No positivity or normalization is required of , and the index types may be empty; in particular, need not be a probability. A zero value of contributes ; choosing every gives rate .
QAlgorithms.Papers.Independent.Advance50.P02.testingConverseRate
Let give finite index types with decidable equality and arbitrary complex matrices on , for all , and let . For each sequence of effects , where are positive semidefinite, write
with and otherwise, using the total real logarithm. The declaration defines
where the real thresholds are embedded into the extended reals and the infimum is taken there. Only finite real thresholds occur inside the set, although its infimum may be infinite; an empty set gives . No density or nonemptiness assumption is imposed on the registers.
QAlgorithms.Papers.Independent.Advance50.P02.thresholdRate
For an arbitrary family , real , and Boolean flag , this defines the extended-real value
The limits use the real values embedded in the extended reals, and each candidate is a fixed real number independent of . No monotonicity or boundedness assumption is imposed on . An empty feasible set gives , and an unbounded feasible set gives .
QAlgorithms.Papers.Independent.Advance50.P02.weightPower
For any type , natural number , and arbitrary real function , this definition assigns to each sequence the value
No finiteness, nonnegativity, or normalization assumption on or is required. When , the unique empty sequence has value one, including when is empty; when is empty and , there are no such sequences.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.