Exact Lean source
PCTCountMeasurementTensor
formalization/Cloning/PCTCountMeasurementTensor.lean
Source hash: 356cdbd65dbd91f21371bc1f908d3a7bd11442e7d822e390f00e1e6afd2cd640
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
definition
Cloning.PCTCountMeasurement.countWeighttheorem Cloning.PCTCountMeasurement.countWeight_nonnegtheorem Cloning.PCTCountMeasurement.countWeight_l1_contractiontheorem Cloning.PCTCountMeasurement.count_rootFidelity_letheorem Cloning.PCTCountMeasurement.countWeight_matrixTensorPowerdefinition Cloning.PCTCountMeasurement.stateProbabilitytheorem Cloning.PCTCountMeasurement.stateProbability_nonnegtheorem Cloning.PCTCountMeasurement.stateProbability_sumtheorem Cloning.PCTCountMeasurement.countWeight_tensorState1import Cloning.PCTCountMeasurementFidelity
2import Cloning.CountMultinomialPMF
3import Cloning.PCTPhysicalState
4
5/-! The literal computational count measurement of tensor-product states is
6the actual multinomial count PMF, with diagonal particle probabilities. -/
7noncomputable section
8open scoped BigOperators InnerProductSpace Matrix Classical ComplexOrder
9namespace Cloning.PCTCountMeasurement
10open Cloning.PCT Cloning.PCTReducedGaussian Cloning.InfiniteTraceClass Cloning.InfiniteFiniteCorner
11open TensorLie Cloning.GeneralSymmetricOccupation
12open Cloning.Hybrid Cloning.YoungGeneral Cloning.CountMultinomial Cloning.YoungMultinomial
13set_option backward.isDefEq.respectTransparency false
14set_option maxHeartbeats 1000000
15
16def countWeight (d N : ℕ) (A : TraceClass (TensorRegister N (Fin d))) (s : Shape d N) : ℝ :=
17 weightCLM (registerBasis (Word N d)) countShape s A
18
19theorem countWeight_nonneg (d N : ℕ) (A : TraceClass (TensorRegister N (Fin d))) (hA : 0≤A.1)
20 (s : Shape d N) : 0≤countWeight d N A s := weightCLM_nonneg _ _ _ A hA
21
22theorem countWeight_l1_contraction (d N : ℕ) (A B : TraceClass (TensorRegister N (Fin d)))
23 (hA : 0≤A.1) (hB : 0≤B.1) :
24 (∑ s, |countWeight d N A s-countWeight d N B s|) ≤ ‖A-B‖ := by
25 simpa only [countWeight, HilbertBasis.coe_toOrthonormalBasis] using
26 weightCLM_l1_contraction (registerBasis (Word N d)).toOrthonormalBasis countShape A B hA hB
27
28theorem count_rootFidelity_le (d N : ℕ) (A B : PositiveTraceClass (TensorRegister N (Fin d))) :
29 A.rootFidelity B ≤ ∑ s, Real.sqrt (countWeight d N A.1 s * countWeight d N B.1 s) :=
30 rootFidelity_le_measurement_affinity countShape A B
31
32theorem countWeight_matrixTensorPower (d N : ℕ) (ρ : Matrix (Fin d) (Fin d) ℂ)
33 (hρ : ρ.PosSemidef) (s : Shape d N) :
34 countWeight d N (matrixTensorPower ρ N) s =
35 ∑ w : Word N d, if countShape w=s then wordWeight (fun a => (ρ a a).re) w else 0 := by
36 have hdiag (w : Word N d) :
37 ⟪registerBasis (Word N d) w, (matrixTensorPower ρ N).1 (registerBasis (Word N d) w)⟫_ℂ =
38 ∏ i, ρ (w i) (w i) := by
39 change matrixOf (registerBasis (Word N d))
40 (ofMatrix (registerBasis (Word N d)) (fun a c => ∏ i, ρ (a i) (c i))) w w = _
41 rw [matrixOf_ofMatrix (registerBasis (Word N d)).orthonormal]
42 have hr a : ρ a a = ((ρ a a).re : ℂ) := by
43 have hp := Complex.nonneg_iff.mp (hρ.diag_nonneg (i := a))
44 apply Complex.ext <;> simp [hp.2]
45 unfold countWeight
46 rw [weightCLM_apply]
47 apply Finset.sum_congr rfl
48 intro w _
49 by_cases hw : countShape w=s
50 · simp only [if_pos hw, hdiag]
51 have he : (∏ i, ρ (w i) (w i)) = ∏ i, (((ρ (w i) (w i)).re : ℂ)) :=
52 Finset.prod_congr rfl (fun i _ => hr (w i))
53 rw [he, ← Complex.ofReal_prod, Complex.ofReal_re]
54 rfl
55 · simp only [if_neg hw]
56
57def stateProbability {d : ℕ} (ρ : Cloning.MatrixFidelity.State (Fin d)) (i : Fin d) : ℝ :=
58 (ρ.matrix i i).re
59
60theorem stateProbability_nonneg {d : ℕ} (ρ : Cloning.MatrixFidelity.State (Fin d)) (i : Fin d) :
61 0≤stateProbability ρ i := (Complex.nonneg_iff.mp (ρ.positive.diag_nonneg (i := i))).1
62
63theorem stateProbability_sum {d : ℕ} (ρ : Cloning.MatrixFidelity.State (Fin d)) :
64 ∑ i, stateProbability ρ i = 1 := by
65 simpa only [Matrix.trace, Matrix.diag, Complex.re_sum, Complex.one_re, stateProbability] using
66 congrArg Complex.re ρ.trace_one
67
68/-- Exact product-state count law, before any central limit approximation. -/
69theorem countWeight_tensorState {d : ℕ} (ρ : Cloning.MatrixFidelity.State (Fin (d+1)))
70 (N : ℕ) (s : Shape (d+1) N) :
71 countWeight (d+1) N (Cloning.PCTPhysicalState.tensorState ρ N).1 s =
72 (countPMF (d+1) N (stateProbability ρ) (stateProbability_nonneg ρ) (stateProbability_sum ρ) s).toReal := by
73 rw [countPMF_eq_sum]
74 exact countWeight_matrixTensorPower (d+1) N ρ.matrix ρ.positive s
75
76end Cloning.PCTCountMeasurement