This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Computer Science Department, Carnegie Mellon University, USAramgopav@andrew.cmu.edu Computer Science Department, Carnegie Mellon University, USA and https://www.cs.cmu.edu/~odonnell odonnell@cs.cmu.eduSupported by NSF grant CCF-1717606. This material is based upon work supported by the National Science Foundation under the grant number listed above. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation (NSF). \CopyrightRamgopal Venkateswaran and Ryan O’Donnell \ccsdesc[500]Theory of computation Quantum complexity theory \supplement

Acknowledgements.
The authors would like to thank Scott Aaronson and Patrick Rall for helpful communications.\hideLIPIcs\EventEditorsJohn Q. Open and Joan R. Access \EventNoEds2 \EventLongTitle42nd Conference on Very Important Topics (CVIT 2016) \EventShortTitleCVIT 2016 \EventAcronymCVIT \EventYear2016 \EventDateDecember 24–27, 2016 \EventLocationLittle Whinging, United Kingdom \EventLogo \SeriesVolume42 \ArticleNo23

Quantum Approximate Counting with Nonadaptive Grover Iterations

Ramgopal Venkateswaran111The ordering of the authors was randomized. The authors contributed equally.    Ryan O’Donnell
Abstract

Approximate Counting refers to the problem where we are given query access to a function f:[N]{0,1}f:[N]\to\{0,1\}, and we wish to estimate K=#{x:f(x)=1}K=\#\{x:f(x)=1\} to within a factor of 1+ϵ1+\epsilon (with high probability), while minimizing the number of queries. In the quantum setting, Approximate Counting can be done with O(min(N/ϵ,N/K/ϵ))O{\bigl{\lparen}}\min{\bigl{\lparen}}\sqrt{N/\epsilon},\sqrt{N/K}\!\bigm{/}\!\epsilon{\bigr{\rparen}}{\bigr{\rparen}} queries. It has recently been shown that this can be achieved by a simple algorithm that only uses “Grover iterations”; however the algorithm performs these iterations adaptively. Motivated by concerns of computational simplicity, we consider algorithms that use Grover iterations with limited adaptivity. We show that algorithms using only nonadaptive Grover iterations can achieve O(N/ϵ)O{\bigl{\lparen}}\sqrt{N/\epsilon}{\bigr{\rparen}} query complexity, which is tight.

keywords:
quantum approximate counting, Grover search
category:
\relatedversion

1 Introduction

1.1 Grover Search recap

A famous, textbook algorithm in quantum computing is Grover Search [6], which solves the following task: Given is a quantum oracle for a function f:[N]{0,1}f:[N]\to\{0,1\}, where queries for f(x)f(x) may be made in quantum superposition. It is promised that K=#{x:f(x)=1}K=\#\{x:f(x)=1\} is exactly 11. The task is to find xx^{*} such that f(x)=1f(x^{*})=1. Grover Search solves this problem (with high probability) using O(N)O(\sqrt{N}) queries.

The algorithm is particularly simple: First, a state |s\ket{s} equal to the uniform superposition over all |x\ket{x} is prepared; this state makes an angle of arccos1/N\arccos\sqrt{1/N} with |x\ket{x^{*}}. We write |x\ket{x^{*}}^{\bot} for the state perpendicular to |x\ket{x^{*}} making an angle of θ=arcsin1/N\theta^{*}=\arcsin\sqrt{1/N} with |s\ket{s}. Then the algorithm repeatedly performs Grover iterations, each of which consists of one query followed by the simple “Grover diffusion” operation. The effect of a Grover iteration is to rotate |s\ket{s} by an angle of 2θ2\theta^{*}; thus after rr rotations the angle of |s\ket{s} from |x\ket{x^{*}}^{\bot} is (2r+1)θ(2r+1)\theta^{*}. Setting rπ4Nr\approx\tfrac{\pi}{4}\sqrt{N}, the algorithm makes O(N)O(\sqrt{N}) queries and ends up with a state at angle approximately π2\tfrac{\pi}{2} from |x\ket{x^{*}}^{\bot}; measuring then results in |x\ket{x^{*}} with probability sin2((2r+1)θ)sin2π2=1\sin^{2}((2r+1)\theta^{*})\approx\sin^{2}\tfrac{\pi}{2}=1.

In this form the algorithm relies on the assumption K=1K=1. For K1K\geq 1, the only change is that the parameter θ\theta^{*} becomes arcsinK/N\arcsin\sqrt{K/N}. Thus if the correct value of KK is known to the algorithm (and we assume for simplicity that KN/2K\leq N/2), it can choose rπ4N/Kr\approx\tfrac{\pi}{4}\sqrt{N/K} and solve the search problem using O(N/K)O(\sqrt{N/K}) iterations/queries. This algorithm also works if the algorithm knows an estimate KK^{\prime} of KK that is correct up to small multiplicative error; say, K1.1KK^{\prime}\overset{1.1}{\approx}K. Here we are using the following notation:

Notation \thetheorem.

For a,b,η>0a,b,\eta>0 we write a1+ηba\overset{1+\eta}{\approx}b if 11+ηa/b1+η\frac{1}{1+\eta}\leq a/b\leq 1+\eta.

If KK is unknown to the algorithm, one possibility is try all estimates K=1K^{\prime}=1, 1.11.1, 1.121.1^{2}, 1.13,,N/21.1^{3},\ \dots,\ N/2. The total number of Grover iterations (hence queries) will be O(iN/1.1i)=O(N)O(\sum_{i}\sqrt{N/1.1^{i}})=O(\sqrt{N}).222One must take a small amount of care to bound the overall failure probability without incurring a log factor. A strategy with improved query complexity for large KK was given by Boyer, Brassard, Høyer, and Tapp [2]; in brief, for i=0,1,2,i=0,1,2,\dots it tries a random number of rotations in the range [1,1.1i][1,1.1^{i}], stopping if ever an xf1(1)x\in f^{-1}(1) is found. This algorithm solves the search problem using O(N/K)O(\sqrt{N/K}) iterations, despite not knowing KK in advance.

1.2 Approximate Counting

A natural related problem, called Approximate Counting and introduced in [2], is to estimate KK. More precisely, given as input a parameter ϵ0\epsilon\geq 0, the task is to output a number K^\widehat{K} such that (with high probability) K^1+ϵK\widehat{K}\overset{1+\epsilon}{\approx}K. To keep the exposition simple, in this paper we will make the following standard assumptions:

  • 1/Nϵ11/N\leq\epsilon\leq 1 (setting ϵ=1/N\epsilon=1/N just yields the problem of exact counting — any smaller value of ϵ\epsilon does not change the problem);

  • KN/2K\leq N/2 (otherwise there is generally a dependence on NKN-K, since one can switch the roles of 0 and 11 in ff’s output);

  • K0K\neq 0 (generally, all algorithms can easily be extended to work in the case of K=0K=0, with query complexity being the worst-case query complexity over all K>0K>0).

The quantum Approximate Counting problem was solved with optimal query complexity by Brassard, Høyer, Mosca, and Tapp [3]. Combining quantum Fourier transform ideas from Shor’s Algorithm with the ideas behind Grover Search, their algorithm solves Approximate Counting using O(N/K/ϵ)O\lparen\sqrt{N/K}\!\bigm{/}\!\epsilon\rparen queries.

