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

Q1 personality specification (predicated, RT queue)#

Normative for the reference executor (src/qtiming/exec/q1.py) and the graph builder (src/qtiming/dispatch/q1.py, P6). Golden traces: tests/personality/q1/golden/*.json. Status: frozen for P4; changes go through the decision log (plan Section 21.2).

Model#

One sequencer with two cores. The classical Q1 core issues instructions in program order into a FIFO; the RT core drains it on a rigid timeline and never waits for the Q1 core. Multi-sequencer programs (wait_sync across sequencers) are out of scope for this version: a program is mapped to one sequencer, qubits are not distinguished, and barrier is a no-op.

Dispatch rules#

For RT instruction k (a gate is play, a measurement is acquire, a delay is wait):

issue_k = max(issue_{k-1} + cost, exec_{k-depth})      # depth = capacity.rt_queue_depth (32)
exec_0  = issue_0
exec_k  = exec_{k-1} + dur_{k-1}                        # dur_{k-1} if it executed, else else_time
  • cost is issue_cost.nop (one Q1-core cycle). The set_cond instruction that precedes each conditional block costs the same on the Q1 core and takes no RT time.
  • exec_{k-depth} is the back-pressure term: the Q1 core stalls while depth instructions are pending. It is a dispatch edge, not a failure.
  • A conditional instruction (inside an if arm) executes iff its condition value equals the arm polarity (then arm: condition true, else arm: condition false). If skipped, the RT core waits else_time instead of dur, per instruction (plan 8.5).
  • acquire result: valid = exec + dur + theta_net, with theta_net the contract latency measure -> branch (trigger.network, 212 to 239 ns).

Violations#

Kind Condition Effect
underflow-halt exec_k < issue_k: the RT core needs an instruction the Q1 core has not delivered (SEQUENCE_PROCESSOR_RT_EXEC_COMMAND_UNDERFLOW) sequencer halts; the run stops
stale-read exec_k < valid(cond) for a conditional instruction: the RT core reads the trigger network before the result arrived (obligation O2a) recorded; the run continues

Named parameters#

Parameter Default Provenance
personality_params.q1.else_time_dt 1 vendor assumption: the minimum else_duration; the real value is chosen by the program
issue_cost.nop from the contract (4 ns) cyc, Q1 instruction table, re-verify
capacity.rt_queue_depth 32 vendor, Q1 documentation

Not modelled#

Measurements inside a conditional arm (a skipped acquire has no result), nested conditional blocks, jumps and loops (compare-and-jump costs are contract entries but the executor only handles straight-line programs), cross-sequencer synchronisation, the trigger-network busy window (trigger.network_busy).

Golden cases (hand-computed)#

Seven cases: straight line, underflow halt, stale read, a wait that covers the network latency, a skipped else arm, a skipped then arm (the two arm totals differ, which makes the EQ-determinism obligation O7 fail), and queue back-pressure.

Sources#

Qblox documentation (trigger handling, set_cond, Q1 instruction table); per-number source strings in src/qtiming/contract/instances/q1.toml. The 388 ns worked example is the contract fixture.

Page source: personality-spec/q1.md qtiming 0.1.0, Apache-2.0 · by Pratul Deshpande