Is the Heisenberg equation invariant under unitary transformation of momentum and position operators? Let $P$ be the momentum operator, $Q$ the position operator and $H\left(Q,P\right)$ the Hamiltonian operator. The Heisenberg equation of motion is
$$\dot{P}=-i\left[P,H\left(Q,P\right)\right] \tag 1$$
Suppose we have $P=U^\dagger P'U$ and $Q=U^\dagger Q'U$. If substitute  this in $(1)$ we
obtain
$$\frac{d}{dt}\left(U^\dagger P' U\right)=-iU^\dagger \left[P',H'\left(Q',P'\right)\right]U  \tag2$$
Now from $(2)$, in order for the Heisenberg equation to be invariant, we should have
$$\frac{d}{dt}\left(U^\dagger P'U\right)=U^\dagger \dot{P'}U \tag 3$$
Expanding the rhs of $(3)$ we obtain
$$\frac{d}{dt}\left(U^\dagger P'U\right)=\frac{d}{dt}\left(U^\dagger\right)P'U+U^\dagger \dot{P'}U+U^\dagger P'\frac{d}{dt}U$$
Finally in order to $(3)$ to be true we should have $$\frac{d}{dt}\left(U^\dagger\right)P'U+U^\dagger P'\frac{d}{dt}U=0 \tag 4$$
Why is this last expression true?
 A: Thanks to comment  of  jacob1729 I got the  answer.The claim that $-iH(P,Q)=-iU^\dagger \left[P',H'\left(Q',P'\right)\right]U$ is wrong
What we have is $H(P,Q)=H(U^\dagger PU,U^\dagger QU)=H'(P',Q')$.
So $(2)$ Should be written  as $$\frac{d}{dt}\left(U^\dagger P' U\right)=-i \left[U^\dagger P' U,H'\left(Q',P'\right)\right]  \tag2$$
Now using the property of the  commutator $[A B C, D]=A B[C, D]+A[B, D] C+[A, D] B C$
the rhs can be written as
$$-i \left[U^\dagger P' U,H'\left(Q',P'\right)\right]=-iU^\dagger P'[U, H']-iU^\dagger[P', H']U -i[U^\dagger, H'] P'U $$
Using the Heisenberg equation this simplify to
$$-i \left[U^\dagger P' U,H'\left(Q',P'\right)\right]=U^\dagger P'\frac{d}{dt}U-iU^\dagger[P', H']U +\frac{d}{dt}U^\dagger P'U $$
The lhs is $$\frac{d}{dt}\left(U^\dagger P'U\right)=\frac{d}{dt}\left(U^\dagger\right)P'U+U^\dagger \dot{P'}U+U^\dagger P'\frac{d}{dt}U$$
So using this two expression in $(2)$ we obtain $$U^\dagger \dot{P'}U=-iU^\dagger[P', H']U$$ which give us
$$\dot{P'}=-i[P', H']$$
A: Every unitary operator $U$ that depends on time can be written in the form
$U=e^{if(t)A}$ where $A$ is hermitian and $f:\mathbb{R}\rightarrow\mathbb{R}$ is a sufficiently regular function of time. We then have $U^{\dagger}=e^{-if(t)A}$.
Thus we have $\dot{U}=i\dot{f}Ae^{if(t)A}=iAU$ and  $\dot{U^{\dagger}}=-i\dot{f}Ae^{-if(t)A}=-iAU^{\dagger}$. Substituting in, we see that $(4)$ is solved as long as $A$ and $P$ commute.
