Gradient

This section provides an overview of the Quantum Natural Gradient in the LogosQ Library.

Quantum Natural Gradient (QNG)

Standard Gradient Descent

The standard gradient descent update rule:

θt+1=θtηθL(θt)\theta_{t+1} = \theta_t - \eta \nabla_\theta \mathcal{L}(\theta_t)

where:

  • L(θ)\mathcal{L}(\theta) is the cost function
  • θ\theta are the parameters
  • η\eta is the learning rate (step size)
  • θ\nabla_\theta denotes the gradient with respect to θ\theta

Natural Gradient Descent (Classical)

The natural gradient descent modification:

θt+1=θtηF1θL(θt)\theta_{t+1} = \theta_t - \eta F^{-1} \nabla_\theta \mathcal{L}(\theta_t)

where:

  • FF is the Fisher information matrix
  • F1F^{-1} is the inverse of the Fisher information matrix

Quantum Natural Gradient

The quantum analog using the Fubini-Study metric tensor:

θt+1=θtηg+θL(θt)\theta_{t+1} = \theta_t - \eta g^{+} \nabla_\theta \mathcal{L}(\theta_t)

where:

  • gijg_{ij} is the Fubini-Study metric tensor
  • g+g^{+} is the pseudo-inverse of the metric tensor

Variational Quantum Circuit Structure

A variational quantum circuit is represented as:

ψ(θ)=WLVL(θL)WL1V1(θ1)W0ψ0|\psi(\theta)\rangle = W_L V_L(\theta_L) W_{L-1} \cdots V_1(\theta_1) W_0 |\psi_0\rangle

where:

  • ψ0|\psi_0\rangle is the initial state
  • WW_\ell are layers of non-parametrized quantum gates
  • V(θ)V_\ell(\theta_\ell) are layers of parametrized quantum gates
  • θ={θ0(),,θn()}\theta_\ell = \{\theta^{(\ell)}_0, \dots, \theta^{(\ell)}_n\} are parameters for layer \ell

Parametrized Gate Form

Parametrized gates are written as:

X(θi())=eiθi()Ki()X(\theta^{(\ell)}_{i}) = e^{i\theta^{(\ell)}_{i} K^{(\ell)}_i}

where:

  • Ki()K^{(\ell)}_i is the generator of the parametrized operation

Block-Diagonal Fubini-Study Metric Tensor

For each parametric layer \ell, the n×nn_\ell \times n_\ell block-diagonal submatrix is:

gij()=14Re[ψ1KiKjψ1ψ1Kiψ1ψ1Kjψ1]g_{ij}^{(\ell)} = \frac{1}{4}\text{Re}\left[\langle \psi_{\ell-1} | K_i K_j | \psi_{\ell-1}\rangle - \langle \psi_{\ell-1} | K_i | \psi_{\ell-1}\rangle \langle \psi_{\ell-1} | K_j | \psi_{\ell-1}\rangle\right]

where:

  • ψ1=W1V1(θ1)V1(θ1)W0ψ0|\psi_{\ell-1}\rangle = W_{\ell-1} V_{\ell-1}(\theta_{\ell-1}) \cdots V_1(\theta_1) W_0 |\psi_0\rangle
  • KiKi()K_i \equiv K_i^{(\ell)} (for brevity)

Diagonal Terms of Metric Tensor

The diagonal elements are given by variance:

gii()=14Var(Ki)=14(Ki2Ki2)g_{ii}^{(\ell)} = \frac{1}{4}\text{Var}(K_i) = \frac{1}{4}\left(\langle K_i^2 \rangle - \langle K_i \rangle^2\right)

Off-Diagonal Terms of Metric Tensor

The off-diagonal elements are given by covariance:

gij()=14Cov(Ki,Kj)=14(KiKjKiKj)g_{ij}^{(\ell)} = \frac{1}{4}\text{Cov}(K_i, K_j) = \frac{1}{4}\left(\langle K_i K_j \rangle - \langle K_i \rangle \langle K_j \rangle\right)

where iji \neq j.

Complete Block-Diagonal Metric Tensor

The full block-diagonal approximation combines all layer submatrices:

g=(g(0)000g(1)000g(L))g = \begin{pmatrix} g^{(0)} & 0 & \cdots & 0 \\ 0 & g^{(1)} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & g^{(L)} \end{pmatrix}

Computational Complexity

For a variational circuit with:

  • dd parameters
  • LL parametrized layers

Total quantum evaluations per optimization step:

  • Standard gradient descent: 2d2d evaluations
  • Quantum natural gradient: 2d+L2d + L evaluations

Key Properties

  1. Fubini-Study reduces to Fisher information: In the classical limit, the Fubini-Study metric tensor reduces to the Fisher information matrix

  2. Imaginary-time evolution: In the limit η0\eta \rightarrow 0, QNG dynamics are equivalent to imaginary-time evolution within the variational subspace

  3. Symmetry: The block-diagonal matrices are real and symmetric: gij()=gji()g_{ij}^{(\ell)} = g_{ji}^{(\ell)}

  4. Parametrization invariance: The natural gradient is invariant with respect to parametrization, providing optimal step sizes automatically