# Momentum operator derivation in QFT from QM

In David Tong`s QFT notes there is a chapter about the derivation of the momentum operator from quantum mechanics (page 44) where he is showing that the momentum operator can be expressed by the spatial derivative, i. e. $$P |\phi\rangle= \int {\rm d}^3 x \left(-i \frac{\partial \phi}{\partial x}\right)|\vec x\rangle.$$

To arrive at equation 2.122 he then makes the step \begin{align} P |\phi\rangle &= \int \frac{{\rm d}^3 x \,{\rm d}^3 p}{(2\pi)^3} a^\dagger \left(i \frac{\partial}{\partial x} e^{-i\vec p \vec x}\right) \phi({\vec {x}})|0\rangle\\ &= \int \frac{{\rm d}^3 x \,{\rm d}^3 p}{(2\pi)^3} e^{-i\vec p \vec x}\left(-i \frac{\partial \phi({\vec {x}})}{\partial x} \right) a^\dagger|0\rangle \end{align} which is not really clear to me. Can anyone help to see what happened there?