Revealing quantum chaos with machine learning

Revealing quantum chaos with machine learning


Understanding properties of quantum matter is an outstanding challenge in science. In this paper, we demonstrate how machine-learning methods can be successfully applied for the classification of various regimes in single-particle and many-body systems. We realize neural network algorithms that perform a classification between regular and chaotic behavior in quantum billiard models with remarkably high accuracy. We use the variational autoencoder for autosupervised classification of regular/chaotic wave functions, as well as demonstrating that variational autoencoders could be used as a tool for detection of anomalous quantum states, such as quantum scars. By taking this method further, we show that machine learning techniques allow us to pin down the transition from integrability to many-body quantum chaos in Heisenberg XXZ spin chains. For both cases, we confirm the existence of universal W shapes that characterize the transition. Our results pave the way for exploring the power of machine learning tools for revealing exotic phenomena in quantum many-body systems.


I Introduction

The idea of combining machine learning methods LeCun2015 () with quantum physics has stimulated an intensive research activity Biamonte2017 (). The scope so far includes identification of quantum phases of matter and detecting phase transitions Wang2016 (); Broecker2016 (); Wetzel2017 (); Melko2017 (); Schindler2017 (); Chng2017 (); Nieuwenburg2017 (); Ringel2018 (); Beach2018 (); Greitemann2018 (); Knap2019 (), representation of states of quantum many-body systems Troyer2017 (); Glasser2018 (); Lu2018 (); Troyer2018 (), and machine-learning-based analysis of experimental data Troyer2018 (); Zhang2018 (); Sriarunothai2018 ().

Remarkable progress on building large-scale quantum simulators Monroe2013 (); Rey2017 (); Lukin2017 (); Monroe2018 () has opened fascinating prospects for studying traditionally challenging problems of complex quantum systems, such as investigation of quantum critical dynamics and quantum chaos Polkovnikov2016 (). Quantum systems with chaotic behaviour are of great interest particularly in the view of a possibility to explore many-body quantum scars Papic2018 (); Ho2019 (), which can be compatible with long-lived states. A standard criterion for the separation between regular and chaotic regimes uses the nearest-neighbor (NN) energy level statistics Berry1977 (); Bohigas1984 (): Poisson and Wigner-Dyson distributions correspond to integrable and chaotic systems, respectively. However, the energy level statistics of highly excited states is not always accessible in experiments with well-controlled quantum systems.

From the machine learning perspective, an interesting problem is to understand whether it is possible to distinguish between regular and chaotic behavior based on experimentally accessible quantities such as data from projective measurements. This question can be further extended to a possibility to detect anomalies in experimental data, such as quantum scars.

Figure 1: Neural network approach for identifying a transition between chaotic and regular states in quantum billiards and Heisenberg spin chains. The input data contains probability distribution in the configuration space, the two neuron activation functions are used for the identification of the two regimes.

In this paper, we realize machine learning algorithms to perform a classification between regular and chaotic states in single-particle and many-body systems. The input data contains probability density function representing configurations of excited states and the output is provided by two neurons, which distinguishes between integrable and chaotic classes, see Fig. 1. In the single-particle case, we consider paradigmatically important models of quantum billiards. We apply an extension of a semisupervised ‘learning by confusion’ scheme Nieuwenburg2017 () in order to detect the integrability/chaos transition and to evaluate a critical critical region. We also use a clusterization technique based on variatonal autoencoder (VAE) for machine learning of the transition to quantum chaos and for detection of quantum scars. The supervised approach is then extended in order to study the transition in Heisenberg XXZ spin-1/2 chain in the presence of additional interactions that break integrability. In our work, regular/chaos transitions are identified with the classification accuracy up to . We show that our results based on the machine learning approach are in a good agreement with the analysis of level spacing distributions.

The confusion scheme is based on the assumption that the critical point exists within a given parameter range , so that the data could be classified into two classes. Further, a trial critical point is proposed and all the data with parameters below is labelled as 0, and above as 1. Neural network is then trained on the entire dataset for all values of , chosen from the range with a predefined step. This method results in a universal W-like performance curve Nieuwenburg2017 (). The ‘learning by confusion’ scheme has been used for the study of many-body localization–delocalization transition Gornyi2018 (), 2D percolation and Ising models Zhao2019 (), critical behavior of the two-color Ashkin-Teller model, the XY model, and the eight-state clock model Lee2019 (), and exploring topological states Granath2019 ().

To address the problem of revealing the transition between regular and chaotic behaviour, we realized an extension of the ‘learning by confusion’ scheme. At the first stage, we train the network to distinguish states belonging to the extreme cases of regular () and chaotic () regimes, where is the chaoticity parameter. By analyzing neural network outputs, we determine the critical domain where the neural network predicts a transition between the two regimes. At the second stage, we perform the standard ‘learning by confusion’ protocol and we refer the middle peak on W-like performance curves of the neural network as the transition point Nieuwenburg2017 ().

Figure 2: Convolutional neural network outputs for (a) Sinai billiard, (b) Bunimovich stadium, and (c) Pascal’s limaçon as functions of the chaoticity parameter characterizing billiard’s boundary shape. The highlighted critical region corresponds to the regions of “uncertainty” in neuron network output activation curves.

The paper is organized as follows. In Section II we describe our machine learning approach for classifications of chaotic/integrable wavefunctions in quantum billiards. We describe our supervised learning methodology and present results of neural network-based classification of chaotic/integrable wavefunctions as a function of chaoticity parameter for three types of quantum billiards: Sinai, Bunimovich stadium and Pascal billiards. In Section III we apply autosupervised machine learning techinique using variational autoencoder (VAE) for clusterization analysis of quantum states in billiards. In addition we explore applications of VAE for anomaly detection of quantum scars and the potential of VAE for generative modeling of regular/chaotic wavefunctions in quantum billiards. In Section IV we apply supervised learning for detection of transition from integrability to quantum chaos in XXZ spin chains in the presence of integrability breaking interactions: next nearest neighbor spin-spin interaction and a local magnetic field. We draw conclusion in Section V. Technical details on machine learning approaches and datasets preparation are presented in Appendixes.

Ii Quantum billiards

Quantum billiards are among the simplest models exhibiting quantum chaos. The transition from regular to chaotic behaviour in quantum billiards, which is controlled by the shape of the billiard boundary, has been intensively studied for decades Jain2017 (). Quantum billiards have been realized in various experimental setups including microwave cavities Sridhar1991 (), ultracold atoms Raizen2001 (), and graphene quantum dots Geim2008 (). Quantum scars Heller1993 (), which are regions with enhanced amplitude of the wave function in the vicinity of unstable classical periodic trajectories, is the hallmark of quantum chaos. Quantum scars are of a great interest in quantum billiards Heller1993 (); Tao2008 () and their many-body analogs have recently been studied Papic2018 (); Ho2019 ().

We consider three standard types of two-dimensional quantum billiards: Sinai billiard, Bunimovich stadium, and Pascal’s limaçon (Robnik) billiard. We define a dimensionless parameter of chaoticity for each billiard type, where it determines the billiard shape. In Sinai billiard the chaoticity parameter is controlled by the ratio of the inner circle radius to the width/height of the external rectangle, so . In the case of Bunimovich stadium the parameter is and in the Pascal’s limaçon billiard shape is defined via the conformal map on the complex plane , where . At the limit of these billiards have regular shapes and therefore are integrable. Varying the parameter allows one to trace out a continuous transition from integrability to quantum chaos.

We use a supervised learning approach for revealing chaotic/regular transitions in quantum billiard models. We train a binary classifier based on convolutional neural network (CNN) using real space images of the probability density function (PDF) . The training dataset consist of randomly sampled snapshots of the PDF in fragments excluding the billiard’s boundary in the regions of interest. The wave functions are obtained from the numerical solution of the stationary Schrödinger equation for the corresponding billiard type (for details see Appendixes A, B). Since the information about the transition from the regular to chaotic regimes is mostly represented in the properties of highly excited states, we use wave functions with sufficiently large values of in our dataset.

The snapshots corresponding to we label as “regular” (class 1), and snapshots corresponding to we label as “chaotic” (class 2). The activation function of the two neurons in the last layer allows classifying between chaotic/regular snapshots in the test dataset with a high accuracy. CNN performance curves for each of the three billiard types for different values of show that the CNN algorithm is able to learn the difference between regular and chaotic wave functions and reveals the existence of the transition region (see Fig. 2). The CNN confidence for the binary classification for away from the critical region. The critical region determined by the CNN is highlighted in red in Fig. 2. In Sinai and Bunimovich billiards the critical region detected by the CNN algorithm is . The detected critical region for the Pascal billiard is . The boundaries of the critical regions provided by the CNN classifier are in a good agreement with the ones obtained from the analysis of the energy levels spacing statistics, see Appendix C.

The critical region can be analyzed in more details within the ‘learning by confusion’ scheme Nieuwenburg2017 () by performing a dynamical reassignment of the class labels with respect to a given value of . We note that a precise definition of the transition point is somewhat ambiguous and depends on selected criteria, because all observables have a smooth dependence on the parameter . Therefore, in our approach we only estimate the location of a characteristic critical point , separating regular and chaotic regimes. The estimated position of the critical point is in Sinai billiard and in Pascal limaçon billiard. The location of the critical point in Pascal’s billiard agrees with Ref. Prosen1993 (). We note that the analysis of the chaotic/regular transition for the Bunimovich stadium is challenging due to its extreme sensitivity to the variation of the chaoticity parameter (see Ref. Tao2008 ()).

One of the key features that allows us to perform machine learning of the regular-to-chaos transition is the difference in statistical properties of in theses two regimes. While in the chaotic case the wave functions have Gaussian statistics, in regular case the probability distribution is non-universal and has a power-law singularity at small values of  Beugeling2017 ().

The standard approach to identify a transition from an integrability to a quantum chaos is based on the comparison of the energy level spacing statistics with the Poisson distribution and the Wigner-Dyson distributions. In order to characterize a “degree of chaoticity” of the system one can use the average ratio of consecutive level spacings , where and  Atas2013 (). Here we introduce a different measure based on the Kullback-Leibler (KL) divergence, defined as follows:


where is the level spacing distribution for a given value of , and is the Wigner-Dyson or Poisson distribution: , . Here is the unfolded nearest neighbour energy level spacing.

In the critical region between regular and chaotic regimes the energy spacings distribution is neither the Poisson nor the Wigner-Dyson. There exists a point when is equidistant from both Poisson and Wigner-Dyson distributions within the KL metric, , which we refer as a “critical point”. The critical points predicted by the confusion scheme and KL divergence curves are in a good agreement. We note that the confusion scheme uses experimentally accessible quantities, whether energy levels statistics from experimental data is hardly accessible in condensed matter and atomic simulator experiments.

