Arxiv:1811.00414V3 [Cs.DS] 6 Aug 2021
Total Page:16
File Type:pdf, Size:1020Kb
Quantum principal component analysis only achieves an exponential speedup because of its state preparation assumptions Ewin Tang∗ University of Washington (Dated: August 10, 2021) A central roadblock to analyzing quantum algorithms on quantum states is the lack of a comparable input model for classical algorithms. Inspired by recent work of the author [E. Tang, STOC’19], we introduce such a model, where we assume we can efficiently perform `2-norm samples of input data, a natural analogue to quantum algorithms that assume efficient state preparation of classical data. Though this model produces less practical algorithms than the (stronger) standard model of classical computation, it captures versions of many of the features and nuances of quantum linear algebra algorithms. With this model, we describe classical analogues to Lloyd, Mohseni, and Rebentrost’s quantum algorithms for principal component analysis [Nat. Phys. 10, 631 (2014)] and nearest-centroid clustering [arXiv:1307.0411]. Since they are only polynomially slower, these algorithms suggest that the exponential speedups of their quantum counterparts are simply an artifact of state preparation assumptions. INTRODUCTION algorithms. In our previous work we suggest an idea for develop- Quantum machine learning (QML) has shown great ing classical analogues to QML algorithms beyond this promise toward yielding new exponential quantum exceptional case [9]: speedups in machine learning, ever since the pioneer- When QML algorithms are compared to clas- ing linear systems algorithm of Harrow, Hassidim, and sical ML algorithms in the context of finding Lloyd [1]. Since machine learning (ML) routines often speedups, any state preparation assumptions push real-world limits of computing power, an exponen- in the QML model should be matched with tial improvement to algorithm speed would allow for ML `2-norm sampling assumptions in the classical systems with vastly greater capabilities. While we have ML model. found many fast QML subroutines for ML problems since HHL [2–6], researchers have not been able to prove that In this work, we implement this idea by introducing a these subroutines can be used to achieve an exponentially new input model, sample and query access (SQ access), faster algorithm for a classical ML problem, even in the which is an `2-norm sampling assumption. We can get strongest input and output models [7, 8]. A recent work SQ access to data under typical state preparation assump- of the author [9] suggests a surprising reason why: even tions, so fast classical algorithms in this model are strong our best QML algorithms, with issues with input and out- barriers to their QML counterparts admitting exponential put models resolved, fail to achieve exponential speedups. speedups. To support our contention that the resulting This previous work constructs a classical algorithm match- model is the right notion to consider, we use it to de- ing, up to polynomial slowdown, a corresponding quantum quantize two seminal and well-known QML algorithms, algorithm for recommendation systems [10], which was quantum principal component analysis [12] and quan- previously believed to be one of the best candidates for tum supervised clustering [13]. That is, we give classical an exponential speedup in machine learning [11]. In light algorithms that, with classical SQ access assumptions arXiv:1811.00414v3 [cs.DS] 6 Aug 2021 of this result, we need to question our intuitions and re- replacing quantum state preparation assumptions, match consider one of the guiding questions of the field: when is the bounds and runtime of the corresponding quantum quantum linear algebra exponentially faster than classical algorithms up to polynomial slowdown. Surprisingly, we linear algebra? do so using only the classical toolkit originally applied to The main challenge in answering this question is not the recommendation systems problem, demonstrating the in finding fast classical algorithms, as one might expect. power of this model in analyzing QML algorithms. Rather, it is that most QML algorithms are incomparable From this work, we conclude that the exponential to classical algorithms, since they take quantum states as speedups of the quantum algorithms that we consider input and output quantum states: we don’t even know an arise from strong input assumptions, rather than from analogous classical model of computation where we can the quantumness of the algorithms, since the speedups search for similar classical algorithms [8]. The quantum vanish when classical algorithms are given analogous as- recommendation system is unique in that it has a classical sumptions. In other words, in a wide swathe of settings, input, a data structure implementing QRAM, and classi- on classical data, these algorithms do not give exponential cal output, a sample from a vector in the computational speedups. QML algorithms can still be useful for quan- basis, allowing for rigorous comparisons with classical tum data (say, states generated from a quantum system), 2 though a priori it’s not clear if they give a speedup in that an index i [n] for its entry x ; produce an independent ∈ i case, since the analogous “classical algorithm on quantum measurement of x in the computational basis; and query | i data” isn’t well-defined. for x . If we can only query for an estimate of the k k Our dequantized algorithms in the SQ access model pro- squared norm x¯ (1 ν) x 2, then we denote this by ν ∈ m ±n k k vide the first formal evidence supporting the crucial con- SQ (x). For A C × , sample and query access to A ∈ cern about strong input and output assumptions in QML. (notated SQ(A)) is SQ(A1, ,...,An, ) along with SQ(A˜) ∗ ∗ Based on these results, we recommend exercising care where A˜ is the vector of row norms, i.e. A˜i := Ai, . when analyzing quantum linear algebra algorithms, since k ∗k some algorithms with poly-logarithmic runtimes only ad- Sample and query (SQ) access will be our classical mit polynomial speedups. BQP-complete QML problems, analogue to quantum state preparation. As we noted such as sparse matrix inversion [1] and quantum Boltz- previously [9], we should be able to assume that classical mann machine training [14], still cannot be dequantized analogues can efficiently measure input states: QML al- in full unless BQP=BPP. However, many QML problems gorithms shouldn’t rely on fast state preparation as the that are not BQP-complete have strong input model as- “source” of an exponential speedup. The algorithm itself sumptions (like QRAM) and low-rank-type assumptions should create the speedup. (which makes sense for machine learning, where high- For typical instantiations of state preparation oracles dimensional data often exhibits low-dimensional trends). on classical input, we can get efficient SQ access to in- This regime is precisely when the classical approaches we put. For example, given input in QRAM [15], a strong outline here work, so such problems are highly suscepti- proposed generalization of classical RAM that supports ble to dequantization. We believe continuing to explore state preparation, we can get log-dimension-time SQ ac- the capabilities and limitations of this model is a fruitful cess to input [9, Proposition 3.2]. Similarly, sparse and direction for QML research. close-to-uniform vectors can be prepared efficiently, and Notation. [n] := 1, . , n . Consider a vector x correspondingly admit efficient SQ access [16]. So, in n { m n} ∈ usual QML settings, SQ assumptions are easier to satisfy C and matrix A C × . Ai, and A ,i will re- ∈ ∗ ∗ fer to A’s ith row and column, respectively. x , than state preparation assumptions. 2 k k This leads to a model based on SQ access that A F , and A will refer to ` , Frobenius, and spec- k k k k 1 n we codify with the informal definition of “dequanti- tral norm, respectively. x := x i=1 xi i and A := 1 m | i k k | i | i zation”. We say we dequantize a quantum protocol A i=1 Ai, i Ai, (where, by the previous defini- k kF k ∗k | i | ∗i P S : O(T )-time state preparation of φ1 ,..., φc ψ 1 n min m,n | i | i → | i tion, Ai, = Ai,j j ). A = σiuiv† C P Ai, j=1 i=1 i if we describe a classical algorithm of the form S : | ∗i k ∗k | i m ν is A’s singular value decomposition, where ui C , O(T )-time SQ(φ1, . , φc) SQ (ψ) with similar guar- n P P ∈ → vi C , σi R, ui and vi are sets of orthonor- antees to S up to polynomial slowdown. This is the sense ∈ ∈ { } { } mal vectors, and σ1 σ2 σmin m,n 0. in which we dequantized the quantum recommendation ≥ ≥ ·k · · ≥ ≥ A := σ u v† A := σ u v† system in prior work [10]. In the rest of this article, we σ σi σ i i i and k i=1 i i i denote low- rank approximations≥ to A. We assume basic arithmetic will dequantize two quantum algorithms, giving detailed P P operations take unit time, and O˜(f) := O(f log f). sketches of the classical algorithms and leaving proofs of correctness to the supplemental material [16]. These algorithms are applications of three protocols from our THE DEQUANTIZATION MODEL previous work [9] rephrased in our access model. A typical QML algorithm works in the model where state preparation of input is efficient and a quantum state NEAREST-CENTROID CLASSIFICATION is output for measurement and post-processing. (Here, we assume an ideal and fault-tolerant quantum computer.) Lloyd, Mohseni, and Rebentrost’s quantum algorithm In particular, given a data point x Cn as input, we for clustering estimates the distance of a data point to the ∈ assume we can prepare copies of x . For m input data centroid of a cluster of points [13].