Cavities with losses are usually described by a master equation. This
equation describes the rate of change of the density matrix, with resp
ect to time, of a given electromagnetic field due to an interaction or
losses. The most common method of solution of a master equation is to
transform it into a Fokker-Planck type equation. In this paper we use
another method, the so-called superoperators method. We apply this me
thod to a damped cavity in which an electromagnetic field is injected.