Physlib Documentation

Physlib.QuantumMechanics.DDimensions.Operators.StateObservables.Variance

Variance and standard deviation #

The variance of a partial linear map T in a state ψ is ‖Tψ - ⟨T⟩_ψ ψ‖ ^ 2. It only requires ψ ∈ T.domain.

When T is symmetric, ‖ψ‖ = 1, and Tψ ∈ T.domain, it also equals ⟨T^2⟩_ψ - ⟨T⟩_ψ ^ 2.

Main definitions #

Main statements #

References #

Variance ‖Tψ - ⟨T⟩_ψ ψ‖ ^ 2; only ψ ∈ T.domain is required.

Equations
Instances For

    The variance is the squared norm of the centered vector.

    theorem LinearPMap.variance_eq_norm_sub_sq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace H] (T : H →ₗ.[] H) (ψ : T.domain) :
    T.variance ψ = T ψ - (T.expectedValue ψ) ψ ^ 2

    variance with centered unfolded to Tψ - ⟨T⟩_ψ • ψ.

    theorem LinearPMap.variance_eq_norm_sq_sub_expectedValue_sq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace H] (T : H →ₗ.[] H) (hT : T.IsSymmetric) (ψ : T.domain) (hψ_norm : ψ = 1) :
    T.variance ψ = T ψ ^ 2 - T.expectedValue ψ ^ 2

    For symmetric T and ‖ψ‖ = 1, variance equals ‖Tψ‖ ^ 2 - ⟨T⟩_ψ ^ 2.

    Variance is nonnegative.

    Zero variance is the same as a zero centered vector.

    theorem LinearPMap.variance_eq_zero_iff {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace H] (T : H →ₗ.[] H) (ψ : T.domain) :
    T.variance ψ = 0 T ψ = (T.expectedValue ψ) ψ

    Zero variance is the same as Tψ = ⟨T⟩_ψ ψ.

    theorem LinearPMap.variance_eq_zero_iff_isEigenvector {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace H] (T : H →ₗ.[] H) (ψ : T.domain) (hψ_norm : ψ = 1) :
    T.variance ψ = 0 T.IsEigenvector ψ (T.expectedValue ψ)

    For ‖ψ‖ = 1, zero variance iff ψ is an eigenvector with eigenvalue ⟨T⟩_ψ.

    noncomputable def LinearPMap.standardDeviation {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace H] (T : H →ₗ.[] H) (ψ : T.domain) :

    Standard deviation √(variance) for ψ ∈ T.domain.

    Equations
    Instances For

      The standard deviation, unfolded to the square root of the variance.

      Standard deviation is nonnegative.

      Zero standard deviation is the same as a zero centered vector.

      theorem LinearPMap.standardDeviation_eq_zero_iff {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace H] (T : H →ₗ.[] H) (ψ : T.domain) :
      T.standardDeviation ψ = 0 T ψ = (T.expectedValue ψ) ψ

      Zero standard deviation is the same as Tψ = ⟨T⟩_ψ ψ.

      For ‖ψ‖ = 1, zero standard deviation iff the eigenvector condition holds.

      theorem LinearPMap.re_inner_apply_sq_eq_norm_sq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace H] (T : H →ₗ.[] H) (hT : T.IsSymmetric) (ψ : T.domain) (hTψ : T ψ T.domain) :
      (inner (↑ψ) (T T ψ, hTψ)).re = T ψ ^ 2

      For symmetric T, re ⟪ψ, T(Tψ)⟫ is ‖Tψ‖ ^ 2.

      theorem LinearPMap.variance_eq_re_inner_sub_expectedValue_sq {H : Type u_1} [NormedAddCommGroup H] [InnerProductSpace H] (T : H →ₗ.[] H) (hT : T.IsSymmetric) (ψ : T.domain) (hTψ : T ψ T.domain) (hψ_norm : ψ = 1) :
      T.variance ψ = (inner (↑ψ) (T T ψ, hTψ)).re - T.expectedValue ψ ^ 2

      When Tψ ∈ T.domain, variance equals ⟨T^2⟩_ψ - ⟨T⟩_ψ ^ 2.