netket.experimental.dynamics.AbstractSolver#
- class netket.experimental.dynamics.AbstractSolver[source]#
Bases:
PytreeAbstract base class for ODE solvers. This object is an immutable pyTree. The structure used to hold any solver-specific data should be initialized by
_init_state.- Inheritance

- __init__(dt, adaptive=False, **kwargs)[source]#
- Parameters:
dt – The initial time-step size of the integrator.
adaptive – A boolean indicator whether to use an adaptive scheme.
atol – The tolerance for the absolute error on the solution if
adaptive. defaults to0.0.rtol – The tolerance for the relative error on the solution if
adaptive. defaults to1e-7.dt_limits – The extremal accepted values for the time-step size dt if
adaptive. defaults to(None, 10 * dt).
- Attributes
- is_adaptive#
Boolean indication whether the integrator can be adaptive.
- is_explicit#
Boolean indication whether the integrator is explicit.
- is_fsal#
Returns True if the first iteration is the same as last.
- stages#
Number of stages (equal to the number of evaluations of the ode function) of the scheme.
- integrator_params: IntegratorParameters#
Any additional arguments to pass to the Integrator
- Methods
- replace(**kwargs)[source]#
Replace the values of the fields of the object with the values of the keyword arguments. If the object is a dataclass, dataclasses.replace will be used. Otherwise, a new object will be created with the same type as the original object.
- step(f, dt, t, y_t, state)[source]#
Performs one fixed-size step from t to t + dt :type f:
Callable:param f: The ODE function. :type dt:float:param dt: The current time-step size. :type t:float:param t: The current time. :type y_t:Any:param y_t: The current solution. :type state:AbstractSolverState:param state: The state of the solver.- Return type:
- Returns:
The next solution y_t+1 and the corresponding updated state of the solver
- Parameters:
f (Callable)
dt (float)
t (float)
y_t (Any)
state (AbstractSolverState)
- step_with_error(f, dt, t, y_t, state)[source]#
Perform one fixed-size step from t to t + dt and additionally returns the error vector provided by the adaptive solver. :type f:
Callable:param f: The ODE function. :type dt:float:param dt: The current time-step size. :type t:float:param t: The current time. :type y_t:Any:param y_t: The current solution. :type state:AbstractSolverState:param state: The state of the solver.- Return type:
- Returns:
The next solution y_t+1, the error y_err and the corresponding updated state of the solver
- Parameters:
f (Callable)
dt (float)
t (float)
y_t (Any)
state (AbstractSolverState)