Thermodynamics of cyclic quantum amplifiers