ArticlePDF Available

Experimental quantum kernel trick with nuclear spins in a solid

Authors:

Abstract

The kernel trick allows us to employ high-dimensional feature space for a machine learning task without explicitly storing features. Recently, the idea of utilizing quantum systems for computing kernel functions using interference has been demonstrated experimentally. However, the dimension of feature spaces in those experiments have been smaller than the number of data, which makes them lose their computational advantage over explicit method. Here we show the first experimental demonstration of a quantum kernel machine that achieves a scheme where the dimension of feature space greatly exceeds the number of data using ¹ H nuclear spins in solid. The use of NMR allows us to obtain the kernel values with single-shot experiment. We employ engineered dynamics correlating 25 spins which is equivalent to using a feature space with a dimension over 10 ¹⁵ . This work presents a quantum machine learning using one of the largest quantum systems to date.
ARTICLE OPEN
Experimental quantum kernel trick with nuclear spins
in a solid
Takeru Kusumoto
1,7
, Kosuke Mitarai
1,2,3,4,7
, Keisuke Fujii
1,2,4,5
, Masahiro Kitagawa
1,2
and Makoto Negoro
2,4,6
The kernel trick allows us to employ high-dimensional feature space for a machine learning task without explicitly storing features.
Recently, the idea of utilizing quantum systems for computing kernel functions using interference has been demonstrated
experimentally. However, the dimension of feature spaces in those experiments have been smaller than the number of data, which
makes them lose their computational advantage over explicit method. Here we show the rst experimental demonstration of a
quantum kernel machine that achieves a scheme where the dimension of feature space greatly exceeds the number of data using
1
H nuclear spins in solid. The use of NMR allows us to obtain the kernel values with single-shot experiment. We employ engineered
dynamics correlating 25 spins which is equivalent to using a feature space with a dimension over 10
15
. This work presents a
quantum machine learning using one of the largest quantum systems to date.
npj Quantum Information (2021) 7:94 ; https://doi.org/10.1038/s41534-021-00423-0
INTRODUCTION
Quantum machine learning is an emerging eld that has attracted
much attention recently. The major algorithmic breakthrough was
an algorithm invented by HarrowHassidim-Lloyd
1
. This algorithm
has been further developed to more sophisticated machine
learning algorithms
2,3
. However, a quantum computer that is
capable of executing those algorithms is yet to be realized. At
present, noisy intermediate-scale quantum (NISQ) devices
4
, which
consist of several tens or hundreds of noisy qubits, are the most
advanced technology. Although their performance is limited
compared to the fault-tolerant quantum computer, simulation of
the NISQ devices with 100 qubits and sufciently high gate delity
are beyond the reach for the existing supercomputer and classical
simulation algorithms
57
. This fact motivates us to explore its
power for solving practical problems.
Many NISQ algorithms for machine learning have been
proposed in recent works
817
. Almost all of the algorithms require
us to evaluate an expectation value of an observable, which is
sometimes troublesome to measure by sampling, for example
with superconducting or trapped-ion qubits. On the other hand,
NMR can evaluate the expectation value with a one-shot
experiment owing to its use of a vast number of duplicate
quantum systems. It is, therefore, a great testbed for those
algorithms. A major weakness of NMR is that its initialization
delity is quite low; at the thermal equilibrium of room
temperature, the proton spins can effectively be described with
a density matrix ρeq ¼1
2ðIþϵIzÞwith ϵ10
5
. Nevertheless,
ensemble spin systems can exhibit complex quantum dynamics
that are classically intractable. For example, the dynamical phase
transition between localization and delocalization has been
observed in polycrystalline adamantane along with tens of
correlated proton spins
18
. Discrete time-crystalline order has been
observed in disordered
19
and ordered
20,21
spin systems. Also, it
has been shown that general dynamics of NMR are classically
intractable under certain complexity conjecture
22,23
. These facts
strengthen our motivation to use NMR for NISQ algorithms.
In this work, we employ NMR for machine learning. Specically,
we implement the kernel-based algorithm which utilizes the
quantum state as a feature vector and is a variant of theoretical
proposals
8,9,24
. Ref.
25
has recently proved that this approach has a
rigorous advantage over classical computation in a specic task.
The experimental verication has been provided in refs.
15,26
using
either superconducting qubits or the photonic system. Our
strategy to use the NMR is advantageous in that we can estimate
the value of the kernel, which is the inner product of two quantum
states, by single-shot experiments. Moreover, the dimension of the
Hilbert space employed in this work greatly exceeds the number
of training data. We perform simple regression and binary
classication tasks using the dynamics of nuclear spins in a
polycrystalline adamantane sample, and observe that the
performance of the trained model becomes better as more spins
are involved in the dynamics. Also, to carry out the performance
analysis of our approach without the inevitable effect of noise in
experiments, we present numerical simulations of 20 spin
dynamics, which well agree with the experimental results. We
employ one of the largest quantum systems to date for a quantum
machine learning experiment in this work with the single-shot
setting that enables the use of a large quantum system.
RESULTS
Kernel methods in machine learning
In machine learning, one is asked to extract some patterns, or
features, in a given dataset
3,27
. It is sometimes useful to pre-
process them beforehand to achieve the objective. For example, a
speech recognition task might become easier when we work in
the frequency domain; in this case, the useful pre-processing
would be the Fourier transform. The space in which such pre-
processed data live is called feature space. For a given set of data
1
Graduate School of Engineering Science, Osaka University, Toyonaka, Osaka, Japan.
2
Center for Quantum Information and Quantum Biology, Osaka University, Toyonaka,
Osaka, Japan.
3
QunaSys Inc., Bunkyo, Tokyo, Japan.
4
JST, PRESTO, Kawaguchi, Saitama, Japan.
5
RIKEN Center for Quantum Computing (RQC), Wako, Saitama, Japan.
6
Institute for
Quantum Life Science, National Institutes for Quantum and Radiological Science and Technology, Inage-Ku, Chiba, Japan.
7
These authors contributed equally: Takeru Kusumoto,
Kosuke Mitarai. email: mitarai@qc.ee.es.osaka-u.ac.jp
www.nature.com/npjqi
Published in partnership with The University of New South Wales
1234567890():,;
fxigNd
i¼1RD, a feature space mapping ϕ(x) constructs the data in
the feature space fϕðxiÞgNd
i¼1RDf. The feature map has to be
carefully taken to maximize the performance in e.g.
classication tasks.
Kernel methods are a powerful tool in machine learning. It uses
a distance measure of two inputs dened as a kernel,
k:RDf´RDf!R. For example, a kernel can be dened as an
inner product of two feature vectors:
kðxi;xjÞ¼ϕðxiÞTϕðxjÞ:(1)
Many machine learning models, such as support vector
machine or linear regression, can be constructed using the kernel
only, that is, we do not have to explicitly hold ϕ(x). This
dramatically reduces the computational cost when the feature ϕ
(x) lives in a high-dimensional space. The direct approach that
computes and stores ϕ(x) for all training data xwould demand the
computational resource that is at least proportional to N
d
and
D
f
N
d
just for storing them, whereas the kernel method only
requires us to store a N
d
×N
d
kernel matrix with its (i,j) elements
being k(x
i
,x
j
).
Implementing kernel by NMR
In NMR, we can prepare a data-dependent operator A(x
i
)by
applying a data-dependent unitary transformation U(x
i
) on the
initial z-magnetization Iz¼Pn
μ¼1Iz;μ, that is, A(x
i
)=U(x
i
)I
z
U
(x
i
).
Here, I
α,μ
(α=x,y,z) is the α-component of the spin operator of the
μ-th spin and nrepresents the number of spins. A(x
i
) with a
sufciently large nis generally intractable by classical compu-
ters
22,23
. We employ this operator A(x
i
) as a feature map ϕ
NMR
(x
i
).
A(x
i
) can be regarded as a vector, for example, by expanding A(x
i
)
as a sum of Pauli operators. For an n-spin-1/2 system, A(x
i
)isa
vector in R4n. The dynamics of NMR can involve tens of spins
maintaining its coherence
18,2830
, which means we can employ an
approximately 4
O(10)
dimensional feature vector for machine
learning. Although the high-dimensional feature space does not
always mean superiority in machine learning tasks, the fact that
we can work with the feature space which has been intractable
with a classical computer motivates us to explore its power.
The kernel method opens up a way to exploit A(x
i
) directly for
machine learning purposes. While we cannot evaluate each
element of A(x
i
) because it takes an exponential amount of time,
we can evaluate the inner product of two feature vector A(x
i
) and
A(x
j
)efciently. The Frobenius inner product between two
operators A(x
i
) and A(x
j
)isTrAðxiÞAðxjÞ

