This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Wavelength-division multiplexing optical Ising simulator enabling fully programmable spin couplings and external magnetic fields

Li Luo Interdisciplinary Center of Quantum Information, State Key Laboratory of Modern Optical Instrumentation, and Zhejiang Province Key Laboratory of Quantum Technology and Device, School of Physics, Zhejiang University, Hangzhou 310027, China    Zhiyi Mi Interdisciplinary Center of Quantum Information, State Key Laboratory of Modern Optical Instrumentation, and Zhejiang Province Key Laboratory of Quantum Technology and Device, School of Physics, Zhejiang University, Hangzhou 310027, China    Junyi Huang Interdisciplinary Center of Quantum Information, State Key Laboratory of Modern Optical Instrumentation, and Zhejiang Province Key Laboratory of Quantum Technology and Device, School of Physics, Zhejiang University, Hangzhou 310027, China    Zhichao Ruan [email protected] Interdisciplinary Center of Quantum Information, State Key Laboratory of Modern Optical Instrumentation, and Zhejiang Province Key Laboratory of Quantum Technology and Device, School of Physics, Zhejiang University, Hangzhou 310027, China
Abstract

Recently, spatial photonic Ising machines (SPIMs) have demonstrated the abilities to compute the Ising Hamiltonian of large-scale spin systems, with the advantages of ultrafast speed and high power efficiency. However, such optical computations have been limited to specific Ising models with fully connected couplings. Here we develop a wavelength-division multiplexing SPIM to enable programmable spin couplings and external magnetic fields as well for general Ising models. We experimentally demonstrate such a wavelength-division multiplexing SPIM with a single spatial light modulator, where the gauge transformation is implemented to eliminate the impact of pixel alignment. To show the programmable capability of general spin coupling interactions, we explore three spin systems: ±J\pm J models, Sherrington-Kirkpatrick models, and only locally connected J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} models and observe the phase transitions among the spin-glass, the ferromagnetic, the paramagnetic and the stripe-antiferromagnetic phases. These results show that the wavelength-division multiplexing approach has great programmable flexibility of spin couplings and external magnetic fields, which provides the opportunities to solve general combinatorial optimization problems with large-scale and on-demand SPIM.

Ising model is an archetypal model widely used for investigations of complex dynamics in physics, computer science, biology, and even social systems. Owing to 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, 2, 3, 4, 5], lasers [6, 7, 8, 9, 10], polariton [11, 12, 13], trapped ions [14], atomic and photonic condensates [15, 16], electronic memorisers [17], superconducting qubits [18, 19, 20], and nanophotonics circuits [21, 22, 23, 24, 25, 22]. Despite different approaches and technologies, it is worth noting that the error probability and time-to-solution metrics of these Ising machines have similar scaling trend as a function of the number of spins [26]. Practically, the difficulty to implement the spin coupling interactions with the proposed hardware has become the main factor limiting scalability and performance for unconventional Ising simulators [27, 28]. Also complete characterization of possible stable phases is necessary for estimating the Ising description and plays a key role to understand the working principle in spin systems [29, 30, 31, 32, 33].

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 with reliable large-scale Ising spin systems, even up to thousands of spins by exploring the spatial degrees of freedom [34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44]. Like other optical analog computations [45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55], the calculation of spin system energy is just by instantaneously measuring the light intensity, therefore with ultrafast speed and high power efficiency [38]. 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 [40]. However, the original proposed SPIM [38] is only applicable to Mattis-type coupling interactions [56]. Even with scattering medium, tunable SPIM was demonstrated based on multiple light scattering, while the Ising spin system is still limited to specific fully connected couplings [43]. Therefore, how to realize completely programmable spin couplings is a primary target to develop SPIMs for general Ising models.

Here we report a wavelength-division multiplexing SPIM to enable fully programmable spin couplings and external magnetic fields as well. Beyond Mattis-type interaction, we propose a gauge transformation for general Ising models with arbitrary spin interactions. More importantly, with wavelength-division multiplexing, we optically compute the general spin Hamiltonian with the advantages of large scale and ultrafast speed. We experimentally demonstrate such a wavelength-division multiplexing SPIM with a single SLM, where the gauge transformation is implemented to eliminate the impact of pixel alignment. To show the programmable capability of general spin coupling interactions, we explore three kinds of Ising models: fully connected ±J\pm J model, Sherrington-Kirkpatrick (SK) model, and only locally connected J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} model. For ±J\pm 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. We also demonstrate the phase transition from PM to stripe-antiferromagnetic phase in the J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} model with competing interactions and experimentally observe the presence of SG phase by increasing the stochasticity of the next-nearest-neighbor interactions. These results show the great programmable flexibility of spin couplings and external magnetic fields by the wavelength-division multiplexing SPIM, which provides important potential applications in solving combinatorial optimization problems.

Refer to caption

Figure 1: (a) Schematic of the wavelength-division multiplexing SPIM. In this setup, light with different wavelengths is diffracted and focus on a phase-only spatial light modulator (SLM) along the xx-direction, while the pixels in the yy-direction are coherently illuminated by incident light of the same wavelength. The spins are encoded with phase modulation on the SLM using Eq. (2). SC: super-continuum laser; CL: cylindrical lens; FL: Fourier lens; CCD: charge coupled device camera. (b) The Ising model with general interactions and external magnetic fields is transformed into NN numbers of Mattis models via gauge transformation, and H=k=1NHk+H0H=\sum_{k=1}^{N}{{{H}_{k}}}+{{H}_{0}}, where Hk=Ji,j=kN+1σikσjk{{H}_{k}}=-J\sum_{i,j=k}^{N+1}{\sigma_{i}^{\prime k}\sigma_{j}^{\prime k}} and JJ and H0{{H}_{0}} are constants. Here σjk\sigma_{j}^{\prime k} represents the zz component of spin σj\sigma_{j} rotated by an angle αjk{\alpha}_{j}^{k} with respect to the zz axis.

The wavelength-division multiplexing SPIM, designed for full programmability of spin interactions and magnetic fields, is shown in Fig. 1(a). The illumination components consist of a collimated super-continuum laser, a diffraction grating, and a cylindrical lens. The diffraction grating and cylindrical lens diffract light with different wavelengths onto a SLM along the xx-axis, while the yy-axis pixels are illuminated coherently by the same wavelength. By adjusting the diffraction angle, the operation wavelengths are selected within the quasi-stationary region of super-continuum light [57]. 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.

Next we show that the wavelength-division multiplexing SPIM can optically compute the Hamiltonian of any Ising model by detecting the intensity at the center position of the back focus plane. The Ising model is given by H=ijJijσiσjiNhiσiH=-\sum\limits_{i\neq j}{{J_{ij}}{\sigma_{i}}{\sigma_{j}}}-\sum\limits_{i}^{N}{{h_{i}}}{\sigma_{i}}, where Jij{J_{ij}} and hi{{h}_{i}} are the interaction strength and the external magnetic field strength for NN spins, respectively, and σi{{\sigma}_{i}} can take binary values +1+1 or 1-1. By adding an auxiliary spin with σN+1=1{{\sigma}_{N+1}}=1, we use a Cholesky-like decomposition to transform the Hamiltonian into multiple Mattis models Hk=i,j=kN+1Jκikκjkσiσj{{H}_{k}}=-\sum_{i,j=k}^{N+1}{J\kappa_{i}^{k}\kappa_{j}^{k}{{\sigma}_{i}}{{\sigma}_{j}}}, so that H=k=1NHk+H0H=\sum_{k=1}^{N}{{{H}_{k}}}+{{H}_{0}}. The interaction strength for the kk-th Mattis model is given by Jijk=JκikκjkJ_{ij}^{k}=J\kappa_{i}^{k}\kappa_{j}^{k}, where |κik|1\left|\kappa_{i}^{k}\right|\leq 1, JJ and H0{{H}_{0}} are constants with the unit of energy. The transformation is summarized in Sec. I of the Supplemental Material (SM), and we note that despite the transformation, the degrees of freedom of κik\kappa_{i}^{k} remain equal to N(N+1)/2N(N+1)/2, which is the summation of those of {Jij}\{J_{ij}\} and {hi}\{h_{i}\} for arbitrary interactions and magnetic fields.

