## Abstract

From condensed matter to quantum chromodynamics, multidimensional spins are a fundamental paradigm, with a pivotal role in combinatorial optimization and machine learning. Machines formed by coupled parametric oscillators can simulate spin models, but only for Ising or low-dimensional spins. Currently, machines implementing arbitrary dimensions remain a challenge. Here, we introduce and validate a hyperspin machine to simulate multidimensional continuous spin models. We realize high-dimensional spins by pumping groups of parametric oscillators, and show that the hyperspin machine finds to a very good approximation the ground state of complex graphs. The hyperspin machine can interpolate between different dimensions by tuning the coupling topology, a strategy that we call “dimensional annealing”. When interpolating between the XY and the Ising model, the dimensional annealing substantially increases the success probability compared to conventional Ising simulators. Hyperspin machines are a new computational model for combinatorial optimization. They can be realized by off-the-shelf hardware for ultrafast, large-scale applications in classical and quantum computing, condensed-matter physics, and fundamental studies.

## Introduction

Systems of interacting spins are ubiquitous in nature. Their complex collective behavior and their equilibrium properties describe magnetism in solid-state systems^{1}, phase transitions in spin glasses^{2}, quantum chromodynamics (QCD)^{3}, and quantum and classical computation^{4}. Spin models are also pivotal in combinatorial optimization^{5}, with applications in machine learning^{6}, traffic and portfolio optimization^{7}, markets and finance^{8}, biology and life science^{9}, artificial intelligence^{10}, protein folding^{11}, epidemic spreading^{12}, bioinformatic^{13}, and material engineering^{14}.

However, simulating and understanding spin systems remain a challenge, as several models are computationally (NP-)hard^{15}. Novel algorithms and techniques are emerging, including the realization of specialized physical machines that converge to the ground state (GS) of programmable spin Hamiltonians, a major quest in the last decades^{16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42}. However, most of the work has been limited to the simulation of one-component, discrete spin systems (Ising model), and of continuous spin models with two or three components (XY or Heisenberg models, respectively). Also, spin machines, either software or hardware, suffer of limitations as heterogeneity and stiffness, which reduce the success probability in computationally NP-hard models to a narrow range of parameters. Heterogeneity refers to the fact that the spin simulator exhibits local energy minima not present in the target model. Stiffness appears in binary models that display deep local energetic states, which impede reaching the ground state during minimization or annealing. Ideally, one would use high-dimensional systems to increase the symmetry in order to connect the many local minima and interpolate binary spins with continuous variables to exit the energetic traps. However, these features are not available at the moment.

Ising spin simulators include two-component Bose-Einstein condensates^{17,18}, superconducting circuits^{19}, digital computers^{20,21,22}, electrical oscillators^{23}, optoelectronical oscillators^{24}, and degenerate optical parametric oscillators (POs)^{25,26,27,28,29,30,31,32,33,34} forming a coherent Ising machine (CIM). Proposed platforms to simulate classical XY models include laser networks^{35,36}, non-degenerate POs^{37}, and polariton condensates^{38}. Quantum spin simulators include trapped atomic ion crystals for the quantum Ising, XY, and Heisenberg models^{39,40,41,42}.

Programmable multicomponent spins represent a toolbox for the systematic study of nontrivial phases, symmetry breaking phenomena, as well as the critical behavior of phase transitions in condensed-matter physics^{3}. Examples include magnetic properties of three-dimensional spins^{43} and critical properties of spin glasses^{44}. Importantly, classical multidimensional spins may simulate the behavior of quantum many-body systems^{45}. Four-dimensional spin models appear in QCD, describing the symmetry and critical properties of the chiral phase transition with two light-quark flavors^{3,46,47,48}.

In this article, we propose and validate a classical simulator of a *N*-spin system with an arbitrary number *D* of spin components. The rationale behind our proposal can be summarized as follows. The hyperspin machine is realized by coupling *D* × *N* POs in a hierarchical way: First, the network is organized as *N* POs multiplets by using *N* identical pump fields, each one driving a group of *D* POs. Within each group, the common pump saturation induces an effective nonlinear coupling between the POs. We will show that the steady state of the resulting dynamics allows to construct from each PO multiplet a *D*-dimensional continuous spin (or hyperspin), where a single PO represents a component of the hyperspin. On top of this structure, a linear coupling between POs in different multiplets realizes the hyperspin system. The linear coupling identifies the actual hyperspin-hyperspin coupling, and the resulting network of nonlinearly and linearly coupled POs simulates a system of *N*, *D*-dimensional, hyperspins. The choice of POs as fundamental constituents of an hyperspin is motivated by the fact that they furnish a versatile platform to realize artificial spin devices at room temperature. POs grant an extraordinary degree of control and the prospect to realize scalable systems of coupled all-optical POs with size-independent ultra-fast equilibration times^{49}. However, despite their potential use as physical hardware, we show here that even only the software implementation of an hyperspin machine enables a novel strategy for annealing that we call “dimensional annealing”, which increases the probability to optimize hard models in a wide range of parameters.

## Results

### Multidimensional hyperspin with POs

We start by showing how an hyperspin is constructed from *D* commonly pumped POs. We consider in Fig. 1a, b *D* identical POs, all with frequency *ω*_{0} and loss *g*, described by classical dynamical variables *x*_{1}, …*x*_{D} pumped by an external drive with amplitude *h* and frequency 2*ω*_{0}. The pump feeds the *D* oscillators, with saturation value *h*(1 − *β**I*), where *β* is a saturation coefficient and \(I={\sum }_{l}{x}_{l}^{2}\) is the total PO energy. Following the formalism in refs. 30, 50, 51, we describe the dynamics by *D* coupled Mathieu’s equations

where *j* = 1, …, *D* labels the different POs. Differently from refs. 30, 50, 51 and related literature, POs in Eq. (1) are not coupled by a conventional linear coupling. Instead, the common pump saturation induces an effective nonlinear coupling between POs. When pumped above the threshold value *h*_{th}, each PO *x*_{j} responds with an oscillation at frequency locked to half the pump frequency due to period doubling instability. This oscillation is modulated by a complex amplitude *X*_{j}, which describes the nontrivial dynamics of the PO variable *x*_{j}. When an amplitude steady-state exists, the fixed points \({\overline{X}}_{j}=|{\overline{X}}_{j}|{e}^{i{\phi }_{j}}\) encode the equilibrium values of the magnitude and phases of the PO fast oscillations, \({\overline{x}}_{j}(t)=2|{\overline{X}}_{j}|\cos ({\omega }_{0}t+{\phi }_{j})\).

