The quantum restricted Boltzmann machine is universal for quantum computation

The challenge posed by the many body problem in quantum physics originates from the difficulty of describing the nontrivial correlations encoded in the exponential complexity of the many body wave function. Simulating the large-scale wave function with highly entanglement is always accompanied by the computationally intractable even using the most powerful classical computers. In this thesis, we demonstrate that the 2-Local Quantum Restricted Boltzmann Machine (2LQRBM) can efficiently represent the many-body wave function on the noisy intermediate scale quantum (NISQ) devices, and we also propose a proof that 2LQRBM is universal for quantum computation task.To the best of our knowledge, prior works related to the QRBM do not propose the explicit bound that single layer QRBM can depict. Utilizing this novel scheme, we successfully compute the wavefunctions for the notable cases of physical interest, such as the ground state as well as the Gibbs state (thermal state) of a molecule on the superconductor quantum chip with an affordable error. Experimental results confirm our method.


I. INTRODUCTION
The wave function Ψ is a fundamental object in quantum physics and possibly the hardest to grasp in the classical world. Actually, wave function Ψ encodes all of the information of a complex molecule on a quantum state which needs an exponential scale space to characterize. By sampling a finite number of physically relevant configurations or performing a suitable compression of a quantum state, some classical stochastic algorithms, such as Monte Carlo methods [1][2][3] can simulate the small scale of wave functions with limited amount of quantum entanglement. These classical algorithms often shrivel at the high-dimensional systems because the full many-body wave function still takes the exponential complexity.
Following Feynman's idea for quantum simulation, some quantum algorithms for solving many-body problems of interacting fermions has been proposed [5,6]. These approaches depend on a 'good' initial state that has a large overlap with the target state, and these are followed by the phase estimation algorithm. Noting that these algorithms can produce the extremely accurate energy for quantum chemistry, but it applies stringent requirements on the coherence of the quantum hardware devices.
To reduce the coherence requirements on the quantum devices, classical-quantum hybrid algorithms were delivered. This kind of algorithm involves minimizing a cost function that depends on the parameters of a quantum gate sequence. Cost evaluation occurs on the quantum computer, with speed-up over classical evaluation, * yusenwu1994@gmail.com † gaofei bupt@hotmail.com and the classical computer utilizes this cost information to adjust the parameters of the ansatz with the help of suitable classical optimization algorithms. As one of the most representative classical-quantum hybrid algorithms, the variational quantum eigensolver (VQE) utilizes Ritz's variational principle to prepare approximations to the ground state and its energy [7]. However, the VQE algorithm is limited by the number of parameters that scales quartically with the number of spin orbitals that are considered in the single-and double-excitation approximation. To improve the VQE algorithm, the hardwareefficient trial states were introduced which is composed by the single-qubit Euler rotation part and the entanglement part [8]. Although the hardware-efficient ansatz can be easily implemented on the noisy intermediatescale quantum (NISQ) devices, this construction can not convergence to an optimal destination in some cases. The neural networks are a powerful tool to interpret complex correlations in multiple-variable function or probability distributions. Numerical evidence also suggests that the Restricted Boltzmann Machine (RBM) provides a good solution to several many-body system, such as transverse-field Ising model and the antiferromagnetic Heisenberg model [9]. Limited by its representation power, there are still exist some quantum states, such as the projected entangled pair states and quantum enhanced feature states, that cannot be efficiently represented by the single layer RBM model [10,11]. Since the quantum machine learning algorithms [18][19][20][21][22][23] illustrate their quantum advantages, some quantum analogue of RBM model [14][15][16] are proposed to approximate the wave function of the quantum system, but there is no evidence that proposed models can implement the universal quantum computation task.
In this paper, we introduce the 2-local quantum restricted Boltzmann machine (2-LQRBM). Compared with the previous related works, our work has two salient features: (1) We proof that the 2-LQRBM model can implement the universal quantum computation task, in other words, the 2-LQRBM is equivalent to the quantum circuit model. To the best of our knowledge, prior works related to the QRBM do not propose the explicit bound that single-layer QRBM can depict. (2) Different from the existing works of quantum Boltzmann machine ansatz, the 2-LQRBM model can transform to the quantum circuit and then it can be efficiently implemented on the NISQ devices. Since the classical single-layer RBM cannot simulate an arbitrary quantum state, then the 2-LQRBM model illustrates the quantum advantages in terms of representative power. Finally, we validate the accuracy of the proposed quantum algorithm by studying the Hydrogen molecule as well as the Haldane chain with 4 qubits on the superconductor devices. The power of the 2-LQRBM model is demonstrated, obtaining state-of-art accuracy in computing ground states and Gibbs states.

