Brought to you by:
Paper The following article is Open access

A quantum speedup in machine learning: finding an N-bit Boolean function for a classification

, , and

Published 9 October 2014 © 2014 IOP Publishing Ltd and Deutsche Physikalische Gesellschaft
, , Citation Seokwon Yoo et al 2014 New J. Phys. 16 103014 DOI 10.1088/1367-2630/16/10/103014

1367-2630/16/10/103014

Abstract

We compare quantum and classical machines designed for learning an N-bit Boolean function in order to address how a quantum system improves the machine learning behavior. The machines of the two types consist of the same number of operations and control parameters, but only the quantum machines utilize the quantum coherence naturally induced by unitary operators. We show that quantum superposition enables quantum learning that is faster than classical learning by expanding the approximate solution regions, i.e., the acceptable regions. This is also demonstrated by means of numerical simulations with a standard feedback model, namely random search, and a practical model, namely differential evolution.

Export citation and abstract BibTeX RIS

Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.

1. Introduction

Over the past few decades, quantum physics has brought remarkable innovations into fields of various disciplines. For example, there are exponentially faster quantum algorithms, compared to their classical counterparts [13]. The physical limit of measurement precision has been improved in quantum metrology [4, 5], and a large number of protocols offering higher security have been proposed in quantum cryptography [6, 7]. These achievements are enabled by appropriate usage of quantum effects such as quantum superposition and quantum entanglement.

Another important scientific area is machine learning, which is a subfield of artificial intelligence and one of the most advanced automatic control techniques. While learning is usually regarded as a characteristic of humans or living things, machine learning enables a machine to learn a task [8]. Machine learning has been attracting great attention, with its novel ability to learn. On one hand, machine learning has been studied to provide an understanding of the learning of a real biological system, in a theoretical manner. On the other hand, machine learning is also expected to provide reliable control techniques for use in designing complex systems in a practical manner [8].

Recently, the hybridizing of the two scientific fields described above, quantum technology and machine learning, has received great interest [912]. One question naturally arises: can machine learning be improved by using favorable quantum effects? Several attempts to answer this question have been made in the past few years—for example, using quantum perceptrons [13], neural networks [1416], and quantum-inspired evolutionary algorithms [17, 18]. Most recently, remarkable studies have been carried out [1922]. In [19], a learning speedup for the quantum machine was observed with a lower memory requirement for a specific example, namely the kth-root NOT operation. In [20], a strategy for designing a quantum algorithm was introduced, establishing a link between the learning speedup and the speedup of the quantum algorithm found. In [21, 22], the authors showed quantum speedup for the task of classifying a large number of data. However, it is still unclear what quantum effects work in machine learning and how they work, particularly in the absence of a fair comparison between classical and quantum machines.

In this work, we consider a binary classification problem as a learning task. Such a classification can be realized for an N-bit Boolean function that maps a set of N-bit binary strings in ${{\{0,1\}}^{N}}$ into $\{0,1\}$ [23]. The main objective in this paper is to compare a quantum machine with a classical machine. These two machines are equivalent. The only differentiation is that the quantum machine can deal with quantum effects, whereas the classical machine cannot. The machines are analyzed in terms of the acceptable region, defined as a localized solution region of parameter space. In the analysis, it is shown that the quantum machine can learn faster due to the acceptable region being expanded by quantum superposition. Such a quantum learning speedup is understood in terms of an expansion of the acceptable region. In order to make the analysis more explicit, we analyze further by using random search, which is a standard model for use in learning performance analysis [24]. In such a primitive model, we validate the quantum speedup, showing that the overall number of iterations required to complete the learning is proportional to ${\rm O}({{{\rm e}}^{\alpha D}})$, with $\alpha \simeq 3.065$ for the classical machine and $\alpha \simeq 0.238$ for the quantum machine. Here, D is the size of the search space. Differential evolution is employed as a learning model, taking into account more realistic circumstances. By means of numerical simulations, we show that the quantum speedup is still observed even in such a case.

2. Classical and quantum machines

Machine learning can be decomposed into two parts: the machine and the feedback. The machine performs various tasks depending on its internal parameters, and the feedback adjusts the parameters of the machine in order for the machine to perform a required task called the target. Learning is a process involving finding suitable parameters for the machine, whereby the machine is expected to generate desired results working towards a target4 . This concept of machine learning has been widely adopted in the context of machine learning at the fundamental level [8].

In this work, we assign to a machine a binary classification problem as a task, where the machine will learn a target N-bit Boolean function, defined as

Equation (1)

