We study the unitary time evolution of a simple quantum Hamiltonian describing two harmonic oscillators coupled via a three-level system. The latter acts as an engine transferring energy from one oscillator to the other and is driven in a cyclic manner by time-dependent external fields. The S-matrix of the cycle is obtained in analytic form. The total number of quanta contained in the system is a conserved quantity. As a consequence the spectrum of the S-matrix is purely discrete and the evolution of the system is quasi-periodic.