The dynamics of the complex amplitudes *X*_{j} is found from Eq. (1) by a multiple-scale expansion^{50,52} (see Methods). For a range of *h* values above threshold, the dynamics amplifies the amplitude real parts, and suppresses the imaginary parts. The fixed-point values \({\overline{X}}_{j}:=\mathop{\lim }\nolimits_{t\to \infty }{X}_{j}(t)\) are real numbers, i.e., the phase *ϕ*_{j} is binary (either 0 or *π*). In units such that *ω*_{0} = 1, the time evolution of the amplitudes reads

The reason why the PO system in Eq. (2) can describe a *D*-dimensional spin follows from the fixed-point configuration of the amplitude dynamics, which are found as customary by equating Eq. (2) to zero. This implies \(\mathop{\sum }\nolimits_{l=1}^{D}{\overline{X}}_{l}^{2}={S}^{2}\) where \(S=\sqrt{\mathop{\sum }\nolimits_{l=1}^{D}{\overline{X}}_{l}^{2}}= \sqrt{(1/2-1/h)/\beta }\). Thus, \({\{{\overline{X}}_{j}\}}_{j=1}^{D}\) are the Cartesian coordinates of a point on a *D*-dimensional hypersphere, and the corresponding unit vector is a continuous, *D*-dimensional hyperspin, i.e., \(\overrightarrow{\sigma }=({\overline{X}}_{1},\ldots,\,{\overline{X}}_{D})/S\).

To clarify the connection between the PO system in Eq. (1) and a continuous *D*-dimensional spin, we show in Fig. 1c, d, e, f the configuration of the fixed points for the specific cases *D* = 1, 2, 3, 4. We numerically integrate Eq. (2) using different random initial conditions. At the end of each integration, we obtain the real coordinates \({\{{\overline{X}}_{j}\}}_{j=1}^{D}\), and plot them in the *x**y**z*-space as blue or colored dots as follows: For *D* = 1 (panel c), one has a single PO with two fixed points that describe the two values of an Ising spin. In our notation, the PO fixed-point quadrature identifies the *x*-coordinate, and the *y*- and *z*- coordinates are set to zero. For *D* = 2 (panel d), the two quadratures take any value on a circumference, and they identify the *x*- and *y*- coordinates (the *z*-coordinate is set to zero). The corresponding unit vector defines an XY spin. For *D* = 3 (panel e), the three PO quadratures take any value on the surface of a sphere (the *z*-coordinate being identified by \({\overline{X}}_{3}\)), and the unit vector defines an Heisenberg spin. For *D* = 4 (panel f), a fixed point has four coordinates on the surface of a four-dimensional hypersphere. We plot the three-dimensional projected vector \(({\overline{X}}_{1},\,{\overline{X}}_{2},\,{\overline{X}}_{4})\) within the volume of a three-dimensional sphere of radius *S*, and the extra quadrature \({\overline{X}}_{3}\) defines the fourth coordinate *w* whose value is encoded as a color. Following the conventionally adopted terminology in QCD, we name the four-dimensional unit vector as a QCD spin, where the projected vector in the *x**y**z*-space is the “vector” and \({\overline{X}}_{3}\) is the “scalar” field^{47,53,54,55}.

Left panels in Fig. 1g, h, i, j show the composite PO as in panel b, and right panels give a three-dimensional representation of the spin \(\overrightarrow{\sigma }\) in standard hyperspherical coordinates with unit radius^{56,57}: The sign of the PO quadrature for *D* = 1, and polar and spherical coordinates of the quadrature unit vector for *D* = 2 and *D* = 3 respectively. For *D* = 4, the arrow represents the “vector” component in three-dimensional spherical coordinates, while the additional angle encoding the “scalar” coordinate is a color assigned to the outer sphere.

### Coupled *D*-dimensional hyperspins

We now move to the case of coupled composite POs and explicit the relation between the network dynamics and the *D*-vector spin model Hamiltonian^{58}

with non-uniform hyperspin-hyperspin coupling quantified by the adjacency matrix **J**. Starting from Eq. (1) for the single *D*-dimensional hyperspin, we model the PO network simulating *N* coupled hyperspins by the *D* × *N* classical equations of motion

In Eq. (4), we define two different couplings: The matrix **W** describes the nonlinear coupling that organizes the POs as *N* multiplets of *D* commonly pumped POs, and the matrix **C** defines the linear coupling stabilizing the hyperspin network. The off-diagonal element *C*_{jl} quantifies the coupling strength between POs *x*_{j} and *x*_{l}, while *C*_{jj} = − 1 identifies the intrinsic loss for the *j*-th PO. In this arrangement, the *q*-th hyperspin is identified by the PO indexes \(j\in {{\mathbb{S}}}_{q}\) with \({{\mathbb{S}}}_{q}:=\{1+(q-1)D,\ldots,\,qD\}\), where each PO amplitude *X*_{j} within this set identifies the *μ*-th component of the *q*-th hyperspin vector \({\overrightarrow{S}}_{q}\) as \({X}_{j}\to {X}_{\mu+(q-1)D}\equiv {X}_{\mu }^{(q)}\) (see Fig. 2 for a pictorial representation with *N* = *D* = 2). The coupling matrix can in general be written as the sum of a symmetric and antisymmetric part, identifying the dissipative and energy-preserving part of the coupling, respectively^{50,51}. A dissipative coupling is commonly considered when using POs for optimiziation^{59}, while the energy-preserving coupling proposed in^{30} inducing persistent coherent beats between POs has been recently used to realize photonic spiking neurons^{60}. Hereafter, we focus on symmetric coupling matrices.

The equations for the slowly varying amplitudes *X*_{j} from Eq. (4) are detailed in Supplementary Note 2. Figure 2 shows the arrangement as *N* hyperspins with *D* POs. We decompose the coupling matrix as **C** = **J** ⊗ **G**, where **J** is the *N* × *N* adjacency matrix encoding the specific multidimensional spin model, and **G** is a *D* × *D* metric tensor. With this choice of **C** and redefinition of the indexes, when the dynamics of the PO amplitudes suppresses their imaginary parts, one can write (\(j\in {{\mathbb{S}}}_{q}\))