II. REVIEW OF THE RETRICTED BOLTZMANN MACHINE
The Restricted Boltzmann Machine (RBM) is a classic machine learning technique, and servers as the basis of complex deep learning models such as deep belief networks and deep Boltzmann machines. It comprises a probabilistic network of binary units with a quadratic energy function. The RBM model commonly consists of visible and hidden binary units, which we jointly denote by z = {z a } N +M a=1 , where N is the number of visible units and M is the number of hidden units. To maintain consistency with the standard notation in quantum mechanics, the units z a takes value from z a ∈ {−1, +1}, and the corresponding energy function are identical up to a linear combination of their parameters. The binary units are divided into two parts, namely visible units and hidden units, which can be denoted as z = (v, h) to represent states of visible and hidden units respectively. In the physics language, the energy function of Boltzmann machine over binary units z are referred to as Ising model with the energy function: where θ = {b i , m j , W ij } are defined as Boltzmann parameters that can be tuned in the training procedure. The marginal probability of observing a visible state v is given by where the parameter Z = z e −Ez is the partition function.

III. 2-LOCAL QUANTUM RESTRICTED BOLTZMANN MACHINE (2-LQRBM)
We now substitute the classical spins or bits with quantum bits (qubits). The mathematics of quantum mechanics is based on operators with dimensionality equal to the number of possible states by using N qubits. For instance, instead of the energy function (1), we considers a 2 N × 2 N bipartite Hamiltonian H BM (θ) to represent the 2-Local quantum restricted Boltzmann machine (2-LQRBM): where v q i denote the Pauli operator σ q i , q ∈ {x, y, z} on visible nodes and h z j denotes the Pauli operator σ z i on each hidden node. The notation Σ x,y,z means the summation for terms σ x s σ x k , σ y s σ y k and σ z s σ z k . And the Boltz- Then the 2-LQRBM can be created with a two-step approach. First, entangle N + M qubits (including all visible and hidden spins of an RBM architecture) according to where the notation |+ = 1/ √ 2(|0 + |1 ). It is interesting to note that e H BM (θ) is a non-unitary operator that is difficult to implement on the quantum computer in general. We will propose the elaborate method to transform e H BM (θ) into a series of fundamental quantum gates so that one can implement it efficiently on the NISQ devices.
Second, once the wave function |Ψ vh (θ) is generated, all the hidden spins are post-selected for |+ h and the desired trail state can be expressed as in which P (h) + = |+ +| h is the measurement operator. The wave function |Ψ v (θ) is defined as the 2-LQRBM trail state that encodes all the possible P v on its amplitudes. We will propose the exact bound that wave function |Ψ v (θ) can depict in the following.
Prepare 2-LQRBM by quantum circuit. In this section, we propose the protocol for preparing the 2-LQRBM by utilizing Quantum Imaginary Time Evolution (QITE) algorithm [24]. Noting that the Hamiltonian H BM (θ) = s h s (θ) is composed by the linear combination of geometric k−local operators (k = 1, 2), where each term acts on at most k neighbouring qubits on an underlying graph. According to the Trotter theorem, the operator e H BM (θ) can be decomposed as: (5) in which the parameter n = 1/∆τ . For the s−term h s (θ), after a single Trotter step, the system becomes to and the normalization parameter c can be estimated by according to the Taylor approximation. The previous art introduces a unitary operator e −i∆τ As(θ) acting on a neighbourhood of the qubits acted on by h s (θ), where the operator A s (θ) is extended in the Pauli basis σ i1 ...σ i k with relevant parameters a s (θ) i1...i k on k qubits: Define the states |∆ 0 = (|Ψ − |Ψ 0 )/∆τ and |∆ = −iA s (θ)|Ψ 0 , the goal is to minimize the measurement |∆ 0 − |∆ . Taking parameters a s (θ) i1...i k as the variables, this problem can be recognized as an optimization procedure, and parameters a s (θ) i1...i k can be efficiently computed by solving the linear equation where ..,j k and b i1...i k all can be efficiently estimated by the swap test method by implementing O(1/ 2 ) measurements with an affordable error . Although solving the linear function takes the computational overhead O(poly(2 k )), the k takes values from the set {1, 2}, then this optimization problem can be efficiently solved by the classical computer once the entries are all obtained.
2-LQRBM is universal for quantum computation. It is well known that the circuit model is universal for quantum computation task, i.e. there exist sets of gates acting on a constant number of qubits that can efficiently simulate a quantum Turing machine. A set of gates is said to be universal for quantum computing if any unitary operations can be approximated to arbitrary accuracy by a quantum circuit involving only combinations of those gates. Similarly, we also indicates that 2-LQRBM model is universal by mapping any circuit to a ground state of a 2−local Hamiltonian. The relevant process of proof is illustrated as follows.
Theorem 1. Given the Hamiltonian H = T + V (x), where T is the kinetic energy operator and V denotes the potential energy operator, then the ground state |ψ 0 of H can be computed by the imaginary time evolution procedure: where c −1/2 is the normalization factor, λ * is the phase shift that guarantees the ground state energy E 0 and the first excited state energy E 1 satisfying E 0 < λ * ≤ E 1 . The wave function |ψ(r, τ ) is given by a random initial guess at τ = 0 and converges towards the ground state |ψ 0 when τ takes a large constant C with the probability Note that in [17], the Hamiltonian H is expresed as the energy operator, but can be rewritten under the Pauli operator basis by using Jordan-Wigner transformation. According to the theorem 1, the 2−LQRBM trail state |Ψ v (θ) can approximate the ground state of its corresponding 2−local Hamiltonian by the imaginary time evolution procedure. Then we propose the following theorem to illustrate the state |Ψ v (θ) can implement universal quantum computation task, and the elaborate proof is illustrated in the Supplementary material.
Theorem 2. Assume that the n−qubit state |0 ⊗n is the input of a quantum circuit, after the l−th gate, the state of the quantum circuit is given by |α(l) . Then there exists a 2−local Hamiltonian H whose ground state where L is the length of quantum circuit and ∆ ef f is the gap of the effective Hamiltonian H ef f that approximates the self function of H.
Note that |η is defined as the 'history state' which records every steps of the quantum circuit from l = 0, 1, ..., L − 1. One can obtain the target state |α(s) , s ∈ {0, ..., L − 1} efficiently by the reflection operator I − 2|1 s 0 L−s 1 s 0 L−s | with the help of the amplitude amplification method [25,26]. According to the theorem 2, given a target quantum state, we can tune the Boltzmann parameter θ to construct an appropriate H BM (θ), and using it to compute 2−LQRBM state |Ψ v (θ) to approximate the target state with an affordable error. Noting that the Hamiltonian H BM (θ) can represent all the 2local Hamiltonian on the N -dimensional system although it is only composed by {σ s i , σ s i ⊗ σ s i }, where s ∈ {x, y, z}. This because 2-local Hamiltonians with the interaction terms σ s i ⊗ σ l j , s = l ∈ {x, y, z} can be efficiently approximated by the terms {σ s i , σ s i ⊗ σ s j }. The elaborately proof is proposed in the supplementary material. Thus the 2-LQRBM model achieves the universal quantum computation task.
Quantum advantages of 2-LQRBM. The classical analogue of 2-LQRBM is the modified restricted Boltzmann machine with connection of any two visible nodes, and its wave function can be described as Ψ Noting that the wave function Ψ(v) can be calculated in polynomial time under given input values to the variables v i . And this property also leads to the limitations of the modified RBM. If a quantum state has a modified RBM representation, then computing Ψ(v) is characterized by the computational complexity class P/poly, which represent problems that can be solved by a polynomial-size circuit even if the circuit cannot be constructed efficiently in general. The circuit here denotes the modified RBM representation, with the input given by a specific v and the output given by the value of Ψ(v). The previous arts [10] proposed the feature state

