Exact gradient for universal cost functions in variational quantum algorithms
Jesus Urbaneja, Le Bin Ho
Published: 2025/9/22
Abstract
We present a universal and exact framework for gradient derivation that is valid for all differentiable cost functions in variational quantum algorithms (VQAs). The framework provides analytic gradients without relying on restrictive assumptions, thereby extending gradient-based optimization beyond conventional expectation-value settings. These gradients can be directly accessed on quantum hardware through the Hadamard and Hilbert-Schmidt tests, making the method experimentally accessible. We illustrate the approach in variational quantum compilation, where it enables efficient and stable optimization. By establishing a universal and hardware-compatible method, this work advances the scalability and reliability of VQAs.