where ${\boldsymbol{x}} ={{x}_{N}}...{{x}_{2}}{{x}_{1}}$ is represented as an N-bit string of ${{x}_{j}}\in \{0,1\}$ ($j=1,2,\ldots ,N$). This function can be written by using the positive polarity Reed–Muller expansion [25]:

Equation (2)

where ⊕ denotes modulo-2 addition, ⊕ means a direct sum of the moduli, and the Reed–Muller coefficients ak are either 0 or 1. Here, ${{{\rm c}}_{k}}$ is an index set whose elements are given in such a way. The number j is then taken to be an element of ${{{\rm c}}_{k}}$ only if kj is equal to 1 when k is written as an N-bit string, ${{k}_{N}}...{{k}_{2}}{{k}_{1}}$. Thus, each set of $\{{{a}_{k}}\}$ corresponds to each of ${{2}^{{{2}^{N}}}}$ Boolean functions.

The Boolean function can be implemented by a reversible circuit as shown in figure 1, where an additional bit channel, called the work channel, and controlled operations are employed [26, 27]. A single-bit operation G0 is placed on the work channel and $({{2}^{N}}-1)$ controlled-Gk operations are caused to act on the work channel when all the control bits, xj ($j\in {{{\rm c}}_{k}}$), are 1. The input signal c on the work channel is fixed at 0. The operation Gk is given as either the identity (i.e., doing nothing), if ak = 0, or NOT (i.e., flipping an input bit to its complement bit), if ak = 1. As an example, a one-bit Boolean function (i.e., with N = 1) has ${{2}^{{{2}^{1}}}}=4$ sets of Reed–Muller coefficients (a0, a1), which determine all possible Boolean functions. Table 1 gives four possible one-bit Boolean functions with Reed–Muller coefficients and the corresponding operations.

Figure 1.

Figure 1. The N-bit Boolean function is implemented by a reversible circuit. The machine consists of N-bit input channels and a single-bit work channel, which contains ${{2}^{N}}$ operations: one single-bit operation G0, and ${{2}^{N}}-1$ operations Gk conditioned by the input bits ${\boldsymbol{x}} $. Here, the constant input c is set to be 0, which gives rise to an output bit y.

Standard image High-resolution image

Table 1.  Four possible one-bit Boolean functions are given with Reed–Muller coefficients (a0 and a1), and operations (G0 and G1). These are common to the classical and quantum cases.

Boolean function a0 a1 ${{G}_{0}}$ ${{G}_{1}}$
${{f}_{1}}:x\mapsto 0$ 0 0 Identity Identity
${{f}_{2}}:x\mapsto 1$ 1 0 NOT Identity
${{f}_{3}}:x\mapsto x$ 0 1 Identity NOT
${{f}_{4}}:x\mapsto x\oplus 1$ 1 1 NOT NOT

With a reversible circuit model, we then define classical and quantum machines. The classical machine consists of classical channels and operations, and the Boolean function of the classical machine is described as

Equation (3)

with classical bits ${\boldsymbol{x}} $, y, and c. We suppose the Reed–Muller coefficients ak to be probabilistically determined by the internal parameters pk, which implies that Gk performs the identity and NOT operations with probabilities pk and $1-{{p}_{k}}$, respectively. These probabilistic operations are primarily intended to provide a fair comparison with the quantum machine, which naturally employs a probabilistic operation. Now, we construct the quantum machine by setting only the work channel to be quantum. The input channels are left as classical, as the input information is classical in our work. Thus, the Boolean function of the quantum machine is described as

Equation (4)

where the signal on the work channel is encoded into a qubit state. The classical probabilistic operations Gk are also necessarily replaced by unitary operators:

Equation (5)

where pk is the probability of ${{\hat{G}}_{k}}$ performing the identity operation, i.e., $|0\rangle \to |0\rangle $, $|1\rangle \to {{{\rm e}}^{{\rm i}\pi }}|1\rangle $, and $1-{{p}_{k}}$ is that of ${{\hat{G}}_{k}}$ performing the NOT operation, i.e., $|0\rangle \to {{{\rm e}}^{-{\rm i}{{\phi }_{k}}}}|1\rangle $, $|1\rangle \to {{{\rm e}}^{{\rm i}{{\phi }_{k}}}}|0\rangle $. Note that the relative phases ϕk are free parameters suitably chosen before the learning. The feedback adjusts only the pk parameters, controllable both in the classical and the quantum experimental setups [28, 29].

