Low-depth gradient measurements can improve convergence in variational hybrid quantum-classical algorithms

Aram Harrow, John Napp

Introduction

where AjA_{j} is the Hermitian operator which generates pulse jj. This is the form of variational state most commonly encountered in the literature on variational algorithms, and is also motivated theoretically [MRBAG16, YRS+17, BJ18]. Note that in the presence of noise, the parameterized family of states which may be prepared will actually consist of mixed states. We only consider the noiseless case in this paper. It may also be the case that there are more pulses than independent parameters. For instance, one may impose a constraint like \upthetai=\upthetaj\bm{\uptheta}_{i}=\bm{\uptheta}_{j}. We assume for simplicity that the parameters are independent, but comment on how our results could be easily extended to this case.

It is assumed that the quantum device is controlled by a classical “outer loop”, and the quantum device is used only for preparing simple quantum states and making simple measurements. The classical outer loop uses this measurement information to perform a classical optimization of some function f(\uptheta)f(\bm{\uptheta}) over the feasible set X\mathcal{X}, where the objective function f(\uptheta)f(\bm{\uptheta}) is induced by some Hermitian objective observable HH, via the relation f(\uptheta):=\expectationvalueH\upthetaf(\bm{\uptheta}):=\expectationvalue{H}{\bm{\uptheta}}. Algorithms of this family have been proposed in the context of quantum simulation (e.g. variational quantum eigensolvers [PMS+14, WHT15]), combinatorial optimization (e.g. QAOA [FGG14]), and machine learning (e.g. quantum classifiers [FN18, MNKF18, SK18, SBSW18, HCT+18]).

As a simple example, in a simulation context, HH could be some physical Hamiltonian for which we want to approximately obtain the ground state energy. If the true ground state (or a state close to the true ground state) belongs to the parameterized family {∣\uptheta⟩}\uptheta\{\ket{\bm{\uptheta}}\}_{\bm{\uptheta}} for \uptheta∈X\bm{\uptheta}\in\mathcal{X}, approximately minimizing f(\uptheta)f(\bm{\uptheta}) yields an approximation to the ground state energy. The typical way a variational algorithm would obtain information about f(\uptheta)f(\bm{\uptheta}) with little quantum resources is by expanding f(\uptheta)=\expectationvalueH\uptheta=∑i=1mαi\expectationvaluePi\upthetaf(\bm{\uptheta})=\expectationvalue{H}{\bm{\uptheta}}=\sum_{i=1}^{m}\alpha_{i}\expectationvalue{P_{i}}{\bm{\uptheta}} where PiP_{i} are tensor products of Pauli operators (recall that any operator may be expanded in this way), or are some other observables which may be easily measured. In this paper, we assume the PiP_{i} are products of Pauli operators. Assuming it is possible to easily measure these operators, one can estimate f(\uptheta)f(\bm{\uptheta}) by estimating each \expectationvaluePi\uptheta\expectationvalue{P_{i}}{\bm{\uptheta}} separately and combining the results according to the coefficients αi\alpha_{i}. Of course, due to the randomness of the measurement outcomes, many preparations of ∣\uptheta⟩\ket{\bm{\uptheta}} and measurements may be required to obtain a good estimate of f(\uptheta)f(\bm{\uptheta}).

This effect occurs generally in variational hybrid algorithms: the randomness of the quantum measurement outcomes translates into the classical outer loop only having stochastic access to the objective function ff. That is, at point \uptheta\bm{\uptheta} in parameter space, it cannot directly observe the function value f(\uptheta)f(\bm{\uptheta}), but rather some random variable whose expectation value is f(\uptheta)f(\bm{\uptheta}). Numerical simulations that overlook this fact may be misleading. For instance, letting ϵ\epsilon denote the optimization error, some problems that admit log⁡(1/ϵ)\log(1/\epsilon) convergence rates given noiseless access to the objective function values admit poly(1/ϵ)\text{poly}(1/\epsilon) convergence rates in the stochastic setting [Bub15].

But even worse for prospects of optimization, the resulting classical stochastic optimization problem will generally be complicated and nonconvex, and hence may be intractable. However, one can hope for heuristics which find a reasonable approximate solution. Furthermore, if the algorithm is in a convex vicinity of an optimum, or local optimum, algorithms like stochastic gradient descent which are known to converge for convex problems may converge to the local optimum despite the problem being globally nonconvex. For some proposed applications of variational algorithms one desires a very precise solution, so it is likely that much time will be spent converging in the vicinity of an optimum and this situation may be especially relevant. In this paper, we focus on this latter scenario of convergence within a convex region containing a local optimum, either assuming or proving that this case applies.

In the usual formulation of variational algorithms, the classical outer loop is assumed to take some number of quantum measurements at a point \uptheta\bm{\uptheta} in parameter space in order to approximate the objective function value f(\uptheta)f(\bm{\uptheta}) at that point, and then perform an optimization based on these values. However, one can imagine more complicated algorithms which, instead of taking measurements to estimate f(\uptheta)f(\bm{\uptheta}) at point \uptheta\bm{\uptheta}, take measurements corresponding to some other property of the optimization problem. Indeed, a natural alternative choice is to take measurements corresponding to ∇f(\uptheta)\nabla f(\bm{\uptheta}), the gradient of the objective function at point \uptheta\bm{\uptheta}. Such a strategy was proposed in the context of combinatorial optimization [GS17], quantum chemistry [RBM+18], and machine learning [MNKF18, SBSW18, FN18]. Similar ideas were also proposed in the context of implementing Hamiltonian evolution in a low-depth variational setting [LB17]. Low-depth procedures for directly measurement gradients in variational algorithms typically require only marginally greater quantum circuit depth than that required for measuring the objective function. Some such methods are reviewed and extended in [BIS+18, SBG+18].

However, it was not clear that such gradient-measurement based strategies could confer any advantage over objective-measurement based strategies. For one, note that it is possible to obtain an estimate of ∇f(\uptheta)\nabla f(\bm{\uptheta}) using only estimates of the objective function f(\uptheta)f(\bm{\uptheta}). To see how, note that for small ϵ\epsilon,

2 Summary of results

In order to rigorously prove a lower bound on the number of quantum measurements required for zeroth-order variational optimization, it is convenient to introduce a black-box formalism. To motivate the introduction of a black-box formalism, note that any variational algorithm can be simulated by a purely classical algorithm that makes zero quantum measurements. Of course, the time complexity of the classical simulation may be exponential in the problem size.

One encounters a similar problem in the classical setting of trying to quantify the complexity of optimization. The objective function to be minimized could be extremely complicated and difficult to study analytically (for instance, it could correspond to the output of some complicated algorithm) or otherwise inaccessible. A black-box model was therefore developed for the study of convex optimization [NY83] and remains popular in current research in the field. In this setting, the function to be optimized is encoded in an oracle, and we define the query complexity of an algorithm for optimizing the function to be the number of calls made to the oracle. The algorithm may be promised that the objective function has certain properties, but is not given an exact description of the function. This black-box formalism provides a natural and general setting for proving bounds in convex optimization.

It should be noted that, when variational algorithms are used in practice, commuting terms in the Pauli decomposition of HH can be measured on a single trial state. To simplify the analysis, our black-box model does not take advantage of this possible speedup. Hence, the query cost in our model corresponds to the number of products of Pauli operators measured, rather than the number of state preparations required, which is a related quantity but could be lower. (We comment on how taking this into account would affect our bounds for the toy model we study in Table 2.)

We consider a restriction of the variational problem to a convex region of parameter space X\mathcal{X} on which the objective function f(\uptheta)f(\bm{\uptheta}) is assumed to be convex. We import known results from the stochastic optimization literature to obtain convergence rates for various optimization strategies and for various assumptions about f(\uptheta)f(\bm{\uptheta}), such as strong convexity. We derive upper bounds on the query cost for strategies that use analytic gradient measurements in conjunction with stochastic gradient descent or stochastic mirror descent with an l1l_{1} setup. The upper bounds are functions of the dimension of parameter space pp, precision ϵ\epsilon, geometry of the feasible set, and coefficients in the Pauli expansions of the objective observable and pulse generators.

Stochastic mirror decent (see Appendix A.2, or e.g. [NJLS09, JN11, Bub15] for more detailed reviews), which we will abbreviate as SMD, can be thought of as a generalization of SGD to non-Euclidean spaces. As motivation for why SMD might be relevant in our setting, note that the 1-norm of a parameter vector has a very natural interpretation. Namely, since e−iAj\upthetaj/2e^{-iA_{j}\bm{\uptheta}_{j}/2} is essentially the unitary evolution generated by Aj/2A_{j}/2 for time \upthetaj\bm{\uptheta}_{j}, ∥\uptheta∥1:=∑i∣\upthetai∣\|\bm{\uptheta}\|_{1}:=\sum_{i}|\bm{\uptheta}_{i}| may be interpreted as the total amount of time that the starting state ∣Ψ⟩\ket{\Psi} is evolved for to reach the trial state ∣\uptheta⟩:=e−iAp\upthetap/2⋯e−iA1\uptheta1/2∣Ψ⟩\ket{\bm{\uptheta}}:=e^{-iA_{p}\bm{\uptheta}_{p}/2}\cdots e^{-iA_{1}\bm{\uptheta}_{1}/2}\ket{\Psi}, and ∥\upthetai−\upthetaj∥1\|\bm{\uptheta}_{i}-\bm{\uptheta}_{j}\|_{1} is associated with the amount of time for which the associated pulse sequences differ. On the other hand, SGD is appropriate for Euclidean geometriesa. Taking our norm to be ∥⋅∥1\|\cdot\|_{1} instead of ∥⋅∥2\|\cdot\|_{2} and using a suitable version of SMD yields nearly quadratically better scaling with respect to the dimension of parameter space pp in some settings, as compared with SGD. In other settings, SGD outperforms SMD. We record upper bounds based on both strategies. It is an open problem to understand what sort of values the parameters in the upper bounds typically take in practice, and relatedly, whether a Euclidean geometry or some other geometry is more appropriate.

For comparison, we also record a rigorous upper bound for zeroth-order strategies by applying two of the best known zeroth-order upper bounds [FKM05, AFH+11] from the stochastic optimization literature. Our results on general upper bounds are displayed in Table 1. It should be noted that these zeroth-order upper bounds are the best rigorous zeroth-order upper bounds that we are aware of, but it is likely that other derivative-free algorithms would significantly outperform these bounds in practice in many instances. For instance, methods based on trust regions and surrogate models [CSV09] often perform very well in practice, despite not necessarily having strong theoretical guarantees.

This point is an example of a more general limitation that applies to all of the upper bounds we report, relating to the difference between theoretical and empirical results. For one, these are upper bounds for convergence that apply when the algorithm has a trusted region which it knows contains a local optimum, and which the objective function is convex over. Furthermore, while strong convexity of the objective function in the domain can greatly improve the convergence, the rigorous upper bounds that exploit this property apply when the algorithm has a good estimate of this strong convexity parameter. In other language, the upper bounds apply in a promise setting, where the algorithm is promised that a certain convex subset of parameter space contains the optimum, the objective function is convex in this domain, and any other relevant parameters take certain values. However, this may very well not be the case in practice. Furthermore, these are worst-case upper bounds, and may be outperformed in practice.

All of these challenges are well-known in machine learning tasks such as deep learning, in which one may want to converge to a local optimum of some complicated nonconvex optimization problem. In practice, one can do hyperparameter optimization, which would involve yet another classical outer loop varying over the parameters used to define the optimization algorithm itself. Parameters could also be set adaptively (e.g. [KB14]). Another possibility is that the algorithm could try to construct a surrogate model for the objective function which is valid in some region, and estimate relevant parameters from the surrogate model. Unfortunately, such methods are often not backed up by strong theoretical results, even when the practical performance is very good. While there may be a sizable gap between theory and practice, we hope that the theoretical convergence upper bounds will nonetheless be useful for guiding practical implementations and expectations.

Finally, we point out that these upper bounds do not explicitly depend on the number of terms in the Pauli expansion of the objective observable or pulse generators, but rather on sums of coefficients in the expansion. This is a desirable feature for applications such as quantum chemistry, where it is often the case that the electronic structure Hamiltonian is written as a sum of a very large number of terms, many of which have very small norm.

After establishing an oracular setting and recording some upper bounds, for a given parameter ϵ>0\epsilon>0 we define a certain class Hnϵ\mathcal{H}_{n}^{\epsilon} of simple 1-local objective observables on nn qubits which we use to demonstrate a separation in query complexity between variational algorithms which only make zeroth-order queries to the oracle and those which make first-order queries. The optima of the observables in Hnϵ\mathcal{H}^{\epsilon}_{n} are O(ϵ)O(\epsilon)-close to each other in objective function value, in the sense that for all H,H′∈HnϵH,H^{\prime}\in\mathcal{H}^{\epsilon}_{n}, if ∣ψ⟩\ket{\psi} is an optimum (i.e. ground state) of HH, then \expectationvalueH′ψ−λmin⁡(H′)≤O(ϵ)\expectationvalue{H^{\prime}}{\psi}-\lambda_{\min}(H^{\prime})\leq O(\epsilon), where λmin⁡(H′)\lambda_{\min}(H^{\prime}) is the smallest eigenvalue of H′H^{\prime}.

