An On-demand Photonic Ising Machine with Simpli�ed Hamiltonian Calculation by Phase-encoding and Intensity Detection