Time-dependent ultrafast diffraction measurements can be directly inverted to obtain the dynamics of atomic motions, in contrast to ultrafast spectra which require detailed knowledge of the sample (e.g., potential energy surfaces) for their inversion. We consider here how to derive time-dependent diffraction (the X-ray and electron diffraction cases being very similar) from nuclear quantum dynamics and vice versa and how this may be used to directly observe the atomic motions in molecules, in particular how chemical reactions take place. Two simple examples of dissociative and bound quantum (vibrational and rotational) dynamics in a gas-phase sample of diatomic molecules, excited by an optical pump pulse and measured by an electron or X-ray probe pulse, are presented. The quantum mechanical basis of the breaking of symmetry due to the linearly polarized optical pump pulse and the superposition and interference between the ground and excited electronic states are discussed. We demonstrate how to isolate the short-time excited-state dynamics from that of the ground state using the symmetry of the electronic dipole transition. We illustrate that the time-evolving distribution of interatomic distances can be clearly resolved from the ultrafast diffraction data and thus illustrate that the detailed dynamics of molecular vibration and the progress of a photodissociation reaction could be watched as they occur. In addition, we show that the duration of ultrafast X-ray and electron pulses can be measured with a time resolution of tens of femtoseconds by clocking it against such atomic motion.