least_squares module

Define LeastSquares, a simple and fast optimization method.

class LeastSquares(*, compensating_elements, elts, objectives, variables, compute_beam_propagation, compute_residuals, cavity_settings_factory, reference_simulation_output, constraints=None, compute_constraints=None, optimisation_algorithm_kwargs=None, history_kwargs=None, **kwargs)[source]

Bases: DownhillSimplex

Plain least-squares method, efficient for small problems.

Parameters:
supports_constraints: bool = False
optimize()[source]

Set up the optimization and solve the problem.

Returns:

info – Gives list of solutions, corresponding objective, convergence violation if applicable, etc.

Return type:

OptiSol

property _default_kwargs: dict

Create the kwargs for the optimisation.

_abc_impl = <_abc._abc_data object at 0x70e2501d0180>