The momentum operator $\hat{P}$ acts on a position ket or bar is tricky.

$\left

$B A \hat{P}\left|x\right> = B i\frac{d}{dx} ( A \left|x\right>)$

I added $A$ and $B$ to emphasize the tricky point, where $A$ or $B$ can be an operator, a ket, a bar, or a variable. We can see, after the first quantization, the position bar or ket is always waiting for something and the derivative is differentiate the whole thing, not only the bar or ket. Miss use will result incorrect result. for example, the non-commute property of the position and the momentum operator,

$\left= -i\frac{d}{dx} (\left =-i\frac{d}{dx} (\left$

$=-i x \frac{d}{dx} (\left - i = x \left - i = \left$

If you use it wrongly, you may have something like

$\left = -i\frac{d\left$

or

$\left = -i\frac{d}{dx} (\left) = -i\frac{d}{dx}(x) = -i$

The translation operator.

In many text book, the translation operator is stated as

$D(\epsilon) = 1 - i \hat{P} \epsilon$,

where $\hat{P}$ is momentum operator or the generator of displacement.

*********************

Actually, there is a reason, notice that the translation operator is unitary operator,

$D(\epsilon)D^{\dagger}(\epsilon) = 1$

because

$\langle x|D^{\dagger} D |x\rangle = 1$

then , since any unitary operator can be written as

$D(\epsilon) = \exp(-i \epsilon \hat{Q}) \sim 1 - i \epsilon \hat{Q} +....$

where $\hat{Q}$ is a Hermitian operator.

But what is $\hat{Q}$ ? since $\hat{Q}$ is Hermitian, it has eigen ket and eigenvalue,

$\hat{Q} \left|q\right> = \left|q\right> q$.

The, we can check

$\left = \left = \left =\exp(-i \epsilon q) \left$

also

$\left = \left = \exp(-i \epsilon q) \left$

we set a wave function $\psi_q(x) = \left$

$\psi_q(x-\epsilon) = \exp(-i\epsilon q ) \psi_q(x)$

Then, we can have a derivative of the wave function

$\frac{d}{dx}\phi_q(x) =\lim_{\epsilon\to 0} \frac{\exp(i\epsilon q ) -1 }{\epsilon} \psi_q(x) = i q \psi_q(x)$

the solution is $\psi_q(x) = \exp(iqx)$, which is a plane wave with momentum q. Therefore, the operator $\hat{Q}$ is the momentum operator, and it is really a generator a translation on the wave function $\psi_q(x) \rightarrow \psi_q(x+\epsilon)$. To find the form of the momentum operator acting on position bar,

$\left = q \exp(-i q x) = -i \frac{d}{dx}( \exp(-iqx)) = -i\frac{d}{dx} (\left)$

$\left

*********************************

another mathematical way to do is, using Taylor series,

$D(\epsilon) \left|x\right> = \left|x+\epsilon\right> = \left|x\right> + \epsilon \frac{d}{dx}\left|x\right> + ...$

compare with the exponential, than

$\hat{Q}\left|x\right> = i\frac{d}{dx} ( \left|x\right>)$.

$\left = -i \frac{d}{dx}(\left) =\left q$.

The time propagation and angle rotation can also do in the same way. The rotation around z-axis is trivial, but a general rotation is not so easy in detail, but the idea can be generalized that the rotation generator is $\vec{\hat{J}}\cdot \vec{n}$.

Why the general translation operator is in exponential form? because it is a unitary operator. Why it is unitary? because it is symmetric that translate back and forth result no change. In general, if we have a quantity that can be “translate” and the translation is symmetry, than, the generator must take the same exponential form.

It is interesting that, the translation generator $\hat{Q}$ is a differential of the position $\alpha$, here $\alpha$ is a position of a general coordinate.  When I started QM, I always feel insecure that change of position like this way, because classically, the change of a position means it moves in time, and there is no time in the $\hat{P}$. However, look at the rotation generator. The same derivation (between the *****) is applicable on the rotation about z-axis that replace the $x \rightarrow \phi$, azimuth angle. Then, at the end, we will recognize the generator $\hat{Q} = -i\frac{d}{d\phi} = L_z$, which is an angular momentum operator on the z-axis, and classically in the sense that the $L_z = \frac{d}{d\phi}$ is known in EM in spherical coordinate (the wave equation). The key point is that the rotation on z-axis takes the form $\frac{d}{d\phi}$!

There is still some things need to clarify, like the time translation operator is unitary, but the time-reversal operator is anti-unitary. Also, the detail of the general rotation operator $\hat{D}_n(\epsilon) \left|\vec{r}\right> = \left|\vec{r'}\right>$. we know that the general rotation operator is a matrix form, How?