“Hidden” theta-term in Hamiltonian formulation of Yang-Mills theory

I've read in David Tong's lecture notes on gauge theory that the Hamiltonian of Yang-Mills theory does not depend on the angular parameter $$\theta$$, because it can be absorbed in the electric field:

$$\mathcal{H}=\frac{1}{g^2}\text{tr}(\mathbf{E}^2+\mathbf{B}^2)=g^2\text{tr}(\mathbf{\pi}-\frac{\theta}{8\pi^2}\mathbf{B})^2+\frac{1}{g^2}\text{tr}(\mathbf{B}^2).$$

Here, $$g$$ is the gauge coupling, $$E_i=\dot{A}_i$$ is the non-Abelian electric field, $$B_i=-\frac{1}{2}\epsilon_{ijk}F^{jk}$$ the non-Abelian magnetic field, $${F}_{\mu\nu}$$ is the gluon field strength, and $$\mathbf{\pi}=\frac{\partial \mathcal{L}}{\partial \mathbf{\dot{A}}}= \frac{1}{g^2}\mathbf{E}+\frac{\theta}{8\pi^2}\mathbf{B}$$ is the momentun conjugate to $$\mathbf{A}$$ (see pp. 39 and 40 of the lecture notes).

In contrast, it's well known that the Yang-Mills Lagrangian contains a topological $$\theta$$-term: $$\mathcal{L}= -\frac{1}{2g^2}\text{tr}(F^{\mu\nu}F_{\mu\nu})+\frac{\theta}{16\pi^2}\text{tr}(F^{\mu\nu}\tilde{F}_{\mu\nu})=\frac{1}{g^2}\text{tr}(\mathbf{\dot{A}}^2-\mathbf{B}^2)-\frac{\theta}{4\pi^2}\text{tr}(\mathbf{\dot{A}} \mathbf{B}),$$ where $$\tilde{F}_{\mu\nu}$$ is the Hodge dual of $$F_{\mu\nu}$$, and the last equality holds for $$A_0=0$$ and $$D_iE_i=0$$.

How is this possible? Tong mentions that the $$\theta$$-dependence in the Hamiltonian formalism is somehow hidden in the structure of the Poisson bracket, but he gives no detailed explanation. Why doesn't it appear in the Hamiltonian itself? The $$\theta$$-term gives rise to the infamous strong CP problem, so how can we explicitly compute this $$\theta$$-dependence of Yang-Mills in this formalism?

It's not particularly strange or unusual for a term to seemingly not appear in the Hamiltonian, but still have a physical effect. For example, the Hamiltonian for a free particle is $$H = \frac{p^2}{2m} = \frac12 m v^2, \quad p = mv.$$ On the other hand, the Hamiltonian for a particle in a magnetic field is $$H = \frac{(p-eA)^2}{2m} = \frac12 m v^2, \quad p = m v + e A.$$ They are of course different functions of $$(x, p)$$, reflecting the fact that the dynamics are different, but if you naively write the Hamiltonian in terms of the "physical" variables $$(x, v)$$ then you get the same result in both cases, since magnetic fields do no work. There is of course still an effect, because $$v$$ is related to $$p$$ in a different way. Your example with the $$\theta$$-term is just a more complicated version of this, so there's nothing really weird to resolve.
• @LCF Sure, I suppose you can put it that way. In any case, the Hamiltonian is just a different function of $x$ and $p$. – knzhou Apr 26 '19 at 22:31