  The coherent electron spin dynamics of an ensemble of singly charged
(In,Ga)As/GaAs quantum dots in a transverse magnetic field is driven by
periodic optical excitation at 1 GHz repetition frequency. Despite the strong
inhomogeneity of the electron $g$ factor, the spectral spread of optical
transitions, and the broad distribution of nuclear spin fluctuations, we are
able to push the whole ensemble of excited spins into a single Larmor
precession mode that is commensurate with the laser repetition frequency.
Furthermore, we demonstrate that an optical detuning of the pump pulses from
the probed optical transitions induces a directed dynamic nuclear polarization
and leads to a discretization of the total magnetic field acting on the
electron ensemble. Finally, we show that the highly periodic optical excitation
can be used as universal tool for strongly reducing the nuclear spin
fluctuations and preparation of a robust nuclear environment for subsequent
manipulation of the electron spins, also at varying operation frequencies.
