Skip to content

Single circuit jobs with mid-circuit measurement sent to IonQ as OpenQASM3#8141

Draft
radumarg wants to merge 2 commits into
quantumlib:mainfrom
radumarg:mid-circuit-measurement
Draft

Single circuit jobs with mid-circuit measurement sent to IonQ as OpenQASM3#8141
radumarg wants to merge 2 commits into
quantumlib:mainfrom
radumarg:mid-circuit-measurement

Conversation

@radumarg

@radumarg radumarg commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

What:

Adds mid-circuit measurement:

qr, mid, result = QuantumRegister(1, "q"), ClassicalRegister(1, "mid"), ClassicalRegister(2, "result")
qc = QuantumCircuit(qr, mid, result)
qc.h(0)
qc.measure(0, mid[0]) # mid-circuit measurement
qc.x(0)
qc.measure(0, result[0]) # qubit reused after measurement
qc.x(0)
qc.measure(0, result[1])

How:

Single circuit jobs with mid-circuit measurement sent to IonQ as OpenQasm3 via ionq.qasm3.v1

  • Routing — circuit_requires_qasm3() detects qubit-reuse-after-measure, reset, and control flow; such circuits serialize to ionq.qasm3.v1 via a newly added serializer that complements the existing QIS serializer. Everything else is unchanged (ionq.circuit.v1).
  • Single-circuit only; QASM 3 executes on the simulator and MCM-capable QPUs (Tempo) and is rejected elsewhere server-side.

@radumarg radumarg changed the title Single circuit jobs with mid-circuit measurement sent to IonQ as OpenQasm3 via ionq.qasm3.v1 Single circuit jobs with mid-circuit measurement sent to IonQ as OpenQasm3 Jun 16, 2026
@radumarg radumarg changed the title Single circuit jobs with mid-circuit measurement sent to IonQ as OpenQasm3 Single circuit jobs with mid-circuit measurement sent to IonQ as OpenQASM3 Jun 16, 2026
@github-actions github-actions Bot added the size: L 250< lines changed <1000 label Jun 16, 2026
@github-actions github-actions Bot added size: XL lines changed >1000 and removed size: L 250< lines changed <1000 labels Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: XL lines changed >1000

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant