  Spin measurement is studied as a unitary time evolution of the spin coupled
to an environment representing the meter and the apparatus. Modelling the
environment as a heat bath comprising only a finite number of boson modes and
represented in a basis of coherent states, following the Davydov ansatz, it can
be fully included in the quantum time evolution of the total system. We perform
numerical simulations of projective measurements of the polarization, with the
spins prepared initially in a neutral pure state. The likewise pure initial
state of the environment is constructed as a product of coherent states of the
boson modes with a random distribution of their centroids around the origin of
phase space. Switching the self-energy of the spin and the coupling to the heat
bath on and off by a time-dependent modulation, we observe the outcome of the
measurement in terms of the long-time behaviour of the spin. Interacting with
the heat bath, the spins get entangled with it and lose coherence, thus
reproduce the "collapse of the wavefunction". The expected quantum randomness
in the final state is manifest in our simulations as a tendency of the spin to
approach either one of the two eigenstates of the measured spin operator,
recovering an almost pure state. The unitary time evolution allows us to
reproducibly relate these random final states to the respective initial states
of the environment and to monitor the exchange of information between the two
subsystems in terms of their purity and mutual entropy.
