Measurement result registers#
MeasurementRegisters stores one result bit and a pending measurement
count per qubit. fmr reads the bit when the count is zero.
Connections#
Input: accepted measurements and CPU result deliveries.
Output: a result bit or an incomplete read.
Owner:
TimingControlreserves measurements and delivers results before the CPU step.
Reading a result#
Accepting a measurement increments the target register’s pending count. Delivery updates the bit and decrements the count. Results for one qubit must arrive in measurement order; different qubits can complete independently.
fmr enqueues pending events and waits until the selected register has no
pending measurements. Reading leaves its value unchanged. If two measurements
of a qubit are pending, the read waits for both and returns the second result.
Objects and state#
Member |
Role |
|---|---|
|
Result bit and pending count for each qubit. |
|
Measurement references awaiting CPU delivery. |
|
Measurement references awaiting TCU delivery acknowledgment. |
|
Next measurement ID in the epoch. |
Each delivery path holds at most result_capacity outstanding measurements.
CPU delivery releases its entry; TCU acknowledgment releases the fast entry.
Reading a register does not release delivery capacity.
Reset and errors#
Session reset clears register values, pending counts and delivery records.
Old-epoch results are discarded. Duplicate results, mismatched references
and out-of-order results for the same qubit raise faults.
An out-of-range register index raises InvalidOperand.
Implementation and tests#
Source: feedback.cpp and feedback.hpp.
CTest: control.registers, protocol.readout, protocol.batch_atomic, systemc.use_cases.
Tests cover pending counts, repeated reads, consecutive measurements, reset, invalid register indices and independent delivery acknowledgments.
Group reservation first prepares references without changing the registers, then commits all references together. Both enabled delivery paths must have room for the entire group. A failed group consumes no IDs or pending counts. The atomic batch test checks this with CPU delivery completed but fast acknowledgment pending.