where \({S}_{q}^{2}={\sum }_{l\in {{\mathbb{S}}}_{q}}{X}_{l}^{2}\) denotes the squared amplitude of the *q*-th hyperspin. These amplitudes are unconstrained, and in the steady-state different hyperspins may have different *S*_{q} (amplitude heterogeneity)^{61}. This issue causes the dynamical system to minimize a cost function (coupled oscillators) that in general differs from the desired one (coupled spins)^{59,62,63,64}, eventually spoiling the quality of the solution. The key observation is that, for a given adjacency matrix **J** and in the proper regime of pump amplitude *h* above *h*_{th}, amplitude heterogeneity is reduced and the PO network in Eq. (5) behaves as a gradient descendent system driving the spin configuration towards the minimum of the *D*-vector spin model Hamiltonian in Eq. (3) when \({{{{{{{\bf{G}}}}}}}}={{\mathbb{1}}}_{D}\) and with the spin vectors \({\overrightarrow{\sigma }}_{q}={\overrightarrow{S}}_{q}/{S}_{q}\) (see Methods and Supplementary Note 2 for the proof). Figure 3 exemplifies the construction of the hyperspin machine from the nonlinear and linear couplings [Eqs. (4) and (5) specifically to realize an XY machine (*D* = 2) with *N* = 3 antiferromagnetically coupled XY spins], highlighting the necessity of common pump saturation. For completeness, we also show the equations of motion for the POs in the first hyperspin (*X*_{1} and *X*_{2}). In the absence of nonlinear coupling between POs *X*_{j} and *X*_{j+1} with *j* = 1, 3, 5 [panel (a)], the system consists of *D* disjoint Ising simulators (one identified by *X*_{1}, *X*_{3}, and *X*_{5}, and the other one by *X*_{2}, *X*_{4}, and *X*_{6}), each one simulating the Ising model encoded in the linear coupling. This case does not realize the hyperspin machine. Instead, when POs *X*_{j} and *X*_{j+1} (*j* = 1, 3, 5) saturate the same pump [panel (b)], they become nonlinearly coupled, forming an hyperspin [Eq. (2)], and the *D* × *N* = 6 POs are arranged as *N* = 3 XY spins. The linear coupling between POs in different hyperspins realizes the hyperspin network, and the resulting interplay between nonlinear and linear coupling induces a nontrivial dynamics that encodes the *D*-vector spin model, which in this case simulates three coupled XY spins.

We show in Figs. 4 and 5 two prototype examples of PO connectivity and equivalent representation as hyperspins in the *x**y**z*-space. In Fig. 4, we consider a random complete (K) graph^{65} with *N* = 10 spins for dimension *D* = 1, 2, 3, 4. The adjacency matrix has entries with fixed amplitude ∣*J*_{qp}∣ = 0.03 and sign randomly chosen with equal probability for each *q* and *p*. The case *D* = 1 in panel a represents the Ising model, and Eq. (5) gives the PO dynamics of CIMs^{66}. In this case, each spin takes a binary value, represented by an oriented arrow along the *x*-axis in panel e. The spin state is retrieved from the steady-state values of the PO amplitudes \({\overline{X}}_{j}\equiv {\overline{X}}_{\mu }^{(q)}\) from the numerical integration of the complex amplitude equations, whose real-part evolution is Eq. (5), seeded with a random complex initial condition *X*_{j}(0) (see Supplementary Note 2 and Supplementary Movies 1-3). The higher-dimensional cases in panels b, c, d for *D* = 2, 3, 4 simulate the XY, Heisenberg, and QCD model, respectively. The PO connectivity \({{{{{{{\bf{C}}}}}}}}={{{{{{{\bf{J}}}}}}}}\otimes {{\mathbb{1}}}_{D}\) for the scalar product in Eq. (3) is obtained by connecting a dot of a given color within a multiplet (gray circle) to the dot of the same color in another multiplet. The spin states in panels f, g, h are the representation of the spin vectors in standard hyperspherical coordinates^{56,57} (see Fig. 1). In all these cases, the random orientation of the spins reflects the disordered nature of the graph.

In Fig. 5, we show a hyperspin glass^{2}, i.e., a solid three-dimensional system of *N* spins in the *x**y**z*-space in dimension *D* = 3 and *D* = 4 with nearest-neighbor interaction, arranged as a lattice of *N* = *N*_{x} × *N*_{y} × *N*_{z} hyperspins. Panels a, e and c, g consider a uniform antiferromagnetic interaction, while panels b, f and d, h are with a random binary interaction, where as for the K graphs ∣*J*_{qp}∣ is fixed and its sign is randomly chosen with equal probability. The spin state is obtained as in Fig. 4. For the antiferromagnetic interaction, we obtain from our simulations an antiferromagnetically oriented spin structure, represented by the arrows both for *D* = 3 and *D* = 4 with additional alternating sphere colors. For the other cases (panels b, f and d, h), as for the K graph in Fig. 4, the spin orientation is random due to the disordered interaction. It is important to remark that general spin models have impact in many fields. Notable examples include the Ising^{67} and the Heisenberg spin glass^{44} for *D* = 1 and *D* = 3, respectively, and the finite-temperature phase transition in QCD with two light-quark flavors for *D* = 4^{3,46,47,48}.

### Hyperspin Hamiltonian minimization

We now explicit the working principle of the hyperspin network simulator. We study specifically the *D*-vector model in Eq. (3). The PO network dynamics in Eq. (5) for general *D* drives the system close to the ground state of the *D*-vector Hamiltonian, sharing similarities with the conventional Ising simulators for *D* = 1, but with important differences. The hyperspin structure of *D* multiplet POs is given by the nonlinear coupling due to common pump saturation. For a pump amplitude *h* slightly above the threshold, nonlinearities affect the dynamics on a time scale much slower than the rate of energy exchange due to the linear coupling^{27,63}. The PO amplitudes *X*_{j} freeze to the configuration dictated the eigenvector of **C** with largest eigenvalue. Depending on the specific form of **C**, the configuration may coincide with the one minimizing the cost function. This means that the PO network deterministically solves the selected optimization problem when driven above the threshold. Such a phenomenology allows to conclude that the optimization problem belongs to the polynomial (P) class of computational complexity^{49,68}, because finding the ground state of Eq. (3) reduces to finding the eigenvector of **C** with maximal eigenvalue. This is indeed the case of panels a, e and c, g in Fig. 5 with uniform antiferromagnetic interaction. For general NP problems, the pump amplitude has to be increased to let the system explore a larger configuration space and reduce the heterogeneity of {*S*_{q}}, to increase the quality of the solution. When the spin variables are discrete (*D* = 1), this results into finding the correct solution of the Ising model with finite success probability^{69}.

