Quantum Chebyshevs Inequality and Applications Yassine Hamoudi, - - PowerPoint PPT Presentation

quantum chebyshev s inequality and applications
SMART_READER_LITE
LIVE PREVIEW

Quantum Chebyshevs Inequality and Applications Yassine Hamoudi, - - PowerPoint PPT Presentation

Quantum Chebyshevs Inequality and Applications Yassine Hamoudi, Frdric Magniez IRIF , Universit Paris Diderot, CNRS CQT 2019 arXiv: 1807.06456 Buffons needle A needle dropped randomly on a floor with equally spaced parallel lines


slide-1
SLIDE 1

Quantum Chebyshev’s Inequality and Applications

Yassine Hamoudi, Frédéric Magniez

IRIF , Université Paris Diderot, CNRS CQT 2019 arXiv: 1807.06456

slide-2
SLIDE 2

Buffon’s needle

Buffon, G., Essai d'arithmétique morale, 1777.

A needle dropped randomly on a floor with equally spaced parallel lines will cross one of the lines with probability 2/π.

  • 2
slide-3
SLIDE 3

Use repeated random sampling and statistical analysis to estimate parameters of interest

Monte Carlo algorithms:

  • 3
slide-4
SLIDE 4

Use repeated random sampling and statistical analysis to estimate parameters of interest

Monte Carlo algorithms: Empirical mean:

2/ Output: (x1 +…+ xn)/n 1/ Repeat the experiment n times: n i.i.d. samples x1, …, xn ~ X

  • 3
slide-5
SLIDE 5

Use repeated random sampling and statistical analysis to estimate parameters of interest

Monte Carlo algorithms: Empirical mean:

2/ Output: (x1 +…+ xn)/n

Law of large numbers: x1 + . . . + xn

n

n→∞ E(X)

1/ Repeat the experiment n times: n i.i.d. samples x1, …, xn ~ X

  • 3
slide-6
SLIDE 6

Empirical mean:

˜ μ = x1 + . . . + xn n

with

x1, . . . , xn ∼ X

How fast does it converge to E(X) ?

  • 4
slide-7
SLIDE 7

Empirical mean:

˜ μ = x1 + . . . + xn n

with

x1, . . . , xn ∼ X

Chebyshev’s Inequality:

How fast does it converge to E(X) ?

| ˜ μ − E(X)| ≤ ϵE(X)

Objective:

multiplicative error 0 < ε < 1

with high probability

  • 4

( finite)

E(X), Var(X) ≠ 0

slide-8
SLIDE 8

(in fact )

Empirical mean:

˜ μ = x1 + . . . + xn n

with

x1, . . . , xn ∼ X

Chebyshev’s Inequality:

How fast does it converge to E(X) ?

| ˜ μ − E(X)| ≤ ϵE(X)

Objective:

multiplicative error 0 < ε < 1

with high probability Number of samples needed: O (

E(X2) ϵ2E(X)2 )

O( Var(X) ϵ2E(X)2 ) = O( 1 ϵ2( E(X2) E(X)2 − 1))

  • 4

( finite)

E(X), Var(X) ≠ 0

slide-9
SLIDE 9

(in fact )

Empirical mean:

˜ μ = x1 + . . . + xn n

with

x1, . . . , xn ∼ X

Chebyshev’s Inequality:

How fast does it converge to E(X) ?

| ˜ μ − E(X)| ≤ ϵE(X)

Objective:

multiplicative error 0 < ε < 1

with high probability Number of samples needed: O (

E(X2) ϵ2E(X)2 )

O( Var(X) ϵ2E(X)2 ) = O( 1 ϵ2( E(X2) E(X)2 − 1))

  • 4

Relative second moment

( finite)

E(X), Var(X) ≠ 0

slide-10
SLIDE 10

(in fact )

Empirical mean:

˜ μ = x1 + . . . + xn n

with

x1, . . . , xn ∼ X

Chebyshev’s Inequality:

How fast does it converge to E(X) ?

| ˜ μ − E(X)| ≤ ϵE(X)

Objective:

multiplicative error 0 < ε < 1

with high probability Number of samples needed: O (

E(X2) ϵ2E(X)2 )

O( Var(X) ϵ2E(X)2 ) = O( 1 ϵ2( E(X2) E(X)2 − 1))

In practice: given an upper-bound , take samples

Δ2 ≥ E(X2) E(X)2

  • 4

n = Ω ( Δ2 ϵ2 )

Relative second moment

( finite)

E(X), Var(X) ≠ 0

slide-11
SLIDE 11

Example: edge counting

  • 5

Problem: approximate the number m of edges in an n-vertex graph G

slide-12
SLIDE 12

Example: edge counting

Estimator X :=

  • 1. Sample a vertex v ∈ V uniformly at random
  • 2. Sample a neighbor w of v uniformly at random
  • 3. If deg(v) < deg(w) (or deg(v) = deg(w) and v <lex w)

Output n*deg(v) Else Output 0

  • 5

Problem: approximate the number m of edges in an n-vertex graph G

slide-13
SLIDE 13

Example: edge counting