We show that for any precision parameter 0<ϵ<Θ(n)0<\epsilon<\Theta(n), any zeroth-order variational algorithm which optimizes any observable H∈HnϵH\in\mathcal{H}^{\epsilon}_{n} to precision ϵ\epsilon and only queries the oracle with states in the vicinity of the optimum of HH must make at least Ω(n3/ϵ2)\Omega(n^{3}/\epsilon^{2}) queries. Here, the “vicinity of the optimum” is essentially the set of states that are O(ϵ)O(\epsilon)-close to optimal in objective function value. On the other hand, we show that after making a good choice of variational ansatz, an SGD algorithm that performs analytic gradient measurements to get gradient estimates optimizes any objective observable in the family to expected precision ϵ\epsilon with only O(n2/ϵ)O(n^{2}/\epsilon) queries of states in the vicinity of the optimum.

Suppose A\mathcal{A} is a variational algorithm that only makes zeroth-order queries to OH\mathcal{O}_{H}, only queries states in the vicinity of the optima of Hnϵ\mathcal{H}^{\epsilon}_{n}, and for any H∈HnϵH\in\mathcal{H}^{\epsilon}_{n} that is realized, outputs a description of a state whose expected objective function value is ϵ\epsilon-close to λmin⁡(H)\lambda_{\min}(H). Then A\mathcal{A} must make Ω\quantity(n3ϵ2)\Omega\quantity(\frac{n^{3}}{\epsilon^{2}}) queries.

There exists a variational algorithm that only makes first-order queries to OH\mathcal{O}_{H}, only queries states in the vicinity of the optima of Hnϵ\mathcal{H}^{\epsilon}_{n}, and for any H∈HnϵH\in\mathcal{H}^{\epsilon}_{n}, makes O\quantity(n2ϵ)O\quantity(\frac{n^{2}}{\epsilon}) queries and outputs a description of a state whose expected objective function value is ϵ\epsilon-close to λmin⁡(H)\lambda_{\min}(H). An algorithm that achieves this rate is a simple stochastic gradient descent strategy.

Suppose A\mathcal{A} is a variational algorithm that may make queries of any order to OH\mathcal{O}_{H}, may query the oracle with any state, and for any H∈HnϵH\in\mathcal{H}^{\epsilon}_{n} outputs a description of a state whose expected objective function value is ϵ\epsilon-close to the optimum. Then A\mathcal{A} makes at least Ω\quantity(n2ϵ)\Omega\quantity(\frac{n^{2}}{\epsilon}) queries.

We summarize the above results in Table 2, where for comparison we also include a rigorous zeroth-order upper bound based on the results of [FKM05] and [AFH+11].

3 Related work

In this paper, we are primarily interested in the low-depth setting. The methods we consider for measuring the gradient yield an unbiased, but possibly very noisy estimate of the gradient in low depth. An alternative approach for measuring the gradient in variational algorithms was recently proposed in [GAW17], which builds on Jordan’s gradient measurement algorithm [Jor05]. Their algorithm offers significantly better performance for obtaining precise estimates of the gradient, but also requires significantly more quantum resources, with coherence time requirements increasing with the desired precision.

A lower bound for a class of derivative-free stochastic convex optimization problems was shown in [JNR12]. Our separation result in Section 5 is similar in spirit to their result, and the proof strategies share similarities. However, our setting of variational hybrid algorithms is very different from theirs, preventing their result from being ported to variational quantum algorithms. In particular, we are interested specifically in stochastic optimization problems induced by a quantum observable and variational ansatz. Furthermore, in our setting the classical outer loop’s optimization problem is not fixed; different variational ansätze induce different optimization problems. Our lower bound for zeroth-order algorithms takes this extra freedom into account, applying for any choice of variational ansatz (and also allowing the algorithm to change ansatz over the course of the optimization). Our proof strategy for the zeroth-order lower bound also borrows some techniques from [AWBR09], which showed lower bounds for classes of first-order stochastic optimization problems. In turn, these techniques are inspired by methods in statistical minimax and learning theory.

4 Organization

In Section 2, we state the conventions we adhere to and record known results from stochastic convex optimization that we later use. In Section 3, we introduce a black-box setting for variational algorithms and define the oracle OH\mathcal{O}_{H} encoding an objective observable HH. In Section 4, we present general upper bounds on the query cost of optimization for different algorithms and different assumptions on the objective function. In Section 5, we define a parameterized class of variational optimization problems on nn qubits Hnϵ\mathcal{H}_{n}^{\epsilon} and use this class of problems to prove a query complexity separation between zeroth-order and first-order optimization strategies. We conclude and mention some open questions in Section 6. Appendix A contains some relevant background on first-order stochastic convex optimization algorithms.

Preliminaries

We will assume throughout that variational states are parameterized according to an ansatz of the form

Given a parameterization Θ\Theta and a feasible set X\mathcal{X}, the classical objective function to be minimized is induced by some Hermitian operator HH, which we refer to as the objective observable. In particular, the classical objective function is given by

In the context of variational algorithms, it is assumed that the quantum device is capable of measuring some subset of quantum observables. We assume that the set of observables which may be measured is the set of all Pauli operators.

We collect notation and parameters in Table 3.

2 Requisite results about stochastic convex optimization

We will obtain upper bounds for variational algorithms in convex regions by combining well known classical convergence results with sampling strategies for estimating the gradient. Here, we record the classical optimization results we will need. Background on stochastic gradient descent and stochastic mirror descent may be found in Appendix A (see e.g. [NJLS09, JN11, Bub15] for more thorough reviews). First, we define strong convexity.

For λ>0\lambda>0, the real-valued function ff is λ\lambda-strongly convex with respect to norm ∥⋅∥\|\cdot\| on some convex domain X\mathcal{X} if ∀x,y∈X\forall\mathbf{x},\mathbf{y}\in\mathcal{X},

Note that a twice-differentiable function is λ\lambda-strongly convex with respect to the 22-norm if all of the eigenvalues of the Hessian matrix at each point in the domain are at least λ\lambda. More generally, ff is λ\lambda-strongly convex at x\mathbf{\mathbf{x}} w.r.t. an arbitrary norm ∥⋅∥\|\cdot\| if h⊤∇2f(x)h≥λ∥h∥2\mathbf{h}^{\top}\nabla^{2}f(\mathbf{x})\mathbf{h}\geq\lambda\|\mathbf{h}\|^{2} for all h\mathbf{h}, where ∇2f(x)\nabla^{2}f(\mathbf{x}) is the Hessian of ff at x\mathbf{x}. In contrast, ff is convex if the Hessians are merely positive semidefinite. Intuitively, if ff is strongly convex, then it is lower bounded by a quadratic function. Strong convexity can often be used to accelerate optimization [Bub15].

In this section, we record known upper bounds for optimizing convex functions given access to noisy, unbiased gradient information. For the first two results below, we follow the presentation of the review on algorithms for convex optimization [Bub15].

Assume X\mathcal{X} is contained in a Euclidean ball of radius R2R_{2} and ff is convex on X\mathcal{X}. Then projected SGD with fixed step size η=R2G22T\eta=\frac{R_{2}}{G_{2}}\sqrt{\frac{2}{T}} satisfies

where x1\mathbf{x}_{1} is the starting point, and the algorithm visits points x1,…,xT\mathbf{x}_{1},\dots,\mathbf{x}_{T}.

Assume ff is λ2\lambda_{2}-strongly convex on X\mathcal{X} with respect to ∥⋅∥2\|\cdot\|_{2}. Then SGD with step size ηs=2λ2(s+1)\eta_{s}=\frac{2}{\lambda_{2}(s+1)} at iteration ss satisfies

where x1\mathbf{x}_{1} is the starting point, and the algorithm visits points x1,…,xT\mathbf{x}_{1},\dots,\mathbf{x}_{T}.

Assume X\mathcal{X} is contained in a 1-ball of radius R1R_{1}, and ff is convex on X\mathcal{X}. Then stochastic mirror descent with an appropriate l1l_{1} setup and and step size η=R1G∞2T\eta=\frac{R_{1}}{G_{\infty}}\sqrt{\frac{2}{T}}, satisfies

where x1\mathbf{x}_{1} is the starting point, and the algorithm queries points x1,…,xT\mathbf{x}_{1},\dots,\mathbf{x}_{T}.

Assume ff is λ1\lambda_{1}-strongly convex on X\mathcal{X} with respect to norm ∥⋅∥1\|\cdot\|_{1}. Then a certain SMD-like algorithm, running for TT iterations, outputs a (random) vector xˉ\bar{\mathbf{x}} such that

2.2 Upper bounds for stochastic zeroth-order (derivative-free) optimization

Compared to stochastic first-order optimization, less is known about rigorous upper bounds for stochastic zeroth-order optimization. The few rigorous upper bounds for zeroth-order optimization that are known [FKM05, AD10, AFH+11, JNR12, Sha13] are usually weaker than their first-order counterparts. The upper bounds we use in this paper are from [FKM05] and [AFH+11], in which the authors prove rigorous upper bounds for stochastic zeroth-order convex optimization in which the expected error in objective function value converges to zero like p2T\sqrt{\frac{p^{2}}{T}} and p32T\sqrt{\frac{p^{32}}{T}}, respectively, where TT is the number of iterations. We record their results below, adapted for our purposes. Note that in these papers, the authors state the results in terms of online optimization. However, it is straightforward to convert these into results for stochastic optimization. Similar adaptations of these same results are also noted in [JNR12] and [Sha13].

There also exists an algorithm [AFH+11] that makes TT queries and outputs xˉ\bar{\mathbf{x}} such that

Note that this implies that min⁡\quantity(O\quantity(p2E2R22(L+E/r2)2ϵ4),O~(p32E2ϵ2))\min\quantity(O\quantity(\frac{p^{2}E^{2}R_{2}^{2}(L+E/r_{2})^{2}}{\epsilon^{4}}),\widetilde{O}(\frac{p^{32}E^{2}}{\epsilon^{2}})) queries are needed to optimize to expected precision ϵ\epsilon. Other rigorous upper bounds for derivative-free stochastic convex optimization exist [AD10, JNR12, Sha13], which apply in settings which are less applicable to this paper, or to specific families of functions.

Black-box formulation

One of our main goals is to prove a rigorous lower bound on the number of quantum measurements required to minimize an objective function f(\uptheta)=\expectationvalueH\upthetaf(\bm{\uptheta})=\expectationvalue{H}{\bm{\uptheta}} to within some precision ϵ\epsilon. However, examining the formulation of this question already reveals a subtlety. Namely, a classical computer can simulate the quantum part of a variational algorithm in (in general) exponential time, which implies that any variational algorithm can be simulated with a variational algorithm which makes zero quantum measurements.

Of course, in practice it would generally be intractable for a classical computer to simulate a variational algorithm. In fact, it is known that the existence of an efficient classical algorithm for sampling from the output distribution of the commonly-considered variational algorithm QAOA would imply a collapse of the polynomial hierarchy [FH16]. We therefore seek a formulation of the problem which better captures the behavior of realistic algorithms. One way to do this is to strip away the classical outer loop’s knowledge of the specific objective observable HH that it is trying to optimize by encoding the observable in the black box, and only giving the outer loop the black box OH\mathcal{O}_{H} and a promise that HH belongs to some particular family H\mathcal{H}. In practice, this essentially means that the black-box picture is applicable when the classical optimization algorithm that the outer loop runs does not depend on the details of the objective observable HH itself (but could depend on the family H\mathcal{H}), but is rather some more general-purpose algorithm like gradient descent, Nelder-Mead, SPSA, BFGS, etc. We are not aware of any proposed variational algorithm that is not in this class. Note that, while the classical optimization component of a variational algorithm does not exploit detailed structure of the objective observable in current proposals, the variational ansatz sometimes does (e.g. [PMS+14, FGG14, WHT15]). For example, in QAOA, the ansatz involves pulses of the form eiH\upthetaje^{iH\bm{\uptheta}_{j}} where HH is the objective observable. For such cases, our query upper bounds are still fully applicable. Our lower bound for zeroth-order variational optimization is ansatz-independent in the sense that for any ansatz the algorithm chooses, the lower bound still holds. Hence, the zeroth-order lower bound is still fully applicable in the setting where the ansatz may be a function of HH. However, there is a subtlety that if the algorithm is promised that the ansatz is a certain function of HH, it could use this information to learn the ground state of HH with fewer queries, and the lower bound may no longer apply. Essentially, this means that the zeroth-order lower bound applies for zeroth-order algorithms which do not cleverly exploit the dependence of the variational ansatz on the objective observable. This includes all “general-purpose” zeroth-order methods such as SPSA, Nelder-Mead, and gradient descent with gradients estimated via finite-differences, to name a few.

In the remainder of this section, we define our black-box formulation of variational algorithms. Specifically, we define an oracle OH\mathcal{O}_{H} encoding the objective observable HH. This definition allows us to talk about the query complexity of optimizing some family of objective observables H\mathcal{H}. The classical outer loop is given as input an oracle OH\mathcal{O}_{H} under the promise that H∈HH\in\mathcal{H}, and attempts to find an approximate optimum using as few queries as possible.

