Skip to content

Mid-Circuit Measurement and Feedforward

An adaptive quantum circuit is a quantum–classical execution process: a measurement produces a classical record, and that record can change which operation, measurement, or stopping rule is used later. An outcome probability alone therefore does not define the circuit. The full object includes the state on every branch, the causal availability of records, the types and lifetimes of branch outputs, and the rule for combining terminal histories.

This page gives a convention-complete audit for finite, ideal dynamic circuits. It treats measurement-conditioned channels, reset and qubit reuse, physical corrections and Pauli frames, capped retry policies, and branch-aware resource and deadline calculations. The timing examples are declared schedule inputs; they do not constitute evidence about a physical controller, detector, or device.

Required background. Measurement in Circuits supplies measured and retained registers, outcome encoding, selected and unread outputs, and the circuit-instrument notation used below.

A static unitary circuit denotes one linear operator, while a dynamic circuit denotes a causal family of quantum operations indexed by classical histories. If h=m1m2⋯mkh=m_1m_2\cdots m_k is the record available at one point in an execution, then a later instrument, channel, or stop decision may depend on hh. The history is data, not a coherent quantum label unless the circuit explicitly stores it in a quantum register.

Three objects must be kept distinct:

  • a coherent controlled operation applies different target blocks while retaining off-diagonal control coherences;
  • measurement-conditioned feedforward creates a classical record and then chooses a later channel from that record;
  • postprocessing acts on data after the quantum job has ended and cannot change the already completed quantum evolution.

The first two can agree on a basis-state truth table while defining different channels on superpositions. Controlled Operations owns the coherent block-unitary side of this comparison. Here the relevant object is a measured, classically indexed process.

An adaptive circuit also needs an output contract. It may return a final quantum register, the full classical history, a coarsened success flag, a history-conditioned state, or only an unconditional mixture. Forgetting a history is a classical marginalization and a quantum mixture; it is never an amplitude sum over alternatives.

Complete this record before calculating. Every field needs a value or a justified N/AN/A.

  1. Adaptive task and licensed claim
    State the transformation, decision, or statistic to be established. Separate ideal channel semantics, a hypothetical schedule, simulation evidence, and experimental evidence.

  2. Quantum registers, classical records, order, and lifetimes
    Name every register, declare tensor and bitstring order, and say when each value is created, remains live, is released, or is replaced.

  3. Initial state, preparation, and promises
    Give the normalized input, its preparation assumption, and any promised subspace or independence condition.

  4. Measurement instruments and reported outcomes
    Specify the outcome maps and their output spaces. Map physical or mathematical outcomes to reported codes, including invalid codes when the model admits them.

  5. Branch predicates and classical dataflow
    State which available records control each branch, how records are typed, and which values survive a merge.

  6. Conditional operations, frame updates, reset, and reuse
    Give the channel on every live branch. Distinguish a physical operation from a bookkeeping update, and state the postcondition required before reuse.

  7. History probabilities, conditional states, and merge rule
    Keep branch states subnormalized, identify a prefix-free terminal set, and declare whether the output retains or forgets the history.

  8. Causal schedule, latency budget, and resource currencies
    Give event timestamps, record-path and branch durations, deadlines, guards, and expected as well as worst-case counts in separately named currencies.

  9. Output contract, verification metric, and evidence
    Specify the returned quantum and classical systems, normalization and postcondition checks, comparison metrics, and the evidence layer actually available.

  10. Conclusion, stopping point, and canonical handoff
    State exactly what passed, what remains unmodeled, and which specialist owner receives each unresolved question.

The record is incomplete if it omits record order, branch predicates, lifetimes, terminal histories, or the semantics of a branch merge. In particular, a circuit diagram whose wires share a horizontal coordinate does not by itself establish that the corresponding classical information is available in time.

Instruments, Conditional Channels, and History Probabilities

Section titled “Instruments, Conditional Channels, and History Probabilities”

Let hh label a classical history at an internal node and mm the next reported outcome. Let Im(h)\mathcal I_m^{(h)} be the outcome map chosen at that node, and let Chm\mathcal C_{hm} be the subsequent conditional channel. Starting with ρ~∅=ρ\widetilde{\rho}_{\emptyset}=\rho, define

ρ~hm=(Chm∘Im(h))(ρ~h)=Chm(Im(h)(ρ~h)),p(hm)=Tr⁡ρ~hm.\begin{aligned} \widetilde{\rho}_{hm} &= (\mathcal C_{hm}\circ\mathcal I_m^{(h)})(\widetilde{\rho}_h) \\ &= \mathcal C_{hm}(\mathcal I_m^{(h)}(\widetilde{\rho}_h)), \\ p(hm) &= \operatorname{Tr}\widetilde{\rho}_{hm}. \end{aligned}

The trace is the joint probability of the complete history hmhm, not merely a probability conditional on reaching hh. When p(h)>0p(h)>0,

p(m∣h)=p(hm)p(h),ρhm=ρ~hmp(hm)(p(hm)>0).p(m\mid h) = \frac{p(hm)}{p(h)}, \qquad \rho_{hm} = \frac{\widetilde{\rho}_{hm}}{p(hm)} \quad (p(hm)>0).

At each reachable internal node, the instrument must be complete on the declared input space and every conditional map must preserve trace unless that branch explicitly reports loss or abort. A zero-probability branch has a zero subnormalized state; it has no normalized posterior that can be used in a later calculation.

Let L\mathcal L be a prefix-free set of terminal histories. Equivalently, one may audit all histories at one fixed depth. If the classical history register HH encodes termination and record length, the final classical-quantum state and its history-forgotten quantum output are

