Skip to content
Specular Differentiation

specular.backends

Select the calculation backend for the current execution context. NumPy is the default; Numba and JAX are optional. All entries below are also available directly from specular.

Name Description
get_backend Return the currently selected backend name.
available_backends Probe which supported backends can be imported.
set_backend Select a backend for subsequent calculations.
use_backend Temporarily select a backend in a scope or decorated function.
BackendName Type alias for the three supported backend names.

See the backend user guide for installation, backend selection, callback requirements, and numerical behavior.