If the parameterization Θ\Theta is clear from context, we may not explicitly note that Θ\Theta is provided as input to the oracle. If we speak of querying the oracle with a state ∣ψ⟩\ket{\psi}, we mean querying the oracle with a parameterization and parameter vector that describe the state ∣ψ⟩\ket{\psi}. In the remainder of this section, we first define how the oracle behaves for zeroth-order queries. We then briefly review how to measure gradients (and higher-order derivatives) in low depth in variational algorithms, and then define the behavior of the oracle upon first- and higher-order queries.

Let HH be some objective observable. Decompose HH into a linear combination of mm products of Pauli operators as H=∑i=1mαiPiH=\sum_{i=1}^{m}\alpha_{i}P_{i} where αi>0\alpha_{i}>0. (The coefficients may all be assumed to be positive by absorbing the phase into the operator.) Now, defining the normalization factor E:=∑iαiE:=\sum_{i}\alpha_{i} and the probability distribution pi:=αi/Ep_{i}:=\alpha_{i}/E, we may write

From this expression, it is clear that by sampling index ii with probability pip_{i}, measuring PiP_{i} with respect to the state ∣\uptheta⟩\ket{\bm{\uptheta}}, and then multiplying the outcome by EE we obtain an unbiased estimator for f(\uptheta)=\expectationvalueH\upthetaf(\bm{\uptheta})=\expectationvalue{H}{\bm{\uptheta}}. Furthermore, since the measurement outcome of PiP_{i} is either +1+1 or −1-1, the output of this estimator is ±E\pm E-valued. It is also clear that ∣f(\uptheta)∣≤E|f(\bm{\uptheta})|\leq E for all \uptheta\bm{\uptheta}. We define the behavior of the sampling oracle OH\mathcal{O}_{H} for zeroth-order sampling to be essentially the above process.

Let H=E∑i=1mpiPiH=E\sum_{i=1}^{m}p_{i}P_{i} be a decomposition of an objective observable as above, where E>0E>0 and pip_{i} is a probability distribution. Given as input a parameterization Θ\Theta, a parameter \uptheta\bm{\uptheta}, and an empty coordinate multiset S=∅S=\varnothing, the oracle behaves as follows. It internally prepares ∣\uptheta⟩\ket{\bm{\uptheta}} and measures the observable PiP_{i} with probability proportional to pip_{i}. It then multiplies the outcome by EE and outputs the resulting ±E\pm E-valued estimator.

2 Analytic gradient measurements

Variational algorithms typically aim to estimate the objective function f(\uptheta):=\expectationvalueH\upthetaf(\bm{\uptheta}):=\expectationvalue{H}{\bm{\uptheta}} at some point \uptheta\bm{\uptheta} in parameter space, and use this information along with previous estimates of ff to propose a new point \uptheta′\bm{\uptheta}^{\prime} in parameter space. In this case, the classical outer loop essentially has a stochastic zeroth-order oracle for the objective function.

Some recent works [GS17, MNKF18, RBM+18, SBSW18, SBG+18] have instead suggested a different optimization strategy, in which one directly extracts information about the gradient of the objective function f(\uptheta)f(\bm{\uptheta}) by measuring corresponding quantum observables. Quantum measurements of this type that correspond to estimates of the gradient of the objective function are often referred to as analytic gradient measurements. In this section, we review these strategies.

For notational convenience, we define Ui:=e−iAi\upthetai/2U_{i}:=e^{-iA_{i}\bm{\uptheta}_{i}/2} to be the unitary corresponding to pulse ii, and for i≤ji\leq j we define Ui:j:=e−iAj\upthetaj/2⋯e−iAi\upthetai/2U_{i:j}:=e^{-iA_{j}\bm{\uptheta}_{j}/2}\cdots e^{-iA_{i}\bm{\uptheta}_{i}/2} to be the sequence of pulses from ii through jj, inclusive. Note that in using this notation we are hiding the dependence on \uptheta\bm{\uptheta} for visual clarity. Recall that the objective function corresponding to objective observable HH is given by

It is straightforward to calculate the following relation via the chain rule applied to the above expression:

We now describe how the above quantity could be measured in a variational algorithm. Denote the Pauli decomposition of AjA_{j} as Aj=∑k=1njβk(j)Qk(j)A_{j}=\sum_{k=1}^{n_{j}}\beta^{(j)}_{k}Q^{(j)}_{k} where Qk(j)Q^{(j)}_{k} are products of Pauli operators. As in the previous sections, denote the Pauli decomposition of HH as H=∑i=1mαiPiH=\sum_{i=1}^{m}\alpha_{i}P_{i}. Then by linearity we can rewrite the above derivative as

Now, we can obtain an unbiased estimator for \imaginary\expectationvalueU1:j†Qk(j)U(j+1):p†PlU1:pΨ\imaginary\expectationvalue{U_{1:j}^{\dagger}Q^{(j)}_{k}U_{(j+1):p}^{\dagger}P_{l}U_{1:p}}{\Psi} via a (generalized) Hadamard test. In particular, the following procedure may be used for estimating \imaginary\expectationvalueU1:j†Qk(j)U(j+1):p†PlU1:pΨ\imaginary\expectationvalue{U_{1:j}^{\dagger}Q^{(j)}_{k}U_{(j+1):p}^{\dagger}P_{l}U_{1:p}}{\Psi}.

Hadamard test for estimating −\imaginary\expectationvalueU1:j†Qk(j)U(j+1):p†PlU1:pΨ-\imaginary\expectationvalue{U_{1:j}^{\dagger}Q^{(j)}_{k}U_{(j+1):p}^{\dagger}P_{l}U_{1:p}}{\Psi} 1. Initialize Register AA in the qubit state ∣+⟩A\ket{+}_{A}. Initialize Register BB in the state ∣Ψ⟩B\ket{\Psi}_{B}. 2. Apply U1:jU_{1:j} to Register BB. 3. Apply a Controlled-Qk(j)Q^{(j)}_{k} gate to Register BB, controlled on Register AA. 4. Apply U(j+1):pU_{(j+1):p} to Register BB. 5. Apply a Controlled-PlP_{l} gate to Register BB, controlled on Register AA. 6. Measure the Pauli YY operator on Register AA. The above procedure yields a ±1\pm 1-valued unbiased estimator for −\imaginary\expectationvalueU1:j†Qk(j)U(j+1):p†PlU1:pΨ-\imaginary\expectationvalue{U_{1:j}^{\dagger}Q^{(j)}_{k}U_{(j+1):p}^{\dagger}P_{l}U_{1:p}}{\Psi}, requiring one quantum measurement.

Algorithm 1: Generalized Hadamard test [EAO+02, LB17, GS17, RBM+18]

Hence, one may estimate ∇f(\uptheta)\nabla f(\bm{\uptheta}) by expanding the derivatives as above, and then estimating each term of the expansion using Algorithm 1. Alternative methods of analyticly measuring derivatives are described in [MNKF18, SBG+18], which require similar quantum resources to the scheme we just described (but do not necessarily require controlled-Pauli gates). We note that throughout this paper, one could estimate gradients using a strategy based on these methods instead, and the results would be essentially unchanged.

We now describe an equivalent way of understanding analytic gradients. Observe that

Hence, if we define the Hermitian operators

and we define G⃗:=(G1,…,Gp)⊤\vec{G}:=(G_{1},\dots,G_{p})^{\top}, then we may write ∇f(\uptheta)=\expectationvalueG⃗\uptheta\nabla f(\bm{\uptheta})=\expectationvalue{\vec{G}}{\bm{\uptheta}}. An alternative commutator expression for the derivatives was noted in [MBS+18].

There are cases in which one may want to impose a constraint that some parameters are always equal. For example, this situation occurs for the “Hamiltonian variational” ansatz proposed in [WHT15]. Hence, one could have a pp-pulse ansatz but a smaller number of independent variational parameters. We note that this situation is easily addressed within the framework of this paper. For example, consider the case in which \upthetai\bm{\uptheta}_{i} is constrained to always equal \upthetaj\bm{\uptheta}_{j}, i.e. \upthetai=\upthetaj:=ξ\bm{\uptheta}_{i}=\bm{\uptheta}_{j}:=\xi. It is straightforward to show by linearity that \partialderivativefξ(\uptheta)=\expectationvalue(Gi+Gj)\uptheta\partialderivative{f}{\xi}(\bm{\uptheta})=\expectationvalue{(G_{i}+G_{j})}{\bm{\uptheta}}, where GiG_{i} and GjG_{j} are defined as above. Hence, \partialderivativefξ(\uptheta)\partialderivative{f}{\xi}(\bm{\uptheta}) may be estimated via Algorithm 1 just as in the unconstrained case. For simplicity, we assume that there are no such constraints on the parameters. However, all results in this paper can be easily generalized to work with such constraints via this observation.

3 First-order sampling

In the previous section, we described how information about the derivatives of the objective function can be extracted in low depth using a generalized Hadamard test. In this section, we describe a specific estimator of a derivative of the objective function which requires one Pauli measurement. We will use this estimator to define the behavior of the oracle OH\mathcal{O}_{H} upon a first-order query.

As in the previous section, denote the Pauli expansion of HH as H=∑i=1mαiPiH=\sum_{i=1}^{m}\alpha_{i}P_{i} and the Pauli expansion of AjA_{j} as Aj=∑k=1njβk(j)Qk(j)A_{j}=\sum_{k=1}^{n_{j}}\beta^{(j)}_{k}Q^{(j)}_{k}, where all α\alpha and β\beta coefficients are positive real numbers. Then we may write \partialderivativef\upthetaj(\uptheta)\partialderivative{f}{\bm{\uptheta}_{j}}(\bm{\uptheta}) as the following expansion:

We now rewrite this expansion as a certain expectation value, similarly to what we did in the definition of zeroth-order sampling. First, we observe that some of the commutators in the expansion may trivially be zero, if the operators U(j+1):pQk(j)U(j+1):p†U_{(j+1):p}Q^{(j)}_{k}U_{(j+1):p}^{\dagger} and PlP_{l} act nontrivially on disjoint sets of qubits. This will often be the case in the toy model we analyze in Section 5. Removing terms that are trivially zero will improve convergence in our optimization algorithms. To this end, we define a new set of coefficients:

where qubits(U(j+1):pQk(j)U(j+1):p†)\text{qubits}(U_{(j+1):p}Q^{(j)}_{k}U_{(j+1):p}^{\dagger}) denotes the set of qubits on which U(j+1):pQk(j)U(j+1):p†U_{(j+1):p}Q^{(j)}_{k}U_{(j+1):p}^{\dagger} acts nontrivially, after removing pulses which trivially commute through Qk(j)Q^{(j)}_{k} and cancel the corresponding inverse pulse. We define the associated normalization factors

and probability distributions qkl(j):=1Γjγkl(j)q^{(j)}_{kl}:=\frac{1}{\Gamma_{j}}\gamma^{(j)}_{kl} over the indices kk and ll, where jj is considered fixed. Note that we have the bound Γj≤EBj\Gamma_{j}\leq EB_{j} where Bj:=∑k=1njβk(j)B_{j}:=\sum_{k=1}^{n_{j}}\beta^{(j)}_{k}. Equipped with these definitions, we may write

It is straightforward to see that ∣\partialderivativef\upthetaj(\uptheta)∣≤Γj|\partialderivative{f}{\bm{\uptheta}_{j}}(\bm{\uptheta})|\leq\Gamma_{j} for all \uptheta\bm{\uptheta}. Given the above representation of \partialderivativef\upthetaj(\uptheta)\partialderivative{f}{\bm{\uptheta}_{j}}(\bm{\uptheta}), it is clear that the following procedure provides an unbiased estimator for \partialderivativef\upthetaj(\uptheta)\partialderivative{f}{\bm{\uptheta}_{j}}(\bm{\uptheta}) which requires a single measurement.

An unbiased one-measurement estimator for \partialderivativef\upthetaj(\uptheta)\partialderivative{f}{\bm{\uptheta}_{j}}(\bm{\uptheta}). 1. Sample (K,L)(K,L) from the distribution qKL(j)q^{(j)}_{KL} as defined above. 2. Use a Hadamard test (Algorithm 1) to obtain a one-measurement unbiased estimate of \expectationvaluei2\commutatorU(j+1):pQK(j)U(j+1):p†PL\uptheta=−\imaginary\expectationvalueU1:j†QK(j)U(j+1):p†PLU1:pΨ\expectationvalue{\frac{i}{2}\commutator{U_{(j+1):p}Q^{(j)}_{K}U_{(j+1):p}^{\dagger}}{P_{L}}}{\bm{\uptheta}}=-\imaginary\expectationvalue{U_{1:j}^{\dagger}Q^{(j)}_{K}U^{\dagger}_{(j+1):p}P_{L}U_{1:p}}{\Psi}. 3. Multiply the resulting number by Γj\Gamma_{j}. The estimator for \partialderivativef\upthetaj(\uptheta)\partialderivative{f}{\bm{\uptheta}_{j}}(\bm{\uptheta}) described above is ±Γj\pm\Gamma_{j}-valued.

Algorithm 2: unbiased, one-measurement estimator for \partialderivativef\upthetaj(\uptheta)\partialderivative{f}{\bm{\uptheta}_{j}}(\bm{\uptheta}).

Motivated by these derivative-estimating procedures, we now define the first-order behavior of the oracle OH\mathcal{O}_{H}.

