AWS Quantum Technologies Blog
Experiment with dynamic circuits on IQM Garnet with Amazon Braket
Customers use Amazon Braket to design and run quantum algorithms to explore applications of quantum computing. As the complexity of research workloads matures, it is important to have access to innovative capabilities. In this blog post, we announce an expansion of Amazon Braket’s experimental capabilities by adding support for dynamic circuits on the IQM Garnet quantum processing unit (QPU).
The introduction of dynamic circuits provides customers access to mid-circuit measurements and feed-forward control. Customers can use this capability to apply quantum operations conditioned on measurement outcomes, or to perform active qubit resets to reuse qubits within a single circuit execution. This capability has the potential to reduce quantum circuit depths and qubit overheads while unlocking new use cases on Amazon Braket.
Understanding dynamic circuits
Traditional quantum circuits follow a static execution model where all quantum operations are predetermined before the circuit runs, with measurements only occurring at the end. This approach, while foundational to quantum computing, imposes a limitation on what algorithms fit on limited-qubit quantum devices. Dynamic circuits break this limitation by allowing measurements to occur during circuit execution, with subsequent quantum operations conditionally applied based on those measurement results. This is particularly valuable for customers seeking to run complex circuits currently limited by the number of qubits available on quantum hardware.

Figure 1: The static circuit execution picture (left) is equivalent to dynamic circuits involving mid-circuit measurements with feed-forward control (right), while reducing qubit and controlled gate costs. Instead of two qubits initialized in |0>, the right-hand side circuit uses only one qubit in |0>. After the first measurement, this qubit is actively reset to the |0> state, denoted by the X operation conditioned on the measurement results, which allows the same qubit to be used for the second half of the algorithm.
The two key components of dynamic circuits are:
- Mid-circuit measurements (MCM): The ability to measure qubits during circuit execution rather than only at the end.
- Feed-forward control: The ability to condition quantum operations on measurement results.
Together, these capabilities change how we interact with quantum systems on Amazon Braket. By introducing real-time classical feedback, we can extract partial information through mid-circuit measurements and use this information to guide the remaining quantum operations.
This adaptivity allows quantum algorithms to react to measurements and respond in real-time during circuit execution rather than only in post-processing. IQM’s implementation achieves this through a low-latency control system that does not disturb the unmeasured qubits while processing measurement results and applying conditional operations.
These capabilities expand the computational toolkit available to quantum researchers and developers, enabling new approaches to quantum algorithm design and implementation.
Applications of dynamic circuits
Dynamic circuits expand applications that were previously unavailable on standard quantum computers. One benefit is customized active qubit reset, which helps you to design how qubits are measured mid-circuit and then reused. Dynamic circuits enable more efficient use of the available qubits on a quantum device, effectively expanding the computational resources in workloads like Quantum Fourier Transform and Quantum Phase Estimation, which are common subroutines in quantum solutions for chemistry and optimization problems.
Beyond qubit reuse, dynamic circuits can prepare non-trivial quantum states more efficiently, implement teleportation-based gates, and long range entanglement. These applications use mid-circuit measurements and feed-forward control operations.
Another area of application where dynamic circuits have shown value is quantum error mitigation and early quantum error correction. Through techniques like stabilizer measurements and parity checks, dynamic circuits can detect bit flip and phase errors and correct the errors dynamically. These capabilities provide a foundation for researching more advanced quantum error correction protocols that will be essential for fault-tolerant quantum computing.
Dynamic circuits on Amazon Braket
You can now use the Amazon Braket SDK to create quantum programs that measure qubits mid-circuit and apply quantum operations conditionally based on the measurement result. As an experimental capability, the current implementation has specific restrictions, for example, conditional operations can only be applied to qubits in a local group. We document all restrictions in the Amazon Braket Developer Guide. Additionally, support for dynamic circuits may change over time as we add new hardware and evolve device capabilities.
You can create quantum programs with mid-circuit measurement and conditional rotation instructions using three programming approaches on Amazon Braket: the Amazon Braket SDK, directly via OpenQASM, or with the Qiskit-Braket Provider.
Here is an example, using the Braket SDK, of how dynamic circuits enable qubit reuse through active reset. First, we initialize the context manager EnableExperimentalCapability()
to enable experimental capabilities, such as IQM’s dynamic circuits. Circuits with experimental capabilities must be constructed under the context manager. The circuit starts with a π rotation that flips qubit 1 to the |1> state. The subsequent measure_ff
implements the measurement for feed-forward control, measuring qubit 1 in the computational basis and storing the resulting bit with a feedback key label 0. The next instruction cc_prx
implements a classically controlled bit flip that only applies when the measurement result associated with feedback key 0 is 1. The dynamic circuits capability is only supported as in verbatim compilation. So, before the execution, the circuit is added to a verbatim box. From the results for the measurement of qubit 1, which is carried out by default in the computational basis at the end of the circuit, we see that the qubit is predominantly in the |0> state. This is because the |1> state, once detected by the mid-circuit measurement, is flipped to the |0> state. Deviations from the expected 100% “0” outcome are due to noise in the QPU.
from braket.aws import AwsDevice
from braket.circuits import Circuit
from braket.devices import Devices
from braket.experimental_capabilities import EnableExperimentalCapability
from math import pi
with EnableExperimentalCapability():
circuit = Circuit()
circuit.prx(1, pi, 0)
circuit.measure_ff(1, feedback_key=0)
circuit.cc_prx(1, pi, 0, feedback_key=0)
circuit = Circuit().add_verbatim_box(circuit)
device = AwsDevice(Devices.IQM.Garnet)
result = device.run(circuit, shots=100).result()
print(f"Measurement counts: {result.measurement_counts}")
# Measurement counts: {"0": 97, "1": 3}
Examples for OpenQASM 3.0 and the Qiskit-Braket provider are included in the example notebooks.
Beyond single qubit resets
While the previous example demonstrated qubit reuse through active reset, you can use dynamic circuits on Amazon Braket for a wide range of advanced applications. The example notebooks introduce many detailed examples, including currently available dynamical circuit logic, error mitigation and entanglement correction with dynamic circuits, and open systems and state preparation with dynamic circuits.
Active bit flip protection

