Universal discriminative quantum neural networks

Quantum mechanics fundamentally forbids deterministic discrimination of quantum states and processes . However , the ability to optimally distinguish various classes of quantum data is an important primitive in quantum information science . In this work , we trained near-term quantum circuits to classify data represented by quantum states using the Adam stochastic optimization algorithm . This is achieved by iterative interactions of a classical device with a quantum processor to discover the parameters of an unknown non-unitary quantum circuit . This circuit learns to simulate the unknown structure of a generalized quantum measurement , or positive-operator valued measure ( POVM ) , that is required to optimally distinguish possible distributions of quantum inputs . Notably we used universal circuit topologies , with a theoretically motivated circuit design which guaranteed that our circuits can perform arbitrary input-output mappings . Our numerical simulations showed that quantum circuits could be trained to discriminate among various pure and mixed quantum states , exhibiting a trade-off between minimizing erroneous and inconclusive outcomes with comparable performance to theoretically optimal POVMs . We trained the circuit on different classes of quantum data and evaluated the generalization error on unseen quantum data . This generalization power hence distinguishes our work from standard circuit optimization and provides an example of quantum machine learning for a task that has inherently no classical analogue . 1 INTRODUCTION . Quantum computation are known to provide speedups in several applications over classical computation . Besides the famous Shor ’ s algorithm for prime number factorization , quantum computers can also produce statistical patterns that are hard for a classical computer to produce . This raises the possibility that quantum computers can also recognize patterns that are hard to recognize for classical computers , or , in general , that quantum computers can help solve classical machine learning problems more efficiently . Recently , this joint field of quantum computation and machine learning has received a considerable amount of attention . Using the circuit model of computation , several quantum algorithms have been designed that provide quadratic to exponential speedups on classical data ( Biamonte et al . ( 2017 ) ; Ciliberto et al . ( 2018 ) ) . A related and interesting area is to develop novel machine learning methods on quantum data . In general , any collection of quantum states which carry certain meaningful information can be considered as quantum data . To motivate this direction , we want to emphasize that using quantum states as a storage medium for information processing have shown to provide advantages in several aspects . Researches have shown that by coupling a quantum state with another target system , one could obtain information about the target system through this quantum state but with a better sensitivity . For example , quantum meteorology allows for a quadratic improvement over classical methods in terms of the scaling of statistical errors , i.e . the scaling of the standard deviations in estimated values in repeated measurements . Another example is quantum sensing , which provide much higher sensitivity in tasks like target detections in microwaves , i.e . quantum radar ( Barzanjeh et al . ( 2015 ) ) , and in general , sensing electric or magnetic fields ( Degen et al . ( 2017 ) ) . Further , it is proposed that by storing certain information of a picture on a quantum state , pattern recognition can be achieved with much fewer damage done to this picture if it is very sensitive to the exposure of light ( Schaller & Schützhold ( 2006 ) ) . Certain types of quantum data are special in that they are inherently quantum mechanical . They could be produced from materials fabricated in certain exotic quantum state or could be the result of quantum information processing procedures . Here we could conjecture the inherent advantage of using quantum computers to recognize and classify these natural quantum data . For example , topological materials made in the exotic topological phase have non-classical electronic properties and are promising materials to build fault-tolerant quantum computers ( Qi & Zhang ( 2011 ) ; Karzig et al . ( 2017 ) ) . However , predicting the phase of topological materials has been a very challenging problem , but recently it was shown that quantum neural networks could be used to recognize the phase of a quantum state ( Cong et al . ( 2018 ) ) . In addition , the promised security of quantum communication protocols and a surge of ideas in quantum communication networks ( Kimble ( 2008 ) ; Ren et al . ( 2017 ) ) further stimulates the research into the topic of quantum data . In this work , we explored the general problem of classifying quantum data . This problem could be considered as an extension of the well-researched field quantum state discrimination , which identifies a quantum state among a set of possible candidates of which one has complete knowledge a priori . Quantum state discrimination already found applications in many fields such as quantum key distribution ( Bennett ( 1992a ) ) and cryptography ( Barnett & Croke ( 2009 ) ; Bergou ( 2007 ) ) . A key challenge for the discrimination of quantum states is that a deterministic discrimination is impossible when the complex vectors representing the candidate states are not orthogonal , i.e . when their overlaps are non-zero . Therefore , the central task of quantum state discrimination is to find the optimal discriminative measurement that one should perform for those states . However , it is not possible to directly apply quantum state discrimination to classify the quantum data . Firstly , it is inappropriate to assume that one possesses the complete knowledge of the data a priori , which are often only samples generated from the data collection process . Also , even with all the quantum data available , obtaining the complete knowledge of them ( i.e . the density matrices describing them ) are very expensive . In addition , quantum state discrimination often fails to give the optimal discriminative measurement in an analytically closed form , unless the quantum states are already orthogonal or possess certain symmetry properties ( Barnett & Croke ( 2009 ) ) . In cases it fails , one may use numerical optimization algorithms to find the optimal measurement . However , the exponential increase of the dimension of the density matrices renders the numerical optimization inefficient . Due to the limitations of quantum state discrimination , it is then a natural question whether we can use a quantum computer to help with the optimization procedure . Here we utilize a hybrid quantumclassical approach to directly learn the design of a shallow quantum circuit for the classification of quantum data . In this hybrid scheme , a classical computer is used to interactively change a quantum circuit and optimize the output of the quantum computer . Recently a string of works focusing on this hybrid scheme for training quantum circuits for a wide range of tasks have been proposed ( Banchi et al . ( 2016 ) ; Wan et al . ( 2017 ) ; Innocenti et al . ( 2018 ) ; Romero et al . ( 2017 ) ; Mitarai et al . ( 2018 ) ; Farhi & Neven ( 2018 ) ; Verdon et al . ( 2017 ) ; Li & Benjamin ( 2017 ) ; Grant et al . ( 2018 ) ; Schuld et al . ( 2018 ) ) , with major players in quantum computing hardware releasing software toolkits for hybrid quantum-classical models . This makes the hybrid scheme a promising area in quantum computation . Our approach described here is novel in two perspectives . First , we used a quantum circuit ansatz that is motivated for implementation on near-term devices . This ansatz is shallow in depths but possess the full power of quantum computation , i.e . it can perform any unitary transformation allowed in quantum mechanics . It comprises gates from a universal gate set consisting of C-NOT and single-qubit gates , motivated by the fact that their implementations are known for the currently most used experimental architectures . It is nearly optimal in terms of the number of C-NOT gates it has , which is also an important feature for an implementation on near-term devices . Second , unlike previous works on quantum state discrimination , we focused on the generalization ability of our circuit , i.e. , we trained the circuit on a specific range of the parameters with the goal of maximizing its generalization performance , hence considering a learning framework . This distinguishes our work from the pure optimization problem for the state discrimination task , which is optimizing the circuit to distinguish only a concrete set of states . We showed that this universal quantum circuit can be trained as a discriminator for classification of non-orthogonal quantum data sampled from various different probability distributions . Our discriminator can achieve a near-zero error rate by producing inconclusive signals . 2 DATASET AND OUR APPROACH . In this work , we propose a novel approach to train a universal quantum circuit to classify quantum data , which are stored in qubits . In this section , we first explain the mathematical descriptions of quantum states , operations and measurements on these states . We then specify the quantum data we used in this work for classification . Next , we outline the approach we took to optimize a universal quantum circuit which was used to classify the quantum data . We defer the detailed decomposition of this quantum circuit in Appendix A . Mathematical descriptions Quantum states are described by density matrices , which are Hermitian , positive semi-definite complex matrices of unit trace , and commonly denoted by the symbol ρ . For the quantum states which stores certain useful information , we may assume that they could be parameterized by certain parameters which follow certain probability distributions specific to the information they carried . For classification , we are normally presented with an unknown quantum state , belonging to families of quantum states , each described mathematically by : ρi ( ai ) , ai ∼ αi , ( 2.1 ) where i is the label for different families , ρi ( ai ) is the density matrix describing a quantum datum in the family i , parametrized by ai . The parameters ai are assumed to follow the probability distribution αi . When training a quantum circuit for classification , ai are samples drawn according to the distribution αi . Transformations on quantum states are described by a complex unitary matrix U , which transforms a quantum state ρ according to the rule : ρ→ UρU† . ( 2.2 ) A measurement on the quantum state ρ is described by a set of matrices { Mj } , which are Hermitian , positive semi-definite and sum to the identity matrix , i.e . ∑ j Mj = 1 . Here j labels the possible measurement outcomes , and the probability pj that this particular measurement outcome is detected is , pj = Tr ( Mjρ ) , ( 2.3 ) where Tr is the trace operator . Such a collection of matrices Mj is commonly called a positiveoperator valued measure ( POVM ) . A common example of POVM is a projection-valued measure ( PVM ) . In the case of a PVM , each Mj is a projector into some linear subspace and different Mj are orthogonal to each other , i.e . MjMi = δijMj . Any POVM could be realized by a quantum circuit , which consists of a series of unitary matrices ( transformations ) and measurements in the computational basis . Conversely , a quantum circuit which is parameterized by some parameters and has measurements could also represent many different POVMs . There exists a quantum circuit which could represent any POVM with a fixed number of possible measurement outcomes . Such a circuit is called a universal discriminator in this paper , and a specific one which we used is discussed in Appendix A . Our Dataset For this work , we restricted our attention to the classification of two families of quantum states stored in 2 qubits . Our first family consists of pure states , parametrized by a real number a ∈ [ 0 , 1 ] : ψ1 ( a ) = ( √ 1− a2 , 0 , a , 0 ) , ρ1 = |ψ1 ( a ) 〉〈ψ1 ( a ) | . ( 2.4 ) The second family consists of mixed states ρ2 ( b ) where b ∈ [ 0 , 1 ] . Specifically , ψ2/3 = ( 0 , ± √ 1− b2 , b , 0 ) , ρ2 = 1 2 |ψ2〉〈ψ2|+ 1 2 |ψ3〉〈ψ3| . ( 2.5 ) The overlap between ψ1 and ψ2/3 is ab , and hence our data in two families are non-orthogonal . In the case when a is a fixed value , and b = 1√ 2 , the maximal success rate for unambiguously discriminating between ρ1 and ρ2 has been theoretically studied , and an experimental demonstration is available ( Mohseni et al . ( 2004 ) ) . The specific distribution we have tested in our experiments are summarized in Table 1 . To generate the data for the training , validation , and testing of our circuits , we randomly sampled points from the corresponding distributions . Approach . Overall , there are two major strategies to cope with our inherent inability to perform deterministic discrimination of quantum states : ( a ) Minimum-error discrimination : In this strategy , the task is to minimize the probability that the inevitable errors occur in the classification . ( b ) Unambiguous discrimination : In this strategy , the discriminator has one more output prediction than the number of classes it tries to classify : an inconclusive outcome . The task is to eliminate the error rate of the discriminator while minimizing the probability of this inevitable inconclusive outcome . A pure unambiguous discrimination with strictly zero error rate is not guaranteed to be possible for arbitrary quantum data . From the perspective of numerical optimization , one needs to allow for some small but non-zero errors to happen . In this work , we used the machine learning approach to train a universal quantum circuit capable of giving any quantum measurements with four possible measurement outcomes mi2i1 , where i1 , i2 ∈ { 0 , 1 } are the measurement outcomes of the first and the second qubit respectively . The parameterization of this circuit is discussed in Appendix A . By assuming that input ρ1 ( a ) produces the outputm00 orm10 , input ρ2 produces the outputm01 , and assuming thatm11 is the inconclusive output , this circuit acts as a discriminator . Therefore , we could trivially define various probabilities ( success probability Psuc , error probability Perr , and inconclusive probability Pinc ) with respect to an input training data with known class label . For example , when ρ1 is the input , the probability of detectingm01 is the Perr , the probability of detectingm11 is the Pinc . In this work , we performed experiments on simulated quantum computers , where these probabilities were available . We note that on real quantum computers , these probabilities can be estimated through repeated measurements on replicated data , up to some precision . To train the circuit , we used a heuristically motivated loss function defined in Eq . 2.6 , which is the averaged absolute difference between the desired probabilities and the measured probabilities . It contains hyperparameters αerr and αinc to balance between the erroneous outcomes and the inconclusive outcomes : J = ∑ i 1 |Si| ∑ ai∈Si |Psuc ( ρi ( ai ) ) − 1| + αerr ∑ i 1 |Si| ∑ ai∈Si |Perr ( ρi ( ai ) ) − 0| + αinc ∑ i 1 |Si| ∑ ai∈Si |Pinc ( ρi ( ai ) ) − 0| . ( 2.6 ) Here we assumed that for each family of quantum states , we had been supplied with a set Si of training samples , where each class was labeled by i . Then |Si| denotes the number of samples in the training sets Si , αerr is the penalty for making errors , and αinc is the penalty for giving inconclusive outcomes . Psuc ( ψ ) /Perr ( ψ ) /Pinc ( ψ ) are the probabilities of giving a correct/erroneous/inconclusive measurement outcome for the specific input quantum data ρi . This loss function measures the performance of our quantum circuit as a minimal-error discriminator ( when αerr < αinc ) or as an unambiguous discriminator ( when αerr > αinc ) . To train this circuit , we used the Adam optimization algorithm ( Kingma & Ba ( 2014 ) ) , and the gradients were calculated by the forward difference formula . For our specific problem of classifying ρ1 and ρ2 as defined in Eq . 2.4 and Eq . 2.5 , we defined an extra set of success/erroneous/inconclusive rates in Eq . 2.7 to summarize and compare the performance of different trainings : Ps = 1 3 Ps ( ρ1 ) avg + 2 3 Ps ( ρ2 ) avg = 1 3 Ps ( ψ1 ) avg + 1 3 Ps ( ψ2 ) avg + 1 3 Ps ( ψ3 ) avg ( 2.7 ) where s stands for suc ( successful ) , err ( erroneous ) or inc ( inconclusive ) . The subscript avg means that the probabilities are calculated as the value averaged in all samples available in either the training set , or the test set ( but not both ) . The choice of weights ( 13and 2 3 ) in the Eq . 2.7 was made to be consistent with the paper Mohseni et al . ( 2004 ) .

Summary: The authors partially integrate a neural network into classical approaches to classify the state of a quantum circuit. The model is not actually clear in what it is doing, but there are some trained weights somewhere. They allow for an "uncertainty" prediction by giving one more node than there are classification targets, corresponding to a less-penalized uncertain prediction. They evaluate their model on numerical simulations.