netket.experimental.dynamics.RK45

Contents

netket.experimental.dynamics.RK45#

netket.experimental.dynamics.RK45(dt, **kwargs)[source]#

Dormand-Prince’s 5/4 Runge-Kutta method. (free 4th order interpolant).

This solver is adaptive, meaning that the time-step is changed at every iteration in order to keep the error below a certain threshold.

In particular, given the variables at step \(t\), \(\theta^{t}\) and the error at the same time-step, \(\epsilon^t\), we compute a rescaled error by using the absolute (atol) and relative (reltol) tolerances according to this formula.

\[\epsilon^\text{scaled} = \text{Norm}(\frac{\epsilon^{t}}{\epsilon_{atol} + \max(\theta^t, \theta^{t-1})\epsilon_{reltol}}),\]

where \(\text{Norm}\) is a function that normalises the vector, usually a vector norm but could be something else as well, and \(\max\) is an elementwise maximum function (with lexicographical ordering for complex numbers).

Then, the integrator will attempt to keep epsilon^text{scaled}<1.

Parameters:
  • dt – Timestep (floating-point number). When adaptive==False this value is never changed, when adaptive == True this is the initial timestep.

  • adaptive – Whether to use adaptive timestepping (Defaults to False). Not all integrators support adaptive timestepping.

  • atol – Maximum absolute error at every time-step during adaptive timestepping. A larger value will lead to larger timestep. This option is ignored if adaptive=False. A value of 0 means it is ignored. Note that the norm used to compute the error can be changed in the netket.experimental.TDVP driver. (Defaults to 0).

  • rtol – Maximum relative error at every time-step during adaptive timestepping. A larger value will lead to larger timestep. This option is ignored if adaptive=False. Note that the norm used to compute the error can be changed in the netket.experimental.TDVP driver. (Defaults to 1e-7)

  • dt_limits – A length-2 tuple of minimum and maximum timesteps considered by adaptive time-stepping. A value of None signals that there is no bound. Defaults to (None, 10*dt).