<<

arXiv:2011.02771v2 [cond-mat.dis-nn] 29 Mar 2021 Phr rbes[ problems NP-hard ae [ sates hssi eesr oetmtn h sn description Ising the [ estimating systems practical to for necessary is phases o h ytm ihfwsis o xml,tephase the example, simplest For the for investigated spins. experimentally few limited was diagram with typically systems are the experimental transition for spins, of number for large investigations a configurations has system enormous a are when there be since to [ hand, needs other investigations hypothesis experimental a by such verified and average, interaction one-body many-body the of by approximation re- In the is with model quired mean-field perspective. a conventionally, experimental way, from theoretical or machines Ising theoretical proposed and either parameters for controlled phases all stable explore diagram understand [ to to challenging systems is spin role it in key principle a working plays the transitions phase about [ spins [ even of putations systems, demon- thousands spin to been Ising up with has large-scale reliable machine domain with spatial Ising strated in photonic modulation spatial optical the particular, In [ qubits ing 14 nsacigtegon ttsadteeoesligthe solving [ therefore problems and optimization states combinatorial ground spa- efficiency the Thus high searching demonstrate in machines processing. Ising signal photonic optical tial of parallelism and aaercoclaos[ un- optical oscillators in including parametric Hamiltonians architectures, computing spin conventional simulate to interest dous ∗ † hs uhr otiue qal oti work. this to [email protected] equally contributed authors These sapoiigapoc oslealrecasof class large a solve to approach promising a As eeal,cmlt hrceiaino osbestable possible of characterization complete Generally, ,tapdin [ ions trapped ], xeietlOsraino hs rniin nSailP Spatial in Transitions Phase of Observation Experimental 16 , 17 28 19 ,eetoi eoies[ memorisers electronic ], h rsneo aaantc ermgei swl sspin as well as ferromagnetic temperature paramagnetic, cal of wi system presence equilibrium we the spin-glass transformation, high-dimensional enco f gauge of simultaneously to transformations gram modulator Thanks gauge phase strengths. the spatial interaction propose single we a Here where machines. Ising aiae ntesailpooi sn ahn.Furthermo machine. Ising th photonic of spatial approximation the the in Thus validated predictions. theory mean-field h ytmi soitdwt h pia brain n th and aberrations optical suffici the with with robust associated is is machine system Ising the photonic problem spatial optimization the combinatorial that solving with parallel – 36 – ttsia pndnmc ly e oet nesadthe understand to role key a plays dynamics spin Statistical 21 ,testpbnfisfo h ihspeed high the from benefits setup the ], ,adnnpooiscrut [ circuits nanophotonics and ], 1 15 ,rcnl thsatatdtremen- attracted has it recently ], 41 n hjagPoic e aoaoyo unu ehooya Technology Quantum of Laboratory Key Province Zhejiang and ,aoi n htncconden- photonic and atomic ], 2 – .As ttsia pndynamics spin statistical Also ]. eateto hsc,Zein nvriy aghu31002 Hangzhou University, Zhejiang Physics, of Department 6 ,lsr [ lasers ], 27 T .Lk pta nlgcom- analog spatial Like ]. c tt e aoaoyo oenOtclInstrumentation, Optical Modern of Laboratory Key State n h rtclprobability critical the and ihn Fang, Yisheng nedsilnr etro unu Information, Quantum of Center Interdisciplinary 7 – 18 11 37 42 ,superconduct- ], ,plrtn[ ], 41 – – 40 44 , ]. 45 .However, ]. ∗ .O the On ]. uy Huang, Junyi 22 – 26 12 ]. – p c fpaetastos hc ge elwt the with well agree which transitions, phase of iet eunt qiiru fe etrain.Below perturbations. after equilibrium T to return to time sn ahn sepce ob out vnwe the when measurement the even and robust, aberrations uncertainty. be optical the photonic to has spatial expected system the is that machine indicates Ising which state, ground iysrn utain fIigeeg hntetem- the when energy to Ising close is of with perature iden- fluctuations parallel We strong in transition problems. tify phase optimization the combinatorial of solving dis- impact we Furthermore, the cuss machine. in photonic mean-field experimen- spatial the the of we approximation Thus the verify predictions. tally theory mean-field the probability htncIigmciepooe nRf [ Ref. in proposed machine Ising photonic n eemn h rtcltemperature phases critical the spin-glass determine as and well as ferromagnetic paramagnetic, secddo h emwvfottruhtephase the through wavefront beam the as modulation on encoded is − ouao SM,weetesi configuration spin the light where spatial (SLM), phase-only modulator the on impinges beam modulated mnal eosrt h hs iga ihtespin the as with large diagram exper- as we number phase states, the equilibrium per- demonstrate in by imentally system transformation, spin gauge the interaction the forming and to Thanks configuration spin strengths. the to transformation both gauge a incorporate propose spin we spatial Here in systems. transitions glass phase the investigate and chine ie nSM usqety esprom Fourier performs lens a Subsequently, SLM. on or pixel +1 either of siltr [ parametric coupled oscillators two-spin with machine Ising coherent re ognrt h mltd modulation amplitude in am- the modulator unitary generate spatial and to amplitude order uniform an with illuminates plitude beam laser collimated c 1 ∗ h ytmcnb rmtclycoe ont the to down cooled dramatically be can system the , ag transformation. Gauge nti etr efcso pta htncIigma- Ising photonic spatial on focus we Letter, this In ≤ n hca Ruan Zhichao and uigtecoigpoesadidentify and process cooling the during s h10flycnetdsis eobserve We spins. fully-connected 100 th ξ esrmn uncertainty. measurement e xeietlyeaut h hs dia- phase the evaluate experimentally j n aysi neatos vnwhen even interactions, many-spin ent gaspae n eemn h criti- the determine and phases -glass e edsustepaetasto in transition phase the discuss we re, e pncngrtosadprograms and configurations spin des enfil oe sexperimentally is model mean-field e ≤ rsailpooi sn machine, Ising photonic spatial or 46 p okn rnil o oe optical novel for principle working c .Te hog h ie lgmn,the alignment, pixel the through Then 1. ]. fpaetastos hc ge elwith well agree which transitions, phase of ϕ − j, SLM ,and 1, N T c = 0.W bev h rsneof presence the observe We 100. = n hstesse ed more needs system the thus and , ,China 7, σ † ooi sn Machine Ising hotonic dDevice, nd j W rtcnie h spatial the consider first —We ϕ π 2 j, Here, . SLM stepaeo the of phase the is σ j ae iayvalue binary takes T c n h critical the and 27 , 37 { S ξ j .The ]. = } { and σ j th j } 2

