Ewin TangEwin's website
https://www.ewintang.com/
Some settings supporting efficient state preparation\[\gdef\BB#1{\mathbb{#1}}
\gdef\eps\varepsilon
\gdef\ket#1{|#1\rangle}
\gdef\bra#1{\langle#1|}\]
<p>I wrote most of this list to procrastinate on the flight back from TQC (which was great!).
So, for my own reference: here’s some settings where efficient state preparation / data loading is possible, and classical versions of these protocols. Notes:</p>
<ul>
<li>There might be errors, especially in details of the quantum protocols, and some of the algorithms may be suboptimal (note the streaming setting, in particular). Let me know if you notice either of these.</li>
<li>Some relevant complexity research here is in <a href="https://arxiv.org/abs/1607.05256">QSampling</a> (Section 4).</li>
<li>All these runtimes should have an extra \(O(\log n)\) factor, since we assume that indices and entries take \(\log n\) bits/qubits to specify.
However, I’m going to follow the convention from classical computing and ignore these factors, hopefully with little resulting confusion.</li>
</ul>
<p>For all that follows, we are given \(v \in \mathbb{C}^n\) in some way and want to output</p>
<ol>
<li>for the quantum case, a copy of the state \(\ket{v} = \sum_{i=1}^n \frac{v_i}{\|v\|} \ket{i}\), and</li>
<li>for the classical case, the pair \((i,v_i)\) output with probability \(\frac{\vert v_i\vert^2}{\|v\|^2}\).</li>
</ol>
<p>You could think about this as strong quantum simulation of state preparation protocols.</p>
<table>
<thead>
<tr>
<th style="text-align: center">type</th>
<th style="text-align: center"><a href="#v-is-sparse">sparse</a></th>
<th style="text-align: center"><a href="#v-is-close-to-uniform">uniform</a></th>
<th style="text-align: center"><a href="#v-is-efficiently-integrable">integrable</a></th>
<th style="text-align: center"><a href="#v-is-stored-in-a-dynamic-data-structure">QRAM</a></th>
<th style="text-align: center"><a href="#v-is-streamed">streamed</a></th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center">quantum</td>
<td style="text-align: center">\(O(s)\)</td>
<td style="text-align: center">\(O(C\log\frac1\delta)\)</td>
<td style="text-align: center">\(O(I \log n)\)</td>
<td style="text-align: center">\(O(\log n)\) depth</td>
<td style="text-align: center">\(O(1)\) space with 2 passes</td>
</tr>
<tr>
<td style="text-align: center">classical</td>
<td style="text-align: center">\(O(s)\)</td>
<td style="text-align: center">\(O(C^2\log\frac1\delta)\)</td>
<td style="text-align: center">\(O(I\log n)\)</td>
<td style="text-align: center">\(O(\log n)\)</td>
<td style="text-align: center">\(O(1)\) space with 1 pass</td>
</tr>
</tbody>
</table>
<p>Recall that if we want to prepare an arbitrary quantum state, we need at least \(\Omega(\sqrt{n})\) time by search lower bounds, so for some settings of the above constants, these protocols are exponentially faster than the naive strategy.
Further recall that state preparation and sampling both have easy protocols running in \(O(n)\) time.</p>
<h2 id="v-is-sparse">\(v\) is sparse</h2>
<p>We assume that \(v\) has at most \(s\) nonzero entries and we can access a list of the nonzero entries \(((i_1,v_{i_1}),(i_2,v_{i_2}),\ldots,(i_s,v_{i_s}))\).
Thus, we have the oracle \(a \to (i_a, v_{i_a})\).</p>
<p>We can prepare the quantum state and classical sample by preparing the vector \(v' \in \BB{C}^s\) where \(v_a' = v_{i_a}\), and then using the oracle to swap out the index \(a\) with \(i_a\).
This gives \(O(s)\) classical and quantum time.</p>
<h2 id="v-is-close-to-uniform">\(v\) is close-to-uniform</h2>
<p>We assume that \(\max\vert v_i\vert \leq C\frac{\|v\|}{\sqrt{n}}\) and we know \(C, \|v\|\).
Notice that we don’t give a lower bound on the size of entries, but we can’t have too many small entries, since this would lower the norm.
Also notice that \(C \geq 1\).</p>
<p>Quantumly, given the typical oracle \(\ket{i}\ket{0} \to \ket{i}\ket{v_i}\) we can prepare the state</p>
\[\frac{1}{\sqrt{n}}\sum_{i=1}^n \ket{i}\Big(\frac{v_i\sqrt{n}}{\|v\|C}\ket{0} + \sqrt{1-\frac{\vert v_i\vert ^2n}{\|v\|^2C^2}}\ket{1}\Big).\]
<p>Measuring the ancilla and post-selecting on 0 gives \(\ket{v}\).
This happens with probability \(\frac{1}{C^2}\), and with amplitude amplification this means we can get a copy of the state with probability \(\geq 1-\delta\) in \(O(C\log\frac1\delta)\) time.</p>
<p>Classically, we perform rejection sampling from the uniform distribution: pick an index uniformly at random, and keep it with probability \(\frac{v_i^2n}{\|v\|^2C^2}\); otherwise, restart.
This outputs the correct distribution and gives a sample in \(O(C^2\log\frac1\delta)\) time.</p>
<h2 id="v-is-efficiently-integrable">\(v\) is efficiently integrable</h2>
<p>We assume that, given \(1 \leq a \leq b \leq n\), I can compute \(\sqrt{\sum_{i=a}^b |v_i|^2}\) in \(O(I)\) time.
This assumption and the resulting quantum preparation routine comes from <a href="https://arxiv.org/abs/quant-ph/0208112">Grover-Rudolph</a>.</p>
<p>The quantum algorithm uses one core subroutine: adding an extra qubit, sending \(\ket{v^{(k)}} \to \ket{v^{(k+1)}}\), where</p>
\[\ket{v^{(k)}} := \sum_{b \in \{0,1\}^k} \ket{b}\sqrt{\sum_{i=b\cdot 0^{n-k}}^{b\cdot 1^{n-k}} |v_i|^2}\]
<p>All that’s necessary is to apply it \(O(\log n)\) times and add the phase at the end.
I haven’t worked it out, but I think you can run the subroutine efficiently using three calls to the integration oracle, giving \(O(I\log n)\) time.</p>
<p>Classically, we can do essentially the same thing: the integration oracle means that we can compute marginal probabilities; that is,</p>
\[\Pr_{s \sim v}[s\text{'s bit representation starts with } b] = \sum_{i=b\cdot 0^{n-k}}^{b\cdot 1^{n-k}} |v_i|^2\]
<p>Thus, we can sample from the distribution on the first bit, then sample from the distribution on the second bit conditioned on our value of the first bit, and so on.
This also gives \(O(I\log n)\) time.</p>
<h2 id="v-is-stored-in-a-dynamic-data-structure">\(v\) is stored in a dynamic data structure</h2>
<p>We assume that our vector can be stored in a data structure that supports efficient updating of entries.
Namely, we use the standard binary search tree data structure (see, for example, <a href="https://www2.eecs.berkeley.edu/Pubs/TechRpts/2014/EECS-2014-211.pdf">Section 2.2.2 of Prakash’s thesis</a>).
This is a simple data structure with many nice properties, including \(O(\log n)\) time updates.
If you want to prepare many states corresponding to similar vectors, this is a good option.</p>
<p>There’s not much more to say, since the protocol is the same as the integrability protocol.
The only difference is that, instead of assuming that we can compute interval sums efficiently, we instead precompute and store all of the integration oracle calls we need for the state preparation procedure in a data structure.</p>
<p>The classical runtime is \(O(\log n)\), and the <a href="https://arxiv.org/abs/1812.00954">quantum circuit</a> takes \(O(n)\) gates but only \(O(\log n)\) depth.
The quantum algorithm is larger because here, we need to query a linear number of memory cells, as opposed to the integrabilility assumption, where we only needed to run the integration oracle in superposition.</p>
<p>While it may seem that the classical algorithm wins definitively here, the small depth leaves potential for this protocol to run in \(O(\log n)\) time in practice, matching the classical algorithm.</p>
<h2 id="v-is-streamed">\(v\) is streamed</h2>
<p>We assume that we can receive a stream of the entries of \(v\) in order; we wish to produce a state/sample using as little space as possible.</p>
<p>Classically, we can do this with <a href="https://en.wikipedia.org/wiki/Reservoir_sampling">reservoir sampling</a>.
The idea is that we maintain a sample \((s, v_s)\) from all of the entries we’ve seen before, along with their squared norm \(\lambda = \sum_{i=1}^k \vert v_i\vert^2\).
Then, when we receive a new entry \(v_{k+1}\), we swap our sample to \((k+1,v_{k+1})\) with probability \(\vert v_{k+1}\vert^2/(\lambda + \vert v_{k+1}\vert^2)\) and update our \(\lambda\) to \(\lambda + \vert v_{k+1}\vert^2\).
After we go through all of \(v\)’s entries, we get a sample only using \(O(1)\) space.
(This is a particularly nice algorithm for sampling from a vector, since it has good locality and can be generalized to get \(O(k)\) samples in \(O(k)\) space and one pass.)</p>
<p>Quantumly, I only know how to prepare a state in one pass with sublinear space if the norm is known.
If you know \(\|v\|\), then you can prepare \(\ket{n}\), and as entries come in, rotate to get \(\frac{v_1}{\|v\|}\ket{1} + \sqrt{1-\frac{|v_1|^2}{\|v\|^2}}\ket{n}\), then \(\frac{v_1}{\|v\|}\ket{1} + \frac{v_2}{\|v\|}\ket{2} + \sqrt{1-\frac{|v_1|^2+|v_2|^2}{\|v\|^2}}\ket{n}\), and so on.
This uses only \(O(\log n)\) qubits, which I notate here as \(O(1)\) space.</p>
<p>You can relax this assumption to just having an estimate \(\lambda\) of \(\|v\|\) such that \(\frac{1}{\text{poly}(n)} \leq \lambda/\|v\| \leq \text{poly}(n)\).
Finally, if you like, you can remove the assumption that you know the norm just by requiring two passes instead of one; in the first pass, compute the norm, and in the second pass, prepare the state.
But it’d be nice to remove the assumption entirely.</p>
<p>So, <strong>is it possible to prepare a quantum state corresponding to a generic \(v \in \BB{C}^n\), given only one pass through it?</strong> Thanks to <a href="https://www.chunhaowang.com/">Chunhao Wang</a> and <a href="https://www.cs.utexas.edu/~nai/">Nai-Hui Chia</a> for telling me about this problem.</p>
Thu, 13 Jun 2019 00:00:00 +0000
https://www.ewintang.com/blog/2019/06/13/some-settings-supporting-efficient-state-preparation/
https://www.ewintang.com/blog/2019/06/13/some-settings-supporting-efficient-state-preparation/An overview of quantum-inspired classical sampling\[\gdef\SC#1{\mathcal{#1}} %katex
\gdef\BB#1{\mathbb{#1}}
\gdef\eps\varepsilon
\gdef\SQ{\operatorname{SQ}}
\gdef\Q{\operatorname{Q}}
\gdef\Tr{\operatorname{Tr}}
\gdef\ket#1{\left|#1\right\rangle}
\gdef\bra#1{\left\langle#1\right|}
\gdef\poly{\operatorname{poly}}
\gdef\polylog{\operatorname{polylog}}
%\newcommand{\SC}[1]{\mathcal{#1}} %mathjax
%\newcommand{\BB}[1]{\mathbb{#1}}
%\newcommand{\eps}{\varepsilon}
%\newcommand{\SQ}{\operatorname{SQ}}
%\newcommand{\Q}{\operatorname{Q}}
%\newcommand{\Tr}{\operatorname{Tr}}
%\newcommand{\ket}[1]{\left|#1\right\rangle}
%\newcommand{\bra}[1]{\left\langle#1\right|}
%\newcommand{\poly}{\operatorname{poly}}
%\newcommand{\polylog}{\operatorname{polylog}}\]
<p><strong>Update [2020-08-26]:</strong> The way I present this topic in this blog post is not exactly how I present it now. See my <a href="https://www.youtube.com/watch?v=EsJEBJ2d1UY">STOC 2020 talk</a> for a more recent version. The differences are pretty minor: results are more general and there are fewer hidden caveats. If you’re up for a somewhat technical talk, check it out!</p>
<hr />
<p>This is an adaptation of a talk I gave at Microsoft Research in November 2018.</p>
<p>I exposit the \(\ell^2\) sampling techniques used in my recommendation systems work and its follow-ups in dequantized machine learning:</p>
<ul>
<li>Tang – <a href="https://arxiv.org/abs/1807.04271"><em>A quantum-inspired algorithm for recommendation systems</em></a></li>
<li>Tang – <a href="https://arxiv.org/abs/1811.00414"><em>Quantum-inspired classical algorithms for principal component analysis and supervised clustering</em></a>;</li>
<li>Gilyén, Lloyd, Tang – <a href="https://arxiv.org/abs/1811.04909"><em>Quantum-inspired low-rank stochastic regression with logarithmic dependence on the dimension</em></a>;</li>
<li>Chia, Lin, Wang – <a href="https://arxiv.org/abs/1811.04852"><em>Quantum-inspired sublinear classical algorithms for solving low-rank linear systems</em></a>.</li>
</ul>
<p>The core ideas used are super simple.
This goal of this blog post is to break down these ideas into intuition relevant for quantum researchers and create more understanding of this machine learning paradigm.</p>
<p>Notation is defined in the <a href="#glossary">Glossary</a>.</p>
<p>The intended audience is researchers comfortable with probability and linear algebra (SVD, in particular).
Basic quantum knowledge helps with intuition, but is not essential: everything from <a href="#the-model">The model</a> onward is purely classical.
The appendix is optional and explains the dequantized techniques in more detail.</p>
<h2 id="an-introduction-to-dequantization">An introduction to dequantization</h2>
<h3 id="motivation">Motivation</h3>
<p>The best, most sought-after quantum algorithms are those that take in raw, classical input and give some classical output.
For example, Shor’s algorithm for factoring takes this form.
These <em>classical-to-classical</em> algorithms (a term I invented for this post) have the best chance to be efficiently implemented in practice: all you need is a scalable quantum computer. (It’s just that easy!)</p>
<p>Nevertheless, many quantum algorithms aren’t so nice.
Most well-known QML algorithms convert input quantum states to a desired output state or value.
Thus, they do not provide a routine to get necessary copies of these input states (a <em>state preparation</em> routine) and a strategy to extract information from an output state.
Both are essential to making the algorithm useful.</p>
<p>An example of an algorithm that is not classical-to-classical is the <em>swap test</em>.
If we have many copies of the quantum states \(\ket{a},\ket{b} \in \BB{C}^n\), then the swap test \(\SC{S}\) estimates their inner product in time polylogarithmic in dimension.
While this routine seems much faster than naively computing \(\sum_{i=1}^n \bar{a}_ib_i\) classically, we can only run this algorithm if we know how to prepare the states \(\ket{a}\) and \(\ket{b}\).
It may well be the case that state preparation is too expensive for input vectors, making the quantum algorithm as slow as the classical algorithm.
This illustrates the format and failings of most QML algorithms.</p>
<p>You might then ask: can we fill in the missing routines in QML algorithms to get a classical-to-classical algorithm that’s provably fast and useful?
This is an open research problem: see Scott Aaronson’s piece on QML<sup id="fnref:aaronson15" role="doc-noteref"><a href="#fn:aaronson15" class="footnote" rel="footnote">1</a></sup>.
We have a variety of partial results towards the affirmative, but as far as I know, they don’t answer the question unless you’re loose with your definitions of at least one of “classical”, “provably fast”, or “useful”.
So let’s settle for a simpler question.</p>
<p><strong>How can we compare the speed of quantum algorithms with quantum input and quantum output to classical algorithms with classical input and classical output?</strong>
Quantum machine learning algorithms can be exponentially faster than the best standard classical algorithms for similar tasks, but this comparison is unfair because the quantum algorithms get outside help through input state preparation.
We want a classical model that helps its algorithms stand a chance against quantum algorithms, while still ensuring that they can be run in nearly all circumstances one would run the quantum algorithm.
The answer I propose: <strong>compare quantum algorithms with quantum state preparation to classical algorithms with <em>sample and query access</em> to input.</strong></p>
<h3 id="the-model">The model</h3>
<p>Before we proceed with definitions, we’ll establish some conventions.
First, we generally consider our input as being some vector in \(\BB{C}^n\) or \(\BB{R}^n\), subject to an access model to be described.
Second, we’ll only concern ourselves with an algorithm’s <em>query complexity</em>, the number of accesses to the input.
Our algorithms will have query complexity independent of input dimensions and polynomial in other parameters.
If we assume that each access costs (say) \(O(1)\) or \(O(\log n)\), the time complexity is still polylogarithmic in input dimension and at most polynomially worse in other parameters.</p>
<p>Now, we define query access to input; we can get query access simply by having the input in RAM.</p>
<p><strong>Definition.</strong>
We have <em>query access</em> to \(x \in \BB{C}^n\) (denoted \(\Q(x)\)) if, given \(i \in [n]\), we can efficiently compute \(x_i\).</p>
<p>If we have \(x\) stored normally as an array in our classical computer’s memory, we have \(\Q(x)\) because finding the \(i\)th entry of \(x\) can be done with the code <code class="language-plaintext highlighter-rouge">x[i]</code>.
This notion of access can represent more than just memory: we can also have \(\Q(x)\) if \(x\) is <em>implicitly</em> described.
For example, consider \(x\) the vector of squares: \(x_i = i^2\) for all \(i\).
We can have access to \(x\) without writing \(x\) in memory.
This will be important for the algorithms to come.</p>
<p><strong>Definition.</strong>
We have <em>sample and query access</em> to \(x \in \BB{C}^n\) (denoted \(\SQ(x)\)) if we have query access to \(x\); can produce independent random samples \(i \in [n]\) where we sample \(i\) with probability \(|x_i|^2/\|x\|^2\); and can query for \(\|x\|\).</p>
<p>Sampling and query access to \(x\) will be our classical analogue to assuming quantum state preparation of copies of \(\ket{x}\).
This should make some intuitive sense: our classical analogue \(\SQ(x)\) has the standard assumption of query access to input, along with samples, which are essentially measurements of \(\ket{x}\) in the computational basis.
Knowledge of \(\|x\|\) is for normalization issues, and is often assumed for quantum algorithms as well (though for both classical and quantum algorithms, often approximate knowledge suffices).</p>
<p><strong>Example.</strong>
Like query access, we can get efficient sample and query access from an explicit memory structure.
To get \(\SQ(x)\) for a bit vector \(x \in \{0,1\}^n\), store the number of nonzero entries \(z\) and a sorted array of the 1-indices \(D\).
For example, we could store \(x = [1\;1\;0\;0\;1\;0\;0\;0]\) as</p>
\[z, D = 3,\{1,2,5\}\]
<p>Then we can find \(x_i\) by checking if \(i \in D\), we can sample from \(x\) by picking an index from \(D\) uniformly at random, and we know \(\|x\|\), since it’s just \(\sqrt{z}\).
This generalizes to an efficient \(O(\log n)\) binary search tree data structure for \(\SQ(x)\) for any \(x \in \BB{C}^n\).</p>
<p>We can also define sample and query access to matrices as just sample and query access to vectors “in” the matrix.</p>
<p><strong>Definition.</strong>
For \(A \in \BB{C}^{m\times n}\), \(\SQ(A)\) is defined as \(\SQ(A_i)\) for \(A_i\) the rows of \(A\), along with \(\SQ(\tilde{A})\) for \(\tilde{A}\) the vector of row norms (so \(\tilde{A}_i = \|A_i\|\)).</p>
<p>By replacing quantum states with these classical analogues, we form a model based on sample and query access which we codify with the informal definition of “dequantization”.</p>
<p><strong>Definition.</strong>
Let \(\SC{A}\) be a quantum algorithm with input \(\ket{\phi_1},\ldots,\ket{\phi_C}\) and output either a state \(\ket{\psi}\) or a value \(\lambda\).
We say we <em>dequantize</em> \(\SC{A}\) if we describe a classical algorithm that, given \(\SQ(\phi_1),\ldots,\SQ(\phi_C)\), can evaluate queries to \(\SQ(\psi)\) or output \(\lambda\), with similar guarantees to \(\SC{A}\) and query complexity \(\poly(C)\).</p>
<p>That is, given sample and query access to the inputs, we can output sample and query access to a desired vector or a desired value, with at most polynomially larger query complexity.</p>
<p>We justify why this model is a reasonable point of comparison two sections from now, in <a href="#implications">Implications</a>.
Next, though, we will jump into how to build these dequantized protocols.</p>
<h2 id="quantum-for-the-quantum-less">Quantum for the quantum-less</h2>
<p>So far, all dequantized results revolve around three dequantized protocols that we piece together into more useful tasks.
In query complexity independent of \(m\) and \(n\), we can perform the following:</p>
<ol>
<li>
<p>(<a href="#1-estimating-inner-products">Inner Product</a>)
For \(x,y \in \BB{C}^n\), given \(\SQ(x)\) and \(\Q(y)\), we can estimate \(\langle x,y\rangle\) to \(\|x\|\|y\|\eps\) error with probability \(\geq 1-\delta\) and \(\text{poly}(\frac1\eps, \log\frac1\delta)\) queries;</p>
</li>
<li>
<p>(<a href="#2-thin-matrix-vector-product-with-rejection-sampling">Thin Matrix-Vector</a>)
For \(V \in \BB{C}^{n\times k}, w \in \BB{C}^k\), given \(\SQ(V^\dagger)\) and \(\Q(w)\), we can simulate \(\SQ(Vw)\) with \(\text{poly}(k)\) queries;</p>
</li>
<li>
<p>(<a href="#3-low-rank-approximation-briefly">Low-rank Approximation</a>)
For \(A \in \BB{C}^{m\times n}\), given \(\SQ(A)\), a threshold \(k\), and an error parameter \(\eps\), we can output a description of a low-rank approximation of \(A\) with \(\text{poly}(k, \frac{1}{\eps})\) queries.</p>
<p>Specifically, our output is \(\SQ(S,\hat{U},\hat{\Sigma})\) for \(S \in \BB{C}^{\ell \times n}\), \(\hat{U} \in \BB{C}^{\ell \times k}\), and \(\hat{\Sigma} \in \BB{C}^{k\times k}\) (\(\ell = \poly(k,\frac{1}{\eps})\)), and this implicitly describes the low-rank approximation to \(A\), \(D := A(S^\dagger\hat{U}\hat{\Sigma}^{-1})(S^\dagger\hat{U}\hat{\Sigma}^{-1})^\dagger\) (notice rank \(D \leq k\)).</p>
<p>This matrix satisfies the following low-rank guarantee with probability \(\geq 1-\delta\): for \(\sigma := \sqrt{2/k}\|A\|_F\), and \(A_{\sigma} := \sum_{\sigma_i \geq \sigma} \sigma_iu_iv_i^\dagger\) (using \(A\)’s SVD),</p>
\[\|A - D\|_F^2 \leq \|A - A_\sigma\|_F^2 + \eps^2\|A\|_F^2.\]
<p>This guarantee is non-standard: instead of \(A_k\), we use \(A_\sigma\).
This makes our promise weaker, since it is useless if \(A\) has no large singular values.</p>
<p>For intuition, it’s helpful to think of \(D\) as \(A\) multiplied with a “projector” \((S^\dagger\hat{U}\hat{\Sigma}^{-1})(S^\dagger\hat{U}\hat{\Sigma}^{-1})^\dagger\) that projects the rows of \(A\) onto the columns of \(S^\dagger\hat{U}\hat{\Sigma}^{-1}\), where these columns are “singular vectors” with corresponding “singular values” \(\hat{\sigma}_1,\ldots,\hat{\sigma}_k\) that are encoded in the diagonal matrix \(\hat{\Sigma}\).
(For those interested, \(\hat{U}\) and \(\hat{\Sigma}\) are from the SVD of a <em>submatrix</em> of \(A\), hence the evocative notation; see the <a href="#3-low-rank-approximation-briefly">appendix</a> for more details.)</p>
</li>
</ol>
<p>The first two protocols are dequantized swap tests and the third is essentially a dequantized variant of phase estimation seen in quantum recommendation systems<sup id="fnref:kp17" role="doc-noteref"><a href="#fn:kp17" class="footnote" rel="footnote">2</a></sup>.</p>
<hr />
<p>Now, we describe how these techniques are used to get the results for recommendation systems, supervised clustering, and low-rank matrix inversion.
We defer the important details of models and error analyses to <a href="#implications">Implications</a>, instead focusing on the algorithms themselves and how they use dequantized protocols.</p>
<h3 id="supervised-clustering">Supervised clustering</h3>
<p>We want to find the distance from a point \(p \in \BB{R}^n\) to the centroid (average) of a cluster of points \(q_1,\ldots,q_{m-1} \in \BB{R}^{n}\).
If we assume sample and query access to the data points, computing \(\|p - \frac{1}{m-1}(q_1 + \cdots + q_{m-1})\|\) reduces to computing \(\|Mw\|\) for</p>
\[M = \begin{bmatrix}
\frac{p}{\|p\|} & \frac{q_1}{\|q_1\|} & \cdots & \frac{q_{m-1}}{\|q_{m-1}\|}
\end{bmatrix}
\qquad
w = \begin{bmatrix} \|p\| \\ -\frac{\|q_1\|}{m-1} \\ \vdots \\ -\frac{\|q_{m-1}\|}{m-1} \end{bmatrix}.\]
<p>\(\SQ\) access to \(p,q_1,\ldots,q_{m-1}\) gives \(\SQ\) access to \(M^T\) and \(w\) so the supervised clustering problem reduces to the following:</p>
<p><strong>Problem.</strong>
For \(M \in \BB{R}^{m\times n}, w \in \BB{R}^n\), and \(\SQ(M^T,w)\), approximate \((Mw)^T(Mw)\) to additive \(\eps\) error.</p>
<p><strong>Algorithm.</strong>
We can write \((Mw)^TMw\) as the inner product of an order three tensor; through basic tensor arithmetic, it is equal to \(\langle u, v\rangle\), where \(u,v \in \BB{R}^{m\times n\times n}\) are</p>
\[\begin{aligned} u &= \sum_{i=1}^m\sum_{j=1}^n\sum_{k=1}^n M_{ij}\|M^{(k)}\| e_{i,j,k} \text{ and} \\
v &= \sum_{i=1}^m\sum_{j=1}^n\sum_{k=1}^n \frac{w_jw_kM_{ik}}{\|M^{(k)}\|} e_{i,j,k}. \end{aligned}\]
<p>Applying the algorithm for inner product (1) gives the desired approximation with \(O(\|w\|^2\|M\|_F^2\frac{1}{\eps^2} \log\frac{1}{\delta})\) samples and queries.</p>
<h3 id="recommendation-systems">Recommendation systems</h3>
<p>We want to randomly sample a product \(j \in [n]\) that is a good recommendation for a particular user \(i \in [m]\), given incomplete data on user-product preferences.
If we store this data in a matrix \(A \in \BB{R}^{m\times n}\) with sampling and query access, in the right model, finding good recommendations reduces to:</p>
<p><strong>Problem.</strong>
For a matrix \(A \in \BB{R}^{m\times n}\) along with a row \(i \in [m]\), given \(\SQ(A)\), approximately sample from \(D_i\) where \(D\) is a sufficiently good low-rank approximation of \(A\).</p>
<p><em>Remark.</em> This task is essentially a variant of PCA, since a low-rank decomposition is dimensionality reduction of the matrix, viewed as a set of row vectors.
This is the “dequantized PCA” I refer to in other work<sup id="fnref:tang18b" role="doc-noteref"><a href="#fn:tang18b" class="footnote" rel="footnote">3</a></sup>.</p>
<p><strong>Algorithm.</strong>
<!-- TODO fix the USigma stuff -->
Apply (3) to get \(\SQ(S,\hat{U},\hat{\Sigma})\) for a low-rank approximation \(D = AS^T \hat{U}\hat{\Sigma}^{-1}(\hat{\Sigma}^{-1})^T\hat{U}^T S\).
It turns out that this low-rank approximation is good enough to get good recommendations.
So it suffices to sample from \(D_i = A_iS^TMS\), where \(A_i \in \BB{R}^{1 \times n}, S \in \BB{R}^{\ell \times n}, M = \hat{U}\hat{\Sigma}^{-1}(\hat{\Sigma}^{-1})^T\hat{U}^T \in \BB{R}^{\ell \times \ell}\) with \(\ell = \poly(k)\).</p>
\[\begin{bmatrix}
\; \cdots & A_i & \cdots \;
\end{bmatrix} \begin{bmatrix}
& \vdots & \\ & S^T & \\ & \vdots &
\end{bmatrix} \begin{bmatrix}
& & \\ & M & \\ & &
\end{bmatrix} \begin{bmatrix}
& & \\ \; \cdots & S & \cdots \; \\ & &
\end{bmatrix}\]
<p>Approximate \(A_iS^T\) to \(\ell^2\) norm using \(k\) inner product protocols (1).
Next, compute \(A_iS^TM\) with naive matrix-vector multiplication.
Finally, sample from \(A_iS^T\hat{U}\hat{U}^TS\), which is a thin matrix-vector product (2).</p>
<p><em>An aside.</em>
This gives an exponential speedup over previous classical results from 15-20 years ago<sup id="fnref:dkr02" role="doc-noteref"><a href="#fn:dkr02" class="footnote" rel="footnote">4</a></sup>.
The story here is quite odd.
From what I can tell, researchers at the time knew the important (read: hard) part of the algorithm, how to compute low-rank approximations fast, but didn’t notice that the resulting knowledge of \(S\) and \(\hat{U}\) could be used to sample the desired recommendations in sublinear time, which I think is much easier to understand.
This gave me anxiety during research, since I figured there was no way this would have been overlooked.
I’m glad these fears were unfounded; it’s cool that this quantum perspective made this step natural and obvious!</p>
<h3 id="low-rank-matrix-inversion">Low-rank matrix inversion</h3>
<p>The goal here is to mimic a quantum algorithm that can solve systems of equations \(Ax = b\) for \(A\) low-rank.
The dequantized version of this is:</p>
<p><strong>Problem.</strong>
For a low-rank matrix \(A \in \BB{R}^{m\times n}\) and a vector \(b \in \BB{R}^n\), given \(\SQ(A), \SQ(b)\), (approximately) respond to requests for \(\SQ(A^+b)\), where \(A^+\) is the pseudoinverse of \(A\).</p>
<p><strong>Algorithm.</strong>
Use the low-rank approximation protocol (3) to get \(\SQ(S,\hat{U}, \hat{\Sigma})\).
From applying the matrix-vector protocol (2), we have \(\SQ(\hat{V})\), where \(\hat{V} := S^T\hat{U}\hat{\Sigma}^{-1}\); with some analysis we can show that the columns of \(\hat{V}\) behave like the right singular vectors of \(A\).
Further, \(\hat{\Sigma}_{ii}\) behaves like their approximate singular values.
Using this information, we can approximate the vector we want to sample from:</p>
\[A^+b= (A^TA)^+A^Tb \approx \sum_{i=1}^k \frac{1}{\hat{\Sigma}_{ii}^2}\hat{v}_i\hat{v}_i^T A^Tb\]
<p>We approximate \(\hat{v}_i^TA^Tb\) to additive error for all \(i\) by noticing that \(\hat{v}_i^TA^Tb = \Tr(A^Tb\hat{v}_i^T)\) is an inner product of the order two tensors \(A^T\) and \(b\hat{v}_i^T\).
Thus, we can apply (1), since being given \(\SQ(A)\) implies \(\SQ(A^T)\) for \(A^T\) viewed as a long vector.
Finally, using (2), sample from the linear combination using these estimates and \(\hat{\sigma}_i\).</p>
<h2 id="implications">Implications</h2>
<p>We have just described examples of dequantized algorithms for the following problems:</p>
<ul>
<li>Recommendation systems<sup id="fnref:tang18a" role="doc-noteref"><a href="#fn:tang18a" class="footnote" rel="footnote">5</a></sup><sup id="fnref:kp17:1" role="doc-noteref"><a href="#fn:kp17" class="footnote" rel="footnote">2</a></sup> (this classical algorithm <em>exponentially improves</em> on the previous best!)</li>
<li>PCA<sup id="fnref:tang18b:1" role="doc-noteref"><a href="#fn:tang18b" class="footnote" rel="footnote">3</a></sup><sup id="fnref:lmr14" role="doc-noteref"><a href="#fn:lmr14" class="footnote" rel="footnote">6</a></sup></li>
<li>Supervised clustering<sup id="fnref:tang18b:2" role="doc-noteref"><a href="#fn:tang18b" class="footnote" rel="footnote">3</a></sup><sup id="fnref:lmr13" role="doc-noteref"><a href="#fn:lmr13" class="footnote" rel="footnote">7</a></sup></li>
<li>Low-rank matrix inversion<sup id="fnref:rsml16" role="doc-noteref"><a href="#fn:rsml16" class="footnote" rel="footnote">8</a></sup><sup id="fnref:glt18" role="doc-noteref"><a href="#fn:glt18" class="footnote" rel="footnote">9</a></sup><sup id="fnref:clw18" role="doc-noteref"><a href="#fn:clw18" class="footnote" rel="footnote">10</a></sup></li>
</ul>
<p>We address here what to take away from these results.</p>
<h3 id="for-quantum-computing">For quantum computing</h3>
<p>The most important conclusion, in my opinion, is a heuristic:</p>
<p><strong>Heuristic 1.</strong>
Linear algebra problems in low-dimensional spaces (constant, say, or polylogarithmic) likely can be dequantized.</p>
<p>The intuition for this heuristic is that, if your problem operates in a subspace of such low dimension, the main challenge is “finding” this subspace and rotating to it.
Then, we can think about our problem as lying in \(\BB{C}^d\) where \(d\) is small, and can solve it with a simple polynomial-time (in \(d\)) algorithm.
Finding the subspace is an unordered search problem if you squint, so can’t be sped up much by exploiting quantum.</p>
<p><em>Remark.</em> There are high-dimensional problems that cannot be dequantized; for example, given \(\SQ(v)\), it takes \(\Omega(n)\) queries to approximately sample from \(Hv\), where \(H\) is the Hadamard matrix (this is the Fourier Sampling problem<sup id="fnref:ac16" role="doc-noteref"><a href="#fn:ac16" class="footnote" rel="footnote">11</a></sup>).</p>
<p>Why do we care about dequantizing algorithms?
As the name suggests, I argue that this is a reasonable classical analogue to quantum machine learning algorithms.</p>
<p><strong>Heuristic 2.</strong>
For machine learning problems, SQ assumptions are more reasonable than state preparation assumptions.</p>
<p>That is, the practical task of preparing quantum states is probably always harder than the practical task of preparing sample and query access.
Practically, this makes sense, since for state preparation we need, well, quantum computers.</p>
<blockquote><p>
Quantum computing applications that are realizable with zero qubits!
</p><footer>– Scott Aaronson's "elevator pitch" of my work, paraphrased</footer>
</blockquote>
<p>Even assuming the existence of a practical quantum computer, there is evidence that state preparation assumptions are still harder to satisfy than sample and query access, up to polynomial slowdown.
For example, preparing a generic quantum state \(\ket{v}\) corresponding to an input vector \(v\) takes \(\Omega(\sqrt{n})\) quantum queries to \(v\) in general, while responding to \(\SQ(v)\) accesses takes \(\Theta(n)\) classical queries.
Because dequantized algorithms are polynomial in \(\log n\), this means that getting SQ access to a generic vector is much more expensive than running the algorithm.</p>
<p>Of course, we can also consider special classes of vectors where quantum state preparation is easier, but generally SQ access gets proportionally faster as well.
For example, we can quickly prepare vectors where all entries have roughly equal magnitude (think vectors whose entries are either \(+1\) or \(-1\)), but correspondingly, we can compute SQ accesses to such vectors similarly quickly.</p>
<p>On the classical side, the assumption of SQ access is on par with other typical assumptions to make machine learning algorithms sublinear:</p>
<ul>
<li>There is a classical dynamic data structure that supports SQ access, fast updates, and sparsity in log time.</li>
<li>Given an input vector as a list of nonzero entries, sampling from it takes time linear in sparsity.</li>
<li>\(k\) independent samples can be prepared with one pass through the data in \(O(k)\) space.</li>
</ul>
<hr />
<p>To summarize these heuristics: quantum machine learning for <em>low-dimensional datasets</em> will probably never get speedups as significant as, say, Shor’s algorithm, even in best-case scenarios.
Unfortunately, QML for low-dimensional problems were the most practical algorithms in the literature, so with this research it’s unclear what the state of the field is today.</p>
<p>The story might not be over, though.
We know that quantum computers can “efficiently solve” high-dimensional linear algebra problems<sup id="fnref:hhl08" role="doc-noteref"><a href="#fn:hhl08" class="footnote" rel="footnote">12</a></sup>; however, this assumes that we have some way to evolve a quantum system precisely according to input data, a much harder problem than the linear algebra itself.
Nevertheless, I hold out hope that this result can be applied to achieve exponential speedups in machine learning or elsewhere.</p>
<h3 id="for-classical-computing">For classical computing</h3>
<p>I am cautiously optimistic about the implications of this work for classical computing.
The major advantage of dequantized algorithms is sheer speed (asymptotically, at least).
However, the issues listed below prevent dequantized algorithms from being strict improvements over current algorithms.</p>
<ul>
<li>Gaining SQ access to input typically requires preliminary data processing or the use of a data structure.
This means that dequantized algorithms can’t be plugged into existing systems without large amounts of computation.</li>
<li>SQ access to output might not always be useful or practical.</li>
<li>Current dequantized algorithms have large error compared to standard techniques.</li>
<li>Current algorithms have large theoretical exponents, so right now we don’t know whether they run quickly in practice.
I expect we can cut down these exponents greatly.</li>
</ul>
<p>If I had to guess, the best chance for success in dequantized techniques remains recommendation systems, since speed matters significantly in that context.
I view the other algorithms as significantly less likely to see use in practice, though probably more likely than their corresponding quantum algorithms.</p>
<p>Regardless, these works fit nicely into the classical literature: dequantized quantum machine learning is just a nicely modular, quantum-inspired form of randomized numerical linear algebra.</p>
<h2 id="appendix-more-details">Appendix: More details</h2>
<p>As a reminder, here are the three techniques:</p>
<ol>
<li>Inner Product</li>
<li>Thin Matrix-Vector</li>
<li>Low-rank Approximation</li>
</ol>
<p>Below, we explain (1) and (2) fully, and give a rough sketch of (3).</p>
<h3 id="1-estimating-inner-products">1. Estimating inner products</h3>
<p>First, we give a basic way of estimating the mean of an arbitrary distribution with finite variance.</p>
<p><strong>Fact.</strong>
For \(\{X_{i,j}\}\) i.i.d random variables with mean \(\mu\) and variance \(\sigma^2\), let</p>
\[Y := \underset{j \in [6\log 1/\delta]}{\operatorname{median}}\;\underset{i \in [6/\eps^2]}{\operatorname{mean}}\;X_{i,j}\]
<p>Then \(\vert Y - \mu\vert \leq \eps\sigma\) with probability \(\geq 1-\delta\), using only \(O(\frac{1}{\eps^2}\log\frac{1}{\delta})\) copies of \(X\).</p>
<p><em>Proof sketch.</em>
The proof follows from two facts: first, the median of \(C_1,\ldots,C_n\) is at least \(\lambda\) precisely when at least half of the \(C_i\) are at least \(\lambda\); second, <a href="https://en.wikipedia.org/wiki/Chebyshev%27s_inequality#Probabilistic_statement">Chebyshev’s inequality</a> (applied to the mean).</p>
<p>Estimating the inner product is just a basic corollary of this estimator.</p>
<p><strong>Proposition.</strong>
For \(x,y \in \BB{C}^n\), given \(\SQ(x)\) and \(\Q(y)\), we can estimate \(\langle x,y\rangle\) to \(\eps\|x\|\|y\|\) error with probability \(\geq 1-\delta\) with query complexity \(O(\frac{1}{\eps^2}\log\frac{1}{\delta})\).</p>
<p><em>Proof.</em>
Sample \(s\) from \(v\) and let \(Z = x_sv_s\frac{\|v\|^2}{|v_s|^2}\).
Apply the Fact with \(X_{i,j}\) being independent copies of \(Z\).</p>
<h3 id="2-thin-matrix-vector-product-with-rejection-sampling">2. Thin matrix-vector product with rejection sampling</h3>
<p>We first go over rejection sampling, a naive way to efficiently generate samples from a specified distribution from samples from another distribution.</p>
<p>Input: samples from distribution \(P\)<br />
Output: samples from distribution \(Q\)</p>
<ol>
<li>Pull a sample \(s\) from \(P\);</li>
<li>Compute \(r_s = \frac{Q(s)}{MP(s)}\) for some constant \(M\);</li>
<li>Output \(s\) with probability \(r_s\) and restart otherwise.</li>
</ol>
<p><strong>Fact.</strong>
If \(r_i \leq 1\) for all \(i\), then the above procedure is well-defined and outputs a sample from \(Q\) in \(M\) iterations in expectation.</p>
<hr />
<p><strong>Proposition.</strong>
For \(V \in \BB{R}^{n\times k}\) and \(w \in \BB{R}^k\), given \(\SQ(V)\) and \(\Q(w)\), we can simulate \(\SQ(Vw)\) with expected query complexity \(O(k^2C(V,w))\), where</p>
\[C(V,w) := \frac{\sum_{i=1}^k\|w_iV^{(i)}\|^2}{\|Vw\|^2}.\]
<p>We can compute entries \((Vw)_i\) with \(O(k)\) queries.<br />
We can sample using rejection sampling:</p>
<ul>
<li>\(P\) is the distribution formed by sampling from \(V^{(j)}\) with probability proportional to \(\|w_jV^{(j)}\|^2\);</li>
<li>\(Q\) is the target \(Vw\).</li>
</ul>
\[r_i = \frac{(Vw)_i^2}{k \sum_{j=1}^k (w_jV_{ij})^2} = \frac{Q(i)}{kC(V,w)P(i)}\]
<p>Notice that we can compute these \(r_i\)’s (in fact, despite that we cannot compute probabilities from the target distribution), and that the rejection sampling guarantee is satisfied (via Cauchy-Schwarz).</p>
<p>The probability of success is \(\frac{\|Vw\|^2}{k\sum_{i=1}^k\|w_iV^{(i)}\|^2}\).
Thus, to estimate the norm of \(Vw\), it suffices to estimate the probability of success of this rejection sampling process.
We can view this as estimating the heads probability of a biased coin, where the coin is heads if rejection sampling succeeds and tails otherwise.
Through a <a href="https://en.wikipedia.org/wiki/Chernoff_bound#Multiplicative_form_(relative_error)">Chernoff bound</a>, we see that the average of \(O(kC(V,w)\frac{1}{\eps^2}\log\frac{1}{\delta})\) “coin flips” is in \([(1-\eps)\|Vw\|,(1+\eps)\|Vw\|]\) with probability \(\geq 1-\delta\), where each coin flip costs \(k\) queries and samples.</p>
<h3 id="3-low-rank-approximation-briefly">3. Low-rank approximation, briefly</h3>
<p><strong>Proposition.</strong>
For \(A \in \BB{C}^{m\times n}\), given \(\SQ(A)\) and some threshold \(k\), we can output a description of a low-rank approximation of \(A\).</p>
<p>Specifically, our output is \(\SQ(S,\hat{U}, \hat{\Sigma})\) for \(S \in \BB{C}^{\ell \times n}\), \(\hat{U} \in \BB{C}^{\ell \times k}\), \(\hat{\Sigma} \in \BB{C}^{k\times k}\) (\(\ell = \poly(k,\frac{1}{\eps})\)), and this implicitly describes the low-rank approximation to \(A\), \(D := A(S^\dagger\hat{U}\hat{\Sigma}^{-1})(S^\dagger\hat{U}\hat{\Sigma}^{-1})^\dagger\) (notice rank \(D \leq k\)).</p>
<p>This matrix satisfies the following low-rank guarantee with probability \(\geq1-\delta\): for \(\sigma := \sqrt{2/k}\|A\|_F\), and \(A_{\sigma} := \sum_{\sigma_i \geq \sigma} \sigma_iu_iv_i^\dagger\) (using SVD),</p>
\[\|A - D\|_F^2 \leq \|A - A_\sigma\|_F^2 + \eps^2\|A\|_F^2.\]
<p>This algorithm comes from the 1998 paper of Frieze, Kannan, and Vempala<sup id="fnref:fkv04" role="doc-noteref"><a href="#fn:fkv04" class="footnote" rel="footnote">13</a></sup>.
See the recent survey<sup id="fnref:kv17" role="doc-noteref"><a href="#fn:kv17" class="footnote" rel="footnote">14</a></sup> by Kannan and Vempala for a survey of these techniques, and see Woodruff’s textbook<sup id="fnref:woodruff14" role="doc-noteref"><a href="#fn:woodruff14" class="footnote" rel="footnote">15</a></sup> for a discussion of more general techniques.
The form I state above is a simple variant that I discuss in my recommendation systems paper<sup id="fnref:tang18a:1" role="doc-noteref"><a href="#fn:tang18a" class="footnote" rel="footnote">5</a></sup>.</p>
<p>The core piece of analysis is the following theorem (sometimes called the <em>Approximate Matrix Product</em> property in the literature).</p>
<p><strong>Theorem.</strong>
Let \(S^TS = \sum_{j=1}^\ell S_jS_j^T\), where \(S_j\) is \(\frac{A_i\|A\|_F^2}{\|A_i\|}\) with probability \(\frac{\|A_i\|^2}{\|A\|_F^2}\) (so \(i\) is sampled from \(\tilde{A}\)). For sufficiently small \(\eps\) and \(\ell = \Omega(\frac{1}{\eps^2}\log\frac1\delta)\), with probability \(\geq 1-\delta\),</p>
\[\|S^TS - A^TA\|_F \leq \eps\|A\|_F^2.\]
<p>This looks like a further higher-order (two order two tensor inner product) generalization of inner product (two order one tensor inner product) and thin matrix-vector (order two and order one tensor inner product); it’s possible that a clever rephrasing of this result in the \(SQ\) model could make the low-rank approximation result more quantum-ic.</p>
<p>We now sketch the algorithm along with intuition: it’s most useful to consider the low-rank approximation task as one of finding large approximate singular vectors.
First, sample \(\ell\) rows of \(A\) according to \(\ell^2\) norm, and consider the matrix \(S \in \BB{C}^{\ell \times n}\) of these rows, all renormalized to have the same length.
This is the \(S\) that we output.
By the above theorem, \(\|S^TS - A^TA\|_F \leq \eps\|A\|_F^2\) with good probability, which implies that the large right singular vectors of \(S\) (eigenvectors of \(S^TS\)) approximate the large right singular vectors of \(A\) (eigenvectors of \(A^TA\)).</p>
<p>Next, we can perform the same process to \(S^T\): sample rows of \(S^T\) and get a normalized submatrix \(W \in \BB{R}^{\ell \times \ell}\) such that \(\|WW^T-SS^T\|_F \leq \eps\|A\|_F^2\).
Since \(W\) is a constant-sized matrix, we can compute \(\hat{U}\) and \(\hat{\Sigma}\), the large left singular vectors and values of \(W\), which approximate the large left singular vectors and values of \(S\).
Then, \(S^T\hat{U}\hat{\Sigma}^{-1}\) translates these large left singular vectors to their corresponding right singular vectors and rescales them accordingly, giving the approximate singular vectors of \(A\) as desired.</p>
<h2 id="glossary">Glossary</h2>
<p>For natural numbers \(m, n\), vector \(v \in \BB{C}^n\) and \(A \in \BB{C}^{m\times n}\):</p>
<p>\([n]\) denotes \(\{1,2,\ldots,n\}\);
\(O(\cdot)\) and \(\Omega(\cdot)\) is <a href="https://en.wikipedia.org/wiki/Big_O_notation">big O notation</a>;
\(A_i\) and \(A^{(j)}\) denotes the \(i\)th row of \(A\) and the \(j\)th column of \(A\);
\(\|v\|\) denotes the \(\ell^2\) norm of \(v\), \(\sqrt{\|v_1\|^2 + \cdots + \|v_n\|^2}\);</p>
<p>\(\ket{\psi}\) is <a href="https://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation">bra-ket notation</a>: kets are column vectors \(\ket{\psi} \in \BB{C}^{n \times 1}\), bras are row vectors \(\bra{\psi} := (\ket{\psi})^\dagger\), standard basis vectors are denoted \(\ket{1},\ldots,\ket{n}\), and the tensor product of \(\ket{\alpha}\) and \(\ket{\beta}\) is denoted \(\ket{\alpha}\ket{\beta}\).
Of course, these are all really quantum states, but that’s only relevant for quantum algorithms: for my purposes, I use \(\ket{\phi}\) and \(\phi\) interchangeably to refer to vectors.
(I ignore normalization, but those issues can be dealt with.)</p>
<p>The <a href="https://en.wikipedia.org/wiki/Singular_value_decomposition">singular value decomposition</a> (SVD) of \(A \in \BB{C}^{m\times n}\) is a decomposition \(A = U\Sigma V^\dagger\), where \(U \in \BB{C}^{m\times m}\) and \(V \in \BB{C}^{n\times n}\) are unitary and \(\Sigma \in \BB{R}^{m\times n}\) is diagonal.
In other words, for \(u_i\) and \(v_i\) the columns of \(U\) and \(V\), respectively, and \(\sigma_i\) the diagonal entries of \(\Sigma\), \(A = \sum \sigma_iu_iv_i^\dagger\).
By convention, \(\sigma_1 \geq \ldots \geq \sigma_{\min m,n} \geq 0\).</p>
<p>Using \(A\)’s SVD, we can define basic linear algebraic objects.
\(\|A\|_2 = \max_{v \in \BB{C}^n} \|Av\|/\|v\| = \sigma_1\) is the spectral norm of \(A\).
\(\|A\|_F = \sqrt{\sum_{i=1}^m\sum_{j=1}^n |A_{ij}|^2} = \sqrt{\sigma_1^2 + \cdots + \sigma_{\min m,n}^2}\) is the Frobenius norm of \(A\).
\(A_k = \sum_{i=1}^k \sigma_iu_iv_i^\dagger\) is an optimal rank \(k\) approximation to \(A\) in both spectral and Frobenius norm.
\(A^+ = \sum_{\sigma_i > 0} \frac{1}{\sigma_i}v_iu_i^\dagger\) is \(A\)’s <a href="https://en.wikipedia.org/wiki/Moore%E2%80%93Penrose_inverse">pseudoinverse</a>.</p>
<p>I define \(\SQ(v)\), \(\SQ(A)\), and \(\Q(v)\) in <a href="#an-introduction-to-dequantization">An introduction to dequantization</a>.</p>
<h2 id="references">References</h2>
<div class="footnotes" role="doc-endnotes">
<ol>
<li id="fn:aaronson15" role="doc-endnote">
<p>Scott Aaronson. <em>Read the fine print</em>. Nature Physics 11.4, 2015. <a href="https://www.scottaaronson.com/papers/qml.pdf">Link</a> <a href="#fnref:aaronson15" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:kp17" role="doc-endnote">
<p>Iordanis Kerenidis, Anupam Prakash. <em>Quantum recommendation systems</em>. <a href="https://arxiv.org/abs/1603.08675">arXiv:1603.08675</a>. <a href="#fnref:kp17" class="reversefootnote" role="doc-backlink">↩</a> <a href="#fnref:kp17:1" class="reversefootnote" role="doc-backlink">↩<sup>2</sup></a></p>
</li>
<li id="fn:tang18b" role="doc-endnote">
<p>Ewin Tang. <em>Quantum-inspired classical algorithms for principal component analysis and supervised clustering</em>. <a href="https://arxiv.org/abs/1811.00414">arXiv:1811.00414</a>, 2018. <a href="#fnref:tang18b" class="reversefootnote" role="doc-backlink">↩</a> <a href="#fnref:tang18b:1" class="reversefootnote" role="doc-backlink">↩<sup>2</sup></a> <a href="#fnref:tang18b:2" class="reversefootnote" role="doc-backlink">↩<sup>3</sup></a></p>
</li>
<li id="fn:dkr02" role="doc-endnote">
<p>Petros Drineas, Iordanis Kerenidis, Prabhakar Raghavan. <em>Competitive recommendation systems</em>. STOC, 2002. <a href="https://www.irif.fr/~jkeren/jkeren/CV_Pubs_files/DKR02.pdf">Link</a>. <a href="#fnref:dkr02" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:tang18a" role="doc-endnote">
<p>Ewin Tang. <em>A quantum-inspired algorithm for recommendation systems</em>. <a href="https://arxiv.org/abs/1807.04271">arXiv:1807.04271</a>, 2018. <a href="#fnref:tang18a" class="reversefootnote" role="doc-backlink">↩</a> <a href="#fnref:tang18a:1" class="reversefootnote" role="doc-backlink">↩<sup>2</sup></a></p>
</li>
<li id="fn:lmr14" role="doc-endnote">
<p>Seth Lloyd, Masoud Mohseni, Patrick Rebentrost. <em>Quantum principal component analysis</em>. <a href="https://arxiv.org/abs/1307.0401">arXiv:1307.0401</a>, 2013. <a href="#fnref:lmr14" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:lmr13" role="doc-endnote">
<p>Seth Lloyd, Masoud Mohseni, Patrick Rebentrost. <em>Quantum algorithms for supervised and unsupervised machine learning</em>. <a href="https://arxiv.org/abs/1307.0411">arXiv:1307.0411</a>, 2013. <a href="#fnref:lmr13" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:rsml16" role="doc-endnote">
<p>Patrick Rebentrost, Adrian Steffens, Iman Marvian, Seth Lloyd. <em>Quantum singular-value decomposition of nonsparse low-rank matrices</em>. <a href="https://arxiv.org/abs/1607.05404">arXiv:1607.05404</a> . <a href="#fnref:rsml16" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:glt18" role="doc-endnote">
<p>András Gilyén, Seth Lloyd, Ewin Tang. <em>Quantum-inspired low-rank stochastic regression with logarithmic dependence on the dimension</em>. <a href="https://arxiv.org/abs/1811.04909">arXiv:1811.04909</a>, 2018. <a href="#fnref:glt18" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:clw18" role="doc-endnote">
<p>Nai-Hui Chia, Han-Hsuan Lin, Chunhao Wang. <em>Quantum-inspired sublinear classical algorithms for solving low-rank linear systems</em>. <a href="https://arxiv.org/abs/1811.04852">arXiv:1811.04852</a>, 2018. <a href="#fnref:clw18" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:ac16" role="doc-endnote">
<p>Scott Aaronson and Lijie Chen. <em>Complexity-theoretic foundations of quantum supremacy experiments</em>. <a href="https://arxiv.org/abs/1612.05903">arXiv:1612.05903</a>, 2016. <a href="#fnref:ac16" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:hhl08" role="doc-endnote">
<p>Aram W. Harrow, Avinatan Hassidim, Seth Lloyd. <em>Quantum algorithm for solving linear systems of equations</em>. <a href="https://arxiv.org/abs/0811.3171">arXiv:0811.3171</a>, 2008. <a href="#fnref:hhl08" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:fkv04" role="doc-endnote">
<p>Alan Frieze, Ravindran Kannan, Santosh Vempala. <em>Fast monte-carlo algorithms for finding low-rank approximations</em>. <em>Journal of the ACM</em>, vol. 51, no. 6, 2004. <a href="https://www.math.cmu.edu/~af1p/Texfiles/SVD.pdf">Link</a>. <a href="#fnref:fkv04" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:kv17" role="doc-endnote">
<p>Ravindran Kannan and Santosh Vempala. <em>Randomized algorithms in numerical linear algebra</em>. Acta Numerica 26, 2017. <a href="https://www.cc.gatech.edu/~vempala/papers/acta_survey.pdf">Link</a>. <a href="#fnref:kv17" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
<li id="fn:woodruff14" role="doc-endnote">
<p>David P. Woodruff. <em>Sketching as a tool for numerical linear algebra</em>. Foundations and Trends in Theoretical Computer Science 10.1–2, 2014. <a href="https://researcher.watson.ibm.com/researcher/files/us-dpwoodru/wNow.pdf">Link</a>. <a href="#fnref:woodruff14" class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
Mon, 28 Jan 2019 00:00:00 +0000
https://www.ewintang.com/blog/2019/01/28/an-overview-of-quantum-inspired-sampling/
https://www.ewintang.com/blog/2019/01/28/an-overview-of-quantum-inspired-sampling/