

Using your own version of python and running from an IDE or the command line may be preferable for more experienced users. This method automatically configures the workspace to find the lumopt and lumapi modules and would be the preferred method for users with little experience in python. Running from the CAD script editor has the advantage that it requires no set-up and uses a Python 3 distro that ships with the Lumerical installer, so there is no need to install a separate python. Shape and topology optimization primarily differ in how they handle the optimizable geometry which is the subject of the next page in this series. Finally, a description of the scipy optimizer and lumopt optimization classes are presented. Next important lumopt set-up classes, that should be updated to reflect your specifications are documented. Important lumopt specific considerations are highlighted however, a valid simulation set-up is imperative, so convergence testing should be considered a pre-requisite. In the project Init section, we outline the project inputs and necessary simulation objects that should be included. It may be helpful following along with these files as you read this page or you may simply reference this page when running the examples later. As a starting point, it is recommended to run the AppGallery examples and use these as templates for your own project.

In the first sub-section, we will briefly describe how to import the lumopt and lumapi modules although an experienced python user can likely skip this part. Inverse design using lumopt can be run from the CAD script editor, the command line or any python IDE.
