Finite dimensional quantum mixed states, ρ.
The same comments apply as in Braket
:
These could be done with a Hilbert space of Fintype, which would look like
(H : Type*) [NormedAddCommGroup H] [InnerProductSpace ℂ H] [CompleteSpace H] [FiniteDimensional ℂ H]
or by choosing a particular Basis
and asserting it is Fintype
. But frankly it seems easier to
mostly focus on the basis-dependent notion of Matrix
, which has the added benefit of an obvious
"classical" interpretation (as the basis elements, or diagonal elements of a mixed state). In that
sense, this quantum theory comes with the a particular classical theory always preferred.
Important definitions:
instMixable
: theMixable
instance allowing convex combinations ofMState
sofClassical
: Mixed states representing classical distributionspurity
: The purityTr[ρ^2]
of a statespectrum
: The spectrum of the matrixuniform
: The maximally mixed stateMEnsemble
andPEnsemble
: Ensemble of mixed and pure states, respectivelymix
: The total state corresponding to an ensembleaverage
: Averages a function over an ensemble, with appropriate weights
Equations
- MState.instCoe = { coe := MState.M }
Every mixed state is Hermitian.
The map from mixed states to their matrices is injective
Equations
- MState.exp_val T ρ = (↑ρ).inner T
Instances For
A mixed state can be constructed as a pure state arising from a ket.
Equations
- MState.pure ψ = { toSubtype := ⟨Matrix.vecMulVec ⇑ψ ⇑↑ψ, ⋯⟩, zero_le := ⋯, tr := ⋯ }
Instances For
The eigenvalue spectrum of a mixed quantum state, as a Distribution
.
Equations
- ρ.spectrum = Distribution.mk' (fun (x : d) => ⋯.eigenvalues x) ⋯ ⋯
Instances For
The specturm of a pure state is (1,0,0,...), i.e. a constant distribution.
Equations
- MState.«term_⊗_» = Lean.ParserDescr.trailingNode `MState.«term_⊗_» 1022 0 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⊗") (Lean.ParserDescr.cat `term 0))
Instances For
A representation of a classical distribution as a quantum state, diagonal in the given basis.
Equations
- MState.ofClassical dist = { toSubtype := ⟨Matrix.diagonal fun (x : d) => ↑↑(dist x), ⋯⟩, zero_le := ⋯, tr := ⋯ }
Instances For
The maximally mixed state.
Instances For
There is exactly one state on a dimension-1 system.
Equations
- MState.instUnique = { default := MState.uniform, uniq := ⋯ }
There exists a mixed state for every nonempty d
.
Here, the maximally mixed one is chosen.
Equations
- MState.instInhabited = { default := MState.uniform }
Partial tracing out the right half of a system.
Equations
- ρ.traceRight = { toSubtype := ⟨ρ.m.traceRight, ⋯⟩, zero_le := ⋯, tr := ⋯ }
Instances For
Spectrum of direct product. There is a permutation σ so that the spectrum of the direct product of ρ₁ and ρ₂, as permuted under σ, is the pairwise products of the spectra of ρ₁ and ρ₂.
A product state MState.prod
is separable.
The purification of a mixed state. Always uses the full dimension of the Hilbert space (d) to
purify, so e.g. an existing pure state with d=4 still becomes d=16 in the purification. The defining
property is MState.traceRight_of_purify
; see also MState.purify'
for the bundled version.
Equations
- ρ.purify = { vec := fun (x : d × d) => match x with | (i, j) => let ρ2 := ↑⋯.eigenvectorUnitary i j; ρ2 * ↑√(⋯.eigenvalues j), normalized' := ⋯ }
Instances For
The defining property of purification, that tracing out the purifying system gives the original mixed state.
The heterogeneous SWAP gate that exchanges the left and right halves of a quantum system. This can apply even when the two "halves" are of different types, as opposed to (say) the SWAP gate on quantum circuits that leaves the qubit dimensions unchanged. Notably, it is not unitary.
Equations
- ρ.SWAP = ρ.relabel (Equiv.prodComm d₁ d₂).symm
Instances For
Mixed states inherit the subspace topology from matrices
The projection from mixed states to their matrices is an embedding
Equations
- MState.piProd ρi = { toSubtype := ⟨fun (j k : (i : ι) → dI i) => ∏ i : ι, (ρi i).m (j i) (k i), ⋯⟩, zero_le := ⋯, tr := ⋯ }
Instances For
Equations
- MState.«term_⊗^_» = Lean.ParserDescr.trailingNode `MState.«term_⊗^_» 1022 0 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol "⊗^") (Lean.ParserDescr.cat `term 0))