Estimator X :=

  • 1. Sample a vertex v ∈ V uniformly at random
  • 2. Sample a neighbor w of v uniformly at random
  • 3. If deg(v) < deg(w) (or deg(v) = deg(w) and v <lex w)

Output n*deg(v) Else Output 0

Lemma: E(X) = m and E(X2)/E(X)2 ≤ O(√n). (when m ≥ Ω(n))

  • 5

[Goldreich, Ron’08] [Seshadhri’15]

Problem: approximate the number m of edges in an n-vertex graph G

slide-14
SLIDE 14

Example: edge counting

Estimator X :=

  • 1. Sample a vertex v ∈ V uniformly at random
  • 2. Sample a neighbor w of v uniformly at random
  • 3. If deg(v) < deg(w) (or deg(v) = deg(w) and v <lex w)

Output n*deg(v) Else Output 0

Lemma: E(X) = m and E(X2)/E(X)2 ≤ O(√n). (when m ≥ Ω(n))

  • 5

Consequence: O(√n/ε2) samples to approximate m with error ε.

[Goldreich, Ron’08] [Seshadhri’15]

Problem: approximate the number m of edges in an n-vertex graph G

slide-15
SLIDE 15

Data stream model:

Frequency moments, Collision probability [Alon, Matias, Szegedy’99]

[Monemizadeh, Woodruff’] [Andoni et al.’11] [Crouch et al.’16]

Other applications

Testing properties of distributions:

Closeness [Goldreich, Ron’11] [Batu et al.’13] [Chan et al.’14], Conditional independence [Canonne et al.’18]

Estimating graph parameters:

Number of connected components, Minimum spanning tree weight

[Chazelle, Rubinfeld, Trevisan’05], Average distance [Goldreich, Ron’08], Number

  • f triangles [Eden et al. 17]

Counting with Markov chain Monte Carlo methods:

Counting vs. sampling [Jerrum, Sinclair’96] [Štefankovič et al.’09], Volume of convex bodies [Dyer, Frieze'91], Permanent [Jerrum, Sinclair, Vigoda’04]

etc.

  • 6
slide-16
SLIDE 16

Random variable X over sample space Ω ⊂ R+

Classical sample: one value x ∈ Ω, sampled with probability px

  • 7
slide-17
SLIDE 17

Quantum sample: one (controlled-)execution of a quantum sampler or , where

Random variable X over sample space Ω ⊂ R+

Classical sample: one value x ∈ Ω, sampled with probability px

SX|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩

with ψx = arbitrary unit vector

SX S−1

X

  • 7
slide-18
SLIDE 18

Quantum sample: one (controlled-)execution of a quantum sampler or , where

Random variable X over sample space Ω ⊂ R+

Classical sample: one value x ∈ Ω, sampled with probability px

SX|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩

with ψx = arbitrary unit vector

SX S−1

X

  • 7

Question: can we estimate E(X) with less samples in the quantum setting?

slide-19
SLIDE 19

Previous Works

slide-20
SLIDE 20

SX|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩

  • 9

The Amplitude Estimation algorithm [Brassard et al.’11] [Brassard et al.’11] [Wocjan et al.’09]

Given

  • ne can obtain (with 1 ancillary qubit + controlled rotation):
slide-21
SLIDE 21

SX|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩

  • 9

SY|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩( 1 − x MΩ |0⟩ + x MΩ |1⟩)

The Amplitude Estimation algorithm [Brassard et al.’11] [Brassard et al.’11] [Wocjan et al.’09]

where MΩ = max{x ∈ Ω} Given

  • ne can obtain (with 1 ancillary qubit + controlled rotation):
slide-22
SLIDE 22

SX|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩

  • 9

SY|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩( 1 − x MΩ |0⟩ + x MΩ |1⟩)

The Amplitude Estimation algorithm [Brassard et al.’11] [Brassard et al.’11] [Wocjan et al.’09]

where MΩ = max{x ∈ Ω}

= 1 − E(X) MΩ |φ0⟩|0⟩ + E(X) MΩ |φ1⟩|1⟩

Given

  • ne can obtain (with 1 ancillary qubit + controlled rotation):

and |φ0⟩, |φ1⟩ are some unit vectors.

slide-23
SLIDE 23

SX|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩

  • 9

SY|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩( 1 − x MΩ |0⟩ + x MΩ |1⟩)

The Amplitude Estimation algorithm [Brassard et al.’11] [Brassard et al.’11] [Wocjan et al.’09]

where MΩ = max{x ∈ Ω}

= 1 − E(X) MΩ |φ0⟩|0⟩ + E(X) MΩ |φ1⟩|1⟩

Given

  • ne can obtain (with 1 ancillary qubit + controlled rotation):

and |φ0⟩, |φ1⟩ are some unit vectors.

Observation: The Grover's operator has eigenvalues , where . G = S−1

Y (I − 2|0⟩⟨0|)SY(I − 2I ⊗ |1⟩⟨1|)

e±2iθ θ = sin−1( E(X)/MΩ)

slide-24
SLIDE 24

SX|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩

  • 9

SY|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩( 1 − x MΩ |0⟩ + x MΩ |1⟩)

The Amplitude Estimation algorithm [Brassard et al.’11] [Brassard et al.’11] [Wocjan et al.’09]

where MΩ = max{x ∈ Ω}

= 1 − E(X) MΩ |φ0⟩|0⟩ + E(X) MΩ |φ1⟩|1⟩

Given

  • ne can obtain (with 1 ancillary qubit + controlled rotation):

and |φ0⟩, |φ1⟩ are some unit vectors.

Observation: The Grover's operator has eigenvalues , where . G = S−1

Y (I − 2|0⟩⟨0|)SY(I − 2I ⊗ |1⟩⟨1|)

e±2iθ θ = sin−1( E(X)/MΩ) 2/ Output as an estimate to E(X). ˜ μ = MΩ ⋅ sin2(˜ θ) Algorithm: 1/ Apply Phase Estimation on G for steps to get an estimate s.t. . ˜ θ t ≥ Ω( MΩ /(ϵ E(X))) | ˜ θ − |θ|| ≤ 1/t

slide-25
SLIDE 25

SX|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩

  • 10

The Amplitude Estimation algorithm [Brassard et al.’02] [Brassard et al.’11] [Wocjan et al.’09]

Given

  • ne can obtain (with 1 ancillary qubit + controlled rotation):

Result:

O ( MΩ ϵ E(X) ) quantum samples to obtain | ˜

μ − E(X)| ≤ ϵE(X)

where MΩ = max{x ∈ Ω}

= 1 − E(X) MΩ |φ0⟩|0⟩ + E(X) MΩ |φ1⟩|1⟩

and |φ0⟩, |φ1⟩ are some unit vectors.

SY|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩( 1 − x MΩ |0⟩ + x MΩ |1⟩)

slide-26
SLIDE 26

SX|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩

  • 10

The Amplitude Estimation algorithm [Brassard et al.’02] [Brassard et al.’11] [Wocjan et al.’09]

Given

  • ne can obtain (with 1 ancillary qubit + controlled rotation):

Result:

O ( MΩ ϵ E(X) ) quantum samples to obtain | ˜

μ − E(X)| ≤ ϵE(X)

…not efficient if MΩ is large (worst than the classical algorithm sometimes) where MΩ = max{x ∈ Ω}

= 1 − E(X) MΩ |φ0⟩|0⟩ + E(X) MΩ |φ1⟩|1⟩

and |φ0⟩, |φ1⟩ are some unit vectors.

SY|0⟩ = ∑

x∈Ω

px |ψx⟩|x⟩( 1 − x MΩ |0⟩ + x MΩ |1⟩)

slide-27
SLIDE 27

Can we use quadratically less samples in the quantum setting?

  • 11
slide-28
SLIDE 28

Number of samples Conditions

Classical samples (Chebyshev’s inequality) [Brassard et al.’02] [Brassard et al.’11] [Wocjan et al.’09] [Montanaro’15]

Our result

Δ2 ≥ E(X2) E(X)2

Δ2 ϵ2

Δ2 ≥ E(X2) E(X)2

Sample space Ω ⊂ [0, MΩ]

MΩ ϵ E(X)

Δ2 ≥ E(X2) E(X)2

Δ2 ϵ Δ ϵ ⋅ log3 ( MΩ E(X) )

Can we use quadratically less samples in the quantum setting?

  • 11

Sample space Ω ⊂ [0, MΩ]

slide-29
SLIDE 29

Number of samples Conditions

Classical samples (Chebyshev’s inequality) [Brassard et al.’02] [Brassard et al.’11] [Wocjan et al.’09] [Montanaro’15]

Our result

Δ2 ≥ E(X2) E(X)2

Δ2 ϵ2

Δ2 ≥ E(X2) E(X)2

Sample space Ω ⊂ [0, MΩ]

MΩ ϵ E(X)

Δ2 ≥ E(X2) E(X)2

Δ2 ϵ Δ ϵ ⋅ log3 ( MΩ E(X) )

Can we use quadratically less samples in the quantum setting?

  • 11

Sample space Ω ⊂ [0, MΩ]

slide-30
SLIDE 30

Number of samples Conditions

Classical samples (Chebyshev’s inequality) [Brassard et al.’02] [Brassard et al.’11] [Wocjan et al.’09] [Montanaro’15]

Our result

Δ2 ≥ E(X2) E(X)2

Δ2 ϵ2

Δ2 ≥ E(X2) E(X)2

Sample space Ω ⊂ [0, MΩ]

MΩ ϵ E(X)

Δ2 ≥ E(X2) E(X)2

Δ2 ϵ Δ ϵ ⋅ log3 ( MΩ E(X) )

Can we use quadratically less samples in the quantum setting?

  • 11

Sample space Ω ⊂ [0, MΩ]

slide-31
SLIDE 31

Number of samples Conditions

Classical samples (Chebyshev’s inequality) [Brassard et al.’02] [Brassard et al.’11] [Wocjan et al.’09] [Montanaro’15]

Our result

Δ2 ≥ E(X2) E(X)2

Δ2 ϵ2

Δ2 ≥ E(X2) E(X)2

Sample space Ω ⊂ [0, MΩ]

MΩ ϵ E(X)

Δ2 ≥ E(X2) E(X)2

Δ2 ϵ Δ ϵ ⋅ log3 ( MΩ E(X) )

Can we use quadratically less samples in the quantum setting?

  • 11

Sample space Ω ⊂ [0, MΩ]

slide-32
SLIDE 32

Our Approach

slide-33
SLIDE 33

Input: Ampl-Est: O (

MΩ ϵ E(X) ) quantum samples to obtain

Random variable X on sample space Ω ⊂ [0,MΩ]

  • 13

Amplitude Estimation Algorithm [Brassard et al.’02] [Brassard et al.’11] [Wocjan et al.’09]

| ˜ μ − E(X)| ≤ ϵ ⋅ E(X)

slide-34
SLIDE 34

If : the number of samples is MΩ ≤ E(X2) E(X) O E(X2) ϵE(X)

  • 14

Amplitude Estimation Algorithm [Brassard et al.’02] [Brassard et al.’11] [Wocjan et al.’09]

Ampl-Est: O (

MΩ ϵ E(X) ) quantum samples to obtain | ˜

μ − E(X)| ≤ ϵ ⋅ E(X) Input: Random variable X on sample space Ω ⊂ [0,MΩ]

slide-35
SLIDE 35

If : the number of samples is MΩ ≤ E(X2) E(X) O E(X2) ϵE(X) If

?

MΩ ≫ E(X2) E(X)

  • 14

Amplitude Estimation Algorithm [Brassard et al.’02] [Brassard et al.’11] [Wocjan et al.’09]

Ampl-Est: O (

MΩ ϵ E(X) ) quantum samples to obtain | ˜

μ − E(X)| ≤ ϵ ⋅ E(X) Input: Random variable X on sample space Ω ⊂ [0,MΩ]

slide-36
SLIDE 36

1

Random variable X

  • 15

Largest outcome

px x

slide-37
SLIDE 37

1

Random variable XM

  • 16

M

New largest outcome

px x

≈ E(X2) E(X)

slide-38
SLIDE 38

If : the number of samples is MΩ ≤ E(X2) E(X) O E(X2) ϵE(X) If : map the outcomes larger than to 0 E(X2) E(X) MΩ ≫ E(X2) E(X)

  • 17

?

Ampl-Est: O (

MΩ ϵ E(X) ) quantum samples to obtain | ˜

μ − E(X)| ≤ ϵ ⋅ E(X) Input: Random variable X on sample space Ω ⊂ [0,MΩ]

slide-39
SLIDE 39

If : the number of samples is MΩ ≤ E(X2) E(X) O E(X2) ϵE(X) If : map the outcomes larger than to 0 E(X2) E(X) MΩ ≫ E(X2) E(X)

  • 17

Lemma: If then M ≥ E(X2) ϵE(X) (1 − ϵ)E(X) ≤ E(XM) ≤ E(X) . Ampl-Est: O (

MΩ ϵ E(X) ) quantum samples to obtain | ˜

μ − E(X)| ≤ ϵ ⋅ E(X) Input: Random variable X on sample space Ω ⊂ [0,MΩ]

slide-40
SLIDE 40

If : the number of samples is MΩ ≤ E(X2) E(X) O E(X2) ϵE(X) If : map the outcomes larger than to 0 E(X2) E(X) MΩ ≫ E(X2) E(X)

  • 17

Problem: is unknown… Lemma: If then M ≥ E(X2) ϵE(X) (1 − ϵ)E(X) ≤ E(XM) ≤ E(X) . Ampl-Est: O (

MΩ ϵ E(X) ) quantum samples to obtain | ˜

μ − E(X)| ≤ ϵ ⋅ E(X) Input: Random variable X on sample space Ω ⊂ [0,MΩ] E(X2) E(X)

slide-41
SLIDE 41

If : the number of samples is MΩ ≤ E(X2) E(X) O E(X2) ϵE(X) If : map the outcomes larger than to 0 E(X2) E(X) MΩ ≫ E(X2) E(X)

  • 17

Problem: is unknown… Δ2 ≥ E(X2) E(X)2 Lemma: If then M ≥ E(X2) ϵE(X) (1 − ϵ)E(X) ≤ E(XM) ≤ E(X) . Ampl-Est: O (

MΩ ϵ E(X) ) quantum samples to obtain | ˜

μ − E(X)| ≤ ϵ ⋅ E(X) Input: Random variable X on sample space Ω ⊂ [0,MΩ] E(X2) E(X) but we have

slide-42
SLIDE 42

If : the number of samples is MΩ ≤ E(X2) E(X) O E(X2) ϵE(X) If : map the outcomes larger than to 0 E(X2) E(X) MΩ ≫ E(X2) E(X)

  • 17

Problem: is unknown… Δ2 ≥ E(X2) E(X)2 Lemma: If then M ≥ E(X2) ϵE(X) (1 − ϵ)E(X) ≤ E(XM) ≤ E(X) . Ampl-Est: O (

MΩ ϵ E(X) ) quantum samples to obtain | ˜

μ − E(X)| ≤ ϵ ⋅ E(X) Input: Random variable X on sample space Ω ⊂ [0,MΩ] E(X2) E(X) M ≈ E(X) ⋅ Δ2 ? but we have

slide-43
SLIDE 43
  • 18

Objective: given how to find a threshold ? Δ2 ≥ E(X2) E(X)2 M ≈ E(X) ⋅ Δ2

slide-44
SLIDE 44

Solution: use the Amplitude Estimation algorithm to do a logarithmic search on M

  • 18

Objective: given how to find a threshold ? Δ2 ≥ E(X2) E(X)2 M ≈ E(X) ⋅ Δ2

slide-45
SLIDE 45

Threshold Input r.v. Number of samples Estimation

Solution: use the Amplitude Estimation algorithm to do a logarithmic search on M

  • 18

Objective: given how to find a threshold ? Δ2 ≥ E(X2) E(X)2 M ≈ E(X) ⋅ Δ2

M0 = MΩΔ2 M1 = (MΩ/2)Δ2 M2 = (MΩ/4)Δ2 ˜ μ0 …

XM0

Δ Δ Δ

˜ μ1 ˜ μ2 … … …

Stopping rule: ˜ μi ≠ 0 Output: Mi

XM1 XM2

slide-46
SLIDE 46

Threshold Input r.v. Number of samples Estimation

Solution: use the Amplitude Estimation algorithm to do a logarithmic search on M

  • 18

Objective: given how to find a threshold ? Δ2 ≥ E(X2) E(X)2 M ≈ E(X) ⋅ Δ2

M0 = MΩΔ2 M1 = (MΩ/2)Δ2 M2 = (MΩ/4)Δ2 ˜ μ0 …

XM0

Δ Δ Δ

˜ μ1 ˜ μ2 …

Theorem: the first non-zero is obtained w.h.p. when: ˜ μi

2 ⋅ E(X)Δ2 ≤ Mi ≤ 10 ⋅ E(X)Δ2

… …

Stopping rule: ˜ μi ≠ 0 Output: Mi

XM1 XM2

slide-47
SLIDE 47
  • 19

Analysis

Theorem: the first non-zero is obtained w.h.p. when: ˜ μi

2 ⋅ E(X)Δ2 ≤ Mi ≤ 10 ⋅ E(X)Δ2

slide-48
SLIDE 48

Ingredient 1:

1/Δ

  • 19

E(XM) M Analysis

Theorem: the first non-zero is obtained w.h.p. when: ˜ μi

2 ⋅ E(X)Δ2 ≤ Mi ≤ 10 ⋅ E(X)Δ2

The output of Amplitude-Estimation is 0 w.h.p. if and only if the estimated amplitude is below the inverse number of samples.

[Brassard et al.’02]

slide-49
SLIDE 49

Ingredient 1:

1/Δ

  • 19

E(XM) M Analysis

If then

M ≥ 10 ⋅ E(X)Δ2 E(XM) M ≤ E(X) M ≤ 1 10 ⋅ Δ2

Theorem: the first non-zero is obtained w.h.p. when: ˜ μi

2 ⋅ E(X)Δ2 ≤ Mi ≤ 10 ⋅ E(X)Δ2

Ingredient 2:

The output of Amplitude-Estimation is 0 w.h.p. if and only if the estimated amplitude is below the inverse number of samples.

[Brassard et al.’02]

slide-50
SLIDE 50

Ingredient 1:

1/Δ

  • 19

E(XM) M

If then

E(XM) M ≈ E(X) M ≈ 1 Δ2

M ≈ E(X) ⋅ Δ2

Analysis

If then

M ≥ 10 ⋅ E(X)Δ2 E(XM) M ≤ E(X) M ≤ 1 10 ⋅ Δ2

Theorem: the first non-zero is obtained w.h.p. when: ˜ μi

2 ⋅ E(X)Δ2 ≤ Mi ≤ 10 ⋅ E(X)Δ2

Ingredient 2: Ingredient 3:

The output of Amplitude-Estimation is 0 w.h.p. if and only if the estimated amplitude is below the inverse number of samples.

[Brassard et al.’02]

slide-51
SLIDE 51
  • 20

Analysis

Theorem: the first non-zero is obtained w.h.p. when: ˜ μi

2 ⋅ E(X)Δ2 ≤ Mi ≤ 10 ⋅ E(X)Δ2

M

E(XM) M 1 Δ2 E(X)Δ2

slide-52
SLIDE 52

Step 1: Logarithmic search on M until Amplitude-Estimation(XM, Δ) ≠ 0

2 ⋅ E(X)Δ2 ≤ M ≤ 104 ⋅ E(X)Δ2 with high probability

Δ ⋅ log3 ( MΩ E(X))

Final algorithm:

  • 21
slide-53
SLIDE 53

Step 1: Logarithmic search on M until Amplitude-Estimation(XM, Δ) ≠ 0

2 ⋅ E(X)Δ2 ≤ M ≤ 104 ⋅ E(X)Δ2 with high probability

Step 2: Set threshold and output

N = M/ϵ

with high probability

| ˜ μ − E(X)| ≤ ϵE(X)

Δ ⋅ log3 ( MΩ E(X))

Δ/ϵ3/2

Final algorithm:

  • 21

˜ μ = N ⋅ Amplitude-Estimation(XN, Δ/ϵ3/2)

slide-54
SLIDE 54

Step 1: Logarithmic search on M until Amplitude-Estimation(XM, Δ) ≠ 0

2 ⋅ E(X)Δ2 ≤ M ≤ 104 ⋅ E(X)Δ2 with high probability

Step 2: Set threshold and output

N = M/ϵ

with high probability

| ˜ μ − E(X)| ≤ ϵE(X)

Δ ⋅ log3 ( MΩ E(X))

Δ/ϵ3/2

Final algorithm:

Step 2bis: Slightly refined algorithm, adapted from [Heinrich’01, Montanaro’15]

Δ/ϵ

  • 21

˜ μ = N ⋅ Amplitude-Estimation(XN, Δ/ϵ3/2)

slide-55
SLIDE 55

Optimality

slide-56
SLIDE 56
  • 23

For any Δ, ε there exists two samplers

SX|0⟩ = 1 − p⟩|0⟩ + p |1⟩ SY|0⟩ = 1 − q⟩|0⟩ + q |1⟩

with E(Y) ≥ (1 + 2ϵ) ⋅ E(X)

E(X2) E(X)2 , E(Y2) E(Y)2 ∈ [Δ2,2Δ2]

and such that distinguishing between X and Y requires: Quantum samples from SX / SY

Ω ( Δ − 1 ϵ )

{

Lower bounds

slide-57
SLIDE 57
  • 23

For any Δ, ε there exists two samplers

SX|0⟩ = 1 − p⟩|0⟩ + p |1⟩ SY|0⟩ = 1 − q⟩|0⟩ + q |1⟩

with E(Y) ≥ (1 + 2ϵ) ⋅ E(X)

E(X2) E(X)2 , E(Y2) E(Y)2 ∈ [Δ2,2Δ2]

and such that distinguishing between X and Y requires: Quantum samples from SX / SY

Ω ( Δ − 1 ϵ )

Copies of the states Ω ( Δ2 − 1 ϵ2 ) SX|0⟩ / SY|0⟩

  • r

{

Lower bounds

slide-58
SLIDE 58

Applications

slide-59
SLIDE 59
  • 25

A generic quantization method

Randomized algorithm A with output X = A()

slide-60
SLIDE 60
  • 25

A generic quantization method

Randomized algorithm A with output X = A() Deterministic algorithm B with random seed r as input and output X = B(r)

slide-61
SLIDE 61
  • 25

A generic quantization method

Randomized algorithm A with output X = A() Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r)

slide-62
SLIDE 62
  • 25

A generic quantization method

Randomized algorithm A with output X = A()

SX|0⟩ = 1 R ∑

r∈[R]

|r⟩|C(r)⟩

Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r) Quantum sampler

slide-63
SLIDE 63
  • 25

A generic quantization method

Randomized algorithm A with output X = A()

SX|0⟩ = 1 R ∑

r∈[R]

|r⟩|C(r)⟩

Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r) Quantum sampler

