Mid-circuit measurement and qubit reset have been introduced in quantum programs for conditional branching. A next-generation implementation of classical computation within quantum programs enables real-time calculation and adjustment of program variables based on mid-circuit state of measured qubits. This quantum computing approach reduces computational latency and enables a new type of quantum algorithm that requires fewer round-trips between an external classical driver program and the execution of the quantum program.