[2306.06539] A Universal Quantum Algorithm for Weighted Maximum Cut and Ising Problems