Figure 3: Autosupervised learning of regular and chaotic states in quantum billiards with variational autoencoder (VAE). Latent space representation of the wave functions in (a) Bunimovich stadium, (b) Sinai billiard; are coordinates in the two-dimensional latent space. (c) Anomaly detection: latent space representation of wave functions corresponding to regular (red dots, ) and chaotic (blue dots, ) wave functions as well as scarred chaotic wave functions (green dots) in Bunimovich billiard. (d) VAE as a generative model: images of wave functions generated by VAE corresponding to different position in the latent space variables (Pascal billiard). By continuously scanning across two-dimensional latent space VAE performs a smooth interpolation between wave functions from chaotic and regular wave functions.
Figure 4: Neural network classification accuracy between integrable and chaotic XXZ spin chains with the next-nearest neighbor interactions for spins (). (b) Distribution of energy level spacings and the Poisson/Wigner-Dyson distributions. Plots correspond to XXZ model . (c) ‘Learning by confusion’ W-like NN performance curve.

Iii VAE and anomaly detection in quantum billiards

An alternative approach to differentiate between regular and chaotic regimes is to use auto-supervised machine learning techniques, such as VAE. VAEs are generative NN models that are able to directly learn statistical distributions in raw data and can be efficiently used for solving clustering problems Kingma2014 (); Sohn2015 (). VAE consists of encoding NN, latent space and decoding NN, Fig. 3a. During the training VAE “learns” to reproduce initial data by optimizing the weight in the encoder and decoder NN and parameters in the latent layer. Training VAE on the images with corresponding regular () and chaotic () cases and by taking samples from the latent space with the dimension 2 results in two clearly separated clusters representing regular and chaotic wave functions. For details on VAE architecture and optimization see Appendix D.

In Figs. 3(a) and  3(b) we demonstrate latent space representation of wave functions in Bunimovich and Sinai billiards. The separation in the two clusters shows that VAE is able to learn the difference in the statistical properties of in regular and chaotic billiards. Similar approach was used for unsupervised learning of phase transitions Wetzel2017 ().

In addition to the autosupervised learning of regular/chaotic quantum states, VAE could be used as a tool for anomaly detection in quantum data, in particular identification of scarred wave functions. In this context we use the term ’anomalous’ to describe a subset of samples with statistical properties drastically different from the statistical properties of the entire dataset. Data-driven anomaly detection with VAEs arises in machine learning, data mining and cybersecurity applications Golan2018 (); An2015 (); Zhang2019 (). Applications of VAE-based anomaly detection methods were recently studied in the context of classical phase transitions Cristoforetti2017 () and detection of elementary particles cern2018 (). However, potential of anomaly detection methods in quantum systems has been mostly unexplored. Anomalous samples could be detected using latent space representation as a set a cloud of points falling outside of the ‘chaotic‘ cluster (for additional details see Appendix E). Using a pretrained VAE we generate a set of points in the latent space corresponding to the scarred chaotic wave functions, see Fig. 3c. The ‘anomalous‘ cluster representing scarred wave functions falls outside of the ‘chaotic’ cluster and has a large overlap with a ’regular’ cluster. This unusual behaviour indicates similarity between scarred wave functions and wave functions in integrable billiards. Interesting extension of this approach could be VAE-based anomaly detection method for identification of quantum many-body scars.

Another additional feature of VAE is the ability to smoothly interpolate between datasets corresponding to the two classes. In Fig. 3d we show wave functions generated by VAE in Pascal billiard via scanning across the two-dimensional latent space . This procedure allows to perform continuous interpolation between chaotic (center region) and regular wave functions (outer region). VAE-based generative modeling of quantum states could give rise to new approaches in simulations of quantum systems Rocchetto2018 () as well as for new applications in the context of quantum chaos. Exploring a full potential of unsupervised machine learning methods for clustering quantum states is beyond the scope of the present paper.

Iv Detection of quantum chaos in XXZ spin chains

While quantum billiards is an instructive example of a single particle quantum chaos, quantum chaotic regimes in many-body systems are more interesting. Developing machine learning approaches to characterize/classify many-body states in chaotic and integrable regimes using only limited information from measurements is a non-trivial task. For example, such techniques can benefit from the analysis of experimental data from quantum simulators Monroe2013 (); Rey2017 (); Lukin2017 (); Monroe2018 (). As a prototypical example of a quantum many-body integrable system we consider 1D Heisenberg XXZ spin chain, which is of great interest for realizing models of quantum magnetism using quantum simulators Bloch2017 (). Recent experimental advances have opened exciting prospects for exploiting a rich variety of tunable interactions in Rydberg atoms Browaeys2016 (); Lukin2016 (); Lukin2017 (); Browaeys2018 (); Browaeys2018-2 () and cold polar molecules Buchler2012 (); Ye2012 (); Rey2013 () for engineering of spin Hamiltonians including the XXZ model.

The Hamiltonian of the Heisenberg XXZ model reads:


where is the number of spins, and are the Heisenberg exchange constants and are Pauli spin-1/2 operators. For simplicity we only consider antiferromagnetic XXZ model, . Hereafter we set . The XXZ model is integrable and exactly solvable by Bethe ansatz Buchler2012 (), however it can be non-integrable in the presence of additional interactions.

Figure 5: (Left panel) NN classification accuracy for chaos-integrability transition in XXZ model in the presence of a local magnetic field (a magnetic impurity) for spins. (Right panel) Energy level spacing distributions for different values of .

Here we consider two types of perturbations that violate integrability of the XXZ model: (i) antiferromagnetic next-nearest neighbour spin-spin interaction (NNN), (ii) a local static magnetic field acting on a single spin (impurity). We parametrize perturbations to the Hamiltonians in the following form:


We consider spin chains with an odd number of spins , so that in the case (ii) the local magnetic field is acting on the spin in the middle of the chain, i.e. . The Hamiltonian of the perturbed XXZ model reads:


We train a multilayer perceptron (MLP) on the dataset containing the probabilities of the spin configurations in representation ( refers to basis states in -representation), e.g. . The eigenfunctions are obtained by exact diagonalization of spin-chain Hamiltonian (for details see Appendix F), here we consider system size . Similarly to the case of quantum billiards, we consider only highly excited states with corresponding to the levels lying in the middle of the energy spectrum, .

To pindown the chaos/integrability transition we use a MLP NN, see details in Appendix G. We evaluate NN classification prediction for the test dataset as a function of , see Fig. 5a, the critical region is highlighted with red. For XXZ + NNN (Fig. 4) and XXZ + impurity (Fig. 5) detected critical regions are and respectively, which turn out to be in agreement with level spacing distributions represented in Fig. 4b, see Appendix C and within the range of values obtained in previous works Poilblanc1993 (); Gubin2012 (); Wells2014 (). Within these critical regions ‘learning by confusion’ resulted in W-like performance curves, (see Fig. 4c and Appendix H), and detected transition points for XXZ + NNN and for XXZ + impurity. We note that we have a reasonable agreement with the results based on the KL divergence calculations.

V Conclusions

In summary, we have shown the potential of classical supervised and unsupervised machine learning techniques for classification of regular/chaotic regimes in single-particle and many-body systems. For quantum billiards and XXZ spin chains we demonstrated that neural networks can serve as a binary classifier to distinguish between the two regimes with remarkably high accuracy. We revealed the integrability-chaos critical region purely based on machine learning techniques and located the transition point using ‘learning by confusion’ approach. The extension of our work opens a new avenue to study chaotic and integrable regimes and detect quantum anomalies using experimentally accessible data in different many-body quantum systems including atomic simulators. Harnessing machine learning methods could open up exciting possibilities for studying exotic many-body phenomena with controlled quantum many-body systems, such as many-body localization Altshuler2006 (), many-body quantum scars Papic2018 (), and ergodic/non-ergodic phase transitions Shlyapnikov2018 () and near-critical properties of these systems.

Acknowledgments. We are grateful to M.B. Zvonarev and V.V. Vyborova for valuable suggestions. We thank G.V. Shlyapnikov, V.I. Yudson, and B.L. Altshuler for fruitful discussions and useful comments. The initial stage of the work was supported by RFBR (Grant No. 18-37-00096). The work on the extension of results on the anomaly detection and applications to many-body systems was supported by RSF (19-71-10092).

Appendix A Numerical solution of the Schrödinger equation for quantum billiards.

We solve a stationary Schrödinger equation describing a single particle in a quantum billiard with the Dirichlet boundary condition:


where is the wave function and is the energy of a particle in the billiard with the boundary ; is the two-dimensional Laplace operator. Hereafter we set the Plank’s constant and the mass to unity, . In order to solve Eq. (5) for an arbitrary 2D billiard boundary shape we use Matlab PDE toolbox. The PDE solver is based on the finite element method with an adaptive triangular mesh for a given boundary geometry. In order to reduce computational complexity and to avoid additional complications due to degeneracies of eigenstates, we constrain the eigenfunctions to a specific symmetry (parity) sector. We remove degeneracies by considering the lowest symmetry segments of billiards. In the case of the Bunimovich stadium we consider a quarter of the billiard [see inset of Fig. 1(b) in the main text]. For the Sinai billiard we consider a boundary with the incommensurate ratio of vertical and horizontal dimensions of the external rectangle, (we denote in the main text). In the case of the Pascal limaçon billiard, the degeneracy is lifted when considering only the upper part of the billiard .

Appendix B Dataset preparation and CNN for quantum billiards

Wave functions obtained from numerical solution of the Schrödinger equation are converted into images of PDFs . From original images with pixels we randomly select square fragments (region of interest) which exclude the billiard boundary, pixels. In order to reduce the size of the images we perform a coarse graining (downsampling) to images with dimensions . The dataset for each billiard type contains wave functions corresponding to high energy states, . In order to increase amount of images in the dataset we perform an augmentation of the dataset by adding horizontal and vertical reflections, discrete rotations by angles and rotations by random angles from the uniform distribution . The total number of images in the resulting dataset for each billiard type and each value of is . The trial samples from the dataset for the Bunimovich billiard are shown in Fig. 6.

Figure 6: Sample images of in the dataset for Bunimovich billiard. Regular case () and chaotic case ().
Figure 7: CNN used for recognizing chaotic regimes in quantum billiards.

The training dataset consists of labeled images from the class 1 (regular, ) and class 2 (chaotic, ). The value of we independently choose for each billiard type: Sinai - , Bunimovich - , Pascal - . In order to check that at the system is in the chaotic regime we compare the energy level spacing distribution with the Wigner-Dyson distribution. As long as the value of is much greater than the critical , , the NN activations curves remain practically unchanged (see Fig. 1 in the main text).

The training and test dataset are split in the proportion . The test set for each billiard type consists of images for several values of (including values of not present in the training dataset), evaluation of the NN output for the sample images from the test dataset for each value of results in the NN prediction curves presented in Fig. 1 in the main text.

A CNN consists of two convolutional layers followed by pooling, fully connected and final softmax layers. The output from the second convolutional layer is subject to dropout regularization and batch normalization. The cost function for the binary classifier is the cross-entropy and the neuron activation function is ReLU. The scheme of the CNN architecture is presented in Fig. 7. The weights in the CNN are optimized with the use of the Adam optimizer. The batch size is 60, the number of training epochs is of about , the learning rate is .

Appendix C Energy level spacing statistics in quantum billiards

