SlowGuess/NeurIPS_2023_OCR huggingface dataset:
On the role of entanglement and statistics in learning
Srinivasan Arunachalam
IBM Quantum
Almaden Research Center
Srinivasan.Arunachalam@ibm.com
Vojtech Havlicek
T.J. Watson Research Center
Vojtech.Havlicek@ibm.com
Louis Schatzki
louisms2@illinois.edu
In this work we make progress in understanding the relationship between learning models when given access to entangled measurements, separable measurements and statistical measurements in the quantum statistical query (QSQ) model. To this end we prove the following results
1. For learning Boolean concept classes, we show that the entangled and separable sample complexity are polynomially related.
2. We give a concept class that shows an exponential separation between quantum PAC learning with classification noise and QSQ learning. This proves the "quantum analogue" of the seminal result of Blum et al. [1] that separates classical SQ learning from classical PAC learning with classification noise.
3. The main technical contribution is to introduce a quantum statistical query dimension (QSD), which we use to give lower bounds on the QSQ learning. Using this, we prove exponential QSQ lower bounds for testing purity of quantum states, shadow tomography, learning coset states for the Abelian hidden subgroup problem, degree-2 functions, planted bi-clique states and learning output states of Clifford circuits of depth polylog(n).
4. Using our QSQ lower bounds, we give an unconditional separation between weak and strong error mitigation and prove lower bounds for learning distributions in the QSQ model. Prior works by Quek et al. [2], Hinsche et al. [3] and Neitner et al. [4] proved the analogous results assuming diagonal measurements and our work removes this assumption.
In the last few decades, machine learning (ML) has emerged as one of the most successful parts of artificial intelligence with wide-ranging applications in computer vision, image recognition, natural language processing. More recently, ML has been used in popular applications such as AlphaGo and Alpha zero (to play the games of Go and chess), chatGPT (to mimic a human conversation) and Alphafold (for solving some hard instances of protein folding). Simultaneously, understanding the power of quantum physics for ML has received much attention in the quantum computing community. There have already been many theoretical proposals for quantum algorithms providing speedups for practically relevant ML tasks such as clustering, recommendation systems, linear algebra, convex optimization, SVMs, kernel-based methods, topological data analysis [5-14]. There are several surveys dedicated to understanding the power of quantum methods for ML [15-18].
Quantum learning theory provides a theoretical framework to understand quantum advantages in ML. Here, there is a concept class  $\mathcal{C}$  which is a collection of  $n$ -qubit quantum states, a learner is provided with several copies of a state  $\rho \in \mathcal{C}$ , performs an arbitrary entangled operation on  $\rho^{\otimes T}$  and the goal is to learn  $\rho$  well-enough. This framework encompasses several results in quantum learning such as tomography, shadow tomography, learning interesting classes of states, learning an unknown distribution and functions encoded as a quantum state [19-26, 3, 2, 4, 17].
Given that machine learning is believed to be one of the first near-term applications of quantum computers, a natural question is how implementable are these algorithms in order to see quantum computational advantage in practice? The concern when considering near-term implementation of the above learning algorithms is twin-fold,  $(i)$  the infeasibility of preparing copies of  $\rho$  and  $(ii)$  performing arbitrary entangled measurements on many copies of  $\rho$  at once, both of which seem out of reach for near-term devices. Motivated by near-term implementations, recently [27] introduced the model of quantum statistical query (QSQ) learning to understand the power of measurement statistics for learning, inspired by Kearns [28] classical SQ model. Since its introduction, variations of it have found applications in differential privacy, quantum supremacy, quantum neural networks, learning distributions and error mitigation [2-4, 29-31]. In the QSQ model, a learning algorithm can perform poly  $(n)$ -many efficiently-implementable two-outcome measurements  $\{M_i,\mathbb{I} - M_i\}$  and the goal is to learn the unknown  $\rho$  well enough using the measurement statistics. Clearly this model is weaker than that given access to  $\rho^{\otimes T}$ , since the learner is only allowed access to expectation values over a single copy of  $\rho$ . Given that recent works on error mitigation have shown that good estimates of expectation values may be accessible well before fault-tolerant quantum computation [32, 33], understanding the power of QSQ algorithms is of fundamental importance.
In this work, we primarily consider concept classes constructed from Boolean functions. In Valiant's PAC learning framework, the goal is to learn a concept class  $\mathcal{C} \subseteq \{c : \{0,1\}^n \to \{0,1\}\}$ . In the PAC model, $^1$  a learning algorithm is given many uniformly random  $(x^i, c^\star(x^i))$  where  $c^\star \in \mathcal{C}$  is unknown and it uses these to learn  $c^\star$  approximately well. Bshouty and Jackson introduced the quantum PAC (QPAC) model [34] wherein a quantum learner is given quantum examples  $|\psi_{c^\star}\rangle^{\otimes T}$ , i.e., coherent superpositions  $|\psi_{c^\star}\rangle = \frac{1}{\sqrt{2^n}} \sum_x |x, c^\star(x)\rangle$ , and it needs to learn the unknown  $c^\star \in \mathcal{C}$  well enough. The complexity measure here is the sample complexity, i.e., copies of classical or quantum examples used by the algorithm. There have been works that have looked at this model and proven positive and negative results for learning function classes (see [17] for a survey).
Relationships Between Models. First, in the distribution-independent setting it is known that PAC and QPAC have the same sample complexity [35]. However, the same need not be true in the distribution-dependent setting, where, for example, quantum learners can efficient learn DNF formulas over the uniform distributions [34]. Second, it is a well-known fact that the classical statistical query (SQ) model is exponentially-separated from PAC learning as witnessed by the class of parity functions [28]. However, in [27] they show that parities can be learned in the QSQ model efficiently. In fact, in [27] they observed that, many positive results using quantum examples can be transformed into algorithms in the weaker QSQ framework. This motivates the following questions:
1. Do entangled measurements offer any advantages in learning function classes?
2. Do measurement statistics suffice for learning function classes, i.e. is there a separation between QSQ and QPAC?
Here, we resolve both these questions. We show that  $(i)$  for learning Boolean function classes the sample complexity of learning with entangled measurements and separable measurements are polynomially related, thereby showing that separable measurements are sufficient to witness quantum speedups in practice and  $(ii)$  there is an exponential separation between learning with entangled measurements (even in the presence of classification noise) and learning with just measurement statistics, thereby showing that just measurement statistics might be insufficient to witness quantum speedups in practice.
We now give a detailed description of our main results before we give an overview of their proofs in the next section.
<sup>1</sup>For simplicity, we discuss PAC learning under the uniform-distribution, i.e.,  $x$  is uniform in  $\{0, 1\}^n$ .
Entangled versus Separable measurements. Since entangled measurements are vastly more difficult to realize experimentally, much recent work has gone into characterizing the limitations of separable measurements. Bubeck et al. [36] gave a property testing task for which entangled measurements are necessary for obtaining the optimal bounds. More recently, for learning classes of arbitrary quantum states (i.e., not necessarily states constructed from function classes), two recent works by [26, 37] showed exponential separations for learning properties of quantum states with entangled vs separable measurements. Here, we study if similar separations exist when considering function classes, a small subset of all quantum states. Our first result shows that in order to exactly learn a function class, every learning algorithm using entangled measurements can be transformed into a learning algorithm using just separable measurements with a polynomial overhead in sample complexity.
Result 1. For a concept class  $\mathcal{C} \subseteq \{c : \{0,1\}^n \to \{0,1\}\}$ , if  $T$  copies of  $|\psi_c\rangle$  suffice to learn an unknown  $c \in \mathcal{C}$ , then  $O(nT^2)$  copies to learn  $c$  using only separable measurements.
QSQ versus noisy-QPAC learning. Classically, Kearns posed the question if SQ learning is equal to PAC learning with classification noise. The seminal result of Blum et al. [1] resolves this question by showing that the class of parity functions acting on the first  $O((\log n) \cdot \log \log n)$  bits separates these two models of learning (under constant noise rate). In [27], the authors asked a question if there is a natural class of Boolean functions for which, QSQ learning can be separated from QPAC learning with noise (in fact, prior to our work, no separation was known even in the presence of no noise). Classically it is well-known that parities separates SQ learning from PAC learning. In [27], it was observed that the class of parities, juntas, and DNF formulas are learnable in the QSQ framework, leaning no clear candidate to separate QSQ from QPAC. This motivates the following questions:
(a) In the noisy-quantum PAC model [34, 35], a learning algorithm is given copies of
$$
\left| \psi_ {c ^ {\star}} ^ {n} \right\rangle = \frac {1}{\sqrt {2 ^ {n}}} \sum_ {x \in \{0, 1 \} ^ {n}} | x \rangle \left(\sqrt {1 - \eta} \left| c ^ {\star} (x) \right\rangle + \sqrt {\eta} \overline {{c ^ {\star} (x)}} \right\rangle , \tag {1}
$$
and the goal is to learn  $c^{\star}$ . Is there a class that separates noisy-quantum PAC from QSQ learning?
(b) Admittedly, the class constructed by Blum et al. [1] is "unnatural", can we obtain the separation in (a) for a natural concept class?
(c) Does such a separation hold for non-constant error rate  $\eta$ ?
Here, we describe a natural problem that witnesses this separation, resolving the three questions.
Result 2. The concept class  $\mathcal{C} = \{f_A : \{0,1\}^n \to \{0,1\} \mid f_A(x) = x^\top Ax \pmod{2}, A \in \mathbb{F}_2^{n \times n}\}$  of all degree-2 Boolean functions can be (exact) learned using quantum examples and separable measurements even in the presence of  $\eta$ -classification noise in time poly  $(n,1/(1 - 2\eta))$ , whereas every QSQ algorithm requires  $2^{\Omega(n)}$  queries to (approximately) learn  $\mathcal{C}$ .
Further applications. While we first considered learning function classes, the QSQ model is meaningful for a much broader class of tasks in quantum information theory and to that end we prove the following:  $(a)$  we show hardness of shadow tomography (quadratically improving the prior bound [26] for separable measurements) and show hardness of even the simplest Abelian hidden subgroup problem in the QSQ model;  $(b)$  we give a doubly-exponential lower bound for testing purity of an unknown state;  $(c)$  we give an exponential separation between weak and strong error mitigation and  $(d)$  we give superpolynomial lower bounds for learning output distributions of quantum circuits (when measured in the computational basis). Prior works [2-4] considered tasks  $(c)$ ,  $(d)$  and showed these separations when the QSQ queries correspond to diagonal measurements, and we remove the diagonal assumption here. We discuss this further in Section 4.2.
2 Models of learning
We discuss the learning models of interest in our submission in this section. For a quick introduction to quantum information notation, we refer the reader to Section 1 in the Supplementary material. In all models, we are primarily interested in improper learning, i.e. the learner need not output a state or function from the concept class.
Classical PAC learning. Valiant [38] introduced the classical Probably Approximately Correct (PAC) learning model. In this model, a concept class  $\mathcal{C} \subseteq \{c : \{0,1\}^n \to \{0,1\}\}$  is a collection of Boolean functions. The learning algorithm  $\mathcal{A}$  obtains labelled examples  $(x, c(x))$  where  $x \in \{0,1\}^n$  is uniformly random and  $c \in \mathcal{C}$  is the unknown target function. The goal of an  $(\varepsilon, \delta)$ -learning algorithm  $\mathcal{A}$  is the following: for every  $c \in \mathcal{C}$ , given labelled examples  $\{(x^i, c(x^i))\}$ , with probability  $\geq 1 - \delta$  (over the randomness of the labelled examples and the internal randomness of the algorithm), outputs a succinct circuit-representation for an hypothesis  $h : \{0,1\}^n \to \{0,1\}$  such that  $\operatorname*{Pr}_x[c(x) = h(x)] \geq 1 - \varepsilon$ . The sample complexity and time complexity of a learning algorithm is the maximal number of labelled examples and time used by the optimal learning algorithm respectively.
Quantum PAC learning. The quantum PAC model was introduced by Bshouty and Jackson [34] wherein, they allowed the learner access to quantum examples of the form  $|\psi_c\rangle = \frac{1}{\sqrt{2^n}}\sum_{x\in \{0,1\}^n}|x,c(x)\rangle$ . Like the classical complexities, one can similarly define the  $(\varepsilon ,\delta)$ -sample and time complexity for learning  $\mathcal{C}$  as the quantum sample complexity (i.e., number of quantum examples  $|\psi_c\rangle$ ) used and quantum time complexity (i.e., number of quantum gates used in the algorithm) of an optimal  $(\varepsilon ,\delta)$ -learner for  $\mathcal{C}$ . Similarly, Bshouty and Jackson [34] defined quantum learning with classification noise, wherein a learning algorithm is given access to  $|\psi_c^n\rangle = \frac{1}{\sqrt{2^n}}\sum_x|x\rangle \otimes (\sqrt{1 - \eta} |c(x)\rangle +\sqrt{\eta} |c(x)\rangle)$ . Such quantum examples have been investigated in prior works [34, 35, 39].
Learning with entangled versus separable measurements. Observe that in the usual definition of QPAC above, a learning algorithm is given access to  $|\psi_c\rangle^{\otimes T}$  and needs to learn the unknown  $c\in \mathcal{C}$ . In this paper we make the distinction between the case where the learner uses entangled measurements, i.e., perform an arbitrary operation on copies of  $|\psi_c\rangle$  versus the setting where the learner uses separable measurements, i.e., performs a single-copy measurement on every copy of  $|\psi_c\rangle$  in the learning algorithm. When discussing learning with entangled and separable measurements, in this paper we will be concerned with exact learning, i.e., with probability  $\geq 2 / 3$ , the learner needs to identify  $c$ . We denote EntExact as the sample complexity of learning with entangled measurements and SepExact as the sample complexity of learning with separable measurements.
Quantum statistical query learning. We now discuss the QSQ model, following the definitions given in [27]. More generally, in order to learn an unknown quantum state  $\rho$ , in the QSQ model, the learner makes Qstat queries that take as input a bounded linear operator  $M$  over the Hilbert space of  $\rho$ , satisfying  $\| M \| \leq 1$ , and tolerance  $\tau$  and outputs a  $\tau$ -approximation of  $\operatorname{Tr}(M \rho)$ , i.e.,
$$
\operatorname {Q s t a t}: (M, \tau) \mapsto \alpha \in [ \operatorname {T r} (M \rho) - \tau , \operatorname {T r} (M \rho) + \tau ].
$$
The goal of the QSQ learner is: with probability  $\geq 1 - \delta$ , output a succinct description of a state  $\sigma$  such that  $\| \rho - \sigma \|_{\mathrm{Tr}} \leq \varepsilon$ . In order to learn a function class using quantum examples, we have  $\rho = |\psi_f\rangle \langle \psi_f|$  and on input  $M$ , the Qstat oracle responds with  $\alpha \in [\langle \psi_f | M | \psi_f \rangle - \tau, \langle \psi_f | M | \psi_f \rangle + \tau]$ .
In this case, the goal of a QSQ learner is to output a hypothesis  $h$  that satisfies  $d_{\mathrm{Tr}}(|\psi_f\rangle \langle \psi_f|,|\psi_h\rangle \langle \psi_h|)\leq \varepsilon$ , which translates to  $\operatorname *{Pr}_x[h(x) = f(x)]\geq 1 - \sqrt{\varepsilon}$ . The query complexity for learning  $\mathcal{C}$ , denoted QSQ(C), is the number of Qstat queries an optimal algorithm makes and the quantum time complexity is the total number of gates used by an optimal algorithm (which includes the gates to number of gates to implement  $M$ ). We say a  $n$ -bit concept class  $\mathcal{C}$  is QSQ learnable if  $\mathcal{C}$  can be learned using poly(n) many Qstat queries, each with tolerance  $\tau = 1 / \mathrm{poly}(n)$  and observable  $M$  which is implementable using poly(n) many gates. There are three ways to motivate the QSQ model
1. From a theoretical perspective, performing 2-outcome measurements is easier to implement than arbitrary separable measurements, which is in turn easier to implement than entangled measurements, so it is useful to understand the power of expectation values in quantum learning theory and the QSQ captures this question in a theoretical framework. $^3$
2More generally in PAC learning, there is an unknown distribution  $D:\{0,1\} ^n\to [0,1]$  from which  $x$  is drawn. Throughout this paper we will be concerned with uniform-distribution PAC learning, i.e.,  $D$  is the uniform distribution, so we describe the learning model for the uniform distribution for simplicity.
3Clearly any binary measurement  $\{M,I - M\}$  can be simulated with a Qstat query to  $M$  or  $I - M$ . In the opposite direction, any observable  $M$  such that  $\| M\| \leq 1$  can be converted into the POVM  $\{\frac{I + M}{2},\frac{I - M}{2}\}$ . Thus, Qstat queries as defined above and binary POVMs are essentially the same model.
2. We emphasize that a QSQ learner is a classical algorithm since it receives statistical estimates of measurements on quantum states. One could envision a framework of learning where quantum states are prepared in the "cloud" and a classical learner needs to interact with the cloud only classically: QSQ models such a quantum framework.
3. Most quantum complexity classes are defined by making a binary measurement on a readout qubit. This can be readily subsumed into the QSQ framework. The QSQ model also naturally extends recent works [2-4] wherein they consider the limitations of classical SQ in the setting where  $M = \sum_{x} \phi(x) |x\rangle \langle x|$  is diagonal.
4. QSQ naturally generalizes SQ. That is, one can think of QSQ as being a form of statistical learning where the learner can change the basis of their statistics. Indeed, SQ corresponds to the case when all queried observables are diagonal.
Some positive results in QSQ In quantum learning theory, there are a few well-known function classes that are learnable using quantum examples: parities, juntas, DNF formulas, the coupon collector problem, learning codeword states. It was observed in [35] that the first three classes are learnable in QSQ already, primarily because a version of Fourier sampling is implementable in QSQ. In this work we first observe that the coupon collector problem and learning codeword states are also learnable in the QSQ framework. We next observe that the class of Fourier-sparse functions are QSQ learnable (which subsumes all the positive results in [27]).
Theorem 1. The class of  $k$ -Fourier sparse functions, the class of codeword states, coupon collector problem can be learned in the QSQ model.
Beyond learning example states, we next observe that one can do tomography on the set of trivial states, i.e., states  $|\psi \rangle = C|0^n\rangle$  where  $C$  is a constant-depth  $n$ -qubit circuits, in polynomial time in the QSQ model. An open question of this work, and also the works of [3, 4], is if we can learn the distribution  $P_{C} = \{\langle x|\psi \rangle^{2}\}_{x}$  using classical SQ queries. The theorem below shows that if we had direct access to  $|\psi \rangle$ , one can learn the state and the corresponding distribution  $P_{C}$ , using Qstat queries.
Theorem 2. The class of  $n$ -qubit trivial states can be learned up to trace distance  $\leq \varepsilon$  using poly(n,1/ε) Qstat queries with tolerance poly(ε/n).
For further details we defer the corresponding proofs to Section 5.1 in the Supplementary material.
3 Proof of results
In this section we outline the proof our two results.
3.1 Proof overview for Result 1
Our starting point towards proving this result is that one could use a result of Sen [40] that, given copies of  $|\psi_{c^{\star}}\rangle$ , one could apply random measurements on single copies of this state and produce an  $h$  that is approximately close to  $c^{\star}$  using at most  $T = (\log |C|) / \varepsilon$  copies of  $|\psi_{c^{\star}}\rangle$ . So, for separable learning, by picking  $\varepsilon = \eta_{min}$  as the minimum distance between concepts in  $C$ , one could exactly learn  $C$  using  $T$  quantum examples. Proving a lower bound on entangled learning  $C$  is fairly straightforward as well: first observe that  $(\log |C|) / n$  is a lower bound on learning (since each quantum example gives  $n$  bits of information and for exact learning one needs  $\Omega (\log |C|)$  bits of information) and also observe that  $1 / \eta_{min}$  is a lower bound, since to distinguish just between  $c, c' \in C$  that satisfy  $\operatorname{Pr}_x[c(x) = c'(x)] = 1 - \eta_{min}$ , so one needs  $1 / \eta_{min}$  copies of the unknown state. Putting this separable upper bound and entangled lower bound together gives us  $\mathsf{SepExact}(\mathcal{C}) \leq n \cdot \mathsf{EntExact}(\mathcal{C})^2$  for all  $C$ . This relation is however sub-optimal.
We further improve the entangled lower bound as follows. Let  $\eta_{a} = \mathbb{E}_{c,c^{\prime}\in \mathcal{C}}\operatorname *{Pr}_{x}[c(x)\neq c^{\prime}x)]$  We use a information-theoretic argument (inspired by a prior work [35]) as follows: define a random variable  $\mathbf{A},\mathbf{B}$  and the quantum state  $\rho_{\mathbf{A},\mathbf{B}} = \sum_{c\in \mathcal{C}}|c\rangle \langle c|\otimes |\psi_c\rangle \langle \psi_c|^{\otimes k}$  (assuming that  $k$  is the sample complexity of EntExact). For exact learning we know that  $I(\mathbf{A}:\mathbf{B}) = \Omega (\log |\mathcal{C}|)$  again because one needs to learn A exactly. Next we know that  $I(\mathbf{A}:\mathbf{B})\leq k\cdot I(\mathbf{A}:\mathbf{B}_1)$  (where  $\mathbf{B}_1$  corresponds to the
This idea was used in an earlier work of Chung and Lin [41] as well, but they weren't concerned with entangled and separable measurements.
first register in  $\mathbf{B}_1$ ). Now using a non-trivial analysis, one can analyze the reduced density matrix on the subsystem  $\mathbf{A}$ ,  $\mathbf{B}_1$  and analyze its eigenvalues to show that  $I(\mathbf{A}:\mathbf{B}_1)\leq n\eta_a$ . Chaining these inequalities gives that EntExact  $\geq \max \{1 / \eta_m, (\log |\mathcal{C}|) / (n\eta_a)\}$ . Combining this entangled lower bound with the separable upper bound, we get that
$$
\operatorname {S e p E x a c t} \leq O \left(n \cdot \operatorname {E n t E x a c t} \cdot \min  \left\{\eta_ {\mathrm {a}} / \eta_ {\mathrm {m}}, \operatorname {E n t E x a c t} \right\}\right).
$$
For further details we defer the proof to Section 2 in the Supplementary material. It is not hard to see that this relation is optimal as well for the class of degree-2 functions defined as
$$
\mathcal {C} = \{f (x) = x ^ {\top} A x \quad (\mathrm {m o d} 2): A \in \mathbb {F} _ {2} ^ {n \times n} \}. \tag {2}
$$
For this class  $\eta_{a} = \eta_{m} = O(1)$  by the Schwartz-Zippel lemma. Recently it was shown [24] that  $\mathsf{RepExact} = \Theta (n^2)$  and  $\mathsf{EntExact} = \Theta (n)$  showing the optimality of our relation above.
3.2 Proof overview for Result 2
3.2.1 Technical contribution.