{'fraction_non_alphanumeric': 0.03493617957746479, 'fraction_numerical': 0.01171875, 'mean_word_length': 4.579189686924494, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Retrieving the ground state of spin glasses using thermal noise: Performance of quantum annealing at finite temperatures

We study the problem to infer the ground state of a spin-glass Hamiltonian using data from another Hamiltonian with interactions disturbed by noise from the original Hamiltonian, motivated by the ground-state inference in quantum annealing on a noisy device. It is shown that the average Hamming distance between the inferred spin configuration and the true ground state is minimized when the temperature of the noisy system is kept at a finite value, and not at zero temperature. We present a spin-glass generalization of a well-established result that the ground state of a purely ferromagnetic Hamiltonian is best inferred at a finite temperature in the sense of smallest Hamming distance when the original ferromagnetic interactions are disturbed by noise. We use the numerical transfer-matrix method to establish the existence of an optimal finite temperature in one- and two-dimensional systems. Our numerical results are supported by mean-field calculations, which give an explicit expression of the optimal temperature to infer the spin-glass ground state as a function of variances of the distributions of the original interactions and the noise. The mean-field prediction is in qualitative agreement with numerical data. Implications on postprocessing of quantum annealing on a noisy device are discussed.


I. INTRODUCTION
Quantum annealing [1][2][3][4][5][6][7][8] is the quantum-mechanical counterpart of simulated annealing [9], an optimization method used to find the ground state of, e.g., an Ising model. Because combinatorial optimization problems can be formulated as the ground-state search of an Ising model [10], typically with spin-glass-like complex interactions, the development of efficient methods to solve these computationally hard problems is an important target of current research activities. Quantum annealing has attracted a great deal of attention in recent years partly due to the introduction of its hardware implementation, the D-Wave quantum annealer [11]. Evidence has been provided that the machine indeed runs quantum mechanically [11][12][13][14][15][16][17][18][19][20][21]; however, there remain open questions before the device becomes practically useful. One of the problems is the control error, i.e., imperfections in the setting of parameter values of the Ising Hamiltonian in the device [22,23]. Because it is difficult to set the parameter values (interactions and local fields of the Hamiltonian) with a high precision, the device might be attempting to find the ground state of the wrong Hamiltonian, thus compromising the reliability of the final output. This phenomenon arises in any analog device like the D-Wave quantum annealer and it is crucial to devise and implement ingenious methods to mitigate the influence of control errors. One approach is quantum error correction [24][25][26][27][28], however, at the cost of decreasing the number of available logical qubits.
A closely related problem has been analyzed in the context of classical error-correcting codes, in which a message is encoded and then transmitted through a noisy channel. The receiver has to correct errors in the received noisy signal and retrieve the original message. It is known that a certain type of error-correcting codes can be formulated in terms of the theory of spin-glasses [29,30]. In this formulation, the task to retrieve the original message is translated to the inference of the ground state of an Ising model with uniform ferromagnetic interactions using only the information of a spin-glass Hamiltonian derived from the original ferromagnetic Hamiltonian by the application of noise to the interactions. It has been shown numerically [31], as well as analytically [32][33][34], that the best performance to retrieve the ferromagnetic ground state from the spin-glass Hamiltonian is achieved at a finite temperature rather than at zero temperature, since the Hamming distance of the retrieved spin configuration to the true ground state is a nonmonotonic function of the temperature. In fact, recent experiments on the D-Wave quantum annealer [35] study the trivial ferromagnetic case and illustrate that decoding is more efficient at finite temperature.
In the present paper we generalize the above formulation for error-correcting codes to the situation where the original (noiseless) Hamiltonian already has randomness in the interactions, i.e., a spin-glass Hamiltonian. The random interactions are then disturbed by (Gaussian) noise, and the task is to find a spin configuration closest to the ground state of the original Hamiltonian using only the Hamiltonian with disturbed interactions. One of the important motivations to study such a problem lies in the noise-mitigation task of analog devices as explained above: One is faced with the problem to infer the correct ground state of a Hamiltonian with random interactions out of data produced from the Hamiltonian with noise in addition to the original random interactions. Because it is very difficult to develop a general theory for this situation as was done for error-correcting codes [30,32], we use numerical methods for one-and two-dimensional models supplemented by a mean-fieldtype approach. Our result shows clearly that the original ground state is better inferred at finite temperature, rather than at zero temperature. Therefore, tuning the D-Wave quantum annealer to the optimal decoding temperature might actually assist in mitigating the effects of analog noise in the device.
The paper is organized is as follows. In Sec. II, we formulate the problem. The results of numerical calculations are described in Sec. III. An analysis using meanfield theory is given in Sec. IV, followed by concluding remarks in Sec. V. Technical details are delegated to the Appendix.

II. FORMULATION OF THE PROBLEM
The goal is to infer the original ground state of a Hamiltonian whose interactions J i1,...,ip follow a Gaussian distribution and are disturbed by noise, J i1,...,ip →J i1,...,ip . We write the original spin-glass Hamiltonian with general many-body interactions as, where S(= S 1 , S 2 , . . . , S N ) is the set of Ising spins, i.e., S i ∈ {±1}. The original interactions J i1,...,ip are generated from a Gaussian distribution P (J i1,...,ip ) with mean unity and variance σ 2 . The ground state of this Hamiltonian is given by the sign of the zero-temperature limit of the thermal expectation value, i.e., We next introduce disturbed interactionsJ i1,...,ip by adding a noise term ξ i1,...,ip to the original interactions, The variables ξ i1,...,ip are distributed according to a Gaussian distribution P (ξ i1,...,ip ) with zero mean and variance γ 2 . The problem is to find a spin configuration closest to the ground state of the original Hamiltonian Eq. (1) from the noisy Hamiltonian, Eq. (5) below, at finite temperature T or the inverse temperature β = 1/T , whereH represents the Hamiltonian with the added noise. Notice that we are interested only in the sign of the spin average, not the magnitude, as indicated in Eq. (4). As a measure of similarity between the ground state of the original Hamiltonian and the spin configuration of the noisy system, we define the overlap M (T ) as where the products run over the set of interactions. The overlap M (T ) is closely related to the average Hamming distance D(T ), A large overlap M (T ) means a small Hamming distance. The Hamming distance is a standard measure of the quality of error-correcting codes [30], and we adopt it as the quantity to be minimized [or the overlap M (T ) to be maximized] in the present paper.
Optimal decoding occurs at the point where M (T ) has a maximum. Here we analyze how this maximum depends on the strength of the disorder γ.
When σ = 0, the Hamiltonian in Eq. (1) represents the ferromagnetic Ising model. Then, S , and the overlap M (T ) is identical to that of error-correcting codes with all original bits being unity [30]. It is known in this case that the overlap in Eq. (6) takes a maximum value at T N = γ 2 , the so-called Nishimori temperature [30][31][32][33][34]. It is difficult to apply the same theory to the case where σ = 0 due to the lack of proper symmetry. We therefore use numerical methods in the following section to study the behavior of the disordered system.

III. NUMERICAL ANALYSIS
Following Ref. [31], we apply the numerical transfermatrix method to a triangular ladder with two-and three-body interactions, as depicted in Fig. 1, using free boundary conditions, Furthermore, we study a quasi-two-dimensional system with triangular ladders stacked on top of each other as depicted in Fig. 2 using the transfer-matrix method.
The overlap for finite-size systems is calculated for these lattices with the ground-state configuration S  shows typical results for triangular and stacked ladders for several pairs of σ and γ. The ordinate is the overlap M (T ) and the abscissa is the temperature T . The mean of the overlap is indicated by the red solid line, and the shaded area denotes the standard deviation. We observe a clear peak at finite temperature in each panel. Similar results were found for all pairs of σ and γ. These results clearly show that the ground state of the original Hamiltonian can be inferred with higher probability from data generated by the noisy Hamiltonian at finite temperature than at zero temperature. Figure 4 shows the optimal temperature T opt for decoding, i.e., the peak position of M (T ), as a function of γ for each fixed value of σ. The green curve is the optimal temperature for σ = 0 (T N = γ 2 ). The data indicate that the naive relation T opt = γ 2 for σ = 0 does not hold when σ > 0. The functional form of T opt (γ) thus depends on the lattice structure, unlike the case of σ = 0.

IV. MEAN-FIELD ANALYSIS
Because it is difficult to develop a generic theory to derive T opt (γ) for the noisy case when σ > 0, we use meanfield theory to understand its behavior qualitatively. The original Hamiltonian is chosen to be the Sherrington-Kirkpatrick (SK) fully connected Ising spin glass [37], where the sum runs over all distinct pairs of spins. The interactions are drawn from a Gaussian distribution where J 0 represents the mean of the distribution and σ 2 its variance. The Hamiltonian with noise is given bỹ where the interactions are affected by noise viã As before, the noise follows a Gaussian distribution with variance γ 2 , The overlap is where the square brackets denote the configurational average over the distributions of interactions and noise, The angular brackets represent the thermal average with respect to each Hamiltonian: We assume β 0 to be finite in the course of the calculations and take the limit β 0 → ∞ at the end. Our goal is to identify the temperature that maximizes the overlap. As detailed in the Appendix, the free energy per spin is calculated under the ansatz of replica symmetry as where H 2 (z 0 ) = (σ 2 + γ 2 )β 2 q z 0 + J 0 βm.
The self-consistent equations for the order parameters read As shown in the Appendix, the two systems defined in Eqs. (11) and (13) decouple in the replica symmetric solution, and we obtain where the subscript in the outer square brackets in the second line denotes the variance of the distribution of randomness. Since the first factor, is independent of β, only the second factor, determines the temperature dependence of M (T ). The latter is nothing but the well-established case of vanishing original variance [30][31][32][33][34] because the expression involves a single system with noise. Therefore, we reach the conclusion that the overlap takes a maximum value at the temperature This result is naturally consistent with the case of vanishing original variance σ = 0, i.e., T N = γ 2 . The green dashed line depicted in Fig. 4 shows the mean-field prediction T opt = σ 2 +γ 2 . The numerical data agree relatively satisfactorily with the mean-field prediction for small σ and large γ. The finite value of T opt at γ = 0 should be an artifact of the replica symmetric solution because the limit γ = 0 represents the noiseless case, where the original and the noisy Hamiltonians coincide, and thus T = 0 should give the best result.

V. CONCLUSION
We have examined the effects of noise added to the interactions of an Ising spin-glass Hamiltonian. The goal is to infer the ground state of the original Ising Hamiltonian using only the output from the system with noisy interactions. The spin configuration of the latter system at finite temperature has been compared with the ground state of the original system. It has been shown from numerical transfer-matrix calculations that the overlap of two spin configurations has a maximum at a finite temperature, thus giving the smallest Hamming distance. This means that the ground state of the original Hamiltonian is better inferred at finite temperature than at the ground state of the noisy system. An intuitive explanation of this result would be that the unperturbed ground state is an excited state of the noisy system. Therefore, a finite temperature that corresponds to the excitation energy might increase the chances to find the ground state of the original problem Hamiltonian. Nevertheless, the original ground state is just one of very many states to be realized at a specific finite temperature for the noisy system and our result is quite nontrivial.
A similar phenomenon has been known to exist for years for the case of uniform ferromagnetic interactions in the original Hamiltonian under the context of errorcorrecting codes [30][31][32][33][34][35]. The present work generalizes this old result to the case with randomness already in the original model. Although the former case of uniform original interactions has been able to be treated analytically with full generality in the sense that there is no restriction on the type of lattice or the range of interactions [30,[32][33][34], it is difficult to develop a comparable analytical theory for the present case because of the difference in symmetries. We therefore used the numerical transfer-matrix method and a mean-field analysis. It is an important direction of further research to establish analytical results under general conditions for the case with random original interactions. In particular, it would be very useful to derive an explicit analytical expression for the optimal temperature that is applicable beyond meanfield theory.
Finiteness of the optimal temperature implies an important lesson for data analysis (postprocessing) of a real quantum annealer. Because any device operates at finite temperature, it is always a serious problem to keep temperature effects under control. However, our result suggests that thermal noise may be positively used to infer the ground state of the original Hamiltonian when the interactions are disturbed by noise. For example, if the original Hamiltonian has uniformly ferromagnetic interactions, the optimal temperature is given as where J 0 is the original uniform interaction and γ 2 is the variance of noise. Notice that we set J 0 = 1 in Sec. II. If we insert the values roughly corresponding to those for the D-Wave machine, J 0 = 5 GHz and γ/J 0 = 0.1, the latter representing the standard deviation of control errors, the optimal temperature turns out to be approximately 2 mK. The operating temperature of the D-Wave machine is approximately 20 mK and, therefore, much higher than this theoretical optimal temperature. It should nevertheless be remarked that the numbers would easily change if the original interactions are random, if the real control errors are larger than γ/J 0 = 0.1, or if the noise is distributed according to a another distribution (e.g., 1/f or pink noise). It has indeed been shown in our numerical calculations that the optimal temperature for random original interactions is much higher than T N as seen in Fig. 4. It is, however, noteworthy that our theoretical estimate is not much different than the real operating temperature of the device. Therefore, it would be interesting to verify these theoretical predictions on the actual D-Wave 2X device for nontrivial spin-glass problems complementing previous results on the trivial ferromagnetic case [35]. We have chosen the overlap M (T ) as the measure of better inference of the ground state. This means to minimize the Hamming distance to the true ground state, which is the standard in error-correcting codes [30]. This measure is also useful in other circumstances including the spin-glass problem, where the spin configuration of the ground state is of as much interest as the groundstate energy. In the context of combinatorial optimization problems, however, it is often the case that the energy is a prime measure of performance. It is useful to remember here that a smaller Hamming distance to the ground state does not necessarily mean a smaller energy [27]. It may then happen that our present result does not apply as is, if it is desirable to minimize the energy, not to minimize the Hamming distance. This turns out to be a highly nontrivial problem and will be discussed in a forthcoming paper. It is also interesting to see how our conclusion would change if quantum effects are taken into account explicitly. We are studying this problem and results will be announced before too long.
The standard mean-field calculation [30] leads to where The order parameters in [f ] are determined by the saddlepoint conditions where · · · L ≡ Tr(· · · )e L Tre L .

(A10)
This result reduces to Eq. (19) because the w dependence of H 1 and H 2 disappears as explained below. It turns out the averaged free energy does not depend on u, as can be verified by direct computations: We can therefore choose u = 0 without loss of generality. This implies that the original and noisy systems decouple completely because u is the parameter that connects these two systems as seen in Eq. (A3). When u = 0, c = 0 according to Eq. (A9) and hence the w dependence of H 1 (z 0 , w) and H 2 (z, w) disappears as can be seen in Eq. (A8).