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
Postprocessing of a measurement through a classical channel
Given a measurement and a classical channel , where both are represented as positive unital linear maps in the Heisenberg convention, the postprocessing of through is the composition . This resulting map is a measurement from the coarse outcome space to the effect space .
Given a measurement , a classical channel (where both are positive unital linear maps), and a function , the evaluation of the postprocessed measurement at is given by .
Postprocessing a measurement with the identity channel equals
Let be a measurement, represented as a positive unital linear map from the classical system to an effect space . Postprocessing through the identity channel on results in the original measurement .
Let be a measurement, and let and be classical channels (represented as positive unital linear maps). Postprocessing the measurement first through channel and then through channel is equivalent to postprocessing once through the composite channel . That is:
Equivalence between normalized effect families and row-stochastic matrices
Let and be types representing finite outcome sets. This equivalence identifies a family of effects in the classical system that sum to the identity (i.e., for all ) with a row-stochastic matrix . Here, an effect is a function , and a row-stochastic matrix satisfies for all and for all . The correspondence is defined by the relation .
Equivalence between classical channels and row-stochastic matrices
For finite outcome sets and , this equivalence identifies classical channels (represented as positive unital linear maps) with row-stochastic matrices . A matrix is row-stochastic if it satisfies for all and the normalization condition for every . The correspondence relates a channel to a matrix such that for any function , the value of the processed function at is given by .
Classical pullback along
Given a map between outcome types, the classical pullback is the positive unital linear map that sends a function to the composition . This map represents a deterministic classical channel where an outcome is assigned the value ; in the Heisenberg picture, it pulls back observables (functions on ) to functions on .
For any set of outcomes , the classical pullback associated with the identity function is the identity unital positive linear map on the space of observables .
For any outcome types , and , and any relabeling maps and , the composition of the classical pullback along and the classical pullback along is equal to the classical pullback along the composite map : where is the positive unital linear map that pulls back observables (functions to ) along . This demonstrates that the classical pullback is a contravariant functor from outcome types to classical channels.
Pointwise application of the classical pullback:
Given a map between outcome types , the classical pullback of applied to a function and evaluated at an outcome is equal to .
