Quantum tomography of light states by photon-number-resolving detectors