Documentation

CslibFrontier.Computability.QueryComplexity.Quantum.WeightedAdversary

Weighted quantum adversary method #

A weighted adversary scheme (Cslib.Quantum.WeightScheme) attaches nonnegative pair weights w(x, y) to a relation R of input pairs and nonnegative coordinate weights u(x, y, i) and v(x, y, i) satisfying w(x, y)² ≤ u(x, y, i) · v(x, y, i) whenever xᵢ ≠ yᵢ [Amb06], Section 3.3, Definitions 1–3; [Zha05], Definition 1.

From the endpoint weights wtFst x = ∑_{(x, y) ∈ R} w(x, y) and wtSnd y = ∑_{(x, y) ∈ R} w(x, y) and coordinate loads loadFst x i and loadSnd y i, balancing Cslib.Quantum.one_sub_mul_sum_le_of_sq_le across the two endpoints yields:

Main definitions #

Main results #

References #

A weighted adversary scheme on N-bit inputs ([Amb06], Section 3.3, Definition 1; [Zha05], Definition 1): nonnegative pair weights w on R and coordinate weights u, v satisfying w(x, y)² ≤ u(x, y, i) · v(x, y, i) whenever (x, y) ∈ R and xᵢ ≠ yᵢ.

theorem Cslib.Quantum.WeightScheme.ext {N : ℕ} {x y : WeightScheme N} (R : x.R = y.R) (w : x.w = y.w) (u : x.u = y.u) (v : x.v = y.v) :
x = y
theorem Cslib.Quantum.WeightScheme.ext_iff {N : ℕ} {x y : WeightScheme N} :
x = y ↔ x.R = y.R ∧ x.w = y.w ∧ x.u = y.u ∧ x.v = y.v

Total pair weight of a weight scheme.

noncomputable def Cslib.Quantum.WeightScheme.wtFst {N : ℕ} (S : WeightScheme N) (x : BitString N) :

Total weight wt(x) of pairs in R with first endpoint x.

noncomputable def Cslib.Quantum.WeightScheme.wtSnd {N : ℕ} (S : WeightScheme N) (y : BitString N) :

Total weight wt(y) of pairs in R with second endpoint y.

noncomputable def Cslib.Quantum.WeightScheme.loadFst {N : ℕ} (S : WeightScheme N) (x : BitString N) (i : Fin N) :

Coordinate load v(x, i) of coordinate i at first endpoint x.

noncomputable def Cslib.Quantum.WeightScheme.loadSnd {N : ℕ} (S : WeightScheme N) (y : BitString N) (i : Fin N) :

Coordinate load v(y, i) of coordinate i at second endpoint y.

theorem Cslib.Quantum.WeightScheme.one_sub_mul_sum_le {N : ℕ} {W : Type u_1} [Fintype W] (S : WeightScheme N) (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) {δ : ℝ} (hδ : ∀ p ∈ S.R, ‖inner ℂ (run U ψ₀ p.1 T) (run U ψ₀ p.2 T)‖ ≤ δ) {vA vB : ℝ} (hvA : 0 ≤ vA) (hvB : 0 ≤ vB) (hA : ∀ x ∈ Finset.image Prod.fst S.R, ∀ (i : Fin N), S.loadFst x i ≤ vA * S.wtFst x) (hB : ∀ y ∈ Finset.image Prod.snd S.R, ∀ (i : Fin N), S.loadSnd y i ≤ vB * S.wtSnd y) :
(1 - δ) * S.weightSum ≤ 2 * ↑T * √(vA * vB) * S.weightSum

Weighted quantum adversary bound ([Amb06], Section 3.3, Lemma 1): if T queries leave every related pair with state overlap at most δ, and the coordinate loads satisfy loadFst x i ≤ vA · wtFst x and loadSnd y i ≤ vB · wtSnd y, then (1 - δ) ∑_{(x, y) ∈ R} w(x, y) ≤ 2 T √(vA · vB) ∑_{(x, y) ∈ R} w(x, y).

