Skip to main content

ground_state_energy_gradient

Function ground_state_energy_gradient 

Source
pub fn ground_state_energy_gradient(
    operator: &QuantumOperator,
    parameters: &ParameterValues,
    options: EigshOptions,
    workspace: &mut EigshWorkspace,
) -> Result<GroundStateEnergyGradient>
Expand description

Differentiate the isolated algebraic ground-state energy.

The forward solve requests at least two eigenpairs so the returned diagnostics can expose the spectral gap. Reverse work then requires one component action per parameter, instead of the two additional eigensolves per parameter required by central finite differences.

All parameters and every component must be real and Hermitian. Degenerate or numerically unresolved ground states are reported as GradientStatus::NonDifferentiable rather than silently assigning a derivative to an arbitrary eigenvector.