Δ2 ϵ2

# samples to approximate E(X)

Δ ϵ ⋅ log3 ( MΩ E(X))

slide-64
SLIDE 64
  • 26

First obstacle: time complexity

Randomized algorithm A with output X = A()

SX|0⟩ = 1 R ∑

r∈[R]

|r⟩|C(r)⟩

Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r) Quantum sampler

Tavg = average running time of A Tmax = maximum running time of A

slide-65
SLIDE 65
  • 26

First obstacle: time complexity

Randomized algorithm A with output X = A()

SX|0⟩ = 1 R ∑

r∈[R]

|r⟩|C(r)⟩

Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r) Quantum sampler

Tavg = average running time of A Tmax = maximum running time of A N samples in average time N*Tavg N samples in maximum time N*Tmax

slide-66
SLIDE 66
  • 26

First obstacle: time complexity

Randomized algorithm A with output X = A()

SX|0⟩ = 1 R ∑

r∈[R]

|r⟩|C(r)⟩

Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r) Quantum sampler

Tavg = average running time of A Tmax = maximum running time of A N samples in average time N*Tavg N samples in maximum time N*Tmax N quantum samples in maximum/average time O(N*Tmax)

slide-67
SLIDE 67
  • 27

First obstacle: time complexity

New tool: Variable-Time Amplitude Estimation

