Documentation

CslibFrontier.Computability.QueryComplexity.Quantum.SpectralAdversary

Spectral and negative-weight quantum adversary bounds #

This module develops the spectral adversary (Cslib.Quantum.spectralAdversary, denoted ADV) and general negative-weight adversary (Cslib.Quantum.generalAdversary, denoted ADV±) bounds on quantum query complexity, together with their bridges to sensitivity and weighted adversary schemes:

Main definitions #

Main results #

References #

Coordinate-disagreement matrix Dᵢ: entry (x, y) is 1 if xᵢ ≠ yᵢ and 0 otherwise.

@[simp]
theorem Cslib.Quantum.diffMatrix_apply {N : ℕ} (i : Fin N) (x y : BitString N) :
diffMatrix i x y = if x i ≠ y i then 1 else 0
noncomputable def Cslib.Quantum.maxDiffNorm {N : ℕ} (Γ : Matrix (BitString N) (BitString N) ℝ) :

Maximum coordinate-masked operator norm max_{i < N} ‖Γ ∘ Dᵢ‖ (0 when N = 0).

def Cslib.Quantum.IsAdversaryMatrix {N : ℕ} {α : Type u_1} (P : BitString N → Prop) (f : BitString N → α) (Γ : Matrix (BitString N) (BitString N) ℝ) :

Support condition for an adversary matrix of a partial function (P, f): every nonzero entry (x, y) connects valid inputs with distinct outputs.

theorem Cslib.Quantum.eq_zero_of_maxDiffNorm_eq_zero {N : ℕ} {α : Type u_1} {P : BitString N → Prop} {f : BitString N → α} {Γ : Matrix (BitString N) (BitString N) ℝ} (hΓ : IsAdversaryMatrix P f Γ) (h0 : maxDiffNorm Γ = 0) :
Γ = 0
noncomputable def Cslib.Quantum.spectralAdversary {N : ℕ} {α : Type u_1} (P : BitString N → Prop) (f : BitString N → α) :

Nonnegative spectral adversary bound ADV(f) ([BSS03], as reviewed in [HLS07], Section 1.1, Definition 1): the supremum of ‖Γ‖ / maxDiffNorm Γ over real symmetric nonnegative matrices supported on pairs (x, y) with P x, P y, and f x ≠ f y.

noncomputable def Cslib.Quantum.generalAdversary {N : ℕ} {α : Type u_1} (P : BitString N → Prop) (f : BitString N → α) :

Negative-weight adversary bound ADV±(f) ([HLS07], Definition 2): the supremum of ‖Γ‖ / maxDiffNorm Γ over all real symmetric matrices supported on pairs (x, y) with P x, P y, and f x ≠ f y.

theorem Cslib.Quantum.bddAbove_spectralAdversary {N : ℕ} {α : Type u_1} (P : BitString N → Prop) (f : BitString N → α) :
BddAbove {r : ℝ | ∃ (Γ : Matrix (BitString N) (BitString N) ℝ), Γ.IsSymm ∧ (∀ (x y : BitString N), 0 ≤ Γ x y) ∧ IsAdversaryMatrix P f Γ ∧ r = ‖Matrix.toEuclideanCLM Γ‖ / maxDiffNorm Γ}
theorem Cslib.Quantum.spectralAdversary_nonneg {N : ℕ} {α : Type u_1} (P : BitString N → Prop) (f : BitString N → α) :
theorem Cslib.Quantum.generalAdversary_nonneg {N : ℕ} {α : Type u_1} (P : BitString N → Prop) (f : BitString N → α) :
theorem Cslib.Quantum.le_spectralAdversary {N : ℕ} {α : Type u_1} {P : BitString N → Prop} {f : BitString N → α} {Γ : Matrix (BitString N) (BitString N) ℝ} (hsym : Γ.IsSymm) (hnonneg : ∀ (x y : BitString N), 0 ≤ Γ x y) (hΓ : IsAdversaryMatrix P f Γ) :
theorem Cslib.Quantum.le_generalAdversary {N : ℕ} {α : Type u_1} {P : BitString N → Prop} {f : BitString N → α} {Γ : Matrix (BitString N) (BitString N) ℝ} (hsym : Γ.IsSymm) (hΓ : IsAdversaryMatrix P f Γ) :
theorem Cslib.Quantum.spectralAdversary_le_iff {N : ℕ} {α : Type u_1} {P : BitString N → Prop} {f : BitString N → α} {K : ℝ} (hK : 0 ≤ K) :
spectralAdversary P f ≤ K ↔ ∀ (Γ : Matrix (BitString N) (BitString N) ℝ), Γ.IsSymm → (∀ (x y : BitString N), 0 ≤ Γ x y) → IsAdversaryMatrix P f Γ → ‖Matrix.toEuclideanCLM Γ‖ ≤ K * maxDiffNorm Γ