Refer to caption

Figure 2: Probability distribution of the Parisi parameter q{{q}} as a function of TT, for N=80N=80 spins. (a) Schematic representation for the ±J\pm J model. (b) and (c) present the experimental results for p=0.7p=0.7 and 0.550.55, respectively. (d) Schematic for the SK model. (e) and (f) display the results for J0=40{{J}_{0}}=40 and 88, respectively, with ΔJ=80\Delta J=\sqrt{80} fixed. (g) Schematic for the SK model with a uniform external magnetic field. (h) and (i) present the results for h=0.2h=0.2 and 22, respectively, with J0{{J}_{0}} and ΔJ\Delta J being the same as (f).

Inspired by the encoding scheme for Mattis model [40, 41], here we propose a general one for arbitrary Ising models by a gauge transformation. This transformation allows to encode the spin configurations and program the interaction strengths on a single phase-only SLM, as shown in Fig. 1(b). The transformation rotates each original spin about the zz-axis by an angle αjk=arccosκjk{\alpha}_{j}^{k}=\arccos\kappa_{j}^{k} to arrive at a new spin vector, which is then projected onto the zz-axis to obtain the effective spin σjk=κjkσj\sigma_{j}^{\prime k}=\kappa_{j}^{k}\sigma_{j}. By the gauge transformation given as

σjσjk,JijkJ,\sigma_{j}\rightarrow\sigma_{j}^{\prime k},\quad J_{ij}^{k}\rightarrow J, (1)

the transformed Hamiltonian remains invariant, H=Jk=1Ni,j=kN+1σikσjk+H0H=-J\sum_{k=1}^{N}{\sum_{i,j=k}^{N+1}{\sigma_{i}^{{}^{\prime}k}\sigma_{j}^{{}^{\prime}k}}}+{H_{0}}, where the interactions of the transformed spins are uniform with a strength of JJ in both short and long ranges.

We encode the gauge-transformed spin configurations σjk\sigma_{j}^{{}^{\prime}k} on a single phase-only SLM with wavelength-division multiplexing. For the kk-th Mattis model, we assume a uniform spectrum intensity light illuminating on SLM and apply a phase modulation on the yy-directional pixels for each spin as

φjk=σjπ2+(1)jαjk.\varphi_{j}^{k}={{\sigma}_{j}}\frac{\pi}{2}+{{(-1)}^{j}}\alpha_{j}^{k}. (2)

We note that for each Mattis model, the phase modulation should account for the calibration of different wavelengths when encoding φjk\varphi_{j}^{k} in the xx direction on the SLM. The normalized intensity I~\tilde{I} at the center position of the back focus plane is the summation of the incoherent field intensities for light with different wavelengths, I~=k=1Ni,j=kN+1σikσjk\tilde{I}=\sum_{k=1}^{N}{\sum_{i,j=k}^{N+1}{\sigma_{i}^{{}^{\prime}k}\sigma_{j}^{{}^{\prime}k}}}. The Ising Hamiltonian for the general spin interactions is thus optically computed as H=JI~+H0H=-J\tilde{I}+{{H}_{0}}. The details of the gauge transformation and the encoding for general illumination cases are described in SM Sec. II.

To evaluate the performance of the wavelength-division multiplexing SPIM, we conduct an experiment (detailed experiment setup can be found in SM Sec.III) and simulate three well-studied spin systems: the ±J\pm J model [Fig. 2(a)], the SK model [Fig. 2(d)] and the SK model under external magnetic field [Fig. 2(g)]. The interactions between spins in the ±J\pm J model are either 11 with a probability of pp or 1-1 with a probability of 1p1-p. The probability distribution is given as P(Jij)=pδ(JijJ)+(1p)δ(Jij+J)P\left({{J}_{ij}}\right)=p\delta\left({{J}_{ij}}-J\right)+(1-p)\delta\left({{J}_{ij}}+J\right), where δ(x)\delta(x) is a Kronecker delta function equal to 1 for x=0x=0 and 0 for other cases. In the SK model, the probability distribution of Jij{{J}_{ij}} is Gaussian, with the distribution given as P(Jij)=𝒩(Jij;J0N,ΔJ2N)P\left({{J}_{ij}}\right)=\mathcal{N}({{J}_{ij}};\frac{{{J}_{0}}}{N},\frac{{{{\Delta J}}^{2}}}{N}), where J0{J}_{0} and ΔJ{\Delta J} are two constant parameters, such that the energy can be extensive and proportional to NN [32].

We use the wavelength-division multiplexing SPIM to examine the phase transition with 80 spins. For each model, a quenched realization is generated for the interactions Jij{{J}_{ij}} randomly assigned based on their respective probability distributions. By varying the temperature and utilizing the Markov chain Monte Carlo algorithm, we generate 100 replicas from the final configuration, where each replica is obtained by randomly initializing spin configurations and through 800 iterations of the optical Metropolis Hasting sampling procedure [40, 58, 39]. The spin overlap is then calculated as qαβ=1Ni=1Nσiασiβ{{q}_{\alpha\beta}}=\frac{1}{N}\sum_{i=1}^{N}{\sigma_{i}^{\alpha}}\sigma_{i}^{\beta}, which measures the similarity between replicas α\alpha and β\beta. The phase transition is characterized by the probability density function P(q)P({q}) of the overlap.

