The Hamiltonian density for any classical field is given by: \begin{equation} \mathcal{H} = \pi \dot{\phi} - \mathcal{L} \end{equation} where $\pi$ is the canonical momentum density: \begin{equation} \pi(x,t) = \frac{\partial \mathcal{L}}{\partial \dot{\phi}(x,t)} \end{equation}\begin{equation} \pi(\mathbf{x},t) = \frac{\partial \mathcal{L}}{\partial \dot{\phi}(\mathbf{x},t)} \end{equation} In classical point particle mechanics the Poisson brackets for two functions $f$ and $g$ are defined as: \begin{equation} \left\{f,g\right\}_{PB} = \frac{ \partial f}{\partial q_j} \frac{\partial g}{\partial p_j} - \frac{\partial f}{\partial p_j} \frac{\partial g}{\partial q_j} \end{equation} where $q_j$ are the generalized coordinates and $p_j$ are the canonical momenta. Clearly: \begin{equation} \left\{q,p\right\}_{PB} = 1 \tag{1} \end{equation} In field theory, the Poisson bracket for two functionals $f$ and $g$ at equal times is defined as: \begin{equation} \left\{f(t),g(t)\right\}_{PB} = \int \mathrm{d}^3 \mathbf{x} \; \left(\frac{\delta f}{\delta \phi(\mathbf{x},t)} \frac{\delta g}{\delta \pi(\mathbf{x},t)} - \frac{\delta f}{\delta \pi(\mathbf{x},t)} \frac{\delta g}{\delta \phi(\mathbf{x},t)} \right) \end{equation} Now, using the rules of functional differentiation, it is easy to see that: \begin{equation} \left\{\phi(\mathbf{x},t),\pi(\mathbf{y},t)\right\}_{PB} = \delta^3(x-y) \end{equation} which is the classical field version of equation $(1)$.
Furthermore, according to Dirac's quantization rule, we can go back and forth between classical point particle mechanics and quantum mechanics via the following recipe: \begin{equation} \begin{array}{ccc} \text{classical mechanics} & \leftrightarrow & \text{quantum mechanics} \\ \displaystyle \left\{A,B\right\}_{PB} & \leftrightarrow & \displaystyle \frac{1}{i\hbar}\left[A,B \right] \end{array} \end{equation} provided the quantities we are considering exist in the classical world (for instance, quantum mechanical spin does not have a classical equivalent and so the rule does not work). To go back and forth between between classical field theory and the operatorial formulation of quantum field theory, we use the rule: \begin{equation} \begin{array}{ccc} \text{classical field theory} & \leftrightarrow & \text{quantum field theory} \\ \displaystyle \left\{A,B\right\}_{PB} & \leftrightarrow & \displaystyle \frac{1}{i\hbar}\left[A,B \right]_\mp \end{array} \end{equation} where the subscript $-$ means the normal commutator and is relevant for bosonic fields, and the $+$ subscript implies the anti-commutator which is relevant for fermionic fields (such as the Dirac field).