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: theMixableinstance allowing convex combinations ofMStatesofClassical: Mixed states representing classical distributionspurity: The purityTr[ρ^2]of a statespectrum: The spectrum of the matrixuniform: The maximally mixed statemix: The total state corresponding to an ensembleaverage: Averages a function over an ensemble, with appropriate weights
A mixed quantum state is a PSD matrix with trace 1.
We don't extend (M : HermitianMat d ℂ) because that gives an annoying thing where
M is actually a Subtype, which means ρ.M.foo notation doesn't work.
- M : HermitianMat d ℂ
Instances For
Equations
- MState.instCoe = { coe := MState.M }
Every mixed state is Hermitian.
The map from mixed states to their matrices is injective
The matrices corresponding to MStates are Convex ℝ
The expectation value of an operator on a quantum state.
Instances For
If a PSD observable A has expectation value of 0 on a state ρ, it must entirely contain the
support of ρ in its kernel.
If an observable A has expectation value of 1 on a state ρ, it must entirely contain the
support of ρ in its 1-eigenspace.
A mixed state can be constructed as a pure state arising from a ket.
Equations
- MState.pure ψ = { M := ⟨Matrix.vecMulVec ⇑ψ ⇑↑ψ, ⋯⟩, nonneg := ⋯, tr := ⋯ }
Instances For
The eigenvalue spectrum of a mixed quantum state, as a Distribution.
Equations
- ρ.spectrum = ProbDistribution.mk' (fun (x : d) => ⋯.eigenvalues x) ⋯ ⋯
Instances For
The spectrum of a pure state is (1,0,0,...), i.e. a constant distribution.
If the spectrum of a mixed state is (1,0,0...) i.e. a constant distribution, it is a pure state.
A state ρ is pure iff its spectrum is (1,0,0,...) i.e. a constant distribution.
Equations
- MState.«term_⊗ᴹ_» = Lean.ParserDescr.trailingNode `MState.«term_⊗ᴹ_» 100 100 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊗ᴹ ") (Lean.ParserDescr.cat `term 101))
Instances For
A representation of a classical distribution as a quantum state, diagonal in the given basis.
Equations
- MState.ofClassical dist = { M := HermitianMat.diagonal ℂ fun (x : d) => ↑(dist x), nonneg := ⋯, 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 = { M := (↑ρ).traceRight, nonneg := ⋯, tr := ⋯ }
Instances For
Taking the direct product on the left and tracing it back out gives the same state.
Taking the direct product on the right and tracing it back out gives the same state.
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 mixed state is separable iff it can be written as a convex combination of product mixed states.
Equations
- ρ.IsSeparable = ∃ (ρLRs : Finset (MState d₁ × MState d₂)) (ps : ProbDistribution ↥ρLRs), ↑ρ = ∑ ρLR : ↥ρLRs, ↑(ps ρLR) • (↑(↑ρLR).1).kronecker ↑(↑ρLR).2
Instances For
A product state MState.prod is separable.
Two kets are phase-equivalent if and only if their pure states are equal.
A pure state is separable iff the ket is a product state.
A ket on a product space is a product state if and only if its coefficient matrix has rank 1.
A pure state is separable iff the partial trace on the left is pure.
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
Instances For
The defining property of purification, that tracing out the purifying system gives the original mixed state.
Relabeling a pure state by a bijection yields another pure state.
The purity of a state is invariant under relabeling of the basis.
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
The multiset of values in the spectrum of a relabeled state is the same as the multiset of values in the spectrum of the original state.
The associator that re-clusters the parts of a quantum system.
Equations
- ρ.assoc = ρ.relabel (Equiv.prodAssoc d₁ d₂ d₃).symm
Instances For
The associator that re-clusters the parts of a quantum system.
Instances For
Mixed states inherit the subspace topology from matrices
The projection from mixed states to their Hermitian matrices is an embedding
Equations
- MState.piProd ρi = { M := ⟨Matrix.piProd fun (i : ι) => (ρi i).m, ⋯⟩, nonneg := ⋯, tr := ⋯ }
Instances For
The n-copy "power" of a mixed state, with the standard basis indexed by pi types.
Equations
- ρ ⊗ᴹ^ n = MState.piProd fun (x : Fin n) => ρ
Instances For
The n-copy "power" of a mixed state, with the standard basis indexed by pi types.
Equations
- MState.«term_⊗ᴹ^_» = Lean.ParserDescr.trailingNode `MState.«term_⊗ᴹ^_» 110 110 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊗ᴹ^ ") (Lean.ParserDescr.cat `term 111))