For the multidimensional hyperspin case *D*≥2, the way the PO network performs the optimization of Eq. (3) is shown in Fig. 6. We focus specifically on the XY model with K graph in Fig. 4b, f, and the random spin glass in Fig. 5d, h with *D* = 4. The phenomenology is common to other choices of **J** (see Supplementary Note 3). We show in panels b, d (blue color) the PO relative energy deviation Δ*E*/∣*E*_{GS}∣, where Δ*E* = *E*_{PO} − *E*_{GS}, as a function of the pump amplitude deviation from threshold Δ*h* = *h* − *h*_{th}. The pump amplitude *h* varies from the analytical threshold to a numerically determined value, above which the PO amplitudes acquire a nonzero imaginary part^{50}. The PO energy *E*_{PO} is found from Eq. (3) by determining the hyperspins from the PO steady-state amplitudes \({\overrightarrow{\sigma }}_{q}=({\overline{X}}_{1}^{(q)},\ldots,\,{\overline{X}}_{D}^{(q)})/{S}_{q}\), and the ground-state value *E*_{GS} is found by numerically minimizing Eq. (3) with respect to the real variables \(\{{X}_{\mu }^{(q)}\}\) using the minimizer NMinimize in Wolfram Mathematica. The horizontal orange dashed line marks the PO energy of the eigenvector of the coupling matrix with largest eigenvalue. We find that the PO energy deviation from the computed ground-state value starts from the eigenvector value and monotonically decreases as the pump amplitude is increased above threshold. This result is intimately related to the decrease of hyperspin amplitude heterogeneity for increasing pump (see Supplementary Note 2 and 3). For the XY model in panels a, b, we find that the the energy deviation reaches values that are below approximately 0.1%, while for the spin-glass QCD model in panels c, d, the energy deviation goes even below approximately 0.01%. The inset in panel b shows the phases *φ*_{q}/*π* of the *N* = 10 XY spins, computed from the PO phases (blue filled circles) and from the numerical minimization of the XY Hamiltonian (open red circles), for a pump amplitude Δ*h*/*h*_{th} = 0.8. As evident, the two data series are overlapped. In light of these results, we conclude that our PO network in Eq. (5) finds to a very good approximation the ground-state of the *D*-vector hyperspin model.

### Dimensional annealing

A notable advantage of the hyperspin machine compared to state-of-the-art continuous spin simulators is the ability to define a spin according to its Cartesian projections. This opens the possibility to emulate quantum-inspired and adiabatic-computation algorithms to solve optimization problems using a purely classical system. We now discuss one of such remarkable applications, i.e., solving the Ising model by performing an annealing protocol starting from the XY model. This application follows from using a time-dependent diagonal metric tensor **G**(*t*) = diag(*α*_{1}, …, *α*_{D}), where *α*_{μ} = *α*_{μ}(*t*) is a time-dependent metric component. Starting from the XY Hamiltonian [Eq. (3) with *D* = 2] at time *t* = 0, which is for **G** = diag(1, 1), we arrive at the Ising Hamiltonian [Eq. (3) with *D* = 1] for times *t* larger than a given “annealing” time *t*_{ann}, with **G** = diag(1, 0). We use *α*_{1} = 1 and independent of *t*. For the other time-dependent metric component, we take *α*_{2}(*t*) = 1 for a time *t* smaller than a fixed *t*_{0}, which is the starting time of the annealing procedure, and *α*_{2}(*t*) = 0 for *t* > *t*_{ann}. For an intermediate time between *t*_{0} and *t*_{ann}, the metric component linearly interpolates between 1 and 0 (see Fig. 7a). In this way, the PO network simulates *H*_{XY} for a time *t* < *t*_{0}, it reduces to *H*_{Ising} for *t* > *t*_{ann}, while for *t* between *t*_{0} and *t*_{ann}, it interpolates between the two models, i.e., *H*(*s*) = (1 − *s*)*H*_{XY} + *s**H*_{Ising}, where *s* = (*t* − *t*_{0})/(*t*_{ann} − *t*_{0}). The resulting PO amplitude dynamics is shown in panel **b**. During an initial nontrivial dynamics for a time smaller than *t*_{0}, the PO network simulates the XY model starting from random initial conditions. In this first stage, as shown in Fig. 6, the system starts to converge towards the minimum of the XY Hamiltonian. For a time larger than *t*_{0}, the reduction of the *α*_{2} metric causes the POs corresponding to the *μ* = 2 components (i.e., *y*, dot-dashed lines) to gradually switch off. The other PO amplitudes defining the *μ* = 1 components (i.e., *x*, full lines) converge to a steady-state following a dynamics dominated by the Ising Hamiltonian. After the annealing procedure, the XY spins are polarized along the *x*-axis and represent an Ising state (see Fig. 4). The reason why we start the annealing procedure after a finite time *t*_{0} is to let the PO amplitudes be amplified sufficiently above the initial random values before reducing the system dimensionality. We remark that the annealing protocol proposed here is not a mere emulation of the conventional quantum annealing, where one seeks for the ground state of the classical Ising model with *z*-aligned spins starting from a configuration along an orthogonal direction (*x* or *y*)^{70}. Our protocol performs a “dimensional crossover” between two *D*-vector models with the same adjacency matrix **J** but in different dimension, specifically from *D* = 2 to *D* = 1. For this reason, we name our protocol as dimensional annealing.

