
Neural Networks Architecture Evaluation in a Quantum Computer Adenilton J. da Silva, and Rodolfo Luan F. de Oliveira Departamento de Estat´ıtica e Informatica´ Universidade Federal Rural de Pernambuco Recife, Pernambuco, Brazil 52171-900 Email: fadenilton.silva, [email protected] Abstract—In this work, we propose a quantum algorithm to The objective of this work is to propose a quantum algo- evaluate neural networks architectures named Quantum Neural rithm to evaluate a global information about neural networks Network Architecture Evaluation (QNNAE). The proposed algo- architectures. The quantum algorithm evaluates a neural net- rithm is based on a quantum associative memory and the learning algorithm for artificial neural networks. Unlike conventional algo- work architecture training the neural network only once. The rithms for evaluating neural network architectures, QNNAE does proposed algorithm has binary output and results in 0 with not depend on initialization of weights. The proposed algorithm high probability if the neural network can learn the data set has a binary output and results in 0 with probability proportional with high performance. The computational complexity of the to the performance of the network. And its computational cost algorithm is equal to the computational complexity of a neural is equal to the computational cost to train a neural network. network learning algorithm. The algorithm is based on the quantum superposition based learning strategy [14], [12] and I. INTRODUCTION on the quantum associative proposed by Trugenberg [15]. There are some problems that quantum computing pro- The remainder of this paper is divided into 5 sections. vides time complexity advantages over classical algorithms. Section II presents the basic concepts of quantum computing For instance, Grover’s search algorithm [1] has a quadratic necessary to the development of this work. Section III presents gain when compared with the best classical algorithm and quantum associative memory used in the proposed algorithm. the Shor’s factoring algorithm [2] provides an exponential Section IV presents the main contribution of this work: a gain when compared with the best known classical algo- quantum algorithm to evaluate artificial neural networks ar- rithm. Quantum computing also provides space complexity chitectures that does not depends on weights initialization. advantages over classical methods. For instance, a quantum Section V presents an empirical evaluation of the proposed associative memory has an exponential gain in storage capacity algorithm. This evaluation was performed using the classical when compared with classical associative memories [3], [4]. version of the algorithm. Section VI finally presents the Artificial Neural Networks [5] (ANN) are another model conclusion and future works. of computation that provides advantages over classical algo- rithms. ANN have the ability to learn from the environment II. QUANTUM COMPUTATION and can be used to solve some problems that do not have The quantum bit (qubit) is a two-level quantum system that known algorithmic solution. has unitary evolution over time in a 2-dimensional complex The development of machine learning applications requires vector space. An orthonormal basis (named computational an empirical search over parameters. Several techniques have basis) in this space is described in Eq. (1). One qubit can been proposed to perform parameter selection. In [6] a meta- be described as a superposition, linear combination, of the arXiv:1711.04759v1 [cs.NE] 13 Nov 2017 learning strategy is used to suggest initial SVM configurations. vectors in the computational basis, as described in Eq. (2), in Evolutionary computation [7] and several other metaheuris- which α and β are complex amplitudes conditioned with the tics [8] have been used to select artificial neural networks. following normalization jαj2 +jβj2 = 1. This feature causes a In [9] quantum computation combined with a nonlinear quan- quantum bit to be represented in many ways, unlike a classical tum operator is used to select a neural network architecture. bit that is always represented by 0 or 1. In this work, we suppose that a quantum computer with 1 0 thousands of qubits will be created and it will follow the j0i = j1i = (1) 0 1 rules of quantum computation described in [10]. In previous works, nonlinear quantum computation [11] has been used in j i = α j0i + β j1i (2) the learning algorithm of a neural network [12], [9]. We do not know if this supposition is realistic and we avoid any nonlinear For a system with several qubits the tensorial product (⊗) or non-unitary operators. is used. Given two quantum bit j i = α j0i + β j1i and jφi = It is possible to use quantum computers to obtain a global ρ j0i + θ j1i the tensor product j i ⊗|φi is equal to the vector information about a function with only one function call [13]. j φi = αρ j00i + αθ j01i + ρβ j10i + βθ j11i. A. Operators [3] that presents the first model of quantum associative mem- p p n n ory. Given a dataset with p patterns fm k g the storage A quantum operator on n qubits is represented by a 2 ×2 pk=1 unitary matrix. An M matrix is unitary if MM y = M yM = I, algorithm creates the quantum state described in Eq. (8). where M y is the conjugate transpose of M and I is the identity p X 1 matrix. Any 2n × 2n unitary matrix describes a valid quantum p jmpk i : (8) p operator on n qubits. An example of a quantum operator, pk=1 named Hadamard, and its actions on the computational basis In the retrieval phase, the quantum memory receives an are shown in Eq. (3). input pattern, which may be a corrupted version of a pattern already stored and probabilistically indicates the chance of the 1 1 H j0i = p1 (j0i + j1i) memory containing the pattern. The main characteristic of this H = p1 2 (3) 2 1 −1 H j1i = p1 (j0i − j1i) phase is that it does not require a classic auxiliary memory, 2 as is the case of Ventura’s memory. This probability of Not surprisingly, quantum operators can simulate classical recognition of the presented pattern is accessed by measuring operators. The key to this is the Toffoli operator described the control qubit jci observing the probability of being j0i. in Eq. (4). Every classical operator can be decomposed into p Nand operators, which is irreversible. However, even though 1 X j i = p ji; mpk ; ci (9) the Nand operator is irreversible, with proper treatment, the p Toffoli operator is able to simulate it. So quantum operators pk=1 can simulate any binary function whether it is reversible or As described in Eq. (9) the state in the recovery phase not. can be divided into three parts. The quantum register i, of size n, represents the input to be checked. The value mpk T jx; y; zi = jx; y; z ⊕ (x · y)i (4) representing the p values stored in the storage phase and the quantum register c, initialized with H j0i, is the control qubit. B. Quantum parallelism After the execution of probabilistic quantum memory re- The ability of intrinsic parallelism is one of the most trieval algorithm, measuring the control qubit jci will result promising characteristics of quantum computation. For in- jci = j0i with probability described in Eq. (10). The retrieval stance, given a function f(x): f0; 1g ! f0; 1g, it is possible algorithm of Trugenberg’s probabilistic memory is described to create a unitary operator Uf that implements f as described in [4]. in Eq. (5). It is possible to verify several inputs as described p in Eq. (6), where x = H j0i and y = j0i. 1 X π P (jci = j0i) = cos2 d (i; pk) (10) p 2n H k=1 Uf jx; yi = jx; y ⊕ f(x)i (5) p 1 X 2 π k P (jci = j1i) = sin dH (i; p ) (11) j0; 0i + j1; 0i j0; f(0)i + j1; f(1)i p 2n Uf p = p (6) k=1 2 2 As described in Eq. (10) and Eq. (11) the probability of C. Measuring recognition, or not, is related to the proximity of the input Almost all quantum operators are unitary, except the mea- to the stored patterns. The measure of similarity used is the k surement operation. Unlike classical computing, in which Hamming distance represented by dH (i; p ). When looking values can be measured and the system remains unchanged, for an isolated pattern, the distance between the patterns will in quantum computing, the very act of measuring causes the be, for the most part, greater than 0, collaborating for ket system to change. After a measurement the quantum state jci = j1i. to collapse to one of its possible values. For instance, if a quantum system is in the state described in Eq. (7). IV. QUANTUM LEARNING ALGORITHM Quantum neural networks [16], [17], [18], [19], [20], [21], α00 j00i + α01 j01i + α10 j10i + α11 j11i (7) [22] and quantum inspired neural networks [23], [24], [25] After the measurement the state will collapse to jx1x2i with have been proposed in several works. In this work, we follow 2 probability jαx1x2 j . a different approach and analyze the possibility to obtain global properties of a classical neural network using a quantum III. QUANTUM ASSOCIATIVE MEMORY algorithm. The quantum associative memory used in this work was Evaluate a neural architecture is not an easy task, “the proposed in [4]. This associative memory functionality can be mapping from an architecture to its performance is indirect, divided into two phases: i) quantum storage mechanism and ..., and dependent on the evaluation method used” [26]. The ii) quantum retrieval mechanism. The algorithm of the storage number of hidden layers, neurons per layers, the activation phase used in [4] is equivalent to the algorithm proposed in function is determined by the experience of the researcher [27] and there is no algorithm to determine the optimal neural Algorithm 1: Evaluate architecture network architecture [28].
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages6 Page
-
File Size-