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 PACS numbers: PACS: 52.35. Mw, 52.65.Rr, 03.65.Sq Recently much work has been devoted to the field of quantum plasmas. Many aspects of the field are well described in books and review papers [1][2][3][4][5]. The interest in the field has been motivated by laboratory applications in for example plasmonics [6,7] [14][15][16][17]. Due to the complex nature of the governing equations, many problems involving nonlinearities and/or inhomogeneities must be addressed numerically. A successful method applied to classical plasmas is the celebrated particle-in-cell (PIC) approach (see e.g. [18][19][20][21]). Due to the classicality of the concepts this have had a limited impact to quantum plasmas. It should be noted, however, that the Feynman path integral formulation has been used to develop a PIC treatment [22,23] that includes particle dispersive effects in a semi-classical fashion. This is computationally costly, and the number of quantum particles that can be included in the code is far less than in the classical case [22,23].In our paper we have chosen another approach in order to develop a PIC-code including certain quantum features. We first note that the Wigner equation reduces to the classical Vlasov equation for macroscopic scale lengths longer than the thermal de Broglie wavelength. Hence particle dispersive effects [2,24] can be neglected on such scales. On the other hand, the physics associated with the electron spin (e.g. the magnetic dipole force and the spin magnetization currents [15-17]) does not vanish for long scale lengths. Hence, in this paper we will aim to develop a PIC code applicable on macroscopic scales, accounting for the magnetic dipole force and the spin magnetization currents. While a classical magnetic dipole moment fits very well into the PIC-concept, it is clear that the difference between a classical magnetic dipole moment and the spin must be acknowledged. The present approach builds on the findings of Ref. [25]. It was then observed that more elaborate models for the spin physics reduces to a simple one for frequencies below the spin precession frequency (which is approximately the same as the cyclotron frequency). Specifically this meant that for a dynamical time scale slower than the cyclotron frequency, the electrons could be modelled as consisting of two fluids, one with a spin up state relative the magnetic fiel...