  An extended Wigner function formalism is introduced for describing the
quantum dynamics of particles with internal degrees of freedom in the presence
of spatially inhomogeneous fields. The approach is used for quantitative
simulations of molecular beam experiments involving space-spin entanglement,
such as the Stern-Gerlach and the Rabi experiment. The formalism allows a
graphical visualization of entanglement and decoherence processes.
