  Several platforms are currently being explored for simulating physical
systems whose complexity increases faster than polynomially with the number of
particles or degrees of freedom in the system. Defects and vacancies in
semiconductors or dielectric materials, magnetic impurities embedded in solid
helium \cite{lemeshko13}, atoms in optical lattices, photons, trapped ions and
superconducting q-bits are among the candidates for predicting the behaviour of
spin glasses, spin-liquids, and classical magnetism among other phenomena with
practical technological applications. Here we investigate the potential of
polariton graphs as an efficient simulator for finding the global minimum of
the $XY$ Hamiltonian. By imprinting polariton condensate lattices of bespoke
geometries we show that we can simulate a large variety of systems undergoing
the U(1) symmetry breaking transitions. We realise various magnetic phases,
such as ferromagnetic, anti-ferromagnetic, and frustrated spin configurations
on unit cells of various lattices: square, triangular, linear and a disordered
graph. Our results provide a route to study unconventional superfluids,
spin-liquids, Berezinskii-Kosterlitz-Thouless phase transition, classical
magnetism among the many systems that are described by the $XY$ Hamiltonian.
