Preconditioner schedules
Created by: attila-i-szabo
This PR implements the functionality discussed in #1077.
-
PreconditionerT = Callable[[VariationalState, PyTree, Number], PyTree]
, where theNumber
is a kwarg forstep_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 astep_value
kwarg doing nothing -
theSR
is changed to handlediag_shift
scheduleslhs_constructor
field ofSR
is changed to handlestep_value
through a simple lambda-expression (and internally convert a constantdiag_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?)