Offline · exact source
Exact Lean source

TensorCloningPrescribedTrace

formalization/Cloning/TensorCloningPrescribedTrace.lean

Source hash: 7112d8f5ff5da4bd0f0257bb461a87ab561681bd8ee09b25355bd167ceebc760

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.PCTCountMeasurementChannel
2import Cloning.PCTRankAdaptedPartialTrace
3import Cloning.MatrixPartialTraceCovariance
4 
5/-! Literal finite-register partial trace after a computational relabeling. -/
6noncomputable section
7open scoped BigOperators InnerProductSpace ComplexOrder Matrix Kronecker Classical
8namespace Cloning.TensorCloning
9open Cloning.PCT Cloning.InfiniteTraceClass Cloning.InfiniteFiniteCorner
10open Cloning.PCTPurificationChannel Cloning.FiniteKrausLift Cloning.Compression
11set_option backward.isDefEq.respectTransparency false
12set_option maxHeartbeats 1000000
13variable {I J A B : Type*} [Fintype I] [Fintype J] [Fintype A] [Fintype B]
14  [DecidableEq I] [DecidableEq J] [DecidableEq A] [DecidableEq B]
15 
16def relabelIsometry (e : I ≃ J) : Register I →ₗᵢ[ℂ] Register J :=
17  ((registerBasis J).orthonormal.comp e e.injective).orthogonalFamily.linearIsometry
18 
19@[simp] theorem relabelIsometry_single (e : I ≃ J) (i : I) :
20    relabelIsometry e (lp.single 2 i 1)=lp.single 2 (e i) 1 := by
21  rw [relabelIsometry, OrthogonalFamily.linearIsometry_apply_single]
22  simp only [LinearIsometry.toSpanSingleton_apply,one_smul,Function.comp_apply,registerBasis_apply]
23 
24@[simp] theorem relabelIsometry_apply (e : I ≃ J) (x : Register I) (j : J) :
25    relabelIsometry e x j=x (e.symm j) := by
26  rw [relabelIsometry, OrthogonalFamily.linearIsometry_apply, tsum_fintype]
27  simp only [Function.comp_apply, LinearIsometry.toSpanSingleton_apply, registerBasis_apply,
28    lp.coeFn_sum, Finset.sum_apply, lp.coeFn_smul, Pi.smul_apply, smul_eq_mul,
29    lp.single_apply, Pi.single_apply]
30  have he i : j=e i ↔ i=e.symm j := by rw [eq_comm, e.apply_eq_iff_eq_symm_apply]
31  simp only [he, mul_ite, mul_one, mul_zero, Finset.sum_ite_eq', Finset.mem_univ, if_true]
32 
33theorem relabelIsometry_adjoint_single (e : I ≃ J) (j : J) :
34    (relabelIsometry e).toContinuousLinearMap.adjoint (lp.single 2 j 1)=lp.single 2 (e.symm j) 1 := by
35  have he : lp.single 2 j 1=relabelIsometry e (lp.single 2 (e.symm j) 1) := by simp
36  rw [he, isometry_adjoint_apply_self]
37 
38theorem relabel_registerLift (e : I ≃ J) (X : Matrix I I ℂ) :
39    conjugationLinearMap (relabelIsometry e).toContinuousLinearMap (registerLiftCLM X)=
40      registerLiftCLM (fun a b => X (e.symm a) (e.symm b)) := by
41  apply Subtype.ext
42  apply register_operator_ext
43  intro a b
44  change relabelIsometry e ((registerLiftCLM X).1
45    ((relabelIsometry e).toContinuousLinearMap.adjoint (lp.single 2 b 1))) a = _
46  rw [relabelIsometry_adjoint_single, relabelIsometry_apply, registerLiftCLM_coefficient,
47    registerLiftCLM_coefficient]
48 
49def discardChannel (e : I ≃ A × B) : QuantumChannel (Register I) (Register A) :=
50  partialTraceChannel.comp (QuantumChannel.ofIsometry (relabelIsometry e))
51 
52theorem discardChannel_registerLift (e : I ≃ A × B) (X : Matrix I I ℂ) :
53    (discardChannel e).toLinearMap (registerLiftCLM X)=
54      registerLiftCLM (partialTrace (fun a b => X (e.symm a) (e.symm b))) := by
55  change partialTraceLinear (conjugationLinearMap (relabelIsometry e).toContinuousLinearMap
56    (registerLiftCLM X))=_
57  rw [relabel_registerLift, Cloning.PCTRankAdapted.partialTraceLinear_registerLift]
58 
59theorem discardChannel_coefficient (e : I ≃ A × B) (X : TraceClass (Register I)) (a c : A) :
60    ((discardChannel e).toLinearMap X).1 (lp.single 2 c 1) a=
61      ∑ b, X.1 (lp.single 2 (e.symm (c,b)) 1) (e.symm (a,b)) := by
62  change (partialTraceLinear (conjugationLinearMap (relabelIsometry e).toContinuousLinearMap X)).1
63    (lp.single 2 c 1) a=_
64  rw [partialTraceLinear_coefficient]
65  apply Finset.sum_congr rfl
66  intro b _
67  change relabelIsometry e (X.1 ((relabelIsometry e).toContinuousLinearMap.adjoint
68    (lp.single 2 (c,b) 1))) (a,b)=_
69  rw [relabelIsometry_adjoint_single,relabelIsometry_apply]
70 
71theorem discardChannel_covariant (e : I ≃ A × B) (U : Matrix I I ℂ)
72    (S : Matrix A A ℂ) (T : Matrix B B ℂ) (hT : Tᴴ*T=1)
73    (hU : U.submatrix e.symm e.symm = S ⊗ₖ T) (X : TraceClass (Register I)) :
74    (discardChannel e).toLinearMap (conjugationLinearMap (matrixRegister U) X)=
75      conjugationLinearMap (matrixRegister S) ((discardChannel e).toLinearMap X) := by
76  have hX := Cloning.PCTCountMeasurement.registerLift_matrixOf X
77  rw [← hX,conjugation_matrixRegister,discardChannel_registerLift,
78    discardChannel_registerLift,conjugation_matrixRegister]
79  congr 1
80  have hm (M N : Matrix I I ℂ) : (M*N).submatrix e.symm e.symm=
81      M.submatrix e.symm e.symm * N.submatrix e.symm e.symm :=
82    (Matrix.submatrix_mul_equiv M N e.symm e.symm e.symm).symm
83  have hs : Uᴴ.submatrix e.symm e.symm=(U.submatrix e.symm e.symm)ᴴ := rfl
84  change partialTrace ((U * matrixOf (registerBasis I) X.1 * Uᴴ).submatrix e.symm e.symm)=_
85  rw [hm,hm,hs,hU,partialTrace_tensor_conjugation S T _ hT]
86  rfl
87 
88end Cloning.TensorCloning