A quantum two-level system with periodically modulated energy splitting could provide a minimal universal quantum heat machine. We present the experimental realization and the theoretical description of such a two-level system as an impurity electron spin in a silicon tunnel field-effect transistor. In the incoherent regime, the system can behave analogously to either an Otto heat engine or a refrigerator. The coherent regime could be described as a superposition of those two regimes, producing specific interference fringes in the observed source-drain current.