, which we employ as
our NMR kernel function k
NMR
(x
i
,x
j
) in this work. Noting that,
Tr AðxiÞAðxjÞ

¼Tr UyðxjÞUðxiÞIzUyðxiÞUðxjÞIz

;(2)
and also at the thermal equilibrium, the density matrix of spin
systems is ρeq 1
2nIþϵIz
ðÞassuming ϵ1, we obtain,
Tr AðxiÞAðxjÞ

/Tr UyðxjÞUðxiÞρeqUyðxiÞUðxjÞIz

:(3)
The right hand side can be measured experimentally by rst
evolving the system at thermal equilibrium with U(x
i
) and then
with U
(x
j
), and nally measuring I
z
. A similar protocol is also used
for measuring out-of-time-ordered correlator (OTOC)
31,32
, which is
considered as a certain complexity measure of quantum many-
body systems.
Experimental
We propose to use U(x) for an input x¼fxjgD
j¼1that takes the
form of,
UxðÞ¼eiHðxDÞτeiHðx2ÞτeiHðx1Þτ;(4)
where τis a hyperparameter that determines the performance of
this feature map, and H(x
j
) is an input-dependent Hamiltonian
(Fig. 1b). In this work, we choose H(x
j
)tobe
HðxjÞ¼eixjIzX
μ<ν
dμν Iy;μIy;νIx;μIx;ν