Upper-bound characterization of spectralAdversary (ADV(f) ≤ K for K ≥ 0).

theorem Cslib.Quantum.generalAdversary_le_iff {N : ℕ} {α : Type u_1} {P : BitString N → Prop} {f : BitString N → α} {K : ℝ} (hK : 0 ≤ K) :

Upper-bound characterization of generalAdversary (ADV±(f) ≤ K for K ≥ 0).

ADV(f) ≤ ADV±(f): the negative-weight adversary bound is at least the nonnegative spectral adversary bound.

theorem Cslib.Quantum.one_sub_mul_opNorm_le_general_boolean {N : ℕ} {W : Type u_1} [Fintype W] {P : BitString N → Prop} {f : BitString N → Bool} {Γ : Matrix (BitString N) (BitString N) ℝ} (hΓ : IsAdversaryMatrix P f Γ) (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (S_acc : Finset (Fin N × Bool × W)) {ε : ℝ} (hε0 : 0 ≤ ε) (hε : 2 * ε ≤ 1) (h₁ : ∀ (x : BitString N), P x → f x = true → 1 - ε ≤ measureProb (run U ψ₀ x T) S_acc) (h₀ : ∀ (x : BitString N), P x → f x = false → measureProb (run U ψ₀ x T) S_acc ≤ ε) :
(1 - 2 * √(ε * (1 - ε))) * ‖Matrix.toEuclideanCLM Γ‖ ≤ 2 * ↑T * maxDiffNorm Γ

Negative-weight adversary bound for Boolean outputs ([HLS07], Theorem 2): for any real matrix Γ supported on {(x, y) | P x ∧ P y ∧ f x ≠ f y} and any T-query algorithm accepting x ∈ P with f x = true with probability at least 1 - ε and accepting x ∈ P with f x = false with probability at most ε ≤ 1/2, (1 - 2√(ε(1-ε))) ‖Γ‖ ≤ 2 T · maxDiffNorm Γ.

theorem Cslib.Quantum.one_sub_mul_generalAdversary_le_boolean {N : ℕ} {W : Type u_1} [Fintype W] {P : BitString N → Prop} {f : BitString N → Bool} (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (S_acc : Finset (Fin N × Bool × W)) {ε : ℝ} (hε0 : 0 ≤ ε) (hε : 2 * ε ≤ 1) (h₁ : ∀ (x : BitString N), P x → f x = true → 1 - ε ≤ measureProb (run U ψ₀ x T) S_acc) (h₀ : ∀ (x : BitString N), P x → f x = false → measureProb (run U ψ₀ x T) S_acc ≤ ε) :
(1 - 2 * √(ε * (1 - ε))) * generalAdversary P f ≤ 2 * ↑T

Negative-weight adversary lower bound ADV±(f) for Boolean functions ([HLS07], Theorem 2): (1 - 2√(ε(1-ε))) ADV±(f) ≤ 2 T.

theorem Cslib.Quantum.one_sub_mul_opNorm_le_general {N : ℕ} {W : Type u_1} [Fintype W] {α : Type u_2} {P : BitString N → Prop} {f : BitString N → α} {Γ : Matrix (BitString N) (BitString N) ℝ} (hΓ : IsAdversaryMatrix P f Γ) (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (S_out : α → Finset (Fin N × Bool × W)) (hdisj : Pairwise (Function.onFun Disjoint S_out)) {ε : ℝ} (hε0 : 0 ≤ ε) (hε : 2 * ε ≤ 1) (herr : ∀ (x : BitString N), P x → 1 - ε ≤ measureProb (run U ψ₀ x T) (S_out (f x))) :
(1 - 2 * √(ε * (1 - ε)) - ε) * ‖Matrix.toEuclideanCLM Γ‖ ≤ 2 * ↑T * maxDiffNorm Γ

Negative-weight adversary bound for arbitrary finite output alphabets: if a T-query algorithm outputs f x with probability at least 1 - ε (ε ≤ 1/2) via pairwise disjoint outcome regions S_out a, then (1 - 2√(ε(1-ε)) - ε) ‖Γ‖ ≤ 2 T · maxDiffNorm Γ.

theorem Cslib.Quantum.one_sub_mul_opNorm_le_general_hls {N : ℕ} {W : Type u_1} [Fintype W] {α : Type u_2} {P : BitString N → Prop} {f : BitString N → α} {Γ : Matrix (BitString N) (BitString N) ℝ} (hΓ : IsAdversaryMatrix P f Γ) (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (S_out : α → Finset (Fin N × Bool × W)) (hdisj : Pairwise (Function.onFun Disjoint S_out)) {ε : ℝ} (hε0 : 0 ≤ ε) (hε : 2 * ε ≤ 1) (herr : ∀ (x : BitString N), P x → 1 - ε ≤ measureProb (run U ψ₀ x T) (S_out (f x))) :
(1 - 2 * √(ε * (1 - ε)) - 2 * ε) * ‖Matrix.toEuclideanCLM Γ‖ ≤ 2 * ↑T * maxDiffNorm Γ

Weakened form matching [HLS07], Theorem 2: (1 - 2√(ε(1-ε)) - 2ε) ‖Γ‖ ≤ 2 T · maxDiffNorm Γ.

theorem Cslib.Quantum.one_sub_mul_generalAdversary_le {N : ℕ} {W : Type u_1} [Fintype W] {α : Type u_2} {P : BitString N → Prop} {f : BitString N → α} (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (S_out : α → Finset (Fin N × Bool × W)) (hdisj : Pairwise (Function.onFun Disjoint S_out)) {ε : ℝ} (hε0 : 0 ≤ ε) (hε : 2 * ε ≤ 1) (herr : ∀ (x : BitString N), P x → 1 - ε ≤ measureProb (run U ψ₀ x T) (S_out (f x))) :
(1 - 2 * √(ε * (1 - ε)) - ε) * generalAdversary P f ≤ 2 * ↑T

Negative-weight adversary bound ADV±(f) for finite outputs: (1 - 2√(ε(1-ε)) - ε) ADV±(f) ≤ 2 T.

theorem Cslib.Quantum.one_sub_mul_generalAdversary_le_hls {N : ℕ} {W : Type u_1} [Fintype W] {α : Type u_2} {P : BitString N → Prop} {f : BitString N → α} (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (S_out : α → Finset (Fin N × Bool × W)) (hdisj : Pairwise (Function.onFun Disjoint S_out)) {ε : ℝ} (hε0 : 0 ≤ ε) (hε : 2 * ε ≤ 1) (herr : ∀ (x : BitString N), P x → 1 - ε ≤ measureProb (run U ψ₀ x T) (S_out (f x))) :
(1 - 2 * √(ε * (1 - ε)) - 2 * ε) * generalAdversary P f ≤ 2 * ↑T

Weakened form matching [HLS07], Theorem 2: (1 - 2√(ε(1-ε)) - 2ε) ADV±(f) ≤ 2 T.

theorem Cslib.Quantum.one_sub_mul_opNorm_le_spectral {N : ℕ} {W : Type u_1} [Fintype W] {α : Type u_2} {P : BitString N → Prop} {f : BitString N → α} {Γ : Matrix (BitString N) (BitString N) ℝ} (hnonneg : ∀ (x y : BitString N), 0 ≤ Γ x y) (hΓ : IsAdversaryMatrix P f Γ) (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) {δ : ℝ} (hδ : ∀ (x y : BitString N), P x → P y → f x ≠ f y → ‖inner ℂ (run U ψ₀ x T) (run U ψ₀ y T)‖ ≤ δ) :

Nonnegative spectral adversary matrix bound ([BSS03], as reviewed in [HLS07], Section 1.1, Theorem 1): when 0 ≤ Γ and Γ is supported on {(x, y) | P x ∧ P y ∧ f x ≠ f y}, a final-state overlap bound δ yields (1 - δ) ‖Γ‖ ≤ 2 T · maxDiffNorm Γ for any output type α.

theorem Cslib.Quantum.one_sub_mul_spectralAdversary_le_of_inner {N : ℕ} {W : Type u_1} [Fintype W] {α : Type u_2} {P : BitString N → Prop} {f : BitString N → α} (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) {δ : ℝ} (hδ : ∀ (x y : BitString N), P x → P y → f x ≠ f y → ‖inner ℂ (run U ψ₀ x T) (run U ψ₀ y T)‖ ≤ δ) :
(1 - δ) * spectralAdversary P f ≤ 2 * ↑T

Nonnegative spectral adversary lower bound ADV(f) ([BSS03], Section 1.1 of [HLS07]): (1 - δ) ADV(f) ≤ 2 T from any final-state overlap bound δ.

theorem Cslib.Quantum.one_sub_mul_spectralAdversary_le {N : ℕ} {W : Type u_1} [Fintype W] {α : Type u_2} {P : BitString N → Prop} {f : BitString N → α} (U : ℕ → State N W →ₗᵢ[ℂ] State N W) {ψ₀ : State N W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (S_out : α → Finset (Fin N × Bool × W)) (hdisj : Pairwise (Function.onFun Disjoint S_out)) {ε : ℝ} (hε : 2 * ε ≤ 1) (herr : ∀ (x : BitString N), P x → 1 - ε ≤ measureProb (run U ψ₀ x T) (S_out (f x))) :
(1 - 2 * √(ε * (1 - ε))) * spectralAdversary P f ≤ 2 * ↑T

Nonnegative spectral adversary lower bound ADV(f) for finite-output algorithms with error probability at most ε ≤ 1/2: (1 - 2√(ε(1-ε))) ADV(f) ≤ 2 T.

Spectral sensitivity is at most the nonnegative spectral adversary ([ABDK+21], via the sensitivity-graph adjacency matrix): λ(f) ≤ ADV(f).

theorem Cslib.Quantum.WeightScheme.le_spectralAdversary {N : ℕ} {α : Type u_1} {P : BitString N → Prop} {f : BitString N → α} (S : WeightScheme N) (hW : 0 < S.weightSum) (hS : ∀ p ∈ S.R, P p.1 ∧ P p.2 ∧ f p.1 ≠ f p.2) {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) :

Weighted bounds are at most the spectral adversary (original proof / [HLS07]): any WeightScheme supported on {(x, y) | P x ∧ P y ∧ f x ≠ f y} with 0 < S.weightSum and mA · loadFst x i ≤ wtFst x, mB · loadSnd y i ≤ wtSnd y satisfies √(mA · mB) ≤ ADV(f).

theorem Cslib.Quantum.mul_opNorm_le_mul_maxDiffNorm_of_hammingDist_ge {N : ℕ} {Γ : Matrix (BitString N) (BitString N) ℝ} (hnonneg : ∀ (x y : BitString N), 0 ≤ Γ x y) {k : ℕ} (hk : ∀ (x y : BitString N), Γ x y ≠ 0 → k ≤ {i : Fin N | x i ≠ y i}.card) :

Hamming-distance barrier for nonnegative adversary matrices (property-testing / distance barrier noted in [HLS07], Section 7.2): if 0 ≤ Γ and every nonzero entry (x, y) has Hamming distance at least k, then k · ‖Γ‖ ≤ N · maxDiffNorm Γ.

theorem Cslib.Quantum.spectralAdversary_le_div_of_hammingDist_ge {N : ℕ} {α : Type u_1} {P : BitString N → Prop} {f : BitString N → α} {k : ℕ} (hk0 : 0 < k) (hk : ∀ (x y : BitString N), P x → P y → f x ≠ f y → k ≤ {i : Fin N | x i ≠ y i}.card) :
spectralAdversary P f ≤ ↑N / ↑k

Hamming-distance barrier on ADV(f): if every distinguishing pair (x, y) of valid inputs has Hamming distance at least k > 0, then ADV(f) ≤ N / k.