Quantum Optical Experiments Modeled by Long Short-Term Memory

1 INTRODUCTION . In the past decade , artificial neural networks have been applied to a plethora of scientific disciplines , commercial applications , and every-day tasks with outstanding performance in , e.g. , medical diagnosis , self-driving , and board games ( Esteva et al. , 2017 ; Silver et al. , 2017 ) . In contrast to standard feedforward neural networks , long short-term memory ( LSTM ) ( Hochreiter , 1991 ; Hochreiter & Schmidhuber , 1997 ) architectures have recurrent connections , which allow them to process sequential data such as text and speech ( Sutskever et al. , 2014 ) . Such sequence-processing capabilities can be particularly useful for designing complex quantum experiments , since the final state of quantum particles depends on the sequence of elements , i.e . the experimental setup , these particles pass through . For instance , in quantum optical experiments , photons may traverse a sequence of wave plates , beam splitters , and holographic plates . Highdimensional quantum states are important for multiparticle and multisetting violations of local realist models as well as for applications in emerging quantum technologies such as quantum communication and error correction in quantum computers ( Shor , 2000 ; Kaszlikowski et al. , 2000 ) . Already for three photons and only a few quantum levels , it becomes in general infeasible for humans to determine the required setup for a desired final quantum state , which makes automated design procedures for this inverse problem necessary . One example of such an automated procedure is the algorithm MELVIN ( Krenn et al. , 2016 ) , which uses a toolbox of optical elements , randomly generates sequences of these elements , calculates the resulting quantum state , and then checks whether the state is interesting , i.e . maximally entangled and involving many quantum levels . The setups proposed by MELVIN have been realized in laboratory experiments ( Malik et al. , 2016 ; Erhard et al. , 2018b ) . Recently , also a reinforcement learning approach has been applied to design new experiments ( Melnikov et al. , 2018 ) . Inspired by these advances , we investigate how LSTM networks can learn quantum optical setups and predict the characteristics of the resulting quantum states . We train the neural networks using millions of setups generated by MELVIN . The huge amount of data makes deep learning approaches the first choice . We use cluster cross validation ( Mayr et al. , 2016 ) to evaluate the models . 2 METHODS . 2.1 TARGET VALUES . Let us consider a quantum optical experiment using three photons with orbital angular momentum ( OAM ) ( Yao & Padgett , 2011 ; Erhard et al. , 2018a ) . The OAM of a photon is characterized by an integer whose size and sign represent the shape and handedness of the photon wavefront , respectively . For instance , after a series of optical elements , a three particle quantum state may have the following form : |Ψ〉 = 1 2 ( |0 , 0 , 0〉+ |1 , 0 , 1〉+ |2 , 1 , 0〉+ |3 , 1 , 1〉 ) . ( 1 ) This state represents a physical situation , in which there is 1/4 chance ( modulus square of the amplitude value 1/2 ) that all three photons have OAM value 0 ( first term ) , and a 1/4 chance that photons 1 and 3 have OAM value 1 , while photon 2 has OAM value 0 ( second term ) , and so on for the two remaining terms . We are generally interested in two main characteristics of the quantum states : ( 1 ) Are they maximally entangled ? ( 2 ) Are they high-dimensional ? The dimensionality of a state is represented by its Schmidt rank vector ( SRV ) ( Huber & de Vicente , 2013 ; Huber et al. , 2013 ) . State |Ψ〉 is indeed maximally entangled because all terms on the right hand side have the same amplitude value . Its SRV is ( 4,2,2 ) , as the first photon is four-dimensionally entangled with the other two photons , whereas photons two and three are both only two-dimensionally entangled with the rest . A setup is labeled “ positive ” ( yE = 1 ) if its output state is maximally entangled and if the setup obeys some further restrictions , e.g. , behaves well under multi-pair emission , and otherwise labeled “ negative ” ( yE = 0 ) . The target label capturing the state dimensionality is the SRV ySRV = ( n , m , k ) > . We train LSTM networks to directly predict these state characteristics ( entanglement and SRV ) from a given experimental setup without actually predicting the quantum state itself . 2.2 LOSS FUNCTION . For classification , we use binary cross entropy ( BCE ) in combination with logistic sigmoid output activation for learning . For regression , it is always possible to reorder the photon labels such that the SRV has entries in non-increasing order . An SRV label is thus represented by 3-tuple ySRV = ( n , m , k ) > which satisfies n ≥ m ≥ k. With slight abuse of notation , we model n ∼ P ( λ ) as a Poisson-distributed random variable and m ∼ B ( n , p ) , k ∼ B ( m , q ) as Binomials with ranges m ∈ { 1 , . . . n } and k ∈ { 1 , . . . , m } and success probabilities p and q , respectively . The resulting log-likelihood objective ( omitting all terms not depending on λ , p , q ) for a data point x with label ( n , m , k ) > is ` ( λ̂ , p̂ , q̂ | x ) = n log λ̂− λ̂+m log p̂+ ( n−m ) log ( 1− p̂ ) + k log q̂ + ( m− k ) log ( 1− q̂ ) ( 2 ) where λ̂ , p̂ , q̂ are the network predictions ( i.e . functions of x ) for the distribution parameters of n , m , k respectively . The Schmidt rank value predictions are n̂ = λ̂ , m̂ = p̂λ̂ , k̂ = p̂q̂λ̂ . To see this , we need to consider the marginals of the joint probability mass function f ( n , m , k ) = λne−λ n ! ( n m ) pm ( 1− p ) n−m ( m k ) qk ( 1− q ) m−k . ( 3 ) To obtain the marginal distribution of m , we can first sum over all possible k , which is easy . To sum out n we first observe that ( n m ) = 0 for n < m , i.e . the first m terms are zero and we may write f ( m ) = ∞∑ n=0 f ( n , m ) = ∞∑ n=0 f ( m+ n , m ) ( 4 ) capturing only non-zero terms . It follows that f ( m ) = ∞∑ n=0 λn+me−λ ( n+m ) ! ( n+m m ) pm ( 1− p ) n = e−λpmλm ∞∑ n=0 λn ( 1− p ) n ( n+m ) ! ( n+m m ) = e−λpmλm m ! ∞∑ n=0 λn ( 1− p ) n n ! = e−pλ ( pλ ) m m ! , ( 5 ) which is P ( pλ ) -distributed . Using the same argument for k we get that the marginal of k is P ( pqλ ) distributed . The estimates n̂ , m̂ , k̂ are obtained by taking the means of their respective marginals . 2.3 NETWORK ARCHITECTURE . The used sequence processing model is depicted in Figure 1 . We train two networks , one for entanglement classification ( target yE ) , and one for SRV regression ( target ySRV ) . The reason why we avoid multitask learning in this context is that we do not want to incorporate correlations between entanglement and SRV into our models . For instance , the SRV ( 6,6,6 ) was only observed in nonmaximally entangled samples so far , which is a perfect correlation . This would cause a multitask network to automatically label such a sample as negative only because of its SRV . By training separate networks we lower the risk of incorporating such correlations . A setup of N elements is being fed into a network by its sequence of individual optical components x = ( x1 , x2 , ... , xN ) > , where in our data N ranges from 6 to 15 . We use an LSTM with 2048 hidden units and a component embedding space with 64 dimensions . The component embedding technique is similar to word embeddings ( Mikolov et al. , 2013 ) . 3 EXPERIMENTS . 3.1 DATASET . The dataset produced by MELVIN consists of 7,853,853 different setups of which 1,638,233 samples are labeled positive . Each setup consists of a sequence x of optical elements , and the two target values yE and ySRV . We are interested in whether the trained model is able to extrapolate to unseen SRVs . Therefore , we cluster the data by leading Schmidt rank n. Figure 2 shows the the number of positive and negative samples in the data set for each n . 3.2 WORKFLOW . All samples with n ≥ 9 are moved to a special extrapolation set consisting of only 1,754 setups ( gray cell in Table 1 ) . The remainder of the data , i.e . all samples with n < 9 , is then divided into a training set and a conventional test set with 20 % of the data drawn at random ( iid ) . This workflow is shown in Figure 3 . The test set is used to estimate the conventional generalization error , while the extrapolation set is used to shed light on the ability of the learned model to perform on higher Schmidt rank numbers . If the model extrapolates successfully , we can hope to find experimental setups that lead to new interesting quantum states . Cluster cross validation ( CCV ) is an evaluation method similar to standard cross validation . Instead of grouping the folds iid , CCV groups them according to a clustering method . Thus , CCV removes similarities between training and validation set and simulates situations in which the withheld folds have not been obtained yet , thereby allowing us to investigate the ability of the network to discover these withheld setups . We use CCV with nine folds ( white cells in Table 1 ) . Seven of these folds correspond to the leading Schmidt ranks 2 , . . . , 8 . The samples with n = 1 ( not entangled ) and n = 0 ( not even a valid three-photon state ) are negative by definition . These samples represent special cases of yE = 0 setups and it is not necessary to generalize to these cases without training on them . Therefore , the 4,300,268 samples with n < 2 are divided into two folds at random such that the model will always see some of these special samples while training . 3.3 RESULTS . Let us examine if the LSTM network has learned something about quantum physics . A good model will identify positive setups correctly while discarding as many negative setups as possible . This behavior is reflected in the metrics true positive rate TPR = TP/ ( TP + FN ) and true negative rate TNR = TN/ ( TN + FP ) , with TP , TN , FP , FN the true positives , true negatives , false positives , false negatives , respectively . A metric that quantifies the success rate within the positive predictions is the hit rate ( i.e . precision or positive predicted value ) , defined as HR = TP/ ( TP + FP ) ( Simm et al. , 2018 ) . For each withheld CCV fold n , we characterize a setup to be “ interesting ” when it fulfills the following two criteria : ( i ) It is classified positive ( ŷE > τ ) with τ the classification threshold of the sigmoid output activation . ( ii ) The SRV prediction ŷSRV = ( n̂ , m̂ , k̂ ) > is such that there exists a ySRV = ( n , m , k ) > with ‖ySRV − ŷSRV‖2 < r. We call r the SRV radius . We denote samples which are classified as interesting ( uninteresting ) and indeed positive ( negative ) as true positives ( negatives ) . And we denote samples which are classified as interesting ( uninteresting ) and indeed negative ( positive ) as false positives ( false negatives ) . We employ stochastic gradient descent for training the LSTM network with momentum 0.5 and batch size 128 . We sample mini-batches in such a way that positive and negative samples appear equally often in training . For balanced SRV regression , the leading Schmidt rank vector number n is misused as class label . The models were trained using early stopping after 40000 weight update steps for the entanglement classification network and 14000 update steps for the SRV regression network . Hyperparameter search was performed in advance on a data set similar to the training set . Figure 4 shows the TNR , TPR , and rediscovery ratio for sigmoid threshold τ = 0.5 and SRV radius r = 3 . The rediscovery ratio is defined as the number of distinct SRVs , for which at least 20 % of the samples are rediscovered by our method , i.e . identified as interesting , divided by the number of distinct SRVs in the respective cluster . The TNR for fold 0,1 is 0.9996 , and the hit rate HR on the extrapolation set 9-12 is 0.659 . Error bars in Figure 4 and later in the text are 95 % binomial proportion confidence intervals . Model performance depends heavily on parameters τ and r. Figure 5 shows the “ beyond distribution ” results for a variety of sigmoid thresholds and SRV radii . Finally , we investigate the conventional in-distribution generalization error using the test set ( 20 % of the data ) . Entanglement classification : The entanglement training BCE loss value is 10.2 . TNR and TPR are 0.9271± 0.00024 and 0.9469± 0.00041 , respectively . The corresponding test error is 10.4 . TNR and TPR are 0.9261± 0.00038 and 0.9427± 0.00065 , respectively . SRV regression : The SRV training loss value according to Equation ( 2 ) is 2.247 , the accuracy with r = 3 is 93.82 % and the mean distance between label and prediction is 1.3943 . The SRV test error is 2.24 , the accuracy with r = 3 is 0.938 and the mean distance between label and prediction is 1.40 . These figures are consistent with a clean training procedure .

Summary: This paper looks at the problem of predicting 2 properties of quantum states produced by an optical table consisting of a sequence of physical elements that modify a quantum state in a particular way, given the sequence of optical elements applied. The authors train 2 separate recurrent networks (LSTMs). The first one takes a sequence of optical elements and predicts a binary boolean label that answers the question of whether the resulting quantum state would be maximally entangled. The second one takes a sequence of optical elements and predicts the Schmid rank vector of the resulting state -- a linear algebraic quantity that is used in quantum information science. The authors explore whether the trained networks generalize to longer sequences of optical elements than trained on, and conduct other checks on the result.