In this paper, we show that the spatial discretization of the nonlinea
r Schrodinger equation leads to a Hamiltonian system, which can be sim
ulated with symplectic numerical schemes. In particular, we apply two
symplectic integrators to the nonlinear Schrodinger equation, and we d
emonstrate that they are able to produce accurate results and to prese
rve very well the invariants of the original system, such as the energ
y and charge.