Backends¶
base
¶
Backend interface and registry.
A backend wraps one implementation of one method. Third-party packages can
register more backends (e.g. GPL-licensed solvers kept out of the MIT core)
through the lightsmith.backends entry-point group, each entry pointing at
a :class:Backend subclass.
Backend
¶
Bases: ABC
available
classmethod
¶
Whether the backend's dependencies are installed (and why not).
supports
abstractmethod
classmethod
¶
supports(sim: Simulation) -> tuple[bool, str]
Whether this backend can solve sim (and why not).
estimate
classmethod
¶
estimate(sim: Simulation, device: Device) -> dict[str, Any]
Cheap pre-flight estimate of problem size and memory. Never solves.
unsupported_outputs
¶
unsupported_outputs(sim: Simulation, *, near_field: bool = False, far_field: bool = False, substrate: bool = False, orientation_average: bool = False) -> str
Helper for supports: name the requested features a backend lacks ('' if none).