Let us make some remarks about this query complexity. First, note that the bound takes KK into account, even though KK is (initially) unknown to the algorithm. Second, although KK could be as small as 11, the worst-case query complexity over all KK need not be Ω(N/ϵ)\Omega\lparen\sqrt{N}\!\bigm{/}\!\epsilon\rparen. (Indeed, this would lead to an illogical query complexity of Ω(N3/2)\Omega(N^{3/2}) if one set ϵ=1/N\epsilon=1/N to do exact counting.) Instead, note that an algorithm can first run the [3] algorithm with ϵ=1\epsilon=1, expending O(N/K)O(N)O\lparen\sqrt{N/K}\rparen\leq O(\sqrt{N}) queries and learning a preliminary estimate K2KK^{\prime}\overset{2}{\approx}K. Now since KK is an integer, there is no point in trying to approximate it to a factor better than 1+1/K1+1/K, hence better than 1+1/(2K)1+1/(2K^{\prime}). Thus the algorithm can now raise the initial input ϵ\epsilon to 1/(2K)1/(2K^{\prime}) if necessary, and then run [3] to obtain its final estimate. This yields a final query complexity of

O(N/K/max{ϵ,1/K})=min{O(NK),O(N/K/ϵ)}O(N/ϵ)O\lparen\sqrt{N/K}\!\bigm{/}\!\max\{\epsilon,1/K\}\rparen=\min\{O(\sqrt{NK}),O\lparen\sqrt{N/K}\!\bigm{/}\!\epsilon\rparen\}\leq O(\sqrt{N/\epsilon})

(where in the last inequality we took the geometric mean). This KK-independent bound of O(N/ϵ)O(\sqrt{N/\epsilon}) is logical: the smallest ϵ\epsilon one should ever take is ϵ=1/N\epsilon=1/N, and this leads to a query complexity of O(N)O(N) for the general case of exact counting. By similar reasoning one can obtain the more precise fact that exact counting can done with O(NK)O(\sqrt{NK}) queries. Finally, we remark that [3]’s query complexity was shown to be optimal by Nayak and Wu [8].

Let us also briefly mention the quantum Amplitude Estimation problem, which is essentially the same as the Approximate Counting problem except that the “initial angle” θ\theta^{*} need not be of the form arcsinK/N\arcsin\sqrt{K/N} for some integer KK, but can be any value. The solution to the Amplitude Estimation problem in [3] is a widely used tool in quantum algorithm design, and leads to quadratic speedups over classical algorithms for a variety of statistical problems.

1.3 Simpler and nonadaptive?

Although the Approximate Counting algorithm from [3] has optimal query complexity, there has recently been a lot of interest in simplifying it [10, 9, 1]. In particular the latter two of these just-cited works strove to replace it with an algorithm that only uses Grover iterations, both for analytic simplicity and practical simplicity (the controlled amplifications of [3] being particularly problematic for NISQ devices). The work of Aaronson and Rall [1] provably succeeds at this challenge, providing an algorithm that solves the Approximate Counting problem using O(N/K/ϵ)O\lparen\sqrt{N/K}\!\bigm{/}\!\epsilon\rparen Grover iterations (hence queries). Briefly, the Aaronson–Rall algorithm has a first phase (somewhat similar to the [2] algorithm) that performs a geometrically increasing sequence of Grover iterations until KK can be estimated up to a constant factor of 1.11.1 (see Theorem 3.1 herein). This requires O(N/K)O(\sqrt{N/K}) iterations. In the second phase, their algorithm performs a kind of binary search to improve the approximation factor to 1+ϵ1+\epsilon; each step of the binary search requires additional Grover iterations, totalling O(N/K/ϵ)O\lparen\sqrt{N/K}\!\bigm{/}\!\epsilon\rparen in the end.

From the point of view of practicality and simplicity, there is a downside to the Aaronson–Rall algorithm, which is that its Grover iterations are adaptive (especially in the second phase of the algorithm). In other words, the steps of the algorithm involve many repetitions of the following: performing some Grover iterations, measuring, and doing some classical computation to decide how many Grover iterations to do in the next step. It has been argued that this repeated switching between quantum and classical computation could be undesirable in practice. Indeed, the final open question in [1] concerned the optimal query complexity of Approximate Counting using nonadaptive Grover iterations. This version of the problem was also stressed and studied in [9], but without any provable guarantees being provided.

Other recent developments in the area of approximate counting include [5, 7], which propose variants of the algorithm from [1] but with improved constant factors. As well, the work [4] proves a lower bound for the query complexity of approximate counting in the parallel case.

1.4 Our results

We investigate the problem of Approximate Counting using only nonadaptive Grover iterations. Note that for this version of the problem, there is no hope of obtaining the query complexity O(N/K/ϵ)O\lparen\sqrt{N/K}\!\bigm{/}\!\epsilon\rparen that improves as a function of KK. To see this, suppose even that ϵ\epsilon is fixed to 11. If the algorithm is to achieve query complexity O(N/K)O(\sqrt{N/K}), then it must be able to achieve O(1)O(1) query complexity when K=Θ(N)K=\Theta(N). Since it is nonadaptive, this means it must always make only O(1)O(1) queries. But this is impossible, as even for adaptive algorithms it is known that Ω(N)\Omega(\sqrt{N}) queries are required in the case of K=O(1)K=O(1), ϵ=1\epsilon=1.

In other words, with nonadaptive algorithms we can only hope to achieve the optimal query complexity that is independent of KK, namely O(N/ϵ)O(\sqrt{N/\epsilon}). In this work we indeed show this is achievable. Our main theorem is:

Theorem 1.1.

There is an algorithm for quantum Approximate Counting that uses only nonadaptive Grover iterations, and that has a query complexity of O(N/ϵ)O(\sqrt{N/\epsilon}) (and minimal additional computational overhead).

We also briefly sketch an extension of our algorithm achieving improved query complexity in the setting where we are allowed multiple rounds of nonadaptive Grover iterations (as opposed to just one).

2 Preliminaries

We will assume throughout that K220NK\leq 2^{-20}N.333Our work would be fine with, say, KN/8K\leq N/8, but we put 2202^{-20} so as to able to cite [1] as a black box. This without loss of generality since we may artificially replace NN by 220N2^{20}N and extend ff to f:[220N]{0,1}f:[2^{20}N]\to\{0,1\}, with f(x)=0f(x)=0 for x>Nx>N. We fix

θ=arcsinK/N,\theta^{*}=\arcsin\sqrt{K/N},

sometimes called the “Grover angle”. Recall that a query algorithm based on Grover iterations has the following property: At the cost of qq\in\mathbb{N} “queries”, it can “flip a coin with bias sin2((2q+1)θ)\sin^{2}((2q+1)\theta^{*})”. By repeating this tt times, it can obtain tt independent flips of this coin. It is statistically sufficient to retain only the average of the coin flip outcomes, which is a random variable distributed as 1tBin(t,sin2((2q+1)θ))\frac{1}{t}\text{Bin}(t,\sin^{2}((2q+1)\theta^{*})). These observations lead to the following:

Notation 2.1.