Let HH denote an objective observable. Upon input of parameterization Θ\Theta, parameter \uptheta\bm{\uptheta}, and a coordinate multiset S={j}S=\{j\} for some j∈[p]j\in[p], the oracle internally prepares the state ∣\uptheta⟩\ket{\bm{\uptheta}} and runs Algorithm 2 above. It outputs the resulting ±Γj\pm\Gamma_{j}-valued estimator for \partialderivativef\upthetaj(\uptheta)\partialderivative{f}{\bm{\uptheta}_{j}}(\bm{\uptheta}).

4 Higher-order sampling

The sampling procedure we have described above for obtaining unbiased estimates of derivatives in low depth generalizes to higher-order derivatives. In this section, we outline how the procedure would work. Start by recalling the derivative operators we derived above:

where, since GjG_{j} is independent of \upthetak\bm{\uptheta}_{k}, this result follows from arguments identical to those we used to derive the expression for GjG_{j}. Also, note that from the original definition \expectationvalueH\uptheta:=\expectationvalueeiA1\uptheta1/2⋯eiAp\upthetap/2He−iAp\upthetap/2⋯e−iA1\uptheta1/2Ψ\expectationvalue{H}{\bm{\uptheta}}:=\expectationvalue{e^{iA_{1}\bm{\uptheta}_{1}/2}\cdots e^{iA_{p}\bm{\uptheta}_{p}/2}He^{-iA_{p}\bm{\uptheta}_{p}/2}\cdots e^{-iA_{1}\bm{\uptheta}_{1}/2}}{\Psi}, it is clear that \partialderivativef\upthetak\upthetaj=\partialderivativef\upthetaj\upthetak\partialderivative{f}{\bm{\uptheta}_{k}}{\bm{\uptheta}_{j}}=\partialderivative{f}{\bm{\uptheta}_{j}}{\bm{\uptheta}_{k}}. We therefore have, for k≤jk\leq j,

To see how to estimate this in low depth, note that we have

From the above expression, we see how to generalize the first-order sampling procedure to higher orders. To obtain an unbiased estimate of \partialderivativef\upthetak\upthetaj\partialderivative{f}{\bm{\uptheta}_{k}}{\bm{\uptheta}_{j}} with a single measurement, first expand AkA_{k}, AjA_{j}, and HH as linear combinations of products of Paulis. In turn, this yields an expansion of \partialderivativef\upthetak\upthetaj\partialderivative{f}{\bm{\uptheta}_{k}}{\bm{\uptheta}_{j}} as a linear combination of real parts of inner products of states that are acted on with pulses and Paulis. For a one-measurement estimator, randomly choose one of these inner products with probability proportional to the magnitude its coefficient, and then get an unbiased estimate of the inner product by performing a Hadamard test, similarly to what we described for the first-order case. Note that, in the second-order case (or more generally for the even-order case), the Hadamard test will involve an XX-basis measurement instead of YY-basis measurement, since a real part is being estimated.

5 Query complexity in the black-box formalism

Having defined the sampling oracle OH\mathcal{O}_{H}, we may now quantify the cost of an algorithm by the number of queries it makes to the oracle. The general setup for a variational optimization problem in the black-box setting is that the classical “outer loop” is promised that the objective observable HH to be minimized belongs to a family H\mathcal{H} of observables, and is given access to the sampling oracle OH\mathcal{O}_{H}. Note that, from the perspective of the outer loop, the problem of minimizing the objective function is a purely classical black-box optimization problem since it gives classical input to the oracle and receives classical output. We now formalize the notion of the “error” associated with some variational algorithm A\mathcal{A} for optimizing a family H\mathcal{H} of objective observables.

Let H\mathcal{H} denote a set of objective observables, and A\mathcal{A} be a (possibly randomized) classical algorithm which has access to a sampling oracle OH\mathcal{O}_{H} for some H∈HH\in\mathcal{H} and outputs a description of a quantum state ∣ψ⟩\ket{\psi}. Then the optimization error of A\mathcal{A} with respect to H\mathcal{H}, Err⁡(A,H)\operatorname*{Err}(\mathcal{A},\mathcal{H}), is defined to be

where the expectation is over the possible randomness of the output state ∣ψ⟩\ket{\psi}.

In other words, Err⁡(A,H)\operatorname*{Err}(\mathcal{A},\mathcal{H}) is the worst-case expected error in objective function value that A\mathcal{A} makes over all objective observables in the set H\mathcal{H}. We now make a few more definitions that will be convenient later.

Define the δ\delta-optimum of an observable HH to be the set of all states ∣ψ⟩\ket{\psi} such that \expectationvalueHψ−λmin⁡(H)≤δ\expectationvalue{H}{\psi}-\lambda_{\min}(H)\leq\delta. Define the δ\delta-optimum of a set of observables H\mathcal{H} to be the union of the δ\delta-optima of each observable in the set. We say a black-box algorithm A\mathcal{A} is a δ\delta-vicinity algorithm for H\mathcal{H} if it only queries the black box with descriptions of states that are in the δ\delta-optimum of H\mathcal{H}.

General upper bounds for variational algorithms in a convex region

In this section, we give general upper bounds on the query cost of variational algorithms in a region where the objective function is convex. This amounts to applying the known upper bounds for stochastic convex optimization from Section 2.2 to the setting in which estimates of the objective function, or derivatives of the objective function, come from the oracle specified in Section 3 (which is easy to implement in low depth in practice). Note that the oracle returns estimates of partial derivatives w.r.t. specific components. However, there are multiple ways of using these derivative estimates to construct a gradient estimator. We describe two such estimators. The first is designed to be used with SGD, and the second is designed to be used with SMD with an l1l_{1} setup.

For the remainder of this section, fix some objective observable with Pauli expansion H=∑i=1mαiPiH=\sum_{i=1}^{m}\alpha_{i}P_{i} and some parameterization Θ\Theta whose pulse generators AjA_{j} have Pauli expansions Aj=∑k=1njβk(j)Qk(j)A_{j}=\sum_{k=1}^{n_{j}}\beta^{(j)}_{k}Q^{(j)}_{k}. As in Section 3, define E:=∑i=1mαiE:=\sum_{i=1}^{m}\alpha_{i}, Bj=∑k=1njβk(j)B_{j}=\sum_{k=1}^{n_{j}}\beta^{(j)}_{k}. Define Γj\Gamma_{j} to be the normalization factor associated with coordinate jj as defined in Section 3 (see also Table 3). We collect these Γj\Gamma_{j} into a vector as

First, we specify some unbiased estimators for the gradient that we will use. The estimator of Algorithm 3 is based on l1l_{1} sampling and designed with the goal in mind of achieving a smaller 22-norm of the estimator and will be used in conjunction with SGD. The estimator of Algorithm 4 is based on l2l_{2} sampling and designed with the goal of achieving a smaller ∞\infty-norm of the estimator and will be used in conjunction with SMD. The latter estimator also requires a mild assumption on the ∞\infty-norm of the objective function. The estimators also differ in their number of samples: the former estimator uses a single sample while the latter could be called a “mini-batch” estimator which uses an asymptotically growing number of samples. We first define the two estimators, and then prove their correctness and bound them in the subsequent lemmas.

Algorithm 3: l1l_{1}-sampling estimator for ∇f(\uptheta)\nabla f(\bm{\uptheta}).

Algorithm 4: l2l_{2}-sampling estimator for ∇f(\uptheta)\nabla f(\bm{\uptheta}).

for t≥0t\geq 0. Using this bound with t=∥Γ⃗∥22pt=\frac{\|\vec{\Gamma}\|_{2}}{\sqrt{2p}} and recalling Nj=⌈pΓj2∥Γ⃗∥22ln⁡\quantity(4p2∥Γ⃗∥∞2∥Γ⃗∥22)⌉N_{j}=\left\lceil p\frac{\Gamma_{j}^{2}}{\|\vec{\Gamma}\|_{2}^{2}}\ln\quantity(4p^{2}\frac{\|\vec{\Gamma}\|_{\infty}^{2}}{\|\vec{\Gamma}\|_{2}^{2}})\right\rceil yields

By the union bound, the probability that ∣G^j−(∇f)j∣≥∥Γ⃗∥22p|\hat{G}_{j}-(\nabla f)_{j}|\geq\frac{\|\vec{\Gamma}\|_{2}}{\sqrt{2p}} for some jj is upper bounded by ∥Γ⃗∥222p∥Γ⃗∥∞2\frac{\|\vec{\Gamma}\|_{2}^{2}}{2p\|\vec{\Gamma}\|_{\infty}^{2}}. If this event occurs, then we only have the trivial upper bound ∥g^∥∞2≤∥Γ⃗∥∞2\|\hat{\mathbf{g}}\|_{\infty}^{2}\leq\|\vec{\Gamma}\|_{\infty}^{2}. Conditioned on this “bad” event not occurring, we have the bound ∥g^∥∞2≤2∥Γ⃗∥22p\|\hat{\mathbf{g}}\|_{\infty}^{2}\leq 2\frac{\|\vec{\Gamma}\|_{2}^{2}}{p}, where we used the assumption that ∣(∇f)j∣≤∥Γ⃗∥22p|(\nabla f)_{j}|\leq\frac{\|\vec{\Gamma}\|_{2}}{\sqrt{2p}} for all jj. It follows that

2 Upper bounds

Fix an objective observable HH, parameterization Θ\Theta, and a closed, convex feasible set X\mathcal{X}. Define f(\uptheta):=\expectationvalueH\upthetaf(\bm{\uptheta}):=\expectationvalue{H}{\bm{\uptheta}}, and define Γ⃗\vec{\Gamma} as above (see also Table 3). Let \uptheta∗\bm{\uptheta}^{*} denote a minimizer of f(\uptheta)f(\bm{\uptheta}) on X\mathcal{X}.

Use the 1-query estimator of Algorithm 3 for ∇f(\uptheta)\nabla f(\bm{\uptheta}) in conjunction with Theorem 2.1. ∎

Use the 1-query estimator of Algorithm 3 for ∇f(\uptheta)\nabla f(\bm{\uptheta}) in conjunction with Theorem 2.2. ∎

Use the estimator of Algorithm 4 for ∇f(\uptheta)\nabla f(\bm{\uptheta}) in conjunction with Theorem 2.4. ∎

For comparison, we also present an upper bound for the case in which we only make zeroth-order queries to OH\mathcal{O}_{H}.

Note that the outputs of zeroth-order queries to OH\mathcal{O}_{H} have magnitude EE, and apply Theorem 2.5. ∎

3 When is SMD superior to SGD?

In Section 1.2, we gave intuition for why we might hope that using the 1-norm instead of 2-norm and using SMD with an l1l_{1} setup instead of SGD might be beneficial in some cases. In particular, we noted that the 1-norm of a parameter vector \uptheta\bm{\uptheta} has a natural interpretation as the duration of evolution from the starting state ∣Ψ⟩\ket{\Psi} to the trial state associated with \uptheta\bm{\uptheta}, ∣\uptheta⟩\ket{\bm{\uptheta}}. The l1l_{1}-distance between two parameter vectors may be interpreted as the amount of time for while the two associated pulse sequences differ.

Comparing the upper bounds from the previous section, we see that where SGD has a factor of ∥Γ⃗∥12\|\vec{\Gamma}\|_{1}^{2}, SMD with an l1l_{1} setup has instead a factor of ∥Γ⃗∥22\|\vec{\Gamma}\|_{2}^{2}. Note that ∥Γ⃗∥22\|\vec{\Gamma}\|_{2}^{2} is never larger than ∥Γ⃗∥12\|\vec{\Gamma}\|_{1}^{2}, and in fact can a factor of pp smaller. Consider for example the case in which Γ1≈Γ2≈⋯≈Γp\Gamma_{1}\approx\Gamma_{2}\approx\cdots\approx\Gamma_{p}, which may be a realistic scenario in practice. In this case, we have ∥Γ⃗∥22≈pΓ12\|\vec{\Gamma}\|_{2}^{2}\approx p\Gamma_{1}^{2} for the SMD bound, whereas we have ∥Γ⃗∥12≈p2Γ12\|\vec{\Gamma}\|_{1}^{2}\approx p^{2}\Gamma_{1}^{2} for the SGD bound, which is quadratically worse in the dimension of parameter space.

On the other hand, where the SGD bounds involve a factor of R22R_{2}^{2}, the SMD bounds involve a factor of R12R_{1}^{2}. R22R_{2}^{2} is never larger than R12R_{1}^{2}, and can be significantly smaller. This could be the case when, for example, the feasible set X\mathcal{X} is a Euclidean ball. On the other hand, if X\mathcal{X} is a 1-ball, then R1=R2R_{1}=R_{2}, and SMD could potentially achieve substantially better performance than SGD due to the ∥Γ⃗∥22\|\vec{\Gamma}\|_{2}^{2} versus ∥Γ⃗∥12\|\vec{\Gamma}\|_{1}^{2} discrepancy.

