Measuring the quantum state of light