Offline · exact source
Exact Lean source

TensorFlatProjectorStateFidelity

formalization/Cloning/TensorFlatProjectorStateFidelity.lean

Source hash: 576d4d68ef53b41ab4396038ced442774eda9458e3ce73d76465692333e31d62

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.TensorFlatProjectorGibbsState
2import Cloning.TensorCloningTransitionCovariance
3 
4/-! Exact flat-state fidelity for the actual compatible physical transition channel. -/
5noncomputable section
6open scoped BigOperators InnerProductSpace ComplexOrder Matrix
7namespace Cloning.TensorLie
8open Cloning.PCT Cloning.InfiniteTraceClass Cloning.InfiniteFiniteCorner Cloning.Hybrid
9open Cloning.TensorCloning Cloning.YoungDimensionRatio
10set_option maxHeartbeats 1800000
11set_option synthInstance.maxHeartbeats 200000
12set_option backward.isDefEq.respectTransparency false
13variable {d r : ℕ}
14local instance (n d : ℕ) : FiniteDimensional ℂ (TensorRegister n (Fin d)) :=
15  (registerBasis (Fin n → Fin d)).toOrthonormalBasis.toBasis.finiteDimensional_of_finite
16 
17theorem nonnegativePartitionGibbsPositive_support_transport {k : ℕ}
18    (mu nu : Fin (r+k) → ℕ) (hmu : Antitone mu) (hnu : Antitone nu) (he : mu=nu)
19    (c : ℝ) (hc : 0 ≤ c)
20    (hm : nonnegativePartitionGibbsPositive mu hmu (rankFlatSpectrum r k) (rankFlatSpectrum_nonneg r k) =
21      partitionMatrixState mu hmu (c • partitionCoordinateProjection mu hmu)
22        ((partitionCoordinateProjection_posSemidef mu hmu).smul hc)) :
23    nonnegativePartitionGibbsPositive nu hnu (rankFlatSpectrum r k) (rankFlatSpectrum_nonneg r k) =
24      partitionMatrixState nu hnu (c • partitionCoordinateProjection nu hnu)
25        ((partitionCoordinateProjection_posSemidef nu hnu).smul hc) := by
26  subst nu
27  exact hm
28 
29/-- The general Gibbs family at a sum of padded partitions has the exact
30normalized support matrix in the physical output Hilbert space. -/
31theorem nonnegativePartitionGibbsPositive_pad_sum (mu nu : Fin r → ℕ) (hmu : Antitone mu) (hnu : Antitone nu)
32    (k : ℕ) (hr : 0 < r) :
33    nonnegativePartitionGibbsPositive (fun a => padPartition mu k a + padPartition nu k a)
34      (sumPartition_antitone _ _ (padPartition_antitone mu hmu k) (padPartition_antitone nu hnu k))
35      (rankFlatSpectrum r k) (rankFlatSpectrum_nonneg r k) =
36      partitionMatrixState _ (sumPartition_antitone _ _ (padPartition_antitone mu hmu k) (padPartition_antitone nu hnu k))
37        ((1/(partitionDimension (fun a => mu a+nu a) (sumPartition_antitone mu nu hmu hnu) : ℝ)) •
38          partitionCoordinateProjection _ (sumPartition_antitone _ _ (padPartition_antitone mu hmu k) (padPartition_antitone nu hnu k)))
39        ((partitionCoordinateProjection_posSemidef _ _).smul (by positivity)) := by
40  exact nonnegativePartitionGibbsPositive_support_transport _ _
41    (padPartition_antitone _ (sumPartition_antitone mu nu hmu hnu) k)
42    (sumPartition_antitone _ _ (padPartition_antitone mu hmu k) (padPartition_antitone nu hnu k))
43    (padPartition_add mu nu k) _ (by positivity)
44    (nonnegativePartitionGibbsPositive_pad_rankFlat _ (sumPartition_antitone mu nu hmu hnu) k hr)
45 
46/-- Exact physical fidelity for the all-input compatible transition, with
47all normalizations and representation data constructed internally. -/
48theorem partitionTransition_rankFlat_fidelity (mu lam : Fin r → ℕ)
49    (hmu : Antitone mu) (hlam : Antitone lam) (hc : PartitionCompatible mu lam)
50    (k : ℕ) (hr : 0 < r) :
51    ((nonnegativePartitionGibbsPositive (padPartition mu k) (padPartition_antitone mu hmu k)
52        (rankFlatSpectrum r k) (rankFlatSpectrum_nonneg r k)).map
53      (partitionTransitionChannel (padPartition mu k) (padPartition lam k)
54        (padPartition_antitone mu hmu k) (padPartition_antitone lam hlam k)).toPositiveTracePreservingMap).rootFidelity
55      (nonnegativePartitionGibbsPositive (padPartition lam k) (padPartition_antitone lam hlam k)
56        (rankFlatSpectrum r k) (rankFlatSpectrum_nonneg r k)) =
57      Real.sqrt (dimensionRatio r k (fun a => (mu a : ℝ)) / dimensionRatio r k (fun a => (lam a : ℝ))) := by
58  have hsum : (fun a => mu a+(lam a-mu a)) = lam := funext (fun a => Nat.add_sub_of_le (hc.1 a))
59  have hadd (nu : Fin r → ℕ) (hnu : Antitone nu) :
60      ((nonnegativePartitionGibbsPositive (padPartition mu k) (padPartition_antitone mu hmu k)
61          (rankFlatSpectrum r k) (rankFlatSpectrum_nonneg r k)).map
62        (partitionTransitionChannel (padPartition mu k) (padPartition (fun a => mu a+nu a) k)
63          (padPartition_antitone mu hmu k) (padPartition_antitone _ (sumPartition_antitone mu nu hmu hnu) k)).toPositiveTracePreservingMap).rootFidelity
64        (nonnegativePartitionGibbsPositive (padPartition (fun a => mu a+nu a) k)
65          (padPartition_antitone _ (sumPartition_antitone mu nu hmu hnu) k)
66          (rankFlatSpectrum r k) (rankFlatSpectrum_nonneg r k)) =
67        Real.sqrt (dimensionRatio r k (fun a => (mu a : ℝ)) /
68          dimensionRatio r k (fun a => ((mu a+nu a : ℕ) : ℝ))) := by
69    let P (v : {v : Fin (r+k) → ℕ // Antitone v}) : Prop :=
70      ((nonnegativePartitionGibbsPositive (padPartition mu k) (padPartition_antitone mu hmu k)
71          (rankFlatSpectrum r k) (rankFlatSpectrum_nonneg r k)).map
72        (partitionTransitionChannel (padPartition mu k) v.val (padPartition_antitone mu hmu k) v.property).toPositiveTracePreservingMap).rootFidelity
73        (nonnegativePartitionGibbsPositive v.val v.property (rankFlatSpectrum r k) (rankFlatSpectrum_nonneg r k)) =
74        Real.sqrt (dimensionRatio r k (fun a => (mu a : ℝ)) /
75          dimensionRatio r k (fun a => ((mu a+nu a : ℕ) : ℝ)))
76    have hh : P ⟨(fun a => padPartition mu k a + padPartition nu k a),
77        sumPartition_antitone _ _ (padPartition_antitone mu hmu k) (padPartition_antitone nu hnu k)⟩ := by
78      dsimp only [P]
79      rw [partitionTransitionChannel_add, nonnegativePartitionGibbsPositive_pad_sum mu nu hmu hnu k hr,
80        nonnegativePartitionGibbsPositive_pad_rankFlat mu hmu k hr]
81      change ((partitionMatrixState _ _ _ _).map _).rootFidelity _ = _
82      rw [physicalCartanChannel_partitionMatrix_fidelity]
83      exact physicalCartanMatrixChannel_rankFlat_fidelity mu nu hmu hnu k
84    have he : (⟨(fun a => padPartition mu k a + padPartition nu k a),
85        sumPartition_antitone _ _ (padPartition_antitone mu hmu k) (padPartition_antitone nu hnu k)⟩ :
86        {v : Fin (r+k) → ℕ // Antitone v}) =
87        ⟨padPartition (fun a => mu a+nu a) k,padPartition_antitone _ (sumPartition_antitone mu nu hmu hnu) k⟩ :=
88      Subtype.ext (padPartition_add mu nu k).symm
89    exact Eq.mp (congrArg P he) hh
90  let P (v : {v : Fin r → ℕ // Antitone v}) : Prop :=
91    ((nonnegativePartitionGibbsPositive (padPartition mu k) (padPartition_antitone mu hmu k)
92        (rankFlatSpectrum r k) (rankFlatSpectrum_nonneg r k)).map
93      (partitionTransitionChannel (padPartition mu k) (padPartition v.val k)
94        (padPartition_antitone mu hmu k) (padPartition_antitone v.val v.property k)).toPositiveTracePreservingMap).rootFidelity
95      (nonnegativePartitionGibbsPositive (padPartition v.val k) (padPartition_antitone v.val v.property k)
96        (rankFlatSpectrum r k) (rankFlatSpectrum_nonneg r k)) =
97      Real.sqrt (dimensionRatio r k (fun a => (mu a : ℝ)) / dimensionRatio r k (fun a => (v.val a : ℝ)))
98  have he : (⟨(fun a => mu a+(lam a-mu a)),sumPartition_antitone mu _ hmu hc.2⟩ :
99      {v : Fin r → ℕ // Antitone v}) = ⟨lam,hlam⟩ := Subtype.ext hsum
100  exact Eq.mp (congrArg P he) (hadd _ hc.2)
101 
102end Cloning.TensorLie