(≠ Variable-Time Amplitude Amplification)

slide-68
SLIDE 68
  • 27

First obstacle: time complexity

New tool: Variable-Time Amplitude Estimation

(≠ Variable-Time Amplitude Amplification)

Randomized algorithm A with output X in time Tmax,Tavg Estimate of E(X) in (average) time:

Δ2 ϵ2 ⋅ Tavg

slide-69
SLIDE 69
  • 27

First obstacle: time complexity

New tool: Variable-Time Amplitude Estimation

Quantum sampler SX

(≠ Variable-Time Amplitude Amplification)

Randomized algorithm A with output X in time Tmax,Tavg Estimate of E(X) in (average) time:

Δ2 ϵ2 ⋅ Tavg

Estimate of E(X) in time:

Δ ϵ2 ⋅ Tavg,2 ⋅ polylog ( MΩ E(X), Tmax)

where Tavg,2 = L2-average running time of A

slide-70
SLIDE 70
  • 28

Input: graph G=(V,E) with n vertices, m edges, t triangles Query access: unitaries Odeg|v⟩|0⟩ = |v⟩|deg(v)⟩

Opair|v⟩|w⟩|0⟩ = |v⟩|w⟩|(v, w) ∈ E ?⟩ Ongh|v⟩|i⟩|0⟩ = |v⟩|i⟩|vi⟩

