We study the fluctuations of time-additive random observables in the stochastic dynamics of a system of [Formula: see text] non-interacting Ising spins. We mainly consider the case of all-to-all dynamics where transitions are possible between any two spin configurations with uniform rates. We show that the cumulant generating function of the time-integral of a normally distributed quenched random function of configurations, i.e. the energy function of the random energy model (REM), has a phase transition in the large [Formula: see text] limit for trajectories of any time extent. We prove this by determining the exact limit of the scaled cumulant generating function. This is accomplished by connecting the dynamical problem to a spectral analysis of the all-to-all quantum REM. We also discuss finite [Formula: see text] corrections as observed in numerical simulations. This article is part of the theme issue 'Quantum annealing and computation: challenges and perspectives'.
Keywords: disordered systems; dynamical phase transition; glass transition; large deviations.