Dynamic Circuits

qc/hardware qc/dynamic

A traditional circuit is a fixed pipeline: Preparation → Quantum Operations → Final Measurement. Every operation is decided in advance; measurement only happens at the very end.

A dynamic circuit breaks that rule: it allows mid-circuit measurement, followed by classical logic that decides what happens next — a gate applied conditionally based on a measurement outcome. This is often called feedforward (or feedback).

Two building blocks make this possible:

  • Mid-circuit measurement — measuring a qubit before the circuit ends, storing the result in a classical bit.
  • Reset + reuse — qc.reset(q) reinitializes a measured qubit back to so it can be reused later in the same circuit. This matters a lot when physical qubits are scarce.
  • Conditional operations — with qc.if_test((cr[i], 1)): ... applies gates only if a classical bit matches a given value.
qc.measure(qr[i], cr[0])
qc.reset(qr[i])
with qc.if_test((cr[0], 1)):
    qc.x(qr[j])

The headline use case explored in this lab is Dynamic GHZ via Qubit Reuse — using this mechanism to build long-range entanglement without needing every qubit to be directly, physically connected to every other qubit.

Self-Check

  • Could you explain “feedforward” to someone who’s only seen fixed-pipeline circuits before?
  • What are the three building blocks that make a dynamic circuit possible?
  • Why does reset-and-reuse matter when physical qubits are scarce?
Bell State
3-Qubit GHZ
5-Qubit GHZ Chain
Dynamic Circuit (Mid-Circuit Measure & Reset)
Bell State |Φ⁺⟩ (|00⟩ + |11⟩)/√2 5-Qubit GHZ State Chain
⚛ Qiskit Simulation Circuit: Dynamic Circuit with Mid-Circuit Measurement, Qubit Reset & Reuse
Dynamic Circuit with Mid-Circuit Measurement, Qubit Reset & Reuse
⚛ Qiskit Simulation Circuit: 5-Qubit GHZ Star Topology Entanglement Circuit
5-Qubit GHZ Star Topology Entanglement Circuit
⚛ Qiskit Simulation Circuit: Maximally Entangled Bell State |Φ⁺⟩ = (|00⟩+|11⟩)/√2
Maximally Entangled Bell State |Φ⁺⟩ = (|00⟩+|11⟩)/√2
🌐 3D Bloch Sphere Representation: Arbitrary Qubit State |ψ⟩ = cos(θ/2)|0⟩ + e^{iφ}sin(θ/2)|1⟩
Arbitrary Qubit State |ψ⟩ = cos(θ/2)|0⟩ + e^{iφ}sin(θ/2)|1⟩

1 item under this folder.