Exact Lean source
Nonadditivity.ComplementaryAdjoint
Download original .lean · View on GitHub · Jump to source
Direct imports
Nonadditivity.BlockConstructionMathlib.Tactic.Ringdependency
Imported by project modules
2 direct reverse imports
Relationships above come from literal import commands. The declarations below link to types and references extracted from Lean’s environment. Source text is complete and unchanged.
Declarations in this module
25 project constants, including generated, internal and private declarations.
25 declarations
Nonadditivity.BlockConstruction.blockOutputEquiv.congr_simpNonadditivity.Channels.KrausChannel.blockChannel_adjoint_eq_tensor_polynomialNonadditivity.Channels.KrausChannel.blockComplementary_adjoint_eq_tensor_polynomialNonadditivity.Channels.KrausChannel.complementary_adjointMap_eq_gramNonadditivity.Channels.KrausChannel.reindex_output_adjointMapNonadditivity.Channels.KrausChannel.tensorChain_complementaryNonadditivity.Channels.KrausChannel.tensorChain_uniform_krausNonadditivity.Channels.KrausChannel.tensorWordNonadditivity.Channels.KrausChannel.tensorWord._sunfoldinternal/detail/privateNonadditivity.Channels.KrausChannel.tensorWord._unsafe_recinternal/detail/privateNonadditivity.Channels.KrausChannel.tensorWord.congr_simpNonadditivity.Channels.KrausChannel.tensorWord.eq_1internal/detail/privateNonadditivity.Channels.KrausChannel.tensorWord.eq_2internal/detail/privateNonadditivity.Channels.KrausChannel.tensorWord.eq_defNonadditivity.Channels.KrausChannel.tensorWord.match_1internal/detail/privateNonadditivity.Channels.KrausChannel.uniformUnitary.congr_simpNonadditivity.Channels.KrausChannel.uniformUnitary.eq_1internal/detail/privateNonadditivity.Channels.KrausChannel.uniformUnitary_kraus_gramNonadditivity.Channels.KrausChannel.uniform_complementary_adjoint_eq_polynomialNonadditivity.Channels.KrausChannel.uniform_complementary_map_entryNonadditivity.Channels.KrausChannel.uniform_complementary_output_entry_private.Nonadditivity.ComplementaryAdjoint.0.Nonadditivity.Channels.KrausChannel.sqrt_weight_productinternal/detail/private_private.Nonadditivity.ComplementaryAdjoint.0.Nonadditivity.Channels.KrausChannel.tensorWord.match_1.eq_1internal/detail/private_private.Nonadditivity.ComplementaryAdjoint.0.Nonadditivity.Channels.KrausChannel.tensorWord.match_1.eq_2internal/detail/private_private.Nonadditivity.ComplementaryAdjoint.0.Nonadditivity.Channels.KrausChannel.tensorWord.match_1.splitterinternal/detail/private
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.BlockConstruction7import Mathlib.Tactic.Ring89/-!10# The actual complementary adjoint polynomial1112This proves the manuscript's Gram channel and polynomial formula from the13actual Kraus implementation. The indices can be arbitrary finite types,14including the tensor-word index set used for blocks.15-/1617noncomputable section1819namespace Nonadditivity.Channels.KrausChannel2021open Nonadditivity.Entropy22open scoped Matrix BigOperators ComplexConjugate2324variable {ι ο κ : Type*} [Fintype ι] [DecidableEq ι]25[Fintype ο] [Fintype κ]2627/-- Complementary adjoints are Gram-polynomial evaluations in the Kraus28operators. This is a matrix identity, including rectangular Kraus families. -/29theorem complementary_adjointMap_eq_gram (T : KrausChannel ι ο κ)30(A : Matrix κ κ ℂ) :31T.complementary.adjointMap A =32∑ a, ∑ b, A a b • ((T.kraus a).conjTranspose * T.kraus b) := by33ext i j34simp only [adjointMap, complementary, Matrix.sum_apply, Matrix.smul_apply,35Matrix.mul_apply, Matrix.conjTranspose_apply, smul_eq_mul, Finset.sum_mul, Finset.mul_sum]36calc37(∑ o, ∑ b, ∑ a, star (T.kraus a o i) * A a b * T.kraus b o j) =38∑ o, ∑ a, ∑ b, A a b * (star (T.kraus a o i) * T.kraus b o j) := by39apply Finset.sum_congr rfl40intro o _41rw [Finset.sum_comm]42apply Finset.sum_congr rfl43intro a _44apply Finset.sum_congr rfl45intro b _46ring47_ = ∑ a, ∑ b, ∑ o, A a b * (star (T.kraus a o i) * T.kraus b o j) := by48rw [Finset.sum_comm]49apply Finset.sum_congr rfl50intro a _51rw [Finset.sum_comm]5253variable [Nonempty κ]5455private theorem sqrt_weight_product (p : ℝ) (hp : 0 ≤ p) :56star (Real.sqrt p : ℂ) * (Real.sqrt p : ℂ) = (p : ℂ) := by57rw [Complex.star_def, Complex.conj_ofReal, ← Complex.ofReal_mul, Real.mul_self_sqrt hp]5859/-- The Gram entries of a uniform unitary family carry exactly the factor60`1 / card κ`, proved from the positive square-root Kraus weights. -/61theorem uniformUnitary_kraus_gram (U : κ → unitary (Matrix ι ι ℂ)) (a b : κ) :62((uniformUnitary U).kraus a).conjTranspose * (uniformUnitary U).kraus b =63(1 / (Fintype.card κ : ℂ)) •64((U a : Matrix ι ι ℂ).conjTranspose * (U b : Matrix ι ι ℂ)) := by65simp only [uniformUnitary, randomUnitary, Matrix.conjTranspose_smul,66Matrix.smul_mul, Matrix.mul_smul, smul_smul]67rw [mul_comm (Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ)]68rw [sqrt_weight_product _ (by positivity : 0 ≤ 1 / (Fintype.card κ : ℝ))]69simp only [Complex.ofReal_div, Complex.ofReal_one, Complex.ofReal_natCast]7071/-- The exact polynomial `Γ_N(A)` of the manuscript, with the normalization72and word orientation established from the concrete complementary channel. -/73theorem uniform_complementary_adjoint_eq_polynomial74(U : κ → unitary (Matrix ι ι ℂ)) (A : Matrix κ κ ℂ) :75(uniformUnitary U).complementary.adjointMap A =76(1 / (Fintype.card κ : ℂ)) •77∑ a, ∑ b, A a b •78((U a : Matrix ι ι ℂ).conjTranspose * (U b : Matrix ι ι ℂ)) := by79rw [complementary_adjointMap_eq_gram]80simp_rw [uniformUnitary_kraus_gram]81simp only [Finset.smul_sum, smul_smul]82apply Finset.sum_congr rfl83intro a _84apply Finset.sum_congr rfl85intro b _86rw [mul_comm (A a b)]8788/-- The actual complementary Gram-channel entries are the specified input89overlaps, with the correct order `U_bᴴ U_a`. -/90theorem uniform_complementary_map_entry91(U : κ → unitary (Matrix ι ι ℂ)) (X : Matrix ι ι ℂ) (a b : κ) :92((uniformUnitary U).complementary.map X) a b =93(1 / (Fintype.card κ : ℂ)) *94(X * (U b : Matrix ι ι ℂ).conjTranspose * (U a : Matrix ι ι ℂ)).trace := by95rw [complementary_map_entry]96simp only [uniformUnitary, randomUnitary, Matrix.conjTranspose_smul,97Matrix.smul_mul, Matrix.mul_smul, Matrix.trace_smul, smul_smul, smul_eq_mul]98rw [sqrt_weight_product _ (by positivity : 0 ≤ 1 / (Fintype.card κ : ℝ))]99rw [Matrix.trace_mul_cycle, Matrix.trace_mul_comm]100simp only [Complex.ofReal_div, Complex.ofReal_one, Complex.ofReal_natCast, Matrix.mul_assoc]101102/-- The same formula for the output of an actual density matrix. -/103theorem uniform_complementary_output_entry [DecidableEq κ]104(U : κ → unitary (Matrix ι ι ℂ)) (ρ : DensityMatrix ι) (a b : κ) :105((uniformUnitary U).complementary.output ρ).matrix a b =106(1 / (Fintype.card κ : ℂ)) *107(ρ.matrix * (U b : Matrix ι ι ℂ).conjTranspose * (U a : Matrix ι ι ℂ)).trace :=108uniform_complementary_map_entry U ρ.matrix a b109110open Nonadditivity.Entropy111open scoped Kronecker112113omit [Nonempty κ] in114/-- Complementing a concrete tensor block gives the tensor block of the115complementary channels, as actual Kraus-channel data. -/116theorem tensorChain_complementary [DecidableEq ο] [DecidableEq κ]117(T : ℕ → KrausChannel ι ο κ) (n : ℕ) :118(tensorChain T n).complementary = tensorChain (fun j => (T j).complementary) n := by119induction n with120| zero =>121apply KrausChannel.ext122funext k123ext a b124simp [tensorChain, emptyTensorChannel, complementary]125| succ n ih =>126change ((tensorChain T n).tensor (T n)).complementary =127(tensorChain (fun j => (T j).complementary) n).tensor (T n).complementary128have hswap : ((tensorChain T n).tensor (T n)).complementary =129(tensorChain T n).complementary.tensor (T n).complementary := by130apply KrausChannel.ext131rfl132rw [hswap, ih]133134/-- Tensor words in the actual block Hilbert space, retaining the ordered135recursively nested branch indices. -/136def tensorWord [DecidableEq κ] (U : ℕ → κ → unitary (Matrix ι ι ℂ)) :137(n : ℕ) → TensorChainIndex κ n →138Matrix (TensorChainIndex ι n) (TensorChainIndex ι n) ℂ139| 0, _ => 1140| n + 1, a => tensorWord U n a.1 ⊗ₖ (U n a.2 : Matrix ι ι ℂ)141142/-- The actual tensor-unitary Kraus operators are exactly the tensor words143times the product of their normalized square-root branch weights. -/144theorem tensorChain_uniform_kraus [DecidableEq κ]145(U : ℕ → κ → unitary (Matrix ι ι ℂ)) (n : ℕ) (a : TensorChainIndex κ n) :146(tensorChain (fun j => uniformUnitary (U j)) n).kraus a =147(Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ) ^ n • tensorWord U n a := by148induction n with149| zero =>150ext i j151cases i152cases j153simp [tensorChain, emptyTensorChannel, tensorWord]154rfl155| succ n ih =>156rcases a with ⟨a,b⟩157change (tensorChain (fun j => uniformUnitary (U j)) n).kraus a ⊗ₖ158(uniformUnitary (U n)).kraus b = _159rw [ih]160simp only [uniformUnitary, randomUnitary, tensorWord, Matrix.smul_kronecker,161Matrix.kronecker_smul, smul_smul, pow_succ]162rw [mul_comm]163rfl164165/-- The precise normalized polynomial for the actual complementary tensor166block, before standardizing its output labels. -/167theorem blockComplementary_adjoint_eq_tensor_polynomial [DecidableEq κ]168(U : ℕ → κ → unitary (Matrix ι ι ℂ)) (n : ℕ)169(A : Matrix (TensorChainIndex κ n) (TensorChainIndex κ n) ℂ) :170(Nonadditivity.BlockBell.blockComplementary U n).adjointMap A =171(1 / (Fintype.card κ : ℂ)) ^ n •172∑ a, ∑ b, A a b •173((tensorWord U n a).conjTranspose * tensorWord U n b) := by174change (tensorChain (fun j => (uniformUnitary (U j)).complementary) n).adjointMap A = _175rw [← tensorChain_complementary, complementary_adjointMap_eq_gram]176simp_rw [tensorChain_uniform_kraus]177have hweight :178(Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ) ^ n *179star ((Real.sqrt (1 / (Fintype.card κ : ℝ)) : ℂ) ^ n) =180(1 / (Fintype.card κ : ℂ)) ^ n := by181rw [star_pow, ← mul_pow, mul_comm]182rw [sqrt_weight_product _ (by positivity : 0 ≤ 1 / (Fintype.card κ : ℝ))]183simp only [Complex.ofReal_div, Complex.ofReal_one, Complex.ofReal_natCast]184simp only [Matrix.conjTranspose_smul, Matrix.smul_mul, Matrix.mul_smul,185smul_smul, hweight, Finset.smul_sum]186apply Finset.sum_congr rfl187intro a _188apply Finset.sum_congr rfl189intro b _190rw [mul_comm (A a b)]191192omit [Nonempty κ] in193/-- Changing only the output labels pulls the observable back by that194same equivalence. This is proved from the Kraus adjoint formula. -/195theorem reindex_output_adjointMap {ν : Type*} [Fintype ν]196(T : KrausChannel ι ο κ) (e : ο ≃ ν) (A : Matrix ν ν ℂ) :197(T.reindex (Equiv.refl ι) e).adjointMap A =198T.adjointMap (A.submatrix e e) := by199have hA : (A.submatrix e e).submatrix e.symm e.symm = A := by200ext i j201simp202conv_lhs => rw [← hA]203simp only [adjointMap, reindex, Matrix.conjTranspose_submatrix,204Matrix.submatrix_mul_equiv]205rfl206207/-- The exact normalized tensor-word polynomial of the manuscript, now for208the actual `blockChannel` with its explicitly standardized output basis. -/209theorem blockChannel_adjoint_eq_tensor_polynomial {K : ℕ} [NeZero K]210(U : ℕ → Fin K → unitary (Matrix ι ι ℂ)) (n : ℕ)211(A : Matrix (ZMod (K ^ n)) (ZMod (K ^ n)) ℂ) :212(Nonadditivity.BlockConstruction.blockChannel U n).adjointMap A =213(1 / ((K : ℂ) ^ n)) •214∑ a, ∑ b,215A (Nonadditivity.BlockConstruction.blockOutputEquiv K n a)216(Nonadditivity.BlockConstruction.blockOutputEquiv K n b) •217((tensorWord U n a).conjTranspose * tensorWord U n b) := by218unfold Nonadditivity.BlockConstruction.blockChannel219rw [reindex_output_adjointMap, blockComplementary_adjoint_eq_tensor_polynomial]220simp only [Fintype.card_fin, one_div, inv_pow, Matrix.submatrix_apply]221222end Nonadditivity.Channels.KrausChannel