Exact Lean source
PCTCountMeasurementChannel
formalization/Cloning/PCTCountMeasurementChannel.lean
Source hash: ce7d76ee46ef6209db18fe667c723f4ffa760acc5175046339bdd1741f87f9e3
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.measurementKraustheorem Cloning.PCTCountMeasurement.measurementKraus_gramtheorem Cloning.PCTCountMeasurement.measurementKraus_normalizationdefinition Cloning.PCTCountMeasurement.measuredMatrixtheorem Cloning.PCTCountMeasurement.measurementKraus_sandwichtheorem Cloning.PCTCountMeasurement.measurement_krausMapdefinition Cloning.PCTCountMeasurement.measurementChanneltheorem Cloning.PCTCountMeasurement.measurementChannel_registerLifttheorem Cloning.PCTCountMeasurement.registerLift_matrixOftheorem Cloning.PCTCountMeasurement.measurementChannel_apply1import Cloning.PCTCountMeasurementWeights
2import Cloning.FiniteKrausLift
3import Cloning.InfiniteChannelFidelity
4
5/-! The finite computational measurement followed by a deterministic label is
6an explicit all-input CPTP map, with literal rectangular Kraus matrices. -/
7noncomputable section
8open scoped BigOperators InnerProductSpace Matrix Classical ComplexOrder
9namespace Cloning.PCTCountMeasurement
10open Cloning.PCT Cloning.PCTPurificationChannel Cloning.InfiniteTraceClass Cloning.InfiniteFiniteCorner
11set_option backward.isDefEq.respectTransparency false
12set_option maxHeartbeats 1000000
13variable {I J : Type*} [Fintype I] [Fintype J] [DecidableEq I] [DecidableEq J]
14
15def measurementKraus (label : I → J) (i : I) : Matrix J I ℂ :=
16 fun a b => if a=label i then (if b=i then 1 else 0) else 0
17
18theorem measurementKraus_gram (label : I → J) (i a b : I) :
19 ((measurementKraus label i)ᴴ * measurementKraus label i) a b =
20 if a=i ∧ b=i then 1 else 0 := by
21 by_cases ha : a=i <;> by_cases hb : b=i <;>
22 simp [measurementKraus, Matrix.mul_apply, Matrix.conjTranspose_apply, ha, hb]
23
24theorem measurementKraus_normalization (label : I → J) :
25 ∑ i, (measurementKraus label i)ᴴ * measurementKraus label i = 1 := by
26 ext a b
27 simp only [Matrix.sum_apply, measurementKraus_gram, Matrix.one_apply]
28 by_cases hab : a=b
29 · subst b; simp
30 · rw [if_neg hab]
31 apply Finset.sum_eq_zero
32 intro i _
33 have h : ¬(a=i ∧ b=i) := by rintro ⟨rfl,rfl⟩; exact hab rfl
34 exact if_neg h
35
36def measuredMatrix (label : I → J) (M : Matrix I I ℂ) : Matrix J J ℂ :=
37 Matrix.diagonal (fun j => ∑ i, if label i=j then M i i else 0)
38
39theorem measurementKraus_sandwich (label : I → J) (i : I) (M : Matrix I I ℂ) (a b : J) :
40 (measurementKraus label i * M * (measurementKraus label i)ᴴ) a b =
41 if a=label i ∧ b=label i then M i i else 0 := by
42 have hl (c : I) : (measurementKraus label i * M) a c = if a=label i then M i c else 0 := by
43 by_cases ha : a=label i <;> simp [measurementKraus, Matrix.mul_apply, ha]
44 simp only [Matrix.mul_apply, hl, Matrix.conjTranspose_apply]
45 by_cases ha : a=label i <;> by_cases hb : b=label i <;>
46 simp [measurementKraus, ha, hb]
47
48theorem measurement_krausMap (label : I → J) (M : Matrix I I ℂ) :
49 Cloning.Channels.krausMap (measurementKraus label) M = measuredMatrix label M := by
50 ext a b
51 simp only [Cloning.Channels.krausMap, Matrix.sum_apply, measurementKraus_sandwich,
52 measuredMatrix, Matrix.diagonal_apply]
53 by_cases hab : a=b
54 · subst b
55 simp only [if_true, and_self]
56 apply Finset.sum_congr rfl
57 intro i _
58 by_cases hi : a=label i <;> simp [hi, eq_comm]
59 · rw [if_neg hab]
60 apply Finset.sum_eq_zero
61 intro i _
62 have h : ¬(a=label i ∧ b=label i) := by rintro ⟨rfl,rfl⟩; exact hab rfl
63 exact if_neg h
64
65/-- An actual finite classical register measurement channel. -/
66def measurementChannel (label : I → J) : QuantumChannel (Register I) (Register J) :=
67 FiniteKrausLift.channel (measurementKraus label) (measurementKraus_normalization label)
68
69theorem measurementChannel_registerLift (label : I → J) (M : Matrix I I ℂ) :
70 (measurementChannel label).toLinearMap (registerLiftCLM M) = registerLiftCLM (measuredMatrix label M) := by
71 rw [measurementChannel, FiniteKrausLift.channel_registerLiftCLM, measurement_krausMap]
72
73theorem registerLift_matrixOf (A : TraceClass (Register I)) :
74 registerLiftCLM (matrixOf (registerBasis I) A.1) = A := by
75 change matrixLift (registerBasis I) (matrixOf (registerBasis I) A.1) = A
76 simpa only [HilbertBasis.coe_toOrthonormalBasis] using
77 Cloning.InfiniteFidelityHilbertSum.matrixLift_basis_matrixOf (registerBasis I).toOrthonormalBasis A
78
79theorem measurementChannel_apply (label : I → J) (A : TraceClass (Register I)) :
80 (measurementChannel label).toLinearMap A =
81 registerLiftCLM (measuredMatrix label (matrixOf (registerBasis I) A.1)) := by
82 conv_lhs => rw [← registerLift_matrixOf A]
83 exact measurementChannel_registerLift label _
84
85end Cloning.PCTCountMeasurement