Quantum flows associated to master equations in quantum optics