The quantum theory of the non-ideal gas I. Deviations from the classical theory