Skip to content

ContinuousTimeStateEvolution

ContinuousTimeStateEvolution is the public entry point for defining continuous-time state evolution. Most users should instantiate this class directly and pass an optional diffusion= built from FullDiffusion, DiagonalDiffusion, or ScalarDiffusion.

Internally, DynamicalModel refines continuous-time dynamics to deterministic and stochastic subclasses. Those specialized classes are intended for developer-facing integrations and are documented in the developer API rather than the public tutorials.

Bases: Module

Continuous-time state evolution via stochastic differential equations (SDEs).

The state evolves according to

\[ dx_t = \bigl[ \mu(x_t, u_t, t) + s \, \nabla_x V(x_t, u_t, t) \bigr] \, dt + L(x_t, u_t, t) \, dW_t \]

where \(\mu\) is the drift, \(V\) is an optional potential, and \(L\) is the diffusion coefficient. The sign \(s\) is \(-1\) when use_negative_gradient is True (e.g., for Langevin dynamics) and \(+1\) otherwise.

Attributes:

Name Type Description
drift Drift | None

Drift vector field \(\mu(x, u, t)\). Defaults to zero if None. At least one of drift or potential must be non-None.

potential Potential | None

Scalar potential \(V(x, u, t)\) whose gradient is added to the drift. Defaults to zero if None. At least one of drift or potential must be non-None.

use_negative_gradient bool

If True, use \(-\nabla_x V\) (e.g., gradient descent on potential); otherwise use \(+\nabla_x V\). Default is False.

diffusion Diffusion | None

Diffusion coefficient object. Use FullDiffusion, DiagonalDiffusion, or ScalarDiffusion to define the stochastic part of the SDE. Pass None for deterministic dynamics.