ΩHQ=∑h∈L∣h⟩⟨h∣H⊗ρ~h,\Omega_{HQ} = \sum_{h\in\mathcal L} |h\rangle\langle h|_H \otimes \widetilde{\rho}_h, ρout=Tr⁡HΩHQ=∑h∈Lρ~h.\rho_{\mathrm{out}} = \operatorname{Tr}_H\Omega_{HQ} = \sum_{h\in\mathcal L}\widetilde{\rho}_h.

A complete capped policy satisfies

∑h∈LTr⁡ρ~h=1.\sum_{h\in\mathcal L} \operatorname{Tr}\widetilde{\rho}_h =1.

Never sum both an internal history and any of its descendants. That double counts executions. A terminal set such as {0,10,11}\{0,10,11\} is valid because no member is a prefix of another; the set {1,10,11}\{1,10,11\} is not.

Classical Predicates, Dataflow, and Branch Merges

Section titled “Classical Predicates, Dataflow, and Branch Merges”

A predicate may depend only on records that exist at that point in the causal schedule. For example, the rule “apply XX when m=1m=1” presupposes a reported bit mm, a declared encoding of detector outcomes into that bit, and a path by which the bit reaches the conditional operation. Branching on an unobserved ideal detector variable while the controller receives a noisy reported code describes a different process.

Classical control flow should make four features explicit:

  • availability: the producing measurement precedes every use of its record;
  • type: a bit, trit, status enum, history string, and Pauli-frame token are not interchangeable;
  • scope: a record copied into an output remains present even if the quantum system that produced it is reset or released;
  • termination: success, exhaustion, abort, invalid-code, and timeout exits are part of the policy rather than informal comments.

A branch merge is well typed only when every incoming edge supplies compatible quantum systems, classical values, lifetimes, and provenance. If one branch releases qq while another returns qq, a later operation on a merged symbol qq is undefined. The repair is to make both branches record-only, or to create a declared replacement on the branch that lacks a live qubit. Likewise, if branches carry different Pauli frames, the merged value is the pair (q,frame)(q,\text{frame}), not an unqualified qq.

This semantic record is independent of one particular programming language. Quantum Software Stack and Circuit Intermediate Representations own executable control-flow representations, lowering, target capability profiles, and runtime interfaces.

Reset is a channel with a declared postcondition. It is not an inverse of measurement and need not restore coherence with any system that was correlated with the measured qubit. For computational-basis measurement with Pm=∣m⟩⟨m∣P_m=|m\rangle\langle m|, measurement followed by XmX^m gives

R(ρ)=∑m=01XmPmρPmXm=∣0⟩⟨0∣Tr⁡ρ.\begin{aligned} \mathcal R(\rho) &= \sum_{m=0}^1 X^mP_m\rho P_mX^m \\ &= |0\rangle\langle0|\operatorname{Tr}\rho. \end{aligned}

This channel sends every normalized input to ∣0⟩⟨0∣|0\rangle\langle0|. It removes the input coherence and is many-to-one, so it is neither unitary nor invertible. If the bit mm was copied into a classical register, that record still contains the outcome distribution after the quantum reset.

Three lifecycle operations should not be conflated:

  • reset returns a live quantum system satisfying a stated state postcondition;
  • release ends the program’s right to use that physical system or logical value;
  • reuse assigns a later role only after the required reset, preparation, or allocation contract has been met.

Reusing a wire name does not revive a destructively measured or released system. Conversely, a physical reset does not by itself prove that leakage, correlations with an environment, crosstalk, or calibration errors are absent. Those are experimental properties rather than consequences of the ideal channel equation.

Physical Corrections and Pauli-Frame Updates

Section titled “Physical Corrections and Pauli-Frame Updates”

A physical correction applies a quantum operation. A Pauli-frame update instead stores a classical description of an outstanding Pauli and changes how later gates or measurements are interpreted. The two methods can implement the same logical output only if every later operation consumes the frame consistently.

Write a one-qubit frame, up to phase, as

F(a,b)=XaZb,a,b∈{0,1}.F(a,b)=X^aZ^b, \qquad a,b\in\{0,1\}.

If the next physical gates are HH and then SS, conjugation gives

SHF(a,b)H†S†≐XbZa⊕b,S H F(a,b) H^\dagger S^\dagger \doteq X^bZ^{a\oplus b},

where ≐\doteq denotes equality up to a global phase. A later physical ZZ-basis measurement is flipped by the XX exponent of the propagated frame, so in this example

zlogical=zphysical⊕b.z_{\mathrm{logical}} = z_{\mathrm{physical}}\oplus b.

A frame is therefore part of the branch type. Merging two quantum values while discarding different outstanding frames generally corrupts later predictions. Across Clifford gates a Pauli frame remains Pauli, but across a non-Clifford gate it may not. Blindly updating two bits by XOR is then invalid; the circuit must change the correction strategy, adapt a later measurement, or enlarge the tracked object.

Deferred Measurement and Its Failure Conditions

Section titled “Deferred Measurement and Its Failure Conditions”

The deferred-measurement principle is an equivalence for a specified output contract, not an identity of intermediate processes. In its familiar finite form, a measurement whose result only selects a later unitary can sometimes be replaced by coherent control, with the control measured at the end. The replacement must reproduce the declared final quantum state and classical record, including any branch-relative phases.

