K-Means Clustering on Noisy Intermediate Scale Quantum Computers

K-Means Clustering on Noisy Intermediate Scale Quantum Computers

1 K-Means Clustering on Noisy Intermediate Scale Quantum Computers Sumsam Ullah Khan1;2, Ahsan Javed Awan1 and Gemma Vall-Llosera1 1Department of Cloud Systems and Platforms, Ericsson Research, Sweden 2School of Electrical Engineering and Computer Science, Royal Institute of Technology, Sweden fsumsam.khan, ahsan.javed.awan, [email protected] Abstract—Real-time clustering of big performance data gener- computer requires to re-design the classical algorithms so they ated by the telecommunication networks requires domain-specific are bound to the principles of quantum mechanics. high performance compute infrastructure to detect anomalies. In this paper, we evaluate noisy intermediate-scale quantum (NISQ) Current and upcoming quantum computers also termed computers characterized by low decoherence times, for K-means Noisy Intermediate Scale Quantum computers (NISQ) do not clustering and propose three strategies to generate shorter-depth provide sufficient fault tolerance [1]. Qubits on the current quantum circuits needed to overcome the limitation of NISQ quantum devices have low coherence times. This leads to computers. The strategies are based on exploiting; i) quantum interference, ii) negative rotations and iii) destructive interfer- decoherence and errors in the computation [2]. Algorithm ence. By comparing our implementations on IBMQX2 machine implementations with shallow depth quantum circuits can for representative data sets, we show that NISQ computers can provide us with better results on NISQ computers considering solve the K-means clustering problem with the same level of that the complexity of implementation is measured as the total accuracy as that of classical computers. number of elementary gates required to build the circuit [3]. Index Terms—Quantum K-means, Noisy Intermediate-scale In this paper, we explore the quantum implementation of K- Quantum Computers means clustering algorithm and propose three optimization strategies to achieve shorter-depth circuits for quantum K- I. INTRODUCTION means on NISQ computers. In particular, we make the fol- lowing contributions: Machine Learning is being widely adopted by the industry to transform the massive amount of data into insights that • We provide an implementation of K-means clustering drive the growth of the companies in the era of digital trans- algorithm using a shallow depth quantum interference formation, e.g. supervised and unsupervised machine learning circuit which prepares the quantum states of qubit based algorithms like SVM, K-Means, Linear regression, etc. are on the input vectors such that the angle between the being used for automation of network management offering. interfering copies of the input vectors is equal to the angle The combination of compute intensity of machine learning between the interfering copies of the vectors in the final algorithms and the massive data volumes has spurred renewed quantum state. interest in the specialized high-performance computing plat- • We propose a method referred to as Negative Rotations, forms. which maps the cosine similarity of two vectors on the Quantum computers are one of them that exploit the probability of the j0i state of the qubit. The implemen- principles of quantum mechanics: i) Quantisation: energy, tation of K-means algorithm which uses the probability momentum, angular momentum and other physical quantities P j0i as a metric to assign clusters to test vectors is arXiv:1909.12183v1 [cs.ET] 26 Sep 2019 of a bound system are restricted to discrete values (quantised); provided. ii) Wave-particle duality: objects are both waves and particles; • We propose a method for calculating distances using the iii) Heisenberg principle: the more precisely the position of destructive interference probabilities of the quantum state some particle is determined, the less precisely its momentum which is prepared based on the input vectors. An imple- can be known, and vice versa; thus there is a fundamental mentation of the circuit that calculates distances between limit to the measurement precision of physical quantities of a two vectors used to realize the K-means algorithm is also particle; iv) Superposition: two quantum states can be added given. together and the result is another valid quantum state; v) En- tanglement: when the quantum state of any particle belonging This paper is structured as follows. First we summarise to a system cannot be described independently of the state of the basic concepts of quantum computing and the K-means the other particles, even when separated by a large distance, the algorithm (section II). Then we discuss the related work in particles are entangled; vi) Fragility: by measuring a quantum the field (section III). We continue with our implementations system we destroy any previous information. From this, it for quantum K-means (section IV), how we have evaluated our follows the no-cloning theorem that states: it is impossible implementations (section V). It follows the results we obtained to create an identical copy of an arbitrary unknown quantum with a thorough discussion (section VI) and we finalise with state. Executing machine learning algorithms on a quantum the conclusions (section VII). 2 II. BACKGROUND 2) Entanglement: If two qubits are entangled it means that A. K-Means measuring one qubit collapses the superposition of the other qubit as well. An entangled state is a multi-qubit quantum K-means [4] is an unsupervised clustering algorithm that state that can not be written as a Kronecker product of single- groups together n observations into K clusters making sure qubit states. For example, the individual qubits that result on intra cluster variance is minimized and inter set variance is the following product state are entangled maximized. Training vectors are assigned to the cluster of the T nearest centroid iteratively. New centroids are calculated at h 1 1 i p 0 0 p the end of the iterations by averaging the vectors belonging 2 2 to the corresponding clusters. The time complexity of the as individual qubits states cannot be factored out from this classical version of the algorithm is dependent on the number product: of features in the input vectors N, the total number of input vectors M, and K (number of clusters) O(MNK) 0 p1 1 ac = p1 2 2 B 0 C a c ad = 0 B C = ⊗ −! B. Noisy Intermediate Scale Quantum (NISQ) Computers @ 0 A b d bc = 0 p1 bd = p1 Noisy Intermediate Scale Quantum (NISQ) Computers [5] 2 2 are the near future quantum computers with 50-100 qubits. These computers are potentially capable of solving tasks ex- Since there is no solution to the set of equations, this means ( a ) ( c ) ponentially faster than today’s classical computers. However, that the individual states b and d cannot be factored there are certain limitations that restrict the effectiveness of out. Therefore, the qubits are entangled. In this entangled NISQ computers. The noise in the quantum gates and low quantum system, if we measure the first qubit to be in state j0i j0i coherence times of the qubits will limit the size of the quantum , the second qubit would automatically collapse to state circuit that can be executed. Keeping in view these limitations, as well. Similarly if the first qubit is measured to be in state j1i j1i smaller depth quantum circuits are desired so they can be , the second qubit would immediately collapse to . This 50% executed reliably on NISQ computers. entangled system has probability of collapsing to state j00i and 50% probability of collapsing to j11i. C. Basic Quantum Computing Concepts 3) Quantum Gates: Quantum gates are the quantum op- erations used to manipulate and transform qubit states. After 1) Qubit: Qubit is the smallest unit of information in a applying a quantum gate the norm of the state vector should quantum computer. Binary bit states are written using Dirac 1 maintain its unity, meaning the sum of the squares of proba- Vector or Bra-Ket notation as follows, j0i = ( 0 ) and j1i = 0 bility amplitudes should be equal to one. Therefore, quantum ( 1 ). Unlike a classical bit which can be in either state j0i or gates are represented as unitary matrices. The conjugate trans- in state j1i, a qubit can be in state j0i and state j1i at the pose of a unitary matrix is its inverse, and since the inverse same time with some probability of being in either state. of all unitary matrices exists, thus all quantum operations are a reversible. This holds true for every quantum gate except the The state of a qubit is represented as, j i = ( b ) where a and b are complex numbers and jaj2+jbj2= 1. These are the measurement gate which is a non-reversible operation used at probability amplitudes for the qubit being in either state. jaj2 the end of the computation. is the probability of finding the qubit after measurement in The quantum gates that are used in this work are provided state j0i and jbj2 is the probability for state j1i. The state of in Table I. Further reading on all quantum gates can be done a qubit can also be written as j i = a j0i + b j1i. in ref. [6]. A qubit in such a state is said to be in superposition, so Quantum Gate Matrix Representation Circuit Representation 1 1 when a measurement is done on that qubit, it would yield j0i Hadamard p1 H 2 2 2 1 −1 with probability jaj and j1i with probability jbj . 0 1 NOT Multiple bits in dirac vector notation are represented as 1 0 X θ θ cos 2 − sin 2 tensor products. So a bit string 01 is written as Ry (rotation Y) θ θ Ry(θ) sin 2 cos 2 0 1 01 0 0 01 0 j00i 001 1 0 1 0 0 1 0 B 1 C j01i 1 CX (controlled NOT) B C • j0i ⊗ j1i = ⊗ = B C = B C @0 0 0 1A 0 1 0 j10i @0A 0 0 1 0 @0 A 1 j11i 0 01 0 0 0 0 0 0 01 0 1 0 0 0 0 0 0 B C B0 0 1 0 0 0 0 0C Similarly multiple qubits are represented as tensor products B C B0 0 0 1 0 0 0 0C CCX (Toffoli) B C • of individual qubits, but instead of a definite state, the tensor B0 0 0 0 1 0 0 0C B C product state holds the probability amplitudes of each possible B0 0 0 0 0 1 0 0C @0 0 0 0 0 0 0 1A • state.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    12 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us