Quantum Clustering Algorithms
Total Page:16
File Type:pdf, Size:1020Kb
Quantum Clustering Algorithms Esma A¨ımeur [email protected] Gilles Brassard [email protected] S´ebastien Gambs [email protected] Universit´ede Montr´eal, D´epartement d’informatique et de recherche op´erationnelle C.P. 6128, Succursale Centre-Ville, Montr´eal (Qu´ebec), H3C 3J7 Canada Abstract Multidisciplinary by nature, Quantum Information By the term “quantization”, we refer to the Processing (QIP) is at the crossroads of computer process of using quantum mechanics in order science, mathematics, physics and engineering. It con- to improve a classical algorithm, usually by cerns the implications of quantum mechanics for infor- making it go faster. In this paper, we initiate mation processing purposes (Nielsen & Chuang, 2000). the idea of quantizing clustering algorithms Quantum information is very different from its classi- by using variations on a celebrated quantum cal counterpart: it cannot be measured reliably and it algorithm due to Grover. After having intro- is disturbed by observation, but it can exist in a super- duced this novel approach to unsupervised position of classical states. Classical and quantum learning, we illustrate it with a quantized information can be used together to realize wonders version of three standard algorithms: divisive that are out of reach of classical information processing clustering, k-medians and an algorithm for alone, such as being able to factorize efficiently large the construction of a neighbourhood graph. numbers, with dramatic cryptographic consequences We obtain a significant speedup compared to (Shor, 1997), search in a unstructured database with a the classical approach. quadratic speedup compared to the best possible clas- sical algorithms (Grover, 1997) and allow two people to communicate in perfect secrecy under the nose of an 1. Introduction eavesdropper having at her disposal unlimited comput- ing power and technology (Bennett & Brassard, 1984). Unsupervised learning is the part of machine learning Machine learning and QIP may seem a priori to have whose purpose is to give to machines the ability to find little to do with one another. Nevertheless, they have some structure hidden within data. Typical tasks in already met in a fruitful manner (see the survey of unsupervised learning include the discovery of “natu- Bonner & Freivalds, 2002, for instance). In this paper, ral” clusters present in the data (clustering), finding we seek to speed-up some classical clustering algo- a meaningful low dimensional representation of the rithms by drawing on QIP techniques. It is impor- data (dimensionality reduction) or learning explicitly a tant to have efficient clustering algorithms in domains probability function (also called density function) that for which the amount of data is huge such as bioinfor- represents the true distribution of the data (density matics, astronomy and Web mining. Therefore, it is estimation). Given a training data set, the goal of a natural to investigate what could be gained in perform- clustering algorithm is to group similar datapoints in ing these clustering tasks if we had the availability of the same cluster while putting dissimilar datapoints a quantum computer. in different clusters. Some possible applications of clustering algorithms include: discovering sociological The outline of the paper is as follows. In Section 2, groups existing within a population, grouping auto- we review some basic concepts of QIP, in particular matically molecules according to their structures, clus- Grover’s algorithm and its variations, which are at the tering stars according to their galaxies, and gathering core of our clustering algorithm quantizations. In Sec- news or papers according to their topic. tion 3, we introduce the concept of quantization as well th as the model we are using. We also briefly explain Appearing in Proceedings of the 24 International Confer- in that section the quantum subroutines based on ence on Machine Learning, Corvallis, OR, 2007. Copyright 2007 by the author(s)/owner(s). Grover’s algorithm that we are exploiting in order to Quantum Clustering Algorithms speed-up clustering algorithms. Then, we give a quan- tum information, whereas a double line carries classical tized version of divisive clustering, k-medians and the information; M denotes a measurement. construction of a c-neighbourhood graph, respectively, 1 in Sections 4, 5 and 6. Finally, we conclude in Section 7 0 with probability /2 |0i H M 1 with a discussion of the issues that we have raised. 1 with probability /2 Figure 1. Example"%#$ of a simple quantum circuit. 2. Quantum Information Processing In this very simple example, we apply a Walsh– Quantum information processing draws its uncanny √1 √1 Hadamard gate to state |0i, which yields 2 |0i+ 2 |1i. power from three quantum resources that have no clas- The subsequent measurement produces either 0 or 1, sical counterpart. Quantum parallelism harnesses the √1 2 1 each with probability | 2 | = /2, and the state col- superposition principle and the linearity of quantum lapses to the observed classical value. This circuit can mechanics in order to compute a function simulta- be seen as a perfect random bit generator. neously on arbitrarily many inputs. Quantum inter- ference makes it possible for the logical paths of a The notion of qubit has a natural extension, which is computation to interfere in a constructive or destruc- the quantum register. A quantum register |ψi, com- n tive manner. As a result of interference, computa- posed of n qubits, lives in a 2 -dimensional Hilbert P2n−1 tional paths leading to desired results can reinforce space. Register |ψi = i=0 αi|ii is specified by com- one another, whereas other computational paths that plex amplitudes α0, α1,. , α2n−1 subject to normal- P 2 would yield an undesired result cancel each other out. ization condition |αi| = 1. Here, basis state |ii Finally, there exist multi-particle quantum states that denotes the binary encoding of integer i. Unitary oper- cannot be described by an independent state for each ations can also be applied to two or more qubits. For- particle (Einstein, Podolsky & Rosen, 1935). The cor- tunately (for implementation considerations), any uni- relations offered by these states cannot be reproduced tary operation can always be decomposed in terms of classically (Bell, 1964) and constitute an essential unary and binary gates. However, doing so efficiently resource of QIP called entanglement. (by a polynomial-size circuit) is often nontrivial. Figure 2 illustrates the process by which a function f 2.1. Basic Concepts is computed by a quantum circuit C. Because unitary In this section, we briefly review some essential notions operations must be reversible, we cannot in general of QIP. A detailed account of the field can be found simply go from |xi to |f(x)i. Instead, we must map in the book of Nielsen and Chuang (2000). A qubit (or |x, bi to |x, b + f(x)i, where the addition is performed quantum bit) is the quantum analogue of the classical in an appropriate finite group and the second input is a bit. In contrast with its classical counterpart, a qubit quantum register of sufficient size. In case of a Boolean can exist in a superposition of states. For instance, an function, |bi is a single qubit and we use the sum mod- electron can be simultaneously on two different orbits ulo 2, also known as the exclusive-or and denoted “⊕”. of the same atom. Formally, using the Dirac notation, In all cases, it suffices to set b to zero at the input of a qubit can be described as |ψi = α|0i + β|1i where α the circuit in order to obtain f(x). and β are complex numbers called the amplitudes of |xi |xi classical states |0i and |1i, respectively, subject to the C normalization condition that |α|2 + |β|2 = 1. When |bi |b + f(x)i state |ψi is measured, either |0i or |1i is observed, with probability |α|2 or |β|2, respectively. Further- Figure 2. Unitary computation of function f. more, measurements are irreversible because the state When f is a Boolean function, it is often more con- of the system collapses to whichever value (|0i or |1i) venient to compute f in a manner that would have has been observed, thus losing all memory of former no classical counterpart: if x is the classical input, we amplitudes α and β. flip its quantum phase from + |xi to − |xi (or vice All other operations allowed by quantum mechan- versa) precisely when f(x) = 1. This process, which is ics are reversible (and even unitary). They are rep- achieved by the circuit given in Fig. 3, is particularly resented by gates, much as in a classical circuit. |xi (−1)f(x) |xi For instance, the Walsh–Hadamard gate H maps |0i to C √1 |0i + √1 |1i and |1i to √1 |0i − √1 |1i. Figure 1 illus- 2 2 2 2 |1i H H |1i trates the notions seen so far, where time flows from left to right. Note that a single line carries quan- Figure 3. Computing a function by phase flipping. Quantum Clustering Algorithms interesting when it is computed on a superposition of 3. Quantization of Clustering all (or some) inputs. That operation plays a key role Algorithms in Grover’s algorithm (Section 2.2). As a motivating example, consider the following sce- 2.2. Grover’s Algorithm and Variations nario, which corresponds to a highly challenging clus- tering task. Imagine that you are an employee of the In the original version of Grover’s algorithm (Grover, Department of Statistics of the United Nations. Your 1997), we are given a Boolean function f as a black boss comes to you with the complete demographic data box and we are promised that there exists a unique of all the inhabitants of Earth and asks you to analyse x0 such that f(x0) = 1.