Gauge Transformation (a) (c)

(b) (d) π j π ξ φj,SLM =σj +(-1) αj φj,SLM =σ j 2 j 2

SLM2

SLM1 SLM L1 CCD

feedback CCD feedback

FIG. 1. Schematic of the gauge transformation and the ex- perimental optical setups for spatial spin glass systems. (a,b) Without gauge transformation, the spin S= σj and the in- teraction strengths are separately encoded{ on} a phase spa- tial light modulator (SLM1) and an amplitude one (SLM2), whose the phase and amplitude modulation are ϕj,SLM and ξj , respectively. (c, d) By gauge transformation, the gauge- ′z ′ z transformed effective spin configuration S = σj is en- coded through only one phase SLM, following Eq. (4). The modulated light is detected by a CCD camera in the back- focus plane of a lens L1. For both two cases, the SLMs are illuminated by collimated laser beams. Details of the experi- mental setup are presented in SM Sec. III. transformation of the optical field, then the normalized field intensity at the focal plane, I(u, v), is detected by the CCD. Especially, the intensity I0 at the center where (u, v)=(0, 0) is contributed by the interactions between every two spins as I0 = ξiξj σiσj (see Supplementary ij Material Sec. I for details).P Thus the Hamiltonian of such a Mattis-type spin glass system can be defined as FIG. 2. Phase diagram of the spatial spin glass system with 100 spins. (a) The absolute value of magnetization H = JI = J σ σ (1) − 0 − ij i j strength M and spin glass order parameter Q as functions ij X of the effective temperature T for fixed probabilities of p = 0, 0.1, 0.2, 0.3, 0.4, 0.5. (b) The absolute value of magneti- where J is a constant with the unit of energy, and Jij = zation strength M and (c) the square-root value of spin glass Jξiξj is the interaction strengths between the spins. order parameter Q as functions of p and T . The phase tran- Now let us propose the gauge transformation such sition points are labeled by the critical temperature Tc and that the inhomogeneous interaction strengths J can the critical probability pc. (d) The value of √Q/ M for spin ij | | be transformed into the spin orientations. As shown in in low effective temperature T = 89.9J, with respect Fig. 1(c), each original spin σj is rotated clockwise with to the probability p. The inset is the schematic of the spin configurations of three different phases: paramagnetic phase respect to the z-axis with the angle αj = arccos ξj to σ′ σ′ (PM), ferromagnetic phase (FM), and Mattis spin glass phase arrive at a new spin vector j , then j is projected on ′ z (MSG). the z-axis to obtain the effective spin σj = ξj σj and S′z ′ z = σj is the gauge-transformed effective spin con- figuration. As the results, the interactions between the z mation, components of gauge-transformed spins become uniform in both short and long ranges, with the strength of J. H = J σ σ = Jσ′zσ′ z. (3) − ij i j − i j The gauge transformation above is given as ij ij X X ′ z σj σj ,Jij J. (2) We experimentally implement the gauge transforma- → → tion with the setup shown in Fig. 1(d). Instead of sepa- The Hamiltonian remains invariant after gauge transfor- rately encoding the interaction strengths Jij = Jξiξj and 3 the original spin configuration S = σj on two SLMs, the probability equation [Eq. (5)] for configurational av- here we encode the gauge-transformed{ spin} configuration eraging in determining the order parameters M and Q of S′z = σ′ z on a single phase-only SLM. In this case, the the spin glass systems. { j } rotation of spins corresponds to the modification of the In the experiment, an arbitrary initial effective spin S′ ′ z phase modulation on SLM as configuration = σj with 100 spins, where each ′ z σj takes value of either +1 or 1 randomly, is en- π j  − ϕj,SLM = σj + ( 1) αj . (4) coded on the phase-only SLM (Holoeye PLUTO-NIR- 2 − 011, 1920 1080 pixels, with pixel size of 8µm 8µm) × ′ z π × By performing the gauge transformation, the require- following ϕj,SLM=σj 2 . Here an active area with the size of 3200µm 3200µm on SLM is divided in to an array of ment of amplitude modulation as shown in Fig. 1(b) is × eliminated. The derivation of Eq. (4) is inspired by the 10-by-10 macropixels, where each macropixel encode an complex encoding method with double-phase hologram effective spin. [47–50] and the details are given by SM Sec. II. Due to We generate the ensemble of equilibrium states in the the gauge invariance, the detected Hamiltonian after the spatial spin glass system with each given effective temper- gauge transformation remains invariant, as presented in ature T following the measurement and feedback scheme. Eq. (3). Governed by the Markov Chain Monte Carlo (MCMC) Phase diagram for spatial photonic Ising machine.— algorithm, we tentatively flip one spin on the SLM during To show statistical equilibrium properties of spatial pho- each iteration and measure the normalized field intensity tonic Ising machine, we consider the interaction strengths I(u, v) on the back focal plane of the lens L1 (focal length f = 100mm) by CCD (Ophir SP620), which then gives Jij = J [41], where each ξj is randomly chosen follow- ing the± distribution probability of the Hamiltonian as Eq. (1). Following the Metropolis- Hasting sampling procedure (see SM Sec. IV for details), with the effective temperature T , we update the spin con- p(ξj )= p δ(ξj , +1)+ (1 p) δ(ξj , 1) (5) · − · − figuration with the knowledge of the optically computed feedback Hamiltonian H. Under each fixed effective tem- where δ(n,m) is a Kronecker delta function, i.e. each ξj independently takes the value of either +1 or 1, with perature T , 1000 Monte Carlo iterations are performed the probability of p and 1 p respectively. With− respect to formulate a statistical ensemble containing 1000 effec- − tive spin configurations S′(T ), S′(T ), , S′(T ) . These to the probability p and an effective temperature T , the { 1 2 ··· 1000} phases of this spin system are characterized by two sta- 1000 samples represent the equilibrium states of the spin tistical order parameters, the magnetization strength M glass system, where the spin configurations satisfy the S′ −H/T and the spin glass order parameter Q. These two statis- Gibbs-Boltzmann distribution, p( ) e . We grad- ually cool the effective temperature∝ from T = 400J to 1 tical order parameters are defined as M = N σj T = 89.9J in the simulated annealing manner. In this "* j +# way, the whole statistical equilibrium states in the effec- 2 P tive temperature range are obtained. The experimentally 1 and Q = N σj respectively, where de- measured order parameters are presented in Fig. 2, form- * j +  h···i ing the phase diagram with respect to p and T . Here P notes the ensemble average over the spin configurations five experimental runs are conducted independently and S and [ ] denotes the configurational average over dif- then averaged to reduce the error. In general, following ··· ferent sets of ξj generated following the probability p. the processes described above, we can determine the full In order to show{ } the phase diagram of spatial spin glass phase diagram of the spatial spin glass system with the system, we first formulate the statistical ensembles con- aid of the gauge transformation. taining sufficient samples of spin configuration S. As shown in Fig. 2, these two order parameters M The proposed gauge transformation is rather conve- and Q categorize the spin glass systems into three dis- nient for investigating the phase transitions of these op- tinct phases, the paramagnetic phase (PM, M = Q = 0), tical spin models. In this way, only one set of experiment the ferromagnetic phase (FM, M > 0, Q > 0) and the is needed to compute the full phase diagram of the spin Mattis spin glass phase (MSG, M = 0, Q > 0). Fig- glass system. This is because though the interactions ure 2(a) depicts the as a function of T of the spin systems are different determined by different for fixed probabilities p. When p = 0 for example, the ξj , they share the same model after gauge transforma- spin system has uniform interactions, and it experiences tion.{ } In the experiment, it is the gauge-transformed effec- the order-disorder phase transition, at a critical temper- S′ ′ z tive spin configurations = σj that are encoded to ature Tc = 199J, between the PM and FM phases dur- formulate the statistical ensembles containing sufficient ing annealing. At high effective temperatures T >Tc,  samples. With the knowledge of any given ξj , the sta- the original spins σj s align randomly, thus the averaged tistical ensemble for the original spin configurations{ } S magnetization strength M vanishes in the paramagnetic before gauge transformation can be obtained by simply phase. At low effective temperatures T

