  We have here developed a particle-in-cell code accounting for the magnetic
dipole force and for the magnetization currents associated with the electron
spin. The electrons is divided into spin-up and spin-down populations relative
to the magnetic field, where the magnetic dipole force acts in opposite
directions for the two species. To validate the code, we have studied the
wakefield generation by an electromagnetic pulse propagating parallel to an
external magnetic field. The properties of the generated wakefield is shown to
be in good quantitative agreement with previous theoretical results.
Generalizations of the code to account for more quantum effects is discussed