ith neighbor of v

(degree query) (pair query) (neighbor query)

Application: triangle counting

slide-71
SLIDE 71
  • 28

Input: graph G=(V,E) with n vertices, m edges, t triangles

˜ Θ ( n t1/6 + m3/4 t ) degree/pair/neighbor quantum queries to approximate t

Result:

(vs. ˜

Θ ( n t1/3 + m3/2 t ) classical degree/pair/neighbor queries)

Query access: unitaries Odeg|v⟩|0⟩ = |v⟩|deg(v)⟩

Opair|v⟩|w⟩|0⟩ = |v⟩|w⟩|(v, w) ∈ E ?⟩ Ongh|v⟩|i⟩|0⟩ = |v⟩|i⟩|vi⟩

ith neighbor of v

(degree query) (pair query) (neighbor query)

Application: triangle counting

[Eden, Levi, Ron’15] [Eden, Levi, Ron, Seshadhri’17]

slide-72
SLIDE 72
  • 29

Second obstacle: reversibility and streaming algorithms

Randomized algorithm A with output X = A()

SX|0⟩ = 1 R ∑

r∈[R]

|r⟩|C(r)⟩

Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r) Quantum sampler

slide-73
SLIDE 73

Second obstacle: reversibility and streaming algorithms

  • 30

