Ordered projective measurements, outcome probabilities and conditional states
DefinitionGaoQuantumUnion_ModelFinite complex matrices are used. An orthogonal projector is Hermitian and idempotent. For a family indexed in ascending order, the sequential operator is , defined as the identity for an empty sequence. The unnormalized output is and its real trace is the joint success probability . Failure terms are , summed on the original input. The conditional state is ; Lean makes it zero when , and every disturbance theorem separately requires . Rank-one matrices and unit-vector predicates support the pure-state lemma. Definitions impose no theorem hypotheses; the theorems supply density and projector assumptions.
import Definitions.Def_WildeQIT_traceDist
import Definitions.Def_WildeQIT_IsDensityOperator
import Mathlib.Analysis.Matrix.Order
import Mathlib.Data.List.OfFn
noncomputable section
open Matrix WildeQIT
open scoped MatrixOrder ComplexOrder ComplexConjugate
set_option autoImplicit false
namespace GaoQuantumUnion
variable {ι : Type} [Fintype ι] [DecidableEq ι]
def IsProjector (P : Matrix ι ι ℂ) : Prop := P.IsHermitian ∧ P*P=P
def seqOp {N : ℕ} (P : Fin N → Matrix ι ι ℂ) : Matrix ι ι ℂ :=
(List.ofFn P).foldl (fun K Q => Q*K) 1
def seqOutput {N : ℕ} (P : Fin N → Matrix ι ι ℂ) (ρ : Matrix ι ι ℂ) : Matrix ι ι ℂ :=
seqOp P*ρ*(seqOp P)ᴴ
def successProb {N : ℕ} (P : Fin N → Matrix ι ι ℂ) (ρ : Matrix ι ι ℂ) : ℝ :=
(seqOutput P ρ).trace.re
def failureTerm (P ρ : Matrix ι ι ℂ) : ℝ := ((1-P)*ρ).trace.re
def failureSum {N : ℕ} (P : Fin N → Matrix ι ι ℂ) (ρ : Matrix ι ι ℂ) : ℝ :=
∑ i, failureTerm (P i) ρ
def postState {N : ℕ} (P : Fin N → Matrix ι ι ℂ) (ρ : Matrix ι ι ℂ) : Matrix ι ι ℂ :=
(successProb P ρ : ℂ)⁻¹ • seqOutput P ρ
def pureState (ψ : ι → ℂ) : Matrix ι ι ℂ := vecMulVec ψ (star ψ)
def IsUnitVector (ψ : ι → ℂ) : Prop := ∑ i, ‖ψ i‖^2=1
end GaoQuantumUnion
Read-back
What the Lean code literally says, in plain math · OpenAI Codex (independent blind read-back agent)
IsProjector. For every finite type and every complex matrix with rows and columns indexed by , is the proposition that is Hermitian, meaning , and that , where denotes the conjugate transpose. No assumption that is nonempty is made; the unique matrix on an empty index type satisfies both conditions.
seqOp. For every finite type equipped with decidable equality, every natural number , and every family of complex matrices indexed by , define , where and for , with the identity matrix. Thus, when , its value is , and when , its value is . No Hermitian or idempotence assumption is imposed on the matrices, and the index type may be empty.
seqOutput. For every finite type equipped with decidable equality, every natural number , every family of complex matrices indexed by , and every complex matrix indexed by , define , where for , for , and is the conjugate transpose. In particular, for the value is . Neither the matrices nor are subject to any Hermitian, positivity, idempotence, or normalization hypothesis; may be empty.
successProb. For every finite type equipped with decidable equality, every natural number , every family of complex matrices indexed by , and every complex matrix indexed by , define the real number , where for , for , and denotes conjugate transpose. For this is , and for empty it is zero. There are no hypotheses on the matrices that require this real number to lie in .
failureTerm. For every finite type equipped with decidable equality and every two complex matrices indexed by , define the real number , where is the identity matrix. No Hermitian, positivity, idempotence, or normalization assumptions are imposed, so no sign or probability range is required for this value; if is empty, it is zero.
failureSum. For every finite type equipped with decidable equality, every natural number , every family of complex matrices indexed by , and every complex matrix indexed by , define as a real number, with the identity matrix. This is zero when because the sum is empty, and is also zero when is empty. No Hermitian, positivity, idempotence, or normalization assumptions are imposed on any matrix.
postState. For every finite type equipped with decidable equality, every natural number , every family of complex matrices indexed by , and every complex matrix indexed by , let for and for , let with the conjugate transpose, and let . Define , where the real number is first embedded in and its complex inverse acts by scalar multiplication. The inverse of zero is defined to be zero, so when the value is the zero matrix, including cases in which is nonzero. For , the same formula is with this zero-inverse convention. No Hermitian, positivity, idempotence, normalization, or nonzero-denominator hypotheses are imposed; may be empty.
pureState. For every type , with no finiteness or decidable-equality assumption, and every function , define to be the complex matrix indexed by whose entry is . No unit-norm or nonzero hypothesis is imposed on ; the zero function gives the zero matrix, and when is empty this is the unique empty matrix.
IsUnitVector. For every finite type and every function , is the proposition , where is the usual complex modulus and the equality is in . The index type may be empty; in that case the sum is zero and this proposition is false.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.