Collapse of the wave function