Such a rewrite requires an applicability audit. At minimum, check that:

  • the removed record is not read, reported, or used by a host before the new terminal measurement;
  • the would-be control system remains available and is not destructively measured, reset, released, or reused;
  • no intervening noncommuting operation uses coherence that one formulation removes and the other retains;
  • coherent controlled access to the required branch operation is part of the declared interface;
  • the equivalence is claimed only for the compared outputs, not for latency, detector behavior, noise, or physical resource cost.

Early termination, repeated measurement, invalid-code handling, and a timeout can make a dynamic policy impossible to replace by a single deferred meter without adding further coherent storage and control. Even when the final ideal statistics agree, the physical implementations can have different exposure to noise and different timing constraints.

Measurement in Circuits owns terminal-readout semantics and the elementary deferred-CNOT exercise. The semiclassical Fourier-transform construction of Griffiths and Niu is an important positive example of feedforward, but it is not a blanket theorem that all adaptive measurements can be deferred.

Latency, Deadlines, and Branch-Aware Resources

Section titled “Latency, Deadlines, and Branch-Aware Resources”

Timing claims require absolute events as well as durations. For a history hh, let trecord(h)t_{\mathrm{record}}(h) be the absolute measurement-completion/event timestamp used in the schedule arithmetic, before the reported-record path begins. Let Lff(h)L_{\mathrm{ff}}(h) include the declared acquisition, classification, decision, and dispatch path, and let tbranch(h)t_{\mathrm{branch}}(h) be the duration of the conditional branch operation. Then

tready(h)=trecord(h)+Lff(h)+tbranch(h),sraw(h)=tdeadline(h)−tready(h).\begin{aligned} t_{\mathrm{ready}}(h) &= t_{\mathrm{record}}(h) +L_{\mathrm{ff}}(h) +t_{\mathrm{branch}}(h), \\ s_{\mathrm{raw}}(h) &= t_{\mathrm{deadline}}(h) -t_{\mathrm{ready}}(h). \end{aligned}

If the declared jitter or safety guard is g(h)≥0g(h)\geq0, the residual slack is

sguarded(h)=sraw(h)−g(h).s_{\mathrm{guarded}}(h) = s_{\mathrm{raw}}(h)-g(h).

A complete schedule passes only if the minimum guarded slack over the relevant terminal branches is nonnegative. A mean latency cannot establish this result: a rare branch can miss a coherence-sensitive deadline even when the average branch is fast.

Resources in an adaptive circuit are random variables on terminal histories. For a currency RR,

E[R]=∑h∈Lp(h)R(h),Rmax⁡=max⁡h∈LR(h).\mathbb E[R] = \sum_{h\in\mathcal L}p(h)R(h), \qquad R_{\max} = \max_{h\in\mathcal L}R(h).

If a result is conditioned on success, use renormalized success-leaf weights and report the success probability separately. Measurement count, conditional gate count, quantum width, live classical memory, elapsed time, abstract query count, and physical duration are different currencies. They should not be collapsed into one unlabeled “cost.”

The formulas above teach an ideal schedule audit. Actual acquisition paths, jitter distributions, QND behavior, reset error, and controller performance belong to Control, Readout, and Calibration.

A finite adaptive-circuit audit should stop immediately if any of the following checks fails:

  1. every outcome map is completely positive and every declared instrument is complete on its input space;
  2. all terminal branch operators are positive and their traces sum to one;
  3. the terminal histories are prefix free, or all audited nodes lie at one fixed depth;
  4. every predicate consumes an available reported record with a declared type and encoding;
  5. every merge preserves compatible quantum outputs, lifetimes, frame tokens, and classical provenance;
  6. reset and reuse postconditions hold on every branch that reaches the reuse;
  7. expected, conditional, and worst-case resources use the correct leaf weights;
  8. the minimum residual deadline slack is nonnegative;
  9. the returned cq state or history-forgotten output matches the stated output contract.

Trace distance, total-variation distance, state fidelity, observable residuals, and exact postconditions answer different verification questions. Name the metric and its compared objects. An exact algebraic residual establishes only the ideal model; a numerical trajectory calculation adds approximation and sampling error; hardware claims additionally require calibration, uncertainty, drift, and provenance.

The Circuit Model owns generic wire and composition syntax, while Quantum Instruments owns arbitrary outcome-resolved completely positive maps and their general theory. The software stack owns runtime realization; this page owns the ideal, finite adaptive execution record.

Named uses retain their own canonical homes. Quantum Teleportation owns the state-transfer identity and benchmark; Quantum Phase Estimation owns iterative phase algorithms; Fault-Tolerant Gates owns code-specific correction and fault-propagation claims; and Resource Estimation Tools owns larger cost models. Quantum Circuit Simulation, Stabilizer Simulation, and Tensor-Network Simulation own algorithms for sampling or representing dynamic trajectories. Syndrome Measurement owns the QEC-specific check circuit, signed repeated record, fault propagation, and detector construction; this page retains generic branch histories, reset, record availability, and feedforward semantics. Measurement-Based Quantum Computation owns open-graph measurement patterns, branch-dependent angles, flow or gflow, and corrected-pattern determinism; this page retains the generic adaptive execution record.

Worked Audit: Active Reset and Verified Reuse

Section titled “Worked Audit: Active Reset and Verified Reuse”