eixjIz;(5)
where I
α
=
μ
I
α,μ
. The Hamiltonian H(0) can approximately be
constructed from the dipolar interaction among nuclear spins in
solids with a certain pulse sequence
18,33,34
shown in Fig. 1b. See
Methodsfor details. Shifting the phase of the pulse by xprovides
us H(x) for general x. This Hamiltonian with x
j
=0 created in
adamantane has been shown to have a delocalizing feature in
refs.
18,2830
, which makes it appealing as we wish to involve as
many spins as possible in the dynamics.
To illustrate character of the kernel function, we show the shape of
the kernel for one-dimensional input xobtained with this sequence
setting τ=Nτ
1
where τ
1
=60 μsandN=1, 2, , 6 as Fig. 1c. In this
experiment, the overall unitary dynamics applied to the system is
UyðxjÞUðxiÞ¼eiHðxjÞτeiH ðxiÞτ¼eixjIzeiH ð0ÞτeiðxixjÞIzeiHð0Þτeix iIz.
Since the initial state has only I
z
element and the nal observable
is also I
z
, we can omit eixiIzand eixjIzoperations in the experiment.
We, therefore, show the value of the kernel as a function of x
i
x
j
in Fig. 1c. The decay of the intensity of the signal with increasing N
is due to decoherence. The number of spins involved in this
dynamics can be inferred by the Fourier transform of the signal in
Fig. 1c with respect to x
i
x
j
. This is because the z-rotation
eiðxixjÞIzafter the forward dynamics e
iH(0)τ
induces a phase
eim0ðxixjÞto terms in the form of Im
±which appears in the density
matrix of the system, where mand m0are integers, jm0jm, and
I
±
=I
x
±iI
y
. This Fourier spectra is called multiple-quantum
spectra
18,30,31
, from which we can extract a cluster size K, which
can be considered as the effective number of spins involved in the
dynamics, by tting it with Gaussian distribution
expðm2=KÞ
18,30,33
. We show the Fourier transform of the
measured NMR kernel (Fig. 1c) along with corresponding Kin
Fig. 1d. We can conclude that, for N> 5, 6, the dynamics involve
25 spins, which corresponds to a feature space dimension of 4
25
10
15
.
One-dimensional regression task
As the rst demonstration, we perform the one-dimensional
kernel regression task using the kernel shown in Fig. 1c. To
evaluate the nonlinear regression ability of the kernel, we use
y¼sinð2πx=50Þand y¼sinð2πx=50Þ
2πx=50 , which will be refered to as sine
and sinc function, respectively. We randomly drew 40 samples of x
from [45, 45] (in degrees) to construct the traning data set which
consists of the input fxjg40
j¼1and the teacher fyjg40
j¼1calculated at
each x
j
. The NMR kernel k
NMR
(x
i
,x
j
) is measured for each pair of
data to construct the model by kernel ridge regression
27
. We let
the model predict yfor 64 xs including the training data. The
regularization strength was chosen to minimize the mean squared
error of the result at the 64 evaluation data.
The result for the sine function is shown in Figure 2a, b. That for
the sinc function is shown in Methods. Figure 3a shows the
accuracy of learning evaluated by the mean squared error
between the output from the trained model and true function.
We see that the regression accuracy tends to increase with a larger
N. For all N, the dimension of the feature space exceeds the
number of data as the dynamics involve over 5 spins which
corresponds to the Hilbert space dimension of 4
5
(see Fig. 1d).
However, because of the deteriorating signal-to-noise ratio, the
result also gets noisy with increasing N.
To certify the trend without the effect of noise, we conducted
numerical simulations of 20-qubit dynamics with all-to-all random
interaction in the form of Eq. (5), whose coupling strength, d
ij
, are
drawn uniformly from [1, 1]. We set the evolution time τ=0.01,
0.02, , 0.06. Details of the numerical simulations are described in
Methods. The result for the sine function is shown as Fig. 2gl. For
T. Kusumoto et al.
2
npj Quantum Information (2021) 94 Published in partnership with The University of New South Wales
1234567890():,;
the sinc function, we place the result in Methods. The mean
squared error of the prediction evaluated in the same manner is
shown in Fig. 3b. We can see the performance gets better with
increasing τ, which corresponds to increasing Nin the experiment.
This certies the trend observed in the NMR experiment.
Two-dimensional classication task
As the second demonstration, we implement two-dimensional
classication tasks. We employ the hard-margin kernel support
vector machine
27
and its implementation in scikit-learn
35
for this
task. We use two data sets which we call circleand moondata
set generated by functions available in scikit-learn package
35
.
They are depicted as dots in Fig. 4. A data set consists of pairs of
input data point (x
1
,x
2
)[45, 45]
2
and its label y{1, +1}. For
experimental simplicity, we have modied the generated (x
1
,x
2
)to
be on a lattice. The NMR kernels with N=1, 2, 3 are utilized in this
task. We again conducted numerical simulations with the same
setting as the previous section along with the experiment with
τ=0.03, 0.06, 0.09. The values of this numerical kernel are shown
in the Methods.
The results are shown in Fig. 4. Also for this classication task,
the dimension of feature space exceeds the number of data
already at N=1. Note that the evolution time, in this case, is
doubled compared to the previous demonstration where the
input is one-dimensional (see Eq. (4)), that is, the evolution time of
N=1 for two-dimensional input is equivalent to that of N=2 for
one-dimensional input. We also note that, for the moon dataset
with N=1 experimental NMR kernel, the kernel matrix was
singular, and we did not obtain a reliable result. We reason this to
the broadness of the kernel at N=1.
For the circle data set with the experimental kernel, the best
performance is achieved when N=1. We believe this is because
the task of classifying the circle dataset was too easy and did not
need large feature space. This dataset can be completely
classied, for example, by merely mapping two-dimensional data
(x
1
,x
2
) to three-dimensional feature space ðx1;x2;x2
1þx2
2Þ. As for
the moon dataset, the performance increased with increasing N.
This can be attributed to the increasing dimension of the
feature space.
DISCUSSION
In the one-dimensional regression task, we observed the trend of
better performance with longer evolution time. This can be
explained by the shape of the kernel generated by the NMR
dynamics, which is shown in Fig. 1c. As mentioned earlier, this
experiment is essentially the Loschmidt echo, and the shape of
the signal sharpens as the evolution time increases. The sharpness
of the kernel can directly be translated to the representability of
the model as it can be in the popular Gaussian kernel because this
property allows the machine to distinguish different data more
clearly. However, it also causes overtting problems if the data
points are sparse. The most extreme case is when we use a delta
function as a kernel, where every training point is learned with the
perfect accuracy while the trained model fails to predict for
unknown inputs. In our experimental case, we did not observe any
overtting problem, which means that our training samples were
Fig. 1 Experimental setups. a Adamantane molecule. The white and pink balls represent hydrogen and carbon atoms, respectively.
bQuantum circuit and pulse sequence employed in this work to realize evaluation of k
NMR
(x
i
,x
j
). The top right shows a pulse sequence for
x
1
=0, where X and Xrepresent +π/2 and π/2 pulses along x-axis, respectively. In the experiment, Δand Δ0are set 3.5 μs and 8.5 μs,
respectively. cNMR kernel employed in this work. dFourier transform of (c) which corresponds to the obtained
1
H multiple-quantum spectra
for N=1toN=6. Red line is Gaussian aexpðm2=KÞtted to the spectra using aand Kas tting parameters. The Gaussian is tted only to
even mdata points. Kis the cluster size of the system
18,30,33
.
T. Kusumoto et al.
3
Published in partnership with The University of New South Wales npj Quantum Information (2021) 94
dense enough for the sharpness of the kernel utilized in the
model, and thus we observed an increasing performance from the
improved representability of the kernel with longer evolution
time. For the classication task, we observed the dataset-
dependent trend with respect to the evolution time in the
performance. We suspect that there is an optimal evolution time
for this kind of task, which should be explored in future works. We
believe the performance can also be improved by employing
ensemble learning approach
36
.
We note that the shape of the kernel resembles the Gaussian
kernel which is widely employed in many machine learning tasks.
In fact, we can obtain better results using the Gaussian kernel as
shown in Methods. More concretely, it can achieve mean
squared error less than 10
5
for the regression tasks and hinge
loss of order 10
5
for the classication tasks without ne tuning of
a hyperparameter. While this fact casts a shadow on the
usefulness of the NMR kernel used in this work, it is also true
that the NMR dynamics evolved by general Hamiltonian cannot be
simulated classically under certain complexity conjecture
22,23
. This
leaves a possibility that the NMR kernel performs better than
classical kernel in some specic cases. We also note that there is a
quantum kernel that is rigorously advantageous over classical
ones in a certain machine learning task
25
. More experiments using
different Hamiltonians are required to test whether the "quantum
kernel has any advantage in machine learning tasks over widely
used conventional kernels.
The previous research
18,30,33
has shown that the cluster size can
be brought up to over 1000 with more precise experiments. This
indicates that the solid-state NMR is a platform well-suited to
experimentally analyze the performance of kernel-based quantum
machine learning. To extend the experiment to larger cluster sizes,
we have to resolve the low initialization delity of nuclear spin
Fig. 2 Demonstration of one-dimensional regression task of y¼sinð2πx=50Þ.a,bshows results for NMR kernel and numerically simulated
kernel, respectively. The blue dots, green lines, red dashed lines represent the training data, the prediction of the trained model, and the
function from which the function the training data are sampled.
Fig. 3 Mean squared error of the trained models for the regression task of sine and sinc functions. a,bshows results for experimental
NMR kernel and numerically simulated kernel, respectively.
T. Kusumoto et al.
4
npj Quantum Information (2021) 94 Published in partnership with The University of New South Wales
systems, which is a major challenge faced by the NMR quantum
information processing in general. We believe this can be
overcome by the use of e.g., a technique called dynamic nuclear
polarization
37,38
where we initialize the nuclear spin qubits by
transferring the polarization from initialized electrons.
To conclude, we proposed and experimentally tested a
quantum kernel constructed by data-dependent complex
dynamics of a quantum system. Experimentally, we used complex
dynamics of 25
1
H spins in adamantane to compute the kernel.
This allowed us to achieve a scheme where the dimension of
feature space greatly exceeds the number of data. We also stress
that the spin dynamics of NMR is generally intractable by a
classical computer
22,23
. Machine learning models for one-
dimensional regression tasks and two-dimensional classication
tasks were constructed with the proposed kernel. The experi-
mental and numerical results showed similar results. Experiments
along with numerical simulation also showed that the perfor-
mance of the model tended to increase with longer evolution
time, or equivalently, with a larger number of spins involved in the
dynamics for certain tasks. It would be interesting to export this
method to more quantum-oriented machine learning tasks. For
example, one may be able to distinguish two dynamical phases of
spin systems, such as localized and delocalized phases demon-
strated in ref.
18
, with the kernel support vector machine
employed in this work. More experiments are needed to verify
the power of this "quantum kernelapproach, but our results can
be thought of as one of the baselines of this emerging eld.
Note addedAfter the initial submission of this work, we
became aware of related works on quantum kernel methods
39,40
.
METHODS
Experimental details
A pulse sequence to realize H(0) is given in Supplementary Fig. 1. In the
experiment, we set the length of π/2 pulse, τ
p
, to 1.5 μs. For the waiting
period, we used Δ0¼2Δþτpwith Δ=3.5 μs, which makes the evolution
time for a cycle, τ
1
,60μs. By repeating the sequence for Ntimes, we can
effectively evolve the spins with eiHðxDÞτfor τ=Nτ
1
. NMR spectroscopy
with polycrystalline adamantane sample was performed at room
temperature with OPENCORE NMR
41
, operating at a resonant frequency
of 400.281 MHz for
1
H nucleus observation.
Detail of numerical simulation
We drew the interaction strength, d
μν
, from uniform distribution on [1, 1]
for all μ,ν. The evolution according to the Hamiltonian H(x)is
approximated by the rst-order Trotter formula, that is,
eiHðxÞτeixIzY
μ<ν
eiτdμ;νðIy;μIy;νIx;μIx;νÞ=M
"#
M
eixIz:(6)
We set τ=0.01, 0.02, , 0.06 and τ/M=0.001 in the simulation. In order
to reduce the computational cost, we set AðxÞ¼UðxÞQμI
2þIz;μ

