Kraus update, POVM elements, density matrices, and complete positivity
DefinitionPeresTerno_kraus_basicsLet , be finite index sets and let be a finite family of complex matrices (the Kraus matrices of one outcome). This file defines:
- the Kraus update of a matrix (Eq. (6)):
- the POVM element (Eq. (8)):
- a density matrix: a positive semidefinite complex matrix of trace ;
- the ampliation of a map from to matrices, acting on a matrix indexed by by applying to every block ;
- a positive map: is positive semidefinite whenever is;
- a completely positive map: is positive semidefinite for every positive semidefinite on , for every .
These are the shared vocabulary of every statement in the mission.
Formalization Note The maps in items 4-6 are arbitrary functions on matrices (linearity is required separately where the source requires it). The ancilla in item 6 is indexed by Fin n.
import Mathlib
/-!
# Kraus operators, POVM elements, and complete positivity
Definitions for the mission drafted from A. Peres and D. R. Terno,
*Quantum information and relativity theory*, Rev. Mod. Phys. 76 (2004) 93,
Sec. II.D–II.E, Eqs. (6)–(11).
-/
namespace PeresTerno
open Matrix
open scoped ComplexOrder
/-- Eq. (6): the (unnormalized) post-measurement state
`ρ'_μ = ∑ₘ A_{μm} ρ A_{μm}†` for the Kraus matrices `A m` of one outcome `μ`.
The Kraus matrices may change the dimension (`e × d`). -/
noncomputable def krausUpdate {d e ι : Type*} [Fintype d] [Fintype ι]
(A : ι → Matrix e d ℂ) (ρ : Matrix d d ℂ) : Matrix e e ℂ :=
∑ m, A m * ρ * (A m)ᴴ
/-- Eq. (8): the POVM element `E_μ = ∑ₘ A_{μm}† A_{μm}` (a `d × d` matrix, the same size
as the initial state). -/
noncomputable def povmElement {d e ι : Type*} [Fintype e] [Fintype ι]
(A : ι → Matrix e d ℂ) : Matrix d d ℂ :=
∑ m, (A m)ᴴ * A m
/-- A density matrix: positive semidefinite with unit trace. -/
def IsDensityMatrix {d : Type*} [Fintype d] (ρ : Matrix d d ℂ) : Prop :=
ρ.PosSemidef ∧ ρ.trace = 1
/-- The map `T ⊗ 1` acting on a bipartite matrix on `d × f`: `T` is applied to each
`d × d` block `(R_{(i,a),(j,b)})_{i,j}` indexed by the ancilla labels `a, b`. -/
def ampliate {d e f : Type*} (T : Matrix d d ℂ → Matrix e e ℂ)
(R : Matrix (d × f) (d × f) ℂ) : Matrix (e × f) (e × f) ℂ :=
fun p q => T (fun i j => R (i, p.2) (j, q.2)) p.1 q.1
/-- A map is positive if it sends positive semidefinite matrices to positive semidefinite
matrices. -/
def IsPositiveMap {d e : Type*} [Fintype d] [Fintype e]
(T : Matrix d d ℂ → Matrix e e ℂ) : Prop :=
∀ ρ : Matrix d d ℂ, ρ.PosSemidef → (T ρ).PosSemidef
/-- A map is completely positive if `T ⊗ 1` is positive for an ancilla of every finite
dimension `n`. -/
def IsCompletelyPositive {d e : Type*} [Fintype d] [Fintype e]
(T : Matrix d d ℂ → Matrix e e ℂ) : Prop :=
∀ (n : ℕ) (R : Matrix (d × Fin n) (d × Fin n) ℂ), R.PosSemidef →
(ampliate T R).PosSemidef
end PeresTerno
Read-back
What the Lean code literally says, in plain math · Aristotle (Harmonic) - NON-BLIND: same agent that drafted the statements
Non-blind read-back - not independent testimony. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement below, with full knowledge of the source paper and of the intended meaning, at the explicit request of the proposal owner. It was not produced by a blind, independent auditor and must not be mistaken for independent testimony. Reviewers should compare the Lean code against the source themselves.
The file declares, inside a namespace PeresTerno, the following objects; all matrices have complex entries and all index types used in sums are finite.
- Kraus update. For index types ( finite), a finite index type , a family and a matrix , the matrix
where is the conjugate transpose. If is empty this is the zero matrix.
- POVM element. For finite and as above, the matrix
zero if is empty.
-
Density matrix. For a finite index type , a matrix is a density matrix iff is positive semidefinite (Hermitian with for all ) and . If is empty no matrix qualifies (its trace is ).
-
Ampliation. For any function from matrices to matrices (no linearity assumed) and any matrix indexed by pairs in , the matrix indexed by whose entry at row , column is
-
Positive map. For finite , is positive iff for every positive semidefinite matrix , is positive semidefinite.
-
Completely positive map. For finite , is completely positive iff for every natural number (including ) and every positive semidefinite matrix indexed by , the ampliation of applied to (item 4) is positive semidefinite.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.