This ideal audit measures one qubit, conditionally flips it, and then tests the postcondition required for reuse.

  1. Adaptive task and licensed claim — Apply an ideal computational-basis measurement and measurement-conditioned XX to reset one retained qubit, then verify its ideal reuse. The result licenses the declared channel, record, and hypothetical schedule only.

  2. Quantum registers, classical records, order, and lifetimes — Use one retained qubit qq and one classical bit mm. The cq tensor order is M⊗QM\otimes Q. The qubit survives the instrument, is reset before reuse, and the bit remains live through verification.

  3. Initial state, preparation, and promises — Take

    ρ=(2/31/61/61/3).\rho = \begin{pmatrix} 2/3&1/6\\ 1/6&1/3 \end{pmatrix}.

    This density operator is positive and normalized, with

    Tr⁡ρ2=1118.\operatorname{Tr}\rho^2 = \frac{11}{18}.

    The input purity is therefore 11/1811/18. No promise of a computational-basis input is made. This is an exact analytic input; no experimental preparation claim is made.

  4. Measurement instruments and reported outcomes — Use the computational-basis Lüders maps

    Im(ρ)=PmρPm,Pm=∣m⟩⟨m∣,\mathcal I_m(\rho) = P_m\rho P_m, \qquad P_m=|m\rangle\langle m|,

    with reported codes m=0,1m=0,1. Their probabilities are

    p0=23,p1=13.p_0=\frac23, \qquad p_1=\frac13.
  5. Branch predicates and classical dataflow — When m=0m=0, take the identity branch. When m=1m=1, request a physical XX. The reported bit is the predicate value and remains in the output record; there is no invalid code in this ideal model.

  6. Conditional operations, frame updates, reset, and reuse — With C0=id⁡\mathcal C_0=\operatorname{id} and C1(σ)=XσX\mathcal C_1(\sigma)=X\sigma X, the corrected subnormalized branches are

    J0(ρ)=23P0,J1(ρ)=13P0.\mathcal J_0(\rho) = \frac23 P_0, \qquad \mathcal J_1(\rho) = \frac13 P_0.

    Thus both normalized branch states satisfy the reset postcondition q=∣0⟩q=|0\rangle. This audit uses a physical correction rather than a frame update.

  7. History probabilities, conditional states, and merge rule — The terminal histories are the prefix-free one-bit set L={0,1}\mathcal L=\{0,1\}. Retaining mm gives

    ΩMQ=(23∣0⟩⟨0∣M+13∣1⟩⟨1∣M)⊗P0.\Omega_{MQ} = \left( \frac23|0\rangle\langle0|_M + \frac13|1\rangle\langle1|_M \right) \otimes P_0.

    Forgetting mm gives the pure quantum output ρout=P0\rho_{\mathrm{out}}=P_0. The record and qubit may be separated because both quantum branches agree, but forgetting the record does not erase the fact that it was produced. The record entropy and reset-output purity are

    H(M)=h2(1/3)=0.9182958341 bits,Tr⁡P02=1.H(M) = h_2(1/3) = 0.9182958341\ \text{bits}, \qquad \operatorname{Tr}P_0^2 =1.
  8. Causal schedule, latency budget, and resource currencies — Let the measurement end at 240 ns240\,\mathrm{ns}. The reported-record path takes 100 ns100\,\mathrm{ns} and the conditional XX takes 20 ns20\,\mathrm{ns}, so the worst branch is ready at

    240+100+20=360 ns.240+100+20 = 360\ \mathrm{ns}.

    With a 400 ns400\,\mathrm{ns} deadline, raw slack is 40 ns40\,\mathrm{ns}. A declared 25 ns25\,\mathrm{ns} guard leaves 15 ns15\,\mathrm{ns} residual slack. Every run uses one measurement and one record bit; at most one XX is used, with expected XX count 1/31/3.

  9. Output contract, verification metric, and evidence — Apply HH to the reset qubit and measure XX. Since H∣0⟩=∣+⟩H|0\rangle=|+\rangle, the intended ++ probability is one. If the conditional XX is omitted, the unread state before reuse is

    23P0+13P1,\frac23P_0+\frac13P_1,

    and the same reuse test gives p(+)=2/3p(+)=2/3. Its binary total-variation distance from the intended deterministic distribution is 1/31/3. Positivity, terminal probability sum one, both reset postconditions, and guarded schedule feasibility all pass exactly in the ideal model.

  10. Conclusion, stopping point, and canonical handoff — The ideal active reset and reuse contract passes. Circuit Model owns the generic reset symbol, Quantum Instruments owns general outcome-map theory, and Control, Readout, and Calibration owns physical reset error and latency. This audit does not establish reset fidelity, QND character, assignment accuracy, controller jitter, or a device timing claim.

The comparison with omitted feedforward is essential: the unconditional quantum state after the corrected branches is pure even though the retained classical record has nonzero entropy. Resetting qq has not uncomputed mm.

Worked Audit: A Capped Repeat-Until-Success Policy

Section titled “Worked Audit: A Capped Repeat-Until-Success Policy”

