Variational quantum algorithms (VQAs) have attracted a lot of attention from the quantum computing community for the last few years. Their hybrid quantum-classical nature with relatively shallow quantum circuits makes them a promising platform for demonstrating the capabilities of noisy intermediate scale quantum (NISQ) devices. Although the classical machine learning community focuses on gradient-based parameter optimization, finding near-exact gradients for variational quantum circuits (VQCs) with the parameter-shift rule introduces a large sampling overhead. Therefore, gradient-free optimizers have gained popularity in quantum machine learning circles. Among the most promising candidates is the simultaneous perturbation stochastic approximation (SPSA) algorithm, due to its low computational cost and inherent noise resilience. We introduce a novel approach that uses the approximated gradient from SPSA in combination with state-of-the-art gradient-based classical optimizers. We demonstrate numerically that this out-performs both standard SPSA and the parameter-shift rule in terms of convergence rate and absolute error in simple regression tasks. The improvement of our novel approach over SPSA with stochastic gradient descent (SGD) is even amplified when shot- and hardware-noise are taken into account. We also demonstrate that error mitigation does not significantly affect our results.
Variational quantum algorithms (VQAs) have attracted a lot of attention from the quantum computing community for the last few years. Their hybrid quantum-classical nature with relatively shallow quantum circuits makes them a promising platform for demonstrating the capabilities of noisy intermediate scale quantum (NISQ) devices. Although the classical machine learning community focuses on gradient-based parameter optimization, finding near-exact gradients for variational quantum circuits (VQCs) with the parameter-shift rule introduces a large sampling overhead. Therefore, gradient-free optimizers have gained popularity in quantum machine learning circles. Among the most promising candidates is the simultaneous perturbation stochastic approximation (SPSA) algorithm, due to its low computational cost and inherent noise resilience. We introduce a novel approach that uses the approximated gradient from SPSA in combination with state-of-the-art gradient-based classical optimizers. We demonstrate numerically that this out-performs both standard SPSA and the parameter-shift rule in terms of convergence rate and absolute error in simple regression tasks. The improvement of our novel approach over SPSA with stochastic gradient descent (SGD) is even amplified when shot- and hardware-noise are taken into account. We also demonstrate that error mitigation does not significantly affect our results.
The study of variational quantum algorithms (VQCs) has received significant attention from the quantum computing community in recent years. These hybrid algorithms, utilizing both classical and quantum components, are well-suited for noisy intermediate-scale quantum devices. Though estimating exact gradients using the parameter-shift rule to optimize the VQCs is realizable in NISQ devices, they do not scale well for larger problem sizes. The computational complexity, in terms of the number of circuit evaluations required for gradient estimation by the parameter-shift rule, scales linearly with the number of parameters in VQCs. On the other hand, techniques that approximate the gradients of the VQCs, such as the simultaneous perturbation stochastic approximation (SPSA), do not scale with the number of parameters but struggle with instability and often attain suboptimal solutions. In this work, we introduce a novel gradient estimation approach called Guided-SPSA, which meaningfully combines the parameter-shift rule and SPSA-based gradient approximation. The Guided-SPSA results in a 15% to 25% reduction in the number of circuit evaluations required during training for a similar or better optimality of the solution found compared to the parameter-shift rule. The Guided-SPSA outperforms standard SPSA in all scenarios and outperforms the parameter-shift rule in scenarios such as suboptimal initialization of the parameters. We demonstrate numerically the performance of Guided-SPSA on different paradigms of quantum machine learning, such as regression, classification, and reinforcement learning.
In this study, we investigated the Variational Quantum Eigensolver (VQE) application for the Ising model as a testbed model, in which we thoroughly delved into several optimizers, both classical and quantum, and analyzed the extent to which each of these methods would offer a benefit. We then investigated a new combinatorial optimization scheme, termed QN-SPSA+PSR, in which the Fubini-Study metric is approximated within the Quantum Natural Gradient (QN) framework, with its inner gradient estimated by the Simultaneous Perturbation Stochastic Approximation (SPSA), while the outer gradient of the cost function is evaluated exactly by the Parameter-Shift Rule (PSR). The QN-SPSA+PSR method integrates the QN-SPSA computational efficiency with the precise gradient computation of the PSR, improving the stability of QN-SPSA-based and convergence speed per parameter update while maintaining low computational consumption. Our results provide a potential performance improvement in the VQAs' optimization subroutine, even in Quantum Machine Learning's optimization section, and enhance viable paths toward efficient quantum simulations on Noisy Intermediate-Scale Quantum Computing (NISQ) devices. Additionally, we also conducted a detailed study of quantum circuit ansatz structures in order to find the one that would work best with the Ising model and NISQ, in which we utilized the properties of the investigated model.
Training variational quantum models requires choosing between parameter-shift gradients, which are exact but cost O(P) forward evaluations, and simultaneous perturbation stochastic approximation (SPSA), which uses only two samples but produces high-variance estimates that can degrade optimisation on small supervised tasks. Whether the cheap gradient is usable depends on the variance that results from different choices of the SPSA perturbation scale, learning rate, and gain-decay schedule. We varied those quantities across a broad grid on a 6-qubit, 60-parameter QNLI classifier and compared the best configurations to parameter-shift AdamW and BuresQNG. AdamW-style SPSA with c0=0.01, η=0.10, γ=0.10 reached 55%±11% test accuracy, improving over the default configuration (49%±6%) but remaining 16-19 percentage points below the parameter-shift baselines because the two-sample SPSA gradient estimate has too much variance for reliable optimisation of 60 parameters in 40 epochs. Classical-gain SPSA and Bures-preconditioned SPSA performed worse, at 51% and 46% respectively. Bures-preconditioning a noisy two-sample SPSA gradient amplifies perturbation noise.
We present a novel method for determining gradients of parameterised quantum circuits (PQCs) in hybrid quantum-classical machine learning models by applying the multivariate version of the simultaneous perturbation stochastic approximation (SPSA) algorithm. The gradients of PQC layers can be calculated with an overhead of two evaluations per circuit per forward-pass independent of the number of circuit parameters, compared to the linear scaling of the parameter shift rule. These are then used in the backpropagation algorithm by applying the chain rule. We compare our method to the parameter shift rule for different circuit widths and batch sizes, and for a range of learning rates. We find that, as the number of qubits increases, our method converges significantly faster than the parameter shift rule and to a comparable accuracy, even when considering the optimal learning rate for each method.
Noisy Intermediate-Scale Quantum (NISQ) devices show great promise for quantum advantage via Parametrized Quantum Circuits (PQCs) and Variational Quantum Algorithms (VQAs). Due to hardware imperfections, however, especially barren plateaus and environmental Pauli noise, the cost landscape is highly distorted, resulting in inaccurate classical optimization during training. To overcome these challenges, a robust quantum gradient descent framework is presented with the integration of error mitigation directly within the optimization loop. A noise-resilient parameter-shift rule is defined and modeled analytically, as is a variant of stochastic gradient descent with real-time Pauli noise mitigation. The framework is based on a 6-qubit system, which is tested on the Max-Cut problem in the presence of different amounts of depolarizing noise. It is shown experimentally that the proposed algorithm is able to achieve the final cost error of 0.045 under significant noise, whereas the standard quantum gradient descent fails to achieve better than 0.320 under this noise. Moreover, the methodology is consistent, converging without a noise-induced flat landscape and without local minima. The method offers a scalable route towards future applications of quantum machine learning on non-fault-tolerant hardware that does not suffer from the large sampling overhead often associated with conventional error mitigation techniques.
Abstract In this study, we study the Variational Quantum Eigensolver (VQE) application for the Ising model as a test bed model, in which we pivotally delved into several optimization methods, both classical and quantum, and analyzed the quantum advantage that each of these methods offered, and then we proposed a new combinatorial optimization scheme, deemed as QN-SPSA+PSR which combines calculating approximately Fubini-study metric (QN-SPSA) and the exact evaluation of gradient by Parameter-Shift Rule (PSR). The QN-SPSA+PSR method integrates the QN-SPSA computational efficiency with the precise gradient computation of the PSR, improving both stability and convergence speed while maintaining low computational consumption. Our results provide a new potential quantum supremacy in the VQAs's optimization subroutine, even in Quantum Machine Learning's optimization section, and enhance viable paths toward efficient quantum simulations on Noisy Intermediate-Scale Quantum Computing (NISQ) devices. Additionally, we also conducted a detailed study of quantum circuit ansatz structures in order to find the one that would work best with the Ising model and NISQ, in which we utilized the properties of the investigated model.