Exact Lean source
Nonadditivity.ChannelTensorControl
Download original .lean · View on GitHub · Jump to source
Imported by project modules
3 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
13 project constants, including generated, internal and private declarations.
13 declarations
Nonadditivity.Channels.KrausChannel.controlled_tensor_mapNonadditivity.Channels.KrausChannel.controlled_tensor_output_labelledNonadditivity.Channels.KrausChannel.tensor_outputUnitary_mapNonadditivity.Channels.KrausChannel.tensor_outputUnitary_outputNonadditivity.Channels.jointLabelledStateNonadditivity.Channels.jointLabelledState._proof_1internal/detail/privateNonadditivity.Channels.jointLabelledState._proof_2internal/detail/privateNonadditivity.Channels.jointSelectorNonadditivity.Channels.jointSelector.congr_simpNonadditivity.Channels.jointSelector.eq_1internal/detail/privateNonadditivity.Channels.jointSelector_mul_adjointNonadditivity.Channels.select_jointLabelledStateNonadditivity.Channels.select_jointLabelledState._simp_1_2internal/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.ChannelExtensions7import Nonadditivity.EntropyProducts89/-!10# Two-use control embeddings and output unitaries1112Classical labels are attached to arbitrary joint density matrices, including13entangled inputs. The controlled tensor channel then applies the selected two14branches to that same joint state.15-/1617noncomputable section1819namespace Nonadditivity.Channels2021open Entropy22open scoped BigOperators ComplexOrder ComplexConjugate Kronecker Matrix2324variable {ι ο κ ζ μ ν η ξ : Type*}25variable [Fintype ι] [DecidableEq ι] [Fintype ο] [DecidableEq ο]26variable [Fintype κ] [Fintype ζ] [DecidableEq ζ]27variable [Fintype μ] [DecidableEq μ] [Fintype ν] [DecidableEq ν]28variable [Fintype η] [Fintype ξ] [DecidableEq ξ]2930/-- Select one classical label in each half of a joint input. -/31def jointSelector (z : ζ) (w : ξ) : Matrix (ι × μ) ((ζ × ι) × (ξ × μ)) ℂ :=32selector z ⊗ₖ selector w3334theorem jointSelector_mul_adjoint (z z' : ζ) (w w' : ξ) :35jointSelector (ι := ι) (μ := μ) z w * (jointSelector (ι := ι) (μ := μ) z' w').conjTranspose =36if z = z' ∧ w = w' then 1 else 0 := by37rw [jointSelector, jointSelector, Matrix.conjTranspose_kronecker,38← Matrix.mul_kronecker_mul, selector_mul_adjoint, selector_mul_adjoint]39by_cases hz : z = z' <;> by_cases hw : w = w' <;>40simp [hz, hw]4142/-- Embed any joint state while fixing both classical input labels. -/43def jointLabelledState (z : ζ) (w : ξ) (ρ : DensityMatrix (ι × μ)) :44DensityMatrix ((ζ × ι) × (ξ × μ)) where45matrix := (jointSelector z w).conjTranspose * ρ.matrix * jointSelector z w46positive := ρ.positive.conjTranspose_mul_mul_same _47normalized := by48rw [Matrix.trace_mul_cycle, jointSelector_mul_adjoint]49simp [ρ.normalized]5051/-- Every other label block vanishes; the selected block is the original joint state. -/52theorem select_jointLabelledState (z z' : ζ) (w w' : ξ) (ρ : DensityMatrix (ι × μ)) :53jointSelector z w * (jointLabelledState z' w' ρ).matrix *54(jointSelector z w).conjTranspose =55if z = z' ∧ w = w' then ρ.matrix else 0 := by56change jointSelector z w *57((jointSelector z' w').conjTranspose * ρ.matrix * jointSelector z' w') *58(jointSelector z w).conjTranspose = _59have hmat : jointSelector z w *60((jointSelector z' w').conjTranspose * ρ.matrix * jointSelector z' w') *61(jointSelector z w).conjTranspose =62(jointSelector z w * (jointSelector z' w').conjTranspose) * ρ.matrix *63(jointSelector z' w' * (jointSelector z w).conjTranspose) := by64simp only [Matrix.mul_assoc]65rw [hmat, jointSelector_mul_adjoint, jointSelector_mul_adjoint]66by_cases hz : z = z' <;> by_cases hw : w = w' <;>67simp [hz, hw, eq_comm]6869namespace KrausChannel7071omit [DecidableEq ο] [DecidableEq ν] in72/-- Expand a tensor of controlled channels as its concrete pair of measured blocks. -/73theorem controlled_tensor_map (T : ζ → KrausChannel ι ο κ)74(S : ξ → KrausChannel μ ν η)75(X : Matrix ((ζ × ι) × (ξ × μ)) ((ζ × ι) × (ξ × μ)) ℂ) :76((controlled T).tensor (controlled S)).map X =77∑ z, ∑ w, ((T z).tensor (S w)).map78(jointSelector z w * X * (jointSelector z w).conjTranspose) := by79simp only [map, tensor, controlled, jointSelector, Matrix.mul_kronecker_mul,80Matrix.conjTranspose_mul, Fintype.sum_prod_type, Matrix.mul_assoc]81apply Finset.sum_congr rfl82intro z _83rw [Finset.sum_comm]8485/-- Two fixed classical labels select the corresponding two channel branches on86an arbitrary entangled density matrix. -/87@[simp] theorem controlled_tensor_output_labelled (T : ζ → KrausChannel ι ο κ)88(S : ξ → KrausChannel μ ν η) (z : ζ) (w : ξ) (ρ : DensityMatrix (ι × μ)) :89((controlled T).tensor (controlled S)).output (jointLabelledState z w ρ) =90((T z).tensor (S w)).output ρ := by91apply DensityMatrix.ext92simp only [output_matrix, controlled_tensor_map, select_jointLabelledState]93simp [ite_and, apply_ite, map_zero]9495/-- Tensoring two output conjugations is conjugation by the tensor unitary,96also for entangled inputs. -/97theorem tensor_outputUnitary_map (T : KrausChannel ι ο κ) (S : KrausChannel μ ν η)98(U : unitary (Matrix ο ο ℂ)) (V : unitary (Matrix ν ν ℂ))99(X : Matrix (ι × μ) (ι × μ) ℂ) :100((T.outputUnitary U).tensor (S.outputUnitary V)).map X =101((T.tensor S).outputUnitary (tensorUnitary U V)).map X := by102have hk (k : κ × η) :103((T.outputUnitary U).tensor (S.outputUnitary V)).kraus k =104((T.tensor S).outputUnitary (tensorUnitary U V)).kraus k := by105exact Matrix.mul_kronecker_mul _ _ _ _106simp only [map, hk]107108/-- The actual joint output states satisfy the tensor-unitary conjugation identity. -/109theorem tensor_outputUnitary_output (T : KrausChannel ι ο κ) (S : KrausChannel μ ν η)110(U : unitary (Matrix ο ο ℂ)) (V : unitary (Matrix ν ν ℂ))111(ρ : DensityMatrix (ι × μ)) :112((T.outputUnitary U).tensor (S.outputUnitary V)).output ρ =113((T.tensor S).output ρ).unitaryConjugate (tensorUnitary U V) := by114apply DensityMatrix.ext115change ((T.outputUnitary U).tensor (S.outputUnitary V)).map ρ.matrix = _116rw [tensor_outputUnitary_map, outputUnitary_map]117rfl118119end KrausChannel120end Nonadditivity.Channels