The second audit uses at most two computational-basis measurements. It exposes the difference between success probability, exhaustion probability, expected resources, and a quantum output that happens to agree on every terminal leaf.

  1. Adaptive task and licensed claim — Starting from ∣+⟩|+\rangle, accept outcome 00 as success. After a first failure, reset and reprepare once, then retry. After a second failure, reset the qubit and return an exhausted status. This licenses a two-attempt policy, not unbounded eventual success.

  2. Quantum registers, classical records, order, and lifetimes — Use one reusable qubit qq, a variable-length terminal history h∈{0,10,11}h\in\{0,10,11\}, an attempt count, and a status in {success,exhausted}\{\text{success},\text{exhausted}\}. Histories are written in chronological order and use a prefix-free encoding: the missing second bit on history 00 is not an implicit zero. The qubit is live at every exit; attempt count, history, and status remain live because they distinguish successful from exhausted runs.

  3. Initial state, preparation, and promises — The first attempt starts in ∣+⟩|+\rangle. Conditional on first outcome 11, apply XX to obtain ∣0⟩|0\rangle and then HH to reprepare ∣+⟩|+\rangle for the second attempt. The two ideal attempts therefore have the same fair outcome distribution.

  4. Measurement instruments and reported outcomes — Each attempt uses Im(σ)=PmσPm\mathcal I_m(\sigma)=P_m\sigma P_m with codes m=0,1m=0,1. For an attempted measurement of ∣+⟩|+\rangle, each reported outcome has conditional probability 1/21/2.

  5. Branch predicates and classical dataflow — Outcome 00 terminates with success. A first 11 enables exactly one retry. A second 11 terminates with exhausted status; it does not loop. The terminal history set is L={0,10,11}\mathcal L=\{0,10,11\}.

  6. Conditional operations, frame updates, reset, and reuse — History 00 needs no correction and leaves q=∣0⟩q=|0\rangle. After the first failure, physical XX resets qq and HH prepares the retry. History 1010 leaves q=∣0⟩q=|0\rangle. On history 1111, a final physical XX resets the second measured state ∣1⟩|1\rangle to ∣0⟩|0\rangle before return. No Pauli frame is left outstanding.

  7. History probabilities, conditional states, and merge rule — The joint terminal probabilities are

    p(0)=12,p(10)=14,p(11)=14.p(0)=\frac12, \qquad p(10)=\frac14, \qquad p(11)=\frac14.

    They sum to one on a prefix-free leaf set. Success has probability 3/43/4 and exhaustion has probability 1/41/4. Conditioned on success, histories 00 and 1010 have weights 2/32/3 and 1/31/3. Every terminal quantum state is ∣0⟩|0\rangle, so forgetting history gives P0P_0; nevertheless, history or status cannot be discarded when reporting whether the policy succeeded. Abort and timeout probabilities are both zero in this complete ideal policy.

  8. Causal schedule, latency budget, and resource currencies — Attempt 1 measures from 00 to 200 ns200\,\mathrm{ns} and its report is ready at 280 ns280\,\mathrm{ns}, when history 00 ends. On failure, XX and HH take 20 ns20\,\mathrm{ns} each. Attempt 2 then measures from 320320 to 520 ns520\,\mathrm{ns} and its report is ready at 600 ns600\,\mathrm{ns}. History 1010 ends there; the final XX makes history 1111 end at 620 ns620\,\mathrm{ns}. With deadline 650 ns650\,\mathrm{ns} and a declared zero guard, worst-case raw and residual slack are both 30 ns30\,\mathrm{ns}.

    The exact resource values are

    E[Nmeas]=32,Nmeas,max⁡=2,\mathbb E[N_{\mathrm{meas}}] = \frac32, \qquad N_{\mathrm{meas},\max}=2, E[NX]=34,E[NH,retry]=12.\mathbb E[N_X] = \frac34, \qquad \mathbb E[N_{H,\mathrm{retry}}] = \frac12.

    The expected terminal time is

    E[T]=12(280)+14(600)+14(620)=445 ns.\begin{aligned} \mathbb E[T] &= \frac12(280) + \frac14(600) + \frac14(620) \\ &= 445\ \mathrm{ns}. \end{aligned}
  9. Output contract, verification metric, and evidence — Verify the three leaf probabilities sum to one, the success and exhaustion probabilities are 3/43/4 and 1/41/4, every terminal qubit is ∣0⟩|0\rangle, resource expectations equal the leaf-weighted counts, and the worst branch has 30 ns30\,\mathrm{ns} residual slack. These are exact consequences of the declared ideal state and schedule inputs.

  10. Conclusion, stopping point, and canonical handoff — The two-attempt policy is complete and terminating, but it is not deterministic success and proves neither an unbounded repeat-until-success loop nor a hardware schedule. Resource Estimation Tools owns larger cost models, while the hardware and control pages own measured timing and reset evidence.

The quantum marginal alone is insufficient here: it is P0P_0 for both success and exhaustion. A claim about policy success must retain the classical status or history that distinguishes those cases.

Normalizing every branch too early. A normalized posterior no longer carries the joint probability of reaching that node. Propagate subnormalized operators until probabilities and the final mixture have been assembled.

Adding internal nodes to terminal leaves. Summing history 11 together with its descendants 1010 and 1111 counts the same executions twice. Use a prefix-free terminal set or compare one fixed depth.

Branching on an unavailable or idealized value. A controller acts on its reported record after that record arrives. It cannot act on an unobserved ideal detector outcome or a bit that has not completed its causal path.

Replacing measured control by coherent control silently. The two processes can agree on computational-basis labels while differing on off-diagonal terms, intermediate records, and resources. State and verify the particular deferred measurement equivalence being used.

Merging incompatible branches. A quantum value that is live on one edge and released on another has no valid merged type. Match lifetimes and outputs, or carry an explicit optional value, replacement, provenance token, or frame.

Calling reset an inverse. Measurement followed by conditional correction is a many-to-one channel. It can establish a reuse postcondition without recovering lost coherence or erasing the copied classical record.

Confusing a Pauli frame with a pulse. A frame update consumes classical memory rather than applying the corresponding gate. Every later gate and measurement must transform or consume that frame correctly.

Propagating a Pauli frame blindly through a non-Clifford gate. Clifford conjugation preserves the Pauli group; general conjugation does not. Adapt the strategy or track a richer correction object.

Reporting postselected output without its probability. A selected branch may have the desired state while occurring rarely. Report success, exhaustion, abort, and timeout probabilities together with any conditioned state.