u =

1 2 3 n

Stream of updates to u:

slide-74
SLIDE 74

5

Second obstacle: reversibility and streaming algorithms

  • 30

u =

1 2 3 n

Stream of updates to u:

(3,+5)

slide-75
SLIDE 75

5

Second obstacle: reversibility and streaming algorithms

  • 30

u =

1 2 3 n

Stream of updates to u:

  • 6

(3,+5) ; (2,-6)

slide-76
SLIDE 76

4

Second obstacle: reversibility and streaming algorithms

  • 30

u =

1 2 3 n

Stream of updates to u:

  • 6

(3,+5) ; (2,-6) ; (3,-1)

slide-77
SLIDE 77

4

Second obstacle: reversibility and streaming algorithms

  • 30

u =

1 2 3 n

Stream of updates to u:

  • 6

Goal: approximate some function f(u) of the final vector u

(3,+5) ; (2,-6) ; (3,-1) (example: f(u) = # of distinct elements in u)

slide-78
SLIDE 78

4

Second obstacle: reversibility and streaming algorithms

  • 30

u =

1 2 3 n

Stream of updates to u:

  • 6

Goal: approximate some function f(u) of the final vector u

(3,+5) ; (2,-6) ; (3,-1)

Algorithm with smallest possible memory M ≪ n using P passes over the same stream to approximate f(u)?

(example: f(u) = # of distinct elements in u)

slide-79
SLIDE 79

4

Second obstacle: reversibility and streaming algorithms

  • 30

u =

1 2 3 n

Stream of updates to u:

  • 6

Goal: approximate some function f(u) of the final vector u

(3,+5) ; (2,-6) ; (3,-1)

Algorithm with smallest possible memory M ≪ n using P passes over the same stream to approximate f(u)?

Standard method (Alon, Matias, Szegedy’99): Design an algorithm A with memory M that produces in 1 pass a sample X = A(1 pass) such that E(X) = f(u) and E(X2)/E(X)2 ≤ P

(example: f(u) = # of distinct elements in u) the average of P samples over P passes is a good approximation of f(u)

slide-80
SLIDE 80
  • 31

Second obstacle: reversibility and streaming algorithms

Randomized algorithm A with output X = A()

SX|0⟩ = 1 R ∑

r∈[R]

|r⟩|C(r)⟩

Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r) Quantum sampler

slide-81
SLIDE 81

Our algorithm needs , which requires to run C-1.

  • 31

Second obstacle: reversibility and streaming algorithms

Randomized algorithm A with output X = A()

SX|0⟩ = 1 R ∑

r∈[R]

|r⟩|C(r)⟩

Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r) Quantum sampler

S−1

X

slide-82
SLIDE 82

Our algorithm needs , which requires to run C-1.

  • 31

Second obstacle: reversibility and streaming algorithms

Randomized algorithm A with output X = A()

SX|0⟩ = 1 R ∑

r∈[R]

|r⟩|C(r)⟩

Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r) Quantum sampler

S−1

X

Usually, C-1 needs to read the input of A in reverse order.

