Skip to content

Preconditioner schedules

Created by: attila-i-szabo

This PR implements the functionality discussed in #1077.

  • PreconditionerT = Callable[[VariationalState, PyTree, Number], PyTree], where the Number is a kwarg for step_value
  • LHSConstructorT = Callable[[VariationalState, Number], LinearOperator] ditto
  • drivers pass step_value into the preconditioner, which is a breaking change for user-defined preconditioners, albeit one that is trivial to fix by adding a step_value kwarg doing nothing
  • SR is changed to handle diag_shift schedules the lhs_constructor field of SR is changed to handle step_value through a simple lambda-expression (and internally convert a constant diag_shift into a schedule as well)

Pending issues:

  • changing the t-VMC code to work with the new preconditioners (@femtobit I'll need some help around that interface)
  • tests (what tests do we need?)

Merge request reports