Table of Contents
Fetching ...

Efficient Quantum Gradient and Higher-order Derivative Estimation via Generalized Hadamard Test

Dantong Li, Dikshant Dulal, Mykhailo Ohorodnikov, Hanrui Wang, Yongshan Ding

TL;DR

This work tackles the bottleneck of gradient estimation in parameterised quantum circuits on NISQ devices. It introduces the Flexible Hadamard Test, the k-fold Hadamard Test for higher-order derivatives, and Quantum Automatic Differentiation to adapt gradient methods per parameter, achieving substantial reductions in circuit executions and improved convergence. Empirical results show up to a threefold reduction in circuit cost for QAQC and up to a 9× speedup in QNN training when using QAD, highlighting practical gains for VQA workflows. Collectively, these methods advance efficient, adaptive gradient computation, enabling more scalable quantum algorithms in the near term.

Abstract

In the context of Noisy Intermediate-Scale Quantum (NISQ) computing, parameterized quantum circuits (PQCs) represent a promising paradigm for tackling challenges in quantum sensing, optimal control, optimization, and machine learning on near-term quantum hardware. Gradient-based methods are crucial for understanding the behavior of PQCs and have demonstrated substantial advantages in the convergence rates of Variational Quantum Algorithms (VQAs) compared to gradient-free methods. However, existing gradient estimation methods, such as Finite Difference, Parameter Shift Rule, Hadamard Test, and Direct Hadamard Test, often yield suboptimal gradient circuits for certain PQCs. To address these limitations, we introduce the Flexible Hadamard Test, which, when applied to first-order gradient estimation methods, can invert the roles of ansatz generators and observables. This inversion facilitates the use of measurement optimization techniques to efficiently compute PQC gradients. Additionally, to overcome the exponential cost of evaluating higher-order partial derivatives, we propose the $k$-fold Hadamard Test, which computes the $k^{th}$-order partial derivative using a single circuit. Furthermore, we introduce Quantum Automatic Differentiation (QAD), a unified gradient method that adaptively selects the best gradient estimation technique for individual parameters within a PQC. This represents the first implementation, to our knowledge, that departs from the conventional practice of uniformly applying a single method to all parameters. Through rigorous numerical experiments, we demonstrate the effectiveness of our proposed first-order gradient methods, showing up to an $O(N)$ factor improvement in circuit execution count for real PQC applications. Our research contributes to the acceleration of VQA computations, offering practical utility in the NISQ era of quantum computing.

Efficient Quantum Gradient and Higher-order Derivative Estimation via Generalized Hadamard Test

TL;DR

This work tackles the bottleneck of gradient estimation in parameterised quantum circuits on NISQ devices. It introduces the Flexible Hadamard Test, the k-fold Hadamard Test for higher-order derivatives, and Quantum Automatic Differentiation to adapt gradient methods per parameter, achieving substantial reductions in circuit executions and improved convergence. Empirical results show up to a threefold reduction in circuit cost for QAQC and up to a 9× speedup in QNN training when using QAD, highlighting practical gains for VQA workflows. Collectively, these methods advance efficient, adaptive gradient computation, enabling more scalable quantum algorithms in the near term.

Abstract

In the context of Noisy Intermediate-Scale Quantum (NISQ) computing, parameterized quantum circuits (PQCs) represent a promising paradigm for tackling challenges in quantum sensing, optimal control, optimization, and machine learning on near-term quantum hardware. Gradient-based methods are crucial for understanding the behavior of PQCs and have demonstrated substantial advantages in the convergence rates of Variational Quantum Algorithms (VQAs) compared to gradient-free methods. However, existing gradient estimation methods, such as Finite Difference, Parameter Shift Rule, Hadamard Test, and Direct Hadamard Test, often yield suboptimal gradient circuits for certain PQCs. To address these limitations, we introduce the Flexible Hadamard Test, which, when applied to first-order gradient estimation methods, can invert the roles of ansatz generators and observables. This inversion facilitates the use of measurement optimization techniques to efficiently compute PQC gradients. Additionally, to overcome the exponential cost of evaluating higher-order partial derivatives, we propose the -fold Hadamard Test, which computes the -order partial derivative using a single circuit. Furthermore, we introduce Quantum Automatic Differentiation (QAD), a unified gradient method that adaptively selects the best gradient estimation technique for individual parameters within a PQC. This represents the first implementation, to our knowledge, that departs from the conventional practice of uniformly applying a single method to all parameters. Through rigorous numerical experiments, we demonstrate the effectiveness of our proposed first-order gradient methods, showing up to an factor improvement in circuit execution count for real PQC applications. Our research contributes to the acceleration of VQA computations, offering practical utility in the NISQ era of quantum computing.
Paper Structure (31 sections, 56 equations, 17 figures, 3 tables, 4 algorithms)

This paper contains 31 sections, 56 equations, 17 figures, 3 tables, 4 algorithms.

Figures (17)

  • Figure 1: Parameterized Quantum Circuits Workflow: The optimization process begins with an input state and initial parameters, followed by the execution of a quantum circuit to evaluate the loss function. Gradients and higher-order derivatives are then estimated using quantum computers. These estimates are utilized by a classical computer to update the parameters. This iterative process continues until convergence. During each iteration, the QAD framework selects the optimal gradient methods, balancing efficiency and reliability in gradient estimation. The bottom-right of the diagram features a plot of training performance for QAOA, QAQC, and QNN using various gradient methods, demonstrating that our proposed QAD method achieves superior performance.
  • Figure 2: Parameterized Quantum Circuit: input state denoted as $\ket{\Psi}$; quantum gates are parametrized by $\{\theta_j\}_j$; and the quantum system is measured against observable $O$
  • Figure 3: Flexible Hadamard Test
  • Figure 4: Circuit implementation of gradient methods. (a) PSR changes the parameter values of the original circuit for gradient evaluation (b) HT requires one ancillary qubit and controlled multi-qubit gates (c) DHT replaces the indirect measurements in HT but doubles the circuit execution needed (d) RHT invert the roles of generator $H_j$ and observable $O$ (e) RDHT combines DHT and RHT.
  • Figure 5: $k^{th}$-order Derivative Estimation
  • ...and 12 more figures

Theorems & Definitions (4)

  • remark 1
  • Definition 1: Expectation Value of an $m$-Term Product
  • Definition 2: $k^{\text{th}}$-order Partial Derivative
  • remark 2