Technology

class photonforge.Technology(name, version, layers, extrusion_specs, ports, background_medium, connections=())

Technology specifications.

Parameters:
  • name (str) – Technology name.

  • version (str) – Technology version string.

  • layers (dict[str, LayerSpec]) – Layer specifications indexed by name.

  • extrusion_specs (Iterable[ExtrusionSpec]) – Extrusion specifications.

  • ports (dict[str, PortSpec]) – Port specifications indexed by name.

  • background_medium (MediumType | dict[Literal['optical', 'electrical'], MediumType]) – Tidy3D medium used for simulation background. Different media can be used for optical and electrical frequencies by using a dictionary (see note below).

  • connections (Iterable[tuple[tuple[int, int], tuple[int, int]]]) – Layer pairs that are electrically connected.

Example

>>> layers = {
...     "Si": pf.LayerSpec((1, 0), "Silicon layer", "blue"),
...     "Metal": pf.LayerSpec((2, 0), "Routing metal", "red"),
...     "Via": pf.LayerSpec((2, 1), "Metal via", "orange"),
... }
>>> extrusion_specs = [
...     pf.ExtrusionSpec(
...         pf.MaskSpec((1, 0)),
...         td.Medium(permittivity=3.48**2),
...         (0, 0.250),
...     )
... ]
>>> port_specs = {
...     "STE": pf.PortSpec(
...         "Single mode strip",
...         1.5,
...         (-0.5, 0.75),
...         target_neff=3.48,
...         path_profiles=[(0.45, 0, (1, 0))],
...     )
... }
>>> connections = {((2, 0), (2, 1))}
>>> technology = pf.Technology(
...     "Demo technology",
...     "1.0",
...     layers,
...     extrusion_specs,
...     port_specs,
...     td.Medium(permittivity=1.45**2),
...     connections=connections,
... )

Note

The medium used for simulations in optical and electrical frequency ranges (see frequency_classification()) can be set individually with:

>>> media = {
...     "optical": td.Medium(permittivity=1.45**2),
...     "electrical": td.Medium(permittivity=4.2),
... }
>>> technology = pf.Technology(
...     "Demo technology",
...     "1.0",
...     layers,
...     extrusion_specs,
...     port_specs,
...     background_medium=media,
...     connections=connections,
... )

Methods

add_connection(layer1, layer2)

Add an electrical connection between layers to this technology.

add_layer(layer_name, layer_spec)

Add a layer specification to this technology.

add_port(port_name, port_spec)

Add a port specification to this technology.

copy([deep])

Create a copy of this technology.

get_background_medium(classification)

Return electrical or optical background medium for this technology.

insert_extrusion_spec(index, extrusion_spec)

Insert an extrusion specification to this technology.

pop_extrusion_spec([index])

Remove an extrusion specification from this technology.

remove_connection(layer1, layer2)

Remove an electrical connection between layers in this technology.

remove_layer(layer_name)

Remove a layer specification from this technology.

remove_port(port_name)

Remove a port specification from this technology.

update(*args, **kwargs)

Update this technology if it was created as a parametric technology.

Attributes

background_medium

Background medium.

connections

list[tuple[tuple[int, int], tuple[int, int]]]Electrically connected layer pairs.

extrusion_specs

Extrusion specifications for this technology.

layers

Layer definitions for this technology.

name

Technology name.

parametric_function

Function used to update a parametric component.

parametric_kwargs

Keyword arguments used to update a parametric component.

ports

Port specifications for this technology.

properties

Object properties.

random_variables

Random variables associated to this technology's parameters.

version

Technology version.

add_connection(layer1, layer2)

Add an electrical connection between layers to this technology.

Parameters:
  • layer1 (str | tuple[int, int]) – First connected layer.

  • layer2 (str | tuple[int, int]) – Second connected layer.

Returns:

This object.

Return type:

Technology

add_layer(layer_name, layer_spec)

Add a layer specification to this technology.

Parameters:
  • layer_name (str) – Name of the layer specification. If one with the same name already exists, it will be replaced.

  • layer_spec (LayerSpec) – Specification to be added.

Returns:

This object.

Return type:

Technology

add_port(port_name, port_spec)

Add a port specification to this technology.

Parameters:
  • port_name (str) – Name of the port specification. If one with the same name already exists, it will be replaced.

  • port_spec (PortSpec) – Specification to be added.

Returns:

This object.

Return type:

Technology

background_medium

Background medium.

Type:

MediumType | dict[Literal[‘optical’, ‘electrical’], MediumType]

connections

list[tuple[tuple[int, int], tuple[int, int]]]Electrically connected layer pairs.

copy(deep=False)

Create a copy of this technology.

Parameters:

deep (bool) – If set, creates copies of all extrusion specifiactions. Otherwise, only a shallow copy of this technology is created.

Returns:

New copy.

Return type:

Technology

extrusion_specs

Extrusion specifications for this technology.

Type:

list[ExtrusionSpec]

get_background_medium(classification)

Return electrical or optical background medium for this technology.

Parameters:

classification (Literal["electrical", "optical"]) – Classification of the desired medium.

Returns:

Background medium.

Return type:

MediumType

insert_extrusion_spec(index, extrusion_spec)

Insert an extrusion specification to this technology.

Parameters:
  • index (int) – Index before which the extrusion specification will be inserted.

  • extrusion_spec (ExtrusionSpec) – Specification to be added.

Returns:

This object.

Return type:

Technology

layers

Layer definitions for this technology.

Type:

dict[str, LayerSpec]

name

Technology name.

Type:

str

parametric_function

Function used to update a parametric component.

Type:

str

parametric_kwargs

Keyword arguments used to update a parametric component.

Type:

dict[str, Any]

pop_extrusion_spec(index=-1)

Remove an extrusion specification from this technology.

Parameters:

index (int) – Index of the item to be removed.

Returns:

Removed extrusion specification.

Return type:

ExtrusionSpec

ports

Port specifications for this technology.

Type:

dict[str, PortSpec]

properties

Object properties.

Type:

Properties

random_variables

Random variables associated to this technology’s parameters.

Type:

list[RandomVariable]

remove_connection(layer1, layer2)

Remove an electrical connection between layers in this technology.

Parameters:
  • layer1 (str | tuple[int, int]) – First connected layer.

  • layer2 (str | tuple[int, int]) – Second connected layer.

Returns:

This object.

Return type:

Technology

remove_layer(layer_name)

Remove a layer specification from this technology.

Parameters:

layer_name (str) – Name of the layer to be removed.

Returns:

This object.

Return type:

Technology

remove_port(port_name)

Remove a port specification from this technology.

Parameters:

port_name (str) – Name of the port to be removed.

Returns:

This object.

Return type:

Technology

update(*args, **kwargs)

Update this technology if it was created as a parametric technology.

All contents of the technology are updated with the contents from the updated version. Any contents or modifications introduced after the technology creation (outside of the original parametric function) are not propagated.

Parameters:
  • *args – Positional arguments to the parametric technology function.

  • **kwargs – Keyword arguments to the parametric technology function.

Returns:

This technology.

Return type:

Technology

Note

The original keyword arguments used to generate the technology are stored and updated with the passed kwargs. This updated version is used in the function call and will be stored for future updates. Positional arguments are not stored.

version

Technology version.

Type:

str