We validate results of NN classification prediction in quantum billiards (Pascal limaçon, Sinai and Bunimovich billiards) by comparing NN predictions with the energy level spacing distributions, see Fig. 8. In the regular case the energy level spacing distribution is close to the Poisson distribution (black dashed line), in the chaotic case is approaching Wigner-Dyson distribution (red dashed dotted line).

Figure 8: Left column: The CNN activation functions (Fig. 1 from the main text). The histograms show the energy level spacing distributions (lowest 500 energy levels). In order to compare NN prediction for the regular-to-chaos critical region we compare the energy level spacing distribution with the standard Poisson/GOE distributions.

Appendix D Unsupervised learning with VAE

Figure 9: Architecture of variational autoencoder (VAE) for unsupervised learning of regular-chaos transition in quantum billiards.

We perform unsupervised (autosupervised) learning of two classes (“regular” and “chaotic”) using a variational autoencoder (VAE). The unlabeled dataset was prepared in a similar way as for the supervised learning. Dataset consist of randomly sampled images of with the dimensions , number of samples in the training dataset for each billiard type is , number of testing samples is for each billiard type. VAE was trained and tested for the states with in Bunimovich and Sinai’s billiards, corresponds to the “regular” class, corresponds to the “chaotic” class. VAE consists of the encoder , decoder , Gaussian sampler and the latent space of dimension 2 (latent space parameters and ) representing the two classes, “regular” and “chaotic”, the architecture of VAE is shown in Fig. 9. Here is the vectorized representation of the input data (image), () are NN parameters of the encoder (decoder). The sampler generates random latent space variables with the mean and the dispersion . Decoder performs reconstruction from the latent space representation to the original data format, the ‘image’ with dimensions equal to the input dimension (). Final layer of the decoder has sigmoid activation function in order to match the input data range (we normalize the input data so that . Encoder and decoder are represented by a fully connected NN with two hidden layers and neurons in each layer. The structure of the decoder network replicates the structure of the encoder (number of layers, number of neurons, activation function) and the decoder is a ‘mirrored’ replica of the encoder. The encoder network is given by two fully connected layers with ReLU activation function between the layers.

The objective function is a sum of reconstruction loss (binary cross entropy) and KL divergence loss: Kingma2014 ()


where is the loss function, is the data sample (discretized wave function image ), is the output of the decoder network. Expectation value is evaluated by averaging over batch of sampled from the latent space. Objective function (6) is also known as the variational lower bound or Evidence Lower Bound (ELBO). This is the bound on the log-probability to observe a data point , therefore by maximizing the lower bound (6) we maximize the log-likelihood probability of observation . We implemented VAE within PyTorch framework. VAE was trained over 50 epochs using Adam optimizer Kingma2014a (), learning rate is , batch size is samples.

Appendix E Anomaly detection with VAE and quantum scars

Among the wave functions of Sinai and Bunimovich billiards we selected states with scarred wave functions. The total number of scarred wave functions constituted only a small fraction of the entire dataset (). Some typical examples of scarred wave functions in Bunimovich and Sinai billiards are shown in the left panel of Fig. 10. We train VAE on the entire dataset containing chaotic and regular wave functions. At test time we feed real space images of wave function snapshots to VAE and analyse the latent space representaion of the input samples . The portion of “scarred” samples in the test dataset is , such ratio was chosen to make ‘scarred’ clusters in the latent space well visible.

Figure 10: Left panel: Examples of scarred wave functions in Bunimovich and Sinai billiards used for quantum anomaly detection. Right panel: Latent space distribution of VAE for ’regular’ () and ’chaotic’ () wave functons wave functions in Sinai billiard. Green dots correspond to scared wave functions.

Scarred chaotic wave functions form a cluster in the “wrong” region that strongly overlaps with the “regular” cluster, see Fig. 10, right panel and Fig 2(c) in the main text. This is a signature of anomalous properties of scarred wave functions that we use as a case for demonstration of the anomaly detection approach. In Fig. 10 (right panel) we show how ‘regular’ () , ‘chaotic’ () and ‘scarred’ wave functions () of Sinai billiard are represented in the VAE’s latent space. Another popular VAE-based approach for anomaly detection relies on the increase of VAE reconstruction loss (or reconstruction probability) of anomalous data Zhang2019 (). This approach does not pertain to our case, because the reconstruction loss for scarred wave functions is approximately equal to the reconstruction loss for ‘regular’ wave functions.

In addition to anomaly detection, we use VAE latent space representation to explore possibility of smooth interpolation between wave functions corresponding to regular and chaotic billiards. By scanning across coordinates in the latent space and decoding the latent representation with the decoder neural network into vectorized form corresponding to the original data dimensions, we obtained ‘images’ of wave functions (Fig. 2d, main text) interpolating between chaotic (center region) and regular wave functions (outer region).

Appendix F Dataset preparation for Heisenberg XXZ chains (exact diagonalization)

We find eigenstates of Heisenberg XXZ model for an arbitrary value of perturbation parameter by the exact diagonalization method based on the Lancsoz algorithm Sandvik2011 (). We used Python implementation of the QuSpin software package Weinberg2017 (). In order to avoid extensive computational costs, the size of Hamiltonian matrix was reduced by considering only the eigenstates in certain parity and magnetization sectors of the XXZ Heisenberg model. Specifically, we find eigenstates in the even parity sector and the lowest magnetization sector. The lowest magnetization sector corresponds to the states with (for odd spin chains), where and the number of up and down spins, respectively.

Dataset for Heisenberg XXZ chains consists of vectors of probability densities (PDs) corresponding to integrable and chaotic Hamiltonians. We take the wave function corresponding to a quantum state with the energy lying in the center of the spectrum. In order to prepare a diverse dataset for a given value of we randomly select from the uniform distribution . Since the XXZ model is integrable for any value of we build a dataset corresponding to a set of different Hamiltonians by varying . In the training set we include PDs for regular systems () and chaotic systems () and label the samples, accordingly. The test set contains PDs corresponding to a discrete set of lying in the interval . The training set contains 400 samples, testing set consists of 100 samples.

Appendix G Multi-layer perceptron

Figure 11: Multilayer perceptron used for investigation integrable/chaotic transitions in Heisenberg XXZ chains.
Figure 12: Universal W-like NN performance curves in the ‘learning by confusion’ scheme for the Sinai billiard (a); the Pascal’s limaçon (b); XXZ + NNN (c) and XXZ + Impurity (d). The predicted transition point is highlighted. The estimated position of the transition point predicted from the KL divergence calculation is shown with a red dot.

We use a standard MLP neural network that consists of an input layer with the size , which is equal to the size of vector with PDs in the specified symmetry (parity and total magnetization) sector of the eigenstates; one hidden layer with neurons, and an output softmax layer. Neurons of the hidden layer receive input and a weight () and compute output , where . An output of a neuron is computed with a sigmoid activation function . Further, each output with a corresponding weight () is passed to two neurons of an output softmax layer, which finally results in a two-component vector that obeys the constraint . The softmax layer for binary classification task is defined as . The scalar values () are interpreted as a probability that the input wave function belongs to the regular (chaotic) class. The objective function is the binary cross-entropy. Neural network’s weights are optimized using Adam optimizer Kingma2014a () with the learning rate , batch size of samples, training epochs. The scheme of the neural network architecture is presented in Fig. 11.

We used densely connected MLP instead of CNN architecture due to the following reason: CNN is designed to grasp spatial structure of the input data, whereas MLPs are used for more general tasks. CNN architecture is very natural for image recognition tasks (in our case - classifying wave functions in quantum billiards), but generically is not natural representation for the case of the spin chains, where the input data corresponds to the components of the many-body wave function.

Appendix H Detection of critical points with a confusion scheme with confusion method (W-shape curves)

W-like neural network performance curves versus chaoticity parameter found by “learning by confusion” approach for quantum billiards and XXZ spin chains are shown in Fig. 12. The central peak of the W-like curve corresponds to the transition point predicted by the neural network.


  1. preprint: APS/123-QED


  1. Y. LeCun, Y. Bengio, and G. Hinton, Deep learning, Nature (London) 521, 436 (2015).
  2. J. Biamonte, P. Wittek, N. Pancotti, P. Rebentrost, N. Wiebe, and S. Lloyd, Quantum machine learning, Nature (London) 549, 195 (2017).
  3. L. Wang, Discovering phase transitions with unsupervised learning, Phys. Rev. B 94, 195105 (2016).
  4. S. J. Wetzel, Unsupervised learning of phase transitions: From principal component analysis to variational autoencoders, Phys. Rev. E 96, 022140 (2017).
  5. J. Carrasquilla and R.G. Melko, Machine learning phases of matter, Nat. Phys. 13, 431 (2017).
  6. P. Broecker, J. Carrasquilla, R.G. Melko, and S. Trebst, Machine learning quantum phases of matter beyond the fermion sign problem, Sci. Rep. 7, 8823 (2017).
  7. F. Schindler, N. Regnault, and T. Neupert, Probing many-body localization with neural networks, Phys. Rev. B 95, 245134 (2017).
  8. K. Ch’ng, J. Carrasquilla, R. G. Melko, and E. Khatami, Machine learning phases of strongly correlated fermions, Phys. Rev. X 7, 031038 (2017).
  9. E.P.L. van Nieuwenburg, Y.-H. Liu, and S.D. Huber, Learning phase transitions by confusion, Nat. Phys. 13, 435 (2017).
  10. M. Koch-Janusz and Z. Ringel, Mutual information, neural networks and the renormalization group, Nat. Phys. 14, 578 (2018).
  11. M.J.S. Beach, A. Golubeva, and R.G. Melko, Machine learning vortices at the Kosterlitz-Thouless transition, Phys. Rev. B 97, 045207 (2018).
  12. J. Greitemann, K. Liu, and L. Pollet, Probing hidden spin order with interpretable machine learning, Phys. Rev. B 99, 060404 (2019).
  13. A. Bohrdt, C.S. Chiu, G. Ji, M. Xu, D. Greif, M. Greiner, E. Demler, F. Grusdt, and M. Knap, Classifying snapshots of the doped Hubbard model with machine learning, Nat. Phys. 15, 921 (2019).
  14. B.S. Rem, N. Käming, M. Tarnowski, L. Asteria, N. Fläschner, C. Becker, K. Sengstock, and C. Weitenberg, Identifying quantum phase transitions using artificial neural networks on experimental data, Nat. Phys. 15, 917 (2019).
  15. K. Liu, J. Greitemann, and L. Pollet, Learning multiple order parameters with interpretable machines, Phys. Rev. B 99, 104410 (2019).
  16. X.-Y. Dong, F. Pollmann, and X.-F. Zhang, Machine learning of quantum phase transitions, Phys. Rev. B 99, 121104 (2019).
  17. G. Carleo and M. Troyer, Solving the quantum many-body problem with artificial neural networks, Science 355, 602 (2017).
  18. I. Glasser, N. Pancotti, M. August, I.D. Rodriguez, and J.I. Cirac, Neural-network quantum states, string-bond states, and chiral topological states, Phys. Rev. X 8, 011006 (2018).
  19. S. Lu, X. Gao, and L.-M. Duan, Efficient representation of topologically ordered states with restricted Boltzmann machines, Phys. Rev. B 99, 155136 (2019).
  20. G. Torlai, G. Mazzola, J. Carrasquilla, M. Troyer, R. Melko, and G. Carleo, Neural-network quantum state tomography, Nat. Phys. 14, 447 (2017).
  21. T. Sriarunothai, S. Wölk, G.S. Giri, N. Friis, V. Dunjko, H.J. Briegel, and C. Wunderlich, Speeding-up the decision making of a learning agent using an ion trap quantum processor, Quantum Sci. Technol. 4, 015014 (2019).
  22. Y. Zhang, A. Mesaros, K. Fujita, S. D. Edkins, M. H. Hamidian, K. Chng, H. Eisaki, S. Uchida, J.C. Séamus Davis, E. Khatami, and E.-A. Kim, Machine learning in electronic-quantum-matter imaging experiments, Nature (London) 570, 484 (2019).
  23. R. Islam, C. Senko, W.C. Campbell, S. Korenblit, J. Smith, A. Lee, E.E. Edwards, C.-C. J. Wang, J.K. Freericks, and C. Monroe, Emergence and frustration of magnetism with variable-range interactions in a quantum simulator, Science 340, 583 (2013).
  24. M. Gärttner, J.G. Bohnet, A. Safavi-Naini, M.L. Wall, J.J. Bollinger, and A.M. Rey, Measuring out-of-time-order correlations and multiple quantum spectra in a trapped-ion quantum magnet, Nat. Phys. 13, 781 (2017).
  25. H. Bernien, S. Schwartz, A. Keesling, H. Levine, A. Omran, H. Pichler, S. Choi, A.S. Zibrov, M. Endres, M. Greiner, V. Vuletić, and M.D. Lukin, Probing many-body dynamics on a 51-atom quantum simulator, Nature (London) 551, 579 (2017).
  26. J. Zhang, G. Pagano, P. W. Hess, A. Kyprianidis, P. Becker, H. Kaplan, A.V. Gorshkov, Z.-X. Gong, and C. Monroe, Observation of a many-body dynamical phase transition with a 53-qubit quantum simulator, Nature (London) 551, 601 (2017).
  27. L. D’Alessio, Y. Kafri, A. Polkovnikov, and M. Rigol, From quantum chaos and eigenstate thermalization to statistical mechanics and thermodynamics, Adv. Phys. 65, 239 (2016).
  28. C.J. Turner, A.A. Michailidis, D.A. Abanin, M. Serbyn, and Z. Papic, Weak ergodicity breaking from quantum many-body scars, Nat. Phys. 14, 745 (2018).
  29. W.W. Ho, S. Choi, H. Pichler, and M.D. Lukin, Periodic orbits, entanglement, and quantum many-body scars in constrained models: Matrix product state approach, Phys. Rev. Lett. 122, 040603 (2019).
  30. M.V. Berry and M. Tabor, Level clustering in the regular spectrum, P. Roy. Soc. Lond. A Mat. 356, 375 (1977)
  31. O Bohigas, M. J. Giannoni, and C. Schmit, Characterization of chaotic quantum spectra and universality of level fluctuation laws, Phys. Rev. Lett. 52, 1 (1984).
  32. E.V.H. Doggen, F. Schindler, K.S. Tikhonov, A.D. Mirlin, T. Neupert, D.G. Polyakov, and I.V. Gornyi, Many-body localization and delocalization in large quantum chains, Phys. Rev. B 98, 174202 (2018).
  33. R. Xu, W. Fu, H. Zhao, A new strategy in applying the learning machine to study phase transitions, Preprint at
  34. O. Balabanov and M. Granath, Unsupervised detection of topological quantum state equivalences, Preprint at
  35. S.S. Lee and B.J. Kim, Confusion scheme in machine learning detects double phase transitions and quasi-long-range order, Phys. Rev. E 99, 043308 (2018).
  36. S.R. Jain and R. Samajdar, Nodal portraits of quantum billiards: Domains, lines, and statistics, Rev. Mod. Phys. 89, 045005 (2017).
  37. S. Sridhar, Experimental observation of scarred eigenfunctions of chaotic microwave cavities, Phys. Rev. Lett. 67, 785 (1991).
  38. V. Milner, J.L. Hanssen, W.C. Campbell, and M.G. Raizen, Optical billiards for atoms, Phys. Rev. Lett. 86, 1514 (2001).
  39. L.A. Ponomarenko, F. Schedin, M.I. Katsnelson, R. Yang, E.H. Hill, K.S. Novoselov, and A.K. Geim, Chaotic Dirac billiard in graphene quantum dots, Science 320, 356 (2008).
  40. E.J. Heller, Bound-state eigenfunctions of classically chaotic Hamiltonian systems: Scars of periodic orbits, Phys. Rev. Lett. 53, 1515 (1984).
  41. T. Tao, Structure and Randomness: pages from year one of a mathematical blog (American Mathematical Society, Los Angeles, 2008).
  42. W. Beugeling, A. Bäcker, R. Moessner, and M. Haque, Statistical properties of eigenstate amplitudes in complex quantum systems, Phys. Rev. B 98, 155102 (2018).
  43. Y.Y. Atas, E. Bogomolny, O. Giraud, and G. Roux, Distribution of the ratio of consecutive level spacings in random matrix ensembles, Phys. Rev. Lett. 110, 084101 (2013).
  44. T. Prosen and M. Robnik, Energy level statistics in the transition region between integrability and chaos, J. Phys. A Math. Gen. 26 2371 (1993).
  45. D.P. Kingma and M. Welling, Auto-encoding variational Bayes, ICLR (2014).
  46. K. Sohn, H. Lee, and X. Yan. Advances in Neural Information Processing Systems (NIPS, 2015).
  47. C. Gross and I. Bloch, Quantum simulations with ultracold atoms in optical lattices, Science 357, 995 (2017).
  48. D. Barredo, S. de Leseleuc, V. Lienhard, T. Lahaye, and A. Browaeys, An atom-by-atom assembler of defect-free arbitrary two-dimensional atomic arrays, Science 354, 1021 (2016).
  49. M. Endres, H. Bernien, A. Keesling, H. Levine, E.R. Anschuetz, A. Krajenbrink, C. Senko, V. Vuletić, M. Greiner, and M.D. Lukin, Atom-by-atom assembly of defect-free one-dimensional cold atom arrays, Science 354, 1024 (2016).
  50. D. Barredo, V. Lienhard, S. de Léséleuc, T. Lahaye, and A. Browaeys, Synthetic three-dimensional atomic structures assembled atom by atom, Nature (London) 561, 79 (2018).
  51. S. de Léséleuc, S. Weber, V. Lienhard, D. Barredo, H.P. Büchler, T. Lahaye, and A. Browaeys, Accurate mapping of multilevel Rydberg atoms on interacting spin-1/2 particles for the quantum simulation of Ising model, Phys. Rev. Lett. 120, 113602 (2018).
  52. D. Peter, S. Ml̈ler, S. Wessel, and H. P. Büchler, Anomalous behavior of spin systems with dipolar interactions, Phys. Rev. Lett. 109, 025303 (2012).
  53. A. Chotia, B. Neyenhuis, S.A. Moses, B. Yan, J.P. Covey, M. Foss-Feig, A.M. Rey, D.S. Jin, and J. Ye, Long-lived dipolar molecules and Feshbach molecules in a 3D optical lattice, Phys. Rev. Lett. 108, 080405 (2012).
  54. K.R.A. Hazzard, S.R. Manmana, M. Foss-Feig, and A.M. Rey, Far-from-equilibrium quantum magnetism with ultracold polar molecules, Phys. Rev. Lett. 110, 075301 (2013).
  55. D.M. Basko, I.L. Aleiner, and B.L. Altshuler, Metal–insulator transition in a weakly interacting many-electron system with localized single-particle states, Ann. Phys. (Amsterdam) 321, 1126 (2006).
  56. X. Deng, V.E. Kravtsov, G.V. Shlyapnikov, and L. Santos, Duality in power-law localization in disordered one-dimensional systems, Phys. Rev. Lett. 120, 110602 (2018).
  57. V. Chandola, A. Banerjee, and V. Kumar, Anomaly detection: A survey, ACM Computing Surveys (CSUR), 41:3 15, (2009)
  58. I. Golan, R. El-Yaniv, Deep Anomaly Detection Using Geometric Transformations, Advances in Neural Information Processing Systems 31, 9781 (NIPS 2018)
  59. J. An and S. Cho, Variational autoencoder based anomaly detection using reconstruction probability, SNU Data Mining Center, Tech. Rep. (2015).
  60. C. Zhang and Y. Chen, Time series anomaly detection with variational autoencoders, Preprint at arXiv:1907.01702 (2019).
  61. M. Cristoforetti, G. Jurman, A.I. Nardelli, and C. Furlanello, Towards meaningful physics from generative models, Preprint at arXiv:1705.09524 (2019).
  62. A. Alan Pol, G. Cerminara, C. Germain, M. Pierini, and A. Seth, Detector monitoring with artificial neural networks at the CMS experiment at the CERN Large Hadron Collider, Preprint at arXiv:1808.00911 (2018).
  63. A. Rocchetto, E. Grant, S. Strelchuk, G. Carleo, and S. Severini, Learning hard quantum distributions with variational autoencoders, npj Quantum Inf. 4, 28 (2018).
  64. D. Poilblanc, T. Ziman, J. Bellissard, F. Mila, and G. Montambaux, Poisson vs. GOE statistics in integrable and non-integrable quantum Hamiltonians, Europhys. Lett. 22, 537 (1993).
  65. A. Gubin and L. F. Santos, Quantum chaos: An introduction via chains of interacting spins 1/2, Am. J. Phys. 80, 246 (2012).
  66. H.J. Wells, Quantum spin chains and random matrix theory, Preprint at
  67. D.P. Kingma and M. Welling, Auto-encoding variational Bayes, ICLR (2014).
  68. D.P. Kingma, and J. Ba, A method for stochastic optimization, Preprint at arXiv:1412.6980 (2014).
  69. C. Zhang and Y. Chen, Time series anomaly detection with variational eutoencoders, Preprint at arXiv:1907.01702 (2019).
  70. A.W. Sandvik, Preprint at
  71. P. Weinberg and M. Bukov, QuSpin: a Python package for dynamics and exact diagonalisation of quantum many body systems part I: spin chains, SciPost Phys. 2, 003 (2017).
Comments 0
Request Comment
You are adding the first comment!
How to quickly get a good reply:
  • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made.
  • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements.
  • Your comment should inspire ideas to flow and help the author improves the paper.

The better we are at sharing our knowledge with each other, the faster we move forward.
The feedback must be of minimum 40 characters and the title a minimum of 5 characters
Add comment
Loading ...
This is a comment super asjknd jkasnjk adsnkj
The feedback must be of minumum 40 characters
The feedback must be of minumum 40 characters

You are asking your first question!
How to quickly get a good answer:
  • Keep your question short and to the point
  • Check for grammar or spelling errors.
  • Phrase it like a question
Test description