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 (MState
s) 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 opeationU
IsUnitary
: 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
.
Positive trace-preserving linear maps. These includes all channels, but aren't
necessarily completely positive, see CPTPMap
.
- pos : self.map.IsPositive
- trace_preserving : self.map.IsTracePreserving
Instances For
Quantum channels, aka CPTP maps: completely positive trace preserving linear maps. See
CPTPMap.mk
for a constructor that doesn't require going through PTPMap.
- mk' :: (
- pos : self.map.IsPositive
- trace_preserving : self.map.IsTracePreserving
- completely_pos : self.map.IsCompletelyPositive
- )
Instances For
Construct a CPTPMap from the facts that it IsTracePreserving and IsCompletelyPositive.
Equations
- CPTPMap.mk map tp cp = { map := map, pos := ⋯, trace_preserving := tp, completely_pos := cp }
Instances For
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₂ = CPTPMap.mk (MatrixMap.of_choi_matrix M) ⋯ ⋯
Instances For
CPTPMaps are functions from MStates to MStates.
Equations
- CPTPMap.instFunLike = { coe := fun (Λ : CPTPMap dIn dOut) (ρ : MState dIn) => Λ.toPTPMap ρ, coe_injective' := ⋯ }
The composition of CPTPMaps, as a CPTPMap.
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
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.
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.
Equations
Instances For
Two CPTP maps into the same one-dimensional output space must be equal
There is exactly one CPTPMap to a 1-dimensional space.
Equations
- CPTPMap.instUnique = { default := CPTPMap.destroy, uniq := ⋯ }
A state can be viewed as a CPTP map from the trivial Hilbert space (indexed by Unit
)
that outputs exactly that state.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The output of const_state ρ
is always that ρ
.
The replacement channel that maps all inputs to a given state.
Equations
Instances For
The output of replacement ρ
is always that ρ
.
The tensor product of two CPTPMaps.
Instances For
Equations
- CPTPMap.«term_⊗_» = Lean.ParserDescr.trailingNode `CPTPMap.«term_⊗_» 1022 0 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⊗") (Lean.ParserDescr.cat `term 0))
Instances For
Finitely-indexed tensor products of CPTPMaps.
Equations
- CPTPMap.piProd Λi = CPTPMap.mk (MatrixMap.piKron fun (i : ι) => (Λi i).map) ⋯ ⋯
Instances For
Partial tracing out the left, as a CPTP map.
Equations
- CPTPMap.traceLeft = sorry
Instances For
Partial tracing out the right, as a CPTP map.
Equations
- CPTPMap.traceRight = sorry
Instances For
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.of_equiv σ = sorry
Instances For
The SWAP operation, as a channel.
Equations
- CPTPMap.SWAP = CPTPMap.of_equiv (Equiv.prodComm d₁ d₂)
Instances For
The associator, as a channel.
Equations
- CPTPMap.assoc = CPTPMap.of_equiv (Equiv.prodAssoc d₁ d₂ d₃)
Instances For
The inverse associator, as a channel.
Equations
- CPTPMap.assoc' = CPTPMap.of_equiv (Equiv.prodAssoc d₁ d₂ d₃).symm
Instances For
Conjugating density matrices by a unitary as a channel. This is standard unitary evolution.
Equations
Instances For
The unitary channel U conjugated by U.
A channel is unitary iff it is of_unitary U
.
Instances For
A channel is entanglement breaking iff its product with the identity channel only outputs separable states.
Equations
- Λ.IsEntanglementBreaking = ∀ (dR : Type ?u.61) [inst : Fintype dR] [inst_1 : DecidableEq dR] (ρ : MState (dR × dIn)), ((CPTPMap.id⊗Λ) ρ).IsSeparable
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
purify
has this property.
The complementary channel comes from tracing out the other half (the right half) of the purified channel purify
.
Equations
- One or more equations did not get rendered due to their size.
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.
Equations
- Λ.IsDegradableTo Λ₂ = ∃ (D : CPTPMap dOut dOut₂), D.compose Λ = Λ₂
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
CPTPMap
s inherit a topology from their choi matrices.
The projection from CPTPMap
to the Choi matrix is an embedding