netket.experimental.dynamics.RK12#
- netket.experimental.dynamics.RK12(dt, **kwargs)[source]#
The second order Heunβs method. Uses embedded Euler method for adaptivity. Also known as Heun-Euler method.
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, whenadaptive == 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)
.