Figures 2(b) and (c) present the experimental results for the ±J\pm J model with the parameters p=0.7p=0.7 and 0.550.55, respectively. At high temperatures, both of the two parameters p=0.7p=0.7 and p=0.55p=0.55 result in randomly arranged spins and little correlation between replicas, indicating the PM phase, where P(q)P({{q}}) has a peak at around zero. At low temperatures, however, P(q)P({{q}}) displays the distinct density distributions for the two values of pp. For p=0.7p=0.7, since 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)P({{q}}) at low temperature has two peaks around 11 and 1-1 as shown in Fig. 2(b). On the other hand, for p=0.55p=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 multi-valley energy landscape and P(q)P({{q}}) takes on a wide range of values at low temperature, as depicted in Fig. 2(c). This feature of widely distributed q{{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. Fig. 2(e) and (f) show the results for J0=40{{J}_{0}}=40 and 88, respectively, with ΔJ=80\Delta J=\sqrt{80}. At high temperatures, both figures show the PM phase with P(q)P({{q}}) dominated around zero, due to the randomly arranged spin configurations. However, as shown in Figs.  2(e) and (f), P(q)P({{q}}) at low temperatures exhibit the FM and SG phases for the different values of J0{{J}_{0}} and occur around Tc=J0T_{c}={{J}_{0}} and Tc=ΔJT_{c}=\Delta J, respectively. The experiment results are consistent with the mean-field theory [32] with the critical temperatures for the PM-FM transition and for the PM-SG transition.

Additionally, we also investigate the stability of the complex multi-valley energy landscape of the SG phase in the presence of a uniform external magnetic field in the SK model [Fig. 2(g)]. As shown in Fig. 2(h), for the SK model with J0=8{{J}_{0}}=8 and ΔJ=80\Delta J=\sqrt{80}, a weak magnetic field with h=0.2h=0.2 aligns spins with the field direction even at high temperature, causing most q{{q}} values to cluster around positive values. Upon decreasing the temperature, the probability distribution of q{{q}} resembles that of the SG phase covering a wide range, indicating that weak magnetic fields are not strong enough to completely alter the multi-valley energy landscape. However, when subjected to a stronger magnetic field with h=2h=2 [Fig. 2(i)], at low temperatures q{{q}} are more clustered, which suggests that the magnetic field flattens out some valleys in the energy landscape.

The wavelength-division multiplexing SPIM can be utilized to study Ising systems beyond the full-coupling models. To demonstrate its full programmability of spin couplings, we examine a locally connected J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} model [Fig.3(a)]. The Hamiltonian only includes nearest-neighbor ferromagnetic and next-nearest-neighbor antiferromagnetic interactions on a square lattice with cyclic boundary conditions: H=J1ijσiσjJ2ijσiσjH=-{{J}_{1}}\sum\limits_{\langle ij\rangle}{{{\sigma}_{i}}}{{\sigma}_{j}}-{{J}_{2}}\sum\limits_{\langle\langle ij\rangle\rangle}{{{\sigma}_{i}}}{{\sigma}_{j}}, where \langle\rangle and \langle\langle\rangle\rangle denote the nearest and next-nearest neighbors, respectively. The nearest-neighbor ferromagnetic interactions align adjacent spins with J1>0J_{1}>0 (represented by solid lines in Fig.3(a)), while the next-nearest-neighbor antiferromagnetic interactions drive two adjacent rows and columns to have opposite orientations with J2<0J_{2}<0 (represented by double parallel lines). When the antiferromagnetic interaction J2J_{2} is strong enough to overcome the ferromagnetic interaction J1J_{1}, a striped phase is produced, characterized by a two-component order parameter (mx,my)(m_{x},m_{y}), where mx=1Ni=1Nσi(1)xim_{x}=\frac{1}{N}\sum_{i=1}^{N}\sigma_{i}(-1)^{x_{i}}, and my=1Ni=1Nσi(1)yi{{m}_{y}}=\frac{1}{N}\sum_{i=1}^{N}{{{\sigma}_{i}}}{{(-1)}^{{{y}_{i}}}}, and (xi,yi)(x_{i},y_{i}) are the coordinates of spin σi\sigma_{i}. The ground states of the J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} model are 4{{\mathbb{Z}}_{4}} ordered when |J2|/J1>1/2|J_{2}|/J_{1}>1/2, and can be represented by the order parameters of (mx,my)=(±1,0)(m_{x},m_{y})=(\pm 1,0) and (mx,my)=(0,±1)(m_{x},m_{y})=(0,\pm 1), corresponding to two longitudinal and transverse striped states with opposite spin directions, respectively [59].

Refer to caption

Figure 3: Experimental results for a locally connected J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} model with cyclic boundary condition. (a) A schematic of the J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} model, where the thick solid line indicates the nearest neighbor ferromagnetic interaction (J1>0{{J}_{1}}>0) and the blue double line represents the next-nearest-neighbor antiferromagnetic interaction (J2<0{{J}_{2}}<0). Blue and yellow squares denote spins σi=1{\sigma}_{i}=-1 and 11, respectively, and the experiment was conducted on an 8×88\times 8 lattice. (b) Results for the order parameter (mx,my)(m_{x},m_{y}) as a function of TT, for the parameters J1=0.2{{J}_{1}}=0.2 and J2=1{{J}_{2}}=-1. (c) A spin configuration sampled at T=70J1T=70J_{1} representing a PM state. (d-g) Four spin configurations sampled at T=14.39J1T=14.39J_{1} 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. Fig. 3(b) shows the simulation results for the parameters J1=0.2{{J}_{1}}=0.2 and J2=1{{J}_{2}}=-1 on an 8×88\times 8 lattice. Above the critical temperature of Tc=20J1T_{c}=20J_{1}, the order parameters (mx,my)(m_{x},m_{y}) 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. 3(c). However, below TcT_{c}, the order parameters split into four clusters located in different quadrants, corresponding to the four striped states [Fig. 3(b)]. Figs. 3(d-g) show four samples of the spin configurations, which exhibit a long stripe spatial distribution. These results for the J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} model demonstrate the programmability of spin couplings.

The J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} model plays a crucial role in comprehending the low-temperature phase of short-range spin glass. With the help of the wavelength-division multiplexing SPIM, we consider the next-nearest-neighbor interactions are Gaussian as P(J2)=𝒩(J2;J0,ΔJ2)P\left({{J}_{2}}\right)=\mathcal{N}({{J}_{2}};{{J}_{0}},{\Delta J}^{2}) with a mean value of J0=1{{J}_{0}}=-1 and a standard deviation ΔJ\Delta J, while maintaining a fixed value of nearest-neighbor interactions J1=1{{J}_{1}}=1. For small variances of ΔJ=0.2\Delta J=0.2 [Fig. 4(a)], the density distribution of q{{q}} exhibits a single peak at high temperatures, signifying the PM phase. However, as the temperature decreases, P(q)P({{q}}) transforms into three clusters of peaks, indicative of the 4{{\mathbb{Z}}_{4}} ordered striped ground states. The peak around q=0{{q}}=0 is twice as high as those around q=±1{{q}}=\pm 1. In contrast, by increasing the standard deviation to ΔJ=2\Delta J=2, the increased disorder in the next-nearest-neighbor interactions results in a 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)P({{q}}) as Fig.4(b).

Refer to caption

Figure 4: (a) and (b) Probability density distribution of q{{q}} for the J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} models with the fixed nearest neighbor interactions J1=1{{J}_{1}}=1, while the next-nearest-neighbor interactions are Gaussian distributed with the mean value of J0=1{{J}_{0}}=-1 and the standard deviation of ΔJ=0.2\Delta J=0.2 and 22, respectively. (c) Experimental measured susceptibility for ΔJ=0.2\Delta J=0.2 and ΔJ=2\Delta J=2.

We also experimentally measure the susceptibility χ=1Ni=1N1mi2T\chi=\frac{1}{N}\sum_{i=1}^{N}{\frac{{1-m_{i}^{2}}}{T}}[60] to investigate the transition temperature in the J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} model, where mi{{m}_{i}} represents the time ensemble average of σi{{\sigma}_{i}}. At high temperatures, thermodynamic fluctuations cause the spin orientation to constantly change, resulting in mi{{m}_{i}} being close to zero, as shown in Fig. 4(c). The susceptibility in both two cases decreases with increasing temperature and scales with 1T\frac{1}{T}. The results also indicate that the critical temperatures are different, with Tc=14J1{{T}_{c}}=14{{J}_{1}} and Tc=10J1{{T}_{c}}=10{{J}_{1}} for ΔJ=0.2\Delta J=0.2 and ΔJ=2\Delta J=2, respectively. In the case of ΔJ=0.2\Delta J=0.2, the interactions of the next-nearest-neighbors are relatively small and close to 1-1. As the temperature decreases below Tc{{T}_{c}}, the system reaches the striped ground states with mi{{m}_{i}} approaching ±1\pm 1, causing the average susceptibility χ\chi to converge to zero. In contrast, for ΔJ=2\Delta J=2, at low temperatures, the local spin orientation still varies slowly due to the presence of numerous ground states in the SG phase, resulting in χ\chi being close to a non-zero constant. These experimental results clearly demonstrate the spin-glass phase transition in the J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} model with short-range interactions.

In summary, we propose the wavelength-division multiplexing SPIM to realize fully programmable spin couplings and external magnetic fields. With the full-coupling ±J\pm J models, SK models and the only locally connected J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} models, 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 spin-glass, the ferromagnetic, the paramagnetic and the stripe-antiferromagnetic phases with the wavelength-division multiplexing SPIM. The exhibited rich phase diagrams are beneficial to searching for the true ground state of the Ising model, and thus the wavelength-division multiplexing approach provides important potential applications in solving combinatorial optimization problems.

