Quantum optics in the phase space