least_squares module
Define LeastSquares, a simple and fast optimization method.
- class LeastSquares(*, compensating_elements, objective_factory, design_space, compute_beam_propagation, cavity_settings_factory, reference_simulation_output, optimisation_algorithm_kwargs=None, history_kwargs=None, **kwargs)[source]
Bases:
DownhillSimplexPlain least-squares method, efficient for small problems.
See also
- Parameters:
compensating_elements (
Collection[FieldMap])objective_factory (
ObjectiveFactory)design_space (
DesignSpace)compute_beam_propagation (
Callable[[Mapping[FieldMap,CavitySettings]],SimulationOutput])cavity_settings_factory (
CavitySettingsFactory)reference_simulation_output (
SimulationOutput)optimisation_algorithm_kwargs (
dict[str,Any] |None, default:None)
- optimize()[source]
Set up the optimization and solve the problem.
- Return type:
- Returns:
Gives list of solutions, corresponding objective, convergence violation if applicable, etc.
- _abc_impl = <_abc._abc_data object at 0x7318f903c900>