Quantum computers hold the potential to outperform classical supercomputers at certain tasks. To implement algorithms on a quantum computer, programmers use conventional computers and hardware to create a set of classical control signals that implement a desired quantum algorithm. However, feeding the quantum information forward requires an inefficient conversion: extraction of quantum information, conversion to classical control signals, and reinjection of those signals into the system to implement quantum operations. Here, we demonstrate a more natively quantum strategy to programming quantum computers. Our approach uses the density matrix exponentiation (DME) protocol, a general technique for using a quantum state to enact a quantum oper...