IV. EXPERIMENTAL RESULTS
Solving different tasks, the 2-LQRBM model should be trained by different constraints. Given a Hamiltonian H = j α j P j that is expanded on the Pauli basis, where α j ∈ C and P j = P 1 j ⊗ P 2 j ⊗ ... ⊗ P N j , P s j ∈ {I, X, Y, Z}, we propose two training methods for 2-LQRBM model to compute the ground state energy and Gibbs state of H, respectively.
Compute ground state energy. We first give the elaborate details for training the ansatz to compute the ground state energy. Similar to the variational quantum eigensolver (VQE) algorithm, the ansatz |Ψ v (θ) approximates the ground state by using iterative optimization method gradually. The energy E(θ) = Ψ v (θ)|H|Ψ v (θ) needs to be evaluated before every update of the Boltzmann parameters θ.
Ideally, one would choose an optimizer robust to statistical fluctuations. The simultaneous perturbation stochastic approximation (SPSA) algorithm is a gradient- descent method that gives a level of accuracy in the optimization of the cost function. In SPSA approach, for every step k of the optimization, one can sample from p symmetrical Bernoulli distributions ∆ k , and use preassigned elements from two sequences converging to zero, c k and a k . The gradient at θ k is approximated using energy evaluations at θ ± k = θ k ± c k ∆ k , and is constructed as g k (θ k ) = (E(θ + ) − E(θ − ))∆ k /2c k . It is interesting to note that this gradient approximation only requires two estimation of the energy, regardless of the number of terms in Boltzmann parameters θ. And the parameters are then updated as θ k+1 = θ k − a k g k (θ k ). The parame- ters c k , a k can be selected based on the priori experience.
Following the procedure above, we compute the ground state energy of the Hydrogen molecular whose Hamiltonian can be scalably written as We test the performance of the 2-LQRBM trail state and the previous works including hardware-efficient ansatz, QRBM and UCC ansatz. The results are illustrated as Fig.2. From the ground energy curve, we can see that the QRBM without transverse field and the hardware-efficient ansatz cannot convergence to an optimal solution when the bound length increases from 1.5 to 2.5, and the results provided by 2-LQRBM ansatz are extremely close to the exact value (UCC method).
Compute Gibbs state. Second, we propose the training method to compute the Gibbs state (thermal state)  ρ = e −βH /Z of the Hamiltonian H. In general, Gibbs state comes from the process that performing the operator e −βH/2 onto the first system of maximally mixed state |φ = 1/2 N/2 x |x |x , followed by tracing out the second system. We in this section propose the optimization method to tune |Ψ v (θ) to approximate the state |φ τ = c −1/2 e −βH/2 |φ 0 , where τ = 1/β. There might be a doubt that why we do not invoke the QITE algorithm to implement |φ τ directly without using the tuning method. The reason is that QITE algorithm can efficiently solve the imaginary time evolution problem for k-local Hamiltonian H when k is not too large, otherwise, solving the linear function (S + S † )a s (θ) = −b takes enormous computational overhead. Meanwhile, our 2-LQRBM model naturally provides the mechanism that providing a 2-local Hamiltonian whose ground state is extremely close to that of k−local Hamiltonian, even k is large.
where h 1 , h 2 and J are the changeable parameters of the Hamiltonian. We compute the cases that h 2 = 0, h 1 /J ∈ [0.16, 1.60] by using the 2-LQRBM ansatz and the hardware-efficient ansatz with swap entanglement operator, respectively. The results are illustrated as Fig.3 (2-LQRBM) and Fig.4 (hardware-efficient). Each row of the graph represents the amplitude differences ||P trail (i) − P exact (i)|| between the trail state and the exact value on each computational basis, where i ∈ {0, 1, ..., 2 N } represents the computational basis. From the experimental results, it is evident that the error taken by 2-LQRBM is nearly O(10 −4 ) which is much less than it taken by the hardware-efficient ansatz. We also illustrate the optimization steps when computing the Gibbs state of Haldane chain for the specific parameters N = 4, h1/J = 0.48 and h 2 = 0 (see Figure 1). It is evident that 2-LQRBM model convergences to an optimal destination faster compared with the other two trail states.
Finally, we test the 2-LQRBM model on the IBMQessex quantum device for computing the Gibbs state of the Haldane chain (see Figure 5). Limited by the singleand double-gate error rates, the experimental fidelity is only 0.926 which is far below the corresponding theoretical value. With the rapidly refinement and improvement of the quantum hardware devices, we believe that 2-LQRBM model can simulate much more wave functions with high accuracy.

