  The modulation and engineering of the free-electron wave function bring new
ingredients to the electron-matter interaction. We study the dynamics of a
free-electron passing by a two-level system fully quantum mechanically and
emphasize the enhancement of interaction from the modulation of the
free-electron wave function. In presence of modulation of the free-electron
wave function, we show that the electron energy loss/gain spectrum is greatly
enhanced for a coherent initial state of the two-level system, which can
function as a probe of the atomic coherence. We further find that distantly
separated two-level atoms can be entangled through interacting with the same
free electron. For a dilute beam of modulated electrons interacting with the
atom, our theory shows the enhanced interaction due to resonant modulation.
