Skip to content

Potential

Bases: Protocol

Scalar potential energy for gradient-based drift.

A potential \(V(x, u, t)\) maps state, control, and time to a scalar. Its gradient contributes to the drift via \(\pm \nabla_x V(x, u, t)\), enabling Langevin-type dynamics. It is used in ContinuousTimeStateEvolution when potential is set; the sign is controlled by use_negative_gradient.

Parameters:

Name Type Description Default
x State

Current state \(x \in \mathbb{R}^{d_x}\).

required
u Control | None

Current control input \(u \in \mathbb{R}^{d_u}\) or None.

required
t Time

Current time.

required

Returns:

Type Description

jax.Array: Scalar potential value \(V(x, u, t) \in \mathbb{R}\).

Note

This is a protocol interface; implement this callable signature; do not instantiate. We recommend simply using a plain Python function that matches this signature, e.g.:

def potential(x, u, t):
    return x[0]**2 + x[1]**2 + x[2]**2
or lambda x, u, t: x[0]**2 + x[1]**2 + x[2]**2