Leaving a retry loop uncapped. “Repeat until success” is not a finite resource contract until a stopping rule or an explicitly unbounded model is given. Expected cost does not replace a worst-case or tail statement.

Using only average latency. Feasibility is controlled by the least-slack relevant branch after its guard. Give absolute event times, a deadline, and the worst branch rather than only a mean.

Promoting ideal arithmetic to hardware evidence. Exact branch equations do not establish assignment fidelity, QND behavior, leakage suppression, reset error, crosstalk, or measured controller latency.

Exercise 1: One Measurement-Conditioned Channel

Section titled “Exercise 1: One Measurement-Conditioned Channel”

For

ρ=(1/21/41/41/2),\rho = \begin{pmatrix} 1/2&1/4\\ 1/4&1/2 \end{pmatrix},

perform an XX-basis Lüders measurement, encode +↦0+\mapsto0 and −↦1-\mapsto1, and apply ZmZ^m. Find the outcome probabilities, corrected conditional outputs, cq state in M⊗QM\otimes Q order, and history-forgotten output.

Solution

With P±=∣±⟩⟨±∣P_\pm=|\pm\rangle\langle\pm|,

p+=⟨+∣ρ∣+⟩=34,p−=14.p_+ = \langle+|\rho|+\rangle = \frac34, \qquad p_- = \frac14.

The uncorrected branches are (3/4)P+(3/4)P_+ and (1/4)P−(1/4)P_-. Since Z∣−⟩=∣+⟩Z|-\rangle=|+\rangle, applying ZmZ^m gives

ρ~0′=34P+,ρ~1′=14P+.\widetilde\rho_0' = \frac34P_+, \qquad \widetilde\rho_1' = \frac14P_+.

Both normalized conditional outputs are ∣+⟩|+\rangle. Therefore

ΩMQ=(34∣0⟩⟨0∣M+14∣1⟩⟨1∣M)⊗P+,\Omega_{MQ} = \left( \frac34|0\rangle\langle0|_M + \frac14|1\rangle\langle1|_M \right) \otimes P_+,

and forgetting MM gives ρout=P+\rho_{\mathrm{out}}=P_+.

Exercise 2: Normalize a Two-Stage Branch Tree

Section titled “Exercise 2: Normalize a Two-Stage Branch Tree”

The first binary outcome is fair. Only after m1=1m_1=1, a second measurement has p(m2=0∣m1=1)=3/4p(m_2=0\mid m_1=1)=3/4. A zero terminates successfully. Find the terminal probabilities for 0,10,110,10,11, the success probability, the expected measurement count, and the success-conditioned history weights.

Solution

The prefix-free terminal probabilities are

p(0)=12,p(10)=1234=38,p(11)=1214=18.p(0)=\frac12, \qquad p(10)=\frac12\frac34=\frac38, \qquad p(11)=\frac12\frac14=\frac18.

They sum to one. Histories 00 and 1010 are successful, so

p(success)=12+38=78.p(\text{success}) = \frac12+\frac38 = \frac78.

One measurement is used on history 00 and two on histories 1010 and 1111:

E[Nmeas]=12(1)+(38+18)(2)=32.\mathbb E[N_{\mathrm{meas}}] = \frac12(1) + \left(\frac38+\frac18\right)(2) = \frac32.

Conditioning the two successful leaves on their total probability 7/87/8 gives

p(0∣success)=47,p(10∣success)=37.p(0\mid\text{success})=\frac47, \qquad p(10\mid\text{success})=\frac37.

Exercise 3: Prove the Active-Reset Channel

Section titled “Exercise 3: Prove the Active-Reset Channel”

For

ρ=(acc∗1−a),\rho = \begin{pmatrix} a&c\\ c^*&1-a \end{pmatrix},

prove that computational-basis measurement followed by XmX^m produces ∣0⟩⟨0∣|0\rangle\langle0|. Track the classical record and classify the resulting quantum channel.

Solution

The corrected branch Kraus operators may be written

K0=P0=∣0⟩⟨0∣,K1=XP1=∣0⟩⟨1∣.K_0=P_0=|0\rangle\langle0|, \qquad K_1=XP_1=|0\rangle\langle1|.

They satisfy

K0†K0+K1†K1=P0+P1=I,K_0^\dagger K_0+K_1^\dagger K_1 = P_0+P_1 =I,

so the map is completely positive and trace preserving. Its output is

R(ρ)=K0ρK0†+K1ρK1†=aP0+(1−a)P0=P0.\begin{aligned} \mathcal R(\rho) &= K_0\rho K_0^\dagger + K_1\rho K_1^\dagger \\ &= aP_0+(1-a)P_0 = P_0. \end{aligned}

The record has probabilities p(0)=ap(0)=a and p(1)=1−ap(1)=1-a; the coherence cc is absent from both recorded branches. The quantum channel is constant-output, CPTP, nonunitary, and noninvertible. Retaining the bit preserves the classical distribution even though the quantum marginal is always P0P_0.

An outstanding frame is F=XaZbF=X^aZ^b. Propagate it through physical HH followed by SS, up to global phase. How must a final physical ZZ-measurement bit be interpreted?

Solution

First use HXH=ZHXH=Z and HZH=XHZH=X:

HFH≐XbZa.HFH \doteq X^bZ^a.

Then SXS†≐XZSXS^\dagger\doteq XZ and SZS†=ZSZS^\dagger=Z, so

S(HFH)S†≐XbZa⊕b.S(HFH)S^\dagger \doteq X^bZ^{a\oplus b}.

The propagated XX exponent is bb, and an XX flips a physical ZZ-measurement outcome. Hence

