Documentation

CslibFrontier.Foundations.Quantum.Algebra.Approx

Approximation in a state #

Rigidity and self-testing arguments for nonlocal games are long chains of approximations A ≈_δ B: two operators are close in the state φ, ‖A - B‖_φ ≤ δ, where ‖·‖_φ is the state-dependent norm √(Re φ(a⋆a)) Ji, Natarajan, Vidick, Wright and Yuen, §5.2, Definition 5.16. The relation a ≈[φ; δ] b (Cslib.Quantum.AlgState.Approx) is that statement. Definition 5.16 bounds the squared distance, averaged over questions, by O(δ); here the distance itself is bounded by δ, so a ≈[φ; √δ] b is the paper's ≈_δ up to the constant. It is the generic closeness Cslib.Close through the GNS map, whose calculus it inherits. Its errors add along chains: there is a Trans instance, so

calc a ≈[φ; δ₁] b := h₁
  _ ≈[φ; δ₂] c := h₂

proves a ≈[φ; δ₁ + δ₂] c. Closeness is preserved by sums, scalar multiples and multiplication on the left by contractions (Cslib.Quantum.AlgState.Approx.mul_left), and close operators have close expectations (Cslib.Quantum.AlgState.Approx.norm_apply_sub_le). Multiplication on the right does not preserve closeness in a state; arguments that need it move the operator to the other prover first.

Most closeness statements in the literature are on average over a question distribution μ: E_{q ∼ μ} ‖A_q - B_q‖²_φ ≤ δ². These need no separate theory. The weighted state Cslib.Quantum.AlgState.avg μ φ on the product algebra Q → A gives the families A = (A_q)_q the averaged norm (Cslib.Quantum.AlgState.norm_avg_sq), so averaged closeness is A ≈[avg μ φ; δ] B and the whole calculus applies to it unchanged.

Main definitions #

Main results #

References #

a and b are δ-close in the state φ: ‖a - b‖_φ ≤ δ. This is Cslib.Close through the GNS map, so the generic closeness calculus applies; it is a named relation so that it elaborates under binders.

