Physlib

PhyslibAlpha.AlgebraicFramework.Measurement.Postprocessing

Postprocessing a finite-outcome measurement

A classical channel that relabels, coarse-grains, or adds noise to the outcomes of a measurement — from raw outcomes `ι` to coarse outcomes `κ` — is, in the same Heisenberg convention as every other channel here, a positive unital linear map `K : (κ → ℝ) →ₚ₁[ℝ] (ι → ℝ)`: it pulls functions of the coarse outcome back to functions of the raw one. Given a measurement `M : (ι → ℝ) →ₚ₁[ℝ] E`, its postprocessing through `K` is `M.comp K`, already meaningful with no new definition needed — this is the entire point of presenting measurements as channels (`FiniteOutcome.lean`): postprocessing is composition.

`stochasticMatrixEquiv` identifies such classical channels concretely: `ι → ℝ` is itself a classical order-unit space (`ClassicalSystem.lean`), so `channelEquiv` applies to it verbatim, and uncurrying its family of effects turns a classical channel into exactly what one would expect — a row-stochastic matrix, a probability distribution over `κ` for every raw outcome in `ι`.

A deterministic relabeling `f : κ → ι` of outcomes — no randomness, just reading off `f k` — gives the simplest classical channel of all, `classicalPullback f`; `Compatibility.lean` builds the coordinate projections of a product outcome type out of it.

Main definitions

  • `Measurement.postprocess`, `Measurement.postprocess_postprocess`
  • `Measurement.stochasticMatrixEquiv`
  • `Measurement.classicalPullback`

10 declarations

definition

Postprocessing of a measurement MM through a classical channel KK

Given a measurement M:(ι→R)→EM : (\iota \to \mathbb{R}) \to E and a classical channel K:(κ→R)→(ι→R)K : (\kappa \to \mathbb{R}) \to (\iota \to \mathbb{R}), where both are represented as positive unital linear maps in the Heisenberg convention, the postprocessing of MM through KK is the composition M∘KM \circ K. This resulting map is a measurement from the coarse outcome space κ\kappa to the effect space EE.

theorem

postprocess(M,K)(f)=M(K(f))\text{postprocess}(M, K)(f) = M(K(f))

Given a measurement M:(ι→R)→EM : (\iota \to \mathbb{R}) \to E, a classical channel K:(κ→R)→(ι→R)K : (\kappa \to \mathbb{R}) \to (\iota \to \mathbb{R}) (where both are positive unital linear maps), and a function f:κ→Rf : \kappa \to \mathbb{R}, the evaluation of the postprocessed measurement at ff is given by M(K(f))M(K(f)).

theorem

Postprocessing a measurement MM with the identity channel equals MM

Let M:(ι→R)→EM : (\iota \to \mathbb{R}) \to E be a measurement, represented as a positive unital linear map from the classical system ι→R\iota \to \mathbb{R} to an effect space EE. Postprocessing MM through the identity channel on ι→R\iota \to \mathbb{R} results in the original measurement MM.

theorem

postprocess(postprocess(M,K),L)=postprocess(M,K∘L)\text{postprocess}(\text{postprocess}(M, K), L) = \text{postprocess}(M, K \circ L)

Let M:(ι→R)→EM : (\iota \to \mathbb{R}) \to E be a measurement, and let K:(κ→R)→(ι→R)K : (\kappa \to \mathbb{R}) \to (\iota \to \mathbb{R}) and L:(μ→R)→(κ→R)L : (\mu \to \mathbb{R}) \to (\kappa \to \mathbb{R}) be classical channels (represented as positive unital linear maps). Postprocessing the measurement MM first through channel KK and then through channel LL is equivalent to postprocessing MM once through the composite channel K∘LK \circ L. That is: postprocess(postprocess(M,K),L)=postprocess(M,K∘L)\text{postprocess}(\text{postprocess}(M, K), L) = \text{postprocess}(M, K \circ L)

definition

Equivalence between normalized effect families and row-stochastic matrices