The authors acknowledge funding through the National Key Research and Development Program of China (2022YFA1405200) and the National Natural Science Foundation of China (12174340).

References

  • McMahon et al. [2016] P. L. McMahon, A. Marandi, Y. Haribara, R. Hamerly, C. Langrock, S. Tamate, T. Inagaki, H. Takesue, S. Utsunomiya, K. Aihara, et al., A fully programmable 100-spin coherent Ising machine with all-to-all connections, Science 354, 614 (2016).
  • Inagaki et al. [2016a] T. Inagaki, Y. Haribara, K. Igarashi, T. Sonobe, S. Tamate, T. Honjo, A. Marandi, P. L. McMahon, T. Umeki, K. Enbutsu, et al., A coherent Ising machine for 2000-node optimization problems, Science 354, 603 (2016a).
  • Inagaki et al. [2016b] T. Inagaki, K. Inaba, R. Hamerly, K. Inoue, Y. Yamamoto, and H. Takesue, Large-scale Ising spin network based on degenerate optical parametric oscillators, Nature Photonics 10, 415 (2016b).
  • Böhm et al. [2019] F. Böhm, G. Verschaffelt, and G. Van der Sande, A poor man’s coherent Ising machine based on opto-electronic feedback systems for solving optimization problems, Nature Communications 10, 1 (2019).
  • Marandi et al. [2014] A. Marandi, Z. Wang, K. Takata, R. L. Byer, and Y. Yamamoto, Network of time-multiplexed optical parametric oscillators as a coherent Ising machine, Nature Photonics 8, 937 (2014).
  • Utsunomiya et al. [2011] S. Utsunomiya, K. Takata, and Y. Yamamoto, Mapping of Ising models onto injection-locked laser systems, Optics Express 19, 18091 (2011).
  • Babaeian et al. [2019] M. Babaeian, D. T. Nguyen, V. Demir, M. Akbulut, P.-A. Blanche, Y. Kaneda, S. Guha, M. A. Neifeld, and N. Peyghambarian, A single shot coherent Ising machine based on a network of injection-locked multicore fiber lasers, Nature Communications 10, 1 (2019).
  • Tradonsky et al. [2019] C. Tradonsky, I. Gershenzon, V. Pal, R. Chriki, A. A. Friesem, O. Raz, and N. Davidson, Rapid laser solver for the phase retrieval problem, Science Advances 5, eaax4530 (2019).
  • Parto et al. [2020] M. Parto, W. Hayenga, A. Marandi, D. N. Christodoulides, and M. Khajavikhan, Realizing spin Hamiltonians in nanoscale active photonic lattices, Nature Materials 19, 725 (2020).
  • Honari-Latifpour and Miri [2020] M. Honari-Latifpour and M.-A. Miri, Mapping the XY Hamiltonian onto a network of coupled lasers, Physical Review Research 2, 043335 (2020).
  • Kalinin et al. [2020] K. P. Kalinin, A. Amo, J. Bloch, and N. G. Berloff, Polaritonic XY-Ising machine, Nanophotonics 9, 4127 (2020).
  • Berloff et al. [2017] N. G. Berloff, M. Silva, K. Kalinin, A. Askitopoulos, J. D. Töpfer, P. Cilibrizzi, W. Langbein, and P. G. Lagoudakis, Realizing the classical XY Hamiltonian in polariton simulators, Nature Materials 16, 1120 (2017).
  • Kalinin and Berloff [2018] K. P. Kalinin and N. G. Berloff, Simulating Ising and n-state planar potts models and external fields with nonequilibrium condensates, Physical Review Letters 121, 235302 (2018).
  • Kim et al. [2010] K. Kim, M.-S. Chang, S. Korenblit, R. Islam, E. E. Edwards, J. K. Freericks, G.-D. Lin, L.-M. Duan, and C. Monroe, Quantum simulation of frustrated Ising spins with trapped ions, Nature 465, 590 (2010).
  • Struck et al. [2013] J. Struck, M. Weinberg, C. Ölschläger, P. Windpassinger, J. Simonet, K. Sengstock, R. Höppner, P. Hauke, A. Eckardt, M. Lewenstein, et al., Engineering Ising-XY spin-models in a triangular lattice using tunable artificial gauge fields, Nature Physics 9, 738 (2013).
  • Kassenberg et al. [2020] B. Kassenberg, M. Vretenar, S. Bissesar, and J. Klaers, Controllable Josephson junction for photon Bose–Einstein condensates, arXiv preprint arXiv:2001.09828  (2020).
  • Cai et al. [2020] 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, and J. P. Strachan, Power-efficient combinatorial optimization using intrinsic noise in memristor hopfield neural networks, Nature Electronics 3, 409 (2020).
  • Johnson et al. [2011] M. W. Johnson, M. H. S. Amin, S. Gildert, T. Lanting, F. Hamze, N. Dickson, R. Harris, A. J. Berkley, J. Johansson, P. Bunyk, et al., Quantum annealing with manufactured spins, Nature 473, 194 (2011).
  • Boixo et al. [2014] S. Boixo, T. F. Rønnow, S. V. Isakov, Z. Wang, D. Wecker, D. A. Lidar, J. M. Martinis, and M. Troyer, Evidence for quantum annealing with more than one hundred qubits, Nature Physics 10, 218 (2014).
  • King et al. [2018] A. D. King, J. Carrasquilla, J. Raymond, I. Ozfidan, E. Andriyash, A. Berkley, M. Reis, T. Lanting, R. Harris, F. Altomare, et al., Observation of topological phenomena in a programmable lattice of 1,800 qubits, Nature 560, 456 (2018).
  • Roques-Carmes et al. [2020] C. Roques-Carmes, Y. Shen, C. Zanoci, M. Prabhu, F. Atieh, L. Jing, T. Dubček, C. Mao, M. R. Johnson, V. Čeperić, et al., Heuristic recurrent algorithms for photonic Ising machines, Nature Communications 11 (2020).
  • Prabhu et al. [2020] M. Prabhu, C. Roques-Carmes, Y. Shen, N. Harris, L. Jing, J. Carolan, R. Hamerly, T. Baehr-Jones, M. Hochberg, V. Čeperić, et al., Accelerating recurrent Ising machines in photonic integrated circuits, Optica 7, 551 (2020).
  • Shen et al. [2017] Y. Shen, N. C. Harris, S. Skirlo, M. Prabhu, T. Baehr-Jones, M. Hochberg, X. Sun, S. Zhao, H. Larochelle, D. Englund, et al., Deep learning with coherent nanophotonic circuits, Nature Photonics 11, 441 (2017).
  • Wu et al. [2014] K. Wu, J. G. De Abajo, C. Soci, P. P. Shum, and N. I. Zheludev, An optical fiber network oracle for NP-complete problems, Light: Science & Applications 3, e147 (2014).
  • Okawachi et al. [2020] Y. Okawachi, M. Yu, J. K. Jang, X. Ji, Y. Zhao, B. Y. Kim, M. Lipson, and A. L. Gaeta, Demonstration of chip-based coupled degenerate optical parametric oscillators for realizing a nanophotonic spin-glass, Nature Communications 11, 1 (2020).
  • Mohseni et al. [2022] N. Mohseni, P. L. McMahon, and T. Byrnes, Ising machines as hardware solvers of combinatorial optimization problems, Nature Reviews Physics 4, 363 (2022).
  • Heim et al. [2015] B. Heim, T. F. Rønnow, S. V. Isakov, and M. Troyer, Quantum versus classical annealing of ising spin glasses, Science 348, 215 (2015).
  • Hamerly et al. [2019] R. Hamerly, T. Inagaki, P. L. McMahon, D. Venturelli, A. Marandi, T. Onodera, E. Ng, C. Langrock, K. Inaba, T. Honjo, et al., Experimental investigation of performance differences between coherent Ising machines and a quantum annealer, Science Advances 5, eaau0823 (2019).
  • Mertens [1998] S. Mertens, Phase transition in the number partitioning problem, Physical Review Letters 81, 4281 (1998).
  • Wang et al. [2013] Z. Wang, A. Marandi, K. Wen, R. L. Byer, and Y. Yamamoto, Coherent Ising machine based on degenerate optical parametric oscillators, Physical Review A 88, 063853 (2013).
  • Calvanese Strinati et al. [2019] M. Calvanese Strinati, L. Bello, A. Pe’er, and E. G. Dalla Torre, Theory of coupled parametric oscillators beyond coupled Ising spins, Physical Review A 100, 023835 (2019).
  • Nishimori [2001] H. Nishimori, Statistical physics of spin glasses and information processing: an introduction, 111 (Clarendon Press, 2001).
  • Inaba et al. [2023] K. Inaba, Y. Yamada, and H. Takesue, Thermodynamic quantities of two-dimensional ising models obtained by noisy mean field annealing and coherent ising machine, arXiv preprint arXiv:2302.01454  (2023).
  • Kumar et al. [2020] S. Kumar, H. Zhang, and Y.-P. Huang, Large-scale Ising emulation with four body interaction and all-to-all connections, Communications Physics 3, 1 (2020).
  • Pierangeli et al. [2021] D. Pierangeli, M. Rafayelyan, C. Conti, and S. Gigan, Scalable spin-glass optical simulator, Physical Review Applied 15, 034087 (2021).
  • Pierangeli et al. [2020a] D. Pierangeli, G. Marcucci, and C. Conti, Adiabatic evolution on a spatial-photonic Ising machine, Optica 7, 1535 (2020a).
  • Pierangeli et al. [2020b] D. Pierangeli, G. Marcucci, D. Brunner, and C. Conti, Noise-enhanced spatial-photonic Ising machine, Nanophotonics 9, 4109 (2020b).
  • Pierangeli et al. [2019] D. Pierangeli, G. Marcucci, and C. Conti, Large-scale photonic Ising machine by spatial light modulation, Physical Review Letters 122, 213902 (2019).
  • Leonetti et al. [2021] M. Leonetti, E. Hörmann, L. Leuzzi, G. Parisi, and G. Ruocco, Optical computation of a spin glass dynamics with tunable complexity, Proceedings of the National Academy of Sciences 118, e2015207118 (2021).
  • Fang et al. [2021] Y. Fang, J. Huang, and Z. Ruan, Experimental observation of phase transitions in spatial photonic ising machine, Physical Review Letters 127, 043902 (2021).
  • Huang et al. [2021] J. Huang, Y. Fang, and Z. Ruan, Antiferromagnetic spatial photonic ising machine through optoelectronic correlation computing, Communications Physics 4, 1 (2021).
  • Sun et al. [2022] W. Sun, W. Zhang, Y. Liu, Q. Liu, and Z. He, Quadrature photonic spatial ising machine, Optics Letters 47, 1498 (2022).
  • Jacucci et al. [2022] G. Jacucci, L. Delloye, D. Pierangeli, M. Rafayelyan, C. Conti, and S. Gigan, Tunable spin-glass optical simulator based on multiple light scattering, Physical Review A 105, 033502 (2022).
  • Kumar et al. [2023] S. Kumar, Z. Li, T. Bu, C. Qu, and Y. Huang, Observation of distinct phase transitions in a nonlinear optical ising machine, Communications Physics 6, 31 (2023).
  • Silva et al. [2014] A. Silva, F. Monticone, G. Castaldi, V. Galdi, A. Alù, and N. Engheta, Performing mathematical operations with metamaterials, Science 343, 160 (2014).
  • Bykov et al. [2014] D. A. Bykov, L. L. Doskolovich, E. A. Bezus, and V. A. Soifer, Optical computation of the laplace operator using phase-shifted bragg grating, Optics Express 22, 25084 (2014).
  • Ruan [2015] Z. Ruan, Spatial mode control of surface plasmon polariton excitation with gain medium: from spatial differentiator to integrator, Optics Letters 40, 601 (2015).
  • Youssefi et al. [2016] A. Youssefi, F. Zangeneh-Nejad, S. Abdollahramezani, and A. Khavasi, Analog computing by brewster effect, Optics Letters 41, 3467 (2016).
  • Zhu et al. [2017] T. Zhu, Y. Zhou, Y. Lou, H. Ye, M. Qiu, Z. Ruan, and S. Fan, Plasmonic computing of spatial differentiation, Nature Communications 8, 1 (2017).
  • Zhang et al. [2018] W. Zhang, K. Cheng, C. Wu, Y. Wang, H. Li, and X. Zhang, Implementing quantum search algorithm with metamaterials, Advanced Materials 30, 1703986 (2018).
  • Guo et al. [2018] C. Guo, M. Xiao, M. Minkov, Y. Shi, and S. Fan, Photonic crystal slab laplace operator for image differentiation, Optica 5, 251 (2018).
  • Zhu et al. [2019] T. Zhu, Y. Lou, Y. Zhou, J. Zhang, J. Huang, Y. Li, H. Luo, S. Wen, S. Zhu, Q. Gong, et al., Generalized spatial differentiation from the spin hall effect of light and its application in image processing of edge detection, Physical Review Applied 11, 034043 (2019).
  • Zangeneh-Nejad et al. [2020] F. Zangeneh-Nejad, D. L. Sounas, A. Alù, and R. Fleury, Analogue computing with metamaterials, Nature Reviews Materials 6, 207 (2020).
  • Zhu et al. [2020] T. Zhu, J. Huang, and Z. Ruan, Optical phase mining by adjustable spatial differentiator, Advanced Photonics 2, 016001 (2020).
  • Zhu et al. [2021] T. Zhu, C. Guo, J. Huang, H. Wang, M. Orenstein, Z. Ruan, and S. Fan, Topological optical differentiator, Nature Communications 12, 680 (2021).
  • Mattis [1976] D. Mattis, Solvable spin systems with random interactions, Physics Letters A 56, 421 (1976).
  • Genty et al. [2010] G. Genty, M. Surakka, J. Turunen, and A. T. Friberg, Second-order coherence of supercontinuum light, Optics letters 35, 3057 (2010).
  • Metropolis et al. [1953] N. Metropolis, A. W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, and E. Teller, Equation of state calculations by fast computing machines, The journal of chemical physics 21, 1087 (1953).
  • Jin et al. [2013] S. Jin, A. Sen, W. Guo, and A. W. Sandvik, Phase transitions in the frustrated ising model on the square lattice, Physical Review B 87, 144406 (2013).
  • Fischer and Hertz [1993] K. H. Fischer and J. A. Hertz, Spin glasses, 1 (Cambridge university press, 1993).

