B-series provide a powerful general tool to express numerical methods
for differential equations. Many differential equations are of Hamilto
nian form and there has been much recent interest in constructing so-c
alled canonical or symplectic integrators for the Hamiltonian case. In
this paper we provide a necessary and sufficient condition for a B-se
ries to correspond to a canonical method.