The spatial photonic Ising machine has achieved remarkable advancements in
solving combinatorial optimization problems. However, it still remains a huge
challenge to flexibly mapping an arbitrary problem to Ising model. In this
paper, we propose a general spatial photonic Ising machine based on interaction
matrix eigendecomposition method. Arbitrary interaction matrix can be
configured in the two-dimensional Fourier transformation based spatial photonic
Ising model by using values generated by matrix eigendecomposition. The error
in the structural representation of the Hamiltonian decreases substantially
with the growing number of eigenvalues utilized to form the Ising machine. In
combination with the optimization algorithm, as low as 65% of the eigenvalues
is required by intensity modulation to guarantee the best probability of
optimal solution for a 20-vertex graph Max-cut problem, and this probability
decreases to below 20% for zero best chance. Our work provides a viable
approach for spatial photonic Ising machines to solve arbitrary combinatorial
optimization problems with the help of multi-dimensional optical property