What is the proper translation of a field operator? I am trying to write the correct expression for a translated quantum field operator. There appear to be conflicting expressions given in this PSE post, and this one. In the former linked PSE post, the following is stated:
$$\hat\phi(x+a)=U(a)^\dagger \, \hat\phi(x)\,U(a)\tag{1}$$
where $U(a)=\exp(i a\cdot \hat P)$ [Edit: corrected sign as per comment by @CosmasZachos] is the unitary translation operator, and $P_\mu=-i\partial_\mu$. In explicit-component notation, this is
$$U(a)=\exp\left(i\left(-a^0 H + \vec a \cdot \vec P \right)\right)\tag{2}$$
The second post however states that
$$\hat\phi(\vec x + \vec a)=U(\vec a)\, \hat\phi(\vec x)\,U(\vec a)^\dagger \tag{3}$$
My question is, which is right?

Here is my attempt at answering it. Suppose $|x\rangle = \hat\phi (x)|0\rangle$ is the state with one $\phi$-particle at point $x$. Suppose that these states form a suitable orthogonal basis for the single-particle Hilbert space in our theory. The full Hilbert space is the Fock-space built out of these.
$$|f\rangle = \sum_{i=\textrm{# of particles}}\int \prod_i d^4x_i\,f_i(\{x_i\})\,|x_1,x_2,\ldots,x_i\rangle \tag{4}$$
Let's act with $\hat\phi(x+a)$ on this state. In the following equations, $\color{red}{\textrm{red}}$ indicates important changes relative to the previous line.
$$\begin{align}
\hat\phi(x+a)|f\rangle  &= \hat\phi(x+a)\sum_{i=\textrm{# of particles}}\int \prod_i d^4x_i\,f_i(\{x_i\})\,|x_1,x_2,\ldots,x_i\rangle\tag{5}\\
&=\sum_{i=\textrm{# of particles}}\int \prod_i d^4x_i\,f_i(\{x_i\})\,\color{red}{\hat\phi (x+a)}|x_1,x_2,\ldots,x_i\rangle\tag{6}\\
&=\sum_{i=\textrm{# of particles}}\int \prod_i d^4x_i\,f_i(\{x_i\})\,|\color{red}{x+a},x_1,x_2,\ldots,x_i\rangle\tag{7}\\
&=\sum_{i=\textrm{# of particles}}\int \prod_i d^4x_i\,f_i(\{x_i\})\,\color{red}{U(a)|x,x_1-a,x_2-a,\ldots,x_i-a\rangle}\tag{8}\\
&=\sum_{i=\textrm{# of particles}}\int \prod_i d^4x_i\,f_i(\{x_i\})\,U(a)\color{red}{\phi(x)|x_1-a,x_2-a,\ldots,x_i-a\rangle}\tag{9}\\
&=\sum_{i=\textrm{# of particles}}\int \prod_i d^4x_i\,f_i(\{x_i\})\,U(a)\phi(x)\color{red}{U(-a)|x_1,x_2,\ldots,x_i\rangle}\tag{10}\\
&=U(a)\hat\phi(x)U(-a) |f\rangle\\
&=U(a)\hat\phi(x)U(a)^\dagger |f\rangle\tag{11}\\
&\\
\implies & \boxed{\hat\phi(x+a) = U(a)\hat\phi(x)U(a)^\dagger}\tag{12}
\end{align}$$
I have been a bit loose with notation but I hope my logic is clear. Please let me know if anything is vague or incorrect.
 A: In classical QM,
$$ \partial_x = i \hbar^{-1} p. $$
However, the time derivative is (According to the Schrodinger equation)
$$ \partial_t = -i \hbar^{-1} H. $$
Whilst spatial translations are generated by the momentum, time shifts are actually generated by minus the energy (or depending on your definitions, spatial translations are generated by minus the momentum and time shifts by just the energy).
It's no wonder the same thing goes on in field theory:
$$ U(a) = e^{i a^{\mu} P_{\mu}} = e^{i a^0 H + i \vec{a} \cdot (- \vec{P}))}. $$
Again, the generators are the momentum and minus the energy.
To go from here to finite transformations is trivial: for functions we have
$$ f(x - a) = e^{- a \partial_x} f(x) $$
(note that $f(x - a)$ and not $f(x + a)$ is the result of shifting $f$ to the right in $x$), similarly
$$ f(t - a) = e^{- a \partial_t} f(t). $$
For operators we must have
$$ \phi(t, x - a) = e^{i a \hbar^{-1} p_x} \phi(t, x) e^{-i a \hbar^{-1} p_x}; $$
$$ \phi(t - a, x) = e^{- i a \hbar^{-1} H} \phi(t, x) e^{i a \hbar^{-1} H}. $$
Looks like the first post gets it right (since the extra sign comes from considering $\phi(x + a)$ instead of $\phi(x - a)$).