Another consideration is the issue of strong convexity. As is evident from the above bounds, the presence of strong convexity can substantially accelerate the optimization. SGD can take advantage of strong convexity w.r.t. the 2-norm, but SMD in the l1l_{1} setup measures strong convexity w.r.t. the 1-norm, and in fact it is straightforward to show that the strong convexity parameters are related by λ1≤λ2≤pλ1\lambda_{1}\leq\lambda_{2}\leq p\lambda_{1}. In the toy problem we analyze in Section 5, we have λ2=Θ(1)\lambda_{2}=\Theta(1) but λ1=Θ(1/n)\lambda_{1}=\Theta(1/n) where nn is the number of qubits. However, ∥Γ⃗∥12=Θ(n2)\|\vec{\Gamma}\|_{1}^{2}=\Theta(n^{2}) while ∥Γ⃗∥22=Θ(n)\|\vec{\Gamma}\|_{2}^{2}=\Theta(n), so up to log factors and constants, SGD and SMD achieve the same asymptotic convergence rate for this toy model.

In conclusion, it is not clear from the upper bounds in the previous section or from the toy model we study in Section 5 whether SGD or SMD with an l1l_{1} setup would typically achieve better upper bounds in practice. It is an interesting problem for future work to understand whether an l2l_{2} (Euclidean) setup or an l1l_{1} setup is usually more natural for variational algorithms.

Oracle separation between zeroth-order and first-order optimization strategies for variational algorithms

In this section, we prove a separation between algorithms which make only zeroth-order queries to the sampling oracle, and those which make first-order queries to the sampling oracle, within the vicinity of the global optimum. This separation is proven with respect to a certain simple parameterized family Hnϵ\mathcal{H}_{n}^{\epsilon} of objective observables on nn qubits. The optima of the observables in Hnϵ\mathcal{H}^{\epsilon}_{n} are O(ϵ)O(\epsilon) close to each other, in the sense that for any H,H′∈HnϵH,H^{\prime}\in\mathcal{H}^{\epsilon}_{n}, the ground state of HH is an O(ϵ)O(\epsilon) optimum of H′H^{\prime}. Precisely, we will prove the following.

For any n≥15n\geq 15 and ϵ≤0.01n\epsilon\leq 0.01n, let A\mathcal{A} be any zeroth-order, 100ϵ100\epsilon-vicinity algorithm for the family Hnϵ\mathcal{H}^{\epsilon}_{n} that makes TT queries to the oracle. Then, if Err⁡(A,Hnϵ)≤ϵ\operatorname*{Err}(\mathcal{A},\mathcal{H}^{\epsilon}_{n})\leq\epsilon, it must hold that T≥Ω\quantity(n3ϵ2)T\geq\Omega\quantity(\frac{n^{3}}{\epsilon^{2}}) where the implicit factor is some fixed constant.

On the other hand, we prove that this same class of variational problems can be optimized substantially faster if the algorithm makes first-order queries to the oracle, as quantified in the following theorem. In fact, the algorithm that achieves this convergence rate is a simple stochastic gradient descent strategy. Hence, not only is the query complexity much better in this case, but the classical algorithm achieving this query complexity can be implemented efficiently. For comparison, we also obtain a zeroth-order upper bound for this class of problems using the algorithms of [FKM05] and [AFH+11]. Our first-order upper bound is given in the following theorem.

For any ϵ≤0.01n\epsilon\leq 0.01n, there exists a first-order, 100ϵ100\epsilon-vicinity algorithm A\mathcal{A} for the family Hnϵ\mathcal{H}^{\epsilon}_{n} that makes O\quantity(n2ϵ)O\quantity(\frac{n^{2}}{\epsilon}) queries and achieves an error Err⁡(A,Hnϵ)≤ϵ\operatorname*{Err}(\mathcal{A},\mathcal{H}^{\epsilon}_{n})\leq\epsilon. Moreover, A\mathcal{A} is a simple stochastic gradient descent algorithm.

For any n≥15n\geq 15 and ϵ≤0.01n\epsilon\leq 0.01n, suppose A\mathcal{A} is an algorithm that makes TT queries and satisfies Err⁡(A,Hnϵ)≤ϵ\operatorname*{Err}(\mathcal{A},\mathcal{H}^{\epsilon}_{n})\leq\epsilon. Then T≥Ω\quantity(n2ϵ)T\geq\Omega\quantity(\frac{n^{2}}{\epsilon}).

Since this lower bound is achieved (up to a possible constant factor) by the upper bound of SGD, we see that SGD is essentially optimal among all black-box strategies for optimizing Hnϵ\mathcal{H}_{n}^{\epsilon}.

The subset of objective observables we consider are perturbed around a very simple 1-local Hamiltonian.

Intuitively, for a fixed small parameter δ\delta, the set of 2n2^{n} observables {Hvδ}v\{H^{\delta}_{v}\}_{v} are perturbed around H0=−12∑i=1n\quantity(Xi+Zi)H^{0}=-\frac{1}{\sqrt{2}}\sum_{i=1}^{n}\quantity(X_{i}+Z_{i}). The parameter δ\delta characterizes the strength of the perturbation, and the binary vector vv encodes the direction of the perturbation. It is straightforward to see that the ground state of H0H^{0} is ∣π/4⟩⊗n\ket{\pi/4}^{\otimes n}, where we have defined ∣π/4⟩:=cos⁡(π/8)∣0⟩+sin⁡(π/8)∣1⟩\ket{\pi/4}:=\cos(\pi/8)\ket{0}+\sin(\pi/8)\ket{1}. Geometrically, the state ∣π/4⟩\ket{\pi/4} corresponds to the pure qubit state with polarization 12(x^+z^)\frac{1}{\sqrt{2}}(\hat{x}+\hat{z}). In the remainder of this section, we record some facts about these Hamiltonians, and define some quantities.

First, note that we may write Hvδ=−∑i=1nn^viδ⋅σ⃗iH^{\delta}_{v}=-\sum_{i=1}^{n}\hat{n}^{v_{i}\delta}\cdot\vec{\sigma}_{i} where n^viδ=\quantity(sin⁡(π4+viδ),0,cos⁡(π4+viδ))\hat{n}^{v_{i}\delta}=\quantity(\sin(\frac{\pi}{4}+v_{i}\delta),0,\cos(\frac{\pi}{4}+v_{i}\delta)) and σ⃗i\vec{\sigma}_{i} is the vector of Pauli operators acting on qubit ii. We may now read off λmin⁡(Hvδ)=−n\lambda_{\min}(H^{\delta}_{v})=-n, and the associated eigenvector is

Next, we calculate the expectation value of HvδH^{\delta}_{v} with respect to any quantum state on nn qubits.

Suppose ρ\rho is a quantum state such that the polarization of ρi\rho_{i}, the reduced state of ρ\rho on qubit ii, is r⃗i\vec{r}_{i}. Then \tr\quantity[Hvδρ]=−∑i=1nr⃗i⋅n^δvi\tr\quantity[H_{v}^{\delta}\rho]=-\sum_{i=1}^{n}\vec{r}_{i}\cdot\hat{n}^{\delta v_{i}}.

Finally, we define the set Hnϵ\mathcal{H}_{n}^{\epsilon} which we will prove the separation with respect to. To do so, we first define a bias parameter δ(ϵ)\delta(\epsilon) associated with the precision parameter ϵ\epsilon.

For a given “precision parameter” ϵ\epsilon, define the associated “bias parameter”

Now, we define Hnϵ\mathcal{H}^{\epsilon}_{n} to be the set of such observables with bias parameter δ(ϵ)\delta(\epsilon).

Hnϵ:={Hvδ(ϵ) : ∀v∈{−1,1}n}\mathcal{H}_{n}^{\epsilon}:=\{H^{\delta(\epsilon)}_{v}\,:\,\forall v\in\{-1,1\}^{n}\}.

For the remainder of the paper, we often hide the dependence of δ\delta on ϵ\epsilon for notational simplicity, and simply write δ\delta where we implicitly mean δ(ϵ)\delta(\epsilon). Note that our constraint ϵ≤0.01n\epsilon\leq 0.01n implies δ<0.7\delta<0.7.

In this section, we prove Theorem 5.1. Our proof strategy for the lower bound is to reduce a statistical learning problem to the optimization problem, and then lower bound the number of oracle calls required to solve the learning problem. Precisely, we will take an appropriate subset Mnϵ⊂Hnϵ\mathcal{M}^{\epsilon}_{n}\subset\mathcal{H}^{\epsilon}_{n}, parameterized by some subset V\mathcal{V} of the nn-dimensional hypercube {−1,+1}n\{-1,+1\}^{n}. That is, we will have Mnϵ={Hvδ(ϵ) : v∈V}\mathcal{M}^{\epsilon}_{n}=\{H^{\delta(\epsilon)}_{v}\,:\,v\in\mathcal{V}\} where V⊂{−1,1}n\mathcal{V}\subset\{-1,1\}^{n} will be strategically chosen. We prove that, if there exists an algorithm A\mathcal{A} that satisfies Err⁡(A,Mnϵ)≤ϵ\operatorname*{Err}(\mathcal{A},\mathcal{M}^{\epsilon}_{n})\leq\epsilon, then the same algorithm could be used to identify the hidden parameter v∈Vv\in\mathcal{V} associated with the objective observable Hvδ∈MnϵH^{\delta}_{v}\in\mathcal{M}^{\epsilon}_{n}. By employing information theoretic methods, we will lower bound the number of oracle calls required to identify the parameter vv, which in turn lower bounds the number of calls required to optimize to precision ϵ\epsilon.

Our proof in some parts adapts techniques from [AWBR09] and [JNR12], which lower bound the query cost of certain convex first-order and derivative-free optimization problems. These results in turn draw on methods from statistical minimax and learning theory.

We begin by defining, for fixed ϵ\epsilon, a subset Mnϵ⊂Hnϵ\mathcal{M}^{\epsilon}_{n}\subset\mathcal{H}_{n}^{\epsilon} of objective observables that are well-separated, in the sense that if a state is close to the optimal of Hvδ∈MnϵH_{v}^{\delta}\in\mathcal{M}^{\epsilon}_{n}, then it must be far from the optimal of Hv′δ∈MnϵH_{v^{\prime}}^{\delta}\in\mathcal{M}^{\epsilon}_{n} for any other parameter v′v^{\prime}. We make this precise below.

We make use of the following classical fact about packings of the hypercube (see for example [Gun11] for a simple proof).

There exists a subset V\mathcal{V} of the nn-dimensional hypercube {−1,1}n\{-1,1\}^{n} of size ∣V∣≥en/8|\mathcal{V}|\geq e^{n/8} such that, if Δ(v,v′)\Delta(v,v^{\prime}) denotes the Hamming distance between vv and v′v^{\prime},

for all v≠v′v\neq v^{\prime} with v,v′∈Vv,v^{\prime}\in\mathcal{V}.

Fix V\mathcal{V} to be such a subset of {−1,1}n\{-1,1\}^{n}, and define Mnϵ:={Hvδ : v∈V}\mathcal{M}^{\epsilon}_{n}:=\{H^{\delta}_{v}\,:\,v\in\mathcal{V}\}. The Hamming distance provides a natural distance measure between points of the hypercube. We now define a notion of distance dd between objective observables HvδH_{v}^{\delta} and Hv′δH_{v^{\prime}}^{\delta}. Intuitively, if d(v,v′)d(v,v^{\prime}) is large, then a state that is close to the optimal of HvδH_{v}^{\delta} cannot be close to the optimal of Hv′δH_{v^{\prime}}^{\delta}.

For v,v′∈{−1,1}nv,v^{\prime}\in\{-1,1\}^{n}, we define the semimetric

where the minimization is over all normalized pure states on nn qubits.

Note that λmin⁡(Hvδ)\lambda_{\min}(H^{\delta}_{v}) is simply −n-n, but we oftentimes write λmin⁡(Hvδ)\lambda_{\min}(H^{\delta}_{v}) for clarity. We now define a packing parameter β\beta which quantifies how packed the subset V\mathcal{V} is, with respect to the semimetric dd.

The packing parameter β\beta corresponding to the above subset V⊂{−1,1}n\mathcal{V}\subset\{-1,1\}^{n} and semimetric dd on the hypercube is defined to be

Suppose that for some state ∣ψ⟩\ket{\psi} and parameter v∈Vv\in\mathcal{V}, \expectationvalueHvδψ−λmin⁡(Hvδ)≤β/3\expectationvalue{H_{v}^{\delta}}{\psi}-\lambda_{\min}(H^{\delta}_{v})\leq\beta/3. Then for all v′≠vv^{\prime}\neq v with v′∈Vv^{\prime}\in\mathcal{V}, \expectationvalueHv′δψ−λmin⁡(Hv′δ)>β/3\expectationvalue{H_{v^{\prime}}^{\delta}}{\psi}-\lambda_{\min}(H^{\delta}_{v^{\prime}})>\beta/3.

Suppose there exists some parameter v′∈Vv^{\prime}\in\mathcal{V}, v′≠vv^{\prime}\neq v for which \expectationvalueHv′δψ−λmin⁡(Hv′δ)≤β/3\expectationvalue{H_{v^{\prime}}^{\delta}}{\psi}-\lambda_{\min}(H^{\delta}_{v^{\prime}})\leq\beta/3. From Definition 5.4, this implies that d(v,v′)≤2β/3d(v,v^{\prime})\leq 2\beta/3, which contradicts the assumption that β\beta is the packing parameter. ∎

We now show that any algorithm which optimizes the observables in the set Mnϵ\mathcal{M}^{\epsilon}_{n} with error ϵ\epsilon can be used to identify the parameter vv with high probability.

