Kernpiler: Compiler Optimization for Quantum Hamiltonian Simulation with Partial Trotterization
Ethan Decker, Lucas Goetz, Evan McKinney, Erik Gustafson, Junyu Zhou, Yuhao Liu, Alex K. Jones, Ang Li, Alexander Schuckert, Samuel Stein, Eleanor Crane, Gushu Li
TL;DR
This paper introduces Kernpiler, a compiler framework for quantum Hamiltonian simulation that leverages partial Trotterization to reduce error per Trotter step by partitioning non-commuting terms into dense, small-unityary blocks. It combines dense-term partitioning, commuting-group reordering with edge-focused Trotter steps, and Monte Carlo Tree Search to synthesize grouped exponentials into optimized gate sequences, achieving significant depth and gate-count reductions compared with state-of-the-art baselines. Theoretical analysis shows commutator-based error cancellation scales with partition size, and empirical results across spin, fermionic, and molecular Hamiltonians demonstrate substantial improvements in both gate counts and circuit depth, especially for first-order Trotterization. The approach also integrates randomized compilation concepts to convert coherent errors into stochastic noise, increasing robustness and scalability. Overall, Kernpiler offers a practical route to more efficient quantum simulations on near- and mid-term devices by exploiting fine-grained error structure and learned synthesis patterns.
Abstract
Quantum computing promises transformative impacts in simulating Hamiltonian dynamics, essential for studying physical systems inaccessible by classical computing. However, existing compilation techniques for Hamiltonian simulation, in particular the commonly used Trotter formulas struggle to provide gate counts feasible on current quantum computers for beyond-classical simulations. We propose partial Trotterization, where sets of non-commuting Hamiltonian terms are directly compiled allowing for less error per Trotter step and therefore a reduction of Trotter steps overall. Furthermore, a suite of novel optimizations are introduced which complement the new partial Trotterization technique, including reinforcement learning for complex unitary decompositions and high level Hamiltonian analysis for unitary reduction. We demonstrate with numerical simulations across spin and fermionic Hamiltonians that compared to state of the art methods such as Qiskit's Rustiq and Qiskit's Paulievolutiongate, our novel compiler presents up to 10x gate and depth count reductions.