Supplementary Material: Wavelength-division multiplexing optical Ising simulator enabling fully programmable spin couplings and external magnetic fields

Li Luo, Zhiyi Mi, Junyi Huang, and Zhichao Ruan

Interdisciplinary Center of Quantum Information,
State Key Laboratory of Modern Optical Instrumentation,
and Zhejiang Province Key Laboratory of Quantum Technology and Device,
Department of Physics, Zhejiang University, Hangzhou 310027, China

I Decomposition of general Ising Hamiltonian into multiple Mattis-type models

We first consider the Hamiltonian of Ising model without external magnetic field as H=ijNJijσiσjH=-\sum\limits_{i\neq j}^{N}{{{J}_{ij}}{{\sigma}_{i}}}{{\sigma}_{j}}, and NN is the number of spins. To facilitate decomposition of the interaction matrix 𝑱\bm{J}, we introduce auxiliary positive diagonal elements Jii{{J}_{ii}}, and propose a Cholesky-like algorithm (Algorithm 1). This algorithm expresses 𝑱\bm{J} as

[Jij]=ξ1×(ξ1)T+ξ2×(ξ2)T+ξ3×(ξ3)T++ξN×(ξN)T[{{J}_{ij}}]={{\mathbf{\xi}}^{1}}\times{{\mathbf{(}{{\mathbf{\xi}}^{1}}\mathbf{)}}^{T}}+{{\mathbf{\xi}}^{2}}\times{{\mathbf{(}{{\mathbf{\xi}}^{2}}\mathbf{)}}^{T}}+{{\mathbf{\xi}}^{3}}\times{{\mathbf{(}{{\mathbf{\xi}}^{3}}\mathbf{)}}^{T}}+\cdots+{{\mathbf{\xi}}^{N}}\times{{\mathbf{(}{{\mathbf{\xi}}^{N}}\mathbf{)}}^{T}} (S1)