theorem Cslib.Quantum.WeightScheme.one_sub_two_mul_sqrt_mul_sum_le {N : ℕ} {W : Type u_1} [Fintype W] (S : WeightScheme N) (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (S_acc : Finset (Fin N × Bool × W)) {ε : ℝ} (h₁ : ∀ p ∈ S.R, 1 - ε ≤ measureProb (run U ψ₀ p.1 T) S_acc) (h₂ : ∀ p ∈ S.R, measureProb (run U ψ₀ p.2 T) S_acc ≤ ε) (hε : 2 * ε ≤ 1) {vA vB : ℝ} (hvA : 0 ≤ vA) (hvB : 0 ≤ vB) (hA : ∀ x ∈ Finset.image Prod.fst S.R, ∀ (i : Fin N), S.loadFst x i ≤ vA * S.wtFst x) (hB : ∀ y ∈ Finset.image Prod.snd S.R, ∀ (i : Fin N), S.loadSnd y i ≤ vB * S.wtSnd y) :
(1 - 2 * √(ε * (1 - ε))) * S.weightSum ≤ 2 * ↑T * √(vA * vB) * S.weightSum

Weighted quantum adversary bound for Boolean outputs ([Amb06], Lemma 1): if a T-query algorithm accepts the first input of every pair in R with probability at least 1 - ε and the second with probability at most ε ≤ 1/2, then (1 - 2√(ε(1-ε))) ∑ w ≤ 2 T √(vA · vB) ∑ w.

theorem Cslib.Quantum.WeightScheme.one_sub_mul_sqrt_le_of_load_le {N : ℕ} {W : Type u_1} [Fintype W] (S : WeightScheme N) (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (hW : 0 < S.weightSum) {δ : ℝ} (hδ : ∀ p ∈ S.R, ‖inner ℂ (run U ψ₀ p.1 T) (run U ψ₀ p.2 T)‖ ≤ δ) {mA mB : ℝ} (hmA : 0 ≤ mA) (hmB : 0 ≤ mB) (hA : ∀ x ∈ Finset.image Prod.fst S.R, ∀ (i : Fin N), mA * S.loadFst x i ≤ S.wtFst x) (hB : ∀ y ∈ Finset.image Prod.snd S.R, ∀ (i : Fin N), mB * S.loadSnd y i ≤ S.wtSnd y) :
(1 - δ) * √(mA * mB) ≤ 2 * ↑T

Weighted quantum adversary bound, ratio form ([Zha05], Theorem 3, Alb₃): if 0 < ∑ p ∈ R, w p, mA · loadFst x i ≤ wtFst x, and mB · loadSnd y i ≤ wtSnd y, then (1 - δ) √(mA · mB) ≤ 2 T.

theorem Cslib.Quantum.WeightScheme.one_sub_two_mul_sqrt_mul_sqrt_le_of_load_le {N : ℕ} {W : Type u_1} [Fintype W] (S : WeightScheme N) (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (hW : 0 < S.weightSum) (S_acc : Finset (Fin N × Bool × W)) {ε : ℝ} (h₁ : ∀ p ∈ S.R, 1 - ε ≤ measureProb (run U ψ₀ p.1 T) S_acc) (h₂ : ∀ p ∈ S.R, measureProb (run U ψ₀ p.2 T) S_acc ≤ ε) (hε : 2 * ε ≤ 1) {mA mB : ℝ} (hmA : 0 ≤ mA) (hmB : 0 ≤ mB) (hA : ∀ x ∈ Finset.image Prod.fst S.R, ∀ (i : Fin N), mA * S.loadFst x i ≤ S.wtFst x) (hB : ∀ y ∈ Finset.image Prod.snd S.R, ∀ (i : Fin N), mB * S.loadSnd y i ≤ S.wtSnd y) :
(1 - 2 * √(ε * (1 - ε))) * √(mA * mB) ≤ 2 * ↑T

Weighted quantum adversary bound for Boolean outputs, ratio form ([Zha05], Theorem 3): (1 - 2√(ε(1-ε))) √(mA · mB) ≤ 2 T.

noncomputable def Cslib.Quantum.WeightScheme.ofUnweighted {N : ℕ} (R : Finset (BitString N × BitString N)) (L : ℕ) (hL : ∀ p ∈ R, ∀ (i : Fin N), p.1 i ≠ p.2 i → {q ∈ R | q.1 i ≠ q.2 i ∧ q.1 = p.1}.card * {q ∈ R | q.1 i ≠ q.2 i ∧ q.2 = p.2}.card ≤ L) :

Weight scheme induced by an unweighted adversary relation (R, L) with l_{x,i} · l_{y,i} ≤ L ([Zha05], Theorem 5): w(p) = 1, u(p, i) = √L / l_{x,i}, and v(p, i) = √L / l_{y,i}.

theorem Cslib.Quantum.WeightScheme.ofUnweighted_wtFst {N : ℕ} {R : Finset (BitString N × BitString N)} {L : ℕ} (hL : ∀ p ∈ R, ∀ (i : Fin N), p.1 i ≠ p.2 i → {q ∈ R | q.1 i ≠ q.2 i ∧ q.1 = p.1}.card * {q ∈ R | q.1 i ≠ q.2 i ∧ q.2 = p.2}.card ≤ L) (x : BitString N) :
(ofUnweighted R L hL).wtFst x = ↑{q ∈ R | q.1 = x}.card
theorem Cslib.Quantum.WeightScheme.ofUnweighted_wtSnd {N : ℕ} {R : Finset (BitString N × BitString N)} {L : ℕ} (hL : ∀ p ∈ R, ∀ (i : Fin N), p.1 i ≠ p.2 i → {q ∈ R | q.1 i ≠ q.2 i ∧ q.1 = p.1}.card * {q ∈ R | q.1 i ≠ q.2 i ∧ q.2 = p.2}.card ≤ L) (y : BitString N) :
(ofUnweighted R L hL).wtSnd y = ↑{q ∈ R | q.2 = y}.card
theorem Cslib.Quantum.WeightScheme.ofUnweighted_loadFst_le {N : ℕ} {R : Finset (BitString N × BitString N)} {L : ℕ} (hL : ∀ p ∈ R, ∀ (i : Fin N), p.1 i ≠ p.2 i → {q ∈ R | q.1 i ≠ q.2 i ∧ q.1 = p.1}.card * {q ∈ R | q.1 i ≠ q.2 i ∧ q.2 = p.2}.card ≤ L) (x : BitString N) (i : Fin N) :
(ofUnweighted R L hL).loadFst x i ≤ √↑L
theorem Cslib.Quantum.WeightScheme.ofUnweighted_loadSnd_le {N : ℕ} {R : Finset (BitString N × BitString N)} {L : ℕ} (hL : ∀ p ∈ R, ∀ (i : Fin N), p.1 i ≠ p.2 i → {q ∈ R | q.1 i ≠ q.2 i ∧ q.1 = p.1}.card * {q ∈ R | q.1 i ≠ q.2 i ∧ q.2 = p.2}.card ≤ L) (y : BitString N) (i : Fin N) :
(ofUnweighted R L hL).loadSnd y i ≤ √↑L