M in the ferromagnetic phase. This phase transition be- tween PM and FM during annealing still holds for other spin glass systems where the degree of disorder in inter- actions is lower than the critical probability pc. When p>pc however, a phase of MSG occurs at low effective temperatures, where the original spins σj s seem to be randomly distributed, but they are in fact locked to ξj s, that is, all σj s tend to align parallel to ξj s. Thus ′ z the gauge-transformed spins σj s all take uniform value of +1 or 1 simultaneously, as shown in the inset of − Fig. 2(d). The disorder in σj s originates from the dis- order in the interaction strengths, i.e. the disorder of ξj s, which is different from the case in the PM phase. When the interaction strengths given by ξj are fixed, there are no randomness in the values of{ σ} and the { j } 1 ensemble averaged magnetization strength N σj is * j + non-vanishing (Q> 0), while averaging over theP disorder in interaction strengths then cancels the magnetization strength (M = 0). 0 1 In order to determine the critical probability pc, we distinguish the FM and MSG phases by plotting the val- ues of √Q/ M with respect to the probability p, at a low effective temperature| | T = 89.9J. The data are extracted −0.5 from the left-most lines of Fig. 2(b) and (c). The re- 0 sults are shown in Fig. 2(d), and we determine pc =0.45 where √Q/ M remains approximately 1 for ppc, showing the characteristics of FM 01 2 3 4 5 and MSG phases respectively. We note that the criti- 4 x 10 cal points Tc and pc determined from the phase diagram, agree well with the predictions of the mean-field theory, 2 2 −4J/Tc Tc = 2(N 1)J and pc + (1 pc) = 1/(1 + e ) [41]. These− results show that− the approximation of the mean-field model is valid in the spatial photonic Ising machine. Phase transistion in solving optimization problems.— The spatial spin glass system provides a new computation platform for solving the challenging combinatorial opti- mization problems by searching the ground state [27, 37– 39]. Since the process of searching ground states is in parallel with cooling spin systems, it is expected that the phase transitions should strongly impact the searching FIG. 3. Experimental results for solving an optimization process. To show such impacts, here we consider solving problem with Jij = +J for all the N = 100 spins . (a) The a simple optimization problem where the spin interac- system temperature is controlled with an exponentially decay tion J = +J is a positive constant for all one-hundred during the Monte Carlo iterations, where Tc corresponds to ij the critical temperature. (b-d) Three sets of measurements spins. Figure 3(a) shows the temperature of the inter- of the normalized Hamiltonian H and the magnetization m acting system during the Monte Carlo iterations, which during the cooling process. is controlled with an exponentially decay. The spins ini- tially start from a random configuration, encoded on the SLM with an array of 10-by-10 macropixels. state with m = 1 by cooling. Such magnetizations indi- Here the phases transition is also observed during the cate the transition from the paramagnetic phase to the dynamical cooling process. Figures 3(b-d) show three ferromagnetic phase, and more importantly the phase- sets of measurements of the normalized Hamiltonian H 1 transition temperature coincides with our previous de- and the magnetization m = N σi during the cooling i termined Tc. More importantly, Figs. 3(b-d) also show process. All three experimentalP results demonstrate that strong fluctuations of H in the vicinity of Tc, where the the magnetization of the spins wanders around zero at spin configuration coexists at two phases. Practically, it high temperature, while the systems evolve to the ground suggests that the spatial photonic Ising machine needs 5 more iterations to return to equilibrium after perturba- tem with gauge transformation. The encoding of the tions in the vicinity of Tc. Below Tc, the system can spin configurations and the programming of the inter- be dramatically cooled down to the ground state. Since action strengths between spins are realized by only one the system is associated with the optical aberrations and spatial phase modulation process, which significantly im- the intensity measurement uncertainty, the results show proves the stability and fidelity of the optical Ising ma- that the spatial photonic Ising machine is robust to such chine. For both studies of the statistical equilibrium state disturbance with sufficient many-spin interactions. properties of spin glass systems and practical applications Discussion and Conclusion.—Benefiting from the in solving combinatorial optimization problems, such an gauge transformation, we characterize the phase tran- optical system exhibits high accuracy and great robust- sition to understand the statistical spin dynamics in the ness against noises and aberrations, intriguing for its pro- novel optical spin system. We also notice a study to sim- grammability and scalability in large-scale Ising machine. ulate large-scale random spin networks with a disordered The authors acknowledge funding through the Na- medium [39]. However, the technique is distinct from the tional Natural Science Foundation of China (NSFC gauge transformation and cannot characterize the phase Grants Nos. 91850108 and 61675179), the National Key transition presented here. Furthermore, based on the Research and Development Program of China (Grant No. Ising systems constructing with nonlinear processes as 2017YFA0205700), the Open Foundation of the State shown in [40], we also believe that the proposed gauge Key Laboratory of Modern Optical Instrumentation, and transformation can be extended to study more complex the Open Research Program of Key Laboratory of 3D Mi- spin models with four-body interactions. cro/Nano Fabrication and Characterization of Zhejiang In summary, we have proposed a spatial spin glass sys- Province.

[1] A. Lucas, Ising formulations of many NP problems, Fron- spin Hamiltonians in nanoscale active photonic lattices, tiers in Physics 2, 5 (2014). Nature Materials 19, 725 (2020). [2] P. L. McMahon, A. Marandi, Y. Haribara, R. Hamerly, [11] M. Honari-Latifpour and M.-A. Miri, Mapping the XY C. Langrock, S. Tamate, T. Inagaki, H. Takesue, S. Ut- Hamiltonian onto a network of coupled lasers, Physical sunomiya, K. Aihara, et al., A fully programmable 100- Review Research 2, 043335 (2020). spin coherent Ising machine with all-to-all connections, [12] K. P. Kalinin, A. Amo, J. Bloch, and N. G. Berloff, Science 354, 614 (2016). Polaritonic XY-Ising machine, Nanophotonics 9, 4127 [3] T. Inagaki, Y. Haribara, K. Igarashi, T. Sonobe, S. Ta- (2020). mate, T. Honjo, A. Marandi, P. L. McMahon, T. Umeki, [13] N. G. Berloff, M. Silva, K. Kalinin, A. Askitopoulos, J. D. K. Enbutsu, et al., A coherent Ising machine for 2000- T¨opfer, P. Cilibrizzi, W. Langbein, and P. G. Lagoudakis, node optimization problems, Science 354, 603 (2016). Realizing the classical XY Hamiltonian in polariton sim- [4] T. Inagaki, K. Inaba, R. Hamerly, K. Inoue, Y. Ya- ulators, Nature Materials 16, 1120 (2017). mamoto, and H. Takesue, Large-scale Ising spin network [14] K. P. Kalinin and N. G. Berloff, Simulating Ising and based on degenerate optical parametric oscillators, Na- n-state planar potts models and external fields with ture Photonics 10, 415 (2016). nonequilibrium condensates, Physical Review Letters [5] F. B¨ohm, G. Verschaffelt, and G. Van der Sande, A poor 121, 235302 (2018). man’s coherent Ising machine based on opto-electronic [15] K. Kim, M.-S. Chang, S. Korenblit, R. Islam, E. E. feedback systems for solving optimization problems, Na- Edwards, J. K. Freericks, G.-D. Lin, L.-M. Duan, and ture Communications 10, 1 (2019). C. Monroe, Quantum of frustrated Ising spins [6] A. Marandi, Z. Wang, K. Takata, R. L. Byer, and Y. Ya- with trapped ions, Nature 465, 590 (2010). mamoto, Network of time-multiplexed optical parametric [16] J. Struck, M. Weinberg, C. Olschl¨ager,¨ P. Windpassinger, oscillators as a coherent Ising machine, Nature Photonics J. Simonet, K. Sengstock, R. H¨oppner, P. Hauke, 8, 937 (2014). A. Eckardt, M. Lewenstein, et al., Engineering Ising-XY [7] S. Utsunomiya, K. Takata, and Y. Yamamoto, Mapping spin-models in a triangular lattice using tunable artificial of Ising models onto injection-locked laser systems, Op- gauge fields, Nature Physics 9, 738 (2013). tics Express 19, 18091 (2011). [17] B. Kassenberg, M. Vretenar, S. Bissesar, and J. Klaers, [8] M. Babaeian, D. T. Nguyen, V. Demir, M. Akbulut, P.- Controllable Josephson junction for photon Bose– A. Blanche, Y. Kaneda, S. Guha, M. A. Neifeld, and Einstein condensates, arXiv preprint arXiv:2001.09828 N. Peyghambarian, A single shot coherent Ising machine (2020). based on a network of injection-locked multicore fiber [18] F. Cai, S. Kumar, T. Van Vaerenbergh, X. Sheng, R. Liu, lasers, Nature Communications 10, 1 (2019). C. Li, Z. Liu, M. Foltin, S. Yu, Q. Xia, J. J. Yang, [9] C. Tradonsky, I. Gershenzon, V. Pal, R. Chriki, A. A. R. Beausoleil, W. D. Lu, and J. P. Strachan, Power- Friesem, O. Raz, and N. Davidson, Rapid laser solver efficient combinatorial optimization using intrinsic noise for the phase retrieval problem, Science Advances 5, in memristor hopfield neural networks, Nature Electron- eaax4530 (2019). ics 3, 409 (2020). [10] M. Parto, W. Hayenga, A. Marandi, D. N. [19] M. W. Johnson, M. H. S. Amin, S. Gildert, T. Lanting, Christodoulides, and M. Khajavikhan, Realizing F. Hamze, N. Dickson, R. Harris, A. J. Berkley, J. Jo- 6

