Gate-level quantum circuits are often derived manually from higher level algorithms. While this suffices for small implementations and demonstrations, ultimately automatic circuit design will be required to realise complex algorithms using hardware-specific operations and connectivity. Therefore, ab initio creation of circuits within a machine, either a classical computer or a hybrid quantum-classical device, is of key importance. We explore a range of established and novel techniques for the synthesis of new circuit structures, the optimisation of parameterised circuits, and the efficient removal of low-value gates via the quantum geometric tensor. Using these techniques we tackle the tasks of automatic encoding of unitary processes and translation (recompilation) of a circuit from one form to another. Using emulated quantum computers with various noise-free gate sets we provide simple examples involving up to 10 qubits, corresponding to 20 qubits in the augmented space we use. Further applications of specific relevance to chemistry modelling are considered in a sister paper, 'Exploiting subspace constraints and ab initio variational methods for quantum chemistry'.