A mixed-state ensemble is a random variable valued in MState d
. That is,
a collection of mixed states var : α → MState d
, each with their own probability weight
described by distr : Distribution α
.
Equations
- MEnsemble d α = Distribution.RandVar α (MState d)
Instances For
A pure-state ensemble is a random variable valued in Ket d
. That is,
a collection of pure states var : α → Ket d
, each with their own probability weight
described by distr : Distribution α
.
Equations
- PEnsemble d α = Distribution.RandVar α (Ket d)
Instances For
Alias for Distribution.var
for mixed-state ensembles.
Equations
Instances For
Alias for Distribution.var
for pure-state ensembles.
Equations
Instances For
A pure-state ensemble is a mixed-state ensemble if all kets are interpreted as mixed states.
Equations
Instances For
Equations
The resulting mixed state after mixing the states in an ensemble with their respective probability weights. Note that, generically, a single mixed state has infinitely many ensembles that mixes into it.
Equations
Instances For
The average of a function f : MState d → T
, where T
is of Mixable U T
instance, on a mixed-state ensemble e
is the expectation value of f
acting on the states of e
, with the corresponding probability weights from e.distr
.
Equations
- Ensemble.average f e = Distribution.expect_val (f <$> e)
Instances For
A version of average
conveniently specialized for functions f : MState d → ℝ≥0
returning nonnegative reals.
Notably, the average is also a nonnegative real number.
Equations
- Ensemble.average_NNReal f e = ⟨Ensemble.average (NNReal.toReal ∘ f) e, ⋯⟩
Instances For
The average of a function f : Ket d → T
, where T
is of Mixable U T
instance, on a pure-state ensemble e
is the expectation value of f
acting on the states of e
, with the corresponding probability weights from e.distr
.
Equations
- Ensemble.pure_average f e = Distribution.expect_val (f <$> e)
Instances For
A version of average
conveniently specialized for functions f : Ket d → ℝ≥0
returning nonnegative reals.
Notably, the average is also a nonnegative real number.
Equations
- Ensemble.pure_average_NNReal f e = ⟨Ensemble.pure_average (NNReal.toReal ∘ f) e, ⋯⟩
Instances For
The average of f : MState d → T
on a coerced pure-state ensemble ↑e : MEnsemble d α
is equal to averaging the restricted function over Kets f ∘ pure : Ket d → T
on e
.
The average of f : Ket d → T
on an ensemble that mixes to a pure state ψ
is f ψ
The average of f : MState d → T
on an ensemble that mixes to a pure state ψ
is f (pure ψ)
The trivial mixed-state ensemble of ρ
consists of copies of rho
, with the i
-th one having
probability 1.
Equations
- Ensemble.trivial_mEnsemble ρ i = { var := fun (x : α) => ρ, distr := Distribution.constant i }
Instances For
Equations
- Ensemble.MEnsemble.instInhabited = { default := Ensemble.trivial_mEnsemble default default }
The trivial pure-state ensemble of ψ
consists of copies of ψ
, with the i
-th one having
probability 1.
Equations
- Ensemble.trivial_pEnsemble ψ i = { var := fun (x : α) => ψ, distr := Distribution.constant i }
Instances For
Equations
- Ensemble.PEnsemble.instInhabited = { default := Ensemble.trivial_pEnsemble default default }
The spectral pure-state ensemble of ρ
. The states are its eigenvectors, and the probabilities, eigenvalues.
Equations
- Ensemble.spectral_ensemble ρ = { var := fun (i : d) => { vec := ⋯.eigenvectorBasis i, normalized' := ⋯ }, distr := ρ.spectrum }
Instances For
The spectral pure-state ensemble of ρ
mixes to ρ