For real r1r\geq 1 we write r\lfloor\!\!\lfloor r\rfloor\!\!\rfloor for the largest odd integer not exceeding rr, and we write p(r)=sin2(rθ)p(r)=\sin^{2}(\lfloor\!\!\lfloor r\rfloor\!\!\rfloor\theta^{*}).

Definition 2.2.

A Grover schedule consists of two sequences: R=(r1,,rm)R=(r_{1},\dots,r_{m}) (each real ri1r_{i}\geq 1) and T=(t1,,tm)T=(t_{1},\dots,t_{m}) (each ti+t_{i}\in\mathbb{N}^{+}). Performing this Grover schedule refers to obtaining independent random variables 𝒑^1,,𝒑^m\widehat{\boldsymbol{p}}_{1},\dots,\widehat{\boldsymbol{p}}_{m}, where 𝒑^i\widehat{\boldsymbol{p}}_{i} is distributed as 1tiBin(ti,p(ri))\frac{1}{t_{i}}\text{Bin}(t_{i},p(r_{i})).

A nonadaptive Grover iteration algorithm for Approximate Counting is simply an algorithm that performs one fixed Grover schedule, and produces its final estimate K^\widehat{K} by classically post-processing the results. One can more generally study algorithms with “ss rounds of nonadaptivity”; this simply means that ss Grover schedules are used, but they may be chosen adaptively.

Fact 1.

Performing the Grover schedule R,TR,T uses at most 12iriti\tfrac{1}{2}\sum_{i}r_{i}t_{i} queries.

2.1 On how well we need to approximate θ\theta^{*}

We will use the following elementary numerical fact:

Lemma 2.3.

Suppose for real 0k,kN0\leq k,k^{\prime}\leq N and η1\eta\leq 1 that arcsink/N1+ηarcsink/N\arcsin\sqrt{k^{\prime}/N}\overset{1+\eta}{\approx}\arcsin\sqrt{k/N}. Then k1+3ηkk^{\prime}\overset{1+3\eta}{\approx}k.

This lemma helps us show that approximating θ\theta^{*} well is equivalent to approximating KK well:

Proposition 2.4.

Suppose θ1+ϵ/6θ\theta\overset{1+\epsilon/6}{\approx}\theta^{*}. If κ\kappa^{\prime}\in\mathbb{R} satisfies θ=arcsinκ/N\theta=\arcsin\sqrt{\kappa^{\prime}/N}, and KK^{\prime} is the nearest integer to κ\kappa^{\prime}, then K1+ϵKK^{\prime}\overset{1+\epsilon}{\approx}K.

Proof 2.5.

Since θ1+ϵ/6θ\theta\overset{1+\epsilon/6}{\approx}\theta^{*}, Lemma 2.3 tells us that κ1+ϵ/2K\kappa^{\prime}\overset{1+\epsilon/2}{\approx}K, and hence

|κK|(ϵ/2)K.|\kappa^{\prime}-K|\leq(\epsilon/2)K. (1)

We also have |κK|1/2|\kappa^{\prime}-K^{\prime}|\leq 1/2, and hence |KK|(ϵ/2)K+1/2|K^{\prime}-K|\leq(\epsilon/2)K+1/2. But we can assume (ϵ/2)K1/2(\epsilon/2)K\geq 1/2, as otherwise Equation 1 implies |κK|<1/2|\kappa^{\prime}-K|<1/2 and hence K=KK^{\prime}=K. Thus |KK|(ϵ/2)K+(ϵ/2)K=ϵK|K^{\prime}-K|\leq(\epsilon/2)K+(\epsilon/2)K=\epsilon K; i.e., K1+ϵKK^{\prime}\overset{1+\epsilon}{\approx}K.

Lemma 2.6.

Given some θ1.11θ\theta^{\prime}\overset{1.11}{\approx}\theta^{*}, estimating θ\theta^{*} to a factor of 1+1/(2Nsin2θ)1+1/(2N\sin^{2}{\theta^{\prime}}) is at least as good as estimating θ\theta^{*} to a factor of 1+ϵ/61+\epsilon/6.

Proof 2.7.

From Lemma 2.3, 1+1/(2Nsin2θ)1+1.33/(2K)<1+1/K1+1/(2N\sin^{2}{\theta^{\prime}})\leq 1+1.33/(2K)<1+1/K. The closest possible values to KK are K1K-1 and K+1K+1; therefore, estimating KK within a factor of 1+1/K1+1/K is the same as estimating KK exactly. This is at least as good as estimating KK to within a factor of 1+ϵ/61+\epsilon/6.

3 The nonadaptive algorithm

Our algorithm can conceptually be thought of as having two stages: the first stage estimates θ\theta^{*} to a constant factor, and the second stage improves this estimate to the desired factor of 1+ϵ1+\epsilon. This two-stage approach is similar in flavor to the algorithms in [1, 2]. However we note that, consistent with our nonadaptivity condition, the two stages in our algorithm can be run in parallel.

For the first stage of our algorithm, we require the following result of Aaronson and Rall [1], which estimates θ\theta^{*} up to a factor of 1.11.1, using O(N)O(\sqrt{N}) nonadaptive queries. (In fact, as Aaronson and Rall show, the obvious adaptive version of the algorithm incurs only O(N/K)O(\sqrt{N/K}) queries.)

Theorem 3.1.

Let R=(1,(12/11),(12/11)2,,(12/11)m)R=(1,(12/11),(12/11)^{2},\dots,(12/11)^{m}), where m=Θ(logN)m=\Theta(\log N) is minimal with (12/11)mN(12/11)^{m}\geq\sqrt{N}. Let TT consist of mm copies of 105ln(120/δ)10^{5}\ln(120/\delta). Perform the Grover schedule R,TR,T. (By Fact 1 this incurs O(N)O(\sqrt{N}) queries.) Then except with probability at most δ/2\delta/2, there is a minimal tt such that 𝒑^t1/3\widehat{\boldsymbol{p}}_{t}\geq 1/3, and setting θ~=(5/8)(11/12)t\widetilde{\theta}=(5/8)(11/12)^{t} results in θ~1.1θ\widetilde{\theta}\overset{1.1}{\approx}\theta^{*}.

The second stage of our algorithm uses the following critical lemma, which we will prove in Section 4.

Lemma 3.2.

Given the parameters θ\theta\textquoteright, ϵ\epsilon\textquoteright, and δ\delta\textquoteright, there is an algorithm using only nonadaptive Grover iterations that performs O(log(1/δ)/(θϵ))O(\log(1/\delta^{\prime})/(\theta^{\prime}\epsilon^{\prime})) queries, and outputs a result θest\theta_{\mathrm{est}} with the following guarantee: if θ1.11θ\theta\textquoteright\overset{1.11}{\approx}\theta^{*}, then θest1+ϵ/6θ\theta_{\mathrm{est}}\overset{1+\epsilon^{\prime}/6}{\approx}\theta^{*} except with probability at most δ/2\delta/2.

In this section, we will show how to use Theorem 3.1 and Lemma 3.2 to prove Theorem 1.1.

We will now state our algorithm:

Algorithm 1.

placeholderToEndLine

  1. 1.

    Run the Aaronson–Rall algorithm from Theorem 3.1, allowing us to later compute θ~\widetilde{\theta}.

  2. 2.

    For θ=arcsin(1/N),1.001arcsin1/N,(1.001)2arcsin1/N,,1.1arcsin(220)\theta=\arcsin(\sqrt{1/N}),1.001\arcsin{\sqrt{1/N}},(1.001)^{2}\arcsin{\sqrt{1/N}},\dots,1.1\arcsin(2^{-20}):

    Perform the algorithm in Lemma 3.2 with the parameters θ=θ\theta^{\prime}=\theta, ϵ=max(ϵ,12Nsin2θ)\epsilon^{\prime}=\max(\epsilon,\frac{1}{2N\sin^{2}\theta^{\prime}}), and δ=δ/2\delta^{\prime}=\delta/2.

  3. 3.

    Classical Post-processing: Among all iterations in the for-loop, take the iteration with the value of θ\theta that was closest to θ~\widetilde{\theta}, and output the result of that iteration.

Each iteration of the for loop in Step 22 can be done in parallel (there are no computational dependencies between the iterations), and Step 11 can also be done in parallel with Step 22. Therefore, the algorithm uses only nonadaptive Grover iterations. Note also that we can write the quantum parts of steps 11 and 22 as one fixed Grover schedule, with the classical parts and step 33 forming the post-processing step; however, it will be more convenient in this section to think about these as individual steps in a logical sequence.

Proposition 3.3.

Algorithm 1 returns a value θest\theta_{\mathrm{est}} such that θest1+ϵθ\theta_{\mathrm{est}}\overset{1+\epsilon}{\approx}\theta^{*}, except with probability at most δ\delta.

Proof 3.4.

By Theorem 3.1, Step 11 returns an estimate θ~\widetilde{\theta} such that θ~1.1θ\widetilde{\theta}\overset{1.1}{\approx}\theta^{*}, with a failure probability of at most δ/2\delta/2 . The value of θ\theta (in Step 22) that is closest to θ~\widetilde{\theta} is at most a factor of 1.0011.001 away from θ~\widetilde{\theta}. If Step 11 succeeded, this is at most a factor of 1.1×1.001<1.111.1\times 1.001<1.11 away from θ\theta^{*}. By Lemma 3.2, the algorithm outputs an estimate θest\theta_{\mathrm{est}} such that θest1+ϵ/6θ\theta_{\mathrm{est}}\overset{1+\epsilon^{\prime}/6}{\approx}\theta^{*}, with a failure probability of at most δ/2\delta/2. Lemma 2.6 then implies that θest1+ϵ/6θ\theta_{\mathrm{est}}\overset{1+\epsilon/6}{\approx}\theta^{*}. Using Proposition 2.4 (setting the parameter θ=θest\theta=\theta_{\mathrm{est}}), we get an estimate KestK_{\mathrm{est}} such that Kest1+ϵKK_{\mathrm{est}}\overset{1+\epsilon}{\approx}K. By the union bound, the overall failure probability of the algorithm is at most δ\delta.

Proposition 3.5.

Algorithm 1 makes O(N/ϵlog(1/δ))O(\sqrt{N/\epsilon}\log({1}/{\delta})) queries.

Proof 3.6.

First, consider all iterations where 2Nsin2(θ)1/ϵ2N\sin^{2}(\theta)\leq 1/\epsilon. In these cases, the query complexity given by Lemma 3.2 would be O(log(1/δ)(Nsin2(θ))/θ)=O(Nθlog(1/δ))O(\log(1/\delta)(N\sin^{2}(\theta))/\theta)=O(N\theta\log(1/\delta)).

The query complexity associated with these iterations is a geometric series with a constant common ratio of 1.011.01 where the largest term is O(N/ϵlog(1/δ))O(\sqrt{N/\epsilon}\log(1/\delta)). Therefore the overall query complexity due to these iterations is O(N/ϵlog(1/δ))O(\sqrt{N/\epsilon}\log(1/\delta)).

Now consider all iterations where 2Nsin2(θ)>1/ϵ2N\sin^{2}(\theta)>1/\epsilon. In these cases, the query complexity is O(log(1/δ)/(θϵ))O(\log(1/\delta)/(\theta\epsilon)). This forms a geometrically decreasing series (with a constant common ratio), where the first term is again O(N/ϵlog(1/δ))O(\sqrt{N/\epsilon}\log(1/\delta)). The overall query complexity contributed by these schedules is thus also O(N/ϵlog(1/δ))O(\sqrt{N/\epsilon}\log(1/\delta)).

Therefore, the query complexity of Algorithm 1 is O(N/ϵlog(1/δ))O(\sqrt{N/\epsilon}\log(1/\delta)), as claimed.

Having proven Proposition 3.3 and Proposition 3.5, we have established our main result Theorem 1.1 modulo the proof of Lemma 3.2, which will appear in the next section. Before giving this, we briefly sketch how our algorithm can also be extended to the setting of being allowed multiple rounds of nonadaptive Grover iterations. If we have two such rounds of nonadaptivity, we can first run step 11 of our algorithm to get a constant-factor approximation, and then based on its result run the algorithm in Lemma 3.2; this achieves a query complexity of O(N+min(N/ϵ,N/K/ϵ))O(\sqrt{N}+\min(\sqrt{N/\epsilon},\sqrt{N/K}/\epsilon)). This nearly matches the query complexity of the fully adaptive case, but for the N\sqrt{N} term due to the first step. Given more rounds of nonadaptivity, we can reduce the cost of this first step by staging it over multiple initial rounds. One can show that with O(logN)O(\log N) rounds of nonadaptivity, this will yield the optimal query complexity corresponding to the fully adaptive case.

4 Proving Lemma 3.2

Our goal in this section will be to prove Lemma 3.2. Assume that we are given some θ\theta^{\prime}, ϵ\epsilon^{\prime}, and δ\delta^{\prime}. We will show a nonadaptive Grover iteration algorithm making O(log(1/δ)/(θϵ))O(\log(1/\delta^{\prime})/(\theta^{\prime}\epsilon^{\prime})) queries with the property that if θ1.11θ\theta^{\prime}\overset{1.11}{\approx}\theta^{*}, then its output will be a factor-(1+ϵ)(1+\epsilon^{\prime}) approximation of θ\theta^{*} (except with failure probability at most δ\delta^{\prime}) For the remainder of the section, we will assume that we are in the interesting case where θ1.11θ\theta^{\prime}\overset{1.11}{\approx}\theta^{*} (in the other cases, the algorithm does not need to output a correct answer).

4.1 Proof idea

The algorithm for Lemma 3.2 is structured exactly as described in Definition 2.2 and Fact 1; there is an initial nonadaptive quantum part with a fixed Grover schedule (that we will later define), and a classical post-processing step at the end that uses the results of the quantum part to estimate θ\theta^{*}.

Before stating the key ideas in the quantum part of our algorithm, we mention the “Rotation Lemma” of Aaronson and Rall [1, Lem. 2]. The main idea in that lemma can be roughly stated as follows: given that θ\theta^{*} lies in some range [θmin,θmin+Δθ][\theta_{\mathrm{min}},\theta_{\mathrm{min}}+\Delta\theta], we can pick an odd integer value of rr (where r=O(1/(θΔθ))r=O(1/(\theta\cdot\Delta\theta))), such that rθminr\theta_{\mathrm{min}} is close to 2πk2\pi k and r(θmin+Δθ)r(\theta_{\mathrm{min}}+\Delta\theta) is close to 2πk+π/22\pi k+\pi/2. If θ\theta is close to θmin\theta_{\mathrm{min}}, p(r)p(r) will be nearly 0 (and if it is close to θmin+Δθ\theta_{\mathrm{min}}+\Delta\theta, it will be nearly 11). Aaronson and Rall use this lemma to continually shrink the possible range that θ\theta^{*} could lie in by a geometric factor at each iteration, until the range is 1±ϵ1\pm\epsilon.