Suppose that A\mathcal{A} is an algorithm such that Err⁡(A,Mnϵ)≤β/9\operatorname*{Err}(\mathcal{A},\mathcal{M}^{\epsilon}_{n})\leq\beta/9. Then, one may use the output of A\mathcal{A} to construct an estimator v^\hat{v} such that, if the objective observable is HvδH_{v}^{\delta} for v∈Vv\in\mathcal{V}, then Pr⁡[v^=v]≥2/3\Pr[\hat{v}=v]\geq 2/3.

By assumption, if the observable that is realized is HvδH^{\delta}_{v} for v∈Vv\in\mathcal{V}, A\mathcal{A} outputs a description ψ\psi of a quantum state ∣ψ⟩\ket{\psi} such that

Define the estimator v^(ψ):=argmin⁡v′∈V\expectationvalueHv′δψ−λmin⁡(Hv′δ)=argmin⁡v′∈V\expectationvalueHv′δψ\hat{v}(\psi):=\operatorname*{argmin}_{v^{\prime}\in\mathcal{V}}\expectationvalue{H_{v^{\prime}}^{\delta}}{\psi}-\lambda_{\min}(H^{\delta}_{v^{\prime}})=\operatorname*{argmin}_{v^{\prime}\in\mathcal{V}}\expectationvalue{H_{v^{\prime}}^{\delta}}{\psi}. Lemma 5.3 implies that, if \expectationvalueHvδψ−λmin⁡(Hvδ)≤β/3\expectationvalue{H_{v}^{\delta}}{\psi}-\lambda_{\min}(H^{\delta}_{v})\leq\beta/3, this estimator returns v^=v\hat{v}=v with probability one. Since this event occurs with probability at least 2/32/3, the estimator returns v^=v\hat{v}=v with probability at least 2/32/3. ∎

We have shown that the ability to optimize Mnϵ\mathcal{M}^{\epsilon}_{n} well implies the ability to identify the hidden parameter v∈Vv\in\mathcal{V} with high probability. We now compute the packing parameter β\beta for the family Mnϵ\mathcal{M}^{\epsilon}_{n}.

For the subset V\mathcal{V}, semimetric dd, and packing parameter β\beta as defined above,

Recall that for all v,v′∈{−1,1}nv,v^{\prime}\in\{-1,1\}^{n},

where the minimization is over all normalized pure states on nn qubits. Therefore, to compute d(v,v′)d(v,v^{\prime}), it suffices to compute the smallest eigenvalue of Hvδ+Hv′δH_{v}^{\delta}+H_{v^{\prime}}^{\delta}.

where we used the trigonometric identities 2cos⁡(δ)=cos⁡(π/4+δ)+cos⁡(π/4−δ)=sin⁡(π/4+δ)+sin⁡(π/4−δ)\sqrt{2}\cos(\delta)=\cos(\pi/4+\delta)+\cos(\pi/4-\delta)=\sin(\pi/4+\delta)+\sin(\pi/4-\delta). From this expression, it is clear that the smallest eigenvalue of Hvδ+Hv′δH_{v}^{\delta}+H_{v^{\prime}}^{\delta} is −2(n−Δ(v,v′))−2cos⁡(δ)Δ(v,v′)-2(n-\Delta(v,v^{\prime}))-2\cos(\delta)\Delta(v,v^{\prime}), from which it follows that d(v,v′)=2Δ(v,v′)\quantity(1−cos⁡(δ))d(v,v^{\prime})=2\Delta(v,v^{\prime})\quantity(1-\cos(\delta)). By construction, for all v≠v′v\neq v^{\prime} with v,v′∈Vv,v^{\prime}\in\mathcal{V}, we have Δ(v,v′)≥n/4\Delta(v,v^{\prime})\geq n/4. It follows that β≥n2(1−cos⁡(δ))\beta\geq\frac{n}{2}(1-\cos(\delta)).

The final inequality follows from the fact that cos⁡(δ)≤1−2δ25\cos(\delta)\leq 1-\frac{2\delta^{2}}{5} for δ≤0.7\delta\leq 0.7. ∎

Any algorithm A\mathcal{A} for which Err⁡(A,Mnϵ)≤ϵ\operatorname*{Err}(\mathcal{A},\mathcal{M}^{\epsilon}_{n})\leq\epsilon can be used to construct an estimator v^\hat{v} which correctly identifies the parameter vv of the realized observable Hvδ∈MnϵH^{\delta}_{v}\in\mathcal{M}^{\epsilon}_{n} with probability at least 2/32/3.

By Lemma 5.5, the packing parameter is at least nδ25\frac{n\delta^{2}}{5}. Then by Lemma 5.4, if we can optimize observables in the set Mnϵ\mathcal{M}^{\epsilon}_{n} with expected error at most 19nδ25=nδ245=ϵ\frac{1}{9}\frac{n\delta^{2}}{5}=\frac{n\delta^{2}}{45}=\epsilon, we can identify vv with probability at least 2/32/3. ∎

Our proof will proceed as follows. We restrict to the subset Mnϵ⊂Hnϵ\mathcal{M}^{\epsilon}_{n}\subset\mathcal{H}_{n}^{\epsilon} and prove a lower bound on the number of zeroth-order, 100ϵ100\epsilon-vicinity queries one must make in order to identify the hidden parameter vv associated with the realized objective observable Hvδ∈MnϵH^{\delta}_{v}\in\mathcal{M}^{\epsilon}_{n}. By Lemma 5.6, this number also lower bounds the number of such queries an algorithm A\mathcal{A} must make to satisfy Err⁡(A,Mnϵ)≤ϵ\operatorname*{Err}(\mathcal{A},\mathcal{M}^{\epsilon}_{n})\leq\epsilon. Since Mnϵ\mathcal{M}^{\epsilon}_{n} is a subset of Hnϵ\mathcal{H}^{\epsilon}_{n}, optimizing Mnϵ\mathcal{M}^{\epsilon}_{n} is no harder than optimizing Hnϵ\mathcal{H}^{\epsilon}_{n}, and so this number also lower bounds the number of such queries needed to optimize Hnϵ\mathcal{H}^{\epsilon}_{n} to precision ϵ\epsilon.

We next prove two simple lemmas we will need.

Suppose ∣ϕ⟩\ket{\phi} is in the μ\mu-optimum of HvδH^{\delta}_{v}, i.e. \expectationvalueHvδϕ−λmin⁡(Hvδ)≤μ\expectationvalue{H^{\delta}_{v}}{\phi}-\lambda_{\min}(H^{\delta}_{v})\leq\mu. Let r⃗i\vec{r}_{i} be the polarization of the reduced state of ∣ϕ⟩\ket{\phi} on qubit ii, and let αi∈[0,π]\alpha_{i}\in[0,\pi] be the (unoriented) angle between the vector r⃗i\vec{r}_{i} and the unit vector n^δvi\hat{n}^{\delta v_{i}}. Then 1n∑i=1nαi2≤10μn\frac{1}{n}\sum_{i=1}^{n}\alpha_{i}^{2}\leq\frac{10\mu}{n} and 1n∑i=1nαi≤10μn\frac{1}{n}\sum_{i=1}^{n}\alpha_{i}\leq\sqrt{\frac{10\mu}{n}}.

Now, note that r⃗i⋅n^δvi=∣r⃗i∣cos⁡αi≤∣r⃗i∣\quantity(1−αi210)≤1−αi210\vec{r}_{i}\cdot\hat{n}^{\delta v_{i}}=|\vec{r}_{i}|\cos\alpha_{i}\leq|\vec{r}_{i}|\quantity(1-\frac{\alpha_{i}^{2}}{10})\leq 1-\frac{\alpha_{i}^{2}}{10} for αi∈[0,π]\alpha_{i}\in[0,\pi]. This gives us

It immediately follows from Jensen’s inequality that

Suppose ∣ϕ⟩\ket{\phi} is in the kϵk\epsilon-optimum of Hv′δH^{\delta}_{v^{\prime}} for some k>0k>0. Then ∣ϕ⟩\ket{\phi} is in the (k+302k+90)ϵ(k+30\sqrt{2k}+90)\epsilon-optimum of HvδH^{\delta}_{v} for any v∈{−1,1}nv\in\{-1,1\}^{n}.

As in the previous lemma, let r⃗i\vec{r}_{i} denote the polarization of the reduced state on qubit ii, and αi\alpha_{i} denote the angle between r⃗i\vec{r}_{i} and n^δvi\hat{n}^{\delta v_{i}}. We have

Here, the relation \absolutevaluer⃗i⋅x^−z^2≤αi+δ\absolutevalue{\vec{r}_{i}\cdot\frac{\hat{x}-\hat{z}}{\sqrt{2}}}\leq\alpha_{i}+\delta can be seen geometrically. We also used the definition δ2=45ϵn\delta^{2}=\frac{45\epsilon}{n}.

2.2 Applying Fano’s inequality

At this point, it remains to lower bound the number of zeroth-order calls to the oracle needed to correctly identify the unknown bias parameter v∈Vv\in\mathcal{V}. The results from the previous section will then allow us to turn this into a lower bound for optimization. We will need the following well-known variant of Fano’s inequality. For this result and other information-theoretic results used in this section, see (for example) [CT91].

Suppose the random variable VV is uniformly distributed on the discrete set V\mathcal{V}, and the variable XX may be correlated with VV. Suppose A\mathcal{A} is an algorithm that attempts to identify VV given the variable XX. Then the probability of error pep_{e} satisfies

where I(V;X)I(V;X) is the mutual information between VV and XX. When we use this inequality in our proof, we will let V\mathcal{V} be the set of bias parameters v∈Vv\in\mathcal{V} associated with Mnϵ\mathcal{M}^{\epsilon}_{n} defined in the previous section, and XX will be the set of queries to and outputs from the zeroth-order sampling oracle.

First, recall how the oracle behaves for zeroth-order queries. It selects a term in the Pauli expansion of the objective observable with probability proportional to the magnitude of the coefficient of that term. Consider the objective observable HvδH^{\delta}_{v}. Note that the sum of coefficients of Pauli operators acting on qubit ii is sin⁡(π/4+viδ)+cos⁡(π/4+viδ)=2cos⁡(δ)\sin(\pi/4+v_{i}\delta)+\cos(\pi/4+v_{i}\delta)=\sqrt{2}\cos(\delta) where we have used a standard trigonometric identity. Note that this quantity is independent of the parameter vv. This means that, when we do a zeroth-order query of the oracle OHvδ\mathcal{O}_{H^{\delta}_{v}} encoding this Hamiltonian, the oracle is equally likely to select XiX_{i} or ZiZ_{i} for measurement as it is XjX_{j} or ZjZ_{j} for some other j≠ij\neq i. Thus, we may equivalently describe the oracle OHvδ\mathcal{O}_{H^{\delta}_{v}} as operating in the following manner. Note that the below algorithm is simply a specialization of the zeroth-order behavior of the sampling oracle (Definition 3.2) to the particular objective observable HvδH^{\delta}_{v}.

Zeroth order behavior of OHvδ\mathcal{O}_{H^{\delta}_{v}} Upon input of a parameterization Θ\Theta, parameter \uptheta\bm{\uptheta}, and empty coordinate multiset S=∅S=\varnothing, 1. Select an index i∈[n]i\in[n] uniformly at random. 2. Flip a coin with probability of heads p=12cos⁡(δ)sin⁡(π/4+viδ)=12(1+vitan⁡(δ))p=\frac{1}{\sqrt{2}\cos(\delta)}\sin(\pi/4+v_{i}\delta)=\frac{1}{2}(1+v_{i}\tan(\delta)). 3. If heads, measure −Xi-X_{i} w.r.t. the state ∣\uptheta⟩\ket{\bm{\uptheta}}. If tails, measure −Zi-Z_{i}. 4. Multiply the above measurement outcome by E=2ncos⁡(δ)E=\sqrt{2}n\cos(\delta) and output the result.

Algorithm 5: zeroth-order behavior of OHvδ\mathcal{O}_{H^{\delta}_{v}}.

Let the parameter v∈Vv\in\mathcal{V} be uniformly distributed, and denote the associated random variable VV. Suppose an algorithm makes TT zeroth-order queries to the oracle. Let ξi\xi_{i} be the input to the oracle in query ii. Let YiY_{i} denote the output of query ii. The algorithm may use information from steps one through ii to decide the input ξi+1\xi_{i+1} to query the oracle with on iteration i+1i+1. Formally, we have the variables ξ1,Y1,ξ2,…,ξT,YT\xi_{1},Y_{1},\xi_{2},\dots,\xi_{T},Y_{T}, where ξ1\xi_{1} (the algorithm’s first guess) is independent of VV, and ξi+1\xi_{i+1} is a deterministic or stochastic function of ξ1,Y1,…,ξi,Yi\xi_{1},Y_{1},\dots,\xi_{i},Y_{i}. We begin with a simple lemma. Note that versions of this relation are well-known (e.g. [AWBR09, RR11, JNR12]).

I(V;(ξ1,Y1,…,ξT,YT))≤Tmax⁡ξ1I(V;Y1∣ξ1)I(V;(\xi_{1},Y_{1},\dots,\xi_{T},Y_{T}))\leq T\max_{\xi_{1}}I(V;Y_{1}|\xi_{1}).

