Documentation

CslibFrontier.Foundations.Quantum.Measurement.Classical

Classical readout with retained quantum memory #

A function f : ι → A declares which classical value is read from a computational basis index. Outcome y applies the existing projection onto the fiber f ⁻¹' {y}. Conjugation by its matrix retains the entire active register, including coherence within each fiber. Its trace is the outcome probability, agreeing with the existing basis-density PMF mapped by f.

This is the projective update rule of de Wolf, §15.1, p. 128, restricted to diagonal projectors. The PMF and reference-register bridges are original formalization infrastructure. Conditional reference states can change; only the sum of all branches preserves the reference.

Main definitions #

Main results #

References #

noncomputable def Cslib.Quantum.outcomeProjection {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (y : A) :
Matrix ι ι ℂ

The matrix of projection onto the computational basis indices reporting y.

theorem Cslib.Quantum.outcomeProjection_eq_diagonal {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (y : A) :
outcomeProjection f y = Matrix.diagonal fun (i : ι) => if f i = y then 1 else 0

The projector is diagonal, with ones exactly on the reported fiber.

@[simp]
theorem Cslib.Quantum.outcomeProjection_toEuclideanLin {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (y : A) :

As a linear map, the matrix acts by the existing amplitude projection.

@[simp]

Every outcome projector is self-adjoint.

@[simp]
theorem Cslib.Quantum.outcomeProjection_mul_self {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (y : A) :

Projecting onto one classical fiber twice is the same as projecting once.

theorem Cslib.Quantum.sum_outcomeProjection {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] [Fintype A] (f : ι → A) :
∑ y : A, outcomeProjection f y = 1

The outcome projectors form a complete family.

noncomputable def Cslib.Quantum.classicalDensityBranch {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (y : A) :

The subnormalized branch retains the full register and the coherence inside the fiber.

theorem Cslib.Quantum.classicalDensityBranch_apply {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (y : A) (ρ : Matrix ι ι ℂ) (i j : ι) :
(classicalDensityBranch f y) ρ i j = if f i = y ∧ f j = y then ρ i j else 0

A branch masks both matrix indices by the declared readout, not by the whole basis index.

theorem Cslib.Quantum.classicalDensityBranch_posSemidef {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (y : A) {ρ : Matrix ι ι ℂ} (hρ : ρ.PosSemidef) :

Conjugation by an outcome projector preserves positivity.

theorem Cslib.Quantum.trace_classicalDensityBranch {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (y : A) (ρ : Matrix ι ι ℂ) :
((classicalDensityBranch f y) ρ).trace = ∑ i : ι, if f i = y then ρ i i else 0

Branch mass is the sum of the diagonal entries in its fiber.

theorem Cslib.Quantum.sum_trace_classicalDensityBranch {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] [Fintype A] (f : ι → A) (ρ : Matrix ι ι ℂ) :
∑ y : A, ((classicalDensityBranch f y) ρ).trace = ρ.trace

All branch masses sum to the original trace, without a normalization assumption.

theorem Cslib.Quantum.map_measureDensity_basis_apply {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (ρ : Matrix ι ι ℂ) (hρ : IsDensityMatrix ρ) (y : A) :

Branch traces give the existing basis measurement followed by classical postprocessing.

theorem Cslib.Quantum.trace_classicalDensityBranch_pos_of_mem_support {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (ρ : Matrix ι ι ℂ) (hρ : IsDensityMatrix ρ) (y : A) (hy : y ∈ (PMF.map f (POVM.basis.measureDensity ρ hρ)).support) :

A supported outcome has strictly positive branch trace, so its state can be normalized.

Supported classical branches normalize to density matrices.

Weighting a normalized branch by its outcome probability recovers the subnormalized branch. This identity also covers impossible outcomes without supplying a default density matrix.

theorem Cslib.Quantum.classicalDensityBranch_eq_zero_of_not_mem_support {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (ρ : Matrix ι ι ℂ) (hρ : IsDensityMatrix ρ) (y : A) (hy : y ∉ (PMF.map f (POVM.basis.measureDensity ρ hρ)).support) :

An impossible classical outcome has the zero matrix as its subnormalized branch.

theorem Cslib.Quantum.bindOnSupport_classicalDensityBranch_apply {ι : Type u_1} {κ : Type u_2} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] [Fintype A] [Fintype κ] [DecidableEq κ] {B : Type u_4} [Fintype B] (f : ι → A) (ρ : Matrix ι ι ℂ) (hρ : IsDensityMatrix ρ) (L : A → Matrix ι ι ℂ →ₗ[ℂ] Matrix κ κ ℂ) (hL : ∀ (y : A) (σ : Matrix ι ι ℂ), IsDensityMatrix σ → IsDensityMatrix ((L y) σ)) (M : A → POVM B κ) (b : B) :
((PMF.map f (POVM.basis.measureDensity ρ hρ)).bindOnSupport fun (y : A) (hy : y ∈ (PMF.map f (POVM.basis.measureDensity ρ hρ)).support) => (M y).measureDensity ((L y) (normalizeDensity ((classicalDensityBranch f y) ρ))) ⋯) b = ∑ y : A, ENNReal.ofReal ((M y).densityProb ((L y) ((classicalDensityBranch f y) ρ)) b)

Supported normalized continuation agrees with the sum of subnormalized branches after linear state evolution and POVM readout. No continuation is evaluated at a null branch.

theorem Cslib.Quantum.classicalDensityBranch_pureState {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] (f : ι → A) (y : A) (ψ : EuclideanSpace ℂ ι) :
(classicalDensityBranch f y) (pureState ψ) = pureState ((projOutcomes fun (i : ι) => f i = y) ψ)

On pure states, each density branch is exactly the projected vector's rank-one matrix.

theorem Cslib.Quantum.outcomeProjection_comp_fst {ι : Type u_1} {κ : Type u_2} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] [Fintype κ] [DecidableEq κ] (f : ι → A) (y : A) :
outcomeProjection (f ∘ Prod.fst) y = Matrix.kroneckerMap (fun (x1 x2 : ℂ) => x1 * x2) (outcomeProjection f y) 1

Reading only the active factor acts as the identity on the reference factor.

theorem Cslib.Quantum.partialTraceLeft_sum_classicalDensityBranch {ι : Type u_1} {κ : Type u_2} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] [Fintype A] [Fintype κ] [DecidableEq κ] (f : ι → A) (ρ : Matrix (ι × κ) (ι × κ) ℂ) :

Discarding the classical outcome preserves the reference marginal, even for entangled inputs. Individual conditional reference states need not agree with the original marginal.

noncomputable def Cslib.Quantum.POVM.afterRead {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] {B : Type u_4} [Fintype A] [Fintype B] (f : ι → A) (M : A → POVM B ι) :
POVM B ι

Pull a measurement back through a coarse computational-basis read whose result chooses the subsequent measurement.

theorem Cslib.Quantum.POVM.measureDensity_afterRead {ι : Type u_1} {A : Type u_3} [Fintype ι] [DecidableEq ι] [DecidableEq A] {B : Type u_4} [Fintype A] [Fintype B] (f : ι → A) (M : A → POVM B ι) (ρ : Matrix ι ι ℂ) (hρ : IsDensityMatrix ρ) :

After the classical read, only supported branches enter the continuation measurement.