BANDWIDTH ENABLES GENERALIZATION IN QUANTUM KERNEL MODELS

Abstract

Quantum computers are known to provide speedups over classical state-of-the-art machine learning methods in some specialized settings. For example, quantum kernel methods have been shown to provide an exponential speedup on a learning version of the discrete logarithm problem. Understanding the generalization of quantum models is essential to realizing similar speedups on problems of practical interest. Recent results demonstrate that generalization is hindered by the exponential size of the quantum feature space. Although these results suggest that quantum models cannot generalize when the number of qubits is large, in this paper we show that these results rely on overly restrictive assumptions. We consider a wider class of models by varying a hyperparameter that we call quantum kernel bandwidth. We analyze the large-qubit limit and provide explicit formulas for the generalization of a quantum model that can be solved in closed form. Specifically, we show that changing the value of the bandwidth can take a model from provably not being able to generalize to any target function to good generalization for well-aligned targets. Our analysis shows how the bandwidth controls the spectrum of the kernel integral operator and thereby the inductive bias of the model. We demonstrate empirically that our theory correctly predicts how varying the bandwidth affects generalization of quantum models on challenging datasets, including those far outside our theoretical assumptions. We discuss the implications of our results for quantum advantage in machine learning.

1. INTRODUCTION

Quantum computers have the potential to provide computational advantage over their classical counterparts (Nielsen & Chuang, 2011) , with machine learning commonly considered one of the most promising application domains. Many approaches to leveraging quantum computers for machine learning problems have been proposed. In this work, we focus on quantum machine learning methods that only assume classical access to the data. Lack of strong assumptions on the data input makes such methods a promising candidate for realizing quantum computational advantage. Specifically, we consider an approach that has gained prominence in recent years wherein a classical data point is embedded into some subspace of the quantum Hilbert space and learning is performed using this embedding. This class of methods includes so-called quantum neural networks (Mitarai et al., 2018; Farhi & Neven, 2018) and quantum kernel methods (Havlíček et al., 2019; Schuld & Killoran, 2019) . Quantum neural networks are parameterized quantum circuits that are trained by optimizing the parameters to minimize some loss function. In quantum kernel methods, only the inner products of the embeddings of the data points are evaluated on the quantum computer. The values of these inner products (kernel values) are then used in a model optimized on a classical computer (e.g., support vector machine or kernel ridge regression). The two approaches are deeply connected and can be shown to be equivalent reformulations of each other in many cases (Schuld, 2021) . Since the kernel perspective is more amenable to theoretical analysis, in this work we focus only on the subset of models that can be reformulated as kernel methods. A support vector machine (SVM) with a quantum kernel based on Shor's algorithm has been shown to provide exponential (in the problem size) speedup over any classical algorithm for a version of the discrete logarithm problem (Liu et al., 2021) , suggesting that a judicious embedding of classical data into the quantum Hilbert space can enable a quantum kernel method to learn functions that would be hard to learn otherwise. While the quantum kernels provide a much larger class of learnable functions compared to their classical counterpart, the ability of quantum kernels to generalize when the number of qubits is large has been called into question. Informally, Kübler et al. (2021) show that generalization is impossible if the largest eigenvalue of the kernel integral operator is small, and Huang et al. (2021) show that generalization is unlikely if the rank of the kernel matrix is large. The two conditions are connected since for a positive-definite kernel with fixed trace, a small value of the largest eigenvalue implies that the spectrum of the kernel is "flat" with many nonzero eigenvalues. Under the assumptions used by Kübler et al. (2021) ; Huang et al. (2021) , as the number of qubits grows, the largest eigenvalue of the integral operator gets smaller and the spectrum becomes "flat". Therefore, Kübler et al. (2021) ; Huang et al. (2021) conclude that learning is impossible for models with a large number of qubits unless the amount of training data provided grows exponentially with qubit count. This causes the curse of "exponential" dimensionality (Schölkopf et al., 2002) inherent in quantum kernels. However, Shaydulin & Wild (2021) show that if the class of quantum embeddings is extended by allowing a hyperparameter (denoted "kernel bandwidth") to vary, learning is possible even for high qubit counts. While extensive numerical evidence for the importance of bandwidth is provided, no analytical results are known that explain the mechanism by which bandwidth enables generalization. In this work, we show analytically that quantum kernel models can generalize even in the limit of large numbers of qubits (and exponentially large feature space). The generalization is enabled by the bandwidth hyperparameter (Schölkopf et al., 2002; Silverman, 2018) which controls the inductive bias of the quantum model. We study the impact of the bandwidth on the spectrum of the kernel using the framework of task-model alignment developed in Canatar et al. (2021) , which is based on the replica method of statistical physics (Seung et al., 1992; Dietrich et al., 1999; Mezard & Montanari, 2009; Advani et al., 2013) . While nonrigorous, this framework was shown to capture various generalization phenomena accurately compared with the vacuous bounds from statistical learning theory. Together with the spectral biases of the model, task-model alignment quantifies the required amount of samples to learn a task correctly. A "flat" kernel with poor spectral bias implies large sample complexities to learn each mode in a task, while poor task-model alignment implies a large number of modes to learn. On an analytically tractable quantum kernel, we use this framework to show generalization of bandwidth-equipped models in the limit of an infinite number of qubits. Generalization in this infinite-dimensional limit contrasts sharply with previous results suggesting that high dimensionality of quantum Hilbert spaces precludes learning. Our main contribution is an analysis showing explicitly the impact of quantum kernel bandwidth on the spectrum of the corresponding integral operator and on the generalization of the overall model. On a toy quantum model, we first demonstrate this analytically by deriving closed-form formulas for the spectrum of the integral operator, and show that larger bandwidth leads to larger values of the top eigenvalue and to a less "flat" spectrum. We show that for an aligned target function the kernel can generalize if bandwidth is optimized, whereas if bandwidth is chosen poorly, generalization requires an exponential number of samples on any target. Furthermore, we provide numerical evidence that the same mechanism allows for successful learning for a much broader class of quantum kernels, where analytical derivation of the integral operator spectrum is impossible. While our results do not necessarily imply quantum advantage, the evidence we provide suggests that, even with a compatible, well-aligned task, the quantum machine learning methods require a form of spectral bias to escape the curse of dimensionality and enable generalization.

2. BACKGROUND

We begin by reviewing relevant classical and quantum machine learning concepts and establishing the notation used throughout the paper. We study the problem of regression, where the goal is to learn a target function from data. Specifically, the input is the training set D = {x µ , y µ } P µ=1 containing P observations, with x drawn from some marginal probability density function p : X → R defined on X ⊂ R n and y produced by a target function f : X → R as y = f (x). Learning with kernels Given data in X distributed according to a probability density function p : X → R, we consider a finite-dimensional complex reproducing kernel Hilbert space (RKHS) H and a corresponding feature map ψ : X → H. This feature map gives rise to a kernel function k(x, x ′ ) = ⟨ψ(x), ψ(x ′ )⟩ H . The RKHS H associated with k is endowed with an inner product ⟨•, •⟩ H satisfying the reproducing property and comprises functions f : X → R such that ⟨f, f ⟩ H < ∞ (Schölkopf et al., 2002) . Given a set of P data points x µ ∈ X , the positive semidefinite Gram matrix is defined elementwise by K µν = k(x µ , x ν ). The continuous analogue to the Gram matrix K is the integral kernel operator T k : L 2 (X ) → L 2 (X ) defined according to its action: (T k f )(x) = X k(x, x ′ )f (x ′ )p(x)dx. (1) By Mercer's theorem (Schölkopf et al., 2002) , the eigenfunctions of T k satisfying T k ϕ k = η k ϕ k are orthonormal (i.e., ⟨ϕ k , ϕ l ⟩ = δ kl ), span L 2 (X ), and give rise to an eigendecomposition of k given by k (x, x ′ ) = k η k ϕ k (x)ϕ * k (x ′ ) , where {η k } are real-valued, nonnegative eigenvalues of the integral operator due to its Hermiticity. The inner product ⟨•, •⟩ H in the RKHS of k may be computed with respect to the integral kernel operator of Eq. 1 as ⟨f, g⟩ H = ⟨f, T -1 k g⟩ L2(X ) , with the null space of T k ignored in computing T -1 k . From the kernel eigendecomposition, any target f ∈ L 2 (X ) that lies in the RKHS may therefore be decomposed as f (x) = k āk ϕ k (x), where āk = ⟨ f , ϕ k ⟩ H are the target weights. We comment on the case where the target lies outside of the RKHS in Appendix C. Kernel ridge regression (KRR) is a convex optimization problem over functions that belong to a Hilbert space H and is stated as follows: f * = arg min f ∈H 1 2 P µ=1 f (x µ ) -y µ 2 + λ 2 ∥f ∥ 2 H , where ∥•∥ H denotes the norm with respect to the inner product ⟨•, •⟩ H defined on the Hilbert space and λ ≥ 0 is the ridge parameter introduced for regularizing the solution. Using these definitions, one can show that the solution to the regression problem takes the form f * (x) = k(x) ⊤ (K + λI) -1 ȳ, where k(x) is a vector with elements k(x) µ = k(x, x µ ) and ȳµ = ȳµ . The kernel trick (Schölkopf et al., 2002) allows one to perform regression without explicitly computing the features if one has access to the analytical kernel function. While providing a rich class of kernels, quantum kernels are typically not expressible analytically and hence require explicit representations of the feature maps.

Machine learning with quantum computers

The central motivation for applying quantum computers to problems in machine learning is to leverage the ability of quantum systems to efficiently perform computation in a high-dimensional quantum Hilbert space. We consider quantum systems defined on n qubits whose dynamics may be described using complex-valued linear operators. A general quantum state on n qubits may be described by a positive definite 2 n × 2 n density matrix with unit trace and contained in the quantum Hilbert space H = {ρ | ρ ≻ 0, Tr(ρ) = 1, ρ ∈ L(C 2 n )}, where L(C d ) denotes bounded linear operators of the form C d → C d or, equivalently, d × d complex matrices. H is endowed with the inner product ⟨ρ, ρ ′ ⟩ H given by the Hilbert-Schmidt inner product ⟨A, B⟩ HS = Tr A † B for A, B ∈ L(C d ). The dynamics of quantum states are described by applying linear operators to ρ, and we here will specifically consider unitary operations (represented by a 2 n × 2 n unitary matrix U ). Then, the quantum states that we are interested in may be prepared by applying a unitary operator to the vacuum state |0⟩, where the "ket" notation |j⟩ represents the jth standard basis vector êj in R 2 n . When n = 1, quantum states may be represented by the Bloch sphere: the constraints Tr{ρ} = 1 and ρ = ρ † mean that the components of a density matrix are parameterized by three real parameters n = (n x , n y , n z ) and the density matrix can be written in terms of Pauli matrices ⃗ σ as ρ = 1 2 (1 + n • ⃗ σ). Since ∥n∥ ≤ 1 is required for ρ ≥ 0 subject to Tr{ρ} = 1, we can identify any single-qubit state ρ with a vector n in the unit sphere S 2 ⊂ R 3 . Similarly, any unitary operation acting on a single qubit may be represented as a sequence of rotations on the Bloch sphere (Nielsen & Chuang, 2011) , thus making this representation convenient for visualizing feature maps associated with quantum kernels. By associating the quantum Hilbert space with a feature space H, we can define a feature map that gives rise to a quantum kernel (Havlíček et al., 2019; Schuld & Killoran, 2019) . We consider a data-dependent unitary operator U (x) and prepare a density matrix ρ(x) = U (x)|0⟩⟨0|U † (x), where |0⟩⟨0| represents the 2 n × 2 n matrix with "1" in the top left corner and zeros elsewhere; later we discuss examples of how to construct data-dependent unitary operators. A natural choice for a feature map is then ψ(x) = ρ(x) with the corresponding inner product ⟨ρ, ρ ′ ⟩ H = Tr ρρ ′ . Under this feature map, the quantum kernel is defined as k(x, x ′ ) = ⟨ψ(x), ψ(x ′ )⟩ H = Tr ρ(x)ρ(x ′ ) , which inherits symmetry in its arguments from ⟨•, •⟩ H . With this association between the feature map ψ(x) and the quantum state ρ(x), we can freely apply existing theory for kernel methods in terms of complex vector spaces to study the spectra and generalization behavior of quantum kernels. In Appendix A we provide further details on the theory of quantum states and kernels, such as construction of the RKHS from Hermitian linear operators (or observables) and the geometry and probabilistic nature of quantum operations. In practice, a quantum kernel method computes the kernel matrix entries on a quantum computer by evaluating the value of the observable |0⟩ ⟨0| on the state U (x)U (x ′ ) |0⟩ ⟨0| U † (x ′ )U † (x).

3. MOTIVATING EXAMPLE: NO GENERALIZATION WITHOUT BANDWIDTH

Despite existing techniques for empirically evaluating the potential performance of quantum kernels on classical datasets (Huang et al., 2021) and examples of successful implementation on currently available quantum computers (Glick et al., 2021; Peters et al., 2021; Wu et al., 2021; Hubregtsen et al., 2021) , it is often still unclear how to construct a quantum kernel that will be suitable for learning on a real-world classical dataset. This uncertainty in the potential performance of quantum machine learning methods is compounded by regimes in which generalization is apparently impossible with a subexponential amount of training data. These regimes arise from the same feature of quantum computing that originally motivated quantum kernel methods: the availability of exponentially large feature spaces. In this section we discuss a simple example where the high dimensionality of the feature space precludes learning with fixed quantum embeddings, and we show that the introduction of bandwidth enables generalization. One example of how high dimensionality of the feature space precludes learning is provided by random feature maps. Given a feature map ψ consisting entirely of independent Gaussian features, the operator Σ = E X [ψψ † ] is proportional to the identity operator. Since Σ shares eigenvalues with T k of Eq. 1 (Appendix A), the eigenvalues of K concentrate around unity at a rate O(P -1/2 ) (Rosasco et al., 2010) . Analogously, we consider a quantum feature map where states ρ(x) are prepared by 2 n -dimensional random unitaries U (x), with the uniform distribution over unitaries being described by the Haar measure (e.g., Collins & Nechita (2016) ). Then, identifying a correspondence Σ → E U ∼U (2 n ) [ρ(x) ⊗ ρ T (x)] in the quantum case and applying standard results from measure theory, one can directly compute the spectrum of Σ (Appendix A). This computation yields 2 n-1 (2 n +1) nonzero eigenvalues with magnitude 2 1-n (2 n + 1) -1 , and thus the nonzero eigenvalues of K again become uniform as n → ∞. Since the largest eigenvalue is exponentially small in n, generalization requires the number of data points to be exponentially large in n. The connection between the magnitude of the largest eigenvalue and the required number of training samples can be seen directly from Kübler et al. (2021, Theorem 3) , although it is a straightforward consequence of many older results, for example, (Dietrich et al., 1999; Bengio et al., 2005; Liang et al., 2019; Bordelon et al., 2020; Canatar et al., 2021) . In other words, efficient generalization becomes impossible when the quantum feature map uses the full extent of the quantum state space uniformly. Our results demonstrate that the converse is true: restricting embeddings to a smaller region of quantum state space recovers the possibility of efficient learning.

3.1. LIMITATIONS OF FIXED QUANTUM EMBEDDINGS

To make the example concrete, we consider the following learning problem. This learning problem and the failure of fixed quantum embeddings on it were considered in Huang et al. (2021, Supplementary Information 9) . For an input x ∈ {0, π} n , the goal is to learn a target function f (x) = cos x (n) , where x (n) is the last element of the vector x. Since learning this function is equivalent to learning the value of the last element of x, it is trivial classically, and a simple linear regression succeeds. We now show how KRR with a badly designed quantum kernel fails on this trivial task, and we show how the introduction of bandwidth allows the KRR with a quantum kernel to learn the target. Consider a quantum kernel equipped with feature map U (x) = n j=1 U (x (j) ), U (x (j) ) = R x x (j) =    cos x (j) /2 i sin x (j) /2 i sin x (j) /2 cos x (j) /2    , Figure 1 : A A quantum kernel method involves embedding data using a quantum circuit, often involving rotation by some angle about an axis. When angles are not rescaled properly, data can be embedded far apart in a space with dimensionality O(2 n ) (Sec. 3). Similarly, λ max is suppressed as the mean embedding E X [ρ(x)] approaches the center of the Bloch sphere (Kübler et al., 2021) . B High-dimensional feature space results in k(x, x ′ ) with narrow width (Eq. 6 with n = 50 and (top) c = 1 (bottom) c = 0.25) Tuning bandwidth escapes the "curse of dimensionality" associated with high-dimensional feature space. For n = 50 and f (x) = cos x (50) , quantum features that are nearly orthogonal result in a narrow kernel (c = 1, top) and failure to generalize, while tuning bandwidth (c < 1, bottom) recovers KRR generalization performance. where n j=1 is the tensor product of single-qubit operations and R x (θ) represents a rotation of θ about the x-axis of the single-qubit Bloch sphere (see Fig. 1A ). For this feature map, the embedding factorizes over qubits as ρ(x) = U (x)|0⟩⟨0|U † (x) = n j=1 ρ(x (j) ), and ρ(x (j) ) =    cos 2 (x (j) /2) -i cos x (j) /2 sin x (j) /2 i cos x (j) /2 sin x (j) /2 sin 2 (x (j) /2)    , with the kernel given by k(x, x ′ ) = Tr ρ(x)ρ(x ′ ) = n j=1 cos 2 x (j) -x ′(j) /2 . ( ) While this kernel is obtained via quantum operations, the fact that it has a closed form expression makes it classically easy to simulate. Nevertheless, it is a useful toy model (Kübler et al., 2021; Huang et al., 2021) for the analytical analysis of exponentially large quantum feature spaces. Since the input data is x ∈ {0, π} n , the kernel becomes a delta function: k(x, x ′ ) = δ x,x ′ . Therefore, any two points in the feature space ρ(x) and ρ(x ′ ) for x ̸ = x ′ are orthogonal and the kernel cannot capture the correlations in data. KRR with this kernel simply memorizes the training set and cannot generalize to any target function with a subexponential (in n) training set size.

3.2. BANDWIDTH ENABLES LEARNING

The preceding example highlights how quantum kernel methods utilizing high-dimensional spaces can fail to generalize. Our central technique for mitigating this limitation will be to introduce bandwidth to quantum kernels (Shaydulin & Wild, 2021) . We now reconsider the kernel with the feature map of Eq. 3 and introduce a scaling parameter c ∈ [0, 1] that controls the bandwidth of the kernel. The feature map and the kernel become U (x (j) ) = R x cx (j) , k(x, x ′ ) = n j=1 cos 2 c x (j) -x ′(j) /2 . (6) Geometrically, the factor c restricts features ρ(x) to a smaller region of the Bloch sphere (Fig. 1A ). Consequently, the kernel matrix is no longer diagonal, and we can straightforwardly check that simply tuning c allows KRR with kernel Eq. 6 to generalize (see Fig. 1B ).

4. EFFECT OF BANDWIDTH ON SCALING AND SPECTRA

In the preceding section we provided a qualitative mechanism for how bandwidth improves the generalization of quantum kernels. We now analyze the expected generalization error of quantum kernels equipped with bandwidth. We derive explicitly the spectrum of the bandwidth-equipped quantum kernel with the feature map Eq. 6 and show how the bandwidth makes the spectrum less "flat," thereby enabling learning. Our main tool is the theory developed in Bordelon et al. (2020) ; Canatar et al. (2021) where the generalization error, as a function of the training set size, is analytically obtained from the eigenvalues of the kernel and the projection of the target function on the RKHS defined by the kernel.

4.1. EXPLICIT FORMULAS FOR GENERALIZATION OF BANDWIDTH-EQUIPPED KERNELS