We now focus on a network of *N* = 40 spins and show that the dimensional annealing dramatically increases the success probability to solve the Ising model. To reach this goal, we proceed as follows. We choose four adjacency matrices **J**_{u} with *u* = 1, 2, 3, 4 representing four random complete K graphs with binary edge weights ∣*J*_{qp}∣ = 0.02. For each adjacency matrix, we repeat the numerical integration of the PO amplitudes equations for *D* = 1 a number *M* = 100 of times, and retrieve for each run the Ising spin values from the steady-state amplitudes as described before. From the obtained phases, the *M* Ising energies \({E}_{m,{{{{{{{\rm{PO}}}}}}}}}^{({{{{{{{\rm{Ising}}}}}}}})}\) are computed, where *m* = 1, …, *M*. The success probability *P*_{Ising} is defined as the number of runs such that \({E}_{m,{{{{{{{\rm{PO}}}}}}}}}^{({{{{{{{\rm{Ising}}}}}}}})}={E}_{{{{{{{{\rm{GS}}}}}}}}}^{({{{{{{{\rm{Ising}}}}}}}})}\), divided by *M*. To find the global Ising ground-state energy \({E}_{{{{{{{{\rm{GS}}}}}}}}}^{({{{{{{{\rm{Ising}}}}}}}})}\), we resort to a Monte-Carlo Metropolis-annealing inspired algorithm^{71}. We remark that, differently from the cases *D* ≥ 2 in Fig. 6, we cannot here resort to the numerical minimization of *H*_{Ising} because the minimization is more likely to get stuck in local minima due to discrete nature of the spin variables for *D* = 1. The computation of *P*_{Ising} is performed for different values of the pump amplitude deviation from threshold Δ*h*/*h*_{th} and plotted as red histograms in panels c, d, e, f of Fig. 7. As evident, the success probability is nonzero only in a narrow range of *h* > *h*_{th}, and the details of the histograms critically depend on the coupling matrix. These observations are consistent with those in ref. 63. The fact that the PO network does not find the global solution of the Ising Hamiltonian is a signature of the NP-hard nature of the optimization problem. As the pump amplitude increases, the success probability decreases. This fact is ascribed to the heterogeneity of the amplitudes^{61}: The PO system explores a larger configurational space, and the probability to converge to the global minimum of the Ising model decreases.

We then simulate the XY model with dimensional annealing for the same adjacency matrices **J**_{u}, and compute the success probability of the Ising model (see panel a, b). The resulting histograms are shown in blue in panels c, d, e, f, and compared to the red histograms computed for *D* = 1. While the success probability from the dimensional annealing (blue) and from the discrete spin simulation (red) are comparable within the narrow range of pump amplitude where *P*_{Ising} from the discrete spin simulation is sufficiently large, the success probability for the dimensional annealing stays above 50% even for large pump amplitudes, where the corresponding value from the discrete spin simulation is very small or zero, within our numerical precision. In other words, we find an orders of magnitude increase in the success probability from the *D* = 2 simulation in a parameter range where the conventional *D* = 1 approach fails (including NP-hard cases). This remarkable result is a consequence of the fact that the hyperspin machine finds the state of a discrete spin model from the dynamics of a continuous spin system. At variance with previous studies of high-dimensional spins in the context of semidefinite programming, based on post-processing optimal states in *N* dimensions^{72}, the dimensional annealing simulates the dynamics of coupled POs, allowing to gradually reach in time the target discrete model Hamiltonian. This has a twofold advantage in terms of increasing the probability to find the global minimum of the discrete model: First, the Ising ground-state configuration (i.e., the state with all spins oriented along the same direction) is a particular excited state of the larger class of XY states (i.e., spins taking any orientation on the *x**y*-plane). This fact is exemplified in Fig. 8, where the time variation of the energy *E* from the XY model with and without dimensional annealing is shown. After a first dynamical transient where the energy tends to the steady-state value of the XY model, the dimensionality reduction drives the energy to a minimum of the Ising Hamiltonian, at higher energy compared to the XY model steady-state value. As such, local minima of the energy landscape can be smoothly escaped by exploiting the additional dimension starting from an energy value that is in general below the target one. In contrast, escaping a local minimum in the discrete model itself is harder since it can occur only by full spin flips, which intrinsically requires to overcome a larger stiffness compared to the continuous case. Second, the additional local minima introduced by the second dimension are adiabatically eliminated in time by the dimensional crossover. Therefore, the final minimum found by the annealing is by construction a minimum of the Ising Hamiltonian. Before concluding, we remark that this mechanism to escape local minima of the discrete target model is profoundly different from that of noisy Ising simulators, where noise is either an additive noise inducing fluctuations of the real PO amplitudes^{20,51}, or an effective noise resulting from the fluctuating dynamics of real and imaginary PO amplitudes around a fixed point^{21}. In this case, when the Ising spins are defined from the real PO amplitudes, noise simply eases the exploration of the Ising energy landscape by inducing random flips of the Ising spin. In proper conditions, such an erratic exploration prevents the system from being stuck in high-energy states of the Ising Hamiltonian, thus enhancing the probability to reach low-energy minima from states at higher Ising energy. The dimensional annealing, instead, eases the exploration of the energy landscape by tuning the system topology, adiabatically changing the energy landscape from the XY to the Ising one, and allowing the reach of low-energy Ising configurations from states at lower energy.

## Discussion

We propose and theoretically validate a network of coupled POs to simulate systems of hyperspins in general dimension *D*. An isolated hyperspin is realized by feeding *D* POs with the same pump field, forming a PO multiplet, and a network of coupled hyperspins is achieved by coupling POs belonging to different multiplets. Focusing on PO connectivities implementing the standard Euclidian scalar product, we show that our system finds to a very good approximation the minimum of the *D*-vector spin Hamiltonian. An advantage of our proposal is that we construct an hyperspin from its Cartesian coordinates, each represented by a specific PO in the multiplet. Thus, we can implement spin models with arbitrary connectivity and emulate quantum algorithms on a purely classical system. We exploit this feature to propose a dimensional annealing protocol, which interpolates between the XY and Ising Hamiltonians. We show that our protocol significantly enhances the success probability to find the global minimum of the Ising Hamiltonian for selected coupling matrices. Intriguing future developments will be the implementation of effective magnetic fields, whose realization with POs for the Ising model has been proposed in ref. 73, as well as the simulation of nonzero temperature in a controllable way^{37}. The hyperspin machine paves the way towards the numerical and experimental study of previously unaccessible critical phenomena in advanced spin models, as well as the simulation of quantum spin models like the Ising model in a transverse field^{74} at an unprecedented scale. In this manuscript, we focus on the *D*-vector spin model, but our system allows the implementation of general spin Hamiltonians where a PO of a given spin is connected to any other PO in another spin, i.e.,

The hyperspin machine can hence simulate spin models with anisotropic interactions. A relevant case is with *D* = 3, which describes the anisotropic Heisenberg model with symmetric and Dzyaloshinsky-Moriya interactions stabilizing nontrivial magnetic textures in solids^{43,75,76}. Furthermore, in this manuscript, we focus on identical PO multiplets. However, the hyperspin machine allows multiplets of any size within the same network, opening the possibility to realize models with hybrid symmetries^{77}. The design of the hyperspin machine with POs opens the future perspective to experimentally realize fully optical, scalable, and size-independent continuous spin simulators, extending recent proposals with an optical cavity with a nonlinear medium and spatial light modulators, similar to that in ref. 49 for the Ising model.

## Methods

### Multiple-time scale expansion

The equations of motion for the slow-varying complex PO amplitudes {*X*_{j}} in Eq. (2) are found from those of the PO variables {*x*_{j}} in Eq. (1) using the multiple-time scale perturbative method in refs. 50, 52. We identify a small expansion parameter (*g*) and define two different time scales, one for the fast oscillations at frequency *ω*_{0}, identified by *t*, and another one *g**t* characterizing the slow dynamics of the PO amplitudes. We then expand \({x}_{j}\equiv {x}_{j}(t,\,gt)={x}_{j}^{(0)}+g\,{x}_{j}^{(1)}\). By plugging this expansion in the equations of motion and by separating terms that are multiplied by *g* by those that are not, we first obtain \({x}_{j}^{(0)}(t,\,gt)={X}_{j}(gt){e}^{i{\omega }_{0}t}+{X}_{j}^{*}(gt){e}^{-i{\omega }_{0}t}\), and then by imposing the solvability condition for \({x}_{j}^{(1)}\), i.e., requiring that all terms in the equation \({d}^{2}{x}_{j}^{(1)}/d{t}^{2}\) that are multiplied by \({e}^{\pm i{\omega }_{0}t}\) vanish, the equation of motion for the complex amplitudes {*X*_{j}} are obtained

and in the long-time limit, where the imaginary part is exponentially suppressed (see Supplementary Note 1) so \({X}_{j}\in {\mathbb{R}}\), for all *j*, Eq. (7) reduces to Eq. (2).

### Hyperspin network as gradient descendent

The fact that the system in Eq. (5) behaves as a gradient descendent driving the spin configuration towards the minimum of the *D*-vector spin model Hamiltonian in Eq. (3) when amplitude heterogeneity is suppressed, is proved by showing that the dynamics tends to minimize the Lyapunov function

It can be shown by explicit inspection that ∂*V*/∂*X*_{k} = − *d**X*_{k}/*d**t* (see Supplementary Note 2) and then

which means that the dynamics is such that *d**V*/*d**t* ≤ 0, where the lower bound *d**V*/*d**t* = 0 is found at the steady state (fixed point) where *d**X*_{k}/*d**t* = 0, for all *k*. It follows that the fixed point is a minimum of *V* (i.e., *V* is bounded from below). The fact that *d**V*/*d**t* < 0 plus the existence of a steady-state allows to conclude that *V* in Eq. (8) is a Lyapunov function for the system in Eq. (5), and the dynamics drives the system towards a minimum of *V*. To relate the minimum of *V* to that of *H*_{D} in Eq. (3) when \({{{{{{{\bf{G}}}}}}}}={{\mathbb{1}}}_{D}\) and when amplitude heterogeneity is suppressed, we define \(\overline{S}={N}^{-1}\mathop{\sum }\nolimits_{q=1}^{N}{S}_{q}\), and \({S}_{q}=\overline{S}(1+{\delta }_{q})\), where *δ*_{q} denotes the deviation of *S*_{q} from the equalized amplitude \(\overline{S}\). Then \({X}_{\mu }^{(q)}={\sigma }_{\mu }^{(q)}{S}_{q}={\sigma }_{\mu }^{(q)}\overline{S}(1+{\delta }_{q})\). By using this expression of \(\{{X}_{\mu }^{(q)}\}\) into Eq. (8), we have