where in the first line we have used the chain rule for mutual information, in the second we used the fact that ξi\xi_{i} depends only on (ξ1,Y1,…,ξi−1,Yi−1)(\xi_{1},Y_{1},\dots,\xi_{i-1},Y_{i-1}), in the third we used the definition of mutual information, and in the fourth we used subadditivity and the fact that YiY_{i} depends only on ξi\xi_{i} and VV. ∎

Letting D(⋅∥⋅)D(\cdot\|\cdot) denote the relative entropy of two distributions, we have for any ξ1\xi_{1},

Recall that since A\mathcal{A} only queries states in the 100ϵ100\epsilon-optimum of Hnϵ\mathcal{H}^{\epsilon}_{n}, then for any state ∣\uptheta⟩\ket{\bm{\uptheta}} that is queried, \expectationvalueHvδ\uptheta≤650ϵ\expectationvalue{H^{\delta}_{v}}{\bm{\uptheta}}\leq 650\epsilon by Lemma 5.8. As we have done before, let αi\alpha_{i} denote the angle between r⃗i\vec{r}_{i} and n^δvi\hat{n}^{\delta v_{i}}. By Lemma 5.7, we know that \quantity(1n∑i=1nαi)2≤1n∑i=1nαi2≤6500ϵn\quantity(\frac{1}{n}\sum_{i=1}^{n}\alpha_{i})^{2}\leq\frac{1}{n}\sum_{i=1}^{n}\alpha_{i}^{2}\leq\frac{6500\epsilon}{n} for any state that is queried.

Suppose QQ and RR are two ±E\pm E-valued Bernoulli distributions, with Q[+E]=qQ[+E]=q and R[+E]=rR[+E]=r. Then

where in the second line we used the inequality log⁡x≤1ln⁡2(x−1)\log x\leq\frac{1}{\ln 2}(x-1) with x>0x>0. ∎

where the last line follows from the same reasoning as in the proof of Lemma 5.8. Now, using Lemma 5.11 we have

where we have used \quantity(1n∑i=1nαi)2≤1n∑i=1nαi2≤6500ϵn=Θ(1)δ2\quantity(\frac{1}{n}\sum_{i=1}^{n}\alpha_{i})^{2}\leq\frac{1}{n}\sum_{i=1}^{n}\alpha_{i}^{2}\leq\frac{6500\epsilon}{n}=\Theta(1)\delta^{2}.

2.4 Completing the proof

Combining the above bound with Lemma 5.10, upon making TT zeroth-order queries to the oracle within the 100ϵ100\epsilon-optimum of Hnϵ\mathcal{H}^{\epsilon}_{n}, and obtaining outcomes (Y1,…,YT)(Y_{1},\dots,Y_{T}), the mutual information I(V;(ξ1,Y1,…,ξT,YT))I(V;(\xi_{1},Y_{1},\dots,\xi_{T},Y_{T})) between the hidden vector VV and the inputs and outputs of the oracle is upper bounded by O(Tδ4)O(T\delta^{4}). Lemma 5.9 implies that for any algorithm A\mathcal{A} which attempts to identify the bias vector VV given (ξ1,Y1,…,ξT,YT)(\xi_{1},Y_{1},\dots,\xi_{T},Y_{T}), the error probability is lower bounded by 1−I(V;(ξ1,Y1,…,ξT,YT))+1log⁡∣V∣1-\frac{I(V;(\xi_{1},Y_{1},\dots,\xi_{T},Y_{T}))+1}{\log|\mathcal{V}|}. Recalling that ∣V∣≥en/8|\mathcal{V}|\geq e^{n/8}, we have

Let T1/3T_{1/3} be value of TT such that the final expression above is equal to 1/31/3. A simple calculation shows T1/3=1Θ(1)δ4\quantity(n15−1)T_{1/3}=\frac{1}{\Theta(1)\delta^{4}}\quantity(\frac{n}{15}-1). In particular, for n≥15n\geq 15, T1/3≥Θ(1)n3ϵ2T_{1/3}\geq\Theta(1)\frac{n^{3}}{\epsilon^{2}}. Note that, if an algorithm makes fewer than T1/3T_{1/3} zeroth-order queries, the probability that it can correct identify the hidden parameter VV is less than 1/31/3.

We have shown that for n≥15n\geq 15 and ϵ≤0.01n\epsilon\leq 0.01n, when constrained to the 100ϵ100\epsilon-optimum of Hnϵ\mathcal{H}^{\epsilon}_{n}, at least Ω\quantity(n3ϵ2)\Omega\quantity(\frac{n^{3}}{\epsilon^{2}}) zeroth-order queries to the oracle are required to identify the bias parameter vv with probability of success at least 2/32/3. Our previous reduction from learning to optimization then implies that at least this many samples are required to optimize observables in the set Hnϵ\mathcal{H}_{n}^{\epsilon} with expected error at most ϵ\epsilon. We have therefore shown Theorem 5.1.

We have shown that Ω\quantity(n3ϵ2)\Omega\quantity(\frac{n^{3}}{\epsilon^{2}}) zeroth-order queries to the sampling oracle are required for a 100ϵ100\epsilon-vicinity algorithm to optimize the family Hnϵ\mathcal{H}_{n}^{\epsilon} to precision ϵ\epsilon. In this section, we show that with a certain natural state parameterization and making only first-order queries to the sampling oracle, the family Hnϵ\mathcal{H}_{n}^{\epsilon} can be optimized to precision ϵ\epsilon with O\quantity(n2ϵ)O\quantity(\frac{n^{2}}{\epsilon}) queries by a 100ϵ100\epsilon-vicinity algorithm based on SGD.

We start by defining the variational ansatz that we will use in our first-order optimization procedure. We define the following nn-parameter parameterization Θ\Theta:

This parameterization has a simple geometric interpretation: ∣\uptheta⟩\ket{\bm{\uptheta}} is the product state on nn qubits for which the polarization of qubit jj is sin⁡(π/4+\upthetaj)x^+cos⁡(π/4+\upthetaj)z^\sin(\pi/4+\bm{\uptheta}_{j})\hat{x}+\cos(\pi/4+\bm{\uptheta}_{j})\hat{z}. Clearly this ansatz is natural for the family Hnϵ\mathcal{H}^{\epsilon}_{n} in some sense.

Consider some objective observable Hvδ∈HnϵH^{\delta}_{v}\in\mathcal{H}_{n}^{\epsilon}. From Lemma 5.1, we have that the induced objective function f(\uptheta)f(\bm{\uptheta}) is given by

The set of states associated with B∞(δ)\mathcal{B}_{\infty}(\delta) is contained in the 100ϵ100\epsilon-optimum of Hnϵ\mathcal{H}^{\epsilon}_{n}.

For any Hvδ∈HnϵH^{\delta}_{v}\in\mathcal{H}^{\epsilon}_{n} and \uptheta∈B∞(δ)\bm{\uptheta}\in\mathcal{B}_{\infty}(\delta), we have

We now will show that f(\uptheta)f(\bm{\uptheta}) is 0.10.1-strongly convex on B∞(δ)\mathcal{B}_{\infty}(\delta) w.r.t. the Euclidean norm. To do so, we compute its Hessian matrices ∇2f(\uptheta)\nabla^{2}f(\bm{\uptheta}). We have (∇2f(\uptheta))ij=\partialderivativef\upthetai\upthetaj(\uptheta)=0(\nabla^{2}f(\bm{\uptheta}))_{ij}=\partialderivative{f}{\bm{\uptheta}_{i}}{\bm{\uptheta}_{j}}(\bm{\uptheta})=0 for i≠ji\neq j, and (∇2f(\uptheta))ii=\partialderivativef\upthetai(\uptheta)=cos⁡(\upthetai−δvi)(\nabla^{2}f(\bm{\uptheta}))_{ii}=\partialderivative{f}{\bm{\uptheta}_{i}}(\bm{\uptheta})=\cos(\bm{\uptheta}_{i}-\delta v_{i}). Since \upthetai∈[−δ,δ]\bm{\uptheta}_{i}\in[-\delta,\delta], it must hold that (∇2f(\uptheta))ii≥cos⁡(2δ)≥0.1(\nabla^{2}f(\bm{\uptheta}))_{ii}\geq\cos(2\delta)\geq 0.1 where we used our assumption δ<0.7\delta<0.7 for the last inequality. Since all eigenvalues of ∇2f(\uptheta)\nabla^{2}f(\bm{\uptheta}) for \uptheta∈B\bm{\uptheta}\in\mathcal{B} are at least 0.10.1, ff is 0.10.1-strongly convex on B∞(δ)\mathcal{B}_{\infty}(\delta).

We now calculate Γ⃗\vec{\Gamma} for this particular parameterization and some objective observable HvδH^{\delta}_{v}. Expanding the gradient as in Section 3 (see also Table 3),

where, as usual, U(j+1):n:=e−i\upthetanYn/2⋯e−i\upthetaj+1Yj+1/2U_{(j+1):n}:=e^{-i\bm{\uptheta}_{n}Y_{n}/2}\cdots e^{-i\bm{\uptheta}_{j+1}Y_{j+1}/2}. We now remove terms which are trivially zero because the commutator involves operators which act nontrivially on disjoint qubits. In particular, since U(j+1):nYjU(j+1):n†=YjU_{(j+1):n}Y_{j}U_{(j+1):n}^{\dagger}=Y_{j} in this case, then clearly qubits(U(j+1):nYjU(j+1):n†)={j}\text{qubits}(U_{(j+1):n}Y_{j}U_{(j+1):n}^{\dagger})=\{j\}. Dropping such terms in the expansion,

Using a very similar argument to that of the proof of Theorem 5.1, we may lower bound the number of calls to OH\mathcal{O}_{H} required to optimize any objective observable in the family Hnϵ\mathcal{H}^{\epsilon}_{n} with expected error at most ϵ\epsilon. In the setting of Theorem 5.1, the algorithm was restricted to querying the oracle with states in the 100ϵ100\epsilon-optimum of Hnϵ\mathcal{H}^{\epsilon}_{n}. In this section, the algorithm is allowed to query the oracle with states which may be outside this domain. We also allow the algorithm to make queries of any order, instead of just zeroth-order. As before, we actually prove a lower bound for the strictly easier problem of optimizing the subset Mnϵ⊂Hnϵ\mathcal{M}^{\epsilon}_{n}\subset\mathcal{H}^{\epsilon}_{n}.

We will essentially bound the amount of information contained in a single oracle query for any order derivative and for any state. As usual, let Θ\Theta denote the parameterization given by ∣\uptheta⟩=e−iAp\upthetap/2⋯e−iA1\uptheta1/2∣Ψ⟩\ket{\bm{\uptheta}}=e^{-iA_{p}\bm{\uptheta}_{p}/2}\cdots e^{-iA_{1}\bm{\uptheta}_{1}/2}\ket{\Psi}. Recall from Section 3.4 that, assuming w.l.o.g. that j1≤⋯≤jrj_{1}\leq\cdots\leq j_{r}, the expansion of ∂rf∂θj1⋯∂θjr(\uptheta)\frac{\partial^{r}f}{\partial\theta_{j_{1}}\cdots\partial\theta_{j_{r}}}(\bm{\uptheta}) in terms of nested commutators of conjugated Pauli operators is

The crucial point is that the sampling oracle cannot reveal any more information about the hidden parameter vv than the outcome of the internal coin flip in Step 2 of the above box. This is because, since only Step 2 in the above box depends on the hidden parameter vv, the algorithm can simulate the oracle if it has knowledge of the outcome of the internal coin flip. More formally, we have the following lemma.

Let VV be the hidden parameter, ξ\xi be the input to the oracle, WW be the outcome of the internal coin flip, and YY be the output of the oracle. Then I(V;Y∣ξ)≤I(V;W∣ξ)I(V;Y|\xi)\leq I(V;W|\xi).

Note from the above box that the coin flip of Step 2 is the only part of the black box’s internal procedure that depends on VV; the output YY is simply a stochastic function of WW. Hence the variables V→W→YV\rightarrow W\rightarrow Y form a Markov chain, and the claim follows from the data processing inequality. ∎

At this point, we may follow a virtually identical argument to that in Section 5.2.4 to find that, for n≥15n\geq 15 and ϵ≤0.01n\epsilon\leq 0.01n, at least Ω\quantity(n2ϵ)\Omega\quantity(\frac{n^{2}}{\epsilon}) oracle queries are required to identify the hidden bias parameter vv with probably at least 2/32/3. Hence, at least Ω\quantity(n2ϵ)\Omega\quantity(\frac{n^{2}}{\epsilon}) oracle queries are required to optimize Hnϵ\mathcal{H}_{n}^{\epsilon} with worst-case expected error at most ϵ\epsilon.

Since this lower bound has a matching upper bound via first-order oracle queries and SGD (up to constant factors), we see that SGD is in fact essentially optimal among all black-box strategies for optimizing the family Hnϵ\mathcal{H}_{n}^{\epsilon}.

Conclusion and open questions

