Documentation

CslibFrontier.Foundations.Quantum.Algebra.Measurement

Measurements in a star-ordered algebra #

A measurement with outcomes α in an ordered algebra A (Cslib.Quantum.Measurement) is a family of nonnegative effects E_a ∈ A summing to 1: a positive-operator-valued measurement whose effects are observables of A rather than matrices. In a state φ it gives outcome a with probability Re φ(E_a) (Cslib.Quantum.Measurement.prob), and the outcome distribution is the probability mass function Cslib.Quantum.Measurement.distribution. On the matrix algebra with a vector state this is the Born rule of Cslib.Quantum.POVM (Cslib.Quantum.POVM.prob_toMeasurement).

A measurement can be post-processed by a map of outcomes, b ↦ ∑_{f a = b} E_a (Cslib.Quantum.Measurement.map), which pushes the outcome distribution forward (Cslib.Quantum.Measurement.distribution_map). It is projective when its effects are idempotent (Cslib.Quantum.Measurement.IsProjective). A two-outcome measurement has the observable E_false - E_true (Cslib.Quantum.Measurement.observable), a self-adjoint contraction in any algebra with a continuous functional calculus (Cslib.Quantum.Measurement.star_observable_mul_self_le_one), and an involution when the measurement is projective (Cslib.Quantum.Measurement.observable_mul_self).

Main definitions #

Main results #

structure Cslib.Quantum.Measurement (α : Type u_1) (A : Type u_2) [Fintype α] [Ring A] [PartialOrder A] :
Type (max u_1 u_2)

A measurement with outcomes α in the ordered algebra A: nonnegative effects summing to the identity.

  • effect : α → A

    The effect E_a of the outcome a.

  • nonneg (a : α) : 0 ≤ self.effect a

    Every effect is nonnegative.

  • sum_effect : ∑ a : α, self.effect a = 1

    The effects sum to the identity.

