|q⟩ Bad Qubits

advanced · Programming · Advanced VQE & Ansatz Design

Natural-Gradient Optimization

Ordinary gradient descent takes a step θθηC\boldsymbol{\theta} \to \boldsymbol{\theta} - \eta\,\nabla C. This treats parameter space as flat — it assumes that a unit step in θ1\theta_1 moves the state by the same amount as a unit step in θ2\theta_2. For quantum circuits that assumption is wrong: rotating one angle near a pole of the Bloch sphere barely changes the state, while the same angle change near the equator changes it a lot. Quantum natural gradient fixes this by measuring distances in state space, not parameter space.

The geometry of state space

The natural distance between two nearby quantum states is the Fubini–Study metric, the infinitesimal version of the fidelity. For a parameterized pure state, the relevant object is the quantum Fisher information matrix (QFIM), FijF_{ij}, whose entries are

Fij=4Re[iψjψiψψψjψ],F_{ij} = 4\,\mathrm{Re}\Bigl[\langle\partial_i\psi|\partial_j\psi\rangle - \langle\partial_i\psi|\psi\rangle\langle\psi|\partial_j\psi\rangle\Bigr],

where iψ=ψ(θ)/θi|\partial_i\psi\rangle = \partial|\psi(\boldsymbol{\theta})\rangle/\partial\theta_i. The QFIM tells you how much the state moves per unit change in each parameter, including the correlations between parameters.

The update rule

Quantum natural gradient preconditions the ordinary gradient with the inverse QFIM:

θ    θηF1C.\boldsymbol{\theta} \;\to\; \boldsymbol{\theta} - \eta\,F^{-1}\,\nabla C.

Stokes et al. showed this is the steepest-descent step under the Fubini–Study metric: it chooses the direction that decreases the cost fastest per unit change in the state, rather than per unit change in the raw angles. Directions in which the state barely moves are automatically amplified; directions in which it moves a lot are damped.

Why it helps in practice

The single-qubit intuition

Parameterize a qubit as ψ(θ,ϕ)=RZ(ϕ)RY(θ)0|\psi(\theta,\phi)\rangle = R_Z(\phi)R_Y(\theta)|0\rangle, the polar and azimuthal Bloch angles. Near the north pole (θ0\theta \approx 0) the azimuth ϕ\phi is almost meaningless — all values of ϕ\phi give nearly the same state — so the QFIM entry for ϕ\phi is small there. A raw gradient step in ϕ\phi would waste effort; the natural gradient, dividing by that small QFIM entry, takes a correspondingly larger and more effective step. The metric encodes exactly the spherical geometry you already know from the Bloch picture.

Cost and approximations

Computing the full QFIM needs O(p2)O(p^2) overlap evaluations for pp parameters, which is expensive. In practice one uses a block-diagonal or diagonal approximation: only the QFIM within each circuit layer (or each single parameter) is kept. This reduces the cost dramatically while retaining most of the benefit, and it is the form implemented in libraries such as PennyLane.

Key takeaways

Sign in on the full site to ask questions and join the discussion.