Completely Positive Trace Preserving maps #
A CPTPMap is a ℂ-linear map between matrices (MatrixMap is an alias), bundled with the facts that it
IsCompletelyPositive and IsTracePreserving. CPTP maps are typically regarded as the "most general quantum
operation", as they map density matrices (MStates) to density matrices. The type PTPMap, for maps that are
positive (but not necessarily completely positive) is also declared.
A large portion of the theory is in terms of the Choi matrix (MatrixMap.choi_matrix), as the positive-definiteness
of this matrix corresponds to being a CP map. This is Choi's theorem on CP maps.
This file also defines several important examples of, classes of, and operations on, CPTPMaps:
compose: Composition of mapsid: The identity mapreplacement: The replacement channel that always outputs the same stateprod: Tensor product of two CPTP maps, with notation M₁ ⊗ M₂piProd: Tensor product of finitely many CPTP maps (Pi-type product)of_unitary: The CPTP map corresponding to a unitary opeationUIsUnitary: Predicate whether the map corresponds to any unitarypurify: Purifying a channel into a unitary on a larger Hilbert spacecomplementary: The complementary channel to its purificationIsEntanglementBreaking,IsDegradable,IsAntidegradable: Entanglement breaking, degradable and antidegradable channels.SWAP,assoc,assoc',traceLeft,traceRight: The CPTP maps corresponding to important operations on states. These correspond directly toMState.SWAP,MState.assoc,MState.assoc',MState.traceLeft, andMState.traceRight.
The Choi matrix of a channel is PSD.
The trace of a Choi matrix of a CPTP map is the cardinality of the input space.
Construct a CPTP map from a PSD Choi matrix with correct partial trace.
Equations
- CPTPMap.CPTP_of_choi_PSD_Tr h₁ h₂ = { toLinearMap := MatrixMap.of_choi_matrix M, HP := ⋯, pos := ⋯, TP := ⋯, cp := ⋯ }
Instances For
The composition of CPTPMaps, as a CPTPMap.
Equations
Instances For
Equations
- CPTPMap.«term_∘ₘ_» = Lean.ParserDescr.trailingNode `CPTPMap.«term_∘ₘ_» 75 75 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "∘ₘ") (Lean.ParserDescr.cat `term 76))
Instances For
Composition of CPTPMaps by CPTPMap.compose is compatible with the instFunLike action.
Composition of CPTPMaps is associative.
CPTPMaps have a convex structure from their Choi matrices.
Equations
- One or more equations did not get rendered due to their size.
The identity channel, which leaves the input unchanged.
Equations
- CPTPMap.id = { toLinearMap := LinearMap.id, HP := ⋯, pos := ⋯, TP := ⋯, cp := ⋯ }
Instances For
The map CPTPMap.id leaves any matrix unchanged.
The map CPTPMap.id leaves the input state unchanged.
The map CPTPMap.id composed with any map is the same map.
Any map composed with CPTPMap.id is the same map.
Given a equivalence (a bijection) between the types d₁ and d₂, that is, if they're the same dimension, then there's a CPTP channel for this. This is what we need for defining e.g. the SWAP channel, which is 'unitary' but takes heterogeneous input and outputs types (d₁ × d₂) and (d₂ × d₁).
Equations
- CPTPMap.ofEquiv σ = { toLinearMap := MatrixMap.submatrix ℂ ⇑σ.symm, HP := ⋯, pos := ⋯, TP := ⋯, cp := ⋯ }
Instances For
The SWAP operation, as a channel.
Equations
- CPTPMap.SWAP = CPTPMap.ofEquiv (Equiv.prodComm d₁ d₂)
Instances For
The associator, as a channel.
Equations
- CPTPMap.assoc = CPTPMap.ofEquiv (Equiv.prodAssoc d₁ d₂ d₃)
Instances For
The inverse associator, as a channel.
Equations
- CPTPMap.assoc' = CPTPMap.ofEquiv (Equiv.prodAssoc d₁ d₂ d₃).symm
Instances For
Partial tracing out the left, as a CPTP map.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Partial tracing out the right, as a CPTP map.
Instances For
The replacement channel that maps all inputs to a given state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The output of replacement ρ is always that ρ.
There is a CPTP map that takes a system of any (nonzero) dimension and outputs the
trivial Hilbert space, 1-dimensional, indexed by any Unique type. We can think of this
as "destroying" the whole system; tracing out everything.
Equations
Instances For
There is exactly one CPTPMap to a 1-dimensional space.
Equations
- CPTPMap.instUnique = { default := CPTPMap.destroy, uniq := ⋯ }
The tensor product of two CPTPMaps.
Equations
Instances For
Equations
- CPTPMap.«term_⊗ₖ_» = Lean.ParserDescr.trailingNode `CPTPMap.«term_⊗ₖ_» 70 70 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⊗ₖ") (Lean.ParserDescr.cat `term 71))
Instances For
Finitely-indexed tensor products of CPTPMaps.
Equations
Instances For
Conjugating density matrices by a unitary as a channel. This is standard unitary evolution.
Equations
- CPTPMap.ofUnitary U = { toLinearMap := MatrixMap.IsCompletelyPositive.conj ↑U, HP := ⋯, pos := ⋯, TP := ⋯, cp := ⋯ }
Instances For
A channel is unitary iff it is ofUnitary U.
Instances For
Every channel can be written as a unitary channel on a larger system. In general, if
the original channel was A→B, we may need to go as big as dilating the output system (the
environment) by a factor of A*B. One way of stating this would be that it forms an
isometry from A to (B×A×B). So that we can instead talk about the cleaner unitaries, we
say that this is a unitary on (A×B×B). The defining properties that this is a valid
purification comes are purify_IsUnitary and purify_trace. This means the environment
always has type dIn × dOut.
Furthermore, since we need a canonical "0" state on B in order to add with the input, we require a typeclass instance [Inhabited dOut].
Instances For
With a channel Λ : A → B, a valid purification (A×B×B)→(A×B×B) is such that:
- Preparing the default ∣0⟩ state on two copies of B
- Appending these to the input
- Applying the purified unitary channel
- Tracing out the two left parts of the output
is equivalent to the original channel. This theorem states that the channel output by
purifyhas this property.
The complementary channel comes from tracing out the other half (the right half) of the purified channel purify.
Equations
Instances For
A channel is degradable to another, if the other can be written as a composition of a degrading channel D with the original channel.
Instances For
A channel is antidegradable to another, if the other IsDegradableTo this one.
Equations
- Λ.IsAntidegradableTo Λ₂ = Λ₂.IsDegradableTo Λ
Instances For
A channel is degradable if it IsDegradableTo its complementary channel.
Equations
Instances For
A channel is antidegradable if it IsAntidegradableTo its complementary channel.
Equations
Instances For
CPTPMaps inherit a topology from their choi matrices.
The projection from CPTPMap to the Choi matrix is an embedding