In this proceedings we present quantum machine learning optimization experiments using stochastic gradient descent with the parameter shift rule algorithm. We first describe the gradient evaluation algorithm and its optimization procedure implemented using the Qibo framework. After numerically testing the implementation using quantum simulation on classical hardware, we perform successfully a full quantum hardware optimization exercise using a single superconducting qubit chip controlled by Qibo. We show results for a quantum regression model by comparing simulation to real hardware optimization.
In this proceedings we present quantum machine learning optimization experiments using stochastic gradient descent with the parameter shift rule algorithm. We first describe the gradient evaluation algorithm and its optimization procedure implemented using the Qibo framework. After numerically testing the implementation using quantum simulation on classical hardware, we perform successfully a full quantum hardware optimization exercise using a single superconducting qubit chip controlled by Qibo. We show results for a quantum regression model by comparing simulation to real hardware optimization.
Within the context of hybrid quantum-classical optimization, gradient descent based optimizers typically require the evaluation of expectation values with respect to the outcome of parameterized quantum circuits. In this work, we explore the consequences of the prior observation that estimation of these quantities on quantum hardware results in a form of stochastic gradient descent optimization. We formalize this notion, which allows us to show that in many relevant cases, including VQE, QAOA and certain quantum classifiers, estimating expectation values with k measurement outcomes results in optimization algorithms whose convergence properties can be rigorously well understood, for any value of k. In fact, even using single measurement outcomes for the estimation of expectation values is sufficient. Moreover, in many settings the required gradients can be expressed as linear combinations of expectation values - originating, e.g., from a sum over local terms of a Hamiltonian, a parameter shift rule, or a sum over data-set instances - and we show that in these cases k-shot expectation value estimation can be combined with sampling over terms of the linear combination, to obtain "doubly stochastic" gradient descent optimizers. For all algorithms we prove convergence guarantees, providing a framework for the derivation of rigorous optimization results in the context of near-term quantum devices. Additionally, we explore numerically these methods on benchmark VQE, QAOA and quantum-enhanced machine learning tasks and show that treating the stochastic settings as hyper-parameters allows for state-of-the-art results with significantly fewer circuit executions and measurements.
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.
Quantum Machine Learning is gaining traction by leveraging quantum advantage to outperform classical Machine Learning. Many classical and quantum optimizers have been proposed to train Parameterized Quantum Circuits in the simulation environment, achieving high accuracy and fast convergence speed. However, to the best of our knowledge, currently there is no related work investigating these optimizers on multiple algorithms, which may lead to the selection of suboptimal optimizers. In this paper, we first benchmark the most popular classical and quantum optimizers, such as Gradient Descent (GD), Adaptive Moment Estimation (Adam), and Quantum Natural Gradient Descent (QNG), through the Quantum Compilation algorithm. Evaluated metrics include the lowest cost value and the wall time. The results indicate that Adam outperforms other optimizers in terms of convergence speed, cost value, and stability. Furthermore, we conduct additional experiments on multiple algorithms with Adam variants, demonstrating that the choice of hyperparameters significantly impacts the optimizer's performance.
Within the context of hybrid quantum-classical optimization, gradient descent based optimizers typically require the evaluation of expectation values with respect to the outcome of parameterized quantum circuits. In this work, we explore the consequences of the prior observation that estimation of these quantities on quantum hardware results in a form of s t o c h a s t i c gradient descent optimization. We formalize this notion, which allows us to show that in many relevant cases, including VQE, QAOA and certain quantum classifiers, estimating expectation values with k measurement outcomes results in optimization algorithms whose convergence properties can be rigorously well understood, for any value of k . In fact, even using single measurement outcomes for the estimation of expectation values is sufficient. Moreover, in many settings the required gradients can be expressed as linear combinations of expectation values -- originating, e.g., from a sum over local terms of a Hamiltonian, a parameter shift rule, or a sum over data-set instances -- and we show that in these cases k -shot expectation value estimation can be combined with sampling over terms of the linear combination, to obtain ``doubly stochastic'' gradient descent optimizers. For all algorithms we prove convergence guarantees, providing a framework for the derivation of rigorous optimization results in the context of near-term quantum devices. Additionally, we explore numerically these methods on benchmark VQE, QAOA and quantum-enhanced machine learning tasks and show that treating the stochastic settings as hyper-parameters allows for state-of-the-art results with significantly fewer circuit executions and measurements.
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.
Quantum Machine Learning (QML) represents a paradigm shift in machine learning, leveraging quantum mechanics to address computational challenges and unlock new capabilities. This paper explores the application of adaptive gradient descent, a core technique in classical machine learning, to quantum machine learning algorithms. We propose a novel quantum gradient descent framework that dynamically adjusts the learning rate and optimization direction based on the input data's inherent features. This adaptive approach aims to significantly enhance training efficiency and model generalization performance. The core mechanism involves the introduction of a 'quantum gradient descent' process, utilizing quantum entanglement and superposition to accelerate gradient computation compared to classical methods. We analyze the potential benefits and challenges of this new algorithm, demonstrating its effectiveness through a simplified conceptual model.