Abstract
Variational quantum algorithms (VQAs) offer a promising path toward using near-term quantum hardware for applications in academic and industrial research. These algorithms aim to find approximate solutions to quantum problems by optimizing a parametrized quantum circuit using a classical optimization algorithm. A successful VQA requires fast and reliable classical optimization algorithms. Understanding and optimizing how off-the-shelf optimization methods perform in this context is important for the future of the field. In this work, we study the performance of four commonly used gradient-free optimization methods [sequential least-squares quadratic programming, constrained optimization by linear approximations, the covariance matrix adaptation evolutionary strategy (CMA-ES), and the simultaneous perturbation stochastic approximation (SPSA)] to find ground-state energies of a range of small chemistry and material science problems. We test a telescoping sampling scheme (where the accuracy of the cost-function estimate provided to the optimizer is increased as the optimization converges) for all methods, demonstrating mixed results across our range of optimizers and problems chosen. We further hyperparameter tune two of the four optimizers (CMA-ES and SPSA) across a large range of models and demonstrate that with appropriate hyperparameter tuning, CMA-ES is competitive with and sometimes outperforms SPSA (which is not observed in the absence of hyperparameter tuning). Finally, we investigate the ability of an optimizer to beat the ``sampling-noise floor'' given by the sampling noise of each cost-function estimate provided to the optimizer. Our results demonstrate the necessity for tailoring and hyperparameter tuning known optimization techniques for inherently noisy variational quantum algorithms and that the variational landscape that one finds in a VQA is highly problem and system dependent. This provides guidance for future implementations of these algorithms in experiments.
Introduction
Variational Quantum Algorithms (VQAs) are considered a primary candidate for demonstrating quantum advantage on Noisy Intermediate-Scale Quantum (NISQ) hardware. These algorithms function by iteratively adjusting the parameters of a quantum circuit to minimize a cost function, typically the energy of a quantum state. This process relies on a classical optimizer to navigate the parameter landscape.
A significant challenge in VQAs is the presence of "shot noise." Since quantum measurements are probabilistic, the cost function evaluations provided to the classical optimizer are inherently noisy. This "blurry" landscape makes optimization difficult. While many researchers use standard optimizers with default settings, this study investigates whether systematic hyperparameter tuning and sophisticated sampling strategies can significantly improve performance.
Methodology
The study benchmarks four gradient-free optimizers: Sequential Least-Squares Quadratic Programming (SLSQP), Constrained Optimization by Linear Approximations (COBYLA), Simultaneous Perturbation Stochastic Approximation (SPSA), and the Covariance Matrix Adaptation Evolutionary Strategy (CMA-ES).
Sampling Strategies and Tuning
Two primary strategies were evaluated:
- Telescoping Sampling: A "three-stage" approach where measurement precision (number of shots) is increased as the optimization converges, compared against a fixed "one-stage" sampling.
- Hyperparameter Tuning: The IRACE (iterated racing) tool was employed to automatically optimize hyperparameters (e.g., step size, population size) for SPSA and CMA-ES across various problem instances.
Benchmarking Problems
The optimizers were tested on molecular systems ($H_4$ and $H_2O$) using the Unitary Coupled-Cluster (UCC) ansatz and Fermi-Hubbard models ($1 \times 6$, $2 \times 2$, and $2 \times 3$ lattices) using the Variational Hamiltonian Ansatz (VHA). These systems ranged from 6 to 12 qubits and 6 to 26 parameters.
Results and Discussion
Optimizer Performance and Tuning
A key finding is the impact of hyperparameter tuning. While SPSA often outperforms CMA-ES with default settings, tuned CMA-ES becomes highly competitive. In specific cases, such as the $2 \times 2$ Hubbard model, tuned CMA-ES achieved a five-fold performance improvement over SPSA.
The effectiveness of telescoping sampling was found to be inconsistent, yielding mixed results depending on the specific optimizer and problem geometry. This suggests that increasing precision over time is not a universal remedy for shot noise.
Beating the Noise Floor
One of the most significant insights involves the "favorite" candidate in CMA-ES. Unlike optimizers that only track the best-measured point (which might be a lucky outlier due to noise), CMA-ES maintains a statistical model of the landscape. The mean of this distribution—the "favorite" candidate—proved to be much more robust.
As shown in Figure 3, the "favorite" candidate ($\mathcal{C}(\theta_{fav})$) often yields a more accurate energy estimate than the "best-ever" measured point ($\mathcal{C}(\theta_{best})$), effectively filtering out measurement noise. In some systems, this approach allowed the optimizer to produce results up to 10 times more accurate than the individual sampling noise floor.
Conclusion and Future Outlook
This work highlights that the performance of classical optimizers in VQAs is highly dependent on hyperparameter tuning and the specific problem landscape. CMA-ES, when properly tuned, offers a powerful alternative to SPSA, particularly due to its noise-filtering capabilities.
Future research should address the scalability of these methods to larger qubit counts, where the "curse of dimensionality" may pose challenges for evolutionary strategies. Additionally, investigating how these optimizers handle hardware-specific errors beyond shot noise, such as gate decoherence, will be crucial for practical NISQ applications.
Summary updated