hansson, P. Bunyk, et al., with man- Analogue computing with metamaterials, Nature Re- ufactured spins, Nature 473, 194 (2011). views Materials 6, 207 (2020). [20] S. Boixo, T. F. Rønnow, S. V. Isakov, Z. Wang, [37] D. Pierangeli, G. Marcucci, D. Brunner, and C. Conti, D. Wecker, D. A. Lidar, J. M. Martinis, and M. Troyer, Noise-enhanced spatial-photonic Ising machine, Evidence for quantum annealing with more than one hun- Nanophotonics 9, 4109 (2020). dred qubits, Nature Physics 10, 218 (2014). [38] D. Pierangeli, G. Marcucci, and C. Conti, Adiabatic evo- [21] A. D. King, J. Carrasquilla, J. Raymond, I. Ozfidan, lution on a spatial-photonic Ising machine, Optica 7, E. Andriyash, A. Berkley, M. Reis, T. Lanting, R. Harris, 1535 (2020). F. Altomare, et al., Observation of topological phenom- [39] D. Pierangeli, M. Rafayelyan, C. Conti, and S. Gi- ena in a programmable lattice of 1,800 qubits, Nature gan, Scalable spin-glass optical simulator, arXiv preprint 560, 456 (2018). arXiv:2006.00828 (2020). [22] C. Roques-Carmes, Y. Shen, C. Zanoci, M. Prabhu, [40] S. Kumar, H. Zhang, and Y.-P. Huang, Large-scale Ising F. Atieh, L. Jing, T. Dubˇcek, C. Mao, M. R. Johnson, emulation with four body interaction and all-to-all con- V. Ceperi´c,ˇ et al., Heuristic recurrent algorithms for pho- nections, Communications Physics 3, 1 (2020). tonic Ising machines, Nature Communications 11 (2020). [41] H. Nishimori, Statistical physics of spin glasses and in- [23] M. Prabhu, C. Roques-Carmes, Y. Shen, N. Har- formation processing: an introduction, 111 (Clarendon ris, L. Jing, J. Carolan, R. Hamerly, T. Baehr-Jones, Press, 2001). M. Hochberg, V. Ceperi´c,ˇ et al., Accelerating recurrent [42] S. Mertens, Phase transition in the number partitioning Ising machines in photonic integrated circuits, Optica 7, problem, Physical Review Letters 81, 4281 (1998). 551 (2020). [43] Z. Wang, A. Marandi, K. Wen, R. L. Byer, and Y. Ya- [24] Y. Shen, N. C. Harris, S. Skirlo, M. Prabhu, T. Baehr- mamoto, Coherent Ising machine based on degenerate Jones, M. Hochberg, X. Sun, S. Zhao, H. Larochelle, optical parametric oscillators, Physical Review A 88, D. Englund, et al., Deep learning with coherent nanopho- 063853 (2013). tonic circuits, Nature Photonics 11, 441 (2017). [44] M. C. Strinati, L. Bello, A. Pe’er, and E. G. Dalla Torre, [25] K. Wu, J. G. De Abajo, C. Soci, P. P. Shum, and Theory of coupled parametric oscillators beyond coupled N. I. Zheludev, An optical fiber network oracle for NP- Ising spins, Physical Review A 100, 023835 (2019). complete problems, Light: Science & Applications 3, [45] L. Leuzzi, C. Conti, V. Folli, L. Angelani, and G. Ruocco, e147 (2014). Phase diagram and complexity of mode-locked lasers: [26] Y. Okawachi, M. Yu, J. K. Jang, X. Ji, Y. Zhao, B. Y. from order to disorder, Physical Review Letters 102, Kim, M. Lipson, and A. L. Gaeta, Demonstration of chip- 083901 (2009). based coupled degenerate optical parametric oscillators [46] L. Bello, M. C. Strinati, E. G. Dalla Torre, and A. Pe’er, for realizing a nanophotonic spin-glass, Nature Commu- Persistent coherent beating in coupled parametric oscil- nications 11, 1 (2020). lators, Physical Review Letters 123, 083901 (2019). [27] D. Pierangeli, G. Marcucci, and C. Conti, Large-scale [47] C. Hsueh and A. Sawchuk, Computer-generated double- photonic Ising machine by spatial light modulation, phase holograms, Applied Optics 17, 3874 (1978). Physical Review Letters 122, 213902 (2019). [48] O. Mendoza-Yero, G. M´ınguez-Vega, and J. Lancis, En- [28] A. Silva, F. Monticone, G. Castaldi, V. Galdi, A. Al`u, coding complex fields by using a phase-only optical ele- and N. Engheta, Performing mathematical operations ment, Optics Letters 39, 1740 (2014). with metamaterials, Science 343, 160 (2014). [49] S. Ngcobo, I. Litvin, L. Burger, and A. Forbes, A digital [29] D. A. Bykov, L. L. Doskolovich, E. A. Bezus, and V. A. laser for on-demand laser modes, Nature Communica- Soifer, Optical computation of the laplace operator using tions 4, 1 (2013). phase-shifted bragg grating, Optics Express 22, 25084 [50] A. Dudley, R. Vasilyeu, V. Belyi, N. Khilo, P. Ropot, (2014). and A. Forbes, Controlling the evolution of nondiffract- [30] Z. Ruan, Spatial mode control of surface polari- ing speckle by complex amplitude modulation on a phase- ton excitation with gain medium: from spatial differen- only spatial light modulator, Optics Communications tiator to integrator, Optics Letters 40, 601 (2015). 285, 5 (2012). [31] A. Youssefi, F. Zangeneh-Nejad, S. Abdollahramezani, and A. Khavasi, Analog computing by brewster effect, Optics Letters 41, 3467 (2016). [32] 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). [33] W. Zhang, K. Cheng, C. Wu, Y. Wang, H. Li, and X. Zhang, Implementing quantum search algorithm with metamaterials, Advanced Materials 30, 1703986 (2018). [34] C. Guo, M. Xiao, M. Minkov, Y. Shi, and S. Fan, Pho- tonic slab laplace operator for image differentia- tion, Optica 5, 251 (2018). [35] 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). [36] F. Zangeneh-Nejad, D. L. Sounas, A. Al`u, and R. Fleury, 7

