Exact Lean source
MatrixFidelityTensor
formalization/Cloning/MatrixFidelityTensor.lean
Source hash: 76f50b213098b65ed0f84138b4ea736f7659bba3d57e51d47f6797a9171fcc9d
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.MatrixFidelity
2
3/-!
4# Tensor products for concrete finite-dimensional root fidelity
5
6The square-root and fidelity identities below apply to positive semidefinite
7complex matrices; no abstract fidelity axioms are assumed.
8-/
9
10noncomputable section
11
12open scoped MatrixOrder ComplexOrder Kronecker
13
14namespace Cloning.MatrixFidelity
15
16set_option backward.isDefEq.respectTransparency false
17
18variable {m n : Type*} [Fintype m] [Fintype n] [DecidableEq m] [DecidableEq n]
19
20/-- The positive square root preserves Kronecker products. -/
21theorem sqrt_kronecker {A : Matrix m m ℂ} {B : Matrix n n ℂ}
22 (hA : A.PosSemidef) (hB : B.PosSemidef) :
23 CFC.sqrt (A ⊗ₖ B) = CFC.sqrt A ⊗ₖ CFC.sqrt B := by
24 apply CFC.sqrt_unique
25 · rw [← Matrix.mul_kronecker_mul, sqrt_mul_self hA, sqrt_mul_self hB]
26 · exact ((sqrt_posSemidef A).kronecker (sqrt_posSemidef B)).nonneg
27
28/-- Root Uhlmann fidelity is multiplicative under tensor products. -/
29theorem fidelity_kronecker {A B : Matrix m m ℂ} {C D : Matrix n n ℂ}
30 (hA : A.PosSemidef) (hB : B.PosSemidef)
31 (hC : C.PosSemidef) (hD : D.PosSemidef) :
32 fidelity (A ⊗ₖ C) (B ⊗ₖ D) = fidelity A B * fidelity C D := by
33 have hAB := sandwich_posSemidef hA B
34 have hCD := sandwich_posSemidef hC D
35 have him : (Matrix.trace (CFC.sqrt (CFC.sqrt B * A * CFC.sqrt B))).im = 0 :=
36 trace_im_zero (sqrt_posSemidef _)
37 unfold fidelity
38 rw [sqrt_kronecker hB hD, ← Matrix.mul_kronecker_mul, ← Matrix.mul_kronecker_mul,
39 sqrt_kronecker hAB hCD, Matrix.trace_kronecker, Complex.mul_re, him]
40 simp
41
42/-- Tensoring both inputs with the same normalized ancilla preserves fidelity. -/
43theorem fidelity_common_ancilla {A B : Matrix m m ℂ} {T : Matrix n n ℂ}
44 (hA : A.PosSemidef) (hB : B.PosSemidef) (hT : T.PosSemidef)
45 (htrace : (Matrix.trace T).re = 1) :
46 fidelity (A ⊗ₖ T) (B ⊗ₖ T) = fidelity A B := by
47 rw [fidelity_kronecker hA hB hT hT, fidelity_self hT, htrace, mul_one]
48
49/-- The same cancellation when the ancilla is placed first. -/
50theorem fidelity_common_ancilla_left {A B : Matrix m m ℂ} {T : Matrix n n ℂ}
51 (hA : A.PosSemidef) (hB : B.PosSemidef) (hT : T.PosSemidef)
52 (htrace : (Matrix.trace T).re = 1) :
53 fidelity (T ⊗ₖ A) (T ⊗ₖ B) = fidelity A B := by
54 rw [fidelity_kronecker hT hT hA hB, fidelity_self hT, htrace, one_mul]
55
56end Cloning.MatrixFidelity