tidy3d.plugins.invdes.InverseDesign#

class InverseDesign[source]#

Bases: AbstractInverseDesign

Container for an inverse design problem.

Parameters:
  • attrs (dict = {}) – Dictionary storing arbitrary metadata for a Tidy3D object. This dictionary can be freely used by the user for storing data without affecting the operation of Tidy3D as it is not used internally. Note that, unlike regular Tidy3D fields, attrs are mutable. For example, the following is allowed for setting an attr obj.attrs['foo'] = bar. Also note that Tidy3D` will raise a TypeError if attrs contain objects that can not be serialized. One can check if attrs are serializable by calling obj.json().

  • design_region (TopologyDesignRegion) – Region within which we will optimize the simulation.

  • task_name (str) – Task name to use in the objective function when running the JaxSimulation.

  • verbose (bool = False) – If True, will print the regular output from web functions.

  • simulation (Simulation) – Simulation without the design regions or monitors used in the objective fn.

  • output_monitor_names (Optional[Tuple[str, ...]] = None) – Optional names of monitors whose data the differentiable output depends on.If this field is left None, the plugin will try to add all compatible monitors to JaxSimulation.output_monitors. While this will work, there may be warnings if the monitors are not compatible with the adjoint plugin, for example if there are FieldMonitor instances with .colocate != False.

  • post_process_fn (Callable[[tidy3d.plugins.adjoint.components.data.sim_data.JaxSimulationData], float]) – Function of JaxSimulationData that returns a float contribution to the objective function

Attributes

objective_fn

construct the objective function for this InverseDesign object.

attrs

Methods

is_output_monitor(monitor)

Whether a monitor is added to the JaxSimulation as an output_monitor.

separate_output_monitors(monitors)

Separate monitors into output_monitors and regular monitors.

to_jax_simulation(params)

Convert the InverseDesign to a corresponding tda.JaxSimulation given make_.

to_simulation(params)

Convert the InverseDesign to a corresponding td.Simulation given params.

to_simulation_data(params,Β task_name,Β **kwargs)

Convert the InverseDesign to a td.Simulation and run it.

Inherited Common Usage

simulation#
output_monitor_names#
post_process_fn#
is_output_monitor(monitor)[source]#

Whether a monitor is added to the JaxSimulation as an output_monitor.

separate_output_monitors(monitors)[source]#

Separate monitors into output_monitors and regular monitors.

to_jax_simulation(params)[source]#

Convert the InverseDesign to a corresponding tda.JaxSimulation given make_.

to_simulation(params)[source]#

Convert the InverseDesign to a corresponding td.Simulation given params.

to_simulation_data(params, task_name, **kwargs)[source]#

Convert the InverseDesign to a td.Simulation and run it.

property objective_fn#

construct the objective function for this InverseDesign object.

__hash__()#

Hash method.