# Parallel Computing of Edwards--Anderson Model
## 2 Algorithm
Next, we transmit the data backwards in the same way. So eventually we have \(\vec{\Psi}\)-components in the right memory locations as it's shown in Figure 7.

Applying \(\hat{A}\) to every one of the four components of \(\vec{\Psi}\) we get the result wave function. One can notice that the result component of \(\vec{\Psi}^{\prime}\) corresponds to one of the 4 input components. Using the given scheme, we can parallelise computations in quantum computer simulators. Figure 6: Using the parallelisation scheme of computation of Edwards-Anderson model to simulate the 2-qubit quantum operator \(A\) acting on the 4-qubit quantum scheme. We have 4 steps with 3-fold data exchange and 2-fold data copying. The arrows denote the directions in which the components of \(\vec{\Psi}\) move. The large numbers indicate the memory locations. In steps 2 and 4 we copy pairs of states to transmit them further. Eventually we have all 4 input components of \(\vec{\Psi}\) to apply \(\hat{A}\) to them. \(\hat{A}\) is given so that it acts only on qubit 2 and 4. We can make sure that by copying the pairs in steps 2 and 4 we get exactly necessary 4 components with the different states of the qubits 2 and 4 and the same states of the qubit 1 and 3 in each of the 4 components. To copy the data, we allocate the extra memory to store the 4 variables for each component. Some of the memory cells are unoccupied at the beginning. Therefore we see the empty cells at the beginning. ## 5 Conclusions

In the paper the algorithm for parallel computation of two-dimensional the Edwards--Anderson model with nearest-neighbor interaction and performance data are presented. The algorithm can do a data exchange between threads so that the data of one thread can be redirected to any other thread. This follows from the diagram in Figure 4. From any thread, starting from the top line, correctly selecting the arrows and moving along them, we will definitely get to any thread we want. This allows us to use the algorithm in creating a quantum simulator. Using 64 threads it is possible to create a simulator for about 40 qubits. The computation time would roughly correspond to the data in Table 1 and Table 2, where \(Lx\) would equal the number of qubits and \(Ly\) would be the number of 1-qubit and 2-qubit operators. We showed that computational aspects of quantum computer simulators and Edwards-Anderson model have a lot in common. The algorithm can be used in neural networks (including the Boltzmann machine) and as a benchmark to evaluate the performance of quantum computers. Polynomial growth time of the operation time when only one side increases in size is an advantage of the method. In common case the scheme has the complexity class NP. The C++ code of the calculation program is available for downloading at [32]. It implements both minimum energy search and minimum energy configuration search. Writing the initial draft, validation, preparation, revision, M.A.P. ; computing resources, Y.A.S. ; editing, V.Y.K. ; acquisition of the financial support, supervision, project administration, management activities, formulations goals and aims, K.V.N. All authors have read and agreed to the published version of the manuscript. This research was funded by the state task of the Ministry of Science and Higher Education of the Russian Federation Grant No. 075-00400-19-01. Not applicable. The authors declare no conflict of interest. ## References

* (1) [PERSON] Classical Spin-Glass Model. _Phys. Rev. Lett._**1982**, _49_, 409-412. [CrossRef]
* (2) [PERSON]; [PERSON] Classical Theory of spin glasses. _Phys. F Metal Phys._**1975**, \(5\), 965-974. [CrossRef]
* (3) [PERSON]; [PERSON]; [PERSON] Ultrametricity for physicists. _Rev. Mod. Phys._**1986**, _58_, 765. [CrossRef]
* (4) [PERSON]; [PERSON] \"Neural\" Computation of Decisions in Optimization Problems. _Biol. Cybern._**1985**, _52_, 141-152. [PubMed]
* (5) [PERSON]; [PERSON]; [PERSON]; [PERSON] The capacity of the Hopfield associative memory. _IEEE Trans. Inf. Theory_**1987**, _33_, 461-482.