Instances For

    a and b are δ-close in the state φ: ‖a - b‖_φ ≤ δ. This is Cslib.Close through the GNS map, so the generic closeness calculus applies; it is a named relation so that it elaborates under binders.

    theorem Cslib.Quantum.AlgState.approx_iff {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} :
    φ.Approx δ a b ↔ φ.norm (a - b) ≤ δ
    theorem Cslib.Quantum.AlgState.Approx.refl {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {δ : ℝ} (hδ : 0 ≤ δ) (a : A) :
    φ.Approx δ a a
    theorem Cslib.Quantum.AlgState.Approx.nonneg {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} (h : φ.Approx δ a b) :
    0 ≤ δ
    theorem Cslib.Quantum.AlgState.Approx.symm {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} (h : φ.Approx δ a b) :
    φ.Approx δ b a
    theorem Cslib.Quantum.AlgState.approx_comm {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} :
    φ.Approx δ a b ↔ φ.Approx δ b a
    theorem Cslib.Quantum.AlgState.Approx.mono {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ δ' : ℝ} (h : φ.Approx δ a b) (hδ : δ ≤ δ') :
    φ.Approx δ' a b
    theorem Cslib.Quantum.AlgState.Approx.trans {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b c : A} {δ δ' : ℝ} (h₁ : φ.Approx δ a b) (h₂ : φ.Approx δ' b c) :
    φ.Approx (δ + δ') a c

    Errors add along chains of approximations.

    @[instance_reducible]
    instance Cslib.Quantum.AlgState.instTransApproxHAddReal {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {δ δ' : ℝ} :
    Trans (φ.Approx δ) (φ.Approx δ') (φ.Approx (δ + δ'))
    theorem Cslib.Quantum.AlgState.approx_of_eq {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} (h : a = b) (hδ : 0 ≤ δ) :
    φ.Approx δ a b
    theorem Cslib.Quantum.AlgState.Approx.add {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b a' b' : A} {δ δ' : ℝ} (h : φ.Approx δ a b) (h' : φ.Approx δ' a' b') :
    φ.Approx (δ + δ') (a + a') (b + b')
    theorem Cslib.Quantum.AlgState.Approx.neg {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} (h : φ.Approx δ a b) :
    φ.Approx δ (-a) (-b)
    theorem Cslib.Quantum.AlgState.Approx.sub {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b a' b' : A} {δ δ' : ℝ} (h : φ.Approx δ a b) (h' : φ.Approx δ' a' b') :
    φ.Approx (δ + δ') (a - a') (b - b')
    theorem Cslib.Quantum.AlgState.Approx.smul {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} (h : φ.Approx δ a b) (z : ℂ) :
    φ.Approx (‖z‖ * δ) (z • a) (z • b)
    theorem Cslib.Quantum.AlgState.Approx.sum {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {ι : Type u_2} (s : Finset ι) {f g : ι → A} {ε : ι → ℝ} (h : ∀ i ∈ s, φ.Approx (ε i) (f i) (g i)) :
    φ.Approx (∑ i ∈ s, ε i) (∑ i ∈ s, f i) (∑ i ∈ s, g i)

    Errors add over finite sums.

    theorem Cslib.Quantum.AlgState.norm_add_sq_le {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] (φ : AlgState A) (x y : A) :
    φ.norm (x + y) ^ 2 ≤ 2 * (φ.norm x ^ 2 + φ.norm y ^ 2)

    The squared state seminorm of a sum is at most twice the sum of the squares.

    theorem Cslib.Quantum.AlgState.norm_mul_le_of_star_mul_self_le_one {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] (φ : AlgState A) {u : A} (hu : star u * u ≤ 1) (x : A) :
    φ.norm (u * x) ≤ φ.norm x

    Left multiplication by a contraction does not increase the state norm.

    theorem Cslib.Quantum.AlgState.Approx.mul_left {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} (h : φ.Approx δ a b) {u : A} (hu : star u * u ≤ 1) :
    φ.Approx δ (u * a) (u * b)

    Left multiplication by a contraction preserves closeness.

    theorem Cslib.Quantum.AlgState.approx_norm_sub {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] (φ : AlgState A) (a b : A) :
    φ.Approx (φ.norm (a - b)) a b

    Every pair is close up to its own distance: a ≈[φ; ‖a - b‖_φ] b. Names a step of a closeness chain whose error is left symbolic.

    theorem Cslib.Quantum.AlgState.Approx.mul_left_unitary {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} (h : φ.Approx δ a b) {u : A} (hu : u ∈ unitary A) :
    φ.Approx δ (u * a) (u * b)

    Left multiplication by a unitary preserves closeness.

    theorem Cslib.Quantum.AlgState.Approx.mul_left_of_norm_mul_le {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} (h : φ.Approx δ a b) {u : A} {k : ℝ} (hk : 0 ≤ k) (hu : ∀ (y : A), φ.norm (u * y) ≤ k * φ.norm y) :
    φ.Approx (k * δ) (u * a) (u * b)

    Left multiplication by an operator that stretches the state norm by at most k turns δ-closeness into kδ-closeness.

    The expectation of an operator is bounded by its state norm.

    theorem Cslib.Quantum.AlgState.Approx.norm_apply_sub_le {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} (h : φ.Approx δ a b) :
    ‖φ a - φ b‖ ≤ δ

    Close operators have close expectations.

    theorem Cslib.Quantum.AlgState.Approx.norm_apply_star_mul_sub_le {A : Type u_1} [Ring A] [StarRing A] [PartialOrder A] [StarOrderedRing A] [Algebra ℂ A] [StarModule ℂ A] [SelfAdjointDecompose A] {φ : AlgState A} {a b : A} {δ : ℝ} (h : φ.Approx δ a b) (c : A) :
    ‖φ (star c * a) - φ (star c * b)‖ ≤ φ.norm c * δ

    Close operators have close correlations with any fixed operator: |φ(c⋆a) - φ(c⋆b)| ≤ ‖c‖_φ δ.

    Averages over questions #

    noncomputable def Cslib.Quantum.AlgState.avg {A : Type u_1} [Ring A] [PartialOrder A] [Algebra ℂ A] {Q : Type u_2} [Fintype Q] (μ : PMF Q) (φ : Q → AlgState A) :
    AlgState (Q → A)

    The weighted state f ↦ ∑_q μ(q) φ_q(f_q) on the product algebra Q → A.

    theorem Cslib.Quantum.AlgState.avg_apply {A : Type u_1} [Ring A] [PartialOrder A] [Algebra ℂ A] {Q : Type u_2} [Fintype Q] (μ : PMF Q) (φ : Q → AlgState A) (f : Q → A) :
    (avg μ φ) f = ∑ q : Q, ↑(μ q).toReal * (φ q) (f q)
    theorem Cslib.Quantum.AlgState.norm_avg_sq {A : Type u_1} [Ring A] [PartialOrder A] [Algebra ℂ A] {Q : Type u_2} [Fintype Q] [StarRing A] [StarOrderedRing A] [StarModule ℂ A] [SelfAdjointDecompose A] (μ : PMF Q) (φ : Q → AlgState A) (f : Q → A) :
    (avg μ φ).norm f ^ 2 = ∑ q : Q, (μ q).toReal * (φ q).norm (f q) ^ 2

    The state norm of the weighted state is the averaged norm, ‖f‖²_{avg μ φ} = ∑_q μ(q) ‖f_q‖²_{φ_q}.

    theorem Cslib.Quantum.AlgState.approx_avg_iff {A : Type u_1} [Ring A] [PartialOrder A] [Algebra ℂ A] {Q : Type u_2} [Fintype Q] [StarRing A] [StarOrderedRing A] [StarModule ℂ A] [SelfAdjointDecompose A] {μ : PMF Q} {φ : Q → AlgState A} {f g : Q → A} {δ : ℝ} (hδ : 0 ≤ δ) :
    (avg μ φ).Approx δ f g ↔ ∑ q : Q, (μ q).toReal * (φ q).norm (f q - g q) ^ 2 ≤ δ ^ 2

    Averaged closeness: f ≈[avg μ φ; δ] g exactly when E_q ‖f_q - g_q‖² ≤ δ².

    theorem Cslib.Quantum.AlgState.approx_avg_of_forall {A : Type u_1} [Ring A] [PartialOrder A] [Algebra ℂ A] {Q : Type u_2} [Fintype Q] [StarRing A] [StarOrderedRing A] [StarModule ℂ A] [SelfAdjointDecompose A] {μ : PMF Q} {φ : Q → AlgState A} {f g : Q → A} {δ : ℝ} (h : ∀ (q : Q), (φ q).Approx δ (f q) (g q)) (hδ : 0 ≤ δ) :
    (avg μ φ).Approx δ f g

    Closeness for every question gives closeness on average.