zlogical=zphysical⊕b.z_{\mathrm{logical}} = z_{\mathrm{physical}}\oplus b.

The answer is a classical reinterpretation only if the frame remains tracked; otherwise the outstanding correction must be applied physically.

Exercise 5: Repair an Ill-Typed Branch Merge

Section titled “Exercise 5: Repair an Ill-Typed Branch Merge”

Branch m=0m=0 returns (m,q)(m,q) with qq live. Branch m=1m=1 destructively measures or releases qq and returns only mm. Diagnose a later merged use of qq and give two valid repairs. What should be merged if both branches retain a qubit but carry different Pauli frames?

Solution

The merge is ill typed: one incoming edge supplies a live quantum value and the other does not. A later gate on a merged symbol qq therefore has no channel semantics on the m=1m=1 branch.

One repair is to make both branches record-only and forbid later quantum use. A second is to prepare or reset an explicit replacement in branch 11, then merge quantum values with compatible state, lifetime, and provenance contracts. The replacement is a new declared value; reusing the old wire label does not undo destructive measurement or release.

If both qubits remain live but their Pauli frames differ, merge (q,frame)(q,\mathrm{frame}). Dropping the frame would make later gates and measurement interpretations branch dependent without recording that dependence.

A measurement ends at 1000 ns1000\,\mathrm{ns}. Acquisition, classification, decision, and dispatch take 90,35,25,10 ns90,35,25,10\,\mathrm{ns}. The dependent operation has deadline 1200 ns1200\,\mathrm{ns} and the declared guard is 20 ns20\,\mathrm{ns}. Find readiness, raw slack, and residual slack. Repeat if classification takes 65 ns65\,\mathrm{ns}.

Solution

For the first schedule, the record path lasts

90+35+25+10=160 ns,90+35+25+10 = 160\ \mathrm{ns},

so

tready=1000+160=1160 ns.t_{\mathrm{ready}} = 1000+160 = 1160\ \mathrm{ns}.

The raw slack is 1200−1160=40 ns1200-1160=40\,\mathrm{ns}, and subtracting the guard leaves 20 ns20\,\mathrm{ns}. The guarded schedule passes.

Increasing classification from 3535 to 65 ns65\,\mathrm{ns} adds 30 ns30\,\mathrm{ns}:

tready′=1190 ns.t_{\mathrm{ready}}' = 1190\ \mathrm{ns}.

Raw slack is now 10 ns10\,\mathrm{ns} and residual slack is 10−20=−10 ns10-20=-10\,\mathrm{ns}. The guarded schedule fails even though the unguarded operation arrives before the deadline.

Independent attempts succeed with probability 0.30.3. At most four attempts are allowed. Find the probability of success by the cap, the exhaustion probability, the expected number of attempts, and the worst-case count.

Solution

The failure probability per attempt is q=0.7q=0.7. Four consecutive failures have probability

q4=0.74=0.2401.q^4 = 0.7^4 = 0.2401.

Therefore

p(success by cap)=1−q4=0.7599.p(\text{success by cap}) = 1-q^4 = 0.7599.

The exhaustion probability is 0.24010.2401. This policy has no separate abort or timeout exit, so both of those probabilities are zero.

Attempt kk is reached only after the first k−1k-1 failures, so

E[N]=1+q+q2+q3=1+0.7+0.49+0.343=2.533.\begin{aligned} \mathbb E[N] &= 1+q+q^2+q^3 \\ &= 1+0.7+0.49+0.343 \\ &= 2.533. \end{aligned}

The worst case is four attempts. A state or statistic conditioned on the 0.75990.7599 success event is postselected; the capped policy is not a deterministic transformation.

Exercise 8: Complete Adaptive Record: Bell-Branch Correction

Section titled “Exercise 8: Complete Adaptive Record: Bell-Branch Correction”

Start from

∣Φ+⟩=∣00⟩+∣11⟩2,|\Phi^+\rangle = \frac{|00\rangle+|11\rangle}{\sqrt2},

measure q0q_0 in the XX basis, and use the result to make the logical state of q1q_1 equal to ∣+⟩|+\rangle. Complete the full adaptive record, including an ideal schedule and a comparison with omitted correction.