theorem Cslib.Quantum.Measurement.ext {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [PartialOrder A] {M N : Measurement α A} (h : ∀ (a : α), M.effect a = N.effect a) :
M = N
theorem Cslib.Quantum.Measurement.ext_iff {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [PartialOrder A] {M N : Measurement α A} :
M = N ↔ ∀ (a : α), M.effect a = N.effect a
theorem Cslib.Quantum.Measurement.effect_le_one {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [PartialOrder A] [IsOrderedAddMonoid A] (M : Measurement α A) (a : α) :
M.effect a ≤ 1

Every effect is at most the identity.

def Cslib.Quantum.Measurement.map {α : Type u_1} {β : Type u_2} {A : Type u_3} [Fintype α] [Fintype β] [Ring A] [PartialOrder A] [IsOrderedAddMonoid A] [DecidableEq β] (f : α → β) (M : Measurement α A) :

Post-processing of the outcomes by f: the effect of b is ∑_{f a = b} E_a.

theorem Cslib.Quantum.Measurement.map_effect {α : Type u_1} {β : Type u_2} {A : Type u_3} [Fintype α] [Fintype β] [Ring A] [PartialOrder A] [IsOrderedAddMonoid A] [DecidableEq β] (f : α → β) (M : Measurement α A) (b : β) :
(map f M).effect b = ∑ a : α with f a = b, M.effect a
@[simp]
theorem Cslib.Quantum.Measurement.map_id {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [PartialOrder A] [IsOrderedAddMonoid A] [DecidableEq α] (M : Measurement α A) :
map id M = M
theorem Cslib.Quantum.Measurement.commute_map_right {α : Type u_1} {β : Type u_2} {A : Type u_3} [Fintype α] [Fintype β] [Ring A] [PartialOrder A] [IsOrderedAddMonoid A] [DecidableEq β] (M : Measurement α A) (f : α → β) (e : A) (h : ∀ (a : α), Commute e (M.effect a)) (b : β) :
Commute e ((map f M).effect b)

An operator commuting with the original effects commutes with their postprocessing.

theorem Cslib.Quantum.Measurement.commute_map_map {α : Type u_1} {β : Type u_2} {A : Type u_3} [Fintype α] [Fintype β] [Ring A] [PartialOrder A] [IsOrderedAddMonoid A] {γ : Type u_4} {ω : Type u_5} [Fintype γ] [Fintype ω] [DecidableEq γ] [DecidableEq ω] (P : Measurement α A) (R : Measurement β A) (h : ∀ (a : α) (b : β), Commute (P.effect a) (R.effect b)) (f : α → γ) (g : β → ω) (c : γ) (z : ω) :
Commute ((map f P).effect c) ((map g R).effect z)

Postprocessing preserves cross-commutation of two measurements.

theorem Cslib.Quantum.Measurement.map_map {α : Type u_1} {β : Type u_2} {A : Type u_3} [Fintype α] [Fintype β] [Ring A] [PartialOrder A] [IsOrderedAddMonoid A] {γ : Type u_4} [Fintype γ] [DecidableEq β] [DecidableEq γ] (M : Measurement α A) (f : α → β) (g : β → γ) :
map g (map f M) = map (g ∘ f) M

Successive outcome postprocessings compose.

def Cslib.Quantum.Measurement.IsProjective {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [PartialOrder A] (M : Measurement α A) :

A measurement is projective when its effects are idempotent.

noncomputable def Cslib.Quantum.Measurement.prob {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [PartialOrder A] [Algebra ℂ A] (φ : AlgState A) (M : Measurement α A) (a : α) :

The probability Re φ(E_a) of the outcome a in the state φ.

theorem Cslib.Quantum.Measurement.prob_nonneg {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [PartialOrder A] [Algebra ℂ A] (φ : AlgState A) (M : Measurement α A) (a : α) :
0 ≤ prob φ M a
theorem Cslib.Quantum.Measurement.ofReal_prob {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [PartialOrder A] [Algebra ℂ A] (φ : AlgState A) (M : Measurement α A) (a : α) :
↑(prob φ M a) = φ (M.effect a)
@[simp]
theorem Cslib.Quantum.Measurement.sum_prob {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [PartialOrder A] [Algebra ℂ A] (φ : AlgState A) (M : Measurement α A) :
∑ a : α, prob φ M a = 1

The outcome probabilities sum to 1.

noncomputable def Cslib.Quantum.Measurement.distribution {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [PartialOrder A] [Algebra ℂ A] (φ : AlgState A) (M : Measurement α A) :
PMF α

The outcome distribution of M in the state φ.

@[simp]
theorem Cslib.Quantum.Measurement.distribution_apply {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [PartialOrder A] [Algebra ℂ A] (φ : AlgState A) (M : Measurement α A) (a : α) :
(distribution φ M) a = ENNReal.ofReal (prob φ M a)
theorem Cslib.Quantum.Measurement.prob_map {α : Type u_1} {β : Type u_2} {A : Type u_3} [Fintype α] [Fintype β] [Ring A] [PartialOrder A] [Algebra ℂ A] [IsOrderedAddMonoid A] [DecidableEq β] (φ : AlgState A) (f : α → β) (M : Measurement α A) (b : β) :
prob φ (map f M) b = ∑ a : α with f a = b, prob φ M a
theorem Cslib.Quantum.Measurement.distribution_map {α : Type u_1} {β : Type u_2} {A : Type u_3} [Fintype α] [Fintype β] [Ring A] [PartialOrder A] [Algebra ℂ A] [IsOrderedAddMonoid A] [DecidableEq β] (φ : AlgState A) (f : α → β) (M : Measurement α A) :

Post-processing pushes the outcome distribution forward.

def Cslib.Quantum.Measurement.const {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [DecidableEq α] (a : α) :

The trivial measurement with the fixed outcome a.

theorem Cslib.Quantum.Measurement.prob_const {α : Type u_1} {A : Type u_3} [Fintype α] [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [DecidableEq α] (φ : AlgState A) (a a' : α) :
prob φ (const a) a' = if a' = a then 1 else 0

The ±1 observable E_false - E_true of a two-outcome measurement.

The observable of a projective two-outcome measurement is an involution.

The observable of a projective two-outcome measurement is unitary.

theorem Cslib.Quantum.Measurement.observable_map {α : Type u_4} {A : Type u_5} [Fintype α] [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] (M : Measurement α A) (g : α → Bool) :
(map g M).observable = ∑ r : α, ↑(BitString.signVal (g r)) • M.effect r

The observable of a post-processed measurement: ∑_r (-1)^{g(r)} M_r.

noncomputable def Cslib.Quantum.Measurement.toPOVM {α : Type u_1} {ι : Type u_2} [Fintype α] [Fintype ι] [DecidableEq ι] (M : Measurement α (Matrix ι ι ℂ)) :
POVM α ι

A measurement in the matrix algebra as a positive-operator-valued measurement.

@[simp]
theorem Cslib.Quantum.Measurement.toPOVM_effect {α : Type u_1} {ι : Type u_2} [Fintype α] [Fintype ι] [DecidableEq ι] (M : Measurement α (Matrix ι ι ℂ)) (a : α) :
def Cslib.Quantum.POVM.toMeasurement {α : Type u_1} {ι : Type u_2} [Fintype α] [Fintype ι] [DecidableEq ι] (M : POVM α ι) :

A POVM as a measurement in the matrix algebra.

@[simp]
theorem Cslib.Quantum.POVM.toMeasurement_effect {α : Type u_1} {ι : Type u_2} [Fintype α] [Fintype ι] [DecidableEq ι] (M : POVM α ι) (a : α) :
theorem Cslib.Quantum.POVM.prob_toMeasurement {α : Type u_1} {ι : Type u_2} [Fintype α] [Fintype ι] [DecidableEq ι] (M : POVM α ι) (ψ : EuclideanSpace ℂ ι) (hψ : ‖ψ‖ = 1) (a : α) :

In a vector state, a POVM measures with the Born rule.

theorem Cslib.Quantum.POVM.distribution_toMeasurement {α : Type u_1} {ι : Type u_2} [Fintype α] [Fintype ι] [DecidableEq ι] (M : POVM α ι) (ψ : EuclideanSpace ℂ ι) (hψ : ‖ψ‖ = 1) :