Linear maps of matrices #
This file works with MatrixMap
s, that is, linear maps from square matrices to square matrices.
Although this is just a shorthand for Matrix A A R →ₗ[R] Matrix B B R
, there are several
concepts that specifically make sense in this context.
toMatrix
is the rectangular "transfer matrix", where matrix multiplication commutes with map composition.choi_matrix
is the square "Choi matrix", seeMatrixMap.choi_PSD_iff_CP_map
for example usagekron
is the Kronecker product of matrix mapsIsTracePreserving
states the trace of the output is always equal to the trace of the input.
We provide simp lemmas for relating these facts, prove basic facts e.g. composition and identity, and some facts
about IsTracePreserving
maps.
Alias of LinearMap.id, but specifically as a MatrixMap.
Equations
Instances For
Choi matrix of a given linear matrix map. Note that this is defined even for things that
aren't CPTP, it's just rarely talked about in those contexts. This is the inverse of
MatrixMap.of_choi_matrix
. Compare with MatrixMap.toMatrix
, which gives the transfer matrix.
Equations
- M.choi_matrix (i₂, j₂) (i₂_1, j₂_1) = M (Matrix.stdBasisMatrix i₂ i₂_1 1) j₂ j₂_1
Instances For
Given the Choi matrix, generate the corresponding R-linear map between matrices as a
MatrixMap. This is the inverse of MatrixMap.choi_matrix
.
Equations
Instances For
Proves that MatrixMap.of_choi_matrix
and MatrixMap.choi_matrix
inverses.
Proves that MatrixMap.choi_matrix
and MatrixMap.of_choi_matrix
inverses.
The correspondence induced by MatrixMap.of_choi_matrix
is injective.
The linear equivalence between MatrixMap's and transfer matrices on a larger space.
Compare with MatrixMap.choi_matrix
, which gives the Choi matrix instead of the transfer matrix.
Equations
- MatrixMap.toMatrix = LinearMap.toMatrix (Matrix.stdBasis R A A) (Matrix.stdBasis R B B)
Instances For
Multiplication of transfer matrices, MatrixMap.toMatrix
, is equivalent to composition of maps.
The Kronecker product of MatrixMaps. Defined here using TensorProduct.map M₁ M₂
, with appropriate
reindexing operations and LinearMap.toMatrix
/Matrix.toLin
. Notation ⊗ₖₘ
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- MatrixMap.«term_⊗ₖₘ_» = Lean.ParserDescr.trailingNode `MatrixMap.«term_⊗ₖₘ_» 100 100 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊗ₖₘ ") (Lean.ParserDescr.cat `term 101))
Instances For
The extensional definition of the Kronecker product MatrixMap.kron
, in terms of the entries of its image.
For maps L₁, L₂, R₁, and R₂, the product (L₂ ∘ₗ L₁) ⊗ₖₘ (R₂ ∘ₗ R₁) = (L₂ ⊗ₖₘ R₂) ∘ₗ (L₁ ⊗ₖₘ R₁)
The operational definition of the Kronecker product MatrixMap.kron
, that it maps a Kronecker product of
inputs to the Kronecker product of outputs. It is the unique bilinear map doing so.
Like Basis.tensorProduct
, but for PiTensorProduct
Equations
Instances For
Finite Pi-type tensor product of MatrixMaps. Defined as PiTensorProduct.tprod
of the underlying
Linear maps. Notation ⨂ₜₘ[R] i, f i
, eventually.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A map is trace preserving iff the partial trace of the Choi matrix is the identity.
Simp lemma: the trace of the image of a IsTracePreserving map is the same as the original trace.
The trace of a Choi matrix of a TP map is the cardinality of the input space.
The composotion of IsTracePreserving maps is also trace preserving.
The identity MatrixMap IsTracePreserving.
Unit linear combinations of IsTracePreserving maps are IsTracePreserving.
The kronecker product of IsTracePreserving maps is also trace preserving.