Solution
  1. Adaptive task and licensed claim — Verify that an ideal XX-basis measurement of q0q_0, followed by physical ZmZ^m on q1q_1 or an equivalent tracked ZZ frame, returns logical ∣+⟩|+\rangle on q1q_1. License only the exact branch calculation and declared schedule.

  2. Quantum registers, classical records, order, and lifetimes — Use qubits (q0,q1)(q_0,q_1) initially and one classical bit mm. After measuring q0q_0, retain q1q_1 and the bit, with cq order M⊗Q1M\otimes Q_1. The measured qubit is not used after its outcome is produced.

  3. Initial state, preparation, and promises — Prepare the exact Bell state ∣Φ+⟩|\Phi^+\rangle. No experimental preparation fidelity or promise outside this declared input is inferred.

  4. Measurement instruments and reported outcomes — Measure q0q_0 with P+=∣+⟩⟨+∣P_+=|+\rangle\langle+| and P−=∣−⟩⟨−∣P_-=|-\rangle\langle-|, encoding +↦m=0+\mapsto m=0 and −↦m=1-\mapsto m=1. Since

    ∣Φ+⟩=∣+⟩∣+⟩+∣−⟩∣−⟩2,|\Phi^+\rangle = \frac{|+\rangle|+\rangle+|-\rangle|-\rangle}{\sqrt2},

    the two reported outcomes are uniform and leave q1q_1 in ∣+⟩|+\rangle and ∣−⟩|-\rangle, respectively.

  5. Branch predicates and classical dataflow — If m=0m=0, take the identity branch. If m=1m=1, request ZZ or record an outstanding ZZ frame. The bit is available only after the declared 40 ns40\,\mathrm{ns} record path and remains live through verification.

  6. Conditional operations, frame updates, reset, and reuse — Physical ZmZ^m maps both conditional states to ∣+⟩|+\rangle. Alternatively, leave the physical state on the m=1m=1 branch as ∣−⟩|-\rangle and store a ZZ frame that flips the interpretation of a later XX-basis result. No reset or qubit reuse occurs in this exercise.

  7. History probabilities, conditional states, and merge rule — The prefix-free terminal histories are {0,1}\{0,1\} with probability 1/21/2 each. After physical correction, the cq output is

    ΩMQ1=IM2⊗∣+⟩⟨+∣.\Omega_{MQ_1} = \frac{I_M}{2} \otimes |+\rangle\langle+|.

    Forgetting mm gives ∣+⟩⟨+∣|+\rangle\langle+|. Under frame tracking, the same expression describes the logical cq output only when the frame token is retained and consumed by later operations.

  8. Causal schedule, latency budget, and resource currencies — Let the measurement end at 100 ns100\,\mathrm{ns}, the record path take 40 ns40\,\mathrm{ns}, and the physical correction take 20 ns20\,\mathrm{ns}. The corrected branch is ready at 160 ns160\,\mathrm{ns}. A 180 ns180\,\mathrm{ns} deadline and declared zero guard give raw and residual slack 20 ns20\,\mathrm{ns}. The physical-correction version uses one measurement, one record bit, and at most one ZZ, with expected ZZ count 1/21/2.

  9. Output contract, verification metric, and evidence — The corrected logical output obeys ⟨X⟩=1\langle X\rangle=1. If the correction is omitted and mm is forgotten, then

    ρQ1omit=12P++12P−=I2.\rho_{Q_1}^{\mathrm{omit}} = \frac12P_+ + \frac12P_- = \frac{I}{2}.

    Relative to P+P_+, its squared fidelity and trace distance are

    F2(P+,I/2)=12,Dtr(P+,I/2)=12.F^2(P_+,I/2) = \frac12, \qquad D_{\mathrm{tr}}(P_+,I/2) = \frac12.

    Branch normalization, the cq tensor order, the logical postcondition, the distinguishing XX expectation, and deadline slack all pass exactly in the declared model.

  10. Conclusion, stopping point, and canonical handoff — The ideal measurement-conditioned correction and its frame alternative pass for the declared Bell input. Quantum Teleportation owns the wider state-transfer protocol; this exercise establishes neither a Bell-state preparation nor a hardware feedforward benchmark.

  • D. Aharonov, A. Kitaev, and N. Nisan, “Quantum Circuits with Mixed States,” Proceedings of the 30th Annual ACM Symposium on Theory of Computing, 20–30 (1998), doi:10.1145/276698.276708.
  • E. Bäumer et al., “Efficient Long-Range Entanglement Using Dynamic Circuits,” PRX Quantum 5, 030339 (2024), doi:10.1103/PRXQuantum.5.030339.
  • C. H. Bennett, G. Brassard, C. Crépeau, R. Jozsa, A. Peres, and W. K. Wootters, “Teleporting an Unknown Quantum State via Dual Classical and Einstein–Podolsky–Rosen Channels,” Physical Review Letters 70, 1895–1899 (1993), doi:10.1103/PhysRevLett.70.1895.
  • A. D. Córcoles et al., “Exploiting Dynamic Quantum Circuits in a Quantum Algorithm with Superconducting Qubits,” Physical Review Letters 127, 100501 (2021), doi:10.1103/PhysRevLett.127.100501.
  • A. W. Cross et al., “OpenQASM 3: A Broader and Deeper Quantum Assembly Language,” ACM Transactions on Quantum Computing 3, article 12 (2022), doi:10.1145/3505636.
  • D. Gottesman and I. L. Chuang, “Demonstrating the Viability of Universal Quantum Computation Using Teleportation and Single-Qubit Operations,” Nature 402, 390–393 (1999), doi:10.1038/46503.
  • R. B. Griffiths and C.-S. Niu, “Semiclassical Fourier Transform for Quantum Computation,” Physical Review Letters 76, 3228–3231 (1996), doi:10.1103/PhysRevLett.76.3228.
  • M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information, 10th Anniversary Edition, Cambridge University Press (2010), doi:10.1017/CBO9780511976667.
  • R. Raussendorf and H. J. Briegel, “A One-Way Quantum Computer,” Physical Review Letters 86, 5188–5191 (2001), doi:10.1103/PhysRevLett.86.5188.
  • D. Ristè, C. C. Bultink, K. W. Lehnert, and L. DiCarlo, “Feedback Control of a Solid-State Qubit Using High-Fidelity Projective Measurement,” Physical Review Letters 109, 240502 (2012), doi:10.1103/PhysRevLett.109.240502.
  • P. Selinger and B. Valiron, “A Lambda Calculus for Quantum Computation with Classical Control,” Mathematical Structures in Computer Science 16, 527–552 (2006), doi:10.1017/S0960129506005238.
  • J. Watrous, The Theory of Quantum Information, Cambridge University Press (2018), doi:10.1017/9781316848142.

The cited dynamic-circuit experiments illustrate applications and hardware realizations; they do not license platform-independent performance claims. The ideal reset and timing values in the worked audits are synthetic calculations, not measurements quoted from those experiments.