Supplementary Material: Experimental Observation of Phase Transition in Spatial Photonic Ising Machine

I. THE EXPERIMENTAL SETUP WITHOUT GAUGE TRANSFORMATION, AS PRESENTED IN FIG. 1(B)

The spin configuration S = σ is encoded on the SLM in an array of N N macropixels. The size of a single { j } x × y macropixel is W W. As presented in Fig. 1(b), a paraxial beam with amplitude modulation ξj illuminates on the SLM, which has× the spatial phase modulation of σ . After reflected by SLM, the electric field{ is} { j} E(x)= i ξ σ rect (x x ) = [i ξ σ δ(x x )] rect (x). (S1) j j W − j j j − j ⊗ W j j X X Here x = (x, y) denotes the spatial coordinate on the SLM plane, and xj is the center position of the jth pixel on SLM, which takes the value of x = W(me + ne ) (1 m N , 1 n N ). j x y ≤ ≤ x ≤ ≤ y In Eq. (S1), the notation is the convolution operation, and the rectangular functions are defined as ⊗ x 1 x , y W/2 rect (x) = rect( )= , W W 0 |x| , |y|≤> W/2  | | | | 1 x , y 6 1/2 rect(x)= | | | | . 0 x , y > 1/2  | | | | According to the Fourier optics, the field at the back focal plane of a lens corresponds to the Fourier transform (FT) of E(x),

FT 1 +∞ −ix·k E(x) E˜(k)= 2 E(x)e dx. −−→ (2π) −∞ Specifically, R FT 2 k x x x 1 i · j ξj σj δ( j ) ( W ) ξj σj e j − −−→ j P P rect (x) FT W2sinc (k) W −−→ W where W W k k sin kx sin y k W 2 2 k sin πkx sin πky sinc ( ) = sinc( )= W k W k , sinc( )= . W 2π x y πkx πky 2 · 2 Therefore we have

ik·xj E˜(k) = (i ξj σj e ) sincW(k). j · The electric field on the detection plane, i.e. theP back focal plane, is E(u, v), where u = (u, v) is the spatial coordinate on the detection plane. Here the focal length of the FT lens is f and the wavelength of the laser source is fλ fλ λ, and u = kx 2π , v = ky 2π . So

2 u i π u·x W E(u, v) = (i ξ σ e fλ j ) sinc( ). (S2) j j · fλ j X The detected intensity image on CCD is

2 u ∗ i π (x −x )·u W I(u, v)= E (u, v) E(u, v)= ξ ξ σ σ e fλ i j sinc2( ). (S3) · i j i j fλ ij X The Hamiltonian is defined as H = JI = J ξ ξ σ σ , (S4) − 0 − · i j i j ij X where J is a constant and I0 is the intensity on the center of the detection plane, (u, v) = (0, 0). As a result, the optical spatial modulation method described as above successfully models the spin glass systems. 8

II. DERIVATION OF GAUGE TRANSFORMATION IN EQ. (4)

Supposing that a collimated beam, with uniform amplitude, impinges on the phase-only SLM with the spatial phase modulation following Eq. (4) in the text, the beam wavefront becomes

E(x)= iM(x)[ σ eiαj rect (x x )] + i(1 M(x))[ σ e−iαj rect (x x )] j W − j − j W − j j j (S5) X X = i[H (x)M(x)+ H (x)(1 M(x))] rect (x) 1 2 − ⊗ W where

−1 icos ξj H1(x)= σj e δ(x xj ) j − −1 −icos ξj H2(x)= P σj e δ(x xj ) j − P H1(x)+ H2(x)=2 ξj σj δ(x xj ) j − P x x 2 x x H1( ) H2( )=2i 1 ξj σj δ( j ) − j − − P q and M(x) and 1 M(x) are the checkerboard pattern functions as − +∞ M(x)= [δ(x 2mW,y 2nW) + δ(x (2m + 1)W,y (2n + 1)W)] − − − − m,n=−∞ . P +∞ 1 M(x)= [δ(x 2mW,y (2n + 1)W) + δ(x (2m + 1)W,y 2nW)] − m,n=−∞ − − − − P The values of M(x) rect (x) and (1 M(x)) rect (x) are presented in Fig. S1. Specifically, in the case that all ⊗ W − ⊗ W (a) (b) 1 y y

0 x x

FIG. S1. Checkerboard patterns for functions (a) M(x) rectW(x) and (b) (1 M(x)) rectW(x). ⊗ − ⊗ ξ s take binary values of either +1 or 1, the modulated optical field is simplified as j − E(x)= i σ′zrect (x x ). (S6) i W − j j X According to the Fourier optics, the lens L1(with focal lengthf = 100mm) performs the spatial Fourier transforma- tion(FT) on E(x),

H (x) FT h (k , k ) 1 −−→ 1 x y FT H (x) h (k , k ) 2 −−→ 2 x y +∞ FT 1 π π M(x) ( )2 (1 + eikxWeiky W)δ(k m , k n ) −−→ 2W x − W y − W m,n=−∞ X +∞ 1 π π = ( )2 (1 + ( 1)m+n)δ(k m , k n ) 2W − x − W y − W m,n=−∞ X 9

+∞ FT 1 π π 1 M(x) ( )2 (eikxW + eiky W)δ(k m , k n ) − −−→ 2W x − W y − W m,n=−∞ X . ∞ 1 + π π = ( )2 (( 1)m + ( 1)n)δ(k m , k n ) 2W − − x − W y − W m,n=−∞ X So the spatial spectrum is