UyðxÞ,
which allows us to evaluate Tr(A(x
i
)A(x
j
)) by computing 0
hj
UyðxjÞUðxiÞ0
ji
2,
where 0
ji
is the ground state of I
z
. Since we can compute this quantity by
simulating dynamics of a 2
20
-dimensional state vector, it is signicantly
easier than computing A(x)=U(x)I
z
U
(x) where we would need to simulate
dynamics of 2
20
×2
20
matrices. All simulations are performed with a
quantum circuit simulator Qulacs
42
.
One-dimensional regression task
We show the results for the regression task of sinc function performed with
the experimental NMR kernel and that of numerical simulations in
Supplementary Fig. 2.
Comparison with Gaussian kernel
Here, we perform the same machine learning tasks with Gaussian kernel
kðxi;xjÞ¼exp γkxixjk

, where γ> 0 is a hyperparameter.
First, we perform kernel regressions of sine and sinc functions using a
Gaussian kernel with γ=0.02. Results are shown as Supplementary Fig. 3.
Mean squared errors of the results are 1.3 × 10
6
and 6.1 × 10
8
for sine
and sinc functions, respectively.
Secondly, we perform kernel support vector machine on circle and
moon datasets using a Gaussian kernel with γ=0.5. Results are shown as
Supplementary Fig. 4. Hinge losses of the results are 7.9 × 10
5
and 5.2 ×
10
5
for circle and moon datasets, respectively.
Fig. 4 Demonstration of simple classication tasks. a Classication with the NMR kernel. Left and right panels respectively show the results
for circleand moondata set. The red and blue dots represent inputs (x
1
,x
2
) with label y=+1 and y=1, respectively. The background
color indicates the decision function of the trained model. The number in each gure is the hinge loss after training dened as
1
NsPNs
i¼1maxf1λiyi;0gwhere N
s
is the number of training data, and λ
i
and y
i
are the output from the trained model and the teacher data
corresponding to a training input x
i
. Top, middle, and bottom panels are the results with N=1, 2, 3 NMR kernels, respectively. bResults from
the numerically simulated quantum kernel. Top, middle, and bottom panels are the results with simulated kernel with τ=0.03, 0.06, 0.09. All
the other notations follow that of (a).
T. Kusumoto et al.
5
Published in partnership with The University of New South Wales npj Quantum Information (2021) 94
Kernel from the numerical simulations
The kernel computed from numerical simulations for one-dimensional
input is shown as Supplementary Fig. 5. It is shown as a function of
xx02
π
2;π
2