Figure 2: Circuit depicting the active bit flip protection procedure using dynamic circuit primitives.
One such example is active bit flip error protection, which uses mid-circuit measurements and feed-forward control to detect and correct errors during circuit execution. In this example, we also use the active qubit reset technique, implemented with a pi rotation conditioned on the measured bit, to reset the ancilla to the zero state. Running the following code snippet will execute this example via Amazon Braket on IQM Garnet:
from braket.aws import AwsDevice
from braket.circuits import Circuit
from braket.devices import Devices
from braket.experimental_capabilities import EnableExperimentalCapability
from math import pi
device = AwsDevice(Devices.IQM.Garnet)
with EnableExperimentalCapability():
circuit = Circuit()
circuit.prx(1, pi/2,pi/2).prx(1, pi, 0) # H gate
circuit.prx(2, pi/2,pi/2).prx(2, pi, 0)
circuit.cz(1,2)
circuit.prx(2, pi/2,pi/2).prx(2, pi, 0)
circuit.measure_ff(2,0)
circuit.cc_prx(1, pi, 0, 0) # bit flip correction
circuit.cc_prx(2, pi, 0, 0) # active reset
circuit = Circuit().add_verbatim_box(circuit)
result = device.run(circuit, shots=100).result()
print(f"Measurement: {result.measurement_counts}")
Get started today
The introduction of mid-circuit measurement and feed-forward control on Amazon Braket is a step towards addressing the need by quantum researchers to use quantum resources efficiently by keeping pace with the increasing complexity of quantum algorithms. Dynamic circuits are available to all customers using the IQM Garnet device without requiring any additional access permissions.
For those interested in exploring additional advanced use cases of dynamic circuits, the Amazon Braket example notebooks cover a variety of textbook examples, including: remote CNOT applications between Alice and Bob, entanglement stabilization with Bell States, open systems initialization, and readout error mitigation protocols.
To get started, visit our Developer Guide for additional information and check out the Experimental Capabilities tab in the Braket Direct page on the Amazon Braket Management Console.