where the correction *v*(*X*_{1}, …, *X*_{DN}) includes terms where at least one power of *δ*_{q} appears. When the amplitudes are exactly equalized, i.e., *δ*_{q} = 0, for all *q*, so *v* = 0, the dynamics tends towards a minimum of a function that is proportional to *H*_{D}, apart from a constant shift and a rescaling by the positive quantity \({\overline{S}}^{2}/4\). For small *δ*_{q}, the minima of *V* deviate from those of *H*_{D}, but the deviation is of order of \({\max }_{q}\{|{\delta }_{q}|\}\), and so the PO amplitude configuration corresponding to the minimum of *V* is expected to be close to that of *H*_{D}, which is, the ground-state hyperspin configuration. This is indeed the scenario found in our numerical simulations, i.e., the fact that the energy from the hyperspin machine approaches the ground-state energy of *H*_{D} (see Fig. 6) is intimately related to the reduction of amplitude heterogeneity, quantified by the heterogeneity degree \({A}_{{{{{{{{\rm{het}}}}}}}}}:={\max }_{q}\{{\delta }_{q}\}-{\min }_{q}\{{\delta }_{q}\}\) (see Supplementary Note 3).

### Details on the numerical simulations

In the numerical data on the energy minimization in Fig. 6, the value of *E*_{PO} is computed as the minimal spin energy retrieved from the steady-state PO amplitudes out of 50 repetitions of the PO network dynamics, for fixed simulation parameters. This is done to avoid detecting energy values of excited states, which in general may happen if the PO dynamics converges to local minima of the energy landscape. Notice that the reduction of amplitude heterogeneity ensures only that the mapping between the PO network cost function and the target cost function (coupled spins) is proper, but in general it does not ensure the convergence to the ground-state solution, since local minima of the spin Hamiltonian may always be encountered^{61}. In our numerics, we checked that the retrieved spin configuration indeed corresponded to a global minimum (no value lower than the reported values of *E*_{PO} was ever detected). The value of *E*_{GS} is computed by minimizing the *D*-vector spin Hamiltonian for the same adjacency matrix by using NMinimize in Wolfram Mathematica. Our numerical code to find the steady-state PO amplitudes performs the integration of Eq. (5) in C language by means of a fourth-order Runge-Kutta method with time step 0.05, and the results are double checked by integrating the same equations by the numerical integrator NDSolve in Wolfram Mathematica.

## Data availability

All the data supporting the findings in this work are available within the manuscript and Supplementary Information files, and any additional data are available from the corresponding author upon reasonable request.

## References

Grosso, G. & Parravicini, G. P.

*Solid State Physics*(Elsevier Science, 2013).Mezard, M. Parisi, G. & Virasoro, M. A.

*Spin Glass Theory and Beyond: An Introduction to the Replica Method and its Applications*(*World Scientific Lecture Notes in Physics*) (World Scientific Publishing Company, 1987).Pelissetto, A. & Vicari, E. Critical phenomena and renormalization-group theory.

*Phys. Reps.***368**, 549–727 (2002).De las Cuevas, G., Dür, W., Van den Nest, M. & Briegel, H. J. Completeness of classical spin models and universal quantum computation.

*J. Stat. Mech.***2009**, P07001 (2009).Lucas, A. Ising formulations of many NP problems.

*Front. Phys.***2**, 5 (2014).Date, P., Arthur, D. & Pusey-Nazzaro, L. QUBO formulations for training machine learning models.

*Sci. Rep.***11**, 10029 (2021).Graham, D. I. & Craven, M. J. An exact algorithm for small-cardinality constrained portfolio optimisation.

