Documentation

CslibFrontier.Computability.QueryComplexity.Quantum.ValueAdversary

Ambainis's quantum adversary method for non-Boolean input alphabets #

This module proves [Amb02], Theorem 6 (Section 6.1 of arXiv:quant-ph/0002066v1) in the quantum value-query model (Cslib.Quantum.ValueState, Cslib.Quantum.valueOracle, Cslib.Quantum.runValue) over an arbitrary finite query index type ι, arbitrary input alphabet α, finite value register V, and finite workspace W, for any unitary oracle family step : α → (EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V).

Let querySlice i ψ : EuclideanSpace ℂ (V × W) be the amplitudes of ψ : ValueState ι V W on query index i : ι. Because valueOracle step x applies the linear isometry equivalence step (x i) on each (i, w) fiber:

Bounding each step's drop in valueWeightedProgress gives (1 - δ) √(m m') ≤ 2 T √L (Cslib.Quantum.one_sub_mul_sqrt_le_two_mul_mul_sqrt_value). Combining with multi-outcome Lemma 1 (Cslib.Quantum.norm_inner_le_two_mul_sqrt_of_readout_ne and Cslib.Quantum.norm_inner_le_two_mul_sqrt_of_measureOut_ne) yields the multi-outcome bounds Cslib.Quantum.one_sub_two_mul_sqrt_mul_sqrt_le_two_mul_mul_sqrt_value and Cslib.Quantum.one_sub_two_mul_sqrt_mul_sqrt_le_two_mul_mul_sqrt_value_measureOut.

Main definitions #

Main results #

References #

def Cslib.Quantum.querySlice {ι : Type u_1} {V : Type u_2} {W : Type u_3} (i : ι) (ψ : ValueState ι V W) :

The amplitudes of a value-query state ψ : ValueState ι V W on query index i : ι.

@[simp]
theorem Cslib.Quantum.querySlice_apply {ι : Type u_1} {V : Type u_2} {W : Type u_3} (i : ι) (ψ : ValueState ι V W) (v : V) (w : W) :
(querySlice i ψ).ofLp (v, w) = ψ.ofLp (i, v, w)

Coordinate evaluation of querySlice i ψ.

theorem Cslib.Quantum.inner_eq_sum_inner_querySlice {ι : Type u_1} {V : Type u_2} {W : Type u_3} [Fintype ι] [Fintype V] [Fintype W] (ψ φ : ValueState ι V W) :
inner ℂ ψ φ = ∑ i : ι, inner ℂ (querySlice i ψ) (querySlice i φ)

Decomposition of the inner product on ValueState ι V W across query indices i : ι.

theorem Cslib.Quantum.sum_sq_norm_querySlice {ι : Type u_1} {V : Type u_2} {W : Type u_3} [Fintype ι] [Fintype V] [Fintype W] (ψ : ValueState ι V W) :
∑ i : ι, ‖querySlice i ψ‖ ^ 2 = ‖ψ‖ ^ 2

Parseval identity across query indices: ∑_i ‖querySlice i ψ‖² = ‖ψ‖².

@[simp]
theorem Cslib.Quantum.norm_querySlice_valueOracle {ι : Type u_1} {V : Type u_2} {W : Type u_3} {α : Type u_4} [Fintype ι] [Fintype V] [Fintype W] (step : α → EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V) (x : ι → α) (ψ : ValueState ι V W) (i : ι) :

On each query index i, valueOracle step x acts as a linear isometry on querySlice i.

theorem Cslib.Quantum.inner_querySlice_valueOracle_of_eq {ι : Type u_1} {V : Type u_2} {W : Type u_3} {α : Type u_4} [Fintype ι] [Fintype V] [Fintype W] (step : α → EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V) {x y : ι → α} {i : ι} (hxy : x i = y i) (ψ φ : ValueState ι V W) :
inner ℂ (querySlice i ((valueOracle step x) ψ)) (querySlice i ((valueOracle step y) φ)) = inner ℂ (querySlice i ψ) (querySlice i φ)

When two inputs x and y agree at i, valueOracle preserves the i-slice overlap.

