  We recently proposed polariton graphs as a novel platform for solving hard
optimization problems that can be mapped into the $XY$ model. Here, we
elucidate a relationship between the energy spectrum of the $XY$ Hamiltonian
and the total number of condensed polariton particles. Using as a test-bed the
hexagonal unit lattice we show that the lower energy states of the $XY$
Hamiltonian are faithfully reproduced by mean-field numerical simulations
utilising the Ginzburg--Landau equation coupled to an exciton reservoir. Our
study paves the way to simulating the spectral gap of the XY model using
polariton graphs.
