GenQu: A Hybrid System for Learning Classical Data in Quantum States

1 INTRODUCTION . In the past decade , machine learning and artificial intelligence powered applications dramatically changed our daily life . Many novel algorithms and models achieve widespread practical successes in a variety of domains such as autonomous cars , healthcare , manufacturing , etc . Despite the wide adoption of ML models , training the machine learning models such as DNNs requires a tremendous amount of computing resources to tune millions of hyper-parameters . Especially in the post Moore ’ s Law era , the limit of semiconductor fabrication technology can not satisfy the the rapidly increased data volume needed for training , which restricts the development of this field ( Thompson et al. , 2020 ) . Encouraged by the recent demonstration of quantum supremacy ( Arute et al. , 2019 ) , researchers are searching for a transition from the classical learning to the quantum learning , with the promise of providing a quantum speedup over the classical learning . The current state of quantum-based learning inspires alternative architectures to classical learning ‘ s sub-fields , such as Deep Learning ( DL ) or Support Vector Machine ( SVM ) ( Garg & Ramakrishnan , 2020 ; Beer et al. , 2020 ; Potok et al. , 2018 ; Levine et al. , 2019 ) , where the quantum algorithm provides improvements over their classical counterparts . For example , there are quite a number of adoptions of quantum learning algorithms in domains of expectation maximization solving ( QEM ) ( Kerenidis et al. , 2019 ) that speeds up the kernel methods to sub-linear time ( Li et al. , 2019 ) , Quantum-SVM ( Ding et al. , 2019 ) , and NLP ( Panahi et al. , 2019 ) . Employing quantum systems to train deep learning models is rather developed with a multitude of approaches to creating and mimicking aspects of classical deep learning systems ( Verdon et al. , 2019 ; Beer et al. , 2020 ; Chen et al. , 2020 ; Kerenidis et al. , 2019 ) , with the following challenges : ( i ) , such systems are held back by the low qubit count of current quantum computers . ( ii ) , learning in a quantum computer becomes even more difficult due to the lack of efficient classical-to-quantum data encoding methodology ( Zoufal et al. , 2019 ; Cortese & Braje , 2019 ) . ( iii ) , most of the existing studies are based on purely theoretical analysis or simulations , lacking practical usability on near-term quantum devices ( NISQ ) ( Preskill , 2018 ) . More importantly , the above challenges would presist even when the number of qubits supported in quantum machines get siginificantly increased : when the number of qubits in the quantum system increases , the computational complexity grows exponentially ( Kaye et al. , 2007 ) , which quickly leads to tasks that become completely infeasible for simulation and near-term quantum computers . Therefore , discovering the representative power of qubits in quantum based learning system is extremely important , as not only does it allow near-term devices to tackle more complex learning problems , but also it eases the complexity of the quantum state exponentially . However , to tackle the topic of low-qubit counts of current quantum machines is rather sparse : to the best of our knowledge , there is only one paper for the problem of the power of one qubit ( Ghobadi et al. , 2019 ) . Within this domain , the learning potential of qubits are under-investigated . In this paper , we propose GenQu , a general-purpose quantum-classic hybrid framework for learning classical data in quantum states . We demonstrate the power of qubits in machine learning by approaching the encoding of data onto a single qubit and accomplish tasks that are impossible for comparative data streams on classical machines , which addressing the challenges ( i ) and ( ii ) . Enabled by GenQU , we develop a deep neural network architecture for classification problems with only 2 qubits , and a quantum generative architecture for learning distributions with only 1 qubit , and , additionally , We evaluate GenQU with intensive experiments on both IBM-Q real quantum computers and simulators ( addressing the challenge ( iii ) ) . Our major contributions include : • We propose , GenQu , a hybrid and general-purpose quantum framework that works with near-term quantum computers and has the potential to fit in various learning models with a very low qubit count . • Based on GenQu , we propose three different quantum based learning models to demonstrate the potential of learning data in quantum state . • Through experiments on both simulators and IBM-Q real quantum computers , we show that models in GenQu are able to reduce parameters by up to 95.86 % but still achieves similar accuracy in classification with Principal Component Analysis ( PCA ) ( Hoffmann , 2007 ) MNIST dataset , and converge up to 66.67 % faster than traditional neural networks . 2 PRELIMINARIES . 2.1 THE QUANTUM BIT ( QUBIT ) . Quantum computers operate on a fundamentally different architecture compared to classical computers . Classical computers operate on binary digits ( bits ) , represented by a 1 or a 0 . Quantum computers however , operate on quantum bits ( qubits ) . Qubits can represent a 1 or a 0 , or can be placed into a probabilistic mixture of both 1 and 0 simultaneously , namely superposition . Superposition is one of the core principles that allows quantum computers to be able to perform certain tasks significantly faster than that of their traditional counterparts . When discussing a quantum framework , we make use of the 〈bra| and |ket〉 notation , where a 〈bra| indicates a horizontal quantum state vector ( 1×n ) and |ket〉 indicates a vertical quantum state vector ( n× 1 ) . A qubit , as it is some combination of both a |1〉 and |0〉 simultaneously , is described as a linear combination between of |0〉 and |1〉 . This combination is described in Equation 1 . |Ψ〉 = α|0〉+ β|1〉 , |Ψ〉 = [ α β ] , |0〉 = [ 1 0 ] , |1〉 = [ 0 1 ] ( 1 ) In Equation 1 , the state of |Φ〉 describes the probabilistic quantum state of one qubit , respectively |φ〉 . The values of α and β are the probability coefficients and what encode information regarding this qubit ’ s state . Although qubits can exist in both |1〉 and |0〉 at the same time , when they are measured for a definite output , they collapse to one of two possible value , where in the case above those values are |0〉 or |1〉 . The coefficients , α and β , indicate the square root of the probability that the qubit measures as a |1〉 or a |0〉 . The definite states we are measuring the qubit against are based on how we measure the qubit , measuring as one of two possible measurements . These two possible measurements are two orthogonal eigen-vectors , and can be in any 3-Dimensional direction . This is best visualized and understood by the Bloch Sphere representation of a qubit , as illustrated in Figure 1 . A qubit can be represented by the unit Bloch Sphere visualized in Figure 1 . In the case of |0〉 and |1〉 , we are measuring across the z axis . Although the qubit could be measured against the Y or X axis , once a qubit is measured in a direction and is observed as some vector , the qubit is in that state unless acted upon , therefore making a measurement in Z then X be fraught without further processing . A pure quantum state has data encoded and manipulated through rotations over the Bloch sphere surface . Relating to Equation 1 , the α and β can be thought of as the states |φ〉 distance to the state vectors |0〉 and |1〉 , where a high α indicates being relatively close to |0〉 and vice-versa.The power of quantum computing lies in the ability to sample the output repeatedly , thereby providing multiple ” answers ” for one question . 2.2 QUANTUM DATA MANIPULATION . To accomplish data transformation and data encoding , a qubit and its quantum state must be manipulated to encapsulate information onto it . Qubits are manipulated through quantum gates , which in turn manipulates the overall quantum state . These gates can allow for complete manipulation over the Bloch sphere in Figure 1 , and more specifically complete manipulation of the quantum state vector , which can describe the state of a mixture of more than 1 qubit . We introduce the few gates that we make use of in this paper in Equations 2 and 3 . RY ( θ ) = [ cos ( θ 2 ) − sin ( θ 2 ) sin ( θ 2 ) cos ( θ 2 ) ] RZ ( θ ) = [ e−iθ2 0 0 e −iθ 2 ] ( 2 ) CRY ( θ ) = 1 0 0 0 0 1 0 0 0 0 cos θ2 − sin θ 2 0 0 sin θ2 cos θ 2 CRZ ( θ ) = 1 0 0 0 0 1 0 0 0 0 e iθ 2 0 0 0 0 e iθ 2 ( 3 ) The gates above accomplish specific tasks of quantum state manipulation.Equation 2 allows for a single qubit to be manipulated to any position on a Bloch sphere ’ s surface , from any starting point on aforementioned sphere . Equation 3 accomplishes entangling two qubits with controlled rotations . Controlled rotations allow for a single qubits state to be entangled with another . In the case of a controlled rotation gate , a qubits state is manipulated based on whether the control qubit measures as a |1〉 . Although we brush over this for the sake of easier reading , quantum entanglement empowers quantum computers to accomplish phenomenal tasks . These two styles of gates , single qubit rotations and controlled qubit rotations , allow for complete manipulation of quantum states , be it 1 or more qubits . 2.3 QUANTUM DEEP LEARNING Quantum Deep Learning is a relatively new approach to Quantum Machine Learning that takes quantum circuits and applies similar training techniques and learning methods of how classical neural networks work Chen et al . ( 2020 ) ; Garg & Ramakrishnan ( 2020 ) ; Beer et al . ( 2020 ) . In traditional deep learning layers are often used , where a layer is some large transformation function that takes in a set of inputs , and outputs a set of outputs , where the number of inputs does not necessarily equal the output . These functions are connected in series , sometimes in parallel , and typically trained through the use of back propagation Goodfellow et al . ( 2016 ) ; Chen et al . ( 2020 ) . This data flow through layers to some output is similar to how quantum circuits operate . Similar to how classical deep learning works , the way this data flows through time is up to the practitioner , who chooses and designs their network according to their needs . Quantum deep learning is approached through the use of layering gates sequentially . For our paper , our layers are comprised of the gates in Equations 2 and 3 . Similar to how deep learning is parameterized by connection weights , these gates are parameterized through rotations ( θ ) . At the end of the quantum circuit , a loss function is described by the practitioner , and the quantum networks parameters θ are updated iteratively such that the circuits loss is minimized Beer et al . ( 2020 ) ; Crooks ( 2019 ) . In the case of binary classification , one can make use of quantum entanglement to pool data down to one qubit channel , which then can be used as the final classification output of the network . These layers are visualized in Figures 3 and 2 . In Figure 3 we visualize the grouping of these circuits to be reminiscent of quantum traditional deep learning layers with the oracle approach . Interpreting these operations can be seen as a qubit entering through the left starting in state |0〉 , passing through gates until it has been transformed into state |φ〉 . 3 GENQU FRAMEWORK AND LEARNING MODELS 3.1 GENQU FRAMEWORK Our proposed GenQu framework is illustrated in Figure 4 . Before any operation of the framework is performed , the data must be transformed from classical to quantum states . This is done by transforming classical data into applicable quantum rotations , and is described under section 3.2 . Following this , the rotations are loaded onto a quantum computer . The quantum circuit preparation section is where the circuit relating to a specific machine learning algorithm is designed . For example , this is where a deep neural network or a convolutional neu- ral networks architecture would be set up , initialized and prepared . This circuit is loaded onto the quantum computer after the quantum data loading section . Once the circuit is set up , it can be induced . Inducing the quantum circuit results in the quantum state transformation of the input data over the quantum machine learning model . From here , if the output of the model was a quantum state , one could end here and feed it to another quantum algorithm . However , in the case of updating learn-able parameters , the relevant qubits need to be measured . We feed the qubits measurements to a loss analysis section , where we update our parameters accordingly . Once the parameters have been updated , we repeat this process of circuit loading , circuit inducing , and measurement , updating parameters until a desired loss of the network is attained or a predefined number of epochs have run .

Summary: This paper presents GenQu, a hybrid and general-purpose quantum framework for learning classical data through quantum states. By encoding two dimensions of data per one qubit. they demonstrate the effectiveness of their framework via two classical classification tasks, where 1 and 2 qubits are used, respectively. This paper is more like an entry-level tutorial, rather than a technical paper.  More technical contributions are needed towards a paper.