where ξ1=(ξ11ξ21ξ31ξN1){{\mathbf{\xi}}^{1}}=\left(\begin{matrix}\xi_{1}^{1}\\ \xi_{2}^{1}\\ \xi_{3}^{1}\\ \vdots\\ \xi_{N}^{1}\\ \end{matrix}\right), ξ2=(0ξ22ξ32ξN2){{\mathbf{\xi}}^{2}}=\left(\begin{matrix}0\\ \xi_{2}^{2}\\ \xi_{3}^{2}\\ \vdots\\ \xi_{N}^{2}\\ \end{matrix}\right), ξ3=(00ξ33ξN3){{\mathbf{\xi}}^{3}}=\left(\begin{matrix}0\\ 0\\ \xi_{3}^{3}\\ \vdots\\ \xi_{N}^{3}\\ \end{matrix}\right), \cdots, ξN=(000ξNN){{\mathbf{\xi}}^{N}}=\left(\begin{matrix}0\\ 0\\ 0\\ \vdots\\ \xi_{N}^{N}\\ \end{matrix}\right). We note that the auxiliary diagonal elements Jii{{J}_{ii}} correspond to the self-interaction of spins, and only shift the energy value, without affecting the spin configurations of the ground state.

Input: Number of spins NN, Interaction matrix 𝑱={Jij}\bm{J}=\{J_{ij}\}.
Output: Lower triangular matrix 𝝃\bm{\xi}, which satisfies Jjk=i=1NξkiξkiJ_{jk}=\sum_{i=1}^{N}\xi_{k}^{i}\xi_{k}^{i} when jkj\neq k.
Define 𝝃=(ξ11ξ12ξ1Nξ21ξ22ξ2NξN1ξN2ξNN)N×N=(000000000)N×N\bm{\xi}=\begin{pmatrix}\xi_{1}^{1}&\xi_{1}^{2}&\cdots&\xi_{1}^{N}\\ \xi_{2}^{1}&\xi_{2}^{2}&\cdots&\xi_{2}^{N}\\ \vdots&\vdots&\ddots&\vdots\\ \xi_{N}^{1}&\xi_{N}^{2}&\cdots&\xi_{N}^{N}\end{pmatrix}_{N\times N}=\begin{pmatrix}0&0&\cdots&0\\ 0&0&\cdots&0\\ \vdots&\vdots&\ddots&\vdots\\ 0&0&\cdots&0\end{pmatrix}_{N\times N}, 𝑱now=𝑱\bm{J}^{now}=\bm{J};
for i=1i=1 to NN do
       ξii=Jiinow\xi^{i}_{i}=\sqrt{J_{ii}^{now}};
      
      for j=i+1j=i+1 to NN do
             ξji=𝑱jinowξii\xi_{j}^{i}=\frac{\bm{J}^{now}_{ji}}{\xi^{i}_{i}};
            
       end for
      𝑱now=𝑱now𝝃i×(𝝃i)T\bm{J}^{now}=\bm{J}^{now}-\bm{\xi}^{i}\times(\bm{\xi}^{i})^{T};
      
end for
Algorithm 1 Cholesky-like decomposition

We now consider the Ising model with an external magnetic field, given by the Hamiltonian H=ijNJijσiσjiNhiσiH=-\sum\limits_{i\neq j}^{N}{{{J}_{ij}}{{\sigma}_{i}}}{{\sigma}_{j}}-\sum\limits_{i}^{N}{{{h}_{i}}}{{\sigma}_{i}}. To develop a Cholesky-like algorithm for this model, we add auxiliary elements θk{{\theta}^{k}} to each vector κ1=(ξ11ξ21ξ31ξN1θ1){\kappa^{1}}=\left({\begin{array}[]{*{20}{c}}{\xi_{1}^{1}}\\ {\xi_{2}^{1}}\\ {\xi_{3}^{1}}\\ \vdots\\ \begin{array}[]{l}\xi_{N}^{1}\\ {\theta^{1}}\end{array}\end{array}}\right), κ2=(0ξ22ξ32ξN2θ2){\kappa^{2}}=\left({\begin{array}[]{*{20}{c}}0\\ {\xi_{2}^{2}}\\ {\xi_{3}^{2}}\\ \vdots\\ \begin{array}[]{l}\xi_{N}^{2}\\ {\theta^{2}}\end{array}\end{array}}\right), κ3=(00ξ33ξN3θ3){\kappa^{3}}=\left({\begin{array}[]{*{20}{c}}0\\ 0\\ {\xi_{3}^{3}}\\ \vdots\\ \begin{array}[]{l}\xi_{N}^{3}\\ {\theta^{3}}\end{array}\end{array}}\right), \cdots, κN=(000ξNNθN){\kappa^{N}}=\left({\begin{array}[]{*{20}{c}}0\\ 0\\ 0\\ \vdots\\ \begin{array}[]{l}\xi_{N}^{N}\\ {\theta^{N}}\end{array}\end{array}}\right). The values of θk{{\theta}^{k}} are derived using Algorithm 2.

We further normalize each vector κk{{\kappa}^{k}} by dividing it by J\sqrt{J}, where J=max{|κjk|2}{{J}}=\max\{|\kappa_{j}^{k}{{|}^{2}}\}, so that 1κjk1-1\leq\kappa_{j}^{k}\leq 1. Next, we introduce an auxiliary spin σN+1=1\sigma_{N+1}=1 and rewrite the Hamiltonian as:

H=JkNijN+1κikκjkσiσj+H0H=-J\sum\limits_{k}^{N}{\sum\limits_{ij}^{N+1}{\kappa_{i}^{k}\kappa_{j}^{k}{{\sigma}_{i}}{{\sigma}_{j}}}}+{{H}_{0}} (S2)

where H0=J(kN(ξkk)2+kN(θk)2){{H}_{0}}=J(\sum\limits_{k}^{N}{{{(\xi_{k}^{k})}^{2}}}+\sum\limits_{k}^{N}{{{(\theta^{k})}^{2}})}.

Input: Magnetic field parameter 𝒉={h1,h2,,hN}\bm{h}=\{h_{1},h_{2},...,h_{N}\}, lower triangular matrix 𝝃\bm{\xi}.
Output: Lower triangular matrix 𝜿\bm{\kappa}, which satisfies Jjk=i=1NκjiκkiJ_{jk}=\sum_{i=1}^{N}\kappa_{j}^{i}\kappa_{k}^{i} when jkj\neq k, and i=1NκjiκN+1i=hj2\sum_{i=1}^{N}\kappa_{j}^{i}\kappa_{N+1}^{i}=\frac{h_{j}}{2}.
Define 𝜽=(θ1θ2θN)\bm{\theta}=(\theta^{1}\quad\theta^{2}\quad\cdots\quad\theta^{N});
for i=1i=1 to NN do
       θi=hi2j=1i1θjξijξii\theta^{i}=\frac{\frac{h_{i}}{2}-\sum^{i-1}_{j=1}\theta^{j}\xi_{i}^{j}}{\xi_{i}^{i}};
      
