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 [1,2], magnetic impurities embedded in solid helium [3], atoms in optical lattices [4,5], photons [6], trapped ions [7,8] and superconducting q-bits [9] 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-KosterlitzThouless phase transition, classical magnetism among the many systems that are described by the XY Hamiltonian.Many properties of strongly correlated spin systems, such as spin liquids and unconventional superfluids are difficult to study as strong interactions between n particles become intractable for n as low as 30 [10]. Feynman envisioned that a quantum simulator -a special-purpose analogue processor -could be used to solve such problems [11]. It is expected that quantum simulators would lead to accurate modelling of the dynamics of chemical reactions, motion of electrons in materials, new chemical compounds and new materials that could not be obtained with classical computers using advanced numerical algorithms [12]. More generally, quantum simulators can be used to solve hard optimization problems that are at the heart of almost any multicomponent system: new materials for energy, pharmaceuticals, and photosynthesis, among others [13]. Many hard optimisation problems do not necessitate a quantum simulator as only recently realised through a network of optical parametric oscillators (OPOs) that simulated the Ising Hamiltonian of thousands of spins [14,15]. The Ising model corresponds to the n = 1 case of the n-vector model of classical unit vector spins s i with the Hamiltonian H I = − ij J ij s i · s j , where J ij is the coupling between the sites labelled i and j. For n = 2 the n-vector Hamiltonian becomes the XY Hamiltonian H XY = − ij J ij cos(θ i − θ j ), where we have parameterized unit planar vectors using the polar coordinates s i = (cos θ i , sin θ i ). Since H XY is invariant under rotation of all spins by the same angle θ i → θ i + φ the XY model is the simplest model that undergoes the U (1) symmetry-breaking transition. As such, it is used * correspondence address: pavlos.lagoudakis@soton.ac.uk to emulate Berezinskii-Kos...