*J. Op. Res. Soc.***72**, 1415–1431 (2021).Gilli, M., Maringer, D. & Schumann, E.

*Numerical Methods and Optimization in Finance*(Elsevier Science, 2011).Zhang, Q., Deng, D., Dai, W., Li, J. & Jin, X. Optimization of culture conditions for differentiation of melon based on artificial neural network and genetic algorithm.

*Sci. Rep.***10**, 3524 (2020).Ohzeki, M., Okada, S., Terabe, M. & Taguchi, S. Optimization of neural networks via finite-value quantum fluctuations.

*Sci. Rep.***8**, 9950 (2018).Pierce, N. A. & Winfree, E. Protein design is NP-hard.

*Protein Eng.***15**, 779 (2002).Cheng, C. H., Kuo, Y. H. & Zhou, Z. Outbreak minimization v.s. influence maximization: an optimization framework.

*BMC Med. Inform. Decis. Mak.***20**, 266 (2020).Degasperi, A., Fey, D. & Kholodenko, B. N. Performance of objective functions and optimisation procedures for parameter estimation in system biology models.

*npj Syst. Biol. Appl.***3**, 20 (2017).Ghiringhelli, L. M., Vybiral, J., Levchenko, S. V., Draxl, C. & Scheffler, M. Big data of materials science: Critical role of the descriptor.

*Phys. Rev. Lett.***114**, 105503 (2015).Barahona, F. On the computational complexity of Ising spin glass models.

*J. Phys. A***15**, 3241–3253 (1982).Rougemaille, N. & Canals, B. Cooperative magnetic phenomena in artificial spin systems: spin liquids, Coulomb phase and fragmentation of magnetism - a colloquium.

*Eur. Phys. J. B***92**, 62 (2019).Byrnes, T., Yan, K. & Yamamoto, Y. Accelerated optimization problem search using Bose-Einstein condensation.

*New J. Phys.***13**, 113025 (2011).Byrnes, T., Koyama, S., Yan, K. & Yamamoto, Y. Neural networks using two-component Bose-Einstein condensates.

*Sci. Rep.***3**, 2531 (2013).Johnson, M. W. et al. Quantum annealing with manufactured spins.

*Nature***437**, 194–198 (2011).Tiunov, E. S., Ulanov, A. E. & Lvovsky, A. I. Annealing by simulating the coherent Ising machine.

*Opt. Express***27**, 10288–10295 (2019).Goto, H., Tatsumura, K. & Dixon, A. R. Combinatorial optimization by simulating adiabatic bifurcations in nonlinear Hamiltonian systems.

*Sci. Adv.***5**, eaav2372 (2019).Tatsumura, K., Yamasaki, M. & Goto, H. Scaling out Ising machines using a multi-chip architecture for simulated bifurcation.

*Nat. Electron.***4**, 208–217 (2021).Chou, J., Bramhavar, S., Ghosh, S. & Herzog, W. Analog coupled oscillator based weighted Ising machine.

*Sci. Rep.***9**, 14786 (2019).Böhm, F., Verschaffelt, G. & Van der Sande, G. A poor man’s coherent Ising machine based on opto-electronic feedback systems for solving optimization problems.

*Nat. Commun.***10**, 3538 (2019).Wang, Z., Marandi, A., Wen, K., Byer, R. L. & Yamamoto, Y. Coherent Ising machine based on degenerate optical parametric oscillators.

*Phys. Rev. A***88**, 063853 (2013).Marandi, A., Wang, Z., Takata, K., Byer, R. L. & Yamamoto, Y. Network of time-multiplexed optical parametric oscillators as a coherent Ising machine.

*Nat. Photon.***8**, 937 (2014).Hamerly, R. et al. Topological defect formation in 1D and 2D spin chains realized by network of optical parametric oscillators.

*Int. J. Mod. Phys. B***30**, 1630014 (2016).Clements, W. R. et al. Gaussian optical Ising machines.

*Phys. Rev. A***96**, 043850 (2017).Pierangeli, D., Marcucci, G. & Conti, C. Large-scale photonic Ising machine by spatial light modulation.

*Phys. Rev. Lett.***122**, 213902 (2019).Bello, L., Calvanese Strinati, M., Dalla Torre, E. G. & Pe’er, A. Persistent coherent beating in coupled parametric oscillators.

*Phys. Rev. Lett.***123**, 083901 (2019).Wang, T. & Roychowdhury, J.

*Unconventional Computation and Natural Computation.*232–256 (Springer International Publishing, Cham, 2019). https://doi.org/10.1007/978-3-030-19311-9_19.Okawachi, Y. et al. Demonstration of chip-based coupled degenerate optical parametric oscillators for realizing a nanophotonic spin-glass.

*Nat. Commun.***11**, 4119 (2020).Pierangeli, D., Marcucci, G. & Conti, C. Adiabatic evolution on a spatial-photonic Ising machine.

*Optica***7**, 1535–1543 (2020).Zhou, Z.-Y., Gneiting, C., You, J. Q. & Nori, F. Generating and detecting entangled cat states in dissipatively coupled degenerate optical parametric oscillators.

*Phys. Rev. A***104**, 013715 (2021).Pal, V., Mahler, S., Tradonsky, C., Friesem, A. A. & Davidson, N. Rapid fair sampling of the

*X**Y*spin Hamiltonian with a laser simulator.*Phys. Rev. Research***2**, 033008 (2020).Honari-Latifpour, M. & Miri, M.-A. Mapping the

*X**Y*Hamiltonian onto a network of coupled lasers.*Phys. Rev. Research***2**, 043335 (2020).Takeda, Y. et al. Boltzmann sampling for an

*X**Y*model using a non-degenerate optical parametric oscillator network.*Quantum Sci. Tech.***3**, 014004 (2017).Berloff, N. G. et al. Realizing the classical

*X**Y*Hamiltonian in polariton simulators.*Nat. Mat.***16**, 1120–1126 (2017).Kim, K. et al. Quantum simulation of frustrated Ising spins with trapped ions.

*Nature***465**, 590–593 (2010).Britton, J. W. et al. Engineered two-dimensional Ising interactions in a trapped-ion quantum simulator with hundreds of spins.

*Nature***484**, 489–492 (2012).Monroe, C. et al. Programmable quantum simulations of spin systems with trapped ions.

*Rev. Mod. Phys.***93**, 025001 (2021).Arias Espinoza, J. D. et al. Engineering spin-spin interactions with optical tweezers in trapped ions.

*Phys. Rev. A***104**, 013302 (2021).Borisov, V. et al. Heisenberg and anisotropic exchange interactions in magnetic materials with correlated electronic structure and significant spin-orbit coupling.