We have introduced a natural black-box setting for variational algorithms, which can be straightforwardly implemented in practice. With respect to this setting, we derived rigorous upper bounds on the query cost of variational algorithms, in the setting where the induced objective function is convex within a convex feasible set. These bounds depended on the precision, dimension of parameter space, factors from the objective observable and pulse generators, and strong convexity parameters. We derived bounds both for algorithms running SGD in a Euclidean space, and for algorithms running SMD in an l1l_{1} space. For some settings of parameters SGD has stronger upper bounds, and for other settings of parameters SMD has stronger upper bounds. For the toy problem we analyze, SGD outperforms SMD by a factor that is merely logarithmic in the number of parameters. It is an interesting open question to understand which geometry is most natural for variational algorithms in practice.

We also introduced a simple class of objective observables Hnϵ\mathcal{H}_{n}^{\epsilon} on nn qubits, and proved a separation between the query cost of optimizing these observables in the vicinity of the optimum in the cases of zeroth-order (objective function measurements) versus first-order (analytic gradient measurements) optimization. We showed that, for this class of observables, a simple stochastic gradient descent strategy could outperform any possible variational algorithm (with any choice of ansatz) that only receives zeroth-order information from the oracle. We view these results as evidence that taking analytic gradient measurements in variational algorithms and using the measurement results to run a stochastic first-order optimization algorithm could be advantageous as compared to derivative-free strategies in some cases.

It would be interesting to understand the behavior of the objective function f(\uptheta)f(\bm{\uptheta}) near a local minimum for problems and variational ansatzes which appear in practice. In particular, it would be interesting to understand how the strong convexity of f(\uptheta)f(\bm{\uptheta}) typically behaves near a local minimum. Without a strong convexity guarantee, stochastic descent methods typically have query upper bounds scaling with the precision like O(1/ϵ2)O(1/\epsilon^{2}). However, given a promise of λ\lambda-strong convexity, the cost is typically O(1/λϵ)O(1/\lambda\epsilon). For the toy model Hnϵ\mathcal{H}_{n}^{\epsilon} that we analyzed, we showed that with an appropriate choice of ansatz, the problem was Θ(1)\Theta(1)-strongly convex with respect to the 2-norm. As a result of this property, we were able to obtain a O(1/ϵ)O(1/\epsilon) query upper bound for optimizing this family with SGD. We apparently were able to exploit strong convexity by making a prudent choice of variational ansatz for the problem class at hand.

This situation may be viewed as the opposite of that studied in [MBS+18], which essentially considered a situation in which the variational ansatz looks random. In this situation, the gradient of the objective function is highly concentrated around zero. One way to view the difference in our models is that in our paper there are nn independent (i.e. commuting) degrees of freedom while in [MBS+18] different terms in the Hamiltonian and pulses have the commutation relations that we would expect from Haar-random projectors. Our model could be seen as justified by the common intuition in many-body physics that local unitaries applied to the ground state create quasiparticles, and that in an nn-qubit system O(n)O(n) independent quasiparticles are possible. Their model, on the other hand, could be justified by the assumption that the variational ansatz is far from a local minimum and so the pulses act like random local unitaries. It would be interesting to understand which of these scenarios is more realistic in practice. In particular, one might hope that theoretically motivated ansatzes, such as the unitary-coupled-cluster ansatz in quantum chemistry, could possess properties near an optimum (such as strong convexity) that make them more amenable to efficient optimization.

Finally, another point that we left unaddressed is the issue of noise. It would be interesting to study how to take analytic gradient measurements in the presence of noise, and what impact this has on the convergence rate of stochastic optimization methods. In particular, these methods are quite robust against unbiased noise, but their effectiveness in the presence of biased noise is less understood.

Acknowledgements

We thank an anonymous reviewer for helpful suggestions, and for pointing out the good practical effectiveness of derivative-free trust region and surrogate methods. We thank Xiaodi Wu for useful discussions. JN and AWH were funded by ARO contract W911NF-17-1-0433 and NSF grants CCF-1729369 and PHY-1818914. AWH was also funded by NSF grant CCF-1452616 and the MIT-IBM Watson AI Lab under the project Machine Learning in Hilbert space.

References

Appendix A Background on stochastic gradient and mirror descent

In this section, we review some relevant preliminaries pertaining to convex optimization and stochastic descent algorithms. Much of the material in this section follows the review [Bub15].

where ηt>0\eta_{t}>0 is the stepsize at iteration tt, and ΠX\Pi_{\mathcal{X}} is the Euclidean projection onto X\mathcal{X}, ΠX(x)=argmin⁡y∈X∥x−y∥2\Pi_{\mathcal{X}}(\mathbf{x})=\operatorname*{argmin}_{\mathbf{y}\in\mathcal{X}}\|\mathbf{x}-\mathbf{y}\|_{2}. The intuition for this strategy is clear: the vector −∇f(xt)-\nabla f(\mathbf{x}_{t}) points in the direction of steepest decrease of ff at xt\mathbf{x}_{t}, and in each iteration we take a step of size ηt\eta_{t} in this direction and then project back into X\mathcal{X}. It is sometimes helpful to think of gradient descent in an alternative, proximal picture. Namely, Eq. A.1 is equivalent to

Intuitively, the point xt+1\mathbf{x}_{t+1} is chosen to minimize f(xt)+∇f(xt)⊤(x−xt)f(\mathbf{x}_{t})+\nabla f(\mathbf{x}_{t})^{\top}(\mathbf{x}-\mathbf{x}_{t}), a linearization of ff around xt\mathbf{x}_{t}, while not making the regularization term 12ηt∥x−xt∥22\frac{1}{2\eta_{t}}\|\mathbf{x}-\mathbf{x}_{t}\|_{2}^{2} too big.

The following result about projected gradient descent is well-known. Recall that a differentiable function ff is LL-Lipschitz with respect to ∥⋅∥\|\cdot\| if ∥∇f(x)∥∗≤L\|\nabla f(\mathbf{x})\|_{*}\leq L for all x∈X\mathbf{x}\in\mathcal{X}, where ∥⋅∥∗\|\cdot\|_{*} denotes the dual norm.

If the convex function ff is LL-Lipschitz w.r.t. the Euclidean norm, and X\mathcal{X} is contained in a Euclidean ball of radius R2R_{2}, then projected gradient descent with stepsize η=R2LT\eta=\frac{R_{2}}{L\sqrt{T}} satisfies

where x∗\mathbf{x}^{*} is a minimizer of ff on X\mathcal{X}.

Note that this implies that R22L2ϵ2\frac{R_{2}^{2}L^{2}}{\epsilon^{2}} iterations are sufficient for some desired precision ϵ\epsilon. We now define strong convexity.

The following result about projected gradient descent for strongly convex functions is known.

Let ff be λ2\lambda_{2}-strongly convex and LL-Lipschitz on X\mathcal{X}, w.r.t. the Euclidean norm. Then projected gradient descent with ηs=2λ2(s+1)\eta_{s}=\frac{2}{\lambda_{2}(s+1)} satisfies

Note that this result implies that O\quantity(L2λ2ϵ)O\quantity(\frac{L^{2}}{\lambda_{2}\epsilon}) iterations are sufficient to optimize ff to error ϵ\epsilon.

It turns out that if one does gradient descent with noisy, unbiased estimates of the gradient g^(x)\hat{\mathbf{g}}(\mathbf{x}) instead of the true gradient ∇f(x)\nabla f(\mathbf{x}), the above results are qualitatively unchanged. We refer to projected gradient descent with stochastic gradient estimates as stochastic gradient descent (SGD). We now state some results formally.

A.2 Mirror descent

A reflection on gradient descent shows that the gradient descent procedure defined above in fact only makes sense when we are working in Euclidean space. For example, an iteration of gradient descent (Eq. A.1) involves adding the vectors xt\mathbf{x}_{t} and ηt∇f(xt)\eta_{t}\nabla f(\mathbf{x}_{t}). When the problem is defined in Euclidean space, ∇f(xt)\nabla f(\mathbf{x}_{t}) may be considered as living in the same space by the Riesz representation theorem. However, if (for example) the objective function ff is defined on an l1l_{1} space, then the gradient ∇f(x)\nabla f(\mathbf{x}) lives in the dual l∞l_{\infty} space, and hence adding these vectors is not even formally well-defined.

Mirror descent may be viewed as a generalization of gradient descent to non-Euclidean geometries. To gain intuition for why we might want to do this, recall that minimizing a function that is LL-Lipschitz in the Euclidean norm to precision ϵ\epsilon requires O\quantity(L2ϵ2)O\quantity(\frac{L^{2}}{\epsilon^{2}}) iterations using the above projected gradient descent bound. Note that this expression does not have any explicit dependence on the dimension pp. However, if the parameter LL has a dependence on pp, then the convergence rate could depend on pp implicitly. Consider for example a situation in which we know that all partial derivatives of ff are bounded by 11, so that ∥∇f(x)∥∞≤1\|\nabla f(\mathbf{x})\|_{\infty}\leq 1 for all x\mathbf{x} in the domain. Then it follows that we can bound L≤pL\leq\sqrt{p}, and so we obtain an upper bound of O\quantity(pϵ2)O\quantity(\frac{p}{\epsilon^{2}}) for gradient descent, which has a linear dependence on pp. But notice that under this assumption, we have a much stronger bound on the ∞\infty-norm of the gradient. In particular, ∥∇f∥∞≤1\|\nabla f\|_{\infty}\leq 1, so the Lipschitz constant is only 11 with respect to this geometry. If we could somehow work in an l1l_{1} geometry so that ∥∇f(x)∥∞\|\nabla f(\mathbf{x})\|_{\infty} is the relevant quantity instead of ∥∇f(x)∥2\|\nabla f(\mathbf{x})\|_{2}, then perhaps we could achieve a stronger upper bound on the convergence rate. Indeed, this is possible with mirror descent.

We may associate to the mirror map Φ\Phi its Bregman divergence,

The quantity DΦ(x,y)D_{\Phi}(\mathbf{x},\mathbf{y}) may be thought of as a distance measure between x\mathbf{x} and y\mathbf{y}, generated by Φ\Phi. If Φ(x)=12∥x∥22\Phi(\mathbf{x})=\frac{1}{2}\|\mathbf{x}\|_{2}^{2}, then DΦ(x,y)=12∥x−y∥22D_{\Phi}(\mathbf{x},\mathbf{y})=\frac{1}{2}\|\mathbf{x}-\mathbf{y}\|_{2}^{2}. If Φ(x)=∑i=1pxilog⁡xi\Phi(\mathbf{x})=\sum_{i=1}^{p}\mathbf{x}_{i}\log\mathbf{x}_{i}, then DΦ(x,y)=DKL(x,y)D_{\Phi}(\mathbf{x},\mathbf{y})=D_{\text{KL}}(\mathbf{x},\mathbf{y}), the (generalized) KL divergence between x\mathbf{x} and y\mathbf{y}. We now define the notion of a projection onto the feasible set X\mathcal{X} with respect to the Bregman divergence DΦD_{\Phi}:

We are now ready to define the mirror descent procedure, with stepsize η\eta. Let x1=argmin⁡x∈X∩DΦ(x)\mathbf{x}_{1}=\operatorname*{argmin}_{\mathbf{x}\in\mathcal{X}\cap\mathcal{D}}\Phi(\mathbf{x}). Then mirror descent is defined by the following iteration. For t≥1t\geq 1, let yt+1∈D\mathbf{y}_{t+1}\in\mathcal{D} and xt+1∈X\mathbf{x}_{t+1}\in\mathcal{X} be such that

In other words, we first move to a “dual space” via the mirror map Φ\Phi, then do the gradient descent step in the dual space, then move back to the original space again via the mirror map. The resulting point, yt+1\mathbf{y}_{t+1}, may lie outside the feasible set X\mathcal{X}, so we then project back to X\mathcal{X} via the Bregman divergence generated by Φ\Phi. We also note that a step of mirror descent can be equivalently described in the following proximal picture, which makes the relation to gradient descent clearer.

The following convergence rate can be proven for mirror descent.

If Φ\Phi is ρ\rho-strongly convex on X∩D\mathcal{X}\cap\mathcal{D} with respect to ∥⋅∥\|\cdot\|, R2:=sup⁡x∈X∩D\quantity[Φ(x)−Φ(x1)]R^{2}:=\sup_{\mathbf{x}\in\mathcal{X}\cap\mathcal{D}}\quantity[\Phi(\mathbf{x})-\Phi(\mathbf{x}_{1})], ff is convex, and ff is LL-Lipschitz with respect to ∥⋅∥\|\cdot\|, then mirror descent with η=RL2T\eta=\frac{R}{L}\sqrt{\frac{2}{T}} satisfies

Whenever X\mathcal{X} is contained in an l1l_{1}-ball of radius 11 centered at the origin, we have R2=eln⁡pR^{2}=e\ln p and ρ≥1\rho\geq 1. These assumptions on X\mathcal{X} can always be achieved by shifting and scaling X\mathcal{X}. We now state a mirror descent bound for an l1l_{1} geometry.

If the convex function ff is LL-Lipschitz with respect to the norm ∥⋅∥1\|\cdot\|_{1}, and X\mathcal{X} is contained in a 1-ball of radius R1R_{1}, then projected mirror descent with an appropriate choice of mirror map and stepsizes satisfies

Finally, if ff is strongly convex with respect to the norm ∥⋅∥1\|\cdot\|_{1}, then SMD can be accelerated similarly to how SGD can be accelerated for strongly convex functions. See for example [HK14].