We consider an isolated autonomous quantum machine, where an explicit quantum clock is responsible for performing all transformations on an arbitrary quantum system (the engine), via a time-independent Hamiltonian. In a general context, we show that this model can exactly implement any energy-conserving unitary on the engine, without degrading the clock. Furthermore, we show that when the engine includes a quantum work storage device we can approximately perform completely general unitaries on the remainder of the engine. This framework can be used in quantum thermodynamics to carry out arbitrary transformations of a system, with accuracy and extracted work as close to optimal as desired, while obeying the first and second laws of thermodynamics. We thus show that autonomous thermal machines suffer no intrinsic thermodynamic cost compared to externally controlled ones.Recently there has been a great deal of interest in the application of thermodynamics to individual quantum systems, which may be composed of just a few atoms or qubits [1][2][3][4][5][6][7][8][9][10][11][12][13][14][15]. Given that thermodynamics was invented before quantum theory was even envisaged, and typically applies to macroscopic objects, it is perhaps surprising how close an analogy can be drawn between the quantum and classical case. In [1][2][3][4], thermal engines are constructed out of quantum mechanical parts, incorporating an explicit system, thermal bath and work storage system. In other approaches [5,6], the thermal engine is a system with externally controlled Hamiltonian and access to a thermal bath.So far, these frameworks all involve the external application of discrete transformations to the thermal engine. An interesting open question, raised by several authors [1,2,7,8], is whether this external control should carry a thermodynamic cost, and how to include this control explicitly in the framework.The issue of how to implement transformations of one or more systems via interactions with another 'controlling' system has been addressed before from different perspectives, for example in interactions between atoms and a field [16,17] or in quantum driving [18]. In this paper, we address this issue by describing how an explicit quantum clock can control the evolution of a completely arbitrary quantum engine, thus allowing any unitary protocol to be carried out via a time-independent global Hamiltonian.We first show that any energy-conserving unitary operation can be exactly implemented on a quantum system (the engine) by attaching a quantum clock to it via the correct time-independent interaction Hamiltonian. Furthermore, this process is essentially independent of the initial state of the clock, requiring only that it lies within a known finite region. In particular, it is not necessary for the clock to precisely specify the 'time'. After the unitary has been fully implemented, the clock is not correlated with the system and could be used to perform further operations.Next, we show that we can also approximately implement any unita...