+∞ i π π E˜(k)= h (k , k ) [ (1 + ( 1)m+n)δ(k m , k n )] 4{ 1 x y ⊗ − x − W y − W m,n=−∞ X +∞ π π + h (k , k ) [ (( 1)m + ( 1)n)δ(k m , k n )] . (S7) 2 x y ⊗ − − x − W y − W } m,n=−∞ X sinc (k , k ) · W x y

The convolution terms state that the optical field on the focal plane is distributed periodically. This is because the pixels on the SLM have finite sizes, so E˜(k) has the discrete Fourier transform (DFT)-like phenomena, where different π diffraction orders are centered at (kx, ky) = (m,n) W . The zeroth diffraction order is i E˜ (k)= [h (k , k )+ h (k , k )] sinc (k , k ) 0 2 1 x y 2 x y · W x y k x = ( ξ σ ei · j ) sinc (k) j j · W j X . (S8) z k x = ( σ′ ei · j ) sinc (k) j · W j X

In fact, the higher-diffraction-order fields may overlap with the zeroth-order field, thus the total field is the interference between the zeroth and higher diffraction orders,

′ E˜(k)= E˜0(k)+ E˜ (k) (S9) where E˜′(k) is the contribution from higher diffraction orders. The field E˜′(k) acts as noises that degrades the performance of the optical setup in modeling the spin glass systems. ˜ k fλ fλ The electric field on the detection plane, related to E( ) through u = kx 2π , v = ky 2π , is written as

2 u ′ z i π u·x W E (u, v) = ( σ e fλ j ) sinc( ). (S10) 0 j · fλ j X x x fλ fλ If H1( ) and H2( ) are band-limited such that E0(u, v) is confined in the first Brillouin zone ( 4W u, v 4W ), thus different diffraction orders do not overlap with each other. In the experiments, we are only− interested≤ ≤ in the detected field intensity within the finite area ( fλ u, v fλ ), so only the zeroth diffraction order is contained − 4W ≤ ≤ 4W and thus E(u, v)= E0(u, v). The detected intensity image on CCD is

2 u ∗ ′z ′ z i π (x −x )·u W I(u, v)= E (u, v) E(u, v)= σ σ e fλ i j sinc2( ). (S11) · i j fλ ij X Then we arrive at the same result as Eq. S3. The Hamiltonian is defined as

H = J I = J σ′zσ′ z (S12) − · 0 − · i j ij X where J is a constant with the unit of energy and I0 is the intensity on the center of the detection plane (u, v)=(0, 0). As a result, the spatial spin glass systems are modeled with gauge transformation, where both encoding of the spin configuration and programming of the interaction strengths are realized by only one spatial phase modulator.

10

¢£

L¡ B

C ¤¥ ¦ imator SLM

Source

L1 feedback

CCD

FIG. S2. Experimental setup of the spatial spin glass system with gauge transformation.

III. EXPERIMENTAL SETUP AND MEASUREMENT OF SYSTEM HAMILTONIAN

In the experiment, we use a green laser source (wavelength λ = 532 nm) to generate a collimated beam with a planar wavefront and a uniform amplitude distribution (see the detailed setup in Fig. S2). Here the collimated laser with a beam waist radius of about 3.6mm is expanded by lenses L2(focal length is 50mm) and L3(focal length is 500mm), which generate a sufficiently wide Gaussian beam to cover the phase-only SLM (Holoeye PLUTO-NIR-011), such that the amplitude distribution at the used region of SLM is rather uniform. The polarizer P1 is used to prepare the incident beam linearly polarized along the long display axis of the SLM. A CCD (Ophir SP620) is used to detect the optical field intensity on the back focal plane. We note that with a finite pixel-size detector, it is hard to exactly detect I0 at the center, due to the restriction of the NA of lenses and the resolution of CCD. So the Hamiltonian is calculated by normalizing the detected intensity in a finite region as H = J [I(u, v) I¯(u, v)]dudv/ I¯(u, v)dudv , where − A × A I¯(u, v) is the field intensity on the detection plane when the SLM hasRR uniform phase modulationRR of ϕj,SLM = 0 in the squared detection region A : u , v d/2 . We also estimate the impact of the noises by detecting a finite region on the detection plane instead of| the| | center|≤ pixel in the experiments and find that the results are convergent and stable fλ when d > 0.08 W . Here f is the focal length of lens L1 shown in Fig. 1(d), and W corresponds to the length of a macropixel on SLM encoding the effective spin configurations.

IV. OPTICAL METROPOLIS-HASTING SAMPLING

For the purpose of studying the statistical properties of spin glass systems, we first formulate the statistical ensembles containing sufficient samples of spin configurations S. The statistical ensembles are obtained by optical iterations governed by Monte Carlo algorithm with Metropolis-Hasting sampling. In each iteration, a single spin is flipped and −∆H/T the updated spin configuration Snew is accepted with the probability of e , depending on both the variance of the energy function ∆H = H(S ) H(S) and the effective temperature as follow: new − if ∆H > 0 : accept S with the probability of e−∆H/T new . S (if ∆H 6 0 : accept new