1: \begin{abstract}
2: Photonic Ising Machines constitute an emergent new paradigm of computation,
3: geared towards tackling combinatorial optimization problems that can be
4: reduced to the problem of finding the ground state of an Ising model.
5: Spatial Photonic Ising Machines have proven to be advantageous for
6: simulating fully connected large-scale spin systems. However, fine control
7: of a general interaction matrix $J$ has so far only been accomplished
8: through eigenvalue decomposition methods that either limit the scalability
9: or increase the execution time of the optimization process. We introduce
10: and experimentally validate a SPIM instance that enables direct control
11: over the full interaction matrix, enabling the encoding of Ising
12: Hamiltonians with arbitrary couplings and connectivity. We
13: demonstrate the conformity of the experimentally measured Ising
14: energy with the theoretically expected values and then proceed to solve
15: both the unweighted and weighted graph partitioning problems, showcasing a
16: systematic convergence to an optimal solution via simulated annealing. Our
17: approach greatly expands the applicability of SPIMs for real-world
18: applications without sacrificing any of the inherent advantages of the
19: system, and paves the way to encoding the full range of NP problems that
20: are known to be equivalent to Ising models, on SPIM devices.
21: \end{abstract}
22: