Latency-Preserving Rewrites and Translation Validation for Dynamic Quantum Circuits

Rylan Malarchick

In qlin’s ideal replay model, fix an outcome record, nonnegative operation and feedforward costs, and a starting state that is running. Suppose the source replay completes without truncating a loop. A single hoist or merge moves an operation common to both branches to before or after the branch, respectively. The moved operation and each operation it crosses must act on disjoint qubits and share no classical bit written by either and read or written by the other. For a hoist, the moved operation must also leave the branch condition bits and the enclosing condition bits unwritten. For a merge, each crossed operation must leave the enclosing condition bits unwritten. The rewrite preserves the bit values, the positions in the outcome record and the stop flag. Each qubit is ready and each recorded measurement ends no later in the rewritten replay. The time when all qubits are ready therefore cannot increase, and neither can any finite nonnegative weighted sum of these times over the same source records.

What was already known

Fulginiti and colleagues used symbolic execution to simplify classical controls while preserving circuit behavior. Ye and Palsberg verified a compiler for Pauli-product measurements in Lean and certified logical measurement depth for selected outputs. The qlin theorem addresses the elapsed time of a local rewrite in a model that includes the wait for a measurement result to reach the controller.

How the result developed

  1. 14 Nov 2026 · Manuscript date [1]

    Rylan Malarchick reported the AI-assisted result in this manuscript.

Follow new evidence and revisions to this result.

Get email updates

Download contribution history

Contribution Assessment

AI involvementAI-centered
ImportanceModest
Technical verificationFormal (Lean)
Human understandingFew

AI involvement

Malarchick describes the main proof work. The Aristotle prover produced the proofs of the rule and latency theorems from statements that we wrote and froze first. He graded four proof rounds locally. Claude helped develop the later closure, controller and checker proofs and draft the paper.

Importance

The proof identifies when moving a common operation past a branch can avoid adding delay. Its guarantee covers two local rewrites in one timing model.

Technical verification

Malarchick reports that Lean 4 checked the single-step proofs and their finite weighted consequences and that the project audits the axioms used. The pinned Lean declarations state the footprint conditions, the requirement that the source replay complete, and the comparison on a shared outcome record.

Formal checking

Malarchick reports that Lean 4 checked the single-step proofs and their finite weighted consequences and that the project audits the axioms used. The pinned Lean declarations state the footprint conditions, the requirement that the source replay complete, and the comparison on a shared outcome record.

Checker
Lean 4 kernel, reported by Rylan Malarchick
Scope
Single-step ideal replay hoist and merge and their finite nonnegative weighted-makespan corollaries, under Theorem 4.1’s hypotheses.
Basis
Reported by the linked checker

Human understanding

Malarchick designed the timing statements and graded the proof rounds. The paper outlines the proof using monotonicity and the exchange of disjoint blocks. Its disclosure credits Claude with helping draft the text and leaves the authorship of that explanation unspecified.

View revision history
· addition

Added the research timeline.

· addition

Added a source excerpt documenting AI involvement.

· publication

Historical omission audit. The author identifies Aristotle as the producer of new ideal replay proofs for statements he had frozen.