We consider the quantum kernel with the feature map given by Eq. 6 and the input distribution x ∼ Unif([-π, π] n ), as previously studied by Kübler et al. (2021) . For a single qubit, the kernel becomes k(x, x ′ ) = cos 2 (c(xx ′ )/2) with bandwidth parameter c, and the eigenvalues can be computed as follows (see Appendix B): λ 1 = 3 8 + 1 8 sinc(2πc) + 1 8 (1 -sinc(2πc)) 2 + 16sinc(πc) 2 , λ 2 = 1 4 - 1 4 sinc(2πc), λ 3 = 3 8 + 1 8 sinc(2πc) - 1 8 (1 -sinc(2πc)) 2 + 16sinc(πc) 2 , λ 4 = 0. ( ) For an n-qubit system, the largest eigenvalue η max of the kernel in Eq. 6 falls exponentially with n for c ∼ O n (1) and makes generalization impossible with P ∼ poly(n) amount data (Kübler et al., 2021) (see Appendix. B). To prevent η max decreasing with n, we choose a bandwidth that scales with n (i.e., c = an -α with a ∼ O(1) and α > 0). In Appendix B we show that α ≥ 1 2 is required for generalization. We consider α = 1/2 henceforth. Then, all nonzero eigenvalues of the n-qubit kernel Eq. 6 can be expressed as λ k1 1 λ k2 2 λ k3 3 with k 1 + k 2 + k 3 = n, where the single-qubit eigenvalues asymptotically (with n) look like λ 1 ≈ 1, λ 2 ≈ a 2 π 2 6n , λ 3 ≈ a 4 π 4 180n 2 . ( ) Starting from k 1 = n and k 2 = k 3 = 0, the hierarchy of eigenvalues obtained in this way are given in Table 1 . We denote each of these eigenvalues as η k,z and their corresponding eigenfunctions as Table 1 : Hierarchy of eigenvalues based on their scaling. N (n, k) denotes the degeneracy of eigenvalues with scaling n -k , and |n, k⟩ denotes the form of the corresponding eigenstates. n -k Degeneracy N (n, k) Eigenstate |n, k⟩ n 0 1 |ψ 1 ⟩ ⊗n n -1 n 1 |ψ 1 ⟩ ⊗(n-1) |ψ 2 ⟩ n -2 n 2 + n 1 |ψ 1 ⟩ ⊗(n-2) |ψ 2 ⟩ ⊗2 , |ψ 1 ⟩ ⊗(n-1) |ψ 3 ⟩ n -3 n 3 + n-1 1 n 1 |ψ 1 ⟩ ⊗(n-3) |ψ 2 ⟩ ⊗3 , |ψ 1 ⟩ ⊗(n-2) |ψ 2 ⟩ |ψ 3 ⟩ ϕ k,z (x), where k indexes the overall scaling of the eigenvalue and z indexes each of the individual eigenvalues with scaling n -k . The degeneracy N (n, k) ∼ O(n k ) denotes the number of eigenvalues η k,z ∼ O(n -k ) for each k. Notice that the quantity ηk,z = N (n, k)η k,z ∼ O n (1) with respect to the input dimension and its value depends on a and k. For each k, we will further make the approximation ηk,z ≈ ηk,z ′ for all pairs z, z ′ since the spectrum is almost flat at each scaling k (see Figure 2A ). We obtain the projections of target function f (x) on the kernel eigenfunctions as āk,z = f (x)ϕ k,z (x)p(x)dx. We also define the total target power at each scaling ā2 k ≡ N (n,k) z=1 ā2 k,z .

With the eigenvalues and the target weights ā2

k , the generalization error is given by (Canatar et al., 2021) (Appendix C): E g = κ 2 1 -γ k ā2 k κ + α k ηk 2 , κ = λ + κ k ηk κ + α k ηk , γ = k α k η2 k (κ + α k ηk ) 2 , ( ) where λ is the KRR regularization parameter, κ should be solved self-consistently, and we have defined α k = P N (n,k) . Taking the large qubit and large data limit (n → ∞ and P → ∞) while keeping α l ∼ O n (1) for some mode l (meaning P ∼ O(n l )), the generalization error decouples across different scaling limits and becomes E g (α l ) =   κ 2 1 -γ ā2 l κ + α l ηl 2 + γ 1 -γ k>l ā2 k   + k>l ā2 k . ( ) The target modes with k > l remain unlearned since α k>l = 0 and the modes k < l have already been learned using the provided data since α k<l = ∞. This scaling defines learning stages where at each stage a single mode l is being learned, and the remaining modes contribute as constant error. The term in the parentheses goes to zero as α l → ∞ (see Appendix C). Hence, when the mode l is completely learned, the ratio of the generalization error to its initial value becomes Eg(α l =∞) Eg(0) = ( k>l ā2 k )/( k ā2 k ). Therefore, given a data budget P ∼ O(n l ), the quantum kernel is guaranteed to generalize to target functions whose weights beyond mode l are vanishing. The quantity C(l) = 1 - Eg(α l =∞) Eg(0) , called the cumulative power (Canatar et al., 2021) , describes the amount of power placed in the first l modes and quantifies the task-model alignment. It was shown in Canatar et al. (2021) that kernels generalize better for target functions with sharply rising C(l). In our case, for generalizability at P ∼ O(n l ) samples, it is a necessary but not sufficient condition for target functions to have good task-model alignment for which C(l) ≈ 1. Note that the trace of this kernel is k(x, x)p(x)dx = 1, and therefore the eigenvalues satisfy k,z η k,z = 1. Flatness of the spectrum, then, implies η k,z ∼ O(3 -n ) since there are 3 n nonzero modes of the kernel in Eq. 6 (see Appendix B). Equation 9suggests that even if the target is aligned well with the kernel, it requires P ∼ O(3 n ) samples to learn each mode, and so generalization becomes impossible with polynomial sample complexity P ∼ O(n l ). On the other hand, bandwidth enables sufficient decay in the spectrum of the kernel, and Eq. 9 shows that P ∼ O(n l ) samples yield an excess generalization error E g ≈ 1 -C(l). In Figure 2 , we show the results of simulating the kernel of Eq. 6 with n = 40 qubits for a target function given by f (x) = e -∥x∥ 2 /n 2 . For c = 1, the kernel has a flat spectrum (Figure 2A ) with poor alignment with the task (Figure 2B ). On the other hand, bandwidth introduces sufficient decay in the eigenspectrum so that polynomial time learning becomes possible. Surprisingly, bandwidth also improves the task-model alignment which, together with spectral bias, implies generalizability with better sample efficiency. In Figure 2C , we perform kernel regression with our toy kernel and confirm that generalization improves with bandwidth up to an optimal value after which it degrades again. This is due to the fact that larger bandwidths cause underfitting of the data (Silverman, 2018) since only a very few eigenmodes become learnable while the target cannot be fully explained by those modes. In Figure 2 , we find that the optimal bandwidth parameter is c * ≈ 2 n (see Appendix E). Learnability is explained by the preservation of large-eigenvalue eigenspaces; without bandwidth, the model provably cannot learn in poly(n) complexity due to the flat spectrum. B The projections of the target f (x) = e -∥x∥ 2 /n 2 on the eigenvectors of the kernel for each bandwidth. Apart from the flatness of the c = 1 kernel, its eigenfunctions align poorly with the target. C Generalization error as a function of the number of training samples computed by using theory (solid lines) (Eq. 9) and performing kernel ridge regression empirically (dots). Bandwidth c = 1 yields a constant learning curve. While all c < 1 kernels provide improvement, an optimal bandwidth parameter c * ≈ 2/n gives the best task-model alignment.

4.2. EVIDENCE OF PERFORMANCE GAINS IN REAL DATASETS