*Phys. Rev. B***103**, 174422 (2021).Baity-Jesi, M. & Martín-Mayor, V. Precursors of the spin glass transition in three dimensions.

*J. Stat. Mech.***2019**, 084016 (2019).Schubert, D. et al. Quantum versus classical dynamics in spin models: Chains, ladders, and square lattices.

*Phys. Rev. B***104**, 054415 (2021).Pisarski, R. D. & Wilczek, F. Remarks on the chiral phase transition in chromodynamics.

*Phys. Rev. D***29**, 338–341 (1984).Engels, J. & Karsch, F. Scaling functions of the free energy density and its derivatives for the 3

*d**O*(4) model.*Phys. Rev. D***85**, 094506 (2012).Ding, H.-T. et al. Chiral phase transition temperature in (2 + 1)-flavor QCD.

*Phys. Rev. Lett.***123**, 062002 (2019).Calvanese Strinati, M., Pierangeli, D. & Conti, C. All-optical scalable spatial coherent Ising machine.

*Phys. Rev. Appl.***16**, 054022 (2021).Calvanese Strinati, M., Bello, L., Pe’er, A. & Dalla Torre, E. G. Theory of coupled parametric oscillators beyond coupled Ising spins.

*Phys. Rev. A***100**, 023835 (2019).Calvanese Strinati, M. et al. Coherent dynamics in frustrated coupled parametric oscillators.

*New J. Phys.***22**, 085005 (2020).Kevorkian, J. K. & Cole, J. D.

*Multiple Scale and Singular Perturbation Methods*(Springer, 1996).Tetradis, N. The quark-meson model and the phase diagram of two-flavour QCD.

*Nucl. Phys. A***726**, 93–119 (2003).Schaefer, B.-J. & Wambach, J. The phase diagram of the quark-meson model.

*Nucl. Phys. A***757**, 479–492 (2005).Braun, J., Klein, B., Pirner, H.-J. & Rezaeian, A. H. Volume and quark mass dependence of the chiral phase transition.

*Phys. Rev. D***73**, 074010 (2006).Kalnins, E. G., Miller, W. & Pogosyan, G. S. The Coulomb-oscillator relation on

*n*-dimensional spheres and hyperboloids.*Phys. Atom. Nuclei***65**, 1086 (2002).Jing-Jing, F., Ling, H. & Shi-Jie, Y. Solutions of Laplace equation in

*n*-dimensional spaces.*Commun. Theor. Phys.***56**, 623 (2011).Stanley, H. E. Scaling, universality, and renormalization: three pillars of modern critical phenomena.

*Rev. Mod. Phys.***71**, S358–S366 (1999).Yamamoto, Y., Leleu, T., Ganguli, S. & Mabuchi, H. Coherent Ising machines-quantum optics and neural network perspectives.

*Appl. Phys. Lett.***117**, 160501 (2020).Inagaki, T. et al. Collective and synchronous dynamics of photonic spiking neurons.

*Nat. Commun.***12**, 2325 (2021).Leleu, T., Yamamoto, Y., McMahon, P. L. & Aihara, K. Destabilization of local minima in analog spin systems by correction of amplitude heterogeneity.

*Phys. Rev. Lett.***122**, 040607 (2019).Vadlamani, S. K., Xiao, T. P. & Yablonovitch, E. Physics successfully implements Lagrange multiplier optimization.

*Proc Natl Acad. Sci. USA***117**, 26639–26650 (2020).Calvanese Strinati, M., Bello, L., Dalla Torre, E. G. & Pe’er, A. Can nonlinear parametric oscillators solve random Ising models?

*Phys. Rev. Lett.***126**, 143901 (2021).Roychowdhury, J. A global Lyapunov function for the coherent Ising machine.

*NOLTA, IEICE***13**, 227–232 (2022).Gries, D. & Schneider, F. B.

*A Logical Approach to Discrete Math*(Springer-Verlag, 1993).Yamamoto, Y. et al. Coherent Ising machines-optical neural networks operating at the quantum limit.

*njp Quant. Inf.***3**, 49 (2017).Wang, W., Wallin, M. & Lidmar, J. Evidence of many thermodynamic states of the three-dimensional Ising spin glass.

*Phys. Rev. Res.***2**, 043241 (2020).Kalinin, K. P. & Berloff, N. G. Computational complexity continuum within Ising formulation of NP problems.

*Commun. Phys.***5**, 20 (2022).Hamerly, R. et al. Experimental investigation of performance differences between coherent Ising machines and a quantum annealer.

*Sci. Adv.***5**, eaau0823 (2019).Kadowaki, T. & Nishimori, H. Quantum annealing in the transverse Ising model.

*Phys. Rev. E***58**, 5355–5363 (1998).Metropolis, N., Rosenbluth, A. W., Rosenbluth, M. N., Teller, A. H. & Teller, E. Equation of state calculations by fast computing machines.

*J. Chem. Phys.***21**, 1087 (1953).Goemans, M. X. & Williamson, D. P. Improved approximation algorithms for maximum cut and satisfiability problems using semidefinite programming.

*J. Assoc. Comput. Mach.***42**, 1115 (1995).Takesue, H. et al. Simulating Ising spins in external magnetic fields with a network of degenerate optical parametric oscillators.

*Phys. Rev. Appl.***13**, 054059 (2020).Pfeuty, P. The one-dimensional Ising model with a transverse field.

*Ann. Phys.***57**, 79–90 (1970).Dzyaloshinsky, I. A thermodynamic theory of “weak” ferromagnetism of antiferromagnetics.

*J. Phys. Chem. Sol.***4**, 241–255 (1958).Moriya, T. Anisotropic superexchange interaction and weak ferromagnetism.

*Phys. Rev.***120**, 91–98 (1960).Struck, J. et al. Engineering Ising-

*X**Y*spin-models in a triangular lattice using tunable artificial gauge fields.*Nat. Phys.***9**, 738 (2013).

## Acknowledgements

We thank Davide Pierangeli for fruitful discussions.

## Author information

### Authors and Affiliations

### Contributions

M.C.S. and C.C. contributed equally to this work.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Peer review

### Peer review information

*Nature Communications* thanks the anonymous reviewers for their contribution to the peer review of this work.

## Additional information

**Publisher’s note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Calvanese Strinati, M., Conti, C. Multidimensional hyperspin machine.
*Nat Commun* **13**, 7248 (2022). https://doi.org/10.1038/s41467-022-34847-9

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s41467-022-34847-9

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.