A categorical harness for simultaneous end-to-end compilation of variational quantum programs
Ximo WangXi ZhaoRui LiShikun ZhangZheng Qin
Kai KangJianbo SunYichi Zhang Ximo Wang
Xi Zhao
Rui Li
Shikun Zhang
Zheng Qin

Kai Kang
Jianbo Sun
Yichi Zhang
+8
This paper introduces a categorical harness that treats a compiled quantum program as a composition of maps between typed quantum-classical interfaces, and optimizes that composition end-to-end against task requirements and the physical cost of the complete program, rather than optimizing decomposition and placement stages in isolation. Given a task specification and realizable hardware, the harness rewrites the diagram, verifies the task-specified observables, and uses physical cost bounds to certify optimal strategies. Across eleven neutral-atom pipelines, encoded quantum-memory and Steane benchmarks, nine variational applications, and superconducting hardware, it improved on host workflows in native operation counts, depth, qubit occupancy, execution time, fidelity, logical readout accuracy, and task acceptance; on Haituo, its gate-minimum strategy used one-seventh as many native gates per shot as LightCone and cut mean absolute energy error by 75.1%. The authors present categorical diagram rewriting as a foundation for scalable, resource-efficient compilation across near-term and fault-tolerant architectures.

arXiv ·
· December 2, 2026