qtiming Timing verifier for dynamic quantum circuits QT-0.1.0 · alpha · 2026-11-27 Source
On this page

Why timing breaks dynamic circuits#

A dynamic circuit measures a qubit mid-circuit, sends the result to classical hardware, and then picks what to run next. The quantum part is fast and the classical part is slow and not the same length every time. Other qubits keep idling and decohering while they wait, so when things happen is part of whether the program is correct. qtiming checks that statically, against a timing contract that records what each controller stack promises.

The problem in one picture#

One qubit is measured. If the result is 1, a correction is applied to another qubit. The result takes between a and b nanoseconds to reach the control logic, so the correction lands at a different time on every shot. The bar is a sketch (not to scale, not a measurement).

q0 q2 measure feed-forward latency: a to b ns x if c best case: q2 idles this long worst case: until the correction lands

What the tool answers#

Given a program and a contract, check returns one of four verdicts (see Reading a verdict):

Verdict Meaning
PROVED holds with no assumptions
PROVED-UNDER holds if the listed assumptions hold (for example a vendor-claimed latency)
REFUTED a concrete counterexample, replayed in an independent executor
UNKNOWN not decided; the reason is stated (often a number the contract leaves absent)

Four stacks, four timing models#

Each stack handles the classical side differently, which is why one program can get four different outcomes (Same circuit, four stacks, compare page). The statements below were read on the cited vendor pages on 2026-11-22; the full list with quotes is in sources.md. Vendor figures are claims, not certified bounds.

  • IBM Heron: the IBM Quantum blog (19 Nov 2025) puts feed-forward latency "around ~600ns" and says Qiskit cannot reliably model the execution time of the classical operations involved, which is why stretch lets users state timing intent.
  • Qblox Q1: the trigger network delivers a trigger to all sequencers after a documented latency (212 to 239 ns on the page's figure); only one trigger can be on the backplane at a time, and a skipped conditional instruction stalls the real-time pipeline for a set wait.
  • ARTIQ: events are queued and fired at timestamps; if an event cannot be released in time it is not fired and the kernel raises RTIOUnderflow. Slack is the gap between the timeline cursor and the wall clock.
  • Quantum Machines QUA: align() makes later operations wait for earlier ones. With compile-time durations the compiler inserts exact waits; with run-time durations a gap of a few cycles can form.

The contract records these as claims#

The shipped contracts keep the number, its provenance class and its source string. Here is the IBM feed-forward latency: the vendor class is the weakest, which is why the verdict is PROVED-UNDER and not PROVED.

code, out = _show.run("contract", "show", "ibm_heron", show=False)
ff = json.loads(out)["latencies"]["ff.default"]
print("ff.default =", ff)
assert code == 0 and ff[2] == "vendor"
ff.default = [0, 150, 'vendor']

Where a number is not published, the contract leaves it absent and the dependent check comes out UNKNOWN rather than guessed. ARTIQ's timeline.commit_lead is such a case:

code, out = _show.run("contract", "show", "artiq", show=False)
art = json.loads(out)
print("missing:", art["missing"])
assert "timeline.commit_lead" in art["missing"]
missing: ['latency.in2cpu.hi', 'timeline.commit_lead']

What just happened#

  • Timing correctness depends on uncertain classical latencies, so qtiming reasons over ranges.
  • Each stack's range is a documented claim with a provenance class; absent numbers stay absent.
  • Next: Your first verdict.
Page source: tutorials/00-why-timing.md qtiming 0.1.0, Apache-2.0 · by Pratul Deshpande