We will adopt a similar idea to find an efficient Grover schedule that can distinguish any two candidate angles with high probability; we do this by relaxing the condition of one angle being close to 2πk2\pi k and the other being at distance π/2\pi/2 from it. Instead, we choose the sequence RR in our Grover schedule such that for any pair of values θ1\theta_{1}, and θ2\theta_{2}, there is some rRr\in R such that rθ1r\theta_{1} and rθ2r\theta_{2} differ by approximately π/8\pi/8, and are also “in the same quadrant” (meaning the same interval [0,π2)[0,\tfrac{\pi}{2}), [π2,π)[\tfrac{\pi}{2},\pi), [π,3π2)[\pi,\tfrac{3\pi}{2}), [3π2,2π)[\tfrac{3\pi}{2},2\pi) modulo 2π2\pi). This relaxation allows us to save on the total number of queries made by reusing the same value of rr to distinguish many pairs of candidate angles. Due to this, the nonadaptivity requirement does not make the query complexity grow polynomially larger (whereas, for example, naively simulating the search tree from [1] in a nonadaptive fashion would incur an extra 1/ϵ1/\epsilon^{\prime} factor).

The classical post-processing involves running a “tournament” between all candidate estimates of θ\theta^{*}, which outputs the winning value as the estimate. This post-processing step can be implemented efficiently in O(log(1/ϵ)/ϵ)O(\log(1/\epsilon^{\prime})/\epsilon^{\prime}) classical time.

4.2 Some arithmetic lemmas

We now define some useful sequences and prove a couple of arithmetic lemmas about them.

Definition 4.1.

Define the sequence uu by u0=1u_{0}=1, u1=1.01u_{1}=1.01, …, uL=1.01Lu_{L}=1.01^{L} where L=O(log(1/(θϵ)))L=O(\log(1/(\theta^{\prime}\epsilon^{\prime}))) is minimal with uL1.2π/(θϵ)u_{L}\geq 1.2\pi/(\theta^{\prime}\epsilon^{\prime}).

Lemma 4.2.

Suppose we are given θ0\theta_{0} and θ1\theta_{1} such that θ0<θ1\theta_{0}<\theta_{1}, θ01.11θ\theta_{0}\overset{1.11}{\approx}\theta^{\prime}, θ11.11θ\theta_{1}\overset{1.11}{\approx}\theta^{\prime}, and θ01+ϵ/6.1θ1\theta_{0}\overset{1+\epsilon/6.1}{\not\approx}\theta_{1}. Write η=θ1θ0\eta=\theta_{1}-\theta_{0}. Then there exists some 0iL0\leq i\leq L such that uiη1.01π8u_{i}\eta\overset{1.01}{\approx}\tfrac{\pi}{8}.

Proof 4.3.

We know that u0η=ηθ11.1×0.0001<π8u_{0}\eta=\eta\leq\theta_{1}\leq 1.1\times 0.0001<\tfrac{\pi}{8}. We also have uLη1.2πη/(θϵ)1.2πη/(1.1θ0ϵ)1.2π/(1.16.1)>π8u_{L}\eta\geq 1.2\pi\eta/(\theta^{\prime}\epsilon^{\prime})\geq 1.2\pi\eta/(1.1\theta_{0}\epsilon^{\prime})\geq 1.2\pi/(1.1\cdot 6.1)>\tfrac{\pi}{8} where we used θ01+ϵ/6.1θ1\theta_{0}\overset{1+\epsilon/6.1}{\not\approx}\theta_{1} in the second-to-last inequality. The lemma now follows from the geometric growth of the uiu_{i}’s with ratio 1.011.01. In particular, i=log1.01(π8η)i=\left\lfloor\log_{1.01}(\tfrac{\pi}{8\eta})\right\rfloor works.

For the uiu_{i} given by Lemma 4.2, we have uiθ1uiθ0π8u_{i}\theta_{1}-u_{i}\theta_{0}\approx\frac{\pi}{8}. This seems promising, in that the “coin probabilities” associated to these angles, namely sin2(uiθ1)\sin^{2}(u_{i}\theta_{1}) and sin2(uiθ0)\sin^{2}(u_{i}\theta_{0}), seem as though they should be far apart. Unfortunately, something annoying could occur; it could be that these angles are, say, 100π±π16100\pi\pm\frac{\pi}{16}, in which case the coin probabilities would be identical. As mentioned in Section 4.1, what we would really like is to have the two angles be far apart but also in the same quadrant. To achieve this, we will define a new sequence.

Definition 4.4.

For each 0iL0\leq i\leq L, define ai,0=0a_{i,0}=0, ai,1=π4.8θa_{i,1}=\frac{\pi}{4.8\theta^{\prime}}, ai,2=1.01π4.8θa_{i,2}=1.01\cdot\frac{\pi}{4.8\theta^{\prime}}, ai,3=1.012π4.8θa_{i,3}=1.01^{2}\cdot\frac{\pi}{4.8\theta^{\prime}}, …, ai,C+1=1.01Cπ4.8θa_{i,C+1}=1.01^{C}\cdot\frac{\pi}{4.8\theta^{\prime}}, where C=2log1.01(1.2)C=\left\lceil 2\log_{1.01}(1.2)\right\rceil is a constant. Also define si,j=ui+ai,js_{i,j}=u_{i}+a_{i,j}.

Lemma 4.5.

In the setting of Lemma 4.2, there exists some 0jC+10\leq j\leq C+1 such that

si,jη1.5π8s_{i,j}\eta\overset{1.5}{\approx}\tfrac{\pi}{8}

and such that si,jθ0s_{i,j}\theta_{0} and si,jθ1s_{i,j}\theta_{1} are in the same quadrant.

Proof 4.6.

We first apply Lemma 4.2 and obtain

uiη1.01π8.u_{i}\eta\overset{1.01}{\approx}\tfrac{\pi}{8}. (2)

Now if uiθ0u_{i}\theta_{0} and uiθ1u_{i}\theta_{1} are already in the same quadrant then we can take j=0j=0 (implying si,j=uis_{i,j}=u_{i}) and we are done. Otherwise, the plan will be to find j>0j>0 with ajθ0π4a_{j}\theta_{0}\approx\tfrac{\pi}{4}, thus shifting them to si,jθ0s_{i,j}\theta_{0} and si,jθ1s_{i,j}\theta_{1} that still differ by roughly π8\tfrac{\pi}{8} but which now must be in the same quadrant.

To find the required jj, observe that on one hand, a1θ0=(π/(4.8θ))θ01.11π/4.8π4a_{1}\theta_{0}=(\pi/(4.8\theta^{\prime}))\cdot\theta_{0}\leq 1.11\pi/4.8\leq\frac{\pi}{4}. On the other hand, ai,C+1θ01.22(π/(4.8θ))θ0(1.2/1.1)π/4π4a_{i,C+1}\theta_{0}\geq 1.2^{2}\cdot(\pi/(4.8\theta^{\prime}))\cdot\theta_{0}\geq(1.2/1.1)\cdot\pi/4\geq\frac{\pi}{4}. By the geometric growth of the ai,ja_{i,j}’s with ratio 1.011.01, we conclude that there exists some 1ji1\leq j\leq\ell_{i} achieving

ai,jθ01.05π4.a_{i,j}\theta_{0}\overset{1.05}{\approx}\tfrac{\pi}{4}. (3)

We may now make several deductions. First,

θ01.1θt,θ11.1θtθ01.22θ1ai,jθ01.22ai,jθ1ai,jη.22ai,jθ0.221.05π4.24π4.\theta_{0}\overset{1.1}{\approx}\theta_{t},\theta_{1}\overset{1.1}{\approx}\theta_{t}\medspace\implies\medspace\theta_{0}\overset{1.22}{\approx}\theta_{1}\medspace\implies\medspace a_{i,j}\theta_{0}\overset{1.22}{\approx}a_{i,j}\theta_{1}\medspace\implies\medspace a_{i,j}\eta\leq.22\cdot a_{i,j}\theta_{0}\leq.22\cdot 1.05\tfrac{\pi}{4}\leq.24\tfrac{\pi}{4}.

Combining this with Equation 2 we conclude

si,jη=uiη+ai,jη[11.01π8,π8(1.01)+.24π4]1.5π8.s_{i,j}\eta=u_{i}\eta+a_{i,j}\eta\in[\tfrac{1}{1.01}\tfrac{\pi}{8},\tfrac{\pi}{8}(1.01)+.24\tfrac{\pi}{4}]\overset{1.5}{\approx}\tfrac{\pi}{8}. (4)

Thus we started with uiθ0u_{i}\theta_{0} and uiθ1u_{i}\theta_{1} differing by π8\tfrac{\pi}{8} (up to factor 1.011.01) but in different quadrants; by passing to si,jθ0s_{i,j}\theta_{0} and si,jθ1s_{i,j}\theta_{1}, we have offset uiθ0u_{i}\theta_{0} by π4\tfrac{\pi}{4} (up to factor 1.051.05, Equation 3) and the two angles still differ by around π8\tfrac{\pi}{8} (up to factor 1.51.5, Equation 4). Thus si,jθ0s_{i,j}\theta_{0} and si,jθ1s_{i,j}\theta_{1} are in the same quadrant and the proof is complete.

4.3 The algorithm

We can now describe our “second stage” algorithm, which simply runs the Grover schedule GG defined as follows.

Definition 4.7.

The Grover schedule GG comprises the sequence R=(si,j)i=0L,j=0C+1R=(s_{i,j})_{i=0\dots L,\ j=0\dots C+1} and T=(Alog2(1/(δθϵui)))i=0L,j=0C+1T=(\left\lceil A\log_{2}(1/(\delta^{\prime}\theta^{\prime}\epsilon^{\prime}u_{i}))\right\rceil)_{i=0\dots L,\ j=0\dots C+1}. Here AA is a universal constant to be chosen later.

Note that the Ti,jT_{i,j} values we use are exactly the number of coin flips used in the second stage of the algorithm in [1]. Like in their algorithm, this choice of values allows us to avoid stray log(1/ϵ)\log(1/\epsilon) or loglog(1/ϵ)\log\log(1/\epsilon) factors in the overall query complexity.

Proposition 4.8.

Performing the Grover schedule GG takes at most O(log(1/δ)/(θϵ))O(\log(1/\delta^{\prime})/(\theta^{\prime}\epsilon^{\prime})) queries.

Proof 4.9.

Using Fact 1, the query complexity of performing GG is i=0Llog(1/(δθϵ1.01i))1.01i{\sum_{i=0}^{L}\log(1/(\delta^{\prime}\theta^{\prime}\epsilon^{\prime}\cdot 1.01^{i}))1.01^{i}} (up to constant factors). This is log(1/δ)i=0L1.01i+i=0Llog(1/(θϵ1.01i))1.01i{\log(1/\delta)\sum_{i=0}^{L}1.01^{i}+\sum_{i=0}^{L}\log(1/(\theta^{\prime}\epsilon^{\prime}\cdot 1.01^{i}))1.01^{i}}. Noting that 1.01L=O(1/(θϵ)){1.01^{L}=O(1/(\theta^{\prime}\epsilon^{\prime}))}, the first term is clearly O(log(1/δ)/(θϵ)){O(\log(1/\delta)/(\theta^{\prime}\epsilon^{\prime}))} and the second term, up to a constant factors, is i=0L(Li)1.01i=O(1.01L)=O(1/(θϵ)){\sum_{i=0}^{L}(L-i)1.01^{i}=O(1.01^{L})=O(1/(\theta^{\prime}\epsilon^{\prime}))}. Therefore, the overall query complexity is O(log(1/δ)/(θϵ)){O(\log(1/\delta)/(\theta^{\prime}\epsilon^{\prime}))} as desired.

Remark.

The above calculation mirrors the one done for stage 22 of the adaptive algorithm in [1]; this is expected because both algorithms use the same number of “coin flips” per coin (Ti,jT^{\prime}_{i,j} values), as mentioned above.

It now remains for us to show how to approximate θ\theta^{*} (with high probability) using the data collected from this Grover schedule.

4.4 Completing the algorithm

We first prove a lemma showing that we can distinguish between any pair of angles (that are not already sufficiently close to each other) by using the ideas developed in Lemma 4.2 and Lemma 4.10.

Lemma 4.10.

There is an O(1)O(1)-time classical deterministic algorithm that, given

  • θ01.1θ\theta_{0}\overset{1.1}{\approx}\theta^{\prime}, θ11.1θ\theta_{1}\overset{1.1}{\approx}\theta^{\prime}, such that θ01+ϵ/6.1θ1\theta_{0}\overset{1+\epsilon/6.1}{\not\approx}\theta_{1}

  • the data collected by the Grover schedule GG,

outputs either “reject θ0\theta_{0}” or “reject θ1\theta_{1}”. Except with failure probability at most cθδϵ/|θ1θ0|c\theta^{\prime}\delta^{\prime}\epsilon^{\prime}/|\theta_{1}-\theta_{0}| (where c>0c>0 is a constant to be chosen later), the following is true:

For b=0,1b=0,1, if θ1+.001ϵθb\theta^{*}\overset{1+.001\epsilon}{\approx}\theta_{b}, then the algorithm does not output “reject θb\theta_{b}”.
Proof 4.11.

The algorithm computes the (i,j)(i,j) pair promised by Lemma 4.5, such that si,jθ0s_{i,j}\theta_{0} and si,jθ1s_{i,j}\theta_{1} are in the same quadrant and such that |si,jθ1si,jθ0|1.5π8|s_{i,j}\theta_{1}-s_{i,j}\theta_{0}|\overset{1.5}{\approx}\frac{\pi}{8}. Letting qb=sin2(si,jθb)q_{b}=\sin^{2}(s_{i,j}\theta_{b}) for b=0,1b=0,1, it follows from the assumptions in the preceding sentence that |q0q1|.04|q_{0}-q_{1}|\geq.04. The algorithm may now select a threshold q[.01,.99]q^{\prime}\in[.01,.99] such that (without loss of generality) q0q.01q_{0}\leq q^{\prime}-.01 and q1q+.01q_{1}\geq q^{\prime}+.01.

