  Generally, the measurement process consists in coupling a system to a
detector that can give a continuous output. However, it may be interesting to
use as a detector a system with a discrete spectrum, especially in view of
applications to quantum information. Here, we study 1) a two-level system
measuring another two-level system (qubit); 2) a generic system measuring a
qubit; 3) a qubit measuring a generic system. The results include the case when
a postselection on the measured system is made. We provide the exact solution,
and also a controlled expansion in the coupling parameter, giving formulas
valid in the weak measurement regime for arbitrary preparation and
postselection. The concept of generalized Wigner functions is introduced.