These classical and quantum machines are equivalent to each other. They have the same circuit structures and exactly the same number of control parameters, pk. Moreover, the single classical operation Gk and the quantum operator ${{\hat{G}}_{k}}$ cannot be discriminated between by measuring the distribution of outcomes for the same input ${\boldsymbol{x}} $ and parameters pk.

3. The acceptable region

A target Boolean function is represented by a point, ${{{\rm Q}}_{f}}=({{p}_{0}},{{p}_{1}},\ldots ,{{p}_{{{2}^{N}}-1}})$, in the ${{2}^{N}}$-dimensional search space spanned by the probabilities, pk. For example, four possible learning targets, fj ($j=1,2,3,4$), for the one-bit Boolean function, correspond to four points in the search space: ${{{\rm Q}}_{{{f}_{1}}}}=(1,1)$, ${{{\rm Q}}_{{{f}_{2}}}}=(0,1)$, ${{{\rm Q}}_{{{f}_{3}}}}=(1,0)$, and ${{{\rm Q}}_{{{f}_{4}}}}=(0,0)$. Similarly, the machine behavior is also characterized as a point ${{{\rm Q}}_{{\rm m}}}=({{p}_{0}},{{p}_{1}})$, i.e., the respective points lead to different probabilistic tasks that the machine performs. Learning is simply regarded as a process of moving ${{{\rm Q}}_{{\rm m}}}$ to a given target point in the whole search space. It is, however, usually impractical (actually, impossible in real circumstances) to locate ${{{\rm Q}}_{{\rm m}}}$ exactly at the target point. Instead, it is feasible to find approximate solutions near to the exact target, i.e. the learning is expected to lead the point ${{{\rm Q}}_{{\rm m}}}$ into a region near to the target point [8]. We call such a region an acceptable region for the approximate target functions. As the learning time and convergence depend primarily on the size of the acceptable region, it is usually expected that a larger acceptable region will make the learning faster [30]. We examine, in this sense, the acceptable regions of classical and quantum machines.

The acceptable region is defined as a set of points which guarantee the errors, $\epsilon =1-\mathcal{F}$, to be less than or equal to a tolerable value, epsilont. Here, $\mathcal{F}$ is the figure of merit of the machine performance, called the task fidelity, and it quantifies how well the machine performs a target function, defined by

Equation (6)

where $P(y|{\boldsymbol{x}} )$ is a conditional probability of obtaining an output y given an input ${\boldsymbol{x}} $, and the target probabilities ${{P}_{\tau }}(y|{\boldsymbol{x}} )$ are those for the target. For example, we have target probabilities for f1 in table 1 written as

Equation (7)

The term ${{\sum }_{y}}\sqrt{P(y|{\boldsymbol{x}} ){{P}_{\tau }}(y|{\boldsymbol{x}} )}$ in equation (6) corresponds to the closeness of the two probability distributions $P(y|{\boldsymbol{x}} )$ and ${{P}_{\tau }}(y|{\boldsymbol{x}} )$ for the given ${\boldsymbol{x}} $ [31]. The task fidelity, $\mathcal{F}$, increases as the outputs get close to the required outputs; $\mathcal{F}$ becomes unity only when the machine gives the target for all ${\boldsymbol{x}} $, and otherwise is less than 1. The acceptable region can be seen as a set of probabilities, pk, such that $1-{{\epsilon }_{t}}\leqslant \mathcal{F}({{p}_{1}},\ldots ,{{p}_{{{2}^{N}}-1}})$, and thus higher $\mathcal{F}$ guarantees a wider acceptable region for a given tolerance, epsilont.

Let us begin with, as the simplest case, the target function f15 , a one-bit Boolean function, whose task fidelity, $\mathcal{F}({{p}_{0}},{{p}_{1}})$, is reduced to

Equation (8)

which is common to the classical and the quantum machines. For the classical machine, equation (8) is evaluated as

Equation (9)

adopting the conditional probabilities ${{P}_{{\rm c}}}(y|{\boldsymbol{x}} )$ given by

Equation (10)

where ${{q}_{j}}=1-{{p}_{j}}$ (j = 0,1). For the quantum machine, the conditional probabilities ${{P}_{{\rm Q}}}(y|{\boldsymbol{x}} )$ differ slightly from ${{P}_{{\rm c}}}(y|{\boldsymbol{x}} )$ due to the superposition of ${{\hat{G}}_{0}}$ and ${{\hat{G}}_{1}}$. The conditional probabilities ${{P}_{{\rm Q}}}(y|{\boldsymbol{x}} )$ are given as

Equation (11)

where ${{p}_{\operatorname{int}}}=2\sqrt{{{p}_{0}}{{p}_{1}}{{q}_{0}}{{q}_{1}}}$, and $\Delta ={{\phi }_{1}}-{{\phi }_{0}}$ is the difference of the phases of the two unitaries ${{\hat{G}}_{0}}$ and ${{\hat{G}}_{1}}$. Thus, the task fidelity ${{\mathcal{F}}_{{\rm Q}}}$ of the quantum machine is evaluated as

Equation (12)

where the additional term ${\rm cos} \Delta $ is apparently the result of quantum superposition. From the result of equation (12), we can see that

Equation (13)

provided that $0\lt {{p}_{j}}\lt 0$ (j = 0,1). The phase Δ plays an important role in helping the quantum machine via constructive interference, leading to ${{\mathcal{F}}_{{\rm Q}}}\gt {{\mathcal{F}}_{{\rm c}}}$. The task fidelities for the other three targets are also listed in table 2. Note here that, for all cases of the target function fj, ${{\mathcal{F}}_{{\rm Q}}}$ can always be larger than ${{\mathcal{F}}_{{\rm c}}}$ on choosing appropriate free parameters ϕ1 and ϕ2 before the learning. Therefore, the quantum machine has wider acceptable regions than the classical machine for a given tolerance. In figure 2, the task fidelity and the acceptable region for each machine are shown for the target f1 when $\Delta =0$ is chosen to maximize the difference between the two machines. We also found that the acceptable region of the quantum machine is about 5.6 times the size of that of the classical machine.

Figure 2.

Figure 2. Left column: the task fidelities for classical and quantum machines. Right column: green lines in the magnified views indicate the acceptable regions for a given tolerable error ${{\epsilon }_{t}}=0.05$ around the exact target point, $({{p}_{0}},{{p}_{1}})=(1,1)$. Here, we set $\Delta =0$ to maximize the task fidelity of the quantum machine. It is found that the acceptable region of the quantum machine is about 5.6 times the size of that of the classical machine.

Standard image High-resolution image

Table 2.  The task fidelities of the quantum and classical machines are given in terms of the probabilities (p0 and p1) for each target function of the one-bit Boolean function. The phase Δ is defined in the main text, and it plays an important role in quantum machine learning.

Function ${{\mathcal{F}}_{{\rm c}}}({{p}_{0}},{{p}_{1}})$ ${{\mathcal{F}}_{{\rm Q}}}({{p}_{0}},{{p}_{1}})$
f1 $\sqrt[4]{{{p}_{0}}({{p}_{0}}{{p}_{1}}+{{q}_{0}}{{q}_{1}})}$ $\sqrt[4]{\mathcal{F}_{{\rm c}}^{4}+{{p}_{0}}{{p}_{\operatorname{int}}}{\rm cos} \Delta }$
f2 $\sqrt[4]{{{q}_{0}}({{q}_{0}}{{p}_{1}}+{{p}_{0}}{{q}_{1}})}$ $\sqrt[4]{\mathcal{F}_{{\rm c}}^{4}-{{q}_{0}}{{p}_{\operatorname{int}}}{\rm cos} \Delta }$
f3 $\sqrt[4]{{{p}_{0}}({{q}_{0}}{{p}_{1}}+{{p}_{0}}{{q}_{1}})}$ $\sqrt[4]{\mathcal{F}_{{\rm c}}^{4}-{{p}_{0}}{{p}_{\operatorname{int}}}{\rm cos} \Delta }$
f4 $\sqrt[4]{{{q}_{0}}({{p}_{0}}{{p}_{1}}+{{q}_{0}}{{q}_{1}})}$ $\sqrt[4]{\mathcal{F}_{{\rm c}}^{4}+{{q}_{0}}{{p}_{\operatorname{int}}}{\rm cos} \Delta }$

The optimal phase condition for improving the task fidelity, as in equation (13), can be generalized to an arbitrary N-bit Boolean function ($N\gt 1$). We provide one of the conditions as

Equation (14)

where sk is the kth component of a solution point ${{{\rm Q}}_{f}}({{s}_{0}},{{s}_{1}},\ldots ,{{s}_{{{2}^{N}}-1}})$ in the ${{2}^{N}}$-dimensional search space (see appendix A). This condition yields ${{\mathcal{F}}_{{\rm Q}}}\geqslant {{\mathcal{F}}_{{\rm c}}}$, so the acceptable region of the quantum machine can be wider than that of the classical machine for an arbitrary N-bit Boolean function.

4. Learning speedup via an expanded acceptable region

This section is devoted to the learning time in machine learning. For a numerical simulation, we employ random search as a feedback; this has often been considered for studying learning performance, rather than for any practical reasons [24]. Random search runs as follows. First, all ${{2}^{N}}$ control parameters pk are randomly chosen, and then, the task fidelity is measured with the chosen pk parameters. These two steps are thought of as a single iteration of the procedure. The iterations are repeated until the condition $\mathcal{F}\geqslant 1-{{\epsilon }_{t}}$ is satisfied for a given epsilont. After a sufficient number of simulations have been performed, we then calculate the mean iteration number defined as ${{n}_{c}}=\sum nP(n)$, where P(n) is the probability of completing learning at the nth iteration. This mean iteration number, nc, can be used to quantify the learning time, and the results of numerical simulations for nc are shown in table 3, where quantum learning is demonstrated to be faster than classical learning. This is a direct result of the wider acceptable region of the quantum machine, as nc is inversely proportional to the size of the acceptable region in random search; ${{n}_{c}}=1/\gamma $ is given by substituting in $P(n)=\gamma {{(1-\gamma )}^{(n-1)}}$, where γ is equal to the ratio of the acceptable region to the whole space in random search. We demonstrate this by comparing the results for nc with the acceptable regions γ found from Monte Carlo simulation, given in table 3, and thereby we note that the acceptable region is the main feature directly influencing the learning time in random search.

Table 3.  The learning time nc is compared with the acceptable regions γ, and it is demonstrated that ${{n}_{c}}={{\gamma }^{-1}}$. This implies that a larger acceptable region leads to a lesser learning time. Simulation failed for N = 4 and 5 in the classical case due to the finite computational resources and very long run time.

  Classical Quantum
N γ−1 nc γ−1 nc
1 $1.0\times {{10}^{2}}$ $1.03\times {{10}^{2}}$ $1.8\times {{10}^{1}}$ $1.74\times {{10}^{1}}$
2 $1.4\times {{10}^{4}}$ $1.39\times {{10}^{4}}$ $2.6\times {{10}^{1}}$ $2.68\times {{10}^{1}}$
3 $4.4\times {{10}^{8}}$ $4.67\times {{10}^{8}}$ $5.5\times {{10}^{1}}$ $5.36\times {{10}^{1}}$
4 $9.8\times {{10}^{18}}$ $3.5\times {{10}^{2}}$ $3.48\times {{10}^{2}}$
5 $7.1\times {{10}^{41}}$ $2.5\times {{10}^{4}}$ $2.48\times {{10}^{4}}$

Also in figure 3, the data for nc in table 3 are well fitted to a function ${\rm ln} {{n}_{c}}=\alpha D+\beta $, implying that the size of the acceptable region is exponentially decreased as the dimension $D={{2}^{N}}$ of the parameter space increases, i.e. ${{n}_{c}}={\rm O}({{{\rm e}}^{\alpha D}})$ [32]. The fitting parameters are given as

Equation (15)

It is remarkable that the exponent α in the quantum case is much smaller than that in the classical case.

Figure 3.

Figure 3. The learning time, nc, with the dimension $D={{2}^{N}}$ of the parameter space for 1000 realizations. In this work, we consider a constant target function that yields 0 for all inputs ${\boldsymbol{x}} $, the optimal phase condition of equation (14) is chosen for the quantum machine, and the tolerable error epsilont is set as 0.05. The data are well fitted to ${\rm ln} {{n}_{c}}=\alpha D+\beta $ in the classical (red line) and quantum (blue line) cases, with the fitting parameters α and β as in equation (15).

Standard image High-resolution image

It follows from what has been shown that the acceptable region is the main feature directly influencing the learning time in random search. We have proved that we can always prepare a quantum machine which has an acceptable region larger than that of the classical one, in the previous section. Therefore, we finally conclude that the learning time can be shorter in the quantum case than in the classical case. The results of numerical simulation also support the assertion that the quantum machine learns much faster, particularly in a large search space. We clarify again that such a quantum speedup is enabled by the quantum superposition, and appropriately arranged phases.

5. Applying differential evolution

We consider a more practical learning model, taking into account real circumstances. A general analysis of the learning efficiency is very complicated, as so many factors are associated with the learning behavior. Furthermore, the most efficient learning algorithms tend to use heuristic rules and are problem-specific [33, 34]. Nevertheless, it is usually believed that the acceptable region is a key factor for the efficiency of learning in a heuristic manner [32]. We conjecture, in this sense, that the quantum machine offers the quantum speedup even in a practical learning method.

We apply differential evolution (DE), which is known as one of the most efficient learning methods for global optimization [30]. We start with M sets of control parameter vectors ${{{\boldsymbol{p}} }_{i}}={{({{p}_{0}},{{p}_{1}},...,{{p}_{{{2}^{N}}-1}})}_{i}}$, for $i=1,2,...,M$, whose components are the control parameters of the machine. In DE, these vectors, ${{{\boldsymbol{p}} }_{i}}$, are supposed to evolve by 'mating' their components pk with each other. Equation (6) is used as a criterion for how well machines with ${{{\boldsymbol{p}} }_{i}}$ fit to the target. This process is iterated until the task fidelity reaches a certain level of accuracy $1-{{\epsilon }_{t}}$ (see [30] or [20] for the detailed method of effecting differential evolution).

We perform the numerical simulations by increasing N from 1 to 7. The results are averaged over 1000 realizations for M = 50 and ${{\epsilon }_{t}}=0.05$. The target function is a constant function: $f({\boldsymbol{x}} )=0$ for all ${\boldsymbol{x}} $. Free parameters in differential evolution (e.g., the crossover rate and differential weight) are chosen to achieve the best learning efficiency for a classical machine6 . Nevertheless, we expect the quantum machine to still exhibit the quantum speedup, assisted by the quantum superposition, with the optimal phases in equation (14). We give the mean task fidelity averaged over M in figure 4(a). For both classical and quantum cases, the mean task fidelities are increased close to 1, but the quantum machine is much faster for all cases. We investigate the learning time nc as we increase the dimension $D={{2}^{N}}$ of the parameter space, as depicted in figure 4(b). The data are well fitted to a presumable function ${{n}_{{\rm c}}}\simeq \alpha {{D}^{\beta }}$, with $\alpha \simeq 3.82$, $\beta \simeq 0.97$ for the classical machine, and $\alpha \simeq 1.61$, $\beta \simeq 0.80$ for the quantum machine7 . We note that the quantum machine still exhibits the speedup with the smaller α and β. Therefore, we expect such quantum speedup to be achievable even in real circumstances.

Figure 4.

Figure 4. (a) The mean task fidelity is given with respect to the iteration n. The simulations are done increasing N from 1 to 7. It is readily observed that the increments of the task fidelities are faster in the quantum situation for all cases. (b) The learning time, ${{n}_{{\rm c}}}$, as the dimension D of the parameter space increases is shown. The data are well fitted to a presumable function ${{n}_{{\rm c}}}\simeq \alpha {{D}^{\beta }}$, with $\alpha \simeq 3.82$, $\beta \simeq 0.97$ in the classical case (red line), and $\alpha \simeq 1.61$, $\beta \simeq 0.80$ in the quantum case (blue line). Note that the quantum machine still shows better convergence with the smaller α and β.

Standard image High-resolution image

6. Summary and discussion

We investigated the learning performances of two machines by considering the task of finding an N-bit Boolean function which can be used in a binary classification problem. The two machines were designed equivalently to make the comparison of these two machines as convincing as possible. The critical difference between the two machines was that the operations in the quantum machine are described by unitary operators, to deal with the quantum superposition. The learning processes of the two machines were characterized in terms of the acceptable region: the localized region of the parameter space including approximate solutions. We have found that the quantum machine has a wider acceptable region, induced by quantum superposition. We demonstrated a simulation with a standard feedback method, namely random search, to show that the sizes of the acceptable regions were inversely proportional to the learning time. Here, it was also shown that a wider acceptable region makes the learning faster; that is, the learning time is proportional to ${\rm O}({{{\rm e}}^{\alpha D}})$, with $\alpha \simeq 3.065$ in the classical learning case and $\alpha \simeq 0.238$ for the quantum machine. We then applied a practical learning method, namely differential evolution, to our main task, and observed the learning speedup of the quantum machine.

Here, we wish to recall that the maximized learning speedup of the quantum machine is achieved by choosing suitable phases as in equation (14). From a practical perspective, one may consider that an additional task, such as finding the relative phases, is required to ensure the remarkable performance of the quantum learning machine for other N-bit Boolean function targets. Alternatively, such an issue could be resolved by synchronizing the relative phases with the control parameters in the quantum machine, still yielding the learning speedup (see appendix B for details).

We expect our work to motivate researchers to study the role of various quantum effects in machine learning, and to open up new possibilities for improving the machine learning performance. It is still open whether the quantum machine can be improved more by using other quantum effects, such as quantum entanglement.

Acknowledgments

We acknowledge the financial support of National Research Foundation of Korea (NRF) grants funded by the Ministry of Science, ICT & Future Planning (No. 2010–0018295 and No. 2010–0015059). We also thank T Ralph, M Żukowski and H J Briegel for discussions and advice.

Appendix A.: Finding the optimal phase condition in equation (14)

Let us recall the general form of the task fidelity, as in equation (6). We suppose the target to be a deterministic function. Then, equation (6) is rewritten as

Equation (A.1)

In deriving the above reduced form of equation (A.1), we used that ${{P}_{\tau }}(y|{\boldsymbol{x}} )=1$ when y is equal to the desired value $f({\boldsymbol{x}} )$ for a given target f, and otherwise ${{P}_{\tau }}(y|{\boldsymbol{x}} )=0$. equation (A.1) shows that the task fidelity is enlarged if $P(f({\boldsymbol{x}} )|{\boldsymbol{x}} )$ is maximized for all ${\boldsymbol{x}} \ne 0$.

To start, consider an ideal learning machine (either classical or quantum) that always generates the desired outcome results with perfect task fidelity, $\mathcal{F}=1$. From our analysis in section 3, we can represent this machine as a point ${\rm S}=({{s}_{0}},{{s}_{1}},...,{{s}_{{{2}^{N}}-1}})$ in the ${{2}^{N}}$-dimensional search space. In this sense, we consider this ideal machine the 'solution machine'. We then consider a 'near-solution machine' which is located at a point ${\rm Q}=({{p}_{0}},{{p}_{1}},...,{{p}_{{{2}^{N}}-1}})$ in the search space. More specifically, $d({\rm Q},{\rm S})=\sqrt{\sum _{k=0}^{{{2}^{N}}-1}{{\left( {{s}_{k}}-{{p}_{k}} \right)}^{2}}}=\delta $, where $d({\rm Q},{\rm S})$ is the Euclidean distance. Here we assume further that the search space is isotropic around ${\rm S}$, so the machines on the surface of the hypersphere $d({\rm Q},{\rm S})=\delta $ have the same task fidelity. This assumption is physically reasonable for very small tolerance error. Thus, without loss of generality, we consider the near-solution machine corresponding to the point ${\rm Q}$ on the sphere $d({\rm Q},{\rm S})=\delta $, satisfying $|{{s}_{k}}-{{p}_{k}}|=c$ for all k. Here, $c=\sqrt{\delta /{{2}^{N}}}$.

In these circumstances, $P(f({\boldsymbol{x}} )|{\boldsymbol{x}} )$ for a classical near-solution machine is necessarily smaller than 1, depending on δ. On the other hand, if we choose the optimal phases ϕk, then $P(f({\boldsymbol{x}} )|{\boldsymbol{x}} )$ can be 1 without any dependence on δ in the quantum machine. To show this, let us first write the conditional probability $P(f({\boldsymbol{x}} )|{\boldsymbol{x}} )$ in equation (A.1) as

Equation (A.2)

where ${{A}_{{\boldsymbol{x}} }}$ is the index set whose elements are indices of the actually applied operators conditioned on the input ${\boldsymbol{x}} =\{{{x}_{1}},{{x}_{2}},...,{{x}_{N}}\}$. For example, if ${\boldsymbol{x}} =1$ (i.e. $\{1,0,0...,0\}$ in the binary representation), then we have ${{A}_{{\boldsymbol{x}} }}=\{0,1\}$ because G0 is always applied independently of the input, and the input signal ${{x}_{1}}=1$ activates G1 (see figure 1). Thus, ${{\prod }_{k\in {{A}_{1}}}}{{\hat{G}}_{k}}={{\hat{G}}_{1}}{{\hat{G}}_{0}}$. On the basis of the above description, we can generalize the calculations as

Equation (A.3)

Here, equation (A.2) becomes 1 when c = 0 or equivalently $d({\rm Q},{\rm S})=0$, because it is nothing but the solution machine. The basic idea is to find a condition for which all terms of c vanish even though c is nonzero, i.e. the near-solution machine. Therefore, $P(f({\boldsymbol{x}} )|{\boldsymbol{x}} )$ for the near-solution machine is mathematically equal to that of the solution machine. To carry out the task, we consider the product of two arbitrary unitaries ${{\hat{G}}_{k}}{{\hat{G}}_{l}}$ ($k\ne l$), as

Equation (A.4)

If we consider the near-solution machine, we can let ${{p}_{k(l)}}=|{{s}_{k(l)}}-c|$ and ${{q}_{k(l)}}=1-{{p}_{k(l)}}$. We then calculate ${{\hat{G}}_{k}}{{\hat{G}}_{l}}$, for the given ${{s}_{k}},{{s}_{l}}$ in ${\rm S}$, as

Equation (A.5)

where ${{\Lambda }_{\pm }}=1\pm {{{\rm e}}^{{\rm i}\Delta }}$, $\Delta ={{\phi }_{k}}-{{\phi }_{l}}$, and $g(c)=\sqrt{c-{{c}^{2}}}$. In calculating equation (A.5), we assumed a deterministic target, i.e. ${{s}_{k(l)}}$ is to be either 0 or 1, as is usual in most tasks (but not necessarily the case). Here, the important thing is that we can cause the term associated with c to vanish, by letting

Equation (A.6)

The above condition in equation (A.6) can be applied for all $k\ne l$. Thus, we provide here a generalized condition:

Equation (A.7)

This is the optimal phase condition, as in (14). We can check that this condition gives the maximum task fidelity with $P(f({\boldsymbol{x}} )|{\boldsymbol{x}} )=1$ (for all ${\boldsymbol{x}} \ne 0$).

Appendix B.: A practical version of a quantum machine

The speedup introduced in this paper is enabled when a quantum machine uses suitable phases. Accordingly, the suitable phases are prerequisites for fast learning. In a practical case, the learning time has to include complexity to obtain suitable phases, and this is not very easy to achieve. We introduce a practical quantum machine that does not require the effort of finding optimal phases. To this end, we modify the unitary ${{\hat{G}}_{k}}$ in equation (5) by setting all the phases ϕk as $\pi {{p}_{k}}$, i.e., ${{\hat{G}}_{k}}$ is written as

Equation (B.1)

such that the phases $\pi {{p}_{k}}$ are getting closer to the optimized phases $\pi {{s}_{k}}$ as the machine approaches the solution point in the parameter space during the learning, since the optimized phase condition is given by equation (14). Thus, this guarantees wider acceptable regions than for the classical machine for any learning target.

Figure B1 (a) shows that the practical quantum machine has wider acceptable regions than the classical machine for all one-bit Boolean targets. The areas inside the solid and dashed lines represent the acceptable regions for the practical quantum machine and the classical machine, respectively. This supports the assertion that the practical quantum machine always learns faster than the classical machine, while the performance of the original quantum machine depends on the target function.

Figure B1.

Figure B1. (a) We depict the boundaries of the acceptable regions for the one-bit learning machine with respect to all possible target functions, as in table 1: f1 (red), f2 (black), f3 (green) and f4 (blue). We set ${{\epsilon }_{t}}=0.05$. It is directly seen that the quantum case (solid line) has larger acceptable regions than the classical case (dotted line), for all cases. (b) The learning time, nc, with the dimension D of the parameter space. The data for classical (red) and quantum (blue) machines are exactly the same as for figure 3. The data for the new quantum machine (green line) are well fitted to ${\rm ln} {{n}_{c}}=\alpha D+\beta $, with the fitting parameters $\alpha \simeq 0.985$ and $\beta \simeq -0.200$.

Standard image High-resolution image

We then obtained the learning time of the practical quantum machine, which is shown in figure B1(b). These data are also well fitted to ${\rm ln} {{n}_{c}}=\alpha D+\beta $, with the fitting parameters $\alpha \simeq 0.985\pm 0.101$ and $\beta \simeq -0.200\pm 1.662$. Thus, ${{n}_{c}}\sim {\rm O}({{{\rm e}}^{0.985D}})$ for the practical quantum machine, whereas ${{n}_{c}}\simeq {\rm O}({{{\rm e}}^{3.065D}})$ for the classical machine (see equation (15)). This result shows that a considerable learning speedup is still achieved with this practical quantum machine, even though it takes up a little more time as compared to an original machine available with the optimal relative phases (${{n}_{c}}\sim {\rm O}({{{\rm e}}^{0.238D}})$).

Footnotes

  • We consider the case of supervised learning, where the desired results of the task are given to the machine.

  • This constant function, f1, is a trivial function; however, it is a considerable task for the machines to learn f1.

  • One may worry about the crossover point (for $N\geqslant 5$) in figure 4(a), associated with the validity of the quantum learning speedup for ${{\epsilon }_{t}}\to 0$. However, the appearance of the crossover is due to the DE optimization with the free parameters. Note here that the free parameters are optimized for the classical machine. The crossover can be removed by choosing the appropriate free parameters for each machine.

  • Such a polynomial result shows much improvement from the differential evolution one—but this is quite distinct from the case of random search, which exhibits exponential dependence.

Please wait… references are loading.
10.1088/1367-2630/16/10/103014