V. CONCLUSION
In summary, we proof the 2-LQRBM model can implement the universal quantum computation task, which also illustrates the quantum advantages compared to its classical counterpart. In addition, different from the previous works, our method can be efficiently transformed to the circuit model and be implemented on the NISQ devices. The exact simulation results illustrate the 2-LQRBM trail state can convergence to a better solution compared with the widely utilized hardware-efficient ansatz and QRBM ansatz. Finally, we test our model on the superconductor quantum devices with 5 qubits, and the experimental results suggest our method can approximate the target wave function with an affordable error.
where T is the kinetic energy operator and V denotes the potential energy operator, then the ground state |ψ 0 of H can be computed by the imaginary time evolution procedure: where c −1/2 is the normalization factor, λ * is the phase shift that guarantees the ground state energy E 0 and the first excited state energy E 1 satisfying E 0 < λ * ≤ E 1 . The wave function |ψ(r, τ ) is given by a random initial guess at τ = 0 and converges towards the ground state |ψ 0 when τ takes a large value C with the probability Proof: Since the Hamiltonian H = T + V (x) is a Hermite matrix [17], then it can be expressed as the spectrum decomposition: where E j is the j−th eigenvalue whose corresponding eigenvector is |ψ j . Without loss of generality, suppose the eigenvalues {E j } is an increasing sequence, s.t. E 0 < E i < ... < E 2 N , then E 0 represents the ground state energy and |ψ 0 represents the ground state of hamiltonian H.
B. The proof of theorem 2 Theorem 2. Assume that the n−qubit input to the circuit is the |0 ⊗n state (other state is also permitted). After the l−th gate, the state of the quantum circuit is given by |α(l) . Then there exists a 2−local Hamiltonian H whose ground state |ψ where L is the length of quantum circuit and ∆ ef f is the gap of the effective Hamiltonian H ef f that approximates the self function of H.
Proof: To proof the theorem 2, we need to introduce the following lemmas to help us interpreting the whole procedure.
Lemma 1. Given a quantum circuit on n qubits with L two-qubit gates implementing a unitary U , and > 0, there exists a 3-local hamiltonian H f inal whose ground state is O( / √ L) close (in trace distance) to the quantum state U |0 N . Moreover, the hamiltonian H f inal can be computed by a polynomial time Turing machine.
The lemma 1 can be proved according to the Theorem 3.15 as well as Lemma 3.19 of Aharonov's art [25]. Lemma 1 indicates the fact that one can encode an arbitrary quantum state on the ground state of a 3−local Hamiltonian. Following Kitaev's idea [26], we will indicate that given an arbitrary 3-local Hamiltonian H (3) , there exists a 2-local Hamiltonian H (2) whose eigenstates are extremely close to those of H (3) .
Before giving more detailed description of the Lemma 2, we need to introduce a certain amount of notation. These notations are followed by Kitaev's previous work [26]. For two Hermitian operators H and V , let H = H + V . Denote λ j , |ψ j be the eigenvalues and corresponding eigenvectors of H, whereas the eigenvalues and eigenvectors of H are denoted by λ j , | ψ j . An significant component in this proof is the resolvent of H which is defined as It is a meromorphic operator-valued function of the complex variable z with poles at z = λ j . Let the Hilbert space H = L + ⊕ L − , where L + is the space spanned by eigenvectors of H with eigenvalues λ ≥ λ c and L + is spanned by eigenvectors of H of eigenvalue λ < λ c . Let Π ± be the corresponding projection onto L ± . Given an operator X on the Hilbert space H, the operator X ++ is defined as Π + XΠ + = X| L+ , and similarly We similarity write H = L + ⊕ L − , we can define the self-energy which is one of the most significant operators in our proof. The self-energy can be expressed as: Our goal is to approximate the spectrum of H| L− . Kitaev et al. implemented this task by approximating the selfenergy Σ − (z). Notice that Σ − (z) is the analogue of H in the L − subspace, but Σ − (z) is in general z−dependent and not a fixed Hamiltonian. Nonetheless, the following Lemma 2 choose an effective Hamiltonian H ef f that approximates self-energy in a certain range of z, and one can approximate H| L− by effective Hamiltonian H ef f . Lemma 2. Assume hamiltonian H has a spectral gap ∆ around the cutoff λ c , i..e. all its eigenvalues are in (−∞, λ − ] ∪ [λ + , +∞), where λ + = λ c + ∆/2 and λ − = λ c − ∆/2. Assume moreover that V ≤ ∆/2. Let > 0 be arbitrary. Assume there exists an operator H ef f such that the eigenvalues of H ef f belongs to [c, d] for some c < d < λ c − and moreover, the inequality holds for all z ∈ [c − , d + ]. Then each eigenvalue λ j of H| L− is close to the j−th eigenvalue of H ef f . The proof of Lemma 2 depends on the Projection lemma as well as Weyl's inequalities. The elaborate procedure can refer to the literature [26].
It is interesting to note that any 3−local Hamiltonian H (3) can be represented as where I ⊗ (σ z m1 σ z m2 + σ z m1 σ z m3 + σ z m2 σ z m3 − 3I), and Then the self energy can be computed as where the energy funtion It is interesting to note that the marginal distribution Ψ(v) can be computed as which means the wave function Ψ(v) can be calculated in polynomial time under given input values to the variables v i . And this property also leads to the limitations of the modified RBM. If a quantum state has a modified RBM representation, computing Ψ(v) is characterized by the computational complexity class P/poly which represents problems that can be solved by a polynomial-size circuit even if the circuit cannot be constructed efficiently in general. The circuit here denotes the modified RBM representation, with the input given by a specific v and the output given by the value of Ψ(v).
The previous arts [10] proposed the feature state |Φ(x) = exp(i S⊂[m] φ S (x) i∈S σ z i )|0 m , for which has been proved it is #P −hard to compute the state |Φ(x) in the computational basis. If the state |Φ(x) can be expressed by the modified RBM, it means #P ⊂ P/poly which leads to the polynomial hierarchy collapses. The feature state |Φ(x) is one of the instances that modified RBM can not simulate efficiently, and other possible examples are projected entangled pair states and the ground states of gapped Hamiltonians. Combining the above theorems 1 and 2, we successfully illustrate the quantum advantages of 2-LQRBM.