slide-83
SLIDE 83

Our algorithm needs , which requires to run C-1.

  • 31

Second obstacle: reversibility and streaming algorithms

Randomized algorithm A with output X = A()

SX|0⟩ = 1 R ∑

r∈[R]

|r⟩|C(r)⟩

Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r) Quantum sampler

S−1

X

Usually, C-1 needs to read the input of A in reverse order. If A is a streaming algorithm, it means reading the stream in the reverse direction!

slide-84
SLIDE 84

Our algorithm needs , which requires to run C-1.

  • 31

Second obstacle: reversibility and streaming algorithms

Randomized algorithm A with output X = A()

SX|0⟩ = 1 R ∑

r∈[R]

|r⟩|C(r)⟩

Deterministic algorithm B with random seed r as input and output X = B(r) Reversible algorithm C with random seed r as input and output X = C(r) Quantum sampler

S−1

X

Usually, C-1 needs to read the input of A in reverse order. If A is a streaming algorithm, it means reading the stream in the reverse direction! We showed that linear sketch streaming algorithms can be made reversible efficiently. (= C-1 and can be implemented with one pass in the direct direction)

S−1

X

slide-85
SLIDE 85

5

  • 6

Application: frequency moments in the streaming model

  • 32

fk(u) =

n

i=1

|ui|k

u =

1 2 3 n

Frequency moment of order k ≥ 3:

slide-86
SLIDE 86

5

  • 6

Application: frequency moments in the streaming model

  • 32

fk(u) =

n

i=1

|ui|k

Best P-pass algorithm with memory M approximating fk?

u =

1 2 3 n

Frequency moment of order k ≥ 3:

slide-87
SLIDE 87

5

  • 6

Application: frequency moments in the streaming model

Classically: PM = Θ(n1-2/k)

  • 32

fk(u) =

n

i=1

|ui|k

Best P-pass algorithm with memory M approximating fk?

u =

1 2 3 n

Frequency moment of order k ≥ 3:

[Monemizadeh, Woodruff’10] [Andoni, Krauthgamer, Onak’11]

1 sample from a random variable X with and

E(X2)/E(X)2 ≤ P

1 pass + memory M = n1−2/k

P

| |

E(X) ≈ fk(u)

slide-88
SLIDE 88

5

  • 6

Application: frequency moments in the streaming model

Classically: PM = Θ(n1-2/k)

  • 32

fk(u) =

n

i=1

|ui|k

Best P-pass algorithm with memory M approximating fk?

u =

1 2 3 n

Frequency moment of order k ≥ 3:

Quantumly: P2M = O(n1-2/k)

[Monemizadeh, Woodruff’10] [Andoni, Krauthgamer, Onak’11]

1 sample from a random variable X with and

E(X2)/E(X)2 ≤ P

1 pass + memory M = n1−2/k

P

| |

1 pass + memory M = n1−2/k

P2

1 quantum sample SX from a r.v. X with and

| |

E(X) ≈ fk(u) E(X) ≈ fk(u) E(X2)/E(X)2 ≤ P2

slide-89
SLIDE 89

Conclusion

slide-90
SLIDE 90
  • 34

The mean of a random variable X can be estimated with multiplicative error ε using quantum samples, given .

Δ2 ≥ E(X2) E(X)2 ˜ O ( Δ ϵ ⋅ log3 ( MΩ E(X)))

Open questions:

  • Can we improve the complexity to O(Δ/ε) ?
  • Sample space Ω with negative values?
  • Lower bound for the Frequency Moments estimation problem?
  • Other applications ?

arXiv: 1807.06456

(would follow from an lower bound for the 2-player t-round cc of L∞ problem)

Ω(t + nm−2/t)

slide-91
SLIDE 91

Extra slides

slide-92
SLIDE 92

No a priori information on E(X2)/E(X)2

  • 36

Result: There is an optimal algorithm that approximates the mean of any quantum sampler SX over Ω ⊂ [0,B] with quantum samples, when there is no a priori information on X.

˜ Θ ( B ϵE(X) + E(X2) ϵE(X))

→ Quantization of [Dagum, Karp, Luby, Ross’00]

slide-93
SLIDE 93
  • 37

Lemma: If then b ≥ E(X2) ϵE(X) If then

b ≥ 104 ⋅ E(X)Δ2

Lemma:

E(X<b) b ≤ 1 104 ⋅ Δ2

(1 − ϵ)E(X) ≤ E(X<b) ≤ E(X) .

slide-94
SLIDE 94
  • 37

Lemma: If then b ≥ E(X2) ϵE(X) ∙ E(X<b) = E(X) − E(X≥b) ≥ (1 − ϵ)E(X) If then

b ≥ 104 ⋅ E(X)Δ2

Lemma:

E(X<b) b ≤ 1 104 ⋅ Δ2

Proof:

(1 − ϵ)E(X) ≤ E(X<b) ≤ E(X) . ∙ E(X≥b) ≤ E(X2) b ≤ ϵE(X)

Proof:

E(X<b) b ≤ E(X) 104E(X)Δ2 ≤ 1 104 ⋅ Δ2