pub struct LBFGS { /* private fields */ }Expand description
L-BFGS (Limited-memory BFGS) optimizer.
A quasi-Newton method that approximates the inverse Hessian using a limited number of past gradient differences.
§Best For
- Smooth, well-conditioned objectives
- VQE with hardware-efficient ansätze
- When second-order information is beneficial
Implementations§
Source§impl LBFGS
impl LBFGS
Sourcepub fn with_memory_size(self, size: usize) -> Self
pub fn with_memory_size(self, size: usize) -> Self
Set the memory size (number of past gradients to store).
Sourcepub fn with_learning_rate(self, lr: f64) -> Self
pub fn with_learning_rate(self, lr: f64) -> Self
Set the learning rate (step size multiplier).
Sourcepub fn with_convergence(self, criteria: ConvergenceCriteria) -> Self
pub fn with_convergence(self, criteria: ConvergenceCriteria) -> Self
Set convergence criteria.
Sourcepub fn minimize<F: ObjectiveFunction>(
&self,
objective: &F,
initial_params: &[f64],
) -> Result<OptimizationResult, OptimizerError>
pub fn minimize<F: ObjectiveFunction>( &self, objective: &F, initial_params: &[f64], ) -> Result<OptimizationResult, OptimizerError>
Minimize an objective function.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LBFGS
impl RefUnwindSafe for LBFGS
impl Send for LBFGS
impl Sync for LBFGS
impl Unpin for LBFGS
impl UnwindSafe for LBFGS
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more