English

Hoare meets Heisenberg: A Lightweight Logic for Quantum Programs

Quantum Physics 2025-03-21 v5 Emerging Technologies Logic in Computer Science Programming Languages

Abstract

We show that Gottesman's (1998) semantics for Clifford circuits based on the Heisenberg representation gives rise to a lightweight Hoare-like logic for efficiently characterizing a common subset of quantum programs. Our applications include (i) certifying whether auxiliary qubits can be safely disposed of, (ii) determining if a system is separable across a given bipartition, (iii) checking the transversality of a gate with respect to a given stabilizer code, and (iv) computing post-measurement states for computational basis measurements. Further, this logic is extended to accommodate universal quantum computing by deriving Hoare triples for the TT-gate, multiply-controlled unitaries such as the Toffoli gate, and some gate injection circuits that use associated magic states. A number of interesting results emerge from this logic, including a lower bound on the number of TT gates necessary to perform a multiply-controlled ZZ gate.

Keywords

Cite

@article{arxiv.2101.08939,
  title  = {Hoare meets Heisenberg: A Lightweight Logic for Quantum Programs},
  author = {Aarthi Sundaram and Robert Rand and Kartik Singhal and Brad Lackey},
  journal= {arXiv preprint arXiv:2101.08939},
  year   = {2025}
}

Comments

52 pages, 3 figures

R2 v1 2026-06-23T22:24:43.325Z