The algorithm will use just the coin flips from the si,js_{i,j} part of the schedule; these coin flips have bias p(si,j)=sin2(si,jθ)p(s_{i,j})=\sin^{2}(\lfloor\!\!\lfloor s_{i,j}\rfloor\!\!\rfloor\theta^{*}). More precisely, the algorithm will output “reject θ0\theta_{0}” if 𝒑^i,j>q\widehat{\boldsymbol{p}}_{i,j}>q^{\prime} and “reject θ1\theta_{1}” if 𝒑^i,jq\widehat{\boldsymbol{p}}_{i,j}\leq q^{\prime}. We need to show that if θ1+.001ϵθ0\theta^{*}\overset{1+.001\epsilon}{\approx}\theta_{0} then the algorithm outputs “reject θ0\theta_{0}” with probability at most cθδϵ/|θ1θ0|c\theta^{\prime}\delta^{\prime}\epsilon^{\prime}/|\theta_{1}-\theta_{0}|. (The case when θ1+.001ϵθ1\theta^{*}\overset{1+.001\epsilon}{\approx}\theta_{1} is analogous.)

Now if θ1+.001ϵθ0\theta^{*}\overset{1+.001\epsilon}{\approx}\theta_{0}, then si,jθ1+.001ϵsi,jθ0\lfloor\!\!\lfloor s_{i,j}\rfloor\!\!\rfloor\theta^{*}\overset{1+.001\epsilon}{\approx}\lfloor\!\!\lfloor s_{i,j}\rfloor\!\!\rfloor\theta_{0}. It follows that

|si,jθsi,jθ0|.001ϵsi,jθ0.001si,jϵθ0.\Bigl{|}\lfloor\!\!\lfloor s_{i,j}\rfloor\!\!\rfloor\theta^{*}-\lfloor\!\!\lfloor s_{i,j}\rfloor\!\!\rfloor\theta_{0}\Bigr{|}\leq.001\epsilon\cdot\lfloor\!\!\lfloor s_{i,j}\rfloor\!\!\rfloor\theta_{0}\leq.001s_{i,j}\cdot\epsilon\theta_{0}.

But we know that

π81.5|si,jθ1si,jθ0|=si,j|θ1θ0|si,j(ϵ/6.1)θ0,\tfrac{\pi}{8}\overset{1.5}{\approx}|s_{i,j}\theta_{1}-s_{i,j}\theta_{0}|=s_{i,j}|\theta_{1}-\theta_{0}|\geq s_{i,j}\cdot(\epsilon/6.1)\theta_{0},

the last inequality because θ01+ϵ/6.1θ1\theta_{0}\overset{1+\epsilon/6.1}{\not\approx}\theta_{1}. Combining the above two deductions yields

|si,jθsi,jθ0|.0011.56.1π8.004.\Bigl{|}\lfloor\!\!\lfloor s_{i,j}\rfloor\!\!\rfloor\theta^{*}-\lfloor\!\!\lfloor s_{i,j}\rfloor\!\!\rfloor\theta_{0}\Bigr{|}\leq.001\cdot 1.5\cdot 6.1\cdot\tfrac{\pi}{8}\leq.004.

Moreover, si,jθ0\lfloor\!\!\lfloor s_{i,j}\rfloor\!\!\rfloor\theta_{0} and si,jθ0s_{i,j}\theta_{0} differ by at most 2θ0.0002<.0012\theta_{0}\leq.0002<.001. Thus we finally conclude

|si,jθsi,jθ0|.005|p(si,j)q0|.005p(si,j)<q.005\Bigl{|}\lfloor\!\!\lfloor s_{i,j}\rfloor\!\!\rfloor\theta^{*}-s_{i,j}\theta_{0}\Bigr{|}\leq.005\quad\implies\quad\Bigl{|}p(s_{i,j})-q_{0}\Bigr{|}\leq.005\quad\implies\quad p(s_{i,j})<q^{\prime}-.005

(the first implication using that sin2\sin^{2} is 11-Lipschitz). Then, using a Chernoff bound, we have that 𝒑^i,j>q\widehat{\boldsymbol{p}}_{i,j}>q^{\prime} with probability at most cδθϵuic\delta^{\prime}\theta^{\prime}\epsilon^{\prime}u_{i}, where cc is a constant that depends on AA (as AA increases, cc decreases). From Lemma 4.2, we know that ui1.01π/(8|θ1θ0|)u_{i}\overset{1.01}{\approx}\pi/(8|\theta_{1}-\theta_{0}|). Then, assuming the constant AA is chosen large enough as a function of cc, we indeed have that 𝒑^i,j>q\widehat{\boldsymbol{p}}_{i,j}>q^{\prime} with probability at most cθδϵ/|θ1θ0|c\theta^{\prime}\delta^{\prime}\epsilon^{\prime}/|\theta_{1}-\theta_{0}|.

4.4.1 Description of the post-processing algorithm

We have developed the necessary tools to describe and justify the classical post-processing algorithm.

Fix values θi=θ(1+.001ϵ)i\theta_{i}=\theta^{\prime}(1+.001\epsilon^{\prime})^{i} for ViV-V\leq i\leq V, where V=O(1/ϵ)V=O(1/\epsilon^{\prime}) is a minimal integer such that (1+.001ϵ)V1.11(1+.001\epsilon^{\prime})^{V}\geq 1.11. We will refer to the θi\theta_{i}’s as “nodes”. We may also assume that the number of nodes is a power of 22 for convenience (while there are 2|V|+12|V|+1 nodes, we can always pad these actual nodes with some dummy nodes to reach the nearest power of 22).

The main idea is to repeatedly use Lemma 4.10 to run a “tournament” amongst all nodes. The tournament is structured as a series of “rounds”. In a given round, suppose we start off with nn nodes. Sort the nodes in order of the angles they correspond to. Now, pair up node 11 with node n/2+1n/2+1, node 22 with node n/2+2n/2+2, and so on, until node n/2n/2 is paired up with node nn. For each pair of nodes, use Lemma 4.10 to choose a winner to go to the next round. Note that it is possible that two nodes that are matched in the tournament do not satisfy the pre-condition of Lemma 4.10 because they are within a factor of (1+ϵ/6.1)(1+\epsilon/6.1) of each other — we call these “void” match-ups. We will call the part of the tournament we have described so far the first phase — when we see a void match-up, we stop this first phase and enter the second phase. (Note that if we never see any void match-ups and there is only one node left, we do not need the second phase and can directly output the remaining node as our estimate.)

When the first phase ends, take all remaining nodes and enter the second phase. In this phase, match up every pair of remaining nodes, and for every pair that does not form a void match-up, eliminate one of the nodes using Lemma 4.10. At the end of this, output any one of the remaining un-eliminated nodes (if there are none, then the program can output an arbitrary node - this is a failure condition and we will show that, with high probability, such failure conditions will not happen).

