🤖 AI Summary
This work addresses the performance bottleneck in hybrid quantum-classical machine learning, where frequent invocations of small parameterized quantum circuits lead to scheduling overheads that dominate runtime, and the lack of systematic criteria for applying one-shot compilation strategies to static variational circuits. We propose VQCSim, a PyTorch-native state-vector simulator enabling one-shot compilation with built-in automatic differentiation, enhanced by compilation caching, batched vectorization, and hardware-aware scheduling. For the first time, we systematically delineate the applicability boundary of one-shot compiled simulation and introduce vqcsim-oracle, an open-source backend selector achieving high-accuracy (91.1%–97.7%) automatic switching. Experiments across a five-GPU test suite demonstrate a median inference speedup of 4.49× and up to 26.78× acceleration in native training, with semantic validation accuracy reaching 87.7%.
📝 Abstract
Hybrid quantum-classical machine learning workflows repeatedly evaluate many small parametrized circuits during training and model exploration. In this regime, framework dispatch and orchestration overhead often dominate runtime. Prior simulators accelerate execution but leave open the question of when compile-once specialization is the right choice for static variational circuits. We answer this question with VQCSim, a compile-once, PyTorch-native statevector execution path with native autograd. In a systematic MQT Bench study, VQCSim compiles all tested static circuits and provides 87.7% end-to-end semantic validation. Across a five-GPU evaluation set, VQCSim delivers pooled median speedups of 4.49x for native inference and 26.78x for native training, while retaining a 3.31x advantage under matched finite-difference training. Ablation identifies native autograd as the dominant source of acceleration (27.6x), with compile-once caching and batch vectorization contributing additional gains. The speedup trades higher GPU memory (VQCSim is memory-limited at the high end) for lower runtime. We derive a hardware-aware regime map and release vqcsim-oracle, an open-source backend selector with 91.1%-97.7% top-1 agreement (including cross-GPU transfers), enabling automatic simulator selection in QML design loops.