Analytic gradients in variational quantum algorithms: Algebraic extensions of the parameter-shift rule to general unitary transformations
Artur F. Izmaylov, Robert A. Lang, Tzu-Ching Yen
Abstract
Optimization of unitary transformations in variational quantum algorithms benefits highly from efficient evaluation of cost function gradients with respect to amplitudes of unitary generators. We propose several extensions of the parameter-shift rule to formulating these gradients as linear combinations of expectation values for generators with general eigenspectra (i.e., with more than two eigenvalues). Our approaches are exact and do not use any auxiliary qubits; instead they rely on a generator eigenspectrum analysis. Two main directions in the parameter-shift-rule extensions are (1) polynomial expansion of the exponential unitary operator based on a limited number of different eigenvalues in the generator and (2) decomposition of the generator as a linear combination of low-eigenvalue operators (e.g., operators with only two or three eigenvalues). These techniques have a range of scalings for the number of needed expectation values with the number of generator eigenvalues from quadratic (for polynomial expansion) to linear and even ${log}_{2}$ (for generator decompositions). This allowed us to propose efficient differentiation schemes for commonly used two-qubit transformations (e.g., match gates, transmon gates, and fSim gates) and ${\stackrel{\ifmmode \hat{}\else \^{}\fi{}}{S}}^{2}$-conserving fermionic operators for the variational quantum eigensolver.