Offline · exact source
Exact Lean source

PCTPurityFidelityPhysical

formalization/Cloning/PCTPurityFidelityPhysical.lean

Source hash: 8af52a8dcdca4ef08cae1dd777d39ba4e6a47542fb957b18a9fbb47aefb68962

Full source copied without mathematical changes from the snapshot whose input hash matches the passing audit. Select a line number for a stable source pointer.

The declarations belong to the compiled inventory covered by the project’s shared axiom audit. That audit records an aggregate union, without attributing axioms to individual declarations.

Declarations in this module
1import Cloning.PCTPurityFidelity
2import Cloning.PCTPurityFidelityMixture
3import Cloning.PCTCountMeasurementMixture
4import Cloning.PCTRankAdaptedFlat
5import Cloning.InfiniteFidelityHilbertSum
6import Cloning.MatrixTraceOrder
7 
8/-! The purity estimate applied to the literal Gaussian-frame tensor mixture.
9All finite normalization, positivity, matrix reconstruction, and overlap
10identities are derived here; no purity limit is assumed. -/
11noncomputable section
12open scoped BigOperators Matrix InnerProductSpace ComplexOrder
13open MeasureTheory
14namespace Cloning.PCTPurity
15open Cloning.PCT Cloning.PCTReducedGaussian Cloning.PCTPurificationChannel
16open Cloning.PCTPhysicalState Cloning.InfiniteTraceClass Cloning.InfiniteFiniteCorner
17open Cloning.Hybrid Cloning.PCTRankAdapted
18set_option backward.isDefEq.respectTransparency true
19set_option maxHeartbeats 250000
20variable {d s : ℕ}
21 
22abbrev Frame (d s : ℕ) := OrthonormalBasis (Fin (s+1)) ℂ (Register (Fin (d+1)×Fin (d+1)))
23 
24def frameMixtureMatrix (u : Frame d s) (μ : Measure (Fin s→ℂ)) (L : ℕ) :
25    Matrix (Fin L→Fin (d+1)) (Fin L→Fin (d+1)) ℂ :=
26  tensorMixtureMatrix μ (fun z => reducedDensityMatrix (frameParticle u z L)) L
27 
28theorem frameTensor_coefficient (u : Frame d s) (z : Fin s→ℂ) (L : ℕ)
29    (i j : Fin L→Fin (d+1)) :
30    traceClassMatrixCoefficient (registerBasis _ i) (registerBasis _ j) (frameState u z L).1=
31      tensorPower L (reducedDensityMatrix (frameParticle u z L)) i j := by
32  change matrixOf (registerBasis _) (ofMatrix (registerBasis _)
33    (tensorPower L (reducedDensityMatrix (frameParticle u z L)))) i j=_
34  rw [matrixOf_ofMatrix (registerBasis _).orthonormal]
35 
36theorem frameTensor_coefficient_integrable (u : Frame d s) (μ : Measure (Fin s→ℂ))
37    [IsFiniteMeasure μ] (L : ℕ) (i j : Fin L→Fin (d+1)) :
38    Integrable (fun z => tensorPower L (reducedDensityMatrix (frameParticle u z L)) i j) μ := by
39  simpa only [frameTensor_coefficient] using
40    (traceClassMatrixCoefficient (registerBasis _ i) (registerBasis _ j)).integrable_comp
41      (integrable_frameState u L μ)
42 
43theorem frameMixtureMatrix_eq_matrixOf (u : Frame d s) (μ : Measure (Fin s→ℂ))
44    [IsFiniteMeasure μ] (L : ℕ) :
45    frameMixtureMatrix u μ L=matrixOf (registerBasis _) (∫ z,(frameState u z L).1 ∂μ).1 := by
46  ext i j
47  have he := (traceClassMatrixCoefficient (registerBasis _ i) (registerBasis _ j)).integral_comp_comm
48    (integrable_frameState u L μ)
49  simp only [frameTensor_coefficient] at he
50  exact he
51 
52theorem frameMixtureMatrix_posSemidef (u : Frame d s) (μ : Measure (Fin s→ℂ))
53    [IsFiniteMeasure μ] (L : ℕ) : (frameMixtureMatrix u μ L).PosSemidef := by
54  rw [frameMixtureMatrix_eq_matrixOf]
55  exact matrixOf_posSemidef _ (Cloning.PCTCountMeasurement.integral_frameState_nonneg u L μ)
56 
57theorem frameMixtureMatrix_trace (u : Frame d s) (μ : Measure (Fin s→ℂ))
58    [IsProbabilityMeasure μ] (L : ℕ) : Matrix.trace (frameMixtureMatrix u μ L)=1 := by
59  change (∑ i,∫ z,tensorPower L (reducedDensityMatrix (frameParticle u z L)) i i ∂μ)=1
60  rw [←integral_finset_sum _ (fun i _ => frameTensor_coefficient_integrable u μ L i i)]
61  have ht z : (∑i,tensorPower L (reducedDensityMatrix (frameParticle u z L)) i i)=(1:ℂ) := by
62    change Matrix.trace (tensorPower L (reducedDensityMatrix (frameParticle u z L)))=1
63    rw [trace_tensorPower,trace_reducedDensityMatrix_complex,frameParticle_norm u.orthonormal]
64    norm_num
65  simp only [ht,integral_const,probReal_univ,one_smul]
66 
67def frameMixtureState (u : Frame d s) (μ : Measure (Fin s→ℂ))
68    [IsProbabilityMeasure μ] (L : ℕ) : Cloning.MatrixFidelity.State (Fin L→Fin (d+1)) where
69  matrix := frameMixtureMatrix u μ L
70  positive := frameMixtureMatrix_posSemidef u μ L
71  trace_one := frameMixtureMatrix_trace u μ L
72 
73def frameMixture (u : Frame d s) (μ : Measure (Fin s→ℂ)) [IsFiniteMeasure μ] (L : ℕ) :
74    PositiveTraceClass (Register (Fin L→Fin (d+1))) :=
75  ⟨∫ z,(frameState u z L).1 ∂μ,Cloning.PCTCountMeasurement.integral_frameState_nonneg u L μ⟩
76 
77theorem frameMixtureMatrix_purity (u : Frame d s) (μ : Measure (Fin s→ℂ))
78    [IsFiniteMeasure μ] (L : ℕ) :
79    (Matrix.trace (frameMixtureMatrix u μ L*frameMixtureMatrix u μ L)).re=
80      ∫ z,∫ w,(Matrix.trace (reducedDensityMatrix (frameParticle u z L)*
81        reducedDensityMatrix (frameParticle u w L))).re^L ∂μ ∂μ := by
82  apply tensorMixtureMatrix_purity_re μ _ L (frameTensor_coefficient_integrable u μ L)
83  intro z w
84  exact Cloning.MatrixFidelity.trace_mul_im_zero (reducedDensityMatrix_posSemidef _)
85    (reducedDensityMatrix_posSemidef _)
86 
87theorem frameMixtureMatrix_scaled_purity (u : Frame d s) (μ : Measure (Fin s→ℂ))
88    [IsFiniteMeasure μ] (L : ℕ) :
89    ((d+1:ℕ):ℝ)^L*(Matrix.trace (frameMixtureMatrix u μ L*frameMixtureMatrix u μ L)).re=
90      ∫ z,∫ w,(((d+1:ℕ):ℝ)*(Matrix.trace (reducedDensityMatrix (frameParticle u z L)*
91        reducedDensityMatrix (frameParticle u w L))).re)^L ∂μ ∂μ := by
92  rw [frameMixtureMatrix_purity]
93  simp_rw [mul_pow,integral_const_mul]
94 
95theorem flat_tensor_matrixOf (L : ℕ) :
96    matrixOf (registerBasis (Fin L→Fin (d+1))) (tensorState (flatInternalState d) L).1.1=
97      maximallyMixed (ι := Fin L→Fin (d+1)) := by
98  change matrixOf (registerBasis _) (ofMatrix (registerBasis _)
99    (tensorPower L (flatInternalState d).matrix))=_
100  rw [matrixOf_ofMatrix (registerBasis _).orthonormal,maximallyMixed_diagonal]
101  change tensorPower L (Matrix.diagonal (fun i : Fin (d+1) =>
102    (Cloning.YoungGeneral.flatSpectrum (d+1) i : ℂ)))=_
103  rw [tensorPower_diagonal]
104  ext i j
105  simp [Cloning.YoungGeneral.flatSpectrum,Complex.ofReal_pow,Complex.ofReal_add,Complex.ofReal_natCast]
106 
107theorem frameMixture_fidelity_purity_bound (u : Frame d s) (μ : Measure (Fin s→ℂ))
108    [IsProbabilityMeasure μ] (L : ℕ) :
109    1-((frameMixture u μ L).rootFidelity (tensorState (flatInternalState d) L))^2 ≤
110      (∫ z,∫ w,(((d+1:ℕ):ℝ)*(Matrix.trace (reducedDensityMatrix (frameParticle u z L)*
111        reducedDensityMatrix (frameParticle u w L))).re)^L ∂μ ∂μ)-1 := by
112  have h := fidelity_purity_bound (frameMixtureState u μ L)
113  have hF : Cloning.MatrixFidelity.fidelity (frameMixtureMatrix u μ L) maximallyMixed=
114      (frameMixture u μ L).rootFidelity (tensorState (flatInternalState d) L) := by
115    have hf := Cloning.InfiniteFidelityHilbertSum.rootFidelity_matrixOf_basis
116      (registerBasis (Fin L→Fin (d+1))).toOrthonormalBasis
117      (frameMixture u μ L) (tensorState (flatInternalState d) L)
118    simp only [HilbertBasis.coe_toOrthonormalBasis] at hf
119    have hM : matrixOf (registerBasis (Fin L→Fin (d+1))) (frameMixture u μ L).1.1=
120        frameMixtureMatrix u μ L := (frameMixtureMatrix_eq_matrixOf u μ L).symm
121    rw [hM,flat_tensor_matrixOf] at hf
122    exact hf
123  change 1-(Cloning.MatrixFidelity.fidelity (frameMixtureMatrix u μ L) maximallyMixed)^2≤_ at h
124  rw [hF] at h
125  simpa only [frameMixtureState,Fintype.card_fun,Fintype.card_fin,Nat.cast_pow,
126    frameMixtureMatrix_scaled_purity] using h
127 
128end Cloning.PCTPurity