Canonical Hamiltonian of a linearly coupled complex scalar (source code)

= Canonical Hamiltonian of a linearly coupled complex scalar

For the <linear-in-potential charged-scalar Lagrangian>, $\pi=\dot\phi^*-ieA_0\phi^*$ and $\pi^*=\dot\phi+ieA_0\phi$. With $A_\mu=(A_0,-\mathbf A)$, the <Hamiltonian> density is
$$
\mathcal H=(\pi+ieA_0\phi^*)(\pi^*-ieA_0\phi)
+|\boldsymbol\nabla\phi|^2+m^2|\phi|^2
-ie\mathbf A\cdot(\phi\boldsymbol\nabla\phi^*-\phi^*\boldsymbol\nabla\phi).
$$
The first product includes $+e^2A_0^2|\phi|^2$ after the <Legendre transform>; that term can arise in <canonical variables> even though the original <Lagrangian> has no interaction quadratic in $A$.