{'fraction_non_alphanumeric': 0.03019578313253012, 'fraction_numerical': 0.01039156626506024, 'mean_word_length': 4.4609375, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Ground state phase diagram of the one-dimensional Bose-Hubbard model from restricted Boltzmann machines

Motivated by recent advances in the representation of ground state wavefunctions of quantum many-body systems using restricted Boltzmann machines as variational ansatz, we utilize an open-source platform for constructing such ansatz called NetKet to explore the extent of applicability of restricted Boltzmann machines to bosonic lattice models. Within NetKet, we design and train these machines for the one-dimensional Bose-Hubbard model through a Monte Carlo sampling of the Fock space. We vary parameters such as the strength of the onsite repulsion, the chemical potential, the system size and the maximum site occupancy and use converged equations of state to identify phase boundaries between the Mott insulating and superfluid phases. We compare the average density and the energy to results from exact diagonalization and map out the ground state phase diagram, which agrees qualitatively with previous finding obtained through conventional means.


Introduction
In recent years, artificial neural networks have been employed to study the Bose-Hubbard model [1,2], which describes the many-body systems of interacting bosonic particles on lattices [3]. In Ref. [1], the author approaches the problem using feedforward artificial neural networks where the inputs are Fock states (see below) and the output layer, consisting of two nodes, provides the Re and Im parts of the log of the wavefunction. The networks are trained following conventional supervised learning algorithms for feedforward networks with the cost function taken to be the ground state energy. Ref. [2] expands on this idea and examines the role multiple hidden layers or convolutional layers play in the accuracy of the output and the efficiency of the algorithm.
Restricted Boltzmann machines (RBMs) on the other hand have emerged as useful tools among artificial neural networks for providing a superior ansatz for representing quantum wave functions [4,5,6,7,8], or mimicking thermodynamics of classical and quantum manybody systems [9,10,11]. For example, in Ref. [4], it was shown that RBMs lead to lower variational ground state energy for classical and quantum magnetic models than the state-ofthe-art ansatz. This in turn motivated several other studies in which the RBMs were used to represent topological [5,6] or chiral [8] states, draw equivalences between RBMs and tensor network states [7], and to accelerate Monte Carlo simulations [12], to name a few.
Here, we use RBMs to represent ground state wavefunctions of the one-dimensional Bose-Hubbard model and study the extent to which its equilibrium properties can be captured in this architecture for a range of model parameters. It has been shown that multi-valued RBMs, such as the one we have used here, can represent a wide class of many-body entangled states efficiently [13], and to the best of our knowledge, our results are the first to demonstrate that. We perform the training using Monte Carlo sampling with the same goal of minimizing the ground state energy as in Refs. [1,2]. We employ NetKet [14], an open-source platform for solving quantum many-body problems using artificial intelligence. We show that RBMs can be trained to represent the ground state of the bosonic system with a high degree of accuracy. We find that the energy and density both in the Mott insulating and superfluid phases rapidly converge to final values during the training. By calculating equations of state for different values of the interaction strength in the grand canonical ensemble, we map out the phase diagram of the model and show that it agrees well with one obtained in the past directly from quantum Monte Carlo simulations.

The Bose-Hubbard Model
The Bose-Hubbard Hamiltonian is expressed as where b † i and b j are the bosonic creation and annihilation operators, respectively, ij indicates that i and j are nearest neighbors, t is the corresponding hopping amplitude, which we set to unity to serve as the unit of energy throughout the paper, U is the strength of the onsite repulsion, n i = b † i b i is the site occupation operator, and µ is the chemical potential. In this study, we consider the periodic one-dimensional (1D) geometry.
For large enough interactions, the ground state of the system is the interaction-driven Mott insulating phase while it remains a superfluid for smaller interactions. This was shown in a seminal paper by Fisher et al. [3] where the universality class of the model was explored and a mean-field solution was presented. Later, the model received much attention in the 1990's, mostly confirming numerically the transition in different dimensions [15,16,17,18,19,20,21,22,23,24,25]. The Mott insulator (MI) to superfluid (SF) transition was also observed in experiments with cold atoms in optical lattices [26].

The Architecture
The RBM is a two-layer fully-connected artificial neural network. The architecture is shown in Fig. 1. It has one visible layer, and one hidden layer. Each layer consists of several nodes with an external bias parameter associated with them (b i for the visible and c i for the hidden layer). Each node in a layer is connected to all the nodes in the other layer and a weight parameter (W ij ) is associated to every connection.
The RBM lends itself well to representing ground state wavefunctions of the Bose-Hubbard model because a probability distribution of possible Fock states of the system can then be calculated directly from the RBM parameters after training. This is similar to representing thermodynamics of a many-body system using an RBM where a probability distribution of microstates can be extracted [10].  Figure 1.
Sample architecture of the RBM used in this study. We choose visible layers of different sizes for L = 4, 5, 6, and 7, which also represent the system sizes and twice as many nodes in the hidden layer as in the input layer. Both the input nodes and hidden nodes take binary values; σ i and h i , respectively. Every site occupation n j = {0, 1, ..., N max } is converted to N max + 1 binary digits, all 0's except the n j th digit, which is 1. Therefore, the number of input nodes is (N max + 1) × L. Each node has a bias value (shown as b i or c i ) and nodes are fully connected between the two layers with weights w ij associated with each connection. The weights and biases are determined through a stochastic optimization process that involves local Metropolis moves between Fock states where the expectation value of the Bose-Hubbard Hamiltonian is minimized.
Within NetKet, we define a wave function ansatz for the q = 0 momentum sector using a RBM with spin-1/2 hidden nodes and permutation symmetry. The input layer can be visualized as a two-dimensional L × (N max + 1) array of binary numbers, where each row represents a site, and a 1 in column number n indicates that there are n bosons at that site. This so-called "one-hot" encoding of site occupations is not unique. For example, an alternative would be to use L non-binary input nodes whose values can vary from 0 to N max instead. One advantage of the one-hot representation over the latter is that the number of network parameters is much larger and therefore, the training will presumably be more refined. We choose L and N max values as large as 7 and 5, respectively, and a hidden layer with twice as many nodes as in the visible layer.

The Training
We write the ground state wave function as a linear combination of the Fock state basis where |n = |n 1 , n 2 , . . . , n L are the particle number Fock states with site occupancies n i ∈ [0, N max ]. The goal is to create a RBM that can stochastically represent |ψ by producing the correct probability, |ψ n | 2 for every input Fock state |n through the input layer. For the Bose-Hubbard model, the coefficients ψ n are known to be real and positive and are written for the RBM as where σ i and h i denote the input node and hidden node binary values, respectively. The hidden degrees of freedom can be integrated out exactly for the simple architecture  Fig. 1, which results in [4,9] ψ n = e i b i σ i + j log 1+e c j + i W ij σ i .
The goal in the training of the RBM is to optimize its weights and biases in order to arrive at a probability distribution for ψ n so that |ψ represents the ground state. This is accomplished through the minimization of the expectation value of the Hamiltonian, NetKet adopts a Metropolis algorithm for importance sampling of |n 's during which E is minimized also using stochastic techniques. Since we are working in the grand canonical ensemble, we choose local moves in which a site is picked at random and its occupation is proposed to change to a value in the range [0, N max ]. The move is accepted with the probability min[1, |ψ n | 2 /|ψ n | 2 ], where n and n are the new and old states, respectively. This guarantees that after the training is completed, the probability distribution is P n = |ψ n | 2 / m |ψ m | 2 = |ψ n | 2 / ψ|ψ . The minimization of energy is done using the Stochastic Reconfiguration algorithm [27] with AdaMax optimizer in NetKet and the default parameters. Our sampler performs 1000 sweeps before sampling the probability distribution and updating the RBM parameters. More details about the method and the training parameters can be found in Ref. [14].

Results
In Figs. 2 and 3, we show the average energy, E, and the average density, ρ, as the training of our RBM progresses for two sets of values for the interaction strength and the chemical potential. The system with µ/U = 0.56 (blue lines) is a Mott insulator with a density of one particle per site and the system with µ/U = 1.00 (orange lines) is a superfluid for the system size we have considered (L = 6). Here, N max = 5 is much larger than the average density. We observe that the energies and densities quickly converge to their final values regardless of whether the system is in the MI or SF phase. However, we find that the average density has larger fluctuations over the training steps inside the SF phase while it is pinned to unity when the system is in the first Mott lobe.
For comparison, we also show in Figs. 2 and 3 results from exact diagonalization as horizontal dashed and dotted lines. We find that the error in both the energy and the density is larger in the superfluid phase. The fluctuations in the density seem to extend to very long training times  Figure 2. Training a RBM using stochastic reconfiguration aims to find the ground state of the system. This is done by minimizing the expectation value of the energy, which is plotted above as a function of training step. This convergence is an indication that the system has entered the ground state of the Hamiltonian. Here, L = 6 and N max = 5. and point to the limitations of the method and the fact that more complex networks or better optimization may be needed to capture the physics in the superfluid phase.
Taking long-time values of the converged density as we vary the chemical potential at a fixed interaction strength, we obtain the equation of state. Figure 4 shows this property for U/t = 15 and several different combinations of L and N max . We find the expected behavior [3,15] where the density is pinned at integer numbers of bosons per site as we cross multiple SF and MI phase boundaries. Two density plateaus corresponding to the first and second Mott lobes are clearly visible in this plot. Increasing the system size from 4 to 7 seems to lead to smoother curves, signaling better convergence during the training, but no appreciable change in the onsets of the Mott regions. Moreover, the results do not change significantly by increasing N max from 4 to 5. These observations do not mean that our results are not suffering from finite size effects. Much larger clusters have been shown to give different results in conventional treatments of the model [15,28].
By training different RBMs as we sweep the chemical potential at increasing values of the interaction strength, we are able to map out the ground state phase diagram of the model in the interaction-chemical potential space. The findings are summarized in Fig. 5. We extend the results up to the second Mott lobe. They qualitatively agree with those obtained using Monte Carlo algorithms and much larger system sizes (see e.g. Ref. [28]). As with other techniques, the accurate locating of the phase boundary near the tip of the Mott lobes are the most challenging due to the Kosterlitz-Thouless nature of the transition [29].

Summary
Using the open-source package NetKet, recently developed for the study of quantum many-body systems through machine learning algorithms, we design and train RBMs to represent the ground state wavefunction of the 1D Bose-Hubbard model on small chains. We demonstrate the degree of applicability of the RBM ansatz in various regions of the parameter space as MI or SF phases set in. We show that the optimization of free parameters of the RBMs during training in order to minimize the ground state energy leads to physical properties, including expectation values of the Hamiltonian and a phase diagram, that agree with known exact results from conventional treatments of the model.