Skip to main content

natural_gradient

Function natural_gradient 

Source
pub fn natural_gradient(
    gradients: &[f64],
    fisher: &Array2<f64>,
    regularization: f64,
) -> QuantRS2Result<Vec<f64>>
Expand description

Natural gradient for quantum optimization.

Solves the regularized linear system (F + λI) · g_nat = g for the natural gradient g_nat, where F is the quantum Fisher information matrix, λ the Tikhonov regularization, and g the Euclidean gradient. The system is solved by inverting the (symmetric positive-definite after regularization) matrix via scirs2_linalg.