The nextnano optimizers Python package#

Version: 0.13.0

Introduction#

The nextnano optimizers Python package interfaces external libraries of various automated optimization algorithms with the nextnano simulation tools: nextnano++, nextnano³, and nextnano.NEGF. The package performs a proper execution of simulations of a predefined setup. Optimization is based on standard nextnano outputs.

_images/nextnano_optimizers_scheme.png

Figure 1 Package structure.#

The design of the device and the optimization problem are defined in a standard nextnano input file and in the Python script of the nextnano optimizers, respectively. Definition of the optimization problem includes:

  • a set of the device parameters for the given design \([x_1, x_2, ..., x_N]\), i.e. input file variables such as thicknesses of layers, temperature, alloy contents, simulation hyperparameters etc., and their boundaries;

  • the metric function \(f(x_1, x_2, ..., x_N)\), which is a figure of merit for the optimization procedure, e.g. quantum efficiency, properties of the quantum spectrum, transition probabilities, etc.;

  • hyperparameters, which are specific for each optimization algorithm.

The optimizer can vary each variable within its boundaries aiming either to find an extremum of the metric function or to reach a specific value of the metric, \(f_T\). In the latter case, the task is to minimize the quantity \(|f - f_T|\). The definition of \(f\) is very general and flexible. In particular:

  1. the nextnano optimizers package can handle multi-objective optimization problems, where the metric function is a vector;

  2. the metric function can be a function of the simulation results (i.e. a post-processing function) or a combination of simulation results and input parameters.

The principal advantage of all optimization algorithms included in nextnano optimizers is that the optimization problem can be solved orders of magnitude faster than a brute-force scanning over the domain of the device variables.

Currently, nextnano optimizers contains the following families of optimization algorithms:

The choice of the appropriate family of algorithms depends on the goal.

Local optimization algorithms can often converge to a nearby local optimum within relatively few iterations, especially when the objective function behaves regularly in the region around the starting point. For functions with multiple local optima, however, the result may depend strongly on the initial guess and may not be the global optimum. These algorithms are therefore often very efficient when applicable, but less suitable for general global optimization problems, where other optimization approaches may be more appropriate.

BO can identify promising solutions using relatively few evaluations, making it particularly suitable for time-consuming simulations. Its performance, however, depends on how well the surrogate model captures the behavior of the objective function; if the objective is poorly represented by the surrogate, Bayesian optimization can become less effective.

EA generally require more function evaluations than local or Bayesian optimization methods, but are more flexible and can handle a wider range of optimization problems. They are particularly attractive for problems with many optimization parameters, complex search spaces, and multiple objectives.

RL is most heavy technique implmented in nextnano optimizers. It should be used to solve really heavy problems. In particular, RL is capable not only to optimize a device of a given design but also to find a suitable design. The main disadvantage of RL is a long time which is needed for a preparatory part of optimization, the so-called training. It is adviseable to train the algorithm on several CPUs of a high-performance cluster. Note, that the currently implemented RL is a \(\beta\)-version which, nevertheless, allows users to perform a simple test even on a workstation and get acquainted with basics of RL. More features, improvements, and options will be added in subsequent releases of nextnano optimizers.

Getting Started#

Everything you need to know to set up your first optmization.

Reference#

Brief introduction to optimization algorithms and their key parameters, and the exposed nextnano optimizers API.

Examples & Tutorials#

Examples and tutorials demonstrating functionality of nextnano optimizers.

Release notes#