  Lepage's improvement scheme is a recent major progress in lattice $QCD$,
allowing to obtain continuum physics on very coarse lattices. Here we discuss
improvement in the Hamiltonian formulation, and we derive an improved
Hamiltonian from a lattice Lagrangian free of $O(a^2)$ errors. We do this by
the transfer matrix method, but we also show that the alternative via Legendre
transformation gives identical results. We consider classical improvement,
tadpole improvement and also the structure of L{\"u}scher-Weisz improvement.
The resulting color-electric energy is an infinite series, which is expected to
be rapidly convergent. For the purpose of practical calculations, we construct
a simpler improved Hamiltonian, which includes only nearest-neighbor
interactions.
