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)
where:
- L(θ) is the cost function
- θ are the parameters
- η is the learning rate (step size)
- ∇θ denotes the gradient with respect to θ
Natural Gradient Descent (Classical)
The natural gradient descent modification:
θt+1=θt−ηF−1∇θL(θt)
where:
- F is the Fisher information matrix
- F−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)
where:
- gij is the Fubini-Study metric tensor
- g+ is the pseudo-inverse of the metric tensor
Variational Quantum Circuit Structure
A variational quantum circuit is represented as:
∣ψ(θ)⟩=WLVL(θL)WL−1⋯V1(θ1)W0∣ψ0⟩
where:
- ∣ψ0⟩ is the initial state
- Wℓ are layers of non-parametrized quantum gates
- Vℓ(θℓ) are layers of parametrized quantum gates
- θℓ={θ0(ℓ),…,θn(ℓ)} are parameters for layer ℓ
Parametrized gates are written as:
X(θi(ℓ))=eiθi(ℓ)Ki(ℓ)
where:
- Ki(ℓ) is the generator of the parametrized operation
Block-Diagonal Fubini-Study Metric Tensor
For each parametric layer ℓ, the nℓ×nℓ block-diagonal submatrix is:
gij(ℓ)=41Re[⟨ψℓ−1∣KiKj∣ψℓ−1⟩−⟨ψℓ−1∣Ki∣ψℓ−1⟩⟨ψℓ−1∣Kj∣ψℓ−1⟩]
where:
-
∣ψℓ−1⟩=Wℓ−1Vℓ−1(θℓ−1)⋯V1(θ1)W0∣ψ0⟩
- Ki≡Ki(ℓ) (for brevity)
Diagonal Terms of Metric Tensor
The diagonal elements are given by variance:
gii(ℓ)=41Var(Ki)=41(⟨Ki2⟩−⟨Ki⟩2)
Off-Diagonal Terms of Metric Tensor
The off-diagonal elements are given by covariance:
gij(ℓ)=41Cov(Ki,Kj)=41(⟨KiKj⟩−⟨Ki⟩⟨Kj⟩)
where i=j.
Complete Block-Diagonal Metric Tensor
The full block-diagonal approximation combines all layer submatrices:
g=g(0)0⋮00g(1)⋮0⋯⋯⋱⋯00⋮g(L)
Computational Complexity
For a variational circuit with:
- d parameters
- L parametrized layers
Total quantum evaluations per optimization step:
- Standard gradient descent: 2d evaluations
- Quantum natural gradient: 2d+L evaluations
Key Properties
-
Fubini-Study reduces to Fisher information: In the classical limit, the Fubini-Study metric tensor reduces to the Fisher information matrix
-
Imaginary-time evolution: In the limit η→0, QNG dynamics are equivalent to imaginary-time evolution within the variational subspace
-
Symmetry: The block-diagonal matrices are real and symmetric: gij(ℓ)=gji(ℓ)
-
Parametrization invariance: The natural gradient is invariant with respect to parametrization, providing optimal step sizes automatically