# How to find the Hamiltonian from the energy-momentum tensor for a free electromagnetic field?

This question is related to a previous question that I have asked before titled: Energy-Momentum Tensor for the Electromagnetic Feild asking why the energy-momentum tensor had the following form $$T^{\mu\nu}=\eta_{\sigma\lambda}F^{\mu\sigma}F^{\lambda\nu}- \eta^{\mu\nu}\mathcal{L}.$$ This follow up question is based on QFT and the quantization of the electromagnetic field using the Gupta-Bleuler prescription. The energy density of the electromagnetic field should be given by the $$(0,0)$$ component of the energy-momentum tensor $$T^{00}=\eta_{\sigma\lambda}F^{0\sigma}F^{\lambda0}- \eta^{00}\mathcal{L}$$ Which simplifies to $$\mathcal{H}=\eta_{\sigma\lambda}F^{0\sigma}F^{\lambda0}-\mathcal{L}$$ If we contract the indices of the Minkowski metric we arrive at $$\mathcal{H}=F^{0\sigma}F_{\sigma}^{\, 0}-\mathcal{L}$$ Inserting the definition of the Electromagnetic Field Strength Tensor we arrive at $$\mathcal{H}=(\partial^0 A^\sigma - \partial^\sigma A^0)(\partial_\sigma A^0 - \partial^0 A_\sigma)-\mathcal{L}$$ For any tensor $$B^0=B_0$$ which means that $$\mathcal{H}=(\partial_0 A^\sigma - \partial^\sigma A_0)(\partial_\sigma A_0 - \partial_0 A_\sigma)-\mathcal{L}$$ Now we can expand the brackets $$\mathcal{H}=\partial_0 A^\sigma\partial_\sigma A_0 - \partial^\sigma A_0\partial_\sigma A_0 -\partial_0 A^\sigma\partial_0 A_\sigma + \partial^\sigma A_0\partial_0 A_\sigma-\mathcal{L}$$ Notice that $$\partial^\sigma A_0\partial_0 A_\sigma = \partial_\sigma A_0\partial_0 A^\sigma$$ which implies $$\mathcal{H}=2\partial_0 A^\sigma\partial_\sigma A_0 - \partial^\sigma A_0\partial_\sigma A_0 -\partial_0 A^\sigma\partial_0 A_\sigma -\mathcal{L}$$ We can group the following terms with a bracket $$\mathcal{H}=(2\partial_0 A^\sigma\partial_\sigma A_0 - \partial^\sigma A_0\partial_\sigma A_0) -\partial_0 A^\sigma\partial_0 A_\sigma -\mathcal{L}$$ Using the definition of the conjugate momentum $$\pi^\mu = - \partial_0 A^\mu$$ this becomes $$\mathcal{H}=(-2 \pi^\sigma\partial_\sigma A_0 - \partial^\sigma A_0\partial_\sigma A_0) + \pi^\sigma\partial_0 A_\sigma -\mathcal{L}$$ Or can be written as $$\mathcal{H}=-(2 \pi^\sigma - \partial^\sigma A_0)\partial_\sigma A_0 + \pi^\sigma\partial_0 A_\sigma -\mathcal{L}$$ The actual result should be $$\mathcal{H}=\pi^\sigma\partial_0 A_\sigma -\mathcal{L}$$ Which means that $$(2 \pi^\sigma - \partial^\sigma A_0)\partial_\sigma A_0=0$$ but how can I show this to be true?

First I'll start with the original stress-energy tensor obtained through Noether's theorem, without symmetrisation. Interestingly, you get the (manifestly) correct Hamiltonian density first try: $$T^{\mu\nu}=-F^{\mu\sigma}\partial^{\nu}A_{\sigma} - \eta^{\mu\nu}\mathcal{L}\\ T^{00} = -F^{0\sigma}\partial^{0}A_{\sigma} - \eta^{00}\mathcal{L}\\ \mathcal{H} = -F^{0\sigma}\partial_{0}A_{\sigma} - \mathcal{L}$$ With $$\pi_\mu = \frac{\partial\mathcal{L}}{\partial \dot{A^\mu}} = F_{0\mu}$$ and the $$(+, -, -, -)$$ metric, $$\mathcal{H} = \pi^\sigma\partial_{0}A_{\sigma} - \mathcal{L} \tag{1}$$
On the other hand, if you work with the symmetrised E-M tensor, with the $$C^{\mu\nu}=F^{\mu\sigma}\partial_\sigma A^\nu$$ term added in: $$T^{\mu\nu}=\eta_{\sigma\lambda}F^{\mu\sigma}F^{\lambda\nu}- \eta^{\mu\nu}\mathcal{L}\cong-F^{\mu\sigma}\partial^{\nu}A_{\sigma} - \eta^{\mu\nu}\mathcal{L} +\color{red}{C^{\mu\nu}},$$ (see this answer for the equivalence between the two) then $$\pi_\mu$$ remains the same since we haven't modified the Lagrangian, but the Hamiltonian density contains the extra term $$C^{00}=F^{0\sigma}\partial_\sigma A^0$$
There's a problem: $$A_0$$ has no conjugate momentum (since $$\pi_0 = 0$$) and hence is non-dynamical, so the conjugate variables are unsound (this is due to gauge symmetry). The most common way of fixing this is to impose Coulomb gauge, $$A_0 = 0$$ (this amounts to a gauge transformation), which kills the $$C^{00}$$ term, leaving you with eq. $$(1)$$ as the Hamiltonian density.
Even without imposing a specific gauge symmetry, the Hamiltonian density is supposed to be integrated over all space - so through integration by parts, the $$C^{00}$$ term yields a $$(\partial_\sigma F^{0\sigma})A^0$$ term, which vanishes by the equations of motion and hence does not contribute to the total energy (this is essentially the freedom to choose an arbitrary minimum point for the energy density)