Abstract
Recently various physical systems have been proposed for modeling Ising spin Hamiltonians appealing to solve combinatorial optimization problems with remarkable performance. However, how to implement arbitrary spin-spin interactions is a critical and challenging problem in unconventional Ising machines. Here, we propose a general gauge transformation scheme to enable arbitrary spin-spin interactions and external magnetic fields as well, by decomposing an Ising Hamiltonian into multiple Mattis-type interactions. With this scheme, a wavelength-division multiplexing spatial photonic Ising machine (SPIM) is developed to show the programmable capability of general spin coupling interactions. We exploit the wavelength-division multiplexing SPIM to simulate three spin systems: ±J models, Sherrington-Kirkpatrick models, and only locally connected J1-J2 models and observe the phase transitions. We also demonstrate the ground-state search for solving Max-Cut problem with the wavelength-division multiplexing SPIM. These results promise the realization of ultrafast-speed and high–power efficiency Boltzmann sampling to a generalized large-scale Ising model.
Wavelength-division multiplexing optical Ising simulator is proposed to enable programmable spin couplings and magnetic fields.
INTRODUCTION
Ising model is an archetypal model widely used for investigations of complex dynamics in physics, computer science, biology, and even social systems. Because of Moore's law for conventional computers, there has been tremendous interest and a boost in the development of unconventional computing architectures for simulating Ising Hamiltonians, for example, based on optical parametric oscillators (1–6), lasers (7–11), polariton (12–14), trapped ions (15), atomic and photonic condensates (16, 17), electronic memorisers (18), superconducting qubits (19–21), and nanophotonics circuits (22–26). Despite different approaches and technologies, it is worth noting that the error probability and time-to-solution metrics of these Ising machines have a similar scaling trend as a function of the number of spins (27). Practically, the difficulty of implementing the spin coupling interactions with the proposed hardware has become a main factor limiting scalability and performance for unconventional Ising simulators (28, 29).
In this regard, by encoding spins on the phase terms of a monochromatic field with spatial light modulators (SLMs), spatial photonic Ising machines (SPIMs) benefit from reliable large-scale Ising spin systems, even up to thousands of spins by exploring the spatial degrees of freedom (30–43). Similar to other optical analog computations (44–55), the calculation of spin system energy is performed just by instantaneously measuring the light intensity, therefore with ultrafast speed and high-power efficiency, and then feedback from the detected intensity allows the phase distribution on the SLM to sample Ising system converging toward a ground state (34). Moreover, to eliminate the impact of pixel alignment, the gauge transformation is proposed to simultaneously encode spin configurations and interaction strengths with a single spatial phase modulator (36). However, the original proposed SPIM (34) is only applicable to Mattis-type coupling interactions (56). Even with scattering medium, tunable SPIM was demonstrated on the basis of multiple light scattering, while the Ising spin system is still limited to specific fully connected couplings (39). Therefore, how to realize completely programmable spin couplings is a primary target for developing SPIMs for general Ising models.
Here, we propose a general gauge transformation scheme to enable arbitrary spin-spin interactions and external magnetic fields as well, by decomposing an Ising Hamiltonian into multiple Mattis-type interactions. Furthermore, with this scheme, we develop a wavelength-division multiplexing SPIM to show the programmable capability of general spin coupling interactions. We exploit the wavelength-division multiplexing SPIM to simulate three spin systems: fully connected ±J model, Sherrington-Kirkpatrick (SK) model, and only locally connected J1-J2 model. For ±J and SK models, we investigate the process of phase transition with different spin interactions and experimentally observe the spin-glass (SG), ferromagnetic (FM), and paramagnetic (PM) phases by simulating the equilibrium systems at different temperatures. We verify that the critical temperatures evaluated by the wavelength-division multiplexing SPIM are consistent with the predictions of the mean-field theory. The phase transition from PM to stripe-antiferromagnetic phase is experimentally observed in the J1-J2 model with competing interactions, and the SG phase is emerging when increasing the stochasticity of the next-nearest-neighbor interactions. These complete characterizations of possible stable phases play a key role in understanding the working principle in spin systems (35, 36, 40). Moreover, we demonstrate the ground-state search for solving the Max-Cut problem about undirected, unweighted graphs, which indicates that the wavelength-division multiplexing SPIM can precisely program spin coupling interactions and leads to a high successful probability.
RESULTS
General gauge transformation to Ising model
We consider a general Ising model (Fig. 1) given by
| (1) |
where Jij and hi are the interaction strength and the external magnetic field strength for N spins, respectively, and σi can take binary values +1 or −1. To optically compute the general spin Hamiltonian, we use a Cholesky-like decomposition to transform the interaction matrix J into a matrix consisting of column vectors ξk, so the interaction matrix can be written as including the self-interactions of spins. For the external magnetic field, we add an auxiliary spin with σN+1 = 1 and an element θk as the last term in each column vector ξk, and the new vectors are defined as κk. We further normalize each column vector κk by dividing the normalization factor . Therefore, the spin Hamiltonian is transformed into , where and H0 is a constant with the unit of energy as corresponding to the self-interactions of spins. Here, the summation in Hk over i and j starts from k and ends at N + 1 because of the decomposition algorithm with the order from the first spin to the last one, such that the matrix [ξk] is lower triangular, while the summation can start from 1 and end at N − k + 1, and the matrix [ξk] is upper triangular if the decomposition order is reversed from the last one to the first one. We note that despite the transformation, the degrees of freedom of remain equal to N(N + 1)/2, which is the summation of those of {Jij} and {hi} for arbitrary interactions and magnetic fields. Therefore, the pixel number of SLM is naturally required with O(N2) to implement such a number of degrees of freedom. The detailed derivations are summarized in section S1.
Fig. 1. General gauge transformation to Ising model with arbitrary spin interactions and external magnetic fields.
The Ising Hamiltonian is transformed into N numbers of Mattis models via Cholesky-like decomposition as and . Here, J and H0 are constants, and represents the z component of spin σj rotated by an angle with respect to the z axis.
Inspired by the encoding scheme for Mattis model (36, 37), here, a general gauge transformation is implemented to unify the spin interactions. As shown in Fig. 1, the transformation rotates each original spin about the z axis by an angle to arrive at a new spin vector
| (2) |
which is then projected onto the z axis to obtain the effective spin . By the gauge transformation given as
| (3) |
the transformed Hamiltonian remains invariant, , where the interactions of the transformed spins are uniform with a strength of J in both short and long ranges.
Optical computation of the Ising Hamiltonian
On the basis of the Cholesky-like decomposition and the gauge transformation, we propose a wavelength-division multiplexing SPIM to realize optical computation of the Ising Hamiltonian with full programmability of spin interactions and magnetic fields (Fig. 2). The illumination components consist of a collimated supercontinuum laser, a diffraction grating, and a cylindrical lens. The diffraction grating and cylindrical lens diffract light with different wavelengths onto a SLM along the x axis, while the y-axis pixels are illuminated coherently by the same wavelength. The optical field modulated by the SLM is then transformed by a Fourier lens, resulting in an incoherent intensity summation of different wavelengths and coherent interference for each wavelength at the back focus plane. The detailed experimental setup is described in Materials and Methods.
Fig. 2. Schematic of the wavelength-division multiplexing SPIM.
In this setup, light with different wavelengths is diffracted and focuses on a phase-only SLM along the x direction, while the pixels in the y direction are coherently illuminated by incident light of the same wavelength. The spins are encoded with phase modulation on the SLM using Eq. 4. SC, supercontinuum laser; L1, L2, L3, L4, and FL, Fourier lens; D, diaphragm; CL, cylindrical lens; P, polarizer; BS, beam splitter; sensor, charge-coupled device.
We encode the gauge-transformed spin configurations , such that it allows to encode the spin configurations and program the interaction strengths on a single phase-only SLM with the wavelength-division multiplexing. By adjusting the diffraction angle, the operation wavelengths are selected within the quasi-stationary region of supercontinuum light (57). For the kth Mattis model, we assume a uniform spectrum intensity of light illuminating SLM and apply a phase modulation on the y-directional pixels, and each spin is encoded by Nx × Ny pixels with checkerboard pattern
| (4) |
Here, m and n are the checkerboard pixel indices for each spin, 1 ≤ m ≤ Nx and 1 ≤ n ≤ Ny. We note that for each Mattis model, the phase modulation should account for the calibration of different wavelengths when encoding in the x direction on the SLM. The normalized intensity at the center position of the back focus plane is the summation of the incoherent field intensities for light with different wavelengths, . The Ising Hamiltonian for the general spin interactions is thus optically computed as . The details of the gauge transformation and the encoding for general illumination cases are described in section S2. We note that Eq. 4 can also be used to decouple a spin from the others by setting and σj = 1 because, in this case, there is no contribution of σj to the central intensity according to eq. S6.
In the experiment, the operation wavelengths are selected from 588 to 611 nm. The beam diameter of each individual wavelength spans an area of about two pixels along the x direction of the SLM, approximately 13.5 μm. Correspondingly, by the grating equation, the wavelength interval for two neighboring wavelengths is estimated about Δλ = 0.053 nm. The light intensity of each wavelength occupies 98% of its own total intensity in the two pixels of SLM with 16 μm, thus with the cross-talk less than 2%.
Simulation of phase transitions with wavelength-division multiplexing SPIM
To evaluate the performance of the wavelength-division multiplexing SPIM, we conduct an experiment and simulate three well-studied spin systems: the ±J model (Fig. 3A), the SK model (Fig. 3D), and the SK model under external magnetic field (Fig. 3G). The interactions between spins in the ±J model are either 1 with a probability of p or −1 with a probability of 1 − p. The probability distribution is given as P(Jij) = pδ(Jij − J) + (1 − p)δ(Jij + J), where δ(x) is a Kronecker delta function equal to 1 for x = 0 and 0 for other cases. In the SK model, the probability distribution of Jij is Gaussian, with the distribution given as P(Jij) = 𝒩(Jij; J0/N, ΔJ2/N), where J0 and ΔJ are two constant parameters, such that the energy can be extensive and proportional to N (58).
Fig. 3. Probability distribution of the Parisi parameter q as a function of T, for N = 80 spins.
(A) Schematic representation for the ±J model. (B and C) present the experimental results for p = 0.7 and p = 0.55, respectively. (D) Schematic for the SK model. (E and F) display the results for J0 = 40 and 8, respectively, with fixed. (G) Schematic for the SK model with a uniform external magnetic field. (H and I) present the results for h = 0.2 and 2, respectively, with J0 and ΔJ being the same as (F).
For each model, a quenched realization is generated for the interactions Jij randomly assigned on the basis of their respective probability distributions. We generate 100 replicas by giving a specific temperature, where each replica is obtained by randomly initializing spin configurations with 80 spins and through 800 iterations of the optical Metropolis Hasting sampling procedure (36, 59, 35). Such an optical feedback procedure uses the Markov chain Monte Carlo (MCMC) algorithm and consists of flipping the spin, encoding the phase diagram, comparing the Hamiltonian between two experimental results, and updating the spin configurations with a certain probability (see the details in Materials and Methods). The spin overlap is then calculated as , which measures the similarity between replicas α and β. The phase transition is characterized by the probability density function P(q) of the overlap.
Figure 3 (B and C) presents the experimental results for the ±J model with the parameters p = 0.7 and p = 0.55, respectively. At high temperatures, both of the two parameters p = 0.7 and p = 0.55 result in randomly arranged spins and little correlation between replicas, indicating the PM phase, where P(q) has a peak at around zero. At low temperatures, however, P(q) displays the distinct density distributions for the two values of p. For p = 0.7, because the interactions are mostly positive, the spins attract each other, and the replicas remain in only two ground states of the FM phase. Consequently, P(q) at low temperature has two peaks around 1 and −1 as shown in Fig. 3B. On the other hand, for p = 0.55, the interactions are composed of both positive and negative values, causing frustration during the energy minimization process at low temperatures. This frustration results in a multivalley energy landscape, and P(q) takes on a wide range of values at low temperatures, as depicted in Fig. 3C. This feature of widely distributed q is the hallmark of the SG phase. These results demonstrate that the SG phase transition indeed emerges in the systems simulated by the wavelength-division multiplexing SPIM.
To further study the phase transition with the wavelength-division multiplexing SPIM, we examine the SK model without magnetic fields and compare the estimated critical temperature with the mean-field theory. Figure 3 (E and F) shows the results for J0 = 40 and 8, respectively, with . At high temperatures, both figures show the PM phase with P(q) dominated around zero, due to the randomly arranged spin configurations. However, P(q) values at low temperatures exhibit the FM and SG phases for the different values of J0 and occur around Tc = J0 and Tc = ΔJ, respectively. The experiment results are consistent with the mean-field theory (58) with the critical temperatures for the PM-FM transition and for the PM-SG transition.
In addition, we also investigate the stability of the complex multivalley energy landscape of the SG phase in the presence of a uniform external magnetic field in the SK model (Fig. 3G). As shown in Fig. 3H, for the SK model with J0 = 8 and , a weak magnetic field with h = 0.2 aligns spins with the field direction even at high temperature, causing most q values to cluster around positive values. Upon decreasing the temperature, due to the magnetic field, the probability distribution of q is not as wide as that in the SG phase (Fig. 3, C and F) but still with relatively wide probability distribution covering the positive value of q, indicating that weak magnetic fields are not strong enough to completely alter the multivalley energy landscape. However, when subjected to a stronger magnetic field with h = 2 (Fig. 3I), at low temperatures, q values are more clustered, which suggests that the magnetic field flattens out some valleys in the energy landscape.
The wavelength-division multiplexing SPIM can be used to study Ising systems beyond the full-coupling models. To demonstrate its full programmability of spin couplings, we examine a locally connected J1-J2 model (Fig. 4A). The Hamiltonian only includes nearest-neighbor FM and next-nearest-neighbor antiferromagnetic interactions on a square lattice with cyclic boundary conditions: , where 〈〉 and 〈〈〉〉 denote the nearest and next-nearest neighbors, respectively. The nearest-neighbor FM interactions align adjacent spins with J1 > 0 (represented by solid lines in Fig. 4A), while the next-nearest-neighbor antiferromagnetic interactions drive two adjacent rows and columns to have opposite orientations with J2 < 0 (represented by double parallel lines). When the antiferromagnetic interaction J2 is strong enough to overcome the FM interaction J1, a striped phase is produced, characterized by a two-component order parameter (mx, my), where , , and (xi, yi) are the coordinates of spin σi. The ground states of the J1-J2 model are ℤ4 ordered when ∣J2∣/J1 > 1/2 and can be represented by the order parameters of (mx, my) = (±1, 0) and (mx, my) = (0, ±1), corresponding to two longitudinal and transverse striped states with opposite spin directions, respectively (60).
Fig. 4. Experimental results for a locally connected J1-J2 model with cyclic boundary condition.
(A) Schematic of the J1-J2 model, where the thick solid line indicates the nearest neighbor FM interaction (J1 > 0) and the blue double line represents the next-nearest-neighbor antiferromagnetic interaction (J2 < 0). Blue and yellow squares denote spins σi = −1 and 1, respectively, and the experiment was conducted on an 8 × 8 lattice. (B) Results for the order parameter (mx, my) as a function of T, for the parameters J1 = 0.2 and J2 = −1. (C) Top view of (B). (D) Spin configuration sampled at T = 70J1 representing a PM state. (E to H) Four spin configurations sampled at T = 14.39J1, which are adjacent to four striped states, respectively.
Using the wavelength-division multiplexing SPIM, we simulate the transition between the striped states and the PM phases. Figure 4B shows the simulation results for the parameters J1 = 0.2 and J2 = −1 on an 8 × 8 lattice. Above the critical temperature of Tc = 20J1, the order parameters (mx, my) are both close to zero due to the thermal fluctuations destroying the long-range correlation between spins as a sample of spin configurations shown in Fig. 4D. However, below Tc, the order parameters split into four clusters located in different quadrants, corresponding to the four striped states (Fig. 4B). Figure 4 (E to H) shows four samples of the spin configurations, which exhibit a long stripe spatial distribution. These results for the J1-J2 model demonstrate the programmability of spin couplings.
The J1-J2 model plays a crucial role in comprehending the low-temperature phase of short-range SG. With the help of the wavelength-division multiplexing SPIM, we consider the next-nearest-neighbor interactions are Gaussian as P(J2) = 𝒩(J2; J0, ΔJ2) with a mean value of J0 = −1 and an SD ΔJ, while maintaining a fixed value of nearest-neighbor interactions J1 = 1. For small variances of ΔJ = 0.2 (Fig. 5A), the density distribution of q exhibits a single peak at high temperatures, signifying the PM phase. However, as the temperature decreases, P(q) transforms into three clusters of peaks, indicative of the ℤ4-ordered striped ground states. The peak around q = 0 is twice as high as those around q = ±1. In contrast, by increasing the SD to ΔJ = 2, the increased disorder in the next-nearest-neighbor interactions results in an SG phase at low temperatures. The SG phase is characterized by many pairs of ground states and results in multiple sharp peaks of P(q) as Fig. 5B.
Fig. 5. Short-range SG phase transitions in J1-J2 model.
(A and B) Probability density distribution of q for the J1-J2 models with the fixed nearest-neighbor interactions J1 = 1, while the next-nearest-neighbor interactions are Gaussian distributed with the mean value of J0 = −1 and the SD of ΔJ = 0.2 and 2, respectively. (C) Experimentally measured susceptibility for ΔJ = 0.2 and ΔJ = 2.
We also experimentally measure the susceptibility to investigate the transition temperature in the J1-J2 model (61), where mi represents the statistical average of σi. At high temperatures, thermodynamic fluctuations cause the spin orientation to constantly change, resulting in mi being close to zero, as shown in Fig. 5C. The susceptibility in both cases decreases with increasing temperature and scales with 1/T. The results also indicate that the critical temperatures are different, with Tc = 14J1 and Tc = 10J1 for ΔJ = 0.2 and ΔJ = 2, respectively. In the case of ΔJ = 0.2, the variations of the next-nearest-neighbor interactions are relatively small, and these interactions are close to −1. As the temperature decreases below Tc, the system reaches the striped ground states with mi approaching ±1, causing the average susceptibility χ to converge to zero. In contrast, for ΔJ = 2, at low temperatures, the local spin orientation still varies slowly because of the presence of numerous ground states in the SG phase, resulting in χ being close to a nonzero constant. These experimental results clearly demonstrate the SG phase transition in the J1-J2 model with short-range interactions.
Ground-state search for solving Max-Cut problem
To estimate the performance of wavelength-division multiplexing SPIM for solving combinatorial optimization problems, we carry out the process of searching ground states, where the temperature of the interacting system is controlled with decay during optical Metropolis Hasting sampling. Here, we consider the Max-Cut problem for undirected and unweighted graphs, which corresponds to dividing the vertices of a graph into two subsets such that the edges of both sets are maximized (1). The problem can be mapped to searching the ground state of the Ising Hamiltonian, where Jij = −1/2 when spin i and spin j are connected, and Jij = 0 otherwise and with the magnetic field hi = 0 for all the spins. With such a configuration, the Max-Cut problem is equivalent to maximizing , i.e., searching the ground state of the Ising Hamiltonian H.
To show the performance, we solve the Max-Cut problem for three graphs with N = 16 vertices, whose vertices are connected as the insets of Fig. 6 (A to C), respectively. We note that these three graphs were considered and computed by the coherent Ising machine with the successful probability of 100%, 58%, and 38% after 100 runs, respectively (1). Figure 6 (A to C) shows the successful probability of searching ground states with the wavelength-division multiplexing SPIM, where we also conduct 100 runs from random initial spins for each graph, and Fig. 6 (D to F) shows the evolution of the Hamiltonian for eight of 100 runs during annealing (the temperature with the dashed line). For the Möbius ladder graph in Fig. 6A, all the runs find the ground states within 600 iterations, with the successful probability of 100%. For the graph B and graph C, due to more complex energy landscape in comparison with graph A, Fig. 6 (B and C) shows the probability of finding ground state reduces to 99% and 92%, associated with measurement uncertainty, respectively. Even so, the high successful probability for all three graphs indicates that with the proposed gauge transformation, the wavelength-division multiplexing SPIM can provide precise programmability for spin coupling interactions and thus improves the stability and fidelity for ground-state search.
Fig. 6. Ground-state search for Max-Cut problem with wavelength-division multiplexing SPIM.
(A to C) Histograms of obtained solutions in 100 runs for three graphs with 16 vertices [the vertices are connected as (A), (B), and (C) in the insets, respectively]. (D to F) The evolution of the Hamiltonian (solid) for the eight of 100 annealing runs and the temperature (dashed) as the function of the iteration number for the graphs in (A) to (C), respectively.
DISCUSSION
We note that the time per step (TPS) in the present experimental configuration is about 10−2 s, mainly limited by the modulation speed of liquid-crystal SLM. With the development of a variety of cutting-edge SLMs capable of gigahertz modulation rate (62–64), the minimum TPS can scale down to 10−9 s, due to only single-pixel photodetector required in wavelength-division multiplexing SPIM.
In contrast to the digital MCMC simulation, the proposed simulation with the wavelength-division multiplexing SPIM is dominated by ultrafast optical computation. To evaluate the fraction of the total computation by the physical process of light, we analyze how many real-number operations are required to simulate the physical process of light by a digital computer (55, 37). For wavelength-division multiplexing SPIMs, the physical process of light consists of three parts: optical Hamiltonian computation, flipping spins, and intensity detection and comparison. For each inner iteration of Fig. 7, the process of optical Hamiltonian computation can be described by the digital computation of real-number multiplications N(N − 1)/2 and summation N(N − 1)/2, where N is the number of spins. We count each spin flipping as one real-number summation according to Eq. 4, and the total computation of flipping a spin takes at most N operations with the preset gauge transformation phase. The intensity detection includes one real-number summation and one real-number operation for comparison between the present and previous Hamiltonian. Consequently, for each iteration, the total number of real-number operations is N(N − 1) + N + 2 to simulate optical process. Therefore, the fraction of the total computation by the physical computing of Ising Hamiltonian is N(N − 1)/[N(N − 1) + N + 2]. For example, for N = 1000, the fraction of the total computation by the physical process of light is more than 99.9%. The ratio is even scaled up for a larger spin number N, which indicates that the Metropolis Hasting sampling procedure can be ultimately accelerated by wavelength-division multiplexing SPIM in particular for a large spin size.
Fig. 7. The optical Metropolis Hasting sampling procedure by the wavelength-division multiplexing optical Ising simulator.
The flow chart on the left briefly describes the sampling procedure, and the gray and green boxes represent the two loops, respectively. The right column corresponds to the detailed explanations.
Moreover, wavelength-division multiplexing SPIMs also have advantages with high energy efficiency in optical computation for large-scale spin size. Our system can efficiently scale spin numbers up by extending the SLM pixel number and the wavelength range. Therefore, we believe that the energy efficiency of wavelength-division multiplexing SPIM outperforms with respect to digital simulation growing with spin size, due to the optical acceleration.
In summary, we propose a general gauge transformation scheme and develop a wavelength-division multiplexing SPIM to realize fully programmable spin couplings and external magnetic fields. With the full-coupling ±J model, SK model, and the only locally connected J1-J2 model, we demonstrate the great programmable flexibility of spin couplings and external magnetic fields with the wavelength-division multiplexing SPIM. By simulating the equilibrium systems at different temperatures, we experimentally observe the phase transitions among the SG, the FM, the PM and the stripe-antiferromagnetic phases. We also demonstrate the ground-state search for the Max-Cut problem for three graphs with N = 16 vertices. With the wavelength-division multiplexing SPIM, the promising ultrafast-speed and high–power efficiency Boltzmann sampling is beneficial to searching for the true ground state of a generalized large-scale Ising model, which provides important potential applications in solving combinatorial optimization problems.
MATERIALS AND METHODS
Experimental setup
In Fig. 2, a supercontinuum laser (Anyang SC-5) is used to generate a collimated Gaussian beam. The waist radius of the light beam is enlarged tenfold by the lens L1 (50 mm in focal length) and L2 (500 mm in focal length). The light then illuminates a reflective diffraction grating (inscribed line density of 600/mm), and the cylindrical lens (100 mm in focal length) focus the light with different wavelengths onto a SLM along the x axis, while the y-axis pixels are illuminated coherently by the same wavelength. Polarizer P is used to make the incident beam linearly polarized along the long display axis of the SLM. L3 (100 mm in focal length) and L4 (300 mm in focal length) magnify threefold onto the SLM (Holoeye PLUTO-NIR-011). Lens FL (200 mm in focal length) performs a Fourier transformation of the optical field, resulting in an incoherent intensity summation of different wavelengths and coherent interference for each wavelength at the back focus plane. A sensor (Ophir SP620) is placed at the back focus plane to detect optical field intensity. Because of the finite size of SLM pixel and the resolution of sensor, we integrate the intensity within a region around the center point instead of measuring the intensity at a single point. The effective squared detection area A is defined as |ux|, |uy| < d/2, and the results are convergent and stable when d = 45 μm.
Optical Metropolis Hasting sampling procedure
Figure 7 schematically shows the optical Metropolis Hasting sampling procedure in detail. For each spin system about Figs. 3 to 5: ±J model, SK model, and only locally connected J1-J2 model, we first generate a quenched realization for the interactions Jij randomly assigned on the basis of their respective probability distributions. Then, 100 replicas with spin distributions are generated with the feedback procedure, by giving specific temperature T. As a result, we obtain a bunch of replicas at a given temperature and perform ensemble average of all the equilibrium states to calculate the order parameters by the definitions.
Acknowledgments
Funding: We acknowledge funding through the National Key Research and Development Program of China (2022YFA1405200) and the National Natural Science Foundation of China (12174340).
Author contributions: Z.R. initiated the idea and supervised this project. L.L., Z.M., and J.H. performed the experiments and numerical simulations. Z.R. and L.L. wrote the manuscript. All authors discussed the results and commented on the paper.
Competing interests: Z.R., L.L., Z.M., and J.H. are named inventors on two relevant patent applications of China, filed by Zhejiang University on 1 February 2023 (2023100402634 and 2023100402193). The authors declare that they have no other competing interests.
Data and materials availability: All data needed to evaluate the conclusions in the paper are present in the paper and/or the Supplementary Materials. The data and code for Max-Cut problem are available in Dryad (DOI: 10.5061/dryad.nvx0k6dzp) and GitHub repository (https://github.com/loli145/WDM-SPIM).
Supplementary Materials
This PDF file includes:
Sections S1 and S2
Fig. S1
REFERENCES AND NOTES
- 1.P. L. McMahon, A. Marandi, Y. Haribara, R. Hamerly, C. Langrock, S. Tamate, T. Inagaki, H. Takesue, S. Utsunomiya, K. Aihara, R. L. Byer, M. M. Fejer, H. Mabuchi, Y. Yamamoto, A fully programmable 100-spin coherent Ising machine with all-to-all connections. Science 354, 614–617 (2016). [DOI] [PubMed] [Google Scholar]
- 2.T. Inagaki, Y. Haribara, K. Igarashi, T. Sonobe, S. Tamate, T. Honjo, A. Marandi, P. L. McMahon, T. Umeki, K. Enbutsu, O. Tadanaga, H. Takenouchi, K. Aihara, K. I. Kawarabayashi, K. Inoue, S. Utsunomiya, H. Takesue, A coherent Ising machine for 2000-node optimization problems. Science 354, 603–606 (2016). [DOI] [PubMed] [Google Scholar]
- 3.T. Inagaki, K. Inaba, R. Hamerly, K. Inoue, Y. Yamamoto, H. Takesue, Large-scale Ising spin network based on degenerate optical parametric oscillators. Nat. Photonics 10, 415–419 (2016). [Google Scholar]
- 4.F. Böhm, G. Verschaffelt, G. Van der Sande, A poor man’s coherent Ising machine based on opto-electronic feedback systems for solving optimization problems. Nat. Commun. 10, 3538 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 5.A. Marandi, Z. Wang, K. Takata, R. L. Byer, Y. Yamamoto, Network of time-multiplexed optical parametric oscillators as a coherent Ising machine. Nat. Photonics 8, 937–942 (2014). [Google Scholar]
- 6.Q. Cen, H. Ding, T. Hao, S. Guan, Z. Qin, J. Lyu, W. Li, N. Zhu, K. Xu, Y. Dai, M. Li, Large-scale coherent Ising machine based on optoelectronic parametric oscillator. Light: Sci. Appl. 11, 333 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7.S. Utsunomiya, K. Takata, Y. Yamamoto, Mapping of Ising models onto injection-locked laser systems. Opt. Express 19, 18091–18108 (2011). [DOI] [PubMed] [Google Scholar]
- 8.M. Babaeian, D. T. Nguyen, V. Demir, M. Akbulut, P.-A. Blanche, Y. Kaneda, S. Guha, M. A. Neifeld, N. Peyghambarian, A single shot coherent Ising machine based on a network of injection-locked multicore fiber lasers. Nat. Commun. 10, 3516 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9.C. Tradonsky, I. Gershenzon, V. Pal, R. Chriki, A. A. Friesem, O. Raz, N. Davidson, Rapid laser solver for the phase retrieval problem. Sci. Adv. 5, eaax4530 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 10.M. Parto, W. Hayenga, A. Marandi, D. N. Christodoulides, M. Khajavikhan, Realizing spin Hamiltonians in nanoscale active photonic lattices. Nat. Mater. 19, 725–731 (2020). [DOI] [PubMed] [Google Scholar]
- 11.M. Honari-Latifpour, M.-A. Miri, Mapping the XY Hamiltonian onto a network of coupled lasers. Phys. Rev. Res. 2, 043335 (2020). [Google Scholar]
- 12.K. P. Kalinin, A. Amo, J. Bloch, N. G. Berloff, Polaritonic XY-Ising machine. Nanophotonics 9, 4127–4138 (2020). [Google Scholar]
- 13.N. G. Berloff, M. Silva, K. Kalinin, A. Askitopoulos, J. D. Töpfer, P. Cilibrizzi, W. Langbein, P. G. Lagoudakis, Realizing the classical XY Hamiltonian in polariton simulators. Nat. Mater. 16, 1120–1126 (2017). [DOI] [PubMed] [Google Scholar]
- 14.K. P. Kalinin, N. G. Berloff, Simulating Ising and n-state planar potts models and external fields with nonequilibrium condensates. Phys. Rev. Lett. 121, 235302 (2018). [DOI] [PubMed] [Google Scholar]
- 15.K. Kim, M.-S. Chang, S. Korenblit, R. Islam, E. E. Edwards, J. K. Freericks, G.-D. Lin, L.-M. Duan, C. Monroe, Quantum simulation of frustrated Ising spins with trapped ions. Nature 465, 590–593 (2010). [DOI] [PubMed] [Google Scholar]
- 16.J. Struck, M. Weinberg, C. Ölschläger, P. Windpassinger, J. Simonet, K. Sengstock, R. Höppner, P. Hauke, A. Eckardt, M. Lewenstein, L. Mathey, Engineering Ising-XY spin-models in a triangular lattice using tunable artificial gauge fields. Nat. Phys. 9, 738–743 (2013). [Google Scholar]
- 17.M. Vretenar, B. Kassenberg, S. Bissesar, C. Toebes, J. Klaers, Controllable Josephson junction for photon Bose-Einstein condensates. Phys. Rev. Res. 3, 023167 (2021). [Google Scholar]
- 18.F. Cai, S. Kumar, T. Van Vaerenbergh, X. Sheng, R. Liu, C. Li, Z. Liu, M. Foltin, S. Yu, Q. Xia, J. J. Yang, R. Beausoleil, W. D. Lu, J. P. Strachan, Power-efficient combinatorial optimization using intrinsic noise in memristor hopfield neural networks. Nat. Electron. 3, 409–418 (2020). [Google Scholar]
- 19.M. W. Johnson, M. H. S. Amin, S. Gildert, T. Lanting, F. Hamze, N. Dickson, R. Harris, A. J. Berkley, J. Johansson, P. Bunyk, E. M. Chapple, C. Enderud, J. P. Hilton, K. Karimi, E. Ladizinsky, N. Ladizinsky, T. Oh, I. Perminov, C. Rich, M. C. Thom, E. Tolkacheva, C. J. S. Truncik, S. Uchaikin, J. Wang, B. Wilson, G. Rose, Quantum annealing with manufactured spins. Nature 473, 194–198 (2011). [DOI] [PubMed] [Google Scholar]
- 20.S. Boixo, T. F. Rønnow, S. V. Isakov, Z. Wang, D. Wecker, D. A. Lidar, J. M. Martinis, M. Troyer, Evidence for quantum annealing with more than one hundred qubits. Nat. Phys. 10, 218–224 (2014). [Google Scholar]
- 21.A. D. King, J. Carrasquilla, J. Raymond, I. Ozfidan, E. Andriyash, A. Berkley, M. Reis, T. Lanting, R. Harris, F. Altomare, K. Boothby, P. I. Bunyk, C. Enderud, A. Fréchette, E. Hoskinson, N. Ladizinsky, T. Oh, G. Poulin-Lamarre, C. Rich, Y. Sato, A. Y. Smirnov, L. J. Swenson, M. H. Volkmann, J. Whittaker, J. Yao, E. Ladizinsky, M. W. Johnson, J. Hilton, M. H. Amin, Observation of topological phenomena in a programmable lattice of 1,800 qubits. Nature 560, 456–460 (2018). [DOI] [PubMed] [Google Scholar]
- 22.C. Roques-Carmes, Y. Shen, C. Zanoci, M. Prabhu, F. Atieh, L. Jing, T. Dub̌ek, C. Mao, M. R. Johnson, V. Čeperić, J. D. Joannopoulos, D. Englund, M. Soljǎić, Heuristic recurrent algorithms for photonic Ising machines. Nat. Commun. 11, 249 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23.M. Prabhu, C. Roques-Carmes, Y. Shen, N. Harris, L. Jing, J. Carolan, R. Hamerly, T. Baehr-Jones, M. Hochberg, V. Čeperić, J. D. Joannopoulos, D. R. Englund, M. Soljǎić, Accelerating recurrent Ising machines in photonic integrated circuits. Optica 7, 551–558 (2020). [Google Scholar]
- 24.Y. Shen, N. C. Harris, S. Skirlo, M. Prabhu, T. Baehr-Jones, M. Hochberg, X. Sun, S. Zhao, H. Larochelle, D. Englund, M. Soljǎić, Deep learning with coherent nanophotonic circuits. Nat. Photonics 11, 441–446 (2017). [Google Scholar]
- 25.K. Wu, J. G. De Abajo, C. Soci, P. P. Shum, N. I. Zheludev, An optical fiber network oracle for NP-complete problems. Light Sci. Appl. 3, e147 (2014). [Google Scholar]
- 26.Y. Okawachi, M. Yu, J. K. Jang, X. Ji, Y. Zhao, B. Y. Kim, M. Lipson, A. L. Gaeta, Demonstration of chip-based coupled degenerate optical parametric oscillators for realizing a nanophotonic spin-glass. Nat. Commun. 11, 4119 (2020). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 27.N. Mohseni, P. L. McMahon, T. Byrnes, Ising machines as hardware solvers of combinatorial optimization problems. Nat. Rev. Phys. 4, 363–379 (2022). [Google Scholar]
- 28.B. Heim, T. F. Rønnow, S. V. Isakov, M. Troyer, Quantum versus classical annealing of Ising spin glasses. Science 348, 215–217 (2015). [DOI] [PubMed] [Google Scholar]
- 29.R. Hamerly, T. Inagaki, P. L. McMahon, D. Venturelli, A. Marandi, T. Onodera, E. Ng, C. Langrock, K. Inaba, T. Honjo, K. Enbutsu, T. Umeki, R. Kasahara, S. Utsunomiya, S. Kako, K. I. Kawarabayashi, R. L. Byer, M. M. Fejer, H. Mabuchi, D. Englund, E. Rieffel, H. Takesue, Y. Yamamoto, Experimental investigation of performance differences between coherent Ising machines and a quantum annealer. Sci. Adv. 5, eaau0823 (2019). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 30.S. Kumar, H. Zhang, Y.-P. Huang, Large-scale Ising emulation with four body interaction and all-to-all connections. Commun. Phys. 3, 108 (2020). [Google Scholar]
- 31.D. Pierangeli, M. Rafayelyan, C. Conti, S. Gigan, Scalable spin-glass optical simulator. Phys. Rev. Appl. 15, 034087 (2021). [Google Scholar]
- 32.D. Pierangeli, G. Marcucci, C. Conti, Adiabatic evolution on a spatial-photonic Ising machine. Optica 7, 1535–1543 (2020). [Google Scholar]
- 33.D. Pierangeli, G. Marcucci, D. Brunner, C. Conti, Noise-enhanced spatial-photonic Ising machine. Nanophotonics 9, 4109–4116 (2020). [Google Scholar]
- 34.D. Pierangeli, G. Marcucci, C. Conti, Large-scale photonic Ising machine by spatial light modulation. Phys. Rev. Lett. 122, 213902 (2019). [DOI] [PubMed] [Google Scholar]
- 35.M. Leonetti, E. Hörmann, L. Leuzzi, G. Parisi, G. Ruocco, Optical computation of a spin glass dynamics with tunable complexity. Proc. Natl. Acad. Sci. 118, e2015207118 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 36.Y. Fang, J. Huang, Z. Ruan, Experimental observation of phase transitions in spatial photonic Ising machine. Phys. Rev. Lett. 127, 043902 (2021). [DOI] [PubMed] [Google Scholar]
- 37.J. Huang, Y. Fang, Z. Ruan, Antiferromagnetic spatial photonic Ising machine through optoelectronic correlation computing. Commun. Phys. 4, 242 (2021). [Google Scholar]
- 38.W. Sun, W. Zhang, Y. Liu, Q. Liu, Z. He, Quadrature photonic spatial Ising machine. Opt. Lett. 47, 1498–1501 (2022). [DOI] [PubMed] [Google Scholar]
- 39.G. Jacucci, L. Delloye, D. Pierangeli, M. Rafayelyan, C. Conti, S. Gigan, Tunable spin-glass optical simulator based on multiple light scattering. Phys. Rev. A. 105, 033502 (2022). [Google Scholar]
- 40.S. Kumar, Z. Li, T. Bu, C. Qu, Y. Huang, Observation of distinct phase transitions in a nonlinear optical Ising machine. Commun. Phys. 6, 31 (2023). [Google Scholar]
- 41.M. C. Strinati, D. Pierangeli, C. Conti, All-optical scalable spatial coherent Ising machine. Phys. Rev. Applied 16, 054022 (2021). [Google Scholar]
- 42.A. Prabhakar, P. Shah, U. Gautham, V. Natarajan, V. Ramesh, N. Chandrachoodan, S. Tayur, Optimization with photonic wave-based annealers. Philos. Trans. Royal Soc. A 381, 20210409 (2023). [DOI] [PubMed] [Google Scholar]
- 43.H. Yamashita, K.-i. Okubo, S. Shimomura, Y. Ogura, J. Tanida, H. Suzuki, Low-rank combinatorial optimization and statistical learning by spatial photonic ising machine. Phys. Rev. Lett. 131, 063801 (2023). [DOI] [PubMed] [Google Scholar]
- 44.A. Silva, F. Monticone, G. Castaldi, V. Galdi, A. Alù, N. Engheta, Performing mathematical operations with metamaterials. Science 343, 160–163 (2014). [DOI] [PubMed] [Google Scholar]
- 45.D. A. Bykov, L. L. Doskolovich, E. A. Bezus, V. A. Soifer, Optical computation of the Laplace operator using phase-shifted Bragg grating. Opt. Express 22, 25084–25092 (2014). [DOI] [PubMed] [Google Scholar]
- 46.Z. Ruan, Spatial mode control of surface plasmon polariton excitation with gain medium: From spatial differentiator to integrator. Opt. Lett. 40, 601–604 (2015). [DOI] [PubMed] [Google Scholar]
- 47.A. Youssefi, F. Zangeneh-Nejad, S. Abdollahramezani, A. Khavasi, Analog computing by Brewster effect. Opt. Lett. 41, 3467–3470 (2016). [DOI] [PubMed] [Google Scholar]
- 48.T. Zhu, Y. Zhou, Y. Lou, H. Ye, M. Qiu, Z. Ruan, S. Fan, Plasmonic computing of spatial differentiation. Nat. Commun. 8, 15391 (2017). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 49.W. Zhang, K. Cheng, C. Wu, Y. Wang, H. Li, X. Zhang, Implementing quantum search algorithm with metamaterials. Adv. Mater. 30, 1703986 (2018). [DOI] [PubMed] [Google Scholar]
- 50.C. Guo, M. Xiao, M. Minkov, Y. Shi, S. Fan, Photonic crystal slab Laplace operator for image differentiation. Optica 5, 251–256 (2018). [Google Scholar]
- 51.T. Zhu, Y. Lou, Y. Zhou, J. Zhang, J. Huang, Y. Li, H. Luo, S. Wen, S. Zhu, Q. Gong, M. Qiu, Z. Ruan, Generalized spatial differentiation from the spin hall effect of light and its application in image processing of edge detection. Phys. Rev. Appl. 11, 034043 (2019). [Google Scholar]
- 52.F. Zangeneh-Nejad, D. L. Sounas, A. Alù, R. Fleury, Analogue computing with metamaterials. Nat. Rev. Mater. 6, 207–225 (2021). [Google Scholar]
- 53.T. Zhu, J. Huang, Z. Ruan, Optical phase mining by adjustable spatial differentiator. Adv. Photonics 2, 016001 (2020). [Google Scholar]
- 54.T. Zhu, C. Guo, J. Huang, H. Wang, M. Orenstein, Z. Ruan, S. Fan, Topological optical differentiator. Nat Commun. 12, 680 (2021). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 55.T. Zhou, X. Lin, J. Wu, Y. Chen, H. Xie, Y. Li, J. Fan, H. Wu, L. Fang, Q. Dai, Large-scale neuromorphic optoelectronic computing with a reconfigurable diffractive processing unit. Nat. Photonics 15, 367–373 (2021). [Google Scholar]
- 56.D. Mattis, Solvable spin systems with random interactions. Phys. Lett. A 56, 421–422 (1976). [Google Scholar]
- 57.G. Genty, M. Surakka, J. Turunen, A. T. Friberg, Second-order coherence of supercontinuum light. Opt. Lett. 35, 3057–3059 (2010). [DOI] [PubMed] [Google Scholar]
- 58.H. Nishimori, Statistical Physics of Spin Glasses and Information Processing: An Introduction (No. 111, Clarendon Press, 2001). [Google Scholar]
- 59.N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, E. Teller, Equation of state calculations by fast computing machines. J. Chem. Phys. 21, 1087–1092 (1953). [Google Scholar]
- 60.S. Jin, A. Sen, W. Guo, A. W. Sandvik, Phase transitions in the frustrated Ising model on the square lattice. Phys. Rev. B 87, 144406 (2013). [Google Scholar]
- 61.K. H. Fischer, J. A. Hertz, Spin Glasses (No. 1, Cambridge Univ. Press, 1993). [Google Scholar]
- 62.I.-C. Benea-Chelmus, S. Mason, M. L. Meretska, D. L. Elder, D. Kazakov, A. Shams-Ansari, L. R. Dalton, F. Capasso, Gigahertz free-space electro-optic modulators based on mie resonances. Nat. Commun. 13, 3170 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
- 63.A. Smolyaninov, A. El Amili, F. Vallini, S. Pappert, Y. Fainman, Programmable plasmonic phase modulation of free-space wavefronts at gigahertz rates. Nat. Photonics 13, 431–435 (2019). [Google Scholar]
- 64.C. L. Panuski, I. Christen, M. Minkov, C. J. Brabec, S. Trajtenberg-Mills, A. D. Griffiths, J. J. McKendry, G. L. Leake, D. J. Coleman, C. Tran, A full degree-of-freedom spatiotemporal light modulator. Nat. Photonics 16, 834–842 (2022). [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Sections S1 and S2
Fig. S1







