Definitions for Quantum hypothesis testing and sufficient subalgebras
DefinitionQAlgorithms_Papers_Independent_Intake100_P71The objects the formalized statements of Quantum hypothesis testing and sufficient subalgebras (arXiv:0810.4045) are stated in. Each was checked against the paper by a blind read-back and a moderator.
generalizedExpectation: PDF p.4, (1): the computed Accardi--Cecchini expectation, not a free map.fixedDomain: PDF p.4: the fixed points of the computed generalized expectation.Sufficient: PDF pp.3,6: ONE intrinsic completely positive trace-preserving recovery recovers BOTH restricted densities. Its canonical ambient extension is R.typeIError: PDF p.7: alpha is the probability of rejecting the null rho0.typeIIError: PDF p.7: beta is the probability of accepting the null under rho1.bayesRisk: PDF p.7, (3): prior lambda on rho0, prior 1-lambda on rho1.NeymanPearson: PDF pp.7,9: every competing EFFECT is compared in the threshold objective. At t=0 this definition still applies; no prior in (0,1) is attached to t=0.TwoSufficient: PDF pp.3,9: for every test and every prior, SOME effect in A does no worse. The witness depends on the prior and test. The abstract's all-tests phrase is not the quantified definition used in the paper.minimalBayesError: PDF pp.8,10: infimum over all effects in A. With densities and a prior in (0,1), the domain contains 0 and is compact; risks lie in [0,1]. Off-domain empty/unbounded real-infimum defaults are not used in any statement.belavkinStaszewski: PDF p.5: S_BS(rho1,rho0), in nats, with weight rho0 and x log x applied to d_(rho0,rho1). The accepted derivative takes arguments (rho1,rho0).elementaryTensor: PDF pp.12--13: an elementary tensor with possibly DIFFERENT factors.tensorPowerSubalgebra: PDF pp.12--13: the concrete star algebra generated by all elementary tensors from A. Its effects include collective tests, not only product tests. The empty tensor is canonical, but Theorem 6 uses only positive copy counts.TwoNSufficient: PDF p.13: testing sufficiency in the genuine tensor algebra for n copies.ModularInvariant: PDF p.11, Theorem 5(1): invariance under the entire modular group.CommutativeAlgebra: PDF pp.11--12: commutativity of ALL pairs of elements of the subalgebra.
import Mathlib
import Definitions.Def_QAlgorithms_Defs_Information
import Definitions.Def_QAlgorithms_Defs_MatrixDistances
import Definitions.Def_QAlgorithms_Papers_Independent_Bridge50_P31
/-! Anna Jencova, Quantum hypothesis testing and sufficient subalgebras,
arXiv:0810.4045v2. Citations below use PDF page numbers. The finite index is
arbitrary and nonempty. Traces are ordinary representation traces. All density
arguments in the statements are positive and faithful, including identical pairs.
Background deferrals and source corrections are recorded in the assigned unit.
Compilation is pending the explicitly authorized batch handoff. -/
noncomputable section
namespace QAlgorithms.Papers.Independent.Intake100.P71
open scoped Matrix ComplexOrder ComplexConjugate BigOperators
open QAlgorithms.Papers.Independent.Information100.P60 (Mat copies)
open QAlgorithms.Papers.Independent.Information100.P30 (MatrixMap)
open QAlgorithms.Papers.Independent.Information100.P71 (supportPower)
open QAlgorithms.Papers.Independent.Support50.P12 (Alg)
open QAlgorithms.Papers.Independent.Dependency50.P28 (tr LE)
open QAlgorithms.Papers.Independent.Dependency50.P21 (imaginaryPower)
open QAlgorithms.Papers.Independent.Bridge50.P31
(traceConditionalExpectation stateDual algebraMultiplicativeDomain fixedPoints
AlgebraChannel derivative weightedPair positiveTest kernelTest)
attribute [local instance] Classical.propDecidable Classical.decEq
variable {I : Type} [Fintype I] [DecidableEq I] [nonemptyI : Nonempty I]
/-- PDF p.4, (1): the computed Accardi--Cecchini expectation, not a free map. -/
abbrev generalizedExpectation (A : Alg I) (rho : Mat I) : Mat I → Mat I :=
stateDual ((traceConditionalExpectation Set.univ (A : Set (Mat I)))) rho
/-- PDF p.4: the fixed points of the computed generalized expectation. -/
abbrev fixedDomain (A : Alg I) (rho : Mat I) : Set (Mat I) :=
fixedPoints Set.univ (generalizedExpectation A rho)
/-- PDF pp.3,6: ONE intrinsic completely positive trace-preserving recovery
recovers BOTH restricted densities. Its canonical ambient extension is R. -/
def Sufficient (A : Alg I) (rho0 rho1 : Mat I) : Prop :=
∃ R : MatrixMap I I, AlgebraChannel A (⊤ : Alg I) R ∧
R ((traceConditionalExpectation Set.univ (A : Set (Mat I))) rho0) = rho0 ∧ R ((traceConditionalExpectation Set.univ (A : Set (Mat I))) rho1) = rho1
/-- PDF p.7: alpha is the probability of rejecting the null rho0. -/
def typeIError (rho0 M : Mat I) : ℝ := tr (rho0 * M)
/-- PDF p.7: beta is the probability of accepting the null under rho1. -/
def typeIIError (rho1 M : Mat I) : ℝ := tr (rho1 * (1 - M))
/-- PDF p.7, (3): prior lambda on rho0, prior 1-lambda on rho1. -/
def bayesRisk (rho0 rho1 : Mat I) (lam : ℝ) (M : Mat I) : ℝ :=
lam * typeIError rho0 M + (1 - lam) * typeIIError rho1 M
/-- PDF pp.7,9: every competing EFFECT is compared in the threshold objective.
At t=0 this definition still applies; no prior in (0,1) is attached to t=0. -/
def NeymanPearson (rho0 rho1 : Mat I) (t : ℝ) (M : Mat I) : Prop :=
IsEffect M ∧ ∀ N : Mat I, IsEffect N →
tr ((rho1 - (t : ℂ) • rho0) * N) ≤ tr ((rho1 - (t : ℂ) • rho0) * M)
/-- PDF pp.3,9: for every test and every prior, SOME effect in A does no worse.
The witness depends on the prior and test. The abstract's all-tests phrase is
not the quantified definition used in the paper. -/
def TwoSufficient (A : Alg I) (rho0 rho1 : Mat I) : Prop :=
∀ M : Mat I, IsEffect M → ∀ lam : ℝ, 0 < lam → lam < 1 →
∃ N : Mat I, N ∈ A ∧ IsEffect N ∧
bayesRisk rho0 rho1 lam N ≤ bayesRisk rho0 rho1 lam M
/-- PDF pp.8,10: infimum over all effects in A. With densities and a prior in
(0,1), the domain contains 0 and is compact; risks lie in [0,1]. Off-domain
empty/unbounded real-infimum defaults are not used in any statement. -/
def minimalBayesError (A : Alg I) (rho0 rho1 : Mat I) (lam : ℝ) : ℝ :=
sInf {r : ℝ | ∃ M : Mat I, M ∈ A ∧ IsEffect M ∧
r = bayesRisk rho0 rho1 lam M}
/-- PDF p.5: S_BS(rho1,rho0), in nats, with weight rho0 and x log x applied
to d_(rho0,rho1). The accepted derivative takes arguments (rho1,rho0). -/
def belavkinStaszewski (rho1 rho0 : Mat I) : ℝ :=
tr (rho0 * cfc (fun x : ℝ => x * Real.log x) (derivative rho1 rho0))
/-- PDF pp.12--13: an elementary tensor with possibly DIFFERENT factors. -/
def elementaryTensor {n : ℕ} (X : Fin n → Mat I) : Mat (Fin n → I) :=
Matrix.of fun x y => ∏ i, X i (x i) (y i)
/-- PDF pp.12--13: the concrete star algebra generated by all elementary
tensors from A. Its effects include collective tests, not only product tests.
The empty tensor is canonical, but Theorem 6 uses only positive copy counts. -/
def tensorPowerSubalgebra (A : Alg I) (n : ℕ) : Alg (Fin n → I) :=
StarAlgebra.adjoin ℂ {Z | ∃ X : Fin n → Mat I,
(∀ i, X i ∈ A) ∧ Z = elementaryTensor X}
/-- PDF p.13: testing sufficiency in the genuine tensor algebra for n copies. -/
def TwoNSufficient (A : Alg I) (rho0 rho1 : Mat I) (n : ℕ) : Prop :=
TwoSufficient (tensorPowerSubalgebra A n) (copies n rho0) (copies n rho1)
/-- PDF p.11, Theorem 5(1): invariance under the entire modular group. -/
def ModularInvariant (A : Alg I) (rho : Mat I) : Prop :=
∀ t : ℝ, ∀ X : Mat I, X ∈ A →
imaginaryPower rho t * X * imaginaryPower rho (-t) ∈ A
/-- PDF pp.11--12: commutativity of ALL pairs of elements of the subalgebra. -/
def CommutativeAlgebra (A : Alg I) : Prop :=
∀ X : Mat I, X ∈ A → ∀ Y : Mat I, Y ∈ A → X * Y = Y * X
/-! Sanity examples for the new interfaces. These are small checks, not proofs
of the paper's results. The unit's moderation notes give additional hand checks. -/
example (rho : Mat I) : typeIError rho 0 = 0 := by
simp [typeIError, tr]
example (rho : Mat I) (h : IsDensityMatrix rho) : typeIError rho 1 = 1 := by
simp [typeIError, tr, h.2]
example (rho : Mat I) : typeIIError rho 1 = 0 := by
simp [typeIIError, tr]
example (rho : Mat I) (h : IsDensityMatrix rho) : typeIIError rho 0 = 1 := by
simp [typeIIError, tr, h.2]
example (rho0 rho1 : Mat I) (h : IsDensityMatrix rho1) (lam : ℝ) :
bayesRisk rho0 rho1 lam 0 = 1 - lam := by
simp [bayesRisk, typeIError, typeIIError, tr, h.2]
example (rho : Mat I) (M : Mat I) (hM : IsEffect M) :
NeymanPearson rho rho 1 M := by
refine ⟨hM, ?_⟩
intro N hN
simp [tr]
example (rho0 rho1 : Mat I) : TwoSufficient (⊤ : Alg I) rho0 rho1 := by
intro M hM lam hpos hlt
exact ⟨M, by simp, hM, le_rfl⟩
example (A : Alg I) (rho0 rho1 : Mat I) (R : MatrixMap I I)
(hR : AlgebraChannel A (⊤ : Alg I) R)
(h0 : R ((traceConditionalExpectation Set.univ (A : Set (Mat I))) rho0) = rho0)
(h1 : R ((traceConditionalExpectation Set.univ (A : Set (Mat I))) rho1) = rho1) : Sufficient A rho0 rho1 := by
exact ⟨R, hR, h0, h1⟩
example {n : ℕ} (rho : Mat I) :
elementaryTensor (fun _ : Fin n => rho) = copies n rho := by
rfl
example (X : Fin 0 → Mat I) (x y : Fin 0 → I) :
elementaryTensor X x y = 1 := by
simp [elementaryTensor]
example (A : Alg I) {n : ℕ} (X : Fin n → Mat I) (hX : ∀ i, X i ∈ A) :
elementaryTensor X ∈ tensorPowerSubalgebra A n := by
exact StarAlgebra.subset_adjoin ℂ _ ⟨X, hX, rfl⟩
example (A : Alg I) (rho : Mat I) : generalizedExpectation A rho 0 = 0 := by
simp [generalizedExpectation, stateDual]
example (A : Alg I) (rho : Mat I) : (0 : Mat I) ∈ fixedDomain A rho := by
simp [fixedDomain, fixedPoints, generalizedExpectation, stateDual]
example (A : Alg I) (rho : Mat I) : (0 : Mat I) ∈ (algebraMultiplicativeDomain Set.univ (generalizedExpectation A rho)) := by
simp [algebraMultiplicativeDomain, generalizedExpectation, stateDual]
example : belavkinStaszewski (1 : Mat (Fin 1)) 1 = 0 := by
simp [belavkinStaszewski, derivative, supportPower, tr, cfc_one]
example (A : Alg I) (rho0 rho1 : Mat I) :
TwoNSufficient A rho0 rho1 1 ↔
TwoSufficient (tensorPowerSubalgebra A 1) (copies 1 rho0) (copies 1 rho1) := by
rfl
include nonemptyI
end QAlgorithms.Papers.Independent.Intake100.P71
Read-back
What the Lean code literally says, in plain math · gpt-6.1-sol
QAlgorithms.Papers.Independent.Intake100.P71.CommutativeAlgebra
For every finite type with decidable equality and every unital complex star subalgebra of the matrices on , the property defined here says that every two matrices belonging to commute:
It imposes this condition on all elements of , without restricting them to Hermitian or positive matrices, and it also permits an empty index type .
QAlgorithms.Papers.Independent.Intake100.P71.ModularInvariant
Let be a finite type with decidable equality, a unital complex star subalgebra of the matrices on , and an arbitrary complex matrix on . For each real , define to be zero if is not Hermitian; otherwise, using a unitary diagonalization of , replace each eigenvalue by when and by when , where is the total real logarithm, and conjugate the resulting diagonal matrix back. The property defined here is
There is no density-matrix or invertibility assumption on . Zero eigenvalues receive multiplier zero even at ; if is not Hermitian, the condition holds because every displayed product is zero.
QAlgorithms.Papers.Independent.Intake100.P71.NeymanPearson
For any finite type with decidable equality, arbitrary matrices , and any real , the Neyman–Pearson predicate means that and are positive semidefinite and that, for every matrix such that and are positive semidefinite,
Thus the comparison is a non-strict maximization over all effects. There is no normalization or positivity assumption on , no sign restriction on , and no uniqueness assertion. Empty is included, with both trace expressions equal to .
QAlgorithms.Papers.Independent.Intake100.P71.Sufficient
For any finite type with decidable equality, any unital complex star subalgebra , and arbitrary matrices , choose by classical choice among complex-linear maps that map every matrix into , preserve positive semidefiniteness and trace, fix pointwise, and satisfy for every matrix and , with an unspecified choice if no such map exists. Sufficiency means that there exists a complex-linear map such that its Hilbert–Schmidt adjoint maps every matrix into , preserves trace on , and, for every natural number , applying to each block of any positive semidefinite matrix indexed by whose blocks lie in produces a positive semidefinite matrix, and such that
Here the adjoint is explicitly , with the matrix unit. No density-matrix assumptions are imposed on ; the amplification condition includes , and may be empty.
QAlgorithms.Papers.Independent.Intake100.P71.TwoNSufficient
Let be a finite type with decidable equality, let be a unital complex star subalgebra of the matrices on , let be arbitrary complex matrices on , and let , including . Write for the functions , define , and let be the unital complex star subalgebra generated by all matrices with every . The property defined here says that, for every matrix on satisfying and , and every real , there exists a matrix satisfying , , and
No positivity or normalization of is required. At , the index set is a singleton and both empty tensor products are the scalar matrix .
QAlgorithms.Papers.Independent.Intake100.P71.TwoSufficient
For any finite type with decidable equality, any unital complex star subalgebra , and arbitrary matrices , two-sufficiency means that for every matrix with positive semidefinite and every real satisfying , there exists a matrix with positive semidefinite such that
The choice of may depend on both and . The endpoint weights are excluded, neither is assumed to be a density matrix, and may be empty.
QAlgorithms.Papers.Independent.Intake100.P71.bayesRisk
For any finite type with decidable equality, arbitrary matrices , and any real number , the Bayes risk is defined by
Neither matrix positivity nor trace normalization is assumed, and is unrestricted, including values outside . If is empty, the value is .
QAlgorithms.Papers.Independent.Intake100.P71.belavkinStaszewski
For any finite type with decidable equality and arbitrary matrices , put
where the support inverse square root is the continuous functional calculus of at and otherwise. The defined value is
with also taken by continuous functional calculus and the real natural logarithm. No positivity, normalization, invertibility, or support-inclusion assumptions are imposed, and there is no separate infinite-value branch for support failure. The real logarithm uses its total convention ; empty is allowed and yields .
QAlgorithms.Papers.Independent.Intake100.P71.elementaryTensor
For any finite type with decidable equality, any natural number , and any family of arbitrary matrices in , the elementary tensor is the matrix indexed by functions , with entries
There are no positivity or normalization requirements on the factors. For , the function index set has one element and the empty product is , so the result is the matrix , even if is empty; if is empty and , the matrix has an empty index set.
QAlgorithms.Papers.Independent.Intake100.P71.fixedDomain
For any finite type with decidable equality, any unital complex star subalgebra , and any matrix , choose by classical choice among complex-linear maps that map all matrices into , preserve positive semidefiniteness and trace, fix pointwise, and satisfy for all matrices and , with an unspecified choice if no such map exists. The fixed domain is the set
where applies by continuous functional calculus the function when , and otherwise. Membership does not additionally require . Neither nor is assumed positive or normalized, and may be empty.
QAlgorithms.Papers.Independent.Intake100.P71.generalizedExpectation
For any finite type with decidable equality, any unital complex star subalgebra , and any matrix , choose by classical choice among complex-linear maps on that map every matrix into , preserve positive semidefiniteness and trace, fix every element of , and satisfy for every matrix and all ; this choice is an unspecified value if no such map exists. The generalized expectation is the function
where denotes the continuous functional calculus of the real function that is at and otherwise. No positivity, trace normalization, or invertibility of is assumed; zero spectral values contribute even for the negative exponent. The type may be empty.
QAlgorithms.Papers.Independent.Intake100.P71.minimalBayesError
For any finite type with decidable equality, any unital complex star subalgebra , arbitrary matrices , and any real , the minimal Bayes error is the real infimum
The definition uses an infimum and does not itself supply a minimizing matrix. The feasible set contains the zero matrix. No positivity or normalization is required of , and need not belong to . Empty is permitted and gives value .
QAlgorithms.Papers.Independent.Intake100.P71.tensorPowerSubalgebra
For any finite type with decidable equality, any unital complex star subalgebra , and any natural number , the tensor-power subalgebra is the unital complex star subalgebra of matrices indexed by functions generated by all matrices for which there is a family satisfying
Equivalently, it is the smallest unital complex star subalgebra containing these matrices. The factors may be chosen independently and need not be positive or normalized. The case is included: its empty product is the scalar matrix , and the generated algebra is all complex matrices. Empty is also allowed.
QAlgorithms.Papers.Independent.Intake100.P71.typeIError
For any finite type with decidable equality and any complex matrices , the type I error is defined to be
There is no assumption that is a density matrix or that is positive semidefinite or bounded above by the identity, so this definition does not impose a probability range. Empty is allowed, in which case the value is .
QAlgorithms.Papers.Independent.Intake100.P71.typeIIError
For any finite type with decidable equality and any complex matrices , the type II error is defined to be
where is the identity matrix. No density-matrix or effect assumptions are imposed, so the value is not required by the definition to lie in . Empty is allowed, giving value .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.