In our algorithm, we have arranged for θVθθV\theta_{-V}\leq\theta^{*}\leq\theta_{V}, and hence there exists a node θi\theta_{i^{*}} such that θi1+.001ϵθ\theta_{i^{*}}\overset{1+.001\epsilon}{\approx}\theta^{*}. We will proceed to bound the over failure probability of the algorithm by the probability that this node loses any match-up it is a part of.

Lemma 4.12.

If θi\theta_{i^{*}} never loses any match-up it is a part of, then the tournament outputs an estimate θest\theta_{\mathrm{est}} such that θest1+ϵ/6θ\theta_{\mathrm{est}}\overset{1+\epsilon/6}{\approx}\theta^{*}.

Proof 4.13.

Suppose that θi\theta_{i^{*}} never loses any match-up it is a part of. If the tournament ends in the first phase itself, then the algorithm will output θi\theta_{i^{*}}, which is correct. If the tournament ends in the second phase, then the only possible other nodes that we could output are the ones that θi\theta_{i^{*}} did not play, which can be at most a factor of 1+ϵ/6.11+\epsilon/6.1 away from it. Therefore, these nodes are also at most a factor of (1+0.001ϵ)(1+ϵ/6.1)1+ϵ/6(1+0.001\epsilon)(1+\epsilon/6.1)\leq 1+\epsilon/6 away from θ\theta^{*}.

Lemma 4.14.

The probability that θi\theta_{i^{*}} loses any match-up in the first phase of the tournament can be upper-bounded by cδc\delta^{\prime} times a constant factor (where cc is the constant from Lemma 4.10).

Proof 4.15.

Consider an arbitrary round in the first phase of the tournament, where we have 2j2^{j} nodes remaining for some jj. By how we chose the match-ups, we know that every two angles that are matched up in that round must be at least a factor of (1+0.001ϵ)2i1(1+0.001\epsilon^{\prime})^{2^{i-1}} apart. This implies that their absolute difference is at least (θ/1.1)((1+0.001ϵ)2i11)(\theta^{\prime}/1.1)\cdot((1+0.001\epsilon^{\prime})^{2^{i-1}}-1). Then, by Lemma 4.10, the failure probability of any match-up in that round is at most 1.1cδϵ/((1+0.001ϵ)2i11)1.1c\delta^{\prime}\epsilon^{\prime}/((1+0.001\epsilon^{\prime})^{2^{i-1}}-1).

Suppose the tournament begins with nn nodes. We can use the union bound to upper-bound the probability that θi\theta_{i^{*}} loses in any of the at most log2n\log_{2}n rounds by

j=1log2n1.1cδϵ(1+0.001ϵ)2i11j=1log2n1.1cδϵ0.001ϵ2i12200cδ\sum_{j=1}^{\log_{2}n}\frac{1.1c\delta^{\prime}\epsilon^{\prime}}{(1+0.001\epsilon^{\prime})^{2^{i-1}}-1}\leq\sum_{j=1}^{\log_{2}n}\frac{1.1c\delta^{\prime}\epsilon^{\prime}}{0.001\epsilon 2^{i-1}}\leq 2200c\delta^{\prime}
Lemma 4.16.

The probability that θi\theta_{i^{*}} loses any match-up in the second phase of the tournament can be upper-bounded by cδc\delta^{\prime} times a constant factor (where cc is the constant from Lemma 4.10).

Proof 4.17.

If the algorithm enters the second phase, this means that there is at least one void match-up. Let the number of nodes at this point be nn. Then all n/2n/2 nodes between the pair of nodes involved in the void match-up must be within a factor of (1+ϵ/6.1)(1+\epsilon^{\prime}/6.1) of the first node in the void pair. Therefore, there are at most 2log1+0.001ϵ(1+ϵ/6.1)122002\log_{1+0.001\epsilon^{\prime}}(1+\epsilon^{\prime}/6.1)\leq 12200 nodes in total.

Every node that θi\theta_{i^{*}} plays in a match-up is at least a factor of 1+ϵ/61+\epsilon^{\prime}/6 away from it, which means that the absolute difference in value between the nodes is at least (θ/1.1)(ϵ/6)(\theta^{\prime}/1.1)\cdot(\epsilon^{\prime}/6). By Lemma 4.10, this implies that the failure probability is at most 6.6cδ6.6c\delta^{\prime}. Since there are at most 1220012200 such match-ups, the overall failure probability is at most 81000cδ81000c\delta^{\prime} by the union bound.

We can now prove Lemma 3.2, which we restate below.

Lemma 3.2.

Given the parameters θ\theta\textquoteright, ϵ\epsilon\textquoteright, and δ\delta\textquoteright, there is a nonadaptive algorithm that performs O(log(1/δ)/(θϵ))O(\log(1/\delta^{\prime})/(\theta^{\prime}\epsilon^{\prime})) queries, and outputs a result θest\theta_{\mathrm{est}} with the following guarantee: if θ1.11θ\theta\textquoteright\overset{1.11}{\approx}\theta^{*}, then θest1+ϵ/6θ\theta_{\mathrm{est}}\overset{1+\epsilon^{\prime}/6}{\approx}\theta^{*} except with probability at most δ/2\delta/2.

Proof 4.18.

The algorithm achieving this lemma involves running the Grover schedule GG and then post-processing using the tournament algorithm which we described. By Lemma 4.12, the failure probability of the algorithm is bounded by the probability that θi\theta_{i^{*}} loses. This is bounded by the probability that it loses in the first phase or the second phase; by Lemma 4.14 and Lemma 4.16, this is at most a constant times cδc\delta^{\prime}. By choosing cc to be sufficiently small, we can successfully make this at most δ/2\delta/2.

References

  • [1] Scott Aaronson and Patrick Rall. Quantum approximate counting, simplified. In Symposium on Simplicity in Algorithms, pages 24–32. SIAM, 2020.
  • [2] Michel Boyer, Gilles Brassard, Peter Høyer, and Alain Tapp. Tight bounds on quantum searching. Fortschritte der Physik: Progress of Physics, 46(4-5):493–505, 1998.
  • [3] Gilles Brassard, Peter Høyer, Michele Mosca, and Alain Tapp. Quantum amplitude amplification and estimation. Contemporary Mathematics, 305:53–74, 2002.
  • [4] Paul Burchard. Lower bounds for parallel quantum counting, 2019. arXiv:1910.04555.
  • [5] Dmitry Grinko, Julien Gacon, Christa Zoufal, and Stefan Woerner. Iterative quantum amplitude estimation, 2020. arXiv:1912.05559.
  • [6] Lov Grover. A fast quantum mechanical algorithm for database search. In Proceedings of the 28th Annual ACM Symposium on Theory of Computing, pages 212–219, 1996.
  • [7] Kouhei Nakaji. Faster amplitude estimation, 2020. arXiv:2003.02417.
  • [8] Ashwin Nayak and Felix Wu. The quantum query complexity of approximating the median and related statistics. In Proceedings of the 31st Annual ACM Symposium on Theory of Computing, pages 384–393, 1999.
  • [9] Yohichi Suzuki, Shumpei Uno, Rudy Raymond, Tomoki Tanaka, Tamiya Onodera, and Naoki Yamamoto. Amplitude estimation without phase estimation. Quantum Information Processing, 19(2):75, 2020.
  • [10] Chu-Ryang Wei. Simpler quantum counting. Quantum Information and Computation, 19(11&12):0967–0983, 2019.