end for
Algorithm 2 Magnetic field encoding method

II Gauge transformation and Optical computation of general Ising Hamiltonian

We first assume that the amplitude of the illumination light on SLM for each wavelength is uniform and equal to A0{A_{0}}. For the kk-th Mattis-type model, with the gauge transformation proposed in the main text, we encode each spin by Ny×Nx{{N}_{y}}\times{{N}_{x}} pixels as Fig. S1 and the phase modulation on SLM φjk{\varphi}^{k}_{j} as defined in Eq.(2) in the main text. Therefore, the electric fields after the SLM modulation are given by

Ek(x,y)=iA0(F+M1+FM2){E_{k}}(x,y)=iA_{0}({F_{+}}\cdot{M_{1}}+{F_{-}}\cdot{M_{2}}) (S3)

where F+F_{+} and FF_{-} are written as

F±\displaystyle{F_{\pm}} =j=kN+1e±iαjkσjRectNyW(yyj)RectNxW(x)\displaystyle=\sum\limits_{j=k}^{N+1}{{e^{\pm i\alpha_{j}^{k}}\sigma_{j}}{{{\mathop{\rm Rect}\nolimits}}_{{N_{y}}W}}\left({y-y_{j}}\right)\cdot{{{\mathop{\rm Rect}\nolimits}}_{{N_{x}}W}}(x)} (S4)

Here (x,y)(x,y) denotes the spatial coordinate on the SLM plane, and yj=jNyWy_{j}=j{{N}_{y}}W represents the position of the jj-th spin in yy direction on SLM. The rectangular function is defined as