To evaluate our theory in a practical setting, we consider two previously proposed quantum kernels that have been conjectured to be hard to simulate classically: a kernel with a feature map inspired by instantaneous quantum polynomial-time (IQP) circuit (Shepherd & Bremner, 2009; Havlíček et al., 2019; Huang et al., 2021 ) and a kernel with Hamiltonian evolution (EVO) feature map (Huang et al., 2021; Shaydulin & Wild, 2021) (see Appendix E for details). Unlike the kernel considered in the preceding section, the spectrum cannot be derived analytically for these kernels. We evaluate these kernels on binary classification versions of FMNIST (Xiao et al., 2017) , KMNIST (Clanuwat et al., 2018) , and PLAsTiCC (The PLAsTiCC team et al., 2018) datasets with the input data downsized to n = 22 dimensions, which were previously used to evaluate quantum kernel performance in Shaydulin & Wild (2021) ; Huang et al. (2021) ; Peters et al. (2021) . We use the kernel values reported in Shaydulin & Wild (2021) , which were evaluated with high precision using an idealized (noiseless) simulator. In practice, an additive error is introduced when evaluating the kernel values on a fault-tolerant quantum computer. Bandwidth-equipped kernels are robust against this error; see the discussion in Shaydulin & Wild (2021) . We perform SVM for binary classification using these kernels with varying bandwidths. In Table 2 , we report the test accuracies with bandwidth parameter c = 1 for the IQP and EVO kernels. We also report the test performance with bandwidth parameters c * < c optimized by hyperparameter tuning for each kernel using cross validation (see Appendix E). For both kernels, bandwidth significantly improves the test performance. To test our intuition, we present in Fig. 3A the shape of the IQP kernel where the kernel clearly sharpens for larger values of bandwidth parameter implying flat spectrum. In Fig. 3B , we further confirm that the spectrum decay improves with bandwidth when the IQP kernel is evaluated on the FMNIST dataset. We also find that the task-model alignment improves greatly with the bandwidth (Fig. 3C ), thus implying, together with the previous point, possible generalization. IQP EVO Random Guess c * c = 1 c * c = 1 FMNIST 0. -1.0 -0.5 0.0 0.5 1.0 x 0.0 0.2 0.4 0.6 0.8 1.0 K(x) c = 0.01 c = 0.1 c = 0.3 c = 0.5 c = 1.0 10 0 10 1 10 2 10 3 k 10 -10 10 -7 10 -4 10 -1 η k c = 0.01 c = 1 10 0 10 1 10 2 10 3 k 0.6 0.8 1.0 C(k) A B C Figure 3 : A IQP kernel function example: Intuitive behavior of bandwidth persists even when quantum kernel is not strictly shift-invariant. B IQP with the addition of bandwidth is capable of recovering significant target alignment with FMNIST dataset. C While the spectrum for c = 1 IQP is flat, it also has poor alignment with the target (see Appendix E). 5 RELATED WORK Huang et al. (2021) introduce the idea that the exponential dimensionality of quantum feature spaces precludes generalization of quantum kernel methods, and they provide an upper bound on generalization error that includes the dimension of the space spanned by the training set. They connect their results to the spectrum of the kernel by introducing a measure of "approximate dimension" of the span of the training set given by n k=1 1 n-k m l=k t l , where {t l } n l=1 are the eigenvalues of the n × n kernel matrix. This number is effectively a measure of the flatness of the spectrum of the kernel and is used in numerical experiments in Huang et al. (2021) . An alternative analysis is given by Banchi et al. (2021) , who derive bounds on generalization error using quantum information techniques and show that near-identity kernels resulting from large dimensionality of the feature space preclude generalization. We use the construction from Huang et al. (2021, Appendix I) as our motivating example in Sec. 3. Kübler et al. (2021) introduce techniques for deriving the spectrum of quantum kernels and obtain the spectrum of the kernel Eq. 5. They then use these techniques to show that the purity of the mean embedding provides an upper bound on the largest eigenvalue of the quantum kernel integral operator and consequently that quantum kernel methods with feature maps that utilize the full quantum Hilbert space require an exponential number of qubits of data to learn. However, Kübler et al. (2021) did not consider bandwidth as a method for controlling the inductive bias of quantum kernels. Our contribution is using the techniques of Kübler et al. (2021) to derive the spectrum of the bandwidth-equipped kernel Eq. 6 and explicit formulas for the expected generalization error. Shaydulin & Wild (2021) introduce the concept of quantum kernel bandwidth and provide numerical evidence that bandwidth tuning (equivalent to rescaling of the input data) improves the generalization of SVM with quantum kernels. An analogous mechanism has been observed to improve trainability of quantum neural networks (Zhang et al., 2022) . However, previous results make no connection between the bandwidth and the spectrum of the kernel and provide no analytical results for generalization. We reinterpret the data from Shaydulin & Wild (2021) in Sec. 4.2 and show how the bandwidth controls the spectrum of the kernel and enables generalization.

6. DISCUSSION

In this work, we studied the kernels induced by quantum feature embeddings of data and their generalization potential. Recent work suggests that machine learning models built in this way suffer from the curse of dimensionality, requiring exponentially large training sets to learn. Note that embedding n-dimensional data requires at least n qubits (where n ∼ 10 3 for standard datasets) which span a 2 n dimensional feature space. While quantum models may possess potentially powerful and classically inaccessible representations for certain tasks, utilization of those necessarily requires a control over the large space they span in order to generalize. Here we showed that the bandwidth hyperparameter enables generalization of quantum kernel methods when the numbers of qubits is large, and provided explicit formulas for the resulting expected generalization error on a toy model. Our results open up promise for quantum machine learning beyond intermediate numbers of qubits. A central lesson provided by our work is that thoughtfully chosen hyperparameters can significantly improve the performance of quantum machine learning methods. Identifying such hyperparameters that control the inductive bias of quantum models is essential to realizing the full potential of quantum machine learning methods. Unlike prior works, we focus not just on the spectrum of the quantum kernel but on the alignment between the kernel and the real-world datasets. Our empirical results imply that scaling the bandwidth not only makes the spectrum less flat, but also improves the alignment with real-world target functions. These observations make us optimistic about the potential of quantum kernel methods to solve classically challenging problems. An important limitation of our results is that while bandwidth scaling is guaranteed to improve the spectrum, it does not necessarily lead to good alignment. For example, in the limit of c → 0 the spectrum has only one nonzero eigenvalue, although learning is still not possible (see Appendix D). This suggests that optimizing bandwidth as a hyperparameter during training can balance triviality of the feature map (c → 0) with greater utilization of the quantum state space. At the same time, if the feature map is chosen poorly, varying bandwidth would not lead to good generalization. If the kernel values are evaluated on a noisy quantum computer, the quantum hardware noise would affect the spectrum of the kernel. Hardware noise reduces the purity of embedding, leading to a trivial lower bound on generalization error from Kübler et al. (2021, Theorem 1) . Heyraud et al. (2022) give a more detailed analysis. While outside the scope of this work, the impact of noise on generalization is nonetheless an important consideration for near-term prospects of quantum kernel methods. A REVIEW OF CLASSICAL AND QUANTUM DATA OPERATORS Here we discuss covariance operators and integral kernel operators for two types of data: classical real-valued vectors and finite-dimensional complex Hermitian operators. The goal is to relate the spectra of these operators in order to better understand how feature maps and distributions of input data combine to affect the learnability of a distribution. Given a symmetric positive semidefinite kernel function k : X × X → R, the integral kernel operator T k : L 2 (X ) → L 2 (X ) is defined according to its action on f ∈ L 2 (X ) as (T k f )(x) = X k(x, x ′ )f (x ′ )µ(dx ′ ). (A.1) A quantum kernel is defined as the inner product of two quantum states, k(x, x ′ ) = ⟨ρ(x), ρ(x ′ )⟩ H = Tr ρ(x)ρ(x ′ ) = Vec ρ(x) † Vec ρ(x ′ ) , where we have introduced the vectorization map (e.g., Watrous (2018) ) Vec : L(C d ) → C d 2 , which stacks rows of a d × d matrix into a d 2 × 1 column vector and where L(C d ) denotes the space of linear operators of the form C d → C d . Throughout this section we will consider d-dimensional quantum states and operations (where d = 2 n in the case of n qubits). We will frequently use the identity Vec (A) † Vec (B) = ⟨A, B⟩ = Tr A † B , ∀ A, B ∈ L(C d ). Observing that the RKHS of a kernel k is defined (see, e.g., Schuld (2021) ) by functions of the form f (x) = ⟨ρ(x), H⟩, we can rewrite Eq. A.1 as (T k f )(x) = Vec ρ(x) † X Vec ρ(x ′ ) Vec ρ(x ′ ) † Vec (H) µ(dx ′ ) = ⟨Vec ρ(x) , Σ Vec (H)⟩, (A.2) where we have defined the covariance operator, Σ = X Vec ρ(x ′ ) Vec ρ(x ′ ) † µ(dx ′ ) = X ρ(x ′ ) ⊗ ρ(x ′ ) T µ(dx ′ ), (A.3) and the last equality in Eq. A.2 holds whenever the quantum embedding is a pure state (i.e., ρ(x) = |ψ(x)⟩⟨ψ(x)| for some |ψ(x)⟩). We can intuitively understand this operator by analogy to linear feature maps: If we consider n-dimensional real-valued input vectors x ∈ X ⊂ R n and assume x are centered such that E X [x] = 0, then the covariance operator is defined as Σ = E X [xx T ] such that (Σ) ij = E[x i x j ]. Equation A. 3 therefore describes a kind of quantum covariance operator, although this is an imperfect analogy since a centered quantum feature map (E X [ρ(x)] = 0) would violate the requirement Tr ρ(x) = 1. We are interested in the eigenvalue equations Σ Vec (H) = η Vec (H) (T k ϕ)(x) = ηϕ(x). Given the operators defined in Eq. A.1 and Eq. A.3, one may verify (see, e.g., Shawe-Taylor et al. (2005) ) that the following statements hold under the identification ψ(x) → Vec ρ(x) described above. (S1) For every eigenfunction ϕ satisfying (T k ϕ)(x) = ηϕ(x), there is a corresponding eigenvector Vec (H) of Σ given by Vec (H) = X ϕ(x) Vec ρ(x) µ(dx) such that Σ Vec (H) = η Vec (H). Furthermore, from the bijectivity of the Vec operation and the fact that Hermiticity is preserved under convex combination, it follows that H is Hermitian. (S2) For every eigenvector Vec (H) of Σ satisfying Σ Vec (H) = η Vec (H), there is a corresponding eigenfunction of T k given by ϕ(x) = Tr ρ(x)H = Vec ρ(x) † Vec (H) such that (T k ϕ)(x) = ηϕ(x). (S3) Assuming that eigenfunctions ϕ k of T k indexed by eigenvalue η k are orthonormal, ⟨ϕ k , ϕ l ⟩ L2(X ) = X ϕ k (x) * ϕ l (x)µ(dx) = δ kl , the eigenvectors Vec (H k ) of Σ indexed according to eigenvalue η k satisfy Vec (H k ) † Vec (H l ) = Tr H † k H l = η -1 k δ kl whenever η k > 0 (when η k = 0, we may safely ignore Vec (H k ) in the null space of Σ). Letting spec (A) denote the sequence of eigenvalues of an operator A sorted in nonincreasing order, it then follows from (S1) and (S2) that spec (T k ) = spec (Σ) . The mean embedding is defined as the average state with respect to a distribution over X : ρ µ = X ρ(x)µ(dx). As shown in Kübler et al. (2021, Lemma 1) , the inequality η max (Σ) ≤ Tr ρ µ 2 provides a bound for the largest eigenvalue of Σ. Let n be the Bloch vector for ρ µ defined on n = 1 qubits, which can be parameterized as n = (sin θ cos ϕ, sin θ sin ϕ, cos ϕ) (A.4) Then Tr ρ 2 µ = (1 + ∥n∥ 2 )/2. This provides a geometric argument for the use of bandwidth in a single-qubit system (or product thereof). For instance, consider each shaded region in Fig. 1A representing the subspace spanned by quantum states associated with the feature map giving rise to k. Then we have that the maximum eigenvalue of Σ is suppressed like η max (Σ) ≤ (1 + ∥n∥ 2 ) 1/2 / √ 2 as the centroid n of each region (representing ρ µ ) approaches the center of the Bloch sphere. By limiting bandwidth (and therefore restricting the shaded region of Fig. 1B to a polar cap of the Bloch sphere), the upper bound on η max (Σ) is lifted, and the possibility of learning on data is restored.

A.1 SPECTRUM OF A RANDOM QUANTUM EMBEDDING

A foundational observation for this work is that using a kernel associated with a feature map that completely utilizes a high-dimensional feature space leads to poor learning guarantees due to the flatness of the corresponding spectrum. Here, we present an extreme (and somewhat contrived) example where a quantum feature map associated with random state vectors leads to a flat kernel spectrum. We assume the existence of a data distribution and feature map x → U (x)|0⟩⟨0|U † (x) for which unitaries U (x) are sampled uniformly over the space of n-qubit unitaries U (2 n ). Such a distribution may be achieved by sampling uniformly with respect to the Haar measure µ(dU ) (e.g., Collins & Nechita (2016) ). As described in Rosasco et al. (2010) , the spectrum of K concentrates around the spectrum of Σ. We therefore explicitly compute the spectrum of Σ corresponding to random quantum features. Using standard results for integration with respect to the Haar measure (Puchała & Miszczak, 2017) , we compute the average elements of Σ as ⟨ij|Σ|kℓ⟩ = U (2 n ) ⟨i|ρ(x)|k⟩⟨j|ρ(x)|ℓ⟩µ(dU ) = U (2 n ) U i0 U * k0 U j0 U * ℓ0 µ(dU ) = 2 n -1 2 n (2 2n -1) δ ik δ jℓ + δ iℓ δ jk . (A.5) The terms associated with δ ik δ jℓ = 1 correspond to the identity operator I 4 n , while the terms δ iℓ δ jk contribute to either 2 n -many diagonal components Σ ii,ii for i = 1, . . . , 2 n or 2 n (2 n -1)-many off-diagonal components Σ ij,ji whenever j ̸ = i: Σ → I 4 n + 2 n i=1 |ii⟩⟨ii| + 2 n i=1 j̸ =i |ij⟩⟨ji|. (A.6) Equation A.6 is therefore a direct sum of subspaces proportional to 2I 2 and subspaces proportional to I 2 + X 2 , the latter of which may be easily diagonalized. Combining with Eq. A.5 yields the spectrum spec (Σ) = 2 2 n (2 n +1) with multiplicity 2 n + 2 n (2 n -1) 2 0 with multiplicity 2 n (2 n -1) 2 . Coincidentally, the mean embedding associated with this feature map is proportional to the identity; that is, ρ µ = E X [ρ(x)] = I/2 n .

B SPECTRUM OF THE BANDWIDTH-EQUIPPED KERNEL

Here we derive the spectrum of the integral operator for kernel discussed in the main text. We follow the technique of diagonalizing Σ described in Appendix A and used in Kübler et al. (2021, Appendix C) . We first derive the spectrum for the single-qubit (one-dimensional data) case. Then we leverage the observation that the kernel factorizes over the qubits to obtain the full spectrum for the general n-dimensional case. We begin by considering the input x ∈ Uniform[-π, π]. Recall that the feature map ρ(x) is generated by the unitary U (x) = cos cx 2 I + i sin cx 2 X. Then, the vectorization of the image of a data point x in feature space ρ (x) = U (x) |0⟩ ⟨0| U (x) † is Vec ρ(x) =      cos 2 cx 2 -i cos cx 2 sin cx 2 i cos cx 2 sin cx 2 sin 2 cx 2      , and the corresponding kernel is k(x, x ′ ) = Vec ρ(x) † Vec ρ(x ′ ) = cos 2 c (x -x ′ ) 2 . (A.7) Our goal is to compute the eigenvalues of the integral operator T k defined as (T k ϕ k )(x) = µ(dx ′ )k(x, x ′ )ϕ k (x ′ ) = λ k ϕ k (x). (A.8) Here we refer to single-qubit eigenvalues as λ k and many-qubit eigenvalues as η k . As described in Appendix A, this is equivalent to computing the eigenvalues of the covariance operator Σ given by Σ = X Vec ρ(y) Vec ρ(y) † µ(dy) = 1 2π π -π     cos 4 ( cy 2 ) i cos 3 ( cy 2 ) sin( cy 2 ) -i cos 3 ( cy 2 ) sin( cy 2 ) cos 2 ( cy 2 ) sin 2 ( cy 2 ) -i cos 3 ( cy 2 ) sin( cy 2 ) cos 2 ( cy 2 ) sin 2 ( cy 2 ) -cos 2 ( cy 2 ) sin 2 ( cy 2 ) -i cos( cy 2 ) sin 3 ( cy 2 ) i cos 3 ( cy 2 ) sin( cy 2 ) -cos 2 ( cy 2 ) sin 2 ( cy 2 ) cos 2 ( cy 2 ) sin 2 ( cy 2 ) i cos( cy 2 ) sin 3 ( cy 2 ) cos 2 ( cy 2 ) sin 2 ( cy 2 ) i cos( cy 2 ) sin 3 ( cy 2 ) -i cos( cy 2 ) sin 3 ( cy 2 ) sin 4 ( cy 2 )     dy =     a 1 0 0 a 2 0 a 2 -a 2 0 0 -a 2 a 2 0 a 2 0 0 a 3     , where a 1 = 3 8 + 1 2 sinc(cπ) + 1 8 sinc(2cπ) a 2 = 1 8 - 1 8 sinc(2cπ) a 3 = 3 8 - 1 2 sinc(cπ) + 1 8 sinc(2cπ). We can easily obtain the eigenvalues of this matrix, which are λ 1 = 3 8 + 1 8 sinc(2πc) + 1 8 (1 -sinc(2πc)) 2 + 16sinc(πc) 2 λ 2 = 1 4 - 1 4 sinc(2πc) λ 3 = 3 8 + 1 8 sinc(2πc) - 1 8 (1 -sinc(2πc)) 2 + 16sinc(πc) 2 λ 4 = 0, (A.9) where λ 1 > λ 2 ≥ λ 3 > λ 4 for all c ∈ [0, 1]. With c = 1, the eigenvalues become 1 2 , 1 4 , 1 4 , 0, respectively. Now we can examine the impact of bandwidth on the eigenvalues (see Eq. A.9) of the integral operator. We first observe that for c → 0, all eigenvalues except the top eigenvalue become zero; that is, λ 1 → 1 and λ 2 , λ 3 , λ 4 → 0. This confirms our intuition about the impact of bandwidth on the spectrum of the integral operator. This also implies that for small c the approximate dimension of the space spanned by the training data will be 1, which is consistent with the observation that in this limit the feature maps become constant. For an n-qubit system and an input data distribution that factorizes over the dimensions, the kernel simply becomes the direct product of the n copies of the single-qubit system. Since the n qubits are completely decoupled, the resulting kernel in Eq. 6 has eigenvalues of the form η n1n2n3n4 = λ n1 1 λ n2 2 λ n3 3 λ n4 4 , n 1 + n 2 + n 3 + n 4 = n, n 1 , n 2 , n 3 , n 4 ∈ Z + ∪ {0}, where the nonzero eigenvalues are obtained by setting n 4 = 0 since λ 4 = 0. Here, we note that the number of zero eigenvalues grows exponentially with number of qubits as 4 n -3 n . However, its ratio to the total number of eigenvalues vanishes since #{η n1n2n3n4 = 0} #{η n1n2n3n4 } = 4 n -3 n 4 n n→∞ ----→ 0; therefore the bulk of the spectrum remains nonzero. For c ∼ O n (1), the spectrum remains flat as n → ∞. This can be easily seen with the case c = 1 where the eigenvalues are given by η k = 2 -n 2 -k , where k = n 2 + n 3 and takes values in {0, . . . , n}. Each eigenvalue η k is degenerate with N (n, k) = 2 k n k , and of course n k=0 N (n, k) = 3 n gives the number of nonzero eigenvalues. To obtain a nonflat spectrum, we need eigenvalues to scale with the number of qubits n. In the next section, we do so by imposing scaling conditions on the eigenvalues. For completeness, we also provide the unnormalized eigenfunctions of the kernel using the eigenvectors of Σ. Inverting the Vec operation, we get the matrices H 1 = 4sinc(πc)+ √ (1-sinc(2πc)) 2 +16sinc(πc) 2 1-sinc(2πc) 0 0 1 , H 2 = 0 -1 1 0 H 3 = 4sinc(πc)- √ (1-sinc(2πc)) 2 +16sinc(πc) 2 1-sinc(2πc) 0 0 1 , H 4 = 0 1 1 0 . The corresponding eigenfunctions are given by ϕ 1 (x) = Tr ρ(x)H i and become ϕ 1 (x) = sin 2 cx 2 + cos 2 cx 2 4sinc(πc) + (1 -sinc(2πc)) 2 + 16sinc(πc) 2 1 -sinc(2πc) ϕ 2 (x) = i sin(cx) ϕ 3 (x) = sin 2 cx 2 + cos 2 cx 2 4sinc(πc) -(1 -sinc(2πc)) 2 + 16sinc(πc) 2 1 -sinc(2πc) ϕ 4 (x) = 0. Setting c = 1, we obtain the eigenfunctions given in Kübler et al. (2021) : ϕ 1 (x) = 1, ϕ 2 (x) = i sin(x), ϕ 3 (x) =cos(x), and ϕ 4 = 0. Note that unlike the c = 1 case, the eigenfunction ϕ 1 (x) in general is not constant.

B.1 SCALING RESTRICTIONS TO THE BANDWIDTH

The argument given by Kübler et al. (2021, Theorem 1) is that when the largest eigenvalue of the kernel is sufficiently small compared with the sample size, the generalization error is lower bounded by the L 2 norm of the target function with probability at least 1ϵ as E g ≥ (1 -ϵ) f 2 = (1 -ϵ) k ā2 k , which matches our result from Sec. 4. The result in Kübler et al. (2021) depends on the exponentially small largest eigenvalue of the kernel compared with the amount of training samples. In fact, from Eq. 9 it easily follows that for a polynomial number of training samples P ∼ n l and exponentially suppressed largest eigenvalue η max ∼ 2 -n , the learning is impossible as n → ∞. Kübler et al. (2021, Lemma 1) proves that the largest eigenvalue of the kernel is upper bounded by the so-called purity: η max ≤ M µ , where purity is given by M µ = µ(dx)µ(dx ′ )k(x, x ′ ). We also demonstrate their proof here for the reader's convenience. Consider a normalized kernel satisfying k(x, x) = 1 for all x. The normalized eigenfunction ϕ max (x) corresponding to the largest eigenvalue η max is L 2 bounded by the constant function η -1/2 max 1(x) since 1 = k(x, x) > η max ϕ max (x) 2 . Here 1(x) = 1 is the constant function. This immediately implies that η max = µ(dx)µ(dx ′ )k(x, x ′ )ϕ max (x)ϕ max (x ′ ) ≤ η -1 max µ(dx)µ(dx ′ )k(x, x ′ )1(x)1(x ′ ) = η -1 max M µ . Given this bound, we demand that the bandwidth should scale such that the purity stays constant with respect to the number of qubits n. For our example kernel, this condition translates into M µ = 1 2 n 1 + sinc(πc(n)) n . Inverting this equation is not possible. However, its numerical solution yields a scaling for bandwidth as c(n) = a √ n , (A.10) where a ∼ O n (1) depends on the fixed purity M µ . Note that this is a lower bound for the bandwidth to keep purity from inversely scaling with n. In principle, we could allow purity to increase with n depending on the target function. For example, c(n) = an -∞ → 0 yields perfect purity since there is only a single mode. Hence, we conclude that the bandwidth should at least scale as c = an -α , α ≥ 1 2 . We remark, however, that the spectrum will collapse to a single mode for large exponents α and generalization will not be possible except for very specific target functions.

B.2 SCALING OF EIGENVALUES WITH BANDWIDTH

Using the bandwidth scaling derived in Eq. A.10, we now study the scaling of eigenvalues at the large qubit limit n → ∞. Asymptotically, the kth power of these eigenvalues looks like λ k 1 ≈ 1 - a 2 π 2 6n k + O 1 n 2 λ k 2 ≈ a 2 π 2 6n k 1 - a 2 π 2 5n k + O 1 n 2 λ k 3 ≈ a 4 π 4 180n 2 k 1 + a 2 π 2 42n k + O 1 n 2 . Notice that with this scaling of the bandwidth parameter, the largest eigenvalue remains constant asymptotically. We also remark that eigenvalues composed of a large number (k ≈ n) of λ 2 and λ 3 scale as e -n log n , and we consider them decoupled since none of these modes can be learned with a polynomial amount of data. Hence, we conclude that the spectral bias induced by the bandwidth restricts the space of learnable functions to lie in the space spanned by eigenfunctions of the form |ψ 1 ⟩ ⊗(n-n2-n3) |ψ 2 ⟩ ⊗n2 |ψ 3 ⟩ ⊗n3 , such that n 2 + n 2 ≪ n. It can be shown that the hierarchy of eigenvalues obtained in this way scale polynomially with n, as discussed in Sec. 4. In Table B .2, we present the first few eigenvalue scalings where N (n, k) denotes the number of eigenvalues with scaling η k,z ∼ O(n -k ) and |Ψ⟩ denotes the corresponding states. We denote each eigenvalue η k,z with two indices: k corresponds to the scaling of the eigenvalue as n -k , and z = 1, . . . , N (n, k) indexes the N (n, k) eigenvalues with the same scaling.  n 0 1 |ψ 1 ⟩ ⊗n n -1 n 1 |ψ 1 ⟩ ⊗(n-1) |ψ 2 ⟩ n -2 n 2 + n 1 |ψ 1 ⟩ ⊗(n-2) |ψ 2 ⟩ ⊗2 , |ψ 1 ⟩ ⊗(n-1) |ψ 3 ⟩ n -3 n 3 + n-1 1 n 1 |ψ 1 ⟩ ⊗(n-3) |ψ 2 ⟩ ⊗3 , |ψ 1 ⟩ ⊗(n-2) |ψ 2 ⟩ |ψ 3 ⟩ n -4 n 4 + n-1 2 n 1 + n 2 |ψ 1 ⟩ ⊗(n-4) |ψ 2 ⟩ ⊗4 , |ψ 1 ⟩ ⊗(n-3) |ψ 2 ⟩ ⊗2 |ψ 3 ⟩ , |ψ 1 ⟩ ⊗(n-2) |ψ 3 ⟩ ⊗2 B.

3. BANDWIDTH AND PROJECTED (BIASED) KERNELS

An alternative way to control the inductive bias of the quantum model is to define the kernel in terms of the reduced density matrix (e.g., single-qubit): ρ(x) = Tr [1...n-1] (ρ(x)), where Tr [1...n-1] (•) denotes the partial trace over qubits 1, . . . , n -1 of a n-qubit system. For a detailed discussion of such kernels, the interested reader is referred to Kübler et al. (2021) ; Huang et al. (2021) . Here, we briefly comment on the similarities and differences between the impacts of projection and bandwidth tuning on the spectrum of the kernel. As shown in (Kübler et al., 2021, Theorem 2) , the spectrum of a generic projected kernel has one constant (with n) eigenvalue, and the rest are exponentially small with n. Contrast that with the spectrum of the bandwidth-equipped kernel given in Table B .2. Similarly to projected kernels, in bandwidth-equipped kernels the first eigenvalue stays constant as the number of qubits grows. However, the spectrum decay behavior is different, since the eigenvalues decay polynomially and not exponentially with n. This leads to a qualitatively different inductive bias, which may be beneficial in some settings.

B.4 BANDWIDTH AND TRAINABILITY OF QUANTUM NEURAL NETWORKS

The phenomenon of flat spectrum of the quantum kernels is deeply connected to the barren plateaus phenomenon in quantum neural networks (QNNs) (McClean et al., 2018) since both stem from the exponential dimensionality of the space in which the classical data points are embedded (Kübler et al., 2021; Holmes et al., 2022) . "Barren plateaus" in the context of QNNs refers to the gradients of the loss function becoming exponentially small with the number of qubits for sufficiently deep QNNs because of the loss function concentrating around its mean in high-dimensional quantum Hilbert space. Notably, a mechanism analogous to rescaling the bandwidth has been observed to enable training of quantum neural networks. Zhang et al. (2022) show that if the parameters are initialized from a Gaussian distribution with zero mean and variance O( 1 L ) for circuits of depth L, the barren plateaus are provably avoided. Rescaling the initialization of trainable parameters avoids barren plateaus by limiting the effective dimensionality of the subspace of the quantum Hilbert space being used. This is analogous to how scaling down of the data controls the bandwidth and the spectrum of quantum kernels, with the connection coming from the equivalency between quantum kernel methods and infinitely deep QNNs (Schuld, 2021) .

C GENERALIZATION ERROR IN KERNEL RIDGE REGRESSION

In this section we review the theoretical generalization error curves for kernel ridge regression developed by Bordelon et al. (2020) ; Canatar et al. (2021) and extend our results to the cases with a nonzero ridge parameter and noise on the labels. For kernel machines, a reproducing kernel Hilbert space H defines a set of functions over which the empirical loss function is minimized. Consider a training set D = {x µ , y µ } P µ=1 , where the inputs are drawn i.i.d. from a distribution p(x) on x ∈ X and the labels are generated through a target function f (x) as y µ = f (x µ ) + ϵ µ , where ϵ µ ∼ N (0, σ 2 ) is an additive noise with variance σ 2 . Then the predictor is given by minimizing the empirical mean-squared-error over H: f * (x) = arg min f ∈H 1 2 P µ=1 f (x µ ) -y µ 2 + λ 2 ∥f ∥ 2 H , (A.11) where λ is the ridge parameter regularizing the Hilbert norm of the predictor. Associated with the RKHS H is a positive semi-definite kernel k(x, x ′ ) satisfying the reproducing property: ⟨k(x, •), f (•)⟩ H = f (x), where ⟨•, •⟩ H is the Hilbert inner product on H. A basis for H can be obtained by solving the integral eigenvalue problem with respect to the input distribution p(x): k(x, x ′ )ϕ k (x ′ )p(x ′ )dx ′ = η k ϕ k (x), ϕ k (x)ϕ l (x)p(x)dx = δ kl , where {ϕ k (x)} is a basis for L 2 (X ) with respect to the distribution p(x). A normalized basis for the RKHS H is obtained by the features ψ k (x) ≡ √ η k ϕ k (x) that satisfy ⟨ψ k (•), ψ l (•)⟩ H = δ kl . With these bases, the kernel can be decomposed as k(x, x ′ ) = k η k ϕ k (x)ϕ k (x ′ ) = k ψ k (x)ψ k (x ′ ). Furthermore, any target function in L 2 (X ) can be decomposed as f (x) = k āk ϕ k (x) = k āk √ η k ψ k (x), ∥f ∥ 2 H = k ā2 k η k . Note that a function belongs to the RKHS only if ∥f ∥ H < ∞. In the case where K(x, x ′ ) has zero eigenvalues while the function f has components along the corresponding eigenfunctions, this function is said to be out-of-RKHS (since ∥f ∥ H = ∞), and a kernel machine can learn only the components along the nonzero eigenvalues. We show that the formula for generalization error in Canatar et al. (2021, Eq. 4 ) also extends to out-of-RKHS targets by appropriately taking the η k → 0 limit. Given the P × P kernel Gram matrix K µν = k(x µ , x ν ), the solution to the kernel regression problem Eq. A.11 is f * (x) = k(x) ⊤ (K + λI) -1 y, where k(x) is a P -dimensional vector with components k(x) µ = k(x, x µ ) and y µ = y µ is a Pdimensional vector of the labels. Then generalization error, as function of number of training samples P and the dataset D, is defined as E g (P, D) = f * (x) -f (x) 2 p(x)dx. However, the dependency of this quantity to the particular choices of datasets of size P makes it analytically intractable. Instead, we are interested in the averaged generalization error ⟨E g (P, D)⟩ D over the datasets of size P , which has been calculated using replica theory in Canatar et al. (2021) . As a function of number of training samples P , ridge parameter λ, and variance of label noise σ 2 as well as the kernel eigenvalues {η k } and the target weights {ā k }, the result for ⟨E g (P, D)⟩ D becomes (Canatar et al., 2021) : E g (P ) = κ 2 1 -γ k ā2 k (P η k + κ) 2 + σ 2 γ 1 -γ , (A.12) where κ = λ + κ k η k P η k + κ , γ = k P η 2 k (P η k + κ) 2 . Here κ is to be solved self-consistently, and it acts as an effective ridge parameter that depends on the kernel eigenvalues and number of training samples. Even in the absence of an explicit ridge parameter (i.e. λ = 0), implicit regularization prevents the predictor from having large variance. ā2 k,z as the total weight at scaling k. Plugging these quantities in Eq. A.12, we get E g (P ) = κ 2 1 -γ k N (n,k) z=1 ā2 k,z (P η k,z + κ) 2 + σ 2 γ 1 -γ , κ = λ + κ k N (n,k) z=1 η k,z P η k,z + κ , γ = k N (n,k) z=1 P η 2 k,z (P η k,z + κ) 2 . Furthermore, we made the approximation that η k,z ≈ η k,z ′ for all z, z ′ since, in large n limit, modes in the same scaling differ from each other with some O n (1) quantity. Hence, we drop the index z. Then, in terms of ηk ≡ N (n, k)η k , generalization error simplifies to E g (P ) = κ 2 1 -γ k ā2 k (α k ηk + κ) 2 + σ 2 γ 1 -γ , κ = λ + κ k ηk α k ηk + κ , γ = k α k η2 k (α k ηk + κ) 2 , where we define α k ≡ P N (n,k) denoting the learning stage. Now, consider the number of samples P to scale with O(n l ) for some integer l. Since N (n, k) ∼ O(n l ), as n → ∞ the quantity α k becomes α k<l = ∞, α k=l ∼ O(1), α k<l ≈ 0. Therefore, in the large n limit, generalization error simplifies greatly and becomes E g (P ) = κ 2 1 -γ ā2 l (α l ηl + κ) 2 + σ2 γ 1 -γ + k>l ā2 k , γ = α l η2 l (α l ηl + κ) 2 , where σ2 = σ 2 + k>l ā2 k is the effective noise and κ has an explicit solution: κ =            1 2 ( λ + ηl -ηl α l ) 1 + 1 + 4 λη l α l ( λ+η l -η l α l ) 2 α l ≤ 1 + λ/η l 1 2 ( λ + ηl -ηl α l ) 1 -1 + 4 λη l α l ( λ+η l -η l α l ) 2 α l ≥ 1 + λ/η l , where λ = λ + k>l ηk is the effective ridge parameter and describes the implicit regularization of the kernel model. Note that the total power beyond mode-l acts as label noise and also irreducible error.

C.2 OUT-OF-RKHS TARGET FUNCTIONS AND LABEL NOISE

We treat the case where target function has out-of-RKHS components by setting eigenvalues with indices in an index set I in the generalization error formula to zero; that is, η k∈I = 0: E g (P ) = κ 2 1 -γ k ā2 k (P η k + κ) 2 + σ 2 γ 1 -γ = κ 2 1 -γ k̸ ∈I ā2 k (P η k + κ) 2 +   σ 2 + k∈I ā2 k   γ 1 -γ + k∈I ā2 k , where κ and γ are again κ = λ + κ k̸ ∈I η k P η k + κ , γ = k̸ ∈I P η 2 k (P η k + κ) 2 . Notice that target power placed on the modes corresponding to zero eigenvalues act both as label noise and irreducible error (Canatar et al., 2021) . This implies that the inaccessible modes in target function due to small training set sizes simply lie outside the effective RKHS defined by the accessible, large eigenvalues. This also implies that very large bandwidths can also impair generalization; for c ≈ 0 only a single non-zero eigenvalue survives and therefore generic targets which may have many modes corresponding to the remaining zero eigenvalues lie outside the effective RKHS. Therefore, the extreme case of very large bandwidth also creates a problem. This is just a restatement of the well-known bias-variance trade-off.

D BANDWIDTH MAKES BOUNDS ON GENERALIZATION VACUOUS

The following is a sketch of how the main theorem of Kübler et al. (2021) becomes vacuous ("fails") in a certain context where we can guarantee that k(x, x ′ ) is lower bounded by some bandwidthdependent constant. We first note that this cannot be a positive proof: nothing about lower bounding k(x, x ′ ) can provide a guarantee on classifier accuracy. Rather, this scenario just shows a context in which a lower bound on the ridge regression classifier accuracy based on the largest eigenvalue η max is no longer effective at showing a failure of quantum kernel methods. Now, we suppose that we can use bandwidth to require that states are "not too far away" in Hilbert space. More specifically, we suppose that there is some function ∆ c such that .13) Note that this does not interfere with the requirement that k is L µ 2 integrable since we assume that k is defined on a restricted support x ∈ [-π, π] n (without this assumption, k is not integrable in a more general treatment). We will show that some choice of ∆ c always ensures that the largest eigenvalue of K (and therefore the largest eigenvalue of T k with high probability) is bounded. Denote the eigenvalues of K as η k , and in particular let η max be the largest eigenvalue of K and Ku = η max u for some eigenvector u ∈ R P . By definition, η max = max ∥v∥=1 ⟨v, Kv⟩ for all v ∈ R P , and in particular k(x µ , x ν ) ≥ ∆ c . (A η max = ⟨u, Ku⟩ ⟨u, u⟩ ≥ ⟨1, K1⟩ ⟨1, 1⟩ = 1 P P µ,ν=1 K µν ≥ (P -1)∆ c , where 1 is the vector of all ones and we have applied the inequality of Eq. A.13. Proposition 10 of Rosasco et al. (2010) states that Pr   sup k η k P -γ k ≤ 2 log 4/δ 2 P    ≥ 1 -δ, where we contrast the empirical eigenvalues η k with the eigenvalues γ k of the integral operator T k . Note that the empirical eigenvalues η k → γ k as P → ∞. Hence, with probability at least 1δ it holds that η max - P -1 P ∆ c ≤ 2 log 4/δ 2 P . (A.14) Theorem 1 of Kübler et al. (2021) states that, with probability at least 1ϵη max P 4 , the empirical risk for KRR with penalty λ and P training data is lower bounded by R emp (f λ m ) ≥ 1 - 2η max P 2 ϵ ∥f ∥ 2 . (A.15) From Eq. A.14, however, we see that η max approaches a constant ∆ c at a rate of O(1/ √ P ); for sufficiently large P , Eq. A.15 holds with vanishing probability, and for all other choices of P the bound becomes vacuous with high probability under the condition that 2η max P 2 /ϵ ≥ 1, which may be achieved within O(1/ √ P ) precision by choosing ∆ c ≥ P P -1 ϵ 2P 2 . Importantly, this outcome does not guarantee that KRR using k satisfying the inequality in Eq. A.13 will achieve good generalization error. In particular, the choice ∆ c = 1 will result in T k having a single nonzero eigenvalue associated with the constant function. Rather, this demonstration reemphasizes that there are two conditions to successful classification using quantum kernels: (i) the kernel should be chosen such that the eigenfunctions of T k align with the target function, and (ii) the corresponding eigenvalues should be large. By lower bounding k in this way, we can guarantee condition (ii); however, successful generalization will still depend on a choice of k satisfying condition (i).

E.1 EXPERIMENTS WITH TOY MODEL

In Figs. 1 and 2 in the main text, we consider the toy kernel k (x, x ′ ) = n i=1 cos c (xi-x ′ i ) 2 for varying bandwidth parameter c and n-dimensional input data x ∈ [-π, π] n and drawn uniformly (Kübler et al., 2021) . We generate a dataset of size P by uniformly sampling P input points and computing the corresponding labels using a target function f (x). We denote the vector of labels by ȳ ∈ R P and denote the kernel Gram matrix by K whose elements are K µν = k(x µ , x ν ). We obtain the eigenvalues and eigenvectors of the kernel by solving the empirical eigenvalue problem: 1 P P ν=1 K µν Φ ν,k = η k Φ µ,k , 1 P P µ=1 Φ µ,k Φ µ,l = δ kl , where Φ µ,k is the matrix of eigenvalues whose columns are the orthonormal eigenvectors and {η k } P k=1 are the eigenvalues. Note that we obtain at most P eigenmodes with P samples and hence k runs from 1, . . . , P . Finally, we obtain the target weights by projecting the targets on the eigenvectors of K: a = 1 P Φ ⊤ ȳ. Using the eigenvalues {η k } P k=1 and target weights a, we directly compute the generalization error by plugging them in Eq. A.12. To perform the experiments, we used the Kernel Generalization code by Canatar et al. (2021) and utilized a single NVIDIA V100 GPU with 32 GB of RAM. In Fig. E .1, we present the same experiment as Fig. 2 but for different input dimensions n. We find that the optimal bandwidth parameter is c * = 2/n. Therefore, the optimal scaling of the bandwidth parameter is O(n -α ) for α = 1 in this special case. Note that bandwidth changes both the eigenvalues and the eigenfunctions of the kernel that affect spectral bias and task-model alignment, respectively. For certain tasks, faster decaying bandwidths might improve the task-model alignment and hence yield better generalization. Bandwidth c = 1 yields a constant learning curve. While all c < 1 kernels provide improvement, there is an optimal bandwidth parameter c * ≈ 2/n that gives the best task-model alignment. Regularization with a small ridge parameter λ = 10 -10 is applied for numerical stability.

E.2 BANDWIDTH IN QUANTUM MACHINE LEARNING ARCHITECTURES

We use the experimental data provided by Shaydulin & Wild (2021) . 1 We use the kernel given by the instantaneous quantum polynomial-time (IQP) circuit feature map (Shepherd & Bremner, 2009; Havlíček et al., 2019; Huang et al., 2021) and Hamiltonian evolution circuit (EVO) feature map (Huang et al., 2021; Shaydulin & Wild, 2021) and real datasets FMNIST (Xiao et al., 2017) , KMNIST (Clanuwat et al., 2018), and PLAsTiCC (The PLAsTiCC team et al., 2018) . Since the dimensionality of the datapoints in these datasets is too large (e.g., 784 for FMNIST and KMNIST) and leads to quantum circuits that cannot be simulated by using available tools, the inputs were downsized to 22-dimensions by using PCA (Shaydulin & Wild, 2021) . Following Shaydulin & Wild (2021) ; Huang et al. (2021) , we consider a binary classification problem where for each dataset, only two classes were chosen (see Shaydulin & Wild (2021) for the details on data preprocessing). For n-dimensional inputs, the quantum circuit used to compute the n-qubit IQP kernel is given by U IQP (x) = U Z (x)H ⊗n U Z (x)H ⊗n , U Z (x) = exp   c n j=1 x j Z j + c 2 n j,j ′ =1 x j x j ′ Z j Z j ′   , where H is the Hadamard gate and Z is the Pauli Z-gate (see Havlíček et al. (2019) ). This unitary acts on the n-qubit ground state to embed an input x µ to a quantum state |x µ ⟩ = U IQP (x µ ) |0⟩ ⊗n . Then the resulting feature map is given by ρ IQP (x µ ) = |x µ ⟩ ⟨x µ | with the corresponding quantum kernel K IQP (x µ , x ν ) = Tr ρ IQP (x µ )ρ IQP (x ν ) . For n-dimensional inputs, the quantum circuit used to compute the EVO kernel (Huang et al., 2021; Shaydulin & Wild, 2021) has n + 1 qubits and is given by U EVO (x) = n j=1 e -icxij (Xj Xj+1+Yj Yj+1+Zj Zj+1) . Here, c parameterizes time evolution and corresponds to the bandwidth of the resulting kernel. The initial (n + 1)-qubit state is given by |Ψ 0 ⟩ = n+1 j=1 |ψ j ⟩ , where each |ψ j ⟩ is randomly generated with respect to a single-qubit Haar measure (Huang et al., 2021) . Then the quantum embedding of a sample x µ is |x µ ⟩ = U EVO (x µ ) |Ψ 0 ⟩ with the feature map ρ EVO (x µ ) = |x µ ⟩ ⟨x µ | and kernel K EVO (x µ , x ν ) = Tr ρ EVO (x µ )ρ EVO (x ν ) . In both cases, the resulting kernel is conjectured to be intractable to compute analytically, and both models utilize Hilbert spaces that are exponentially large in the number of qubits n. These quantum circuits were simulated in Shaydulin & Wild (2021) using Qiskit (Abraham et al., 2019) software to compute the kernel Gram matrices on the data. Then the resulting kernels were used to perform SVM for the binary classification task. The datasets were split into 800 training sets and 200 test sets. Each input was downsized to 22 dimensions using PCA, which leads to 2 22 -and 2 23 -dimensional Hilbert spaces for IQP and EVO circuits, respectively (Shaydulin & Wild, 2021) . The code for accessing and processing the data was obtained at https://github.com/rsln-s/ Importance-of-Kernel-Bandwidth-in-Quantum-Machine-Learning/.

KERNEL RIDGE REGRESSION WITH REALISTIC QUANTUM KERNELS

Apart from the classification task shown in the main text, we also use the same quantum kernels to perform kernel ridge regression on real data as shown in Figure A.2. We again find that there is an optimal bandwidth for both kernels signaled by low test loss. We have obtained the optimal bandwidths through k-fold cross-validation for the SVM task. In Figure A .3, we report our results for each kernel method on all three datasets. Furthermore, we present the eigenvalues and target weights corresponding to both quantum model on all three dataset domains in Figure A.4 and Figure A.5 , respectively. We find that the spectrum in all cases are flat without the bandwidth, and that the bandwidth improves the spectral properties in all cases. However, the task alignment with the quantum kernels depends significantly on the choice of the dataset, and it remains poor even with the bandwidth cure. This is in agreement with our arguments that bandwidth does not guarantee generalization, but only enables a model to potentially generalize if the target is suitable. Here, we also empirically show that the optimal bandwidth scales inversely with the number of qubits n as c * ∼ O(n -α ), where α ≥ 0.5. Using the data provided by Shaydulin & Wild (2021) , we first extract the maximum kernel eigenvalue for the IQP kernel on FMNIST dataset. The IQP kernel is evaluated for various input dimensions n (also the number of qubits) and various bandwidth parameters. First, we normalize each top eigenvalue η max (n) as a function of n with the maximum eigenvalue corresponding to the smallest qubit size η max (n 0 ), and define the quantity ηmax (n) = η max (n) η max (n 0 ) , where n 0 = 4 in this case. In Figure A.6a, we plot these normalized eigenvalues against the number of qubits, and we fit exponential curves to extrapolate the behavior for large qubits which are not accessible experimentally. As the number of qubits increase, the maximum eigenvalue corresponding to c = 1 kernel falls much faster than the kernels with c < 1 bandwidth as expected. Note that in Appendix B we found that the bandwidth prevents the maximum eigenvalues to fall exponentially fast in n using our toy model, and this is also what we observe here. Next, we consider a fixed eigenvalue η 0 = 0.8 line in (A.16) This is in agreement with the bound for the exponent we derived in Eq. A.10. Finally, in Figure A.7 and Figure A.8 , for both models when evaluated on the FMNIST data, we show the empirical scaling of the optimal bandwidth to keep their top eigenvalues constant for varying η 0 's. Again, we find that the decay exponent never violates α ≥ 0.5. Figure A.8: EVO Kernel: Empirical scaling of the optimal bandwidth with the number of qubits for all η 0 . Note that the empirical scaling never exceeds α = 0.5 for the optimal bandwidth c * ≈ n -α .



The code and the data are publicly provided byShaydulin & Wild (2021) at https://github.com/ rsln-s/Importance-of-Kernel-Bandwidth-in-Quantum-Machine-Learning/.



Figure2: A Eigenvalues of the kernel Eq. 6 with respect to data x ∼ Unif([-π, π] 40 ). Learnability is explained by the preservation of large-eigenvalue eigenspaces; without bandwidth, the model provably cannot learn in poly(n) complexity due to the flat spectrum. B The projections of the target f (x) = e -∥x∥ 2 /n 2 on the eigenvectors of the kernel for each bandwidth. Apart from the flatness of the c = 1 kernel, its eigenfunctions align poorly with the target. C Generalization error as a function of the number of training samples computed by using theory (solid lines) (Eq. 9) and performing kernel ridge regression empirically (dots). Bandwidth c = 1 yields a constant learning curve. While all c < 1 kernels provide improvement, an optimal bandwidth parameter c * ≈ 2/n gives the best task-model alignment.

DERIVATION OF EQ. 9 IN MAIN TEXT In Sec. 4 of the main text and in Appendix B, we have shown that the top eigenvalues η k,z of the kernel in Eq. 6 scale polynomially with the number of input dimensions, that is, η k,z ∼ O(n -k ), where the index k = 1, 2, . . . represents different scalings and index z = 1, . . . , N (n, k) represents the degenerate modes in scaling k. Note that the number of degenerate modes N (n, k) grows as O(n k ) such that ηk ≡ N (n, k)η k ∼ O(1). We also decomposed the target function onto the kernel basis as āk,z = f (x)ϕ k,z (x)p(x)dx and defined ā2 k ≡ N (n,k) z=1

Figure A.1: Generalization error as a function of the number of training samples computed by using both theory (solid lines) and performing kernel ridge regression empirically (dots). The target function is f (x) = e -∥x∥ 2 /n 2 , and data is drawn uniformly from Unif([-π, π] n ) for n = 20, 40, 80, 200. Bandwidth c = 1 yields a constant learning curve. While all c < 1 kernels provide improvement, there is an optimal bandwidth parameter c * ≈ 2/n that gives the best task-model alignment. Regularization with a small ridge parameter λ = 10 -10 is applied for numerical stability.

Figure A.2: Kernel Ridge Regression performed with k-fold cross-validation and λ = 0.1 ridge parameter yields the optimal bandwidth. The vertical axis shows the test loss of the estimator when evaluated on held-out data.

Figure A.6a, and in Figure A.6b  we analyze where this line intersects each of the normalized eigenvalues ηmax (n) corresponding to different bandwidth parameters c. Similar to our calculation in Appendix B for the toy kernel, we aim to find the scaling of the bandwidth with the number of qubits such that the maximum eigenvalue stays constant. By identifying the intersection points in Figure A.6b, we obtain a relation between the optimal bandwidth and the number of qubits as shown in Figure A.6c. In this case, we numerically find that the optimal bandwidth scales as: c * (n) ∝ n -0.506 .

Figure A.3: SVM performed with k-fold cross-validation yields the optimal bandwidth.

Figure A.4: Eigenvalues of the quantum kernels are always flat when the bandwidth is not tuned.

Figure A.5: Task-model alignment improves with bandwidth tuning. Note that a decaying eigenspectrum is not enough alone for generalizability. Empirically, we find that bandwidth improves both the eigenspectrum and the task-model alignment.

Figure A.7: IQP Kernel: Empirical scaling of the optimal bandwidth with the number of qubits for all η 0 . Note that the empirical scaling never exceeds α = 0.5 for the optimal bandwidth c * ≈ n -α .



Degeneracies N (n, k) of quantum states for the first few scalings.

