Quantum Speedups for Zero-Sum Games
via Improved Dynamic Gibbs Sampling
Abstract
We give a quantum algorithm for computing an -approximate Nash equilibrium of a zero-sum game in a payoff matrix with bounded entries. Given a standard quantum oracle for accessing the payoff matrix our algorithm runs in time and outputs a classical representation of the -approximate Nash equilibrium. This improves upon the best prior quantum runtime of obtained by [vAG19] and the classic runtime due to [GK95] whenever . We obtain this result by designing new quantum data structures for efficiently sampling from a slowly-changing Gibbs distribution.
1 Introduction
There is now a broad family of quantum algorithms for machine learning and fast numerical linear algebra [BWP+17], built on many quantum algorithmic primitives, e.g. [BHMT02, HHL09, GSLW19]. More specifically, for a wide range of problems it has been shown how quantum algorithms can (in certain parameter regimes) yield faster runtimes.222Note that quantifying the end-to-end speedups obtained by these methods can be subtle due to I/O overheads, different access models [Aar15], and classical de-quantization algorithms [Tan19, CGL+20, GLG22]. These quantum algorithms obtain runtimes which improve upon the dimension dependence of classical algorithms, but often at the cost of a worse dependence on the error tolerance and/or implicit access to the solution (e.g. query or sampling access for solution entries). Consequently, this paper is motivated by the following question.
To what degree is there an inherent accuracy versus dimension-dependence tradeoff for quantum optimization algorithms? What algorithmic techniques improve this tradeoff?
In this paper we consider this question for the fundamental optimization problem of computing -approximate Nash equilibrium in zero-sum games. Our main result is an improved dependence on for quantum algorithms solving zero-sum games, which is very close to that of its classical counterpart. Further, we show that for our algorithms, obtaining a classical representation of the solution is obtainable at no additional asymptotic cost. Our work builds upon [vAG19, LCW19], which already took a large and important step towards answering the above question by designing quantum data structures for efficiently implementing algorithms for solving zero-sum games.
Interestingly, to obtain our result we provide improved quantum algorithms for solving a dynamic data structure problem of sampling from a slowly-changing Gibbs distribution. Such dynamic sampling problems arise as a natural component of stochastic gradient methods for solving zero-sum games. We obtain our speedups by improving a Gibbs sampling subroutine developed in [vAG19]. We design a new dynamic quantum data structure which performs the necessary Gibbs sampling in time , which is faster than the corresponding runtime achieved by [vAG19]. Beyond the intrinsic utility of solving this problem, we hope our improved Gibbs sampler showcases potential algorithmic insights that can be gleaned by seeking improved error dependencies for quantum optimization algorithms. Moreover, we hope this work encourages the study and design of quantum data structures for efficient optimization.
1.1 Zero-sum games
For matrix its associated zero-sum game is the pair of equivalent optimization problems
In such a game, we refer to as the payoff matrix and view the and -dimensional simplices, i.e. and , as the space of distributions over and respectively. From this perspective , known as payoff or utility of , is the expected value of when sampling and independently from the distributions corresponding to and . Thus, a zero-sum game models a two-player game where a minimization player seeks to minimize the payoff while, simultaneously, a maximization player seeks to maximize it.
In this paper, we consider the canonical problem of computing an approximate Nash equilibrium of a zero-sum game. Given the payoff matrix we call a pair an -approximate Nash equilibrium (NE) for if
We assume that the payoff matrix and the error-tolerance are given as input to an algorithm, and that, for simplicity, , i.e. the largest entry of has magnitude at most (this is without loss of generality by rescaling and ). The main goal of this paper is to design improved zero-sum game solvers, i.e. algorithms that compute -approximate NEs.
Zero-sum games are foundational to theoretical computer science, optimization, and economics. The problem of approximately solving zero-sum games is a natural formulation of approximate linear programming (LP) and correspondingly, this problem is a prominent testbed for new optimization techniques. Over the past decades there have been numerous advances in the computational complexity of solving zero-sum games under various assumptions on problem parameter (see Section 1.3 for a survey). Recent advancements in interior point methods (IPMs) for linear programming, e.g. [vdBLL+21] and references therein (discussed in more detail in Section 1.3), solve zero sum-games in time .333We use the notation to hide polylogarithmic dependences on problem parameters when convenient for exposition; see Section 2 for a more detailed statement of hidden parameters. In informal theorem statements, we use “with high probability” to indicate a polylogarithmic dependence on the failure probability. Further the linear programming algorithm of [vdB20], shows that zero-sum games can be solved deterministically in time where is the current matrix multiplication constant [AW21], or without fast matrix multiplication. In this paper, we primarily focus on sublinear-time algorithms for approximating NEs.
A well-known algorithm by [GK95] achieves a runtime of , which is the state-of-the-art sublinear runtime amongst classical algorithms, without further problem assumptions. Recently it has been shown that quantum algorithms can yield strikingly runtime improvements for solving zero-sum games and their generalizations [LCW19, vAG19, LWCW21]. In particular, in 2019 Li, Chakrabati and Wu [LCW19] gave a quantum algorithm for zero sum games in time , and simultaneously van Apeldoorn and Gilyen [vAG19] gave an algorithm running in time . These algorithms yield a quadratic improvement in the dimension dependence of the best classical algorithm, at the cost of a higher error dependence.
The algorithms of [LCW19, vAG19, LWCW21] operate using a standard quantum oracle for (formally stated in Section 2), in which one can query the entries of in superposition. We focus on the algorithm of [vAG19] for the rest of this paper, as we focus on improving error dependence. The [vAG19] algorithm generalizes the classical algorithm of Grigoriadis and Khachiyan [GK95], and obtains a runtime improvement by speeding up a key dynamic Gibbs sampling subroutine required by the [GK95] method. As we discuss in greater detail in Section 3, van Apeldoorn and Gilyen give a quantum data structure to efficiently perform this sampling in time quadratically faster in the dimension, which lies at the core of their algorithmic speedup.
Our result.
We give a new quantum algorithm for solving zero-sum games which improves upon the runtime of the prior state-of-the-art quantum algorithm, due to [vAG19].
Theorem 1 (informal, see Theorem 4).
Let with , and . Given a quantum oracle for (defined in Section 2), there is an time algorithm which yields a classical output that is an -approximate NE with high probability.
Our new algorithm simultaneously improves the best known quantum [vAG19] and classical [GK95] algorithms in the parameter regime where IPMs do not dominate sublinear algorithms. In particular, it is faster than the classical runtime of [GK95] whenever , which includes the regime where [GK95] offers advantages over the runtime of the [vdB20] IPM, as . This is in contrast to the prior quantum rate of [vAG19], which does not achieve an improvement upon [GK95] in the full parameter range where sublinear algorithms are currently preferable to IPMs. For example, when and (up to logarithmic factors) where , the rate of [GK95] is favorable to that of [vAG19] and state-of-the-art IPMs [vdB20, CLS21].444There is evidence that cannot be achieved with current techniques, e.g. [Alm21].
1.2 Dynamic Gibbs sampling
We obtain the improved error dependence in our zero-sum game solver by producing a new, faster quantum data structure to perform the Gibbs sampling as used in the algorithm of [vAG19], which may be of independent interest. Gibbs sampling is a fundamental algorithmic primitive — the basic task is, given vector , sample from the probability distribution proportional to . Gibbs sampling is used as a subroutine in many quantum and classical optimization algorithms, e.g. [BS17] and follow-up works. In general, quantum algorithms can perform this task more efficiently using amplitude estimation, which can boost the acceptance probability of rejection sampling schemes. This strategy was implemented in [vAG19], which approximate the maximum entry of using quantum maximum finding [DH96], uniformly sample , and accept the sample with probability using quantum rejection sampling. We give a more detailed overview of the [vAG19] Gibbs sampler and its complexity analysis in Section 3.2.
We give a data structure which quadratically improves the error dependence of the [vAG19] Gibbs sampling subroutine runtime, from per sample to an amortized per sample. A key fact which enables this improvement is that the Gibbs distributions one samples from in the zero-sum game solver of [GK95] change slowly over time: the base vector receives bounded sparse updates in each iteration. By storing partial information about the Gibbs distribution, namely an efficiently-computable overestimate to its entries which remains valid across many consecutive iterations, we obtain an improved dynamic Gibbs sampler, which we also provide a detailed overview of in Section 3.2.
We now define our notion of an approximate Gibbs sampler, and then state the dynamic sampling problem we consider, which arises naturally in zero-sum game algorithms with sublinear runtimes.
Definition 1 (Approximate Gibbs oracle).
For , its associated Gibbs distribution is such that for all , . We say is a -approximate Gibbs oracle if it samples from with .
Problem 1 (Sampling maintenance).
Let , , and suppose we have a quantum oracle for . Consider a sequence of operations to a dynamic vector , each of the form for some . In the sampling maintenance problem, in amortized time per we must maintain a -approximate Gibbs oracle, , for which is queryable in worst-case time .
Our result.
We provide a quantum algorithm for solving Problem 1, which improves upon the runtime implied by the corresponding component in the algorithm of [vAG19].
Theorem 2 (informal, see Theorem 3).
There is a quantum algorithm which solves 1 with high probability with and an initialization cost of .
Theorem 2 improves upon the solution to the sampling maintenance Problem 1 implied by [vAG19] by a factor; in the setting of the [GK95] solver, where and , this is an -factor improvement. At a high level, our improvement is obtained by storing a hint consisting of a vector which overestimates the true Gibbs distribution, and an approximate normalization factor, which are infrequently updated. Our maintained hint satisfies the desirable properties that: it remains valid for a batch of consecutive iterations, and the degree of overestimation is bounded. The former property ensures a fast amortized update time, and the latter ensures a fast sample time by lower bounding the acceptance probability of our quantum rejection sampler. Our high-level strategy for maintaining improved hints is to repeatedly call our sampling access to accurately estimate large entries of the Gibbs distribution, and to exploit stability of the distribution under the setting of Problem 1. We discuss our dynamic Gibbs sampler in more detail and compare it with previous methods for solving 1 in Section 3.2.
The initialization cost of Theorem 2 is due to the current state-of-the-art in numerically stable implementations of the quantum singular value transformation (SVT) framework of [GSLW19]. This cost is also the cause of the additive term in Theorem 1. We discuss this cost in Appendix D; improvements to numerically stable implementations of [GSLW19] would be reflected in the runtimes of Theorems 1 and 2.
1.3 Related work
Method | Query model | Total runtime |
interior point method [CLS21] | classical | |
interior point method [vdBLL+21] | classical | |
extragradient [Nem04, Nes07] | classical | |
stochastic mirror descent (SMD) [GK95] | classical | |
variance-reduced SMD [CJST19] | classical | |
[vAG19] | quantum | |
Theorem 1 (our work) | quantum |
Method | Query model | ||
---|---|---|---|
explicit updates [GK95] | classical | ||
max-based rejection sampling [vAG19] | quantum | ||
Theorem 2 (our work) | quantum |
Quantum optimization and machine learning.
There are a wide array of quantum algorithms for optimization and machine learning which make use of fundamental algorithmic primitives such as amplitude amplification [BHMT02], the HHL algorithm [HHL09], and the quantum singular value transformation [GSLW19]. For example, a number of works gave HHL-based algorithms for a variety of machine learning tasks such as PCA [LMR14], SVMs [RML14], and recommendation systems [KP16]. For more details see the survey article of [BWP+17].
Most relevant to our current work are quantum algorithms for optimization problems. For example, Brandao and Svore [BS17] gave a quantum algorithm for SDP solving based on the Arora-Kale algorithm [AK07], which was later improved by [VAGGdW20b]. There have also been quantum IPM-based methods for LPs and SDPs [KP20]. Additionally a series of works have considered quantum algorithms for general convex optimization [CCLW20, vAGGdW20a], which make use of Jordan’s algorithm for fast gradient estimation [Jor05, GAW19].
In the area of zero-sum games, in addition to the works previously mentioned [vAG19, LCW19] on - games (where both players are -constrained), there have been several works considering different variants of zero-sum games. For example Li, Chakrabati and Wu [LCW19] gave quantum algorithms for - games with quadratic improvement on the dimension. Later Li, Wang, Chakrabati and Wu [LWCW21] extended this algorithm to more general - games with .
Zero-sum games.
Zero-sum games are a canonical modeling tool in optimization, economics and machine learning [Neu28]. The classic extragradient (mirror prox) method [Nem04, Nes07] computes an -approximate NE in time; as discussed previously, the stochastic mirror descent method of [GK95] obtains the same accuracy in time . An intermediate runtime was recently obtained by [CJST19] using variance reduction, described in Table 1.
Improved runtimes are available under more fine-grained characterizations of the matrix , such as sparsity (e.g. number of nonzero entries per row or column) or numerical sparsity (e.g. rows and columns with bounded -to- norm ratios) [CJST20]. Notably, the [GK95] algorithm also offers runtime improvements under a sparsity assumption, as does the algorithm of [vAG19] in certain sparsity-to-accuracy ratio regimes. In this paper, we focus on NE algorithms in the general setting (without further sparsity or numerical sparsity assumptions).
In parallel, a long line of research improving IPMs for solving linear programming [Kar84, Ren88, LS14, LS19, vdBLSS20, JSWZ21] has led to a number of different zero-sum game solvers with polylogarithmic runtime dependencies on the problem accuracy . The current state-of-the-art variants of IPMs are [CLS21] and [vdBLL+21], which achieve runtimes of and respectively. We refer readers to Table 1 for detailed comparisons. Finally, for strongly polynomial runtimes (i.e. with no dependence on ), which are outside the scope of this paper, we refer readers to [DNV20] and references therein.
1.4 Future work
Theorem 1’s dependence is within an factor of matching classical counterparts. To the best of our knowledge, removing this overhead would represent the first quantum algorithm for a natural optimization problem which improves upon classical counterparts across all parameters.
Both our work and [vAG19] solve Problem 1 by leveraging a powerful polynomial approximation-based technique developed in [GSLW19], known as the quantum singular value transform (QSVT). In both cases, QSVT is used with a polynomial of degree . We note that in closely-related classical settings (discussed in [SV14]), Chebyshev polynomial-based approximations yield a quadratically smaller degree. However, a boundedness requirement (due to the spectra of quantum gates) prevents straightforwardly applying these constructions within QSVT. Sidestepping this barrier is a natural avenue towards improving our work, which we leave as an open problem.
More generally, establishing optimal oracle query complexities of dynamic Gibbs sampling (e.g. Problem 1) and solving zero-sum games are key problems left open by our work. These questions are potentially more approachable than establishing tight time complexity characterizations. For example, could be improved to in the context of Theorem 1, or can we rule out such an improvement in the query model?
1.5 Organization
In Section 2 we state the notation used throughout the paper, as well as the (classical and quantum) computational models we assume. In Section 3, we give a brief technical overview of the core components of our algorithm used to prove Theorem 1: the stochastic gradient method our method is built on, and an efficient quantum implementation of a key subroutine using a new dynamic Gibbs sampler. Finally in Section 4 we give our new quantum sampler, and prove Theorem 2.
We aim to give a self-contained, but simplified, description of our algorithm in Section 3 to improve the readability of the paper for readers with an optimization background unfamiliar with quantum computing, and vice versa. In particular, we abstract away the core optimization machinery (stochastic mirror descent) and quantum machinery (quantum SVT) developed in prior work into the statements of Propositions 1 and 2, and focus on how we use these statements black-box to build a faster algorithm. The proofs of these statements can be found in Appendices A and B.
2 Preliminaries
General notation.
hides logarithmic factors in problem dimensions (denoted and ), target accuracies (denoted ), and failure probabilities (denoted ). When discussing runtimes for Problem 1, we additionally use to hide logarithmic factors in the parameters . For all we let denote the standard basis vector for when is clear. denotes the norm of a vector. For , its row and column are respectively . For , is the diagonal matrix with as the diagonal. Conjugate transposes of are denoted ; when the matrix is real we use . The all-ones and all-zeros vectors of dimension are and . Finally, throughout and , so and .
Computation models.
We assume entries of are -bit reals for , and work in the word RAM model where -bit arithmetic operations take time; for simplicity, we assume mathematical operations such as trigonometric functions and radicals can also be implemented exactly for -bit words in time. Throughout, “quantum states” mean unit vectors, and “quantum gates” or “oracles” mean unitary matrices. We follow standard notation and identify a standard basis vector for with , an -qubit state, in which is represented in binary (i.e. more formally, , and bin is omitted for brevity). We consider the standard model of quantum access to oracles, in which the oracle , which is defined by its operation on for all -valued (where length is clear from context), can be queried in superposition. If is queried on , the result is . We use , , etc. (when clear from context) to denote arbitrary sub-unit vectors, which represent garbage states (unused in computations). The tensor product of states and on and qubits is denoted , an -qubit state. The runtime of a quantum circuit is its maximum depth (in arithmetic gates on -bit words).
Access model.
Throughout the paper, we assume a standard quantum oracle for accessing (recall ). In particular, by a quantum oracle for we mean an oracle which, when queried with for , reversibly writes (in binary) to the third register in time, i.e. where is bitwise mod- addition.
Given a quantum oracle for , with two queries, by standard constructions one can construct an oracle which places the value in the amplitude of the state rather than the register itself. More formally, one can construct555This follows e.g. by calling the oracle to obtain the value of in binary (interpreted as a signed number between and ), adding an ancilla qubit, performing arithmetric to compute the rotation angle needed on that ancilla, applying a tower of controlled rotation gates to an ancilla qubit using that rotation angle express in binary, then calling the standard oracle a second time to uncompute the binary value of . See e.g. [GR02] for details. an , which operates as:
It is standard in the literature to (using ancilla qubits to store the output register where is written) construct such an from under our classical model of computation, see e.g. [GR02]. For simplicity, we omit discussion of ancilla qubits in the remainder of the paper and assume direct access to . We also note that there is ambiguity in the implementation of in that the square root is not unique, and that we have control over the signing used in this implementation. We will use this flexibility crucially later in the paper, specifically Corollary 6.
3 Overview of approach
In this section, we give an overview of the approach we take to prove our main results: an improved quantum runtime for solving zero-sum games (Theorem 4) and an improved quantum data structures for dynamic Gibbs sampling (Theorem 3). We organize this section as follows.
In Section 3.1, we state Algorithm 1, the optimization method framework we use to solve zero-sum games. This framework is a generalization of the classical algorithm of [GK95]. We state its guarantees in Proposition 1 and defer the proof to Appendix A. Algorithm 1 assumes access to an approximate Gibbs oracle (Definition 1) for sampling from dynamic distributions as stated in Problem 1. The bulk of our work is devoted to obtaining an efficient quantum implementation of such an oracle (Theorem 3) and using this result we prove Theorem 4 at the end of Section 3.1.
In Section 3.2, we overview the main technical innovation of this paper, an improved solution to Problem 1. Whereas prior work by [vAG19] solves Problem 1 at an amortized cost per iteration, we show how to solve the problem at an amortized cost. We remark that the only quantum components of our algorithm (quantum SVT and amplitude amplification) are abstracted away by Proposition 2, which is proven in Appendix B.
3.1 Solving matrix games with a Gibbs sampling oracle
Our proof of Theorem 4 uses an efficient implementation of the algorithmic framework stated in Algorithm 1, based on stochastic mirror descent. In specifying Algorithm 1, we recall our earlier Definition 1, which captures the approximate sampling access we require for Algorithm 1’s execution.
The main skeleton of Algorithm 1 (Lines 5-6) using exact oracles is identical to the method of [GK95]. However, our framework builds upon [GK95] in the following three ways.
-
1.
We tolerate total variation error in the sampling procedure via -approximate Gibbs oracles.
-
2.
We provide a high-probability guarantee on the duality gap using martingale arguments.
-
3.
We subsample the output to obtain a sparse solution yielding a comparable duality gap.
We remark that several of these improvements have appeared previously, either explicitly or implicitly, in the stochastic gradient method literature. For example, an approximation-tolerant stochastic gradient method was given in [CJST20], and our proofs of the high-probability guarantees are based on arguments in [AL17, CDST19]. For completeness we give a self-contained proof of the following guarantee on Algorithm 1 in Appendix A.
Proposition 1.
Let satisfy and . Let , , and for an appropriate constant. With probability , Algorithm 1 outputs an -approximate NE for .
Given Proposition 1 to obtain our faster zero-sum game solvers, we simply need to efficiently implement the Gibbs sampling in Algorithm 1. As introduced in Section 1, 1, describes a dynamic approximate Gibbs oracle sampling problem sufficient for this task. Indeed, solving two appropriate parameterizations of Problem 1 provides the oracles needed by Algorithm 1. By combining Proposition 1 with the following Theorem 3 (our solution to Problem 1, discussed in greater detail in Section 3.2), we prove our main result Theorem 4.
Theorem 3.
Theorem 4.
Let satisfy , and let . Given a quantum oracle for (defined in Section 2), there is a quantum algorithm which yields a classical output that is an -approximate NE for with probability in time
Proof.
We apply two instances of Theorem 3 to implement the -approximate Gibbs oracle for the dynamic vectors and , to implement each iteration of Algorithm 1 in amortized time. Using the settings of parameters in Proposition 1 and setting , which suffices for Algorithm 1 and Theorem 3, we have
The conclusion follows since, by observation, Algorithm 1 costs . As remarked in the introduction, the additive term in the runtime comes from the cost of stably implementing a quantum circuit required in the use of Theorem 3 representing a polynomial transformation in finite precision, which we discuss in greater detail in Appendix D. ∎
3.2 Dynamic sampling maintenance via dynamic hint maintenance
In this section, we overview our proof of Theorem 3, which proceeds in two steps.
-
1.
We reduce sampling maintenance (Problem 1) to a problem which we call hint maintenance. This latter problem is a specialization of the sampling maintenance problem where suitable advice, which we call the hint throughout, is provided.
- 2.
Reducing sampling maintenance to hint maintenance.
First, we introduce the following data structure for maintaining the variable in Problem 1, which was used crucially in [vAG19] for dynamic Gibbs sampling. This data structure allows efficient queries to subsets of the coordinates of and we use it in our Gibbs sampler as well.
Lemma 1 (Sampler tree).
Let and . There is a classical data structure, , supporting a tree on nodes such that corresponds to leaves, with the following operations.
-
•
: initialize and
-
•
:
-
•
: return the sum of all , where is in the subtree of
The total runtime of calls to is , and calls to cost .
An implementation of based on propagating subtree sums upon updates is standard classical data structure, and we omit further description for brevity. Next, we state our first building block towards solving Problem 1, a result which can be thought of as quantum sampling with a hint. We defer its proof to Appendix B, as it is primarily based on generalizing dynamic block-encoding strategies with bounded-degree polynomial approximations, as pioneered by [GSLW19, vAG19].
Proposition 2.
Let correspond to an instance of , and . Let be the Gibbs distribution associated with , let and for some . Finally, let have entries classically queriable in time, satisfy entrywise, for all , and . Suppose , , , and are explicitly known. Given a quantum oracle for (defined in Section 2) with , we can implement a -approximate Gibbs oracle which has query cost . The total additional cost incurred if undergoes calls which preserve the invariants on is .
Proposition 2 makes use of an overestimating hint vector and approximate normalization constant , which we collectively call the hint. The acceptance probability of our rejection sampling is governed by two primary parameters: , which reflects the degree of overestimation (and can be thought of as a hint quality), and , which reflects our inability to accept with probability when is implicit (which can be thought of as a normalization quality). In particular, the rejection sampling scheme used in Proposition 2 will instead accept with probability .666Exactly computing may require time in standard implementations, an obstacle to runtimes .
Here we elaborate briefly on the implementation of Proposition 2 (for more details, see Appendix 4). We follow notation of Proposition 2, and also let such that the unnormalized Gibbs distribution is , and . Proposition 2 is a rejection sampler which first loads the hint into superposition, and then applies a filter. Overall, our scheme has the form
(1) |
which results in an accepted sample with probability , and hence requires trials to succeed after applying quantum amplitude amplification, a generalization of Grover search [BHMT02].777The in Proposition 2 comes from loading into a quantum oracle via polynomials of degree . The latter filtering step is implemented using appropriate block-encoding technology.
The above discussion suggests that the hint and normalization qualities, parameterized by and , are crucial in controlling the acceptance probability of our scheme. More concretely, in our applications of Proposition 2, , which is the bound on the norm of the and iterates in Algorithm 1 under the parameter settings of Proposition 1. Overall, the cost of implementing an approximate Gibbs oracle is then (up to logarithmic factors) . Proposition 2 hence reduces Problem 1 to the problem of maintaining the hint consisting of a vector and a normalization estimate . We mention that Proposition 2 is a strict generalization of a corresponding building block in [vAG19], which only used set to the all-ones vector.
Approaches for Problem 1.
We now overview our improved solution to Problem 1 via efficient use of Proposition 2. To motivate our solution, we outline three solutions to Problem 1 offering different tradeoffs in the overall quality . The first only uses classical information and does not use Proposition 2 at all, the second uses Proposition 2 but maintains no history across iterates, and the third (building upon the first two) is our approach.
Solution 1: [GK95]. A standard way to solve Problem 1 is to explicitly update and , and exactly maintain the normalizing constant . This allows us to sample from in time. Since changes by one row of under a -sparse operation to , this is implementable in time per iteration. We can view this as an instance of the scheme (1) with , , and . It yields the (unbalanced) tradeoff for Problem 1 of and .
Solution 2: [vAG19]. A recent work [vAG19] introduced a quantum implementation of the scheme (1) with an improved tradeoff. The [vAG19] scheme first uniformly samples, which in the language of (1) means and . It then applies quantum maximum finding [DH96] to obtain an approximate maximum entry of , which they show takes time ; for the sake of simplicity here, we assume this exactly yields . Finally, the acceptance probability is set to . For , this translates to
implying suffices. We note this bound on can be tight when is very non-uniform. Overall, the [vAG19] scheme’s update time requires maximum finding, and its sampling time (via Proposition 2) requires time . For as in Algorithm 1, this yields the balanced tradeoff . As discussed earlier, our key insight is to improve upon this specific choice of hint in [vAG19], for their implicit use of Proposition 2.
Solution 3: this work. We design better hints for Proposition 2 by executing our algorithm in phases corresponding to batches of iterations. At the start of each phase, we use the Gibbs access afforded by Proposition 2 to produce a suitable hint for efficiently implementing the next phase. Our execution of this strategy, parameterized by an integer , relies on the following observations.
-
1.
During iterations (where starts the phase), the dynamic Gibbs distribution (where is the iteration index) changes by multiplicatively, since entrywise changes by additively. Thus, the quality of a hint vector deteriorates by at most a constant in the phase, so it suffices to give a good hint at the phase start.
-
2.
By using access to Proposition 2 at the end of the previous phase, we can efficiently estimate large entries of . More precisely, we sample times from , and let the empirical distribution of these samples be . Chernoff bounds show that any large entry will be accurately reflected in the empirical sample. Hence, we set the hint to
for appropriate constants. This yields an improved hint quality of , since large entries of the hint sum to at most (as ), and small entries sum to .
-
3.
We show a similar strategy of using empirical concentration, combined with a testing variant of Proposition 2, accurately estimates the normalizing factor , yielding .
This strategy yields and (since we amortize over iterations). For the parameter settings of Algorithm 1, optimizing yields
4 Gibbs sampling oracle implementation
In this section, we prove Theorem 3, which gives our solution to Problem 1. To do so, we follow the outline given in Section 3.2, wherein we solve Problem 1 in batches of iterations, each of which we call a “phase.” In Sections 4.1 and 4.2, we only discuss a single phase of Problem 1, consisting of the iterations for and some initial iteration , assuming certain invariants (stated below) hold at the start of the phase. We give a complete solution to Problem 1 in Section 4.3.
Invariant 1 (Approximate normalization access).
We explicitly have with for some .
Invariant 2 (Initial sampling maintenance).
We have solving Problem 1 in iteration .
The remainder of this section is then organized as follows.
- •
- •
- •
4.1 Preprocessing and approximate Gibbs oracle implementation
In this section, we show how to construct the “hint” which will be used throughout a phase (starting in iteration ) given access to , and bound which quantifies the quality of our hint, under the assumption that Invariants 1 and 2 hold in the phase. We first show a multiplicative stability property of the relevant Gibbs distributions in a phase.
Lemma 2.
For all , we have
Proof.
Let for all , such that . We have that for any ,
Similarly, , and combining yields the conclusion. ∎
Next, our computation of the overestimating vector is parameterized by an integer which will be fixed throughout this section and Section 4.2. We will simply set to be an upscaled variant of an empirical distribution of roughly draws from .
Lemma 3.
Let , , and suppose . Draw samples from for an appropriately large constant, and let be the empirical distribution over these samples. Define . Then for
with probability , and entrywise, for all .
Proof.
The first conclusion is immediate from the definition of , since . In light of Lemma 2 (which holds deterministically), to show the second conclusion, it suffices to show that with the desired success probability, we have both
(2) |
and
(3) |
Denote for notational convenience, and let denote the distribution of samples from , and recall that . Because we are taking samples from , we have by a standard Chernoff bound that with probability at least (union bounding over all coordinates ), both of the following hold.
-
1.
For all such that , .
-
2.
For all such that , .
We condition on these events for the remainder of the proof; we now show (2), (3) in turn.
Corollary 1.
Proof.
We will run the algorithm described in the proof of Lemma 3, and condition on it succeeding, giving the failure probability. It then suffices to apply Proposition 2 with defined in Lemma 3. For this , we parameterize Proposition 2 with (see Invariant 1), (see Lemma 3), and . It is clear the lower bound on entries of in Proposition 2 holds. ∎
4.2 Maintaining invariants
We now show how to maintain Invariant 1 at iteration , for use in the next phase, and bound the cost of doing so. We note that Invariant 2 follows immediately from our construction in Corollary 1. First, by combining Lemma 2 with Invariant 1,
(4) |
This suggests that we may use for the next phase; however, this would lead to an exponential blowup in the multiplicative range . To sidestep this, we develop a tester for a hidden parameter governing a success probability, which will be used to give a refined estimate . We require the following corollary of Proposition 2, whose proof we defer to Appendix B.
Corollary 2.
Following notation of Proposition 2, let . There is a quantum oracle which can be implemented under calls to in time, and has query cost
Furthermore, for explicitly known constants and , returns “success” with probability for
Corollary 2 differs from Proposition 2 in that it returns a Boolean-valued answer (as opposed to a sample from an approximate Gibbs distribution), and has a success probability parameterized by explicit constants. We now show how to use Corollary 2 to maintain Invariant 1.
Lemma 4.
Assume Invariants 1, 2 hold for the phase consisting of iterations , , and suppose for , where and are the constants from Corollary 2. Further, suppose we have obtained satisfying the conclusion of Lemma 3 (i.e. that the algorithm in Lemma 3 succeeded). We can determine such that with probability , in time
Proof.
Define , , and note that by Invariant 1 and Lemma 2. Next, assuming the success of Lemma 3, we have that the success probability of from Corollary 2 using the estimate satisfies (for the unknown , and known )
For , we first run times and check the number of successes, denoted by , which fits within the runtime budget by Corollary 2. By a Chernoff bound, we have that with probability , we have
Hence, we can determine the quantity up to a multiplicative factor of , which also implies the same multiplicative approximation factor for , as desired. ∎
4.3 Proof of Theorem 3
See 3
Proof.
We first claim that for any , we can solve Problem 1 with probability and
This follows from combining Lemma 3 (amortized over iterations), Corollary 1, and Lemma 4, and taking a union bound over at most phases. Here we note that the cost of per iteration to support costs to in Lemma 1, Proposition 2, and Corollary 2 is not dominant. By choosing , we balance the costs of and , yielding the conclusion. We finally note that by picking an appropriate constant in the definition of , we have as required by Lemma 3, the only component specifying a bound on . ∎
Acknowledgments
We thank András Gilyén for communication regarding the prior work [vAG19]. AB was supported in part by the DOE QuantISED grant DE-SC0020360, by the AFOSR under grant FA9550-21-1-0392, and by the U.S. DOE Office of Science under Award Number DE-SC0020266. YG was supported in part by the Stanford MS&E DE&I Research program. YJ was supported in part by a Stanford Graduate Fellowship and a Danzig-Lieberman Graduate Fellowship. AS was supported in part by a Microsoft Research Faculty Fellowship, NSF CAREER Award CCF1844855, NSF Grant CCF-1955039, a PayPal research award, and a Sloan Research Fellowship. KT thanks Ewin Tang for her expertise on quantum linear algebra and for fielding many of our questions.
References
- [Aar15] Scott Aaronson. Read the fine print. Nature Physics, 11(4):291–293, 2015.
- [AK07] Sanjeev Arora and Satyen Kale. A combinatorial, primal-dual approach to semidefinite programs. In Proceedings of the thirty-ninth annual ACM symposium on Theory of computing, pages 227–236, 2007.
- [AL17] Zeyuan Allen-Zhu and Yuanzhi Li. Follow the compressed leader: Faster online learning of eigenvectors and faster MMWU. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, ICML 2017, Sydney, NSW, Australia, 6-11 August 2017, volume 70 of Proceedings of Machine Learning Research, pages 116–125. PMLR, 2017.
- [Alm21] Josh Alman. Limits on the universal method for matrix multiplication. Theory Comput., 17:1–30, 2021.
- [AW21] Josh Alman and Virginia Vassilevska Williams. A refined laser method and faster matrix multiplication. In Dániel Marx, editor, Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms, SODA 2021, Virtual Conference, January 10 - 13, 2021, pages 522–539. SIAM, 2021.
- [BHMT02] Gilles Brassard, Peter Høyer, Michele Mosca, and Alain Tapp. Quantum amplitude amplification and estimation. Quantum Computation and Quantum Information, 305:53–74, 2002.
- [BS17] Fernando GSL Brandao and Krysta M Svore. Quantum speed-ups for solving semidefinite programs. In 2017 IEEE 58th Annual Symposium on Foundations of Computer Science (FOCS), pages 415–426. IEEE, 2017.
- [Bub15] Sébastien Bubeck. Convex optimization: Algorithms and complexity. Foundations and Trends in Machine Learning, 8(3-4):231–357, 2015.
- [BWP+17] Jacob Biamonte, Peter Wittek, Nicola Pancotti, Patrick Rebentrost, Nathan Wiebe, and Seth Lloyd. Quantum machine learning. Nature, 549(7671):195–202, 2017.
- [CCLW20] Shouvanik Chakrabarti, Andrew M Childs, Tongyang Li, and Xiaodi Wu. Quantum algorithms and lower bounds for convex optimization. Quantum, 4:221, 2020.
- [CDST19] Yair Carmon, John C. Duchi, Aaron Sidford, and Kevin Tian. A rank-1 sketch for matrix multiplicative weights. In Alina Beygelzimer and Daniel Hsu, editors, Conference on Learning Theory, COLT 2019, 25-28 June 2019, Phoenix, AZ, USA, volume 99 of Proceedings of Machine Learning Research, pages 589–623. PMLR, 2019.
- [CGL+20] Nai-Hui Chia, András Gilyén, Tongyang Li, Han-Hsuan Lin, Ewin Tang, and Chunhao Wang. Sampling-based sublinear low-rank matrix arithmetic framework for dequantizing quantum machine learning. In Proceedings of the 52nd Annual ACM SIGACT symposium on theory of computing, pages 387–400, 2020.
- [CJST19] Yair Carmon, Yujia Jin, Aaron Sidford, and Kevin Tian. Variance reduction for matrix games. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alché-Buc, Emily B. Fox, and Roman Garnett, editors, Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 11377–11388, 2019.
- [CJST20] Yair Carmon, Yujia Jin, Aaron Sidford, and Kevin Tian. Coordinate methods for matrix games. In Sandy Irani, editor, 61st IEEE Annual Symposium on Foundations of Computer Science, FOCS 2020, Durham, NC, USA, November 16-19, 2020, pages 283–293. IEEE, 2020.
- [CLS21] Michael B Cohen, Yin Tat Lee, and Zhao Song. Solving linear programs in the current matrix multiplication time. Journal of the ACM (JACM), 68(1):1–39, 2021.
- [DH96] Christoph Dürr and Peter Høyer. A quantum algorithm for finding the minimum. CoRR, quant-ph/9607014, 1996.
- [DNV20] Daniel Dadush, Bento Natura, and Làszlò A Vègh. Revisiting tardos’s framework for linear programming: faster exact solutions using approximate solvers. In Sandy Irani, editor, 61st IEEE Annual Symposium on Foundations of Computer Science, FOCS 2020, Durham, NC, USA, November 16-19, 2020, pages 931–942. IEEE, 2020.
- [GAW19] András Gilyén, Srinivasan Arunachalam, and Nathan Wiebe. Optimizing quantum optimization algorithms via faster quantum gradient computation. In Proceedings of the Thirtieth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1425–1444. SIAM, 2019.
- [GK95] Michael D. Grigoriadis and Leonid G. Khachiyan. A sublinear-time randomized approximation algorithm for matrix games. Operation Research Letters, 18(2):53–58, 1995.
- [GLG22] Sevag Gharibian and François Le Gall. Dequantizing the quantum singular value transformation: Hardness and applications to quantum chemistry and the quantum pcp conjecture. In Proceedings of the 54th Annual ACM SIGACT Symposium on Theory of Computing, pages 19–32, 2022.
- [GR02] Lov Grover and Terry Rudolph. Creating superpositions that correspond to efficiently integrable probability distributions. CoRR, abs/quant-ph/0208112, 2002.
- [GSLW19] András Gilyén, Yuan Su, Guang Hao Low, and Nathan Wiebe. Quantum singular value transformation and beyond: exponential improvements for quantum matrix arithmetics. In Moses Charikar and Edith Cohen, editors, Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, STOC 2019, Phoenix, AZ, USA, June 23-26, 2019, pages 193–204. ACM, 2019.
- [Haa19] Jeongwan Haah. Product decomposition of periodic functions in quantum signal processing. Quantum, 3:190, 2019.
- [HHL09] Aram W Harrow, Avinatan Hassidim, and Seth Lloyd. Quantum algorithm for linear systems of equations. Physical review letters, 103(15):150502, 2009.
- [Jor05] Stephen P Jordan. Fast quantum algorithm for numerical gradient estimation. Physical review letters, 95(5):050501, 2005.
- [JSWZ21] Shunhua Jiang, Zhao Song, Omri Weinstein, and Hengjie Zhang. A faster algorithm for solving general lps. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, STOC 2021, 2021, pages 823–832, 2021.
- [Kar84] Narendra Karmarkar. A new polynomial-time algorithm for linear programming. In Proceedings of the sixteenth annual ACM symposium on Theory of computing, pages 302–311, 1984.
- [KP16] Iordanis Kerenidis and Anupam Prakash. Quantum recommendation systems. arXiv preprint arXiv:1603.08675, 2016.
- [KP20] Iordanis Kerenidis and Anupam Prakash. A quantum interior point method for lps and sdps. ACM Transactions on Quantum Computing, 1(1):1–32, 2020.
- [LCW19] Tongyang Li, Shouvanik Chakrabarti, and Xiaodi Wu. Sublinear quantum algorithms for training linear and kernel-based classifiers. In International Conference on Machine Learning, pages 3815–3824. PMLR, 2019.
- [LMR14] Seth Lloyd, Masoud Mohseni, and Patrick Rebentrost. Quantum principal component analysis. Nature Physics, 10(9):631–633, 2014.
- [LS14] Yin Tat Lee and Aaron Sidford. Path finding methods for linear programming: Solving linear programs in o (vrank) iterations and faster algorithms for maximum flow. In 2014 IEEE 55th Annual Symposium on Foundations of Computer Science, pages 424–433. IEEE, 2014.
- [LS19] Yin Tat Lee and Aaron Sidford. Solving linear programs with sqrt (rank) linear system solves. arXiv preprint arXiv:1910.08033, 2019.
- [LWCW21] Tongyang Li, Chunhao Wang, Shouvanik Chakrabarti, and Xiaodi Wu. Sublinear classical and quantum algorithms for general matrix games. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 8465–8473, 2021.
- [Nem04] Arkadi Nemirovski. Prox-method with rate of convergence for variational inequalities with lipschitz continuous monotone operators and smooth convex-concave saddle point problems. SIAM Journal on Optimization, 15(1):229–251, 2004.
- [Nes07] Yurii Nesterov. Dual extrapolation and its applications to solving variational inequalities and related problems. Mathematical Programing, 109(2-3):319–344, 2007.
- [Neu28] John Von Neumann. Zur theorie der gesellschaftsspiele. Mathematische Annalen, 100:295–320, 1928.
- [NJLS09] Arkadi Nemirovski, Anatoli B. Juditsky, Guanghui Lan, and Alexander Shapiro. Robust stochastic approximation approach to stochastic programming. SIAM J. Optim., 19(4):1574–1609, 2009.
- [Ren88] James Renegar. A polynomial-time algorithm, based on newton’s method, for linear programming. Mathematical programming, 40(1):59–93, 1988.
- [RML14] Patrick Rebentrost, Masoud Mohseni, and Seth Lloyd. Quantum support vector machine for big data classification. Physical review letters, 113(13):130503, 2014.
- [SV14] Sushant Sachdeva and Nisheeth K. Vishnoi. Faster algorithms via approximation theory. Found. Trends Theor. Comput. Sci., 9(2):125–210, 2014.
- [Tan19] Ewin Tang. A quantum-inspired classical algorithm for recommendation systems. In Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing, pages 217–228, 2019.
- [vAG19] Joran van Apeldoorn and András Gilyén. Quantum algorithms for zero-sum games. CoRR, abs/1904.03180, 2019.
- [vAGGdW20a] Joran van Apeldoorn, András Gilyén, Sander Gribling, and Ronald de Wolf. Convex optimization using quantum oracles. Quantum, 4:220, 2020.
- [VAGGdW20b] Joran Van Apeldoorn, András Gilyén, Sander Gribling, and Ronald de Wolf. Quantum sdp-solvers: Better upper and lower bounds. Quantum, 4:230, 2020.
- [vdB20] Jan van den Brand. A deterministic linear program solver in current matrix multiplication time. In Proceedings of the Thirty-first Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2020, 2020, pages 259–278, 2020.
- [vdBLL+21] Jan van den Brand, Yin Tat Lee, Yang P. Liu, Thatchaphol Saranurak, Aaron Sidford, Zhao Song, and Di Wang. Minimum cost flows, mdps, and -regression in nearly linear time for dense instances. In Proceedings of the 53rd Annual ACM SIGACT Symposium on Theory of Computing, STOC 2021, 2021, pages 859–869, 2021.
- [vdBLSS20] Jan van den Brand, Yin Tat Lee, Aaron Sidford, and Zhao Song. Solving tall dense linear programs in nearly linear time. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing, pages 775–788, 2020.
Appendix A Solving matrix games with a Gibbs sampling oracle
In this section, we prove Proposition 1, which shows how to solve a zero-sum matrix game using an approximate Gibbs sampling oracle (via Algorithm 1). To briefly motivate the algorithm we use and our proof of its guarantees, we recall the problem we consider is of the form
(5) |
and we define the associated gradient operator as
(6) |
Taking (stochastic) mirror descent steps on the gradient operator in (5) is well-known to yield an approximate NE to the matrix game [Bub15]. We show that an approximate implementation of this strategy, combined with appropriate subsampling, efficiently yields an approximate NE. We begin by making the following observation.
Lemma 5.
Let have . Let where , and . Then, .
Proof.
Note that , and since . ∎
We next present a variant of the classical mirror descent analysis, which bounds the expected approximation quality of iterates of Algorithm 1 prior to subsampling.
Proposition 3.
Proof.
By definition of the updates, at every iteration , we have
Consequently, by the optimality conditions of and respectively, we have for any , , and letting be the KL divergence between simplex variables of appropriate dimension,
(8) | ||||
where for the last inequality we use Hölder’s inequality and the fact that is -strongly convex in the norm (by Pinsker’s inequality). Averaging the above for , and denoting and , we obtain for any ,
(9) |
In the above, we further recalled the bound by assumption. In order to bound the deviation of the left-hand side from its expectation, we use a “ghost iterate” argument following [NJLS09, CJST19]. In particular, we define iterates , as follows: let , , and then for each , define
where above are the same coordinates as were used in defining the updates to and . By an analogous bound to (8), where we note ,
Averaging the above for , and denoting and (see (5)), we obtain for any ,
(10) |
Summing inequalities (9) and (10), and maximizing over , we have
(11) | ||||
Taking expectations over the above, we have
In the above, used the diameter bound of the KL divergence from the uniform distribution, i.e. (and a similar bound for ). Further, uses that is conditionally independent of and , and by the assumption on the Gibbs sampler (via Lemma 5), and Hölder, and uses our choices of , and .
Finally, we note that the desired claim follows by linearity: for any ,
∎
By using a simple martingale argument (inspired by those in [AL17, CDST19]) to bound the error term in (11), we show that the guarantee of Proposition 3 holds with high probability.
Corollary 3.
Proof.
Consider the filtration given by . We will bound the terms in (7). To do so, we define a martingale difference sequence of the form which is adapted to the filtration . We first note that with probability . Consequently, applying the Azuma-Hoeffding inequality yields
Plugging this back into (11) and using the KL divergence range bound, Lemma 5 with our definition of , and choices of parameters, we thus have with probability ,
(12) |
The remainder of the proof follows analogously to Proposition 3. ∎
The Gibbs sampling oracles implicitly maintain access to and , which by averaging gives as one approximate equilibrium as guaranteed in Corollary 3. To turn the implicitly maintained iterates into an actual classic output, we subsample the iterates. Below we formally show one can take the empirical average of independent samples from distributions close to and to also obtain an approximate equilibrium (with the same approximation factor up to constant factors) with high probability.
Lemma 6.
Suppose for and for are an -approximate NE for . Further suppose that for some , , , and for all , we have and . Let where each is sampled independently according to ; similarly, let where each is sampled independently according to . Suppose . Then with probability at least , are a -approximate NE for .
Proof.
First, let and . By convexity of norms, we have and , and hence under the NE approximation guarantee of and Hölder’s inequality,
Let be a fixed vector in . By Hoeffding’s inequality, since each random variable lies in the range and , we have that
(13) |
Next, note that is achieved by a basis vector . Hence, applying a union bound over (13) for all shows that with probability at least ,
By symmetry, with probability at least ,
The conclusion follows from a union bound, and combining the above three displays. ∎
Finally, we put these pieces together to give a complete guarantee.
See 1
Appendix B Quantum rejection sampling with a hint
In this section, we prove Proposition 2, which gives a dynamic quantum rejection sampling subroutine and bounds its cost of implementation. Our result is an extension of analogous developments in [vAG19], but are stated more generally to allow for the use of an appropriate “hint” vector in the rejection sampling procedure. We build up to our main result in several pieces.
Amplitude amplification.
First, for a quantum decision algorithm which applies unitary and then measures, yielding an accepting state with probability , quantum amplification [BHMT02] shows we can apply times to obtain an accepting state with high probability.
Proposition 4 (Theorem 3, [BHMT02]).
Let , let be a -qubit quantum oracle, and let be the probability that measuring the result of applying yields an accepting state. There is a (quantum) algorithm using queries to and additional time that returns with with probability .
Loading from trees.
Given a dynamic vector which is supported in an appropriate efficient data structure (see Lemma 1), and a known bound , we recall a result of [GR02] which allows us to form a superposition of the entries in (suitably rescaled).
Lemma 7.
Let correspond to an instance of , and . We can maintain a quantum oracle which takes time to apply, such that the total cost of building after calls to is , and
Proof.
This is implicit in [GR02]. We first apply a -qubit gate to condition on selecting from the tree (with probability ), and then apply the [GR02] procedure conditioned on the first qubit being , which controls for one qubit at a time while propagating subtree sums (provided by via ). The cost to build the circuit follows because on an we need to change the gates corresponding to the relevant leaf-to-root path.
∎
Corollary 4.
Let correspond to an instance of , and let , and suppose has . We can maintain a quantum oracle which takes time to apply, with total building cost after calls to , such that for any ,
Proof.
We apply (see Section 2) to the output of , ignoring the additional qubit. ∎
We remark here that the additional qubit in Corollary 4 will shortly become useful in constructing an appropriate block-encoding of a scaling of .
Polynomial approximation.
In order to give approximate Gibbs samplers for the types of dynamic vectors Algorithm 1 encounters, we further require some tools from polynomial approximation theory. We first state a helper result on boundedly approximating the exponential, a variant of which was also used in [vAG19]. We provide a proof in Appendix C.
Lemma 8 (Lemma 7, [vAG19]).
Let , . There is a polynomial of degree such that and .
Next, we state a further corollary of Lemma 8 to be used in our rejection sampler.
Corollary 5.
Let and suppose has . Further, suppose for some , . Let satisfy entrywise. Finally, define entrywise. There is a degree- polynomial , for , such that for and entrywise,
(14) |
Moreover, , and .
Proof.
Assume else the statement is clearly true. First, entrywise by the stated assumptions (since entrywise). Let be the polynomial given by Lemma 8 which -approximates on . We define
The degree bound and absolute value bound of this polynomial follows immediately from Lemma 8, so it remains to show the distance bound. The guarantees of Lemma 8 then imply for all ,
(15) |
We further have that , so . Hence, we also have
Combining yields for all ,
(16) |
Next, let for all , and note that . We bound
(17) | ||||
By using the definitions of and (16), as well as the assumed ranges on ,
The second inequality used that some is at least by assumption. Combining the above display with (17) and the definition of concludes the proof of (14). Finally, using the bounds on above shows that
∎
Block-encoding.
Our approximate Gibbs oracle follows an implementation strategy pioneered by [GSLW19] termed “block-encoding.” Specifically, we follow [GSLW19] and say that , an -qubit quantum gate, is an -bit block-encoding of if the top-left submatrix of is . Block-encoded matrices admit efficient composable operations, such as the application of linear combinations and bounded polynomials. We summarize these properties in the following.
Proposition 5 (Lemma 52, [GSLW19]).
Let and be -bit block-encodings of , of the same size. There is an -bit block-encoding of which takes the same asymptotic time to apply as applying and .
Proposition 6 (Theorem 56, [GSLW19]).
Let be an -bit block-encoding of , and be a degree- polynomial. There is an -bit block-encoding of which can be applied in applications of and and additional time.
We also demonstrate that an application of Corollary 4 yields a simple block-encoding of . A similar construction previously appeared in [vAG19].
Corollary 6.
Let correspond to an instance of , and . Let and , where swaps the first two qubits and is from Corollary 4. Then is a block-encoding of , and can be applied in time , with total building cost after calls to .
Proof.
Define for convenience. By the definition of , we have that
Hence, for , we compute as:
In particular the and terms disappear, and , are orthogonal unless . In the above, we required that , which is only true if is nonnegative. To bypass this issue, we will implement the two copies of in slightly different ways, to obtain the correct signing. For notational clarity, we let be the oracle which is conjugated on the left and be the oracle on the right, such that . Note that is entrywise nonnegative and , and hence the only factor determining the sign of is . When , we will define the oracles used to load for and in a consistent way (i.e. use the same-signed square root), so that . When we will define them in an inconsistent way, so that after the conjugation operation, . We have thus shown that which implies the first conclusion. To see the second, all our gates are reversible (arithmetic circuits are reversible, and is its own inverse), and hence the complexity of applying is the same as . ∎
Finally, we put together the pieces and prove Proposition 2, which we use repeatedly throughout the paper to implement our Gibbs sampling oracles.
See 2
Proof.
Throughout the proof, let and . Also define (following notation of Corollary 5). We first observe that since ,
Here, the upper bound used that for all , by assumption. Hence, for entrywise,
Next, we note is entrywise bounded in magnitude by :
Define and . By the calculations above, we have , and similarly it is clear that because . Moreover, by using Corollary 6 with , we obtain , a block-encoding of applicable in time. Using a similar construction as Corollary 6, since , , and are all efficiently classically queriable, we obtain , a block-encoding of applicable in time. Hence, Proposition 5 yields , a block-encoding of
which can be applied in time. Next, let be the degree- polynomial from Corollary 5, parameterized by as defined earlier. Corollary 5 shows that . Thus, Proposition 6 then yields , a block-encoding of which can be applied in time. Furthermore, since and are efficiently classically queriable, we can define a gate which is applicable in time and acts as
Applying to the output of with appropriate ancilla qubits then yields
Post-selecting on the first register being the all-zeroes state and measuring on the register corresponding to , we see that we obtain a sample with probability proportional to . By Corollary 5, conditioned on the sample succeeding, the resulting distribution is -close in to the distribution proportional to , and hence the result is a -approximate Gibbs oracle. Finally, we bound the query cost of the oracle. Define and as in Corollary 5. By definition of ,
Moreover, the last conclusion in Corollary 5 shows . Hence,
In other words, we have an oracle which we can apply in time which correctly returns a sample with probability . By applying Proposition 4 to improve the success probability, we obtain the desired conclusion at a overhead.
∎
See 2
Proof.
Our oracle is the oracle from Proposition 2, except we will choose a sufficiently small constant value of . It returns “success” when the sample is accepted by the rejection sampler after boosting by amplitude amplification. Before boosting, the success probability from Proposition 2 is where the constants in the upper and lower bounds are explicit. Further, the constants from Proposition 4 are explicit, and hence boosting by amplitude amplification improves the success probability to with known constant bounds as required by the corollary statement. ∎
Appendix C Bounded approximation to on
Here, we give a proof of a lemma (with slightly different constants) used in the prior work [vAG19]. This section builds entirely off prior results on polynomial approximation in [GSLW19]; we include it for completeness because a proof was not given in [vAG19]. As a reminder, we stated and used the following result earlier when constructing our rejection sampler in Appendix B.
See 8
To obtain the lemma, we will utilize the following result from [GSLW19].
Proposition 7 (Corollary 66, [GSLW19]).
Let , , . Let be such that for all . Suppose is such that and let . There is a polynomial (see Appendix D for its numerically stable implementation) of degree such that
Proof of Lemma 8.
We apply Proposition 7 with which has a convergent Taylor series everywhere, and the parameter settings , , , . We have that with for any integer . We also check that our choice of is valid, via
Hence by Proposition 7, we have for any , there is a polynomial of degree such that and . ∎
Appendix D Numerically stable implementation of polynomial approximation
Throughout this section, let be the degree of the polynomial used in the proof of Proposition 2 in Appendix B (specifically, constructed in the proof of Proposition 2, where we have and in our applications). The polynomial we use is constructed via a decomposition in the Fourier basis (see Lemmas 57 and 65, [GSLW19]). It is not immediate that this polynomial transform can be implemented stably in finite-precision arithmetic, within the quantum singular value transformation framework of [GSLW19], which is used in the proof of Proposition 2. However, [Haa19] shows that given such a decomposition in the Fourier basis, we can obtain a numerically-stable implementation of the polynomial transformation required as a quantum circuit up to additive error , in time
In our setting (in the proof of Proposition 2), it is straightforward to check that . This construction results in the additive term in Theorem 4.