Optimization#

Optiland supports optimization through different backends. The NumPy backend relies on Optiland’s native damped least squares and on SciPy optimizers, while the Torch backend uses PyTorch’s native optimization tools. Which one to use, and how to run and cancel it, is explained in the Optimization Guide; one-call merit functions and hard constraints are in Default Merit and Constraints.

NumPy (SciPy) Optimization#

These examples show how Optiland integrates with SciPy’s optimizers to improve optical systems using classical numerical methods.

Torch Optimization#

These examples demonstrate optimization using the Torch backend, taking advantage of PyTorch’s autograd and optimizers for differentiable design.