RectNyW(y)=Rect(yNyW)={1,|y|NyW/20,|y|>NyW/2{{\mathop{\rm Rect}\nolimits}_{{N_{y}}W}}(y)={\rm{Rect}}(\frac{y}{N_{y}W})=\left\{{\begin{array}[]{*{20}{l}}{1},&{|y|\leq{N_{y}}W/2}\\ 0,&{|y|>{N_{y}}W/2}\end{array}}\right. (S5)

where WW represents the pixel width of the SLM. M1M_{1} and M2M_{2} are two checkerboard functions, as shown in Fig. S1, such that M1+M2=1{M_{1}}+{M_{2}}=1, and are defined as

M1=m,n=[δ(x2mW,y2nW)+δ(x(2m+1)W,y(2n+1)W)]RectW(x,y)M2=m,n=[δ(x2mW,y(2n+1)W)+δ(x(2m+1)W,y2nW)]RectW(x,y)\begin{array}[]{c}{M_{1}}=\sum\limits_{m,n=-\infty}^{\infty}{[\delta(x-2mW,y-2nW)+\delta(x-(2m+1)W,y-(2n+1)W)]}\otimes{{\mathop{\rm Rect}\nolimits}_{W}}(x,y)\\ {M_{2}}=\sum\limits_{m,n=-\infty}^{\infty}{[\delta(x-2mW,y-(2n+1)W)+\delta(x-(2m+1)W,y-2nW)]}\otimes{{\mathop{\rm Rect}\nolimits}_{W}}(x,y)\end{array} (S6)

where \otimes denotes the convolution operation.

Refer to caption

Figure S1: (a) and (b) are the checkerboard functions M1{{M}_{1}} and M2{{M}_{2}}. Here each spin is encoded by Ny×Nx{{N}_{y}}\times{{N}_{x}} pixels as shown in the black dashed box. For the kk-th Mattis-type model, the center of the jj-th spin is located at (kNxW,jNyW)(k{{N}_{x}}W,j{{N}_{y}}W), where WW represents the pixel width of the SLM.

After passing through the Fourier lens, the optical fields at the CCD for each wavelength are evaluated using a two-dimensional Fourier transform. The resulting electric fields in the spatial spectra are given by:

E~k(kx,ky)=iA04(G+P1+GP2){\widetilde{E}_{k}}({k_{x}},{k_{y}})=\frac{iA_{0}}{{4}}({G_{+}}\otimes{P_{1}}+{G_{-}}\otimes{P_{2}}) (S7)

where

G±=j=kN+1e±iαjkσjsincNyW(ky)eikyyj(NyW)sincNxW(kx)(NxW){G_{\pm}}=\sum\limits_{j=k}^{N+1}{{e^{\pm i\alpha_{j}^{k}}}}{\sigma_{j}}\cdot{{\mathop{\rm sinc}\nolimits}_{{N_{y}}W}}\left({{k_{y}}}\right){e^{i{k_{y}}{y_{j}}}}\cdot({N_{y}}W)\cdot{{\mathop{\rm sinc}\nolimits}_{{N_{x}}W}}({k_{x}})\cdot({N_{x}}{\rm{W)}} (S8)
P1=m,n=(1+(1)m+n)δ(kxmπW,kynπW)sincW(kx,ky){P_{1}}=\sum\limits_{m,n=-\infty}^{\infty}{\left({1+{{(-1)}^{m+n}}}\right)}\,\delta\left({{k_{x}}-m\frac{\pi}{W},{k_{y}}-n\frac{\pi}{W}}\right)\cdot{{\mathop{\rm sinc}\nolimits}_{W}}\left({{k_{x}},{k_{y}}}\right) (S9)
P2=m,n=((1)m+(1)n)δ(kxmπW,kynπW)sincW(kx,ky){P_{2}}=\sum\limits_{m,n=-\infty}^{\infty}{\left({{{(-1)}^{m}}+{{(-1)}^{n}}}\right)}\,\delta\left({{k_{x}}-m\frac{\pi}{W},{k_{y}}-n\frac{\pi}{W}}\right)\cdot{{\mathop{\rm sinc}\nolimits}_{W}}\left({{k_{x}},{k_{y}}}\right) (S10)
sincW(kx,ky)=sinc(kxW2π)sinc(kyW2π){{\mathop{\rm sinc}\nolimits}_{W}}({k_{x}},{k_{y}})={\mathop{\rm sinc}\nolimits}(\frac{k_{x}W}{2\pi})\cdot{\mathop{\rm sinc}\nolimits}(\frac{k_{y}W}{2\pi}) (S11)
sincNxW(kx)=sinc(kxNxW2π){{\mathop{\rm sinc}\nolimits}_{{N_{x}}W}}({k_{x}})={\mathop{\rm sinc}\nolimits}(\frac{k_{x}N_{x}W}{2\pi}) (S12)
sincNyW(ky)=sinc(kyNyW2π){{\mathop{\rm sinc}\nolimits}_{{N_{y}}W}}({k_{y}})={\mathop{\rm sinc}\nolimits}(\frac{k_{y}N_{y}W}{2\pi}) (S13)
sinc(k)=sin(kπ)kπ{{\mathop{\rm sinc}\nolimits}(k)}=\frac{{\mathop{\rm sin}\nolimits}(k\pi)}{k\pi} (S14)

Here, the convolution terms indicate that due to the checkerboard modulation, the beams are diffracted at multiple orders around (mπW,nπW)(m\frac{\pi}{W},n\frac{\pi}{W}) in the angular spectral space, where mm and nn are two integers. Assuming negligible field overlap between different orders, the zeroth order diffraction field for m=0m=0 and n=0n=0 can be expressed as

E~k(kx,ky)iA0Cj=kN+1κjkσjeikyyjsincW(kx,ky)sincNxW(kx)sincNyW(ky)\displaystyle{{\tilde{E}}_{k}}({k_{x}},{k_{y}})\doteq i{A_{0}}C\sum\limits_{j=k}^{N+1}{\kappa_{j}^{k}{\sigma_{j}}}{e^{i{k_{y}}{y_{j}}}}{{\mathop{\rm sinc}\nolimits}_{W}}({k_{x}},{k_{y}}){{\mathop{\rm sinc}\nolimits}_{{N_{x}}W}}\left({{k_{x}}}\right){{\mathop{\rm sinc}\nolimits}_{{N_{y}}W}}\left({{k_{y}}}\right) (S15)

where C=NxWNyWC={N}_{x}W\cdot{{N}_{y}}W.

For the angle spectrum (kx,ky)({{k}_{x}},{{k}_{y}}), the spatial coordinate (ux,uy)({{u}_{x}},{{u}_{y}}) on the detection plane are ux=kxfλ2π{{u}_{x}}={{k}_{x}}\frac{f\lambda}{2\pi}, uy=kyfλ2π{{u}_{y}}={{k}_{y}}\frac{f\lambda}{2\pi}. Thus, the intensity contributed by the kk-th wavelength light is given by

Ik(ux,uy)\displaystyle{I_{k}}({u_{x}},{u_{y}}) =E~kE~k\displaystyle=\tilde{E}_{k}^{*}\cdot{{\tilde{E}}_{k}} (S16)
=A02C2i,j=kN+1κikκjkσiσjei2πfλuy(yjyi)sinc2(uxWfλ)sinc2(uyWfλ)sinc2(uxWNxfλ)sinc2(uyWNyfλ)\displaystyle=A_{0}^{2}{C^{2}}\sum\limits_{i,j=k}^{N+1}{\kappa_{i}^{k}\kappa_{j}^{k}{\sigma_{i}}{\sigma_{j}}}{e^{i\frac{{2\pi}}{{f\lambda}}{u_{y}}({y_{j}}-{y_{i}})}}{{\mathop{\rm sinc}\nolimits}^{2}}\left({\frac{{u_{x}W}}{{f\lambda}}}\right){{\mathop{\rm sinc}\nolimits}^{2}}\left({\frac{{u_{y}W}}{{f\lambda}}}\right){{\mathop{\rm sinc}\nolimits}^{2}}\left({\frac{{{u_{x}}W{N_{x}}}}{{f\lambda}}}\right){{\mathop{\rm sinc}\nolimits}^{2}}\left({\frac{{{u_{y}}W{N_{y}}}}{{f\lambda}}}\right)

In particular, the intensity at ux=0{{u}_{x}}=0 and uy=0{{u}_{y}}=0 is

Ik(0,0)=A02C2i,j=kN+1κikκjkσiσj{I_{k}}(0,0)=A_{0}^{2}{C^{2}}\sum\limits_{i,j=k}^{N+1}{\kappa_{i}^{k}\kappa_{j}^{k}{\sigma_{i}}{\sigma_{j}}} (S17)

Due to the incoherent nature between different wavelengths, the total intensity detected at the zeroth order is

I\displaystyle I =kNIk(0,0)\displaystyle=\sum\limits_{k}^{N}{{I_{k}}}(0,0) (S18)
=A02C2kNi,j=kN+1κikκjkσiσj\displaystyle=A_{0}^{2}{C^{2}}\sum\limits_{k}^{N}{\sum\limits_{i,j=k}^{N+1}{\kappa_{i}^{k}\kappa_{j}^{k}{\sigma_{i}}{\sigma_{j}}}}

For a special case of {κjk=1}\{\kappa_{j}^{k}=1\} and {σj=1}\{\sigma_{j}=1\} for all spins, the phase modulations are given by {φjk=π2}\{{\varphi}^{k}_{j}=\frac{\pi}{2}\} (see Eq. (2) in the main text). That is, when the phase modulation is set to π2\frac{\pi}{2} for all pixels, the intensity on CCD is I0=A02C2N(N+1)2{{I}_{0}}=A_{0}^{2}{C^{2}}N(N+1)^{2}. Therefore by measuring the intensities and normalizing the intensity to I0{{I}_{0}}, the Ising Hamiltonian for the general spin interaction is optically computed as

I~=N(N+1)2II0=kNi,j=kN+1κikκjkσiσj\tilde{I}={N(N+1)^{2}}\frac{I}{I_{0}}=\sum\limits_{k}^{N}{\sum\limits_{i,j=k}^{N+1}{\kappa_{i}^{k}\kappa_{j}^{k}{\sigma_{i}}{\sigma_{j}}}} (S19)

We note that when the amplitude for different wavelengths is not uniform, supposing that the amplitude for the kk-th wavelength is AkA{{}_{k}}, the phase encoding in Eq. (2) can be modified as αjk=arccosκjkAkAmin\alpha_{j}^{k}=\arccos\frac{{\kappa_{j}^{k}}}{{\frac{{A_{k}}}{{A_{\min}}}}}. Here AminA_{\min} is the minimum amplitude among all wavelengths. Under such circumstances, the above derivation is still available, but the normalized intensity I0{{I}_{0}} changes to I0=Amin2C2N(N+1)2{I_{0}}=A_{\min}^{2}{C^{2}}N(N+1)^{2}.

III Experimental setup and measurement of intensity

Refer to caption

Figure S2: Experimental setup of the wavelength-division multiplexing optical Ising simulator. SC: super-continuum laser; L1, L2 and L3: Fourier lens; D: diaphragm; CL: cylindrical lens; P: polarizer; BS: beam splitter; SLM: spatial light modulator; CCD: charge-coupled device.

Figure S2 illustrates the experimental setup of the wavelength-division multiplexing optical Ising simulator. Here a super-continuum 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{{L}_{1}} (focal length is 50mm) and L2{{L}_{2}} (focal length is 500mm). The light then illuminates a reflective diffraction grating (inscribed line density of 600/mm), and the cylindrical lens (CL, the focal length is 100mm) focuses the light with different wavelengths onto the SLM (Holoeye PLUTO-NIR-011). With this configuration, the light with different wavelengths is diffracted along the xx direction of the SLM, while the yy-directional pixels are coherently illuminated by the collimated incident light with the same wavelength. An adjustable diaphragm is designed to change the wavelength range incident on the SLM. For the ±J\pm J model and Sherrington-Kirkpatrick (SK) models (Figure 2 in the main text) 80 spins cover wavelengths from 588nm to 611nm, with each spin occupying Δλ=0.3\Delta\lambda=0.3nm in the xx direction. For the J1-J2{{J}_{1}}\texttt{-}{{J}_{2}} model (Figs. 3-4 in the main text), we carry out experiments with 64 spins and set κjk=0\kappa_{j}^{k}=0 and σj=1\sigma_{j}=1 for the other 16 spins. According to Eq. (S17), κjk=0\kappa_{j}^{k}=0 results in no contribution of σj\sigma_{j} to Ik(0,0)I_{k}(0,0). Polarizer P is used to make the incident beam linearly polarized along the long display axis of the SLM.

Lens L3{{L}_{3}} (200mm focal length) performs a Fourier transformation of the optical field from the SLM. A CCD (Ophir SP620) is placed at the back focus plane to detect optical field intensity. Due to the finite size of SLM pixel and the resolution of CCD, 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 AA is defined as |ux|,|uy|<d2|{u}_{x}|,|{u}_{y}|<\frac{d}{2}. We find that the results are convergent and stable when d=45μd=45{{\mu}}m, which corresponds to a detection area covering 10×1010\times 10 pixels.