Verification and Evaluation of A Comprehensive Quantum Simulation Compiler
Key takeaways · machine-generated
- On many benchmark programs the verified compiler yields about 94% fewer gates than PennyLane's block-encoding compiler.
- Verification is carried out in Rocq, composing per-stage error bounds into one proven end-to-end bound that the compiler uses for algorithm selection.
- Trotter-based circuits often beat block-encoding circuits in practice despite the asymptotic advantage of block encodings, and PennyLane bugs were found.
Hamiltonian simulation is a central application of quantum computing, yet most existing compilers offer no machine-checked guarantee that the circuits they produce approximate the intended evolution. The previous QBlue compiler verifies a Hamiltonian simulation compiler containing only Trotter-based algorithms. It takes a Hamiltonian written over Pauli strings, a simulation time, and an error bound, and produces a circuit or analog schedule that is proven, in the Rocq proof assistant, to approximate the ideal time evolution within that bound and proves a single end-to-end error bound that composes the errors of the individual stages; the compiler uses it to select, by resource estimation, the cheapest algorithm that meets the user's bound. This paper advances the verification efforts with two further steps. First, we extend QBlue to _ by verifying another important compilation method for Hamiltonian simulation: block-encoding-based (BE-based) algorithms. Second, we empirically evaluate 279 Hamiltonian simulation programs against the state-of-the-art BE-based compiler, PennyLane. For many programs, our compiler shows a 94% gate reduction compared to PennyLane. Additionally, we also discover issues and bugs in PennyLane. We also compare Trotter- and BE-based algorithms, providing a practical comparison for the long-standing debate over which algorithms perform better. Our results surprisingly show that Trotter-based algorithms may gain a practical advantage, even though BE algorithms have a theoretical advantage.
The QBlue compiler for Hamiltonian simulation is extended with block-encoding-based algorithms, with the full pipeline verified in the Rocq proof assistant to meet a user-given end-to-end error bound. The compiler is evaluated on 279 Hamiltonian simulation programs against the PennyLane block-encoding compiler, comparing gate counts and resource costs of Trotter- and block-encoding-based methods.