Let ι\iota and κ\kappa be types representing finite outcome sets. This equivalence identifies a family of effects {ek}k∈κ\{e_k\}_{k \in \kappa} in the classical system Rι\mathbb{R}^\iota that sum to the identity (i.e., ∑k∈κek(i)=1\sum_{k \in \kappa} e_k(i) = 1 for all i∈ιi \in \iota) with a row-stochastic matrix P:ι×κ→RP: \iota \times \kappa \to \mathbb{R}. Here, an effect eke_k is a function ι→[0,1]\iota \to [0, 1], and a row-stochastic matrix PP satisfies P(i,k)≥0P(i, k) \geq 0 for all i,ki, k and ∑k∈κP(i,k)=1\sum_{k \in \kappa} P(i, k) = 1 for all i∈ιi \in \iota. The correspondence is defined by the relation P(i,k)=ek(i)P(i, k) = e_k(i).

definition

Equivalence between classical channels Rκ→Rι\mathbb{R}^\kappa \to \mathbb{R}^\iota and row-stochastic matrices P:ι×κ→RP: \iota \times \kappa \to \mathbb{R}

For finite outcome sets ι\iota and κ\kappa, this equivalence identifies classical channels K:Rκ→RιK: \mathbb{R}^\kappa \to \mathbb{R}^\iota (represented as positive unital linear maps) with row-stochastic matrices P:ι×κ→RP: \iota \times \kappa \to \mathbb{R}. A matrix PP is row-stochastic if it satisfies P(i,k)≥0P(i, k) \geq 0 for all i∈ι,k∈κi \in \iota, k \in \kappa and the normalization condition ∑k∈κP(i,k)=1\sum_{k \in \kappa} P(i, k) = 1 for every i∈ιi \in \iota. The correspondence relates a channel KK to a matrix PP such that for any function g:κ→Rg: \kappa \to \mathbb{R}, the value of the processed function at i∈ιi \in \iota is given by (Kg)(i)=∑k∈κP(i,k)g(k)(Kg)(i) = \sum_{k \in \kappa} P(i, k) g(k).

definition

Classical pullback along f:κ→ιf : \kappa \to \iota

Given a map f:κ→ιf : \kappa \to \iota between outcome types, the classical pullback is the positive unital linear map K:(ι→R)→(κ→R)K : (\iota \to \mathbb{R}) \to (\kappa \to \mathbb{R}) that sends a function g:ι→Rg : \iota \to \mathbb{R} to the composition g∘fg \circ f. This map represents a deterministic classical channel where an outcome k∈κk \in \kappa is assigned the value f(k)∈ιf(k) \in \iota; in the Heisenberg picture, it pulls back observables (functions on ι\iota) to functions on κ\kappa.

theorem

classicalPullback(id)=id\text{classicalPullback}(\text{id}) = \text{id}

For any set of outcomes ι\iota, the classical pullback associated with the identity function id:ι→ι\text{id} : \iota \to \iota is the identity unital positive linear map on the space of observables (ι→R)(\iota \to \mathbb{R}).

theorem

classicalPullback(g)∘classicalPullback(f)=classicalPullback(f∘g)\text{classicalPullback}(g) \circ \text{classicalPullback}(f) = \text{classicalPullback}(f \circ g)

For any outcome types ι,κ\iota, \kappa, and μ\mu, and any relabeling maps f:κ→ιf : \kappa \to \iota and g:μ→κg : \mu \to \kappa, the composition of the classical pullback along gg and the classical pullback along ff is equal to the classical pullback along the composite map f∘gf \circ g: (classicalPullback g)∘(classicalPullback f)=classicalPullback (f∘g) (\text{classicalPullback } g) \circ (\text{classicalPullback } f) = \text{classicalPullback } (f \circ g) where classicalPullback f\text{classicalPullback } f is the positive unital linear map that pulls back observables (functions to R\mathbb{R}) along ff. This demonstrates that the classical pullback is a contravariant functor from outcome types to classical channels.

theorem

Pointwise application of the classical pullback: (classicalPullback f)(g)(k)=g(f(k))(\text{classicalPullback } f)(g)(k) = g(f(k))

Given a map between outcome types f:κ→ιf : \kappa \to \iota, the classical pullback of ff applied to a function g:ι→Rg : \iota \to \mathbb{R} and evaluated at an outcome k∈κk \in \kappa is equal to g(f(k))g(f(k)).