theorem Cslib.Quantum.norm_inner_valueOracle_valueOracle_ge {ι : Type u_1} {V : Type u_2} {W : Type u_3} {α : Type u_4} [Fintype ι] [Fintype V] [Fintype W] [DecidableEq α] (step : α → EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V) (x y : ι → α) (ψ φ : ValueState ι V W) :
‖inner ℂ ψ φ‖ - 2 * ∑ i : ι with x i ≠ y i, ‖querySlice i ψ‖ * ‖querySlice i φ‖ ≤ ‖inner ℂ ((valueOracle step x) ψ) ((valueOracle step y) φ)‖

Per-query overlap loss bound for valueOracle: one value query lowers ‖inner ℂ ψ φ‖ by at most 2 ∑_{i : x i ≠ y i} ‖querySlice i ψ‖ * ‖querySlice i φ‖.

noncomputable def Cslib.Quantum.valueWeightedProgress {ι : Type u_1} {V : Type u_2} {W : Type u_3} {α : Type u_4} [Fintype ι] [Fintype V] [Fintype W] (step : α → EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V) (U : ℕ → ValueState ι V W →ₗᵢ[ℂ] ValueState ι V W) (ψ₀ : ValueState ι V W) (R : Finset ((ι → α) × (ι → α))) (γ : (ι → α) × (ι → α) → ℝ) (t : ℕ) :

Weighted progress measure of a value-query algorithm over an input relation R after t queries.

theorem Cslib.Quantum.valueWeightedProgress_zero {ι : Type u_1} {V : Type u_2} {W : Type u_3} {α : Type u_4} [Fintype ι] [Fintype V] [Fintype W] (step : α → EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V) (U : ℕ → ValueState ι V W →ₗᵢ[ℂ] ValueState ι V W) {ψ₀ : ValueState ι V W} (hψ₀ : ‖ψ₀‖ = 1) (R : Finset ((ι → α) × (ι → α))) (γ : (ι → α) × (ι → α) → ℝ) :
valueWeightedProgress step U ψ₀ R γ 0 = ∑ p ∈ R, γ p

Before any query, all states agree, so valueWeightedProgress equals ∑ p ∈ R, γ p.

theorem Cslib.Quantum.valueWeightedProgress_zero_sub_le {ι : Type u_1} {V : Type u_2} {W : Type u_3} {α : Type u_4} [Fintype ι] [Fintype V] [Fintype W] [DecidableEq α] (step : α → EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V) (U : ℕ → ValueState ι V W →ₗᵢ[ℂ] ValueState ι V W) {ψ₀ : ValueState ι V W} (hψ₀ : ‖ψ₀‖ = 1) (R : Finset ((ι → α) × (ι → α))) (γ : (ι → α) × (ι → α) → ℝ) (a b : (ι → α) × (ι → α) → ι → ℝ) (α_b β_b : (ι → α) → ℝ) (hγ : ∀ p ∈ R, 0 ≤ γ p) (ha : ∀ p ∈ R, ∀ (i : ι), p.1 i ≠ p.2 i → 0 ≤ a p i) (hb : ∀ p ∈ R, ∀ (i : ι), p.1 i ≠ p.2 i → 0 ≤ b p i) (hγsq : ∀ p ∈ R, ∀ (i : ι), p.1 i ≠ p.2 i → γ p ^ 2 ≤ a p i * b p i) (hα : ∀ x ∈ Finset.image Prod.fst R, ∀ (i : ι), ∑ p ∈ R with p.1 i ≠ p.2 i ∧ p.1 = x, a p i ≤ α_b x) (hβ : ∀ y ∈ Finset.image Prod.snd R, ∀ (i : ι), ∑ p ∈ R with p.1 i ≠ p.2 i ∧ p.2 = y, b p i ≤ β_b y) (T : ℕ) :
valueWeightedProgress step U ψ₀ R γ 0 - valueWeightedProgress step U ψ₀ R γ T ≤ ↑T * (∑ x ∈ Finset.image Prod.fst R, α_b x + ∑ y ∈ Finset.image Prod.snd R, β_b y)

Telescoping: T value queries lower valueWeightedProgress by at most T times the endpoint weight budgets.

theorem Cslib.Quantum.one_sub_mul_sum_le_of_sq_le_value {ι : Type u_1} {V : Type u_2} {W : Type u_3} {α : Type u_4} [Fintype ι] [Fintype V] [Fintype W] [DecidableEq α] (step : α → EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V) (U : ℕ → ValueState ι V W →ₗᵢ[ℂ] ValueState ι V W) {ψ₀ : ValueState ι V W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (R : Finset ((ι → α) × (ι → α))) (γ : (ι → α) × (ι → α) → ℝ) {δ : ℝ} (hδ : ∀ p ∈ R, ‖inner ℂ (runValue step U ψ₀ p.1 T) (runValue step U ψ₀ p.2 T)‖ ≤ δ) (a b : (ι → α) × (ι → α) → ι → ℝ) (α_b β_b : (ι → α) → ℝ) (hγ : ∀ p ∈ R, 0 ≤ γ p) (ha : ∀ p ∈ R, ∀ (i : ι), p.1 i ≠ p.2 i → 0 ≤ a p i) (hb : ∀ p ∈ R, ∀ (i : ι), p.1 i ≠ p.2 i → 0 ≤ b p i) (hγsq : ∀ p ∈ R, ∀ (i : ι), p.1 i ≠ p.2 i → γ p ^ 2 ≤ a p i * b p i) (hα : ∀ x ∈ Finset.image Prod.fst R, ∀ (i : ι), ∑ p ∈ R with p.1 i ≠ p.2 i ∧ p.1 = x, a p i ≤ α_b x) (hβ : ∀ y ∈ Finset.image Prod.snd R, ∀ (i : ι), ∑ p ∈ R with p.1 i ≠ p.2 i ∧ p.2 = y, b p i ≤ β_b y) :
(1 - δ) * ∑ p ∈ R, γ p ≤ ↑T * (∑ x ∈ Finset.image Prod.fst R, α_b x + ∑ y ∈ Finset.image Prod.snd R, β_b y)

Weighted quantum adversary inequality for value-query algorithms: if after T value queries the states on every pair in R have overlap at most δ, and nonnegative step weights a, b satisfy γ(p)² ≤ a(p, i) b(p, i) whenever p.1 i ≠ p.2 i with coordinatewise fiber budgets α_b and β_b, then (1 - δ) ∑_{p ∈ R} γ p ≤ T (∑_{x ∈ fst(R)} α_b x + ∑_{y ∈ snd(R)} β_b y).

theorem Cslib.Quantum.one_sub_mul_sqrt_le_two_mul_mul_sqrt_value {ι : Type u_1} {V : Type u_2} {W : Type u_3} {α : Type u_4} [Fintype ι] [Fintype V] [Fintype W] [DecidableEq α] (step : α → EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V) (U : ℕ → ValueState ι V W →ₗᵢ[ℂ] ValueState ι V W) {ψ₀ : ValueState ι V W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) {R : Finset ((ι → α) × (ι → α))} (hR : R.Nonempty) {δ : ℝ} (hδ : ∀ p ∈ R, ‖inner ℂ (runValue step U ψ₀ p.1 T) (runValue step U ψ₀ p.2 T)‖ ≤ δ) {m m' L : ℕ} (hm : ∀ p ∈ R, m ≤ {q ∈ R | q.1 = p.1}.card) (hm' : ∀ p ∈ R, m' ≤ {q ∈ R | q.2 = p.2}.card) (hL : ∀ p ∈ R, ∀ (i : ι), 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) :
(1 - δ) * √(↑m * ↑m') ≤ 2 * ↑T * √↑L

Ambainis's adversary bound for non-Boolean input alphabets ([Amb02], Section 6.1, Theorem 6, overlap form): let R be a nonempty set of pairs of inputs x, y : ι → α on which a T-query value-query algorithm (step, U, ψ₀) with ‖ψ₀‖ = 1 ends in states with overlap at most δ. If every first input of R lies in at least m pairs of R and every second input in at least m', and l_{x,i} l_{y,i} ≤ L whenever (x, y) ∈ R and x i ≠ y i, then (1 - δ) √(m m') ≤ 2 T √L.

theorem Cslib.Quantum.one_sub_two_mul_sqrt_mul_sqrt_le_two_mul_mul_sqrt_value {ι : Type u_1} {V : Type u_2} {W : Type u_3} {α : Type u_4} [Fintype ι] [Fintype V] [Fintype W] [DecidableEq α] {β : Type u_5} [DecidableEq β] (step : α → EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V) (U : ℕ → ValueState ι V W →ₗᵢ[ℂ] ValueState ι V W) {ψ₀ : ValueState ι V W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (out : ι × V × W → β) (f : (ι → α) → β) {R : Finset ((ι → α) × (ι → α))} (hR : R.Nonempty) (hne : ∀ p ∈ R, f p.1 ≠ f p.2) {ε : ℝ} (h₁ : ∀ p ∈ R, 1 - ε ≤ measureProb (runValue step U ψ₀ p.1 T) {q : ι × V × W | out q = f p.1}) (h₂ : ∀ p ∈ R, 1 - ε ≤ measureProb (runValue step U ψ₀ p.2 T) {q : ι × V × W | out q = f p.2}) (hε : 2 * ε ≤ 1) {m m' L : ℕ} (hm : ∀ p ∈ R, m ≤ {q ∈ R | q.1 = p.1}.card) (hm' : ∀ p ∈ R, m' ≤ {q ∈ R | q.2 = p.2}.card) (hL : ∀ p ∈ R, ∀ (i : ι), 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) :
(1 - 2 * √(ε * (1 - ε))) * √(↑m * ↑m') ≤ 2 * ↑T * √↑L

Ambainis's adversary bound for non-Boolean inputs and multi-outcome outputs ([Amb02], Section 6.1, Theorem 6): let f : (ι → α) → β be a target function with f p.1 ≠ f p.2 for all p ∈ R, and suppose a T-query value-query algorithm (step, U, ψ₀) with classical readout out : ι × V × W → β outputs f x with probability at least 1 - ε (2 * ε ≤ 1) on every first and second input of R. Then (1 - 2√(ε(1-ε))) √(m m') ≤ 2 T √L.

theorem Cslib.Quantum.one_sub_two_mul_sqrt_mul_sqrt_le_two_mul_mul_sqrt_value_measureOut {ι : Type u_1} {V : Type u_2} {W : Type u_3} {α : Type u_4} [Fintype ι] [Fintype V] [Fintype W] [DecidableEq α] {β : Type u_5} (step : α → EuclideanSpace ℂ V ≃ₗᵢ[ℂ] EuclideanSpace ℂ V) (U : ℕ → ValueState ι V W →ₗᵢ[ℂ] ValueState ι V W) {ψ₀ : ValueState ι V W} (hψ₀ : ‖ψ₀‖ = 1) (T : ℕ) (out : ι × V × W → β) (f : (ι → α) → β) {R : Finset ((ι → α) × (ι → α))} (hR : R.Nonempty) (hne : ∀ p ∈ R, f p.1 ≠ f p.2) {ε : ℝ} (h₁ : ∀ p ∈ R, ENNReal.ofReal (1 - ε) ≤ (measureOut (runValue step U ψ₀ p.1 T) ⋯ out) (f p.1)) (h₂ : ∀ p ∈ R, ENNReal.ofReal (1 - ε) ≤ (measureOut (runValue step U ψ₀ p.2 T) ⋯ out) (f p.2)) (hε : 2 * ε ≤ 1) {m m' L : ℕ} (hm : ∀ p ∈ R, m ≤ {q ∈ R | q.1 = p.1}.card) (hm' : ∀ p ∈ R, m' ≤ {q ∈ R | q.2 = p.2}.card) (hL : ∀ p ∈ R, ∀ (i : ι), 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) :
(1 - 2 * √(ε * (1 - ε))) * √(↑m * ↑m') ≤ 2 * ↑T * √↑L

PMF (measureOut) form of one_sub_two_mul_sqrt_mul_sqrt_le_two_mul_mul_sqrt_value, not requiring [DecidableEq β].