. We can observe the similar features as the experimental
one, such as the sharpening of the kernel with increasing evolution time.
Kernel for two-dimensional data
Let x=(x
1
,x
2
) and x0¼ðx0;x0Þbe two data points with which we wish to
evaluate the kernel kðx;x0Þ¼kðfx1;x2g;fx0;x0. We note that our
experimental kernel satises the equality: kðfx1;x2g;fx0;x0gÞ ¼
kðfx1x0;x2x0g;fx0x0;0. With this in mind, we dene
P1¼x1x0,P2¼x2x0,P3¼x0x0. The value of the experimental
and simulated kernel are sliced by the value of P
3
and shown in
Supplementary Figs. 68 and Supplementary Figs. 911, respectively.
DATA AVAILABILITY
Data are available upon reasonable requests.
CODE AVAILABILITY
Program codes are available upon reasonable requests.
Received: 8 June 2020; Accepted: 1 May 2021;
REFERENCES
1. Harrow, A. W., Hassidim, A. & Lloyd, S. Quantum algorithm for linear systems of
equations. Phys. Rev. Lett. 103, 150502 (2009).
2. Biamonte, J. et al. Quantum machine learning. Nature 549, 195 (2017).
3. Schuld, M. & Petruccione, F. Supervised Learning with Quantum Computers
(Springer, 2018).
4. Preskill, J. Quantum Computing in the NISQ era and beyond. Quantum 2,79
(2018).
5. Boixo, S. et al. Characterizing quantum supremacy in near-term devices. Nat. Phys.
14, 595600 (2018).
6. Villalonga, B. et al. Establishing the quantum supremacy frontier with a 281 Pop/
s simulation. Quantum Sci. Technol. 5, 034003 (2020).
7. Arute, F. et al. Quantum supremacy using a programmable superconducting
processor. Nature 574, 505510 (2019).
8. Mitarai, K., Negoro, M., Kitagawa, M. & Fujii, K. Quantum circuit learning. Phys. Rev.
A98, 032309 (2018).
9. Schuld, M. & Killoran, N. Quantum machine learning in feature hilbert spaces.
Phys. Rev. Lett. 122, 040504 (2019).
10. Benedetti, M. et al. A generative modeling approach for benchmarking and
training shallow quantum circuits. npj Quantum Inf. 5, 45 (2019).
11. Dallaire-Demers, P.-L. & Killoran, N. Quantum generative adversarial networks.
Phys. Rev. A 98, 012324 (2018).
12. Cong, I., Choi, S. & Lukin, M. D. Quantum convolutional neural networks. Nat. Phys.
15, 12731278 (2019).
13. Liu, J.-G. & Wang, L. Differentiable learning of quantum circuit Born machines.
Phys. Rev. A 98, 062324 (2018).
14. Huggins, W., Patil, P., Mitchell, B., Whaley, K. B. & Stoudenmire, E. M. Towards
quantum machine learning with tensor networks. Quantum Sci. Technol. 4,
024001 (2019).
15. Havlícek, V. et al. Supervised learning with quantum-enhanced feature spaces.
Nature 567, 209212 (2019).
16. Fujii, K. & Nakajima, K. Harnessing disordered-ensemble quantum dynamics for
machine learning. Phys. Rev. Appl. 8, 024030 (2017).
17. Ghosh, S., Opala, A., Matuszewski, M., Paterek, T. & Liew, T. C. H. Quantum
reservoir processing. npj Quantum Inf. 5, 35 (2019).
18. Álvarez, G. A., Suter, D. & Kaiser, R. Localization-delocalization transition in the
dynamics of dipolar-coupled nuclear spins. Science 349, 846848 (2015).
19. Choi, S. et al. Observation of discrete time-crystalline order in a disordered dipolar
many-body system. Nature 543, 221225 (2017).
20. Rovny, J., Blum, R. L. & Barrett, S. E. Observation of discrete-time-crystal signatures
in an ordered dipolar many-body system. Phys. Rev. Lett. 120, 180603 (2018).
21. Rovny, J., Blum, R. L. & Barrett, S. E.
3
1P NMR study of discrete time-crystalline
signatures in an ordered crystal of ammonium dihydrogen phosphate. Phys. Rev.
B97, 184301 (2018).
22. Morimae, T., Fujii, K. & Fitzsimons, J. F. Hardness of classically simulating the one-
clean-qubit Model. Phys. Rev. Lett. 112, 130502 (2014).
23. Fujii, K. et al. Impossibility of classically simulating one-clean-qubit model with
multiplicative error. Phys. Rev. Lett. 120, 200502 (2018).
24. Farhi, E. & Neven, H. Classication with quantum neural networks on near term
processors. arXiv:1802.06002. Preprint at http://arxiv.org/abs/1802.06002 (2018).
25. Liu, Y., Arunachalam, S. & Temme, K. A rigorous and robust quantum speed-up in
supervised machine learning. arXiv:2010.02174. Preprint at http://arxiv.org/abs/
2010.02174 (2020).
26. Bartkiewicz, K. et al. Experimental kernel-based quantum machine learning in
nite feature space. Sci. Rep. 10, 12356 (2020).
27. Bishop, C. M. Pattern Recognition and Machine Learning (Information Science and
Statistics) https://www.xarg.org/ref/a/0387310738 (Springer, 2011).
28. Krojanski, H. G. & Suter, D. Scaling of decoherence in wide NMR quantum reg-
isters. Phys. Rev. Lett. 93, 090501 (2004).
29. Krojanski, H. G. & Suter, D. Decoherence in large NMR quantum registers. Phys.
Rev. A 74, 062319 (2006).
30. Álvarez, G. A. & Suter, D. NMR quantum simulation of localization effects induced
by decoherence. Phys. Rev. Lett. 104, 230403 (2010).
31. Gärttner, M. et al. Measuring out-of-time-order correlations and multiple quan-
tum spectra in a trapped-ion quantum magnet. Nat. Phys. 13, 781786 (2017).
32. Wei, K. X., Ramanathan, C. & Cappellaro, P. Exploring localization in nuclear spin
chains. Phys. Rev. Lett. 120, 070501 (2018).
33. Baum, J., Munowitz, M., Garroway, A. N. & Pines, A. Multiple-quantum dynamics in
solid state NMR. J. Chem. Phys. 83, 20152025 (1985).
34. Warren, W. S., Weitekamp, D. P. & Pines, A. Theory of selective excitation of
multiple-quantum transitions. J. Chem. Phys. 73, 20842099 (1980).
35. Pedregosa, F. et al. Scikit-learn: machine learning in Python. J. Mach. Learn. Res.
12, 28252830 (2011).
36. Nakajima, K., Fujii, K., Negoro, M., Mitarai, K. & Kitagawa, M. Boosting computa-
tional power through spatial multiplexing in quantum reservoir computing. Phys.
Rev. Appl. 11, 034021 (2019).
37. Tateishi, K. et al. Room temperature hyperpolarization of nuclear spins in bulk.
Proc. Natl Acad. Sci. USA 111, 75277530 (2014).
38. Henstra, A., Lin, T.-S., Schmidt, J. & Wenckebach, W. High dynamic nuclear
polarization at room temperature. Chem. Phys. Lett. 165,610 (1990).
39. Otten, M. et al. Quantum machine learning using gaussian processes with per-
formant quantum kernels. arXiv:2004.11280. Preprint at http://arxiv.org/abs/
2004.11280 (2020).
40. Peters, E. et al. Machine learning of high dimensional data on a noisy quantum
processor. arXiv:2101.09581. Preprint at http://arxiv.org/abs/2101.09581 (2021).
41. Takeda, K. OPENCORE NMR: Open-source core modules for implementing an
integrated FPGA-based NMR spectrometer. J. Magn. Reson. 192,218229
(2008).
42. Suzuki, Y. et al. Qulacs: a fast and versatile quantum circuit simulator for research
purpose. arXiv:2011.13524. Preprint at https://arxiv.org/abs/2011.13524 (2020).
ACKNOWLEDGEMENTS
K.M. is supported by JSPS KAKENHI No. 19J10978, 20K22330, and JST PRESTO Grant
No. JPMJPR2019. K.F. is supported by KAKENHI No.16H02211, JST PRESTO
JPMJPR1668, JST ERATO JPMJER1601, and JST CREST JPMJCR1673. M.N. is supported
by JST PRESTO JPMJPR1666. This work is supported by MEXT Quantum Leap Flagship
Program (MEXT Q-LEAP) Grant Number JPMXS0118067394 and JPMXS0120319794.
We also acknowledge support from JST COI-NEXT program.
AUTHOR CONTRIBUTIONS
T.K. and K.M. contributed equally to this work. T.K. and M.N. conducted the
experiments. K.M. conceived the idea and designed the experiments. K.F. provided
the program code for simulations. M.K. and M.N. supervised the project. All authors
contributed to the manuscript.
COMPETING INTERESTS
K.M., K.F., M.K., and M.N. own stock/options of QunaSys Inc.
ADDITIONAL INFORMATION
Supplementary information The online version contains supplementary material
available at https://doi.org/10.1038/s41534-021-00423-0.
Correspondence and requests for materials should be addressed to K.M.
T. Kusumoto et al.
6
npj Quantum Information (2021) 94 Published in partnership with The University of New South Wales
Reprints and permission information is available at http://www.nature.com/
reprints
Publishers note Springer Nature remains neutral with regard to jurisdictional claims
in published maps and institutional afliations.
Open Access This article is licensed under a Creative Commons
Attribution 4.0 International License, which permits use, sharing,
adaptation, distribution and reproduction in any medium or format, as long as you give
appropriate credit to the original author(s) and the source, provide a link to the Creative
Commons license, and indicate if changes were made. The images or other third party
material in this article are included in the articles Creative Commons license, unless
indicated otherwise in a credit line to the material. If material is not included in the
articles Creative Commons license and your intended use is not permitted by statutory
regulation or exceeds the permitted use, you will need to obtain permission directly
from the copyright holder. To view a copy of this license, visit http://creativecommons.
org/licenses/by/4.0/.
© The Author(s) 2021
T. Kusumoto et al.
7
Published in partnership with The University of New South Wales npj Quantum Information (2021) 94
... Quantum computing 1 is an emerging technology that could transform many areas of industries and scientific research, including finance 2 , chemistry 3 , and machine learning (ML) 4,5 . In particular, quantum machine learning (QML) [4][5][6][7][8][9][10][11][12][13][14][15][16][17] has received considerable attention at a rapid rate, indicating that QML is a plausible candidate for the practical application of near-term quantum devices. While early fault-tolerant quantum computing has been demonstrated recently 18 , noisy intermediate-scale quantum (NISQ) processors are currently available through various hardware platforms with ∼ 10-100 physical qubits. ...
... The quantum kernel method is a NISQ algorithm in the framework of the hybrid quantum-classical approach 19,20 and can also be feasible on current NISQ computers with shallow quantum circuits 9,12,13,16,17 . In the quantum kernel method, a quantum feature map can be described explicitly by a quantum circuit and the quantum kernel entry can be estimated by measuring the inner product of the quantum feature map 8,9 . ...
... Quantum support vector machine. The quantum kernel method is one of the most important algorithms in QML techniques and many studies have been reported 4,5,8,9,[11][12][13][14][15][16][17] . In the classical kernel method 33,34 the inner product of the feature map is represented by kernel functions, which implicitly use the Hilbert space; on the other hand, the quantum kernel explicitly defines a quantum feature map by means of a quantum state |φ(x)� for d-dimensional input vectors x ∈ R d . ...
Article
Full-text available
The quantum kernel method has attracted considerable attention in the field of quantum machine learning. However, exploring the applicability of quantum kernels in more realistic settings has been hindered by the number of physical qubits current noisy quantum computers have, thereby limiting the number of features encoded for quantum kernels. Hence, there is a need for an efficient, application-specific simulator for quantum computing by using classical technology. Here we focus on quantum kernels empirically designed for image classification and demonstrate a field programmable gate arrays (FPGA) implementation. We show that the quantum kernel estimation by our heterogeneous CPU–FPGA computing is 470 times faster than that by a conventional CPU implementation. The co-design of our application-specific quantum kernel and its efficient FPGA implementation enabled us to perform one of the largest numerical simulations of a gate-based quantum kernel in terms of features, up to 780-dimensional features. We apply our quantum kernel to classification tasks using the Fashion-MNIST dataset and show that our quantum kernel is comparable to Gaussian kernels with the optimized hyperparameter.
... Despite much success in the theoretical investigation of quantum kernels, there have been only a few experimental demonstrations. A seminal approach using nuclear spins [23] encodes specific feature vectors into two unitary operators, which are consecutively applied to an initial state before the system is measured along its magnetic moment, providing kernel evaluation. Several applications using quantum optics have also been demonstrated. ...
Article
One of the fastest growing areas of interest in quantum computing is its use within machine learning methods, in particular through the application of quantum kernels. Despite this large interest, there exist very few proposals for relevant physical platforms to evaluate quantum kernels. In this article, we propose and simulate a protocol capable of evaluating quantum kernels using Hong-Ou-Mandel (HOM) interference, an experimental technique that is widely accessible to optics researchers. Our proposal utilises the orthogonal temporal modes of a single photon, allowing one to encode multi-dimensional feature vectors. As a result, interfering two photons and using the detected coincidence counts, we can perform a direct measurement and binary classification. This physical platform confers an exponential quantum advantage also described theoretically in other works. We present a complete description of this method and perform a numerical experiment to demonstrate a sample application for binary classification of classical data.
... In recent years, there has been remarkable progress in quantum hardware (de Leon et al. 2021), opening the path for the implementation of NISQ algorithms. Previous studies on quantum kernels have explored the use of various quantum hardware platforms, such as superconducting qubits (Havlíček et al. 2019;Djehiche and Löfdahl 2021;Heredge et al. 2021;Peters et al. 2021;Wang et al. 2021;Hubregtsen et al. 2022;Krunic et al. 2022), trapped-ion qubits (Moradi et al. 2022), Gaussian Boson Sampling (Schuld et al. 2020;Giordani et al. 2023), neutral-atom qubits (Albrecht et al. 2023), and nuclear-spin qubits (Kusumoto et al. 2021). Owing to quantum decoherence and the noise of quantum gates, one can typically perform a limited number of quantum operations on NISQ devices. ...
Preprint
Full-text available
Quantum machine learning is a rapidly growing field at the intersection of quantum computing and machine learning. In this work, we examine our quantum machine learning models, which are based on quantum support vector classification (QSVC) and quantum support vector regression (QSVR). We investigate these models using a quantum-circuit simulator, both with and without noise, as well as the IonQ Harmony quantum processor. For the QSVC tasks, we use a dataset containing fraudulent credit card transactions and image datasets (the MNIST and the Fashion-MNIST datasets); for the QSVR tasks, we use a financial dataset and a materials dataset. For the classification tasks, the performance of our QSVC models using 4 qubits of the trapped-ion quantum computer was comparable to that obtained from noiseless quantum-circuit simulations. The result is consistent with the analysis of our device-noise simulations with varying qubit-gate error rates. For the regression tasks, applying a low-rank approximation to the noisy quantum kernel, in combination with hyperparameter tuning in ε-SVR, improved the performance of the QSVR models on the near-term quantum device. Our results suggest that the quantum kernel, as described by our shallow quantum circuit, can be effectively used for both QSVC and QSVR tasks, indicating its resistance to noise and its adaptability to various datasets.
... Over the last few years, there has been remarkable progress in quantum hardware [15], opening the path for the implementation of NISQ algorithms. Previous studies on quantum kernels have explored the use of various quantum hardware platforms, such as superconducting qubits [6,[16][17][18][19][20][21][22], trapped-ion qubits [22], Gaussian Boson Sampling [23,24], neutral-atom qubits [25], and nuclear-spin qubits [26]. Owing to quantum decoherence and the noise of quantum gates, one can typically perform a limited number of quantum operations on NISQ devices. ...
Preprint
Full-text available
Quantum machine learning is a rapidly growing field at the intersection of quantum computing and machine learning. In this work, we examine our quantum machine learning models, which are based on quantum support vector classification (QSVC) and quantum support vector regression (QSVR). We investigate these models using a quantum-circuit simulator, both with and without noise, as well as the IonQ Harmony quantum processor. For the QSVC tasks, we use a dataset containing fraudulent credit card transactions and image datasets (the MNIST and the Fashion-MNIST datasets); for the QSVR tasks, we use a financial dataset and a materials dataset. For the classification tasks, the performance of our QSVC models using 4 qubits of the trapped-ion quantum computer was comparable to that obtained from noiseless quantum-circuit simulations. The result is consistent with the analysis of our device-noise simulations with varying qubit-gate error rates. For the regression tasks, applying a low-rank approximation to the noisy quantum kernel, in combination with hyperparameter tuning in ε-SVR, improved the performance of the QSVR models on the near-term quantum device. Our results suggest that the quantum kernel, as described by our shallow quantum circuit, can be effectively used for both QSVC and QSVR tasks, indicating its resistance to noise and its adaptability to various datasets.
... MNISQ is compatible with modern quantum hardware (10-qubits), including NISQ devices, despite the presence of noise and deviations from ideal conditions. Future work could involve experimental demonstrations of quantum machine learning using the MNISQ dataset, leveraging the robustness of the quantum kernel method as demonstrated in previous experiments [21,22]. ...
Preprint
Full-text available
We introduce the first large-scale dataset, MNISQ, for both the Quantum and the Classical Machine Learning community during the Noisy Intermediate-Scale Quantum era. MNISQ consists of 4,950,000 data points organized in 9 subdatasets. Building our dataset from the quantum encoding of classical information (e.g., MNIST dataset), we deliver a dataset in a dual form: in quantum form, as circuits, and in classical form, as quantum circuit descriptions (quantum programming language, QASM). In fact, also the Machine Learning research related to quantum computers undertakes a dual challenge: enhancing machine learning exploiting the power of quantum computers, while also leveraging state-of-the-art classical machine learning methodologies to help the advancement of quantum computing. Therefore, we perform circuit classification on our dataset, tackling the task with both quantum and classical models. In the quantum endeavor, we test our circuit dataset with Quantum Kernel methods, and we show excellent results up to $97\%$ accuracy. In the classical world, the underlying quantum mechanical structures within the quantum circuit data are not trivial. Nevertheless, we test our dataset on three classical models: Structured State Space sequence model (S4), Transformer and LSTM. In particular, the S4 model applied on the tokenized QASM sequences reaches an impressive $77\%$ accuracy. These findings illustrate that quantum circuit-related datasets are likely to be quantum advantageous, but also that state-of-the-art machine learning methodologies can competently classify and recognize quantum circuits. We finally entrust the quantum and classical machine learning community the fundamental challenge to build more quantum-classical datasets like ours and to build future benchmarks from our experiments. The dataset is accessible on GitHub and its circuits are easily run in qulacs or qiskit.
... Such techniques allow the algorithm to be executed on near-term devices without significant loss of computational power. The effectiveness of error-mitigation techniques and the robustness of kernel entries to noise have been demonstrated on near-term devices (Havlíček et al. 2019;Kusumoto et al. 2021;Bartkiewicz et al. 2020;Peters et al. 2021;Liu et al. 2021). These advantages make quantum-enhanced SVM algorithms leading candidates for achieving quantum advantage on near-term devices (Liu et al. 2021). ...
Preprint
Full-text available
Galaxy morphology, a key tracer of the evolution of a galaxy's physical structure, has motivated extensive research on machine learning techniques for efficient and accurate galaxy classification. The emergence of quantum computers has generated optimism about the potential for significantly improving the accuracy of such classifications by leveraging the large dimensionality of quantum Hilbert space. This paper presents a quantum-enhanced support vector machine algorithm for classifying galaxies based on their morphology. The algorithm requires the computation of a kernel matrix, a task that is performed on a simulated quantum computer using a quantum circuit conjectured to be intractable on classical computers. The result shows similar performance between classical and quantum-enhanced support vector machine algorithms. For a training size of $40$k, the receiver operating characteristic curve for differentiating ellipticals and spirals has an under-curve area (ROC AUC) of $0.946\pm 0.005$ for both classical and quantum-enhanced algorithms. This investigation is among the very first applications of quantum machine learning in astronomy and highlights their potential for further application in this field.
... Such a device can be readily realized with superconducting qubits, where the exchange interaction can be realized via a cavity quantum bus [33]. Moreover, the form ofĤ is of a quantum spin Hamiltonian which can be realized in a variety of platforms such as NMR [34,35], quantum dots [36], and trapped ions [37]. ...
Preprint
Full-text available
Parameter estimation is an indispensable task in various applications of quantum information processing. To predict parameters in the post-processing stage, it is inherent to first perceive the quantum state with a measurement protocol and store the information acquired. In this work, we propose a general framework for constructing classical approximations of arbitrary quantum states with quantum reservoir networks. A key advantage of our method is that only a single local measurement setting is required for estimating arbitrary parameters, while most of the previous methods need exponentially increasing number of measurement settings. To estimate $M$ parameters simultaneously, the size of the classical approximation scales as $\ln M$. Moreover, this estimation scheme is extendable to higher-dimensional as well as hybrid systems, which makes it exceptionally generic. Both linear and nonlinear functions can be estimated efficiently by our scheme, and we support our theoretical findings with extensive numerical simulations.
... However, the classifier is non-linear with respect to the space in which the original data lie, for the effect of the feature map. 2 In some cases the quantum kernel values can concentrate around an average value, requiring a large number of shots to be estimated (Kübler et al. 2021;Thanasilp et al. 2022Thanasilp et al. ). et al. 2021, optical (Bartkiewicz et al. 2020), and NMR (Kusumoto et al. 2021) quantum devices, and their effectiveness is usually assessed empirically. ...
Article
Full-text available
Exploiting the properties of quantum information to the benefit of machine learning models is perhaps the most active field of research in quantum computation. This interest has supported the development of a multitude of software frameworks (e.g. Qiskit, Pennylane, Braket) to implement, simulate, and execute quantum algorithms. Most of them allow us to define quantum circuits, run basic quantum algorithms, and access low-level primitives depending on the hardware such software is supposed to run. For most experiments, these frameworks have to be manually integrated within a larger machine learning software pipeline. The researcher is in charge of knowing different software packages, integrating them through the development of long code scripts, analyzing the results, and generating the plots. Long code often leads to erroneous applications, due to the average number of bugs growing proportional with respect to the program length. Moreover, other researchers will struggle to understand and reproduce the experiment, due to the need to be familiar with all the different software frameworks involved in the code script. We propose QuASK, an open-source quantum machine learning framework written in Python that aids the researcher in performing their experiments, with particular attention to quantum kernel techniques. QuASK can be used as a command-line tool to download datasets, pre-process them, quantum machine learning routines, analyze and visualize the results. QuASK implements most state-of-the-art algorithms to analyze the data through quantum kernels, with the possibility to use projected kernels, (gradient-descent) trainable quantum kernels, and structure-optimized quantum kernels. Our framework can also be used as a library and integrated into pre-existing software, maximizing code reuse.
... Tremendous classical kernel methods [52, 53] have been proposed to learn the non-linear functions or decision boundaries. With the rapid development of quantum computers, there is a growing interest in exploring whether the quantum kernel method can surpass the classical kernel [54][55][56][57][58][59][60][61][62][63][64][65][66][67][68][69][70][71]. ...
Article
Full-text available
The application of quantum computation to accelerate machine learning algorithms is one of the most promising areas of research in quantum algorithms. In this paper, we explore the power of quantum learning algorithms in solving an important class of Quantum Phase Recognition (QPR) problems, which are crucially important in understanding many-particle quantum systems. We prove that, under widely believed complexity theory assumptions, there exists a wide range of QPR problems that cannot be efficiently solved by classical learning algorithms with classical resources. Whereas using a quantum computer, we prove the efficiency and robustness of quantum kernel methods in solving QPR problems through Linear order parameter Observables. We numerically benchmark our algorithm for a variety of problems, including recognizing symmetry-protected topological phases and symmetry-broken phases. Our results highlight the capability of quantum machine learning in predicting such quantum phase transitions in many-particle systems.
Article
Full-text available
Quantum kernel methods show promise for accelerating data analysis by efficiently learning relationships between input data points that have been encoded into an exponentially large Hilbert space. While this technique has been used successfully in small-scale experiments on synthetic datasets, the practical challenges of scaling to large circuits on noisy hardware have not been thoroughly addressed. Here, we present our findings from experimentally implementing a quantum kernel classifier on real high-dimensional data taken from the domain of cosmology using Google’s universal quantum processor, Sycamore. We construct a circuit ansatz that preserves kernel magnitudes that typically otherwise vanish due to an exponentially growing Hilbert space, and implement error mitigation specific to the task of computing quantum kernels on near-term hardware. Our experiment utilizes 17 qubits to classify uncompressed 67 dimensional data resulting in classification accuracy on a test set that is comparable to noiseless simulation.
Article
Full-text available
To explore the possibilities of a near-term intermediate-scale quantum algorithm and long-term fault-tolerant quantum computing, a fast and versatile quantum circuit simulator is needed. Here, we introduce Qulacs, a fast simulator for quantum circuits intended for research purpose. We show the main concepts of Qulacs, explain how to use its features via examples, describe numerical techniques to speed-up simulation, and demonstrate its performance with numerical benchmarks.
Article
Full-text available
Recently, several quantum machine learning algorithms have been proposed that may offer quantum speed-ups over their classical counterparts. Most of these algorithms are either heuristic or assume that data can be accessed quantum-mechanically, making it unclear whether a quantum advantage can be proven without resorting to strong assumptions. Here we construct a classification problem with which we can rigorously show that heuristic quantum kernel methods can provide an end-to-end quantum speed-up with only classical access to data. To prove the quantum speed-up, we construct a family of datasets and show that no classical learner can classify the data inverse-polynomially better than random guessing, assuming the widely believed hardness of the discrete logarithm problem. Furthermore, we construct a family of parameterized unitary circuits, which can be efficiently implemented on a fault-tolerant quantum computer, and use them to map the data samples to a quantum feature space and estimate the kernel entries. The resulting quantum classifier achieves high accuracy and is robust against additive errors in the kernel entries that arise from finite sampling statistics. Many quantum machine learning algorithms have been proposed, but it is typically unknown whether they would outperform classical methods on practical devices. A specially constructed algorithm shows that a formal quantum advantage is possible.
Article
Full-text available
We implement an all-optical setup demonstrating kernel-based quantum machine learning for two-dimensional classification problems. In this hybrid approach, kernel evaluations are outsourced to projective measurements on suitably designed quantum states encoding the training data, while the model training is processed on a classical computer. Our two-photon proposal encodes data points in a discrete, eight-dimensional feature Hilbert space. In order to maximize the application range of the deployable kernels, we optimize feature maps towards the resulting kernels’ ability to separate points, i.e., their “resolution,” under the constraint of finite, fixed Hilbert space dimension. Implementing these kernels, our setup delivers viable decision boundaries for standard nonlinear supervised classification tasks in feature space. We demonstrate such kernel-based quantum machine learning using specialized multiphoton quantum optical circuits. The deployed kernel exhibits exponentially better scaling in the required number of qubits than a direct generalization of kernels described in the literature.
Article
Full-text available
The promise of quantum computers is that certain computational tasks might be executed exponentially faster on a quantum processor than on a classical processor¹. A fundamental challenge is to build a high-fidelity processor capable of running quantum algorithms in an exponentially large computational space. Here we report the use of a processor with programmable superconducting qubits2,3,4,5,6,7 to create quantum states on 53 qubits, corresponding to a computational state-space of dimension 2⁵³ (about 10¹⁶). Measurements from repeated experiments sample the resulting probability distribution, which we verify using classical simulations. Our Sycamore processor takes about 200 seconds to sample one instance of a quantum circuit a million times—our benchmarks currently indicate that the equivalent task for a state-of-the-art classical supercomputer would take approximately 10,000 years. This dramatic increase in speed compared to all known classical algorithms is an experimental realization of quantum supremacy8,9,10,11,12,13,14 for this specific computational task, heralding a much-anticipated computing paradigm.
Article
Full-text available
Neural network-based machine learning has recently proven successful for many complex applications ranging from image recognition to precision medicine. However, its direct application to problems in quantum physics is challenging due to the exponential complexity of many-body systems. Motivated by recent advances in realizing quantum information processors, we introduce and analyse a quantum circuit-based algorithm inspired by convolutional neural networks, a highly effective model in machine learning. Our quantum convolutional neural network (QCNN) uses only O(log(N)) variational parameters for input sizes of N qubits, allowing for its efficient training and implementation on realistic, near-term quantum devices. To explicitly illustrate its capabilities, we show that QCNNs can accurately recognize quantum states associated with a one-dimensional symmetry-protected topological phase, with performance surpassing existing approaches. We further demonstrate that QCNNs can be used to devise a quantum error correction scheme optimized for a given, unknown error model that substantially outperforms known quantum codes of comparable complexity. The potential experimental realizations and generalizations of QCNNs are also discussed.
Article
Full-text available
The concurrent rise of artificial intelligence and quantum information poses an opportunity for creating interdisciplinary technologies like quantum neural networks. Quantum reservoir processing, introduced here, is a platform for quantum information processing developed on the principle of reservoir computing that is a form of an artificial neural network. A quantum reservoir processor can perform qualitative tasks like recognizing quantum states that are entangled as well as quantitative tasks like estimating a nonlinear function of an input quantum state (e.g., entropy, purity, or logarithmic negativity). In this way, experimental schemes that require measurements of multiple observables can be simplified to measurement of one observable on a trained quantum reservoir processor.
Article
Full-text available
Machine learning and quantum computing are two technologies that each have the potential to alter how computation is performed to address previously untenable problems. Kernel methods for machine learning are ubiquitous in pattern recognition, with support vector machines (SVMs) being the best known method for classification problems. However, there are limitations to the successful solution to such classification problems when the feature space becomes large, and the kernel functions become computationally expensive to estimate. A core element in the computational speed-ups enabled by quantum algorithms is the exploitation of an exponentially large quantum state space through controllable entanglement and interference. Here we propose and experimentally implement two quantum algorithms on a superconducting processor. A key component in both methods is the use of the quantum state space as feature space. The use of a quantum-enhanced feature space that is only efficiently accessible on a quantum computer provides a possible path to quantum advantage. The algorithms solve a problem of supervised learning: the construction of a classifier. One method, the quantum variational classifier, uses a variational quantum circuit 1,2 to classify the data in a way similar to the method of conventional SVMs. The other method, a quantum kernel estimator, estimates the kernel function on the quantum computer and optimizes a classical SVM. The two methods provide tools for exploring the applications of noisy intermediate-scale quantum computers ³ to machine learning. © 2019, The Author(s), under exclusive licence to Springer Nature Limited.
Book
Quantum machine learning investigates how quantum computers can be used for data-driven prediction and decision making. The books summarises and conceptualises ideas of this relatively young discipline for an audience of computer scientists and physicists from a graduate level upwards. It aims at providing a starting point for those new to the field, showcasing a toy example of a quantum machine learning algorithm and providing a detailed introduction of the two parent disciplines. For more advanced readers, the book discusses topics such as data encoding into quantum states, quantum algorithms and routines for inference and optimisation, as well as the construction and analysis of genuine ``quantum learning models''. A special focus lies on supervised learning, and applications for near-term quantum devices.