Offline · exact source
Exact Lean source

PCTPhysicalState

formalization/Cloning/PCTPhysicalState.lean

Source hash: 44ee813d8916b24ac7153e40e8492059706d61c51772d6aa332ff29bca58984d

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.PCTGlobalPhysical
2import Cloning.PCTTangentChartFrame
3import Cloning.PCTMixedMixtureTransfer
4import Cloning.MatrixFidelityScaling
5 
6/-! Concrete normalized positive tensor states used in the physical PCT
7comparison. No positivity, normalization, or integrability premise is hidden
8in the statistical-model packaging. -/
9noncomputable section
10open scoped BigOperators Matrix MatrixOrder Matrix.Norms.L2Operator InnerProductSpace ComplexOrder Topology
11open MeasureTheory Filter Cloning.InfiniteTraceClass Cloning.Hybrid
12namespace Cloning.PCTPhysicalState
13open Cloning.PCT Cloning.PCTReducedGaussian Cloning.PCTPurificationChannel
14open Cloning.InfiniteFiniteCorner
15set_option backward.isDefEq.respectTransparency false
16set_option maxHeartbeats 1000000
17variable {A : Type*} [Fintype A] [DecidableEq A] [Nonempty A]
18 
19def diagonalState (p : A → ℝ) (hp : ∀ i, 0 ≤ p i) (hs : ∑ i, p i = 1) :
20    Cloning.MatrixFidelity.State A where
21  matrix := Matrix.diagonal (fun i => (p i : ℂ))
22  positive := Matrix.PosSemidef.diagonal (fun i => Complex.nonneg_iff.mpr ⟨hp i, rfl⟩)
23  trace_one := by rw [Matrix.trace_diagonal, ← Complex.ofReal_sum, hs, Complex.ofReal_one]
24 
25theorem canonicalPurification_diagonal (p : A → ℝ) (hp : ∀ i, 0 ≤ p i) :
26    canonicalPurification (Matrix.diagonal (fun i => (p i : ℂ))) =
27      coefficientVector (schmidtCoefficients p) := by
28  rw [canonicalPurification, Cloning.MatrixFidelity.sqrt_diagonal_real p hp]
29  rfl
30 
31theorem tensorPower_posSemidef (ρ : Matrix A A ℂ) (hρ : ρ.PosSemidef) (L : ℕ) :
32    (tensorPower L ρ).PosSemidef := by
33  have h : ρ = CFC.sqrt ρ * (CFC.sqrt ρ)ᴴ := by
34    rw [Cloning.MatrixFidelity.sqrt_conjTranspose, Cloning.MatrixFidelity.sqrt_mul_self hρ]
35  rw [h, tensorPower_mul, tensorPower_star]
36  exact Matrix.posSemidef_self_mul_conjTranspose _
37 
38@[simp] theorem matrixTensorPower_eq_registerLift (ρ : Matrix A A ℂ) (L : ℕ) :
39    matrixTensorPower ρ L = registerLiftCLM (tensorPower L ρ) := rfl
40 
41def tensorState (ρ : Cloning.MatrixFidelity.State A) (L : ℕ) :
42    PositiveTraceClass (Register (Fin L → A)) :=
43  ⟨matrixTensorPower ρ.matrix L,
44    ofMatrix_nonneg (registerBasis _).orthonormal (tensorPower_posSemidef _ ρ.positive L)⟩
45 
46@[simp] theorem norm_tensorState (ρ : Cloning.MatrixFidelity.State A) (L : ℕ) :
47    ‖(tensorState ρ L).1‖ = 1 := by
48  rw [TraceClass.norm_eq_trace_re_of_nonneg _ (tensorState ρ L).2]
49  change (trace (ofMatrix (registerBasis _) (tensorPower L ρ.matrix)) _).re = 1
50  rw [trace_ofMatrix (registerBasis _).orthonormal, trace_tensorPower, ρ.trace_one, one_pow]
51  rfl
52 
53theorem reducedDensityMatrix_posSemidef (ψ : Register (A × A)) :
54    (reducedDensityMatrix ψ).PosSemidef := by
55  let M : Matrix A A ℂ := fun a b => ψ (a,b)
56  have he : reducedDensityMatrix ψ = M * Mᴴ := by
57    ext a b
58    simp only [M, reducedDensityMatrix, Matrix.mul_apply, Matrix.conjTranspose_apply]
59  rw [he]
60  exact Matrix.posSemidef_self_mul_conjTranspose _
61 
62theorem trace_reducedDensityMatrix_complex (ψ : Register (A × A)) :
63    Matrix.trace (reducedDensityMatrix ψ) = ((‖ψ‖ ^ 2 : ℝ) : ℂ) := by
64  calc
65    _ = ⟪ψ,ψ⟫_ℂ := by
66      simp only [reducedDensityMatrix, Matrix.trace, Matrix.diag, lp.inner_eq_tsum,
67        tsum_fintype, Fintype.sum_prod_type, RCLike.inner_apply, Complex.star_def]
68    _ = _ := by rw [inner_self_eq_norm_sq_to_K]; push_cast; rfl
69 
70def reducedState (ψ : Register (A × A)) (hψ : ‖ψ‖ = 1) : Cloning.MatrixFidelity.State A where
71  matrix := reducedDensityMatrix ψ
72  positive := reducedDensityMatrix_posSemidef ψ
73  trace_one := by rw [trace_reducedDensityMatrix_complex, hψ]; norm_num
74 
75def frameState {s : ℕ} (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (A × A)))
76    (z : Fin s → ℂ) (L : ℕ) : PositiveTraceClass (Register (Fin L → A)) :=
77  tensorState (reducedState (frameParticle u z L) (frameParticle_norm u.orthonormal z L)) L
78 
79@[simp] theorem frameState_val {s : ℕ}
80    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (A × A))) (z : Fin s → ℂ) (L : ℕ) :
81    (frameState u z L).1 = matrixTensorPower (reducedDensityMatrix (frameParticle u z L)) L := rfl
82 
83@[simp] theorem norm_frameState {s : ℕ}
84    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (A × A))) (z : Fin s → ℂ) (L : ℕ) :
85    ‖(frameState u z L).1‖ = 1 := norm_tensorState _ _
86 
87theorem integrable_frameState {s : ℕ}
88    (u : OrthonormalBasis (Fin (s+1)) ℂ (Register (A × A))) (L : ℕ)
89    (ν : Measure (Fin s → ℂ)) [IsFiniteMeasure ν] :
90    Integrable (fun z => (frameState u z L).1) ν :=
91  integrable_reduced_product_mixture u.orthonormal L ν
92 
93def outputState {s : ℕ} (hcard : Fintype.card (A × A) = s+1)
94    (ρ : Cloning.MatrixFidelity.State A) (n r : ℕ) :
95    PositiveTraceClass (Register (Fin (n+r) → A)) :=
96  (tensorState ρ n).map (Cloning.PCTGlobal.channel hcard n r).toPositiveTracePreservingMap
97 
98@[simp] theorem norm_outputState {s : ℕ} (hcard : Fintype.card (A × A) = s+1)
99    (ρ : Cloning.MatrixFidelity.State A) (n r : ℕ) : ‖(outputState hcard ρ n r).1‖ = 1 := by
100  rw [outputState, PositiveTraceClass.norm_map, norm_tensorState]
101 
102end Cloning.PCTPhysicalState