Generic PDK#
Parametric Cells for the Generic PDK.
Consider them a foundation from which you can draw inspiration. Feel free to modify their cross-sections and layers to tailor a unique PDK suited for any foundry of your choice.
By doing so, you’ll possess a versatile, retargetable PDK, empowering you to design your circuits with speed and flexibility.
C#
- gdsfactory.components.C(width: float = 1.0, size: tuple[float, float] = (10.0, 20.0), layer: LayerSpec = 'WG', port_type: str = 'electrical') Component [source]#
C geometry with ports on both ends.
based on phidl.
- Parameters:
width – of the line.
size – length and height of the base.
layer – layer spec.
port_type – optical or electrical.
______ | o1 | ___ | | | |___ ||<---> size[0] |______ o2
import gdsfactory as gf
c = gf.components.C(width=1.0, size=[10.0, 20.0], layer='WG', port_type='electrical')
c.plot()
(Source code
, png
, hires.png
, pdf
)
L#
- gdsfactory.components.L(width: int | float = 1, size: tuple[int, int] = (10, 20), layer: LayerSpec = 'MTOP', port_type: str = 'electrical') Component [source]#
Generates an ‘L’ geometry with ports on both ends.
Based on phidl.
- Parameters:
width – of the line.
size – length and height of the base.
layer – spec.
port_type – for port.
import gdsfactory as gf
c = gf.components.L(width=1, size=[10, 20], layer='MTOP', port_type='electrical')
c.plot()
(Source code
, png
, hires.png
, pdf
)
add_fiber_array_optical_south_electrical_north#
- gdsfactory.components.add_fiber_array_optical_south_electrical_north(component: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | ~gdsfactory.component.Component | dict[str, ~typing.Any] = functools.partial(<function mzi>, straight_x_top='straight_heater_metal', length_x=200), pad: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | ~gdsfactory.component.Component | dict[str, ~typing.Any] = functools.partial(<function pad>, size=(80, 80)), with_loopback: bool = True, pad_spacing: float = 100.0, fiber_spacing: float = 127.0, pad_gc_spacing: float = 250.0, electrical_port_names: list[str] | None = None, electrical_port_orientation: float | None = 90, npads: int | None = None, pad_assigments: tuple[tuple[str, str], ...] | None = None, grating_coupler: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | ~gdsfactory.component.Component | dict[str, ~typing.Any] = <function grating_coupler_elliptical>, xs_metal: ~collections.abc.Callable[[...], ~gdsfactory.cross_section.CrossSection] | ~gdsfactory.cross_section.CrossSection | dict[str, ~typing.Any] | str | ~gdsfactory.cross_section.Transition = 'xs_metal_routing', **kwargs) Component [source]#
Returns a fiber array with Optical gratings on South and Electrical pads on North.
This a test configuration for DC pads.
- Parameters:
component – component spec to add fiber and pads.
pad – pad spec.
with_loopback – whether to add a loopback port.
pad_spacing – spacing between pads.
fiber_spacing – spacing between grating couplers.
pad_gc_spacing – spacing between pads and grating couplers.
electrical_port_names – list of electrical port names. Defaults to all.
electrical_port_orientation – orientation of electrical ports. Defaults to 90.
npads – number of pads. Defaults to one per electrical_port_names.
pad_assigments – if not None, routes according to (component_port_name, pad_port_name).
grating_coupler – grating coupler function.
xs_metal – metal cross section.
- Keyword Arguments:
gc_port_name – grating coupler input port name.
gc_port_labels – grating coupler list of labels.
io_rotation – fiber coupler rotation in degrees. Defaults to None.
component_name – optional for the label.
select_ports – function to select ports.
cross_section – cross_section function.
get_input_labels_function – function to get input labels. None skips labels.
layer_label – optional layer for grating coupler label.
bend – bend spec.
straight – straight spec.
taper – taper spec.
get_input_label_text_loopback_function – function to get input label test.
get_input_label_text_function – for labels.
fanout_length – if None, automatic calculation of fanout length.
max_y0_optical – in um.
with_loopback – True, adds loopback structures.
straight_separation – from edge to edge.
list_port_labels – None, adds TM labels to port indices in this list.
connected_port_list_ids – names of ports only for type 0 optical routing.
nb_optical_ports_lines – number of grating coupler lines.
force_manhattan – False
excluded_ports – list of port names to exclude when adding gratings.
grating_indices – list of grating coupler indices.
routing_straight – function to route.
routing_method – get_route.
optical_routing_type – None: auto, 0: no extension, 1: standard, 2: check.
gc_rotation – fiber coupler rotation in degrees. Defaults to -90.
input_port_indexes – to connect.
import gdsfactory as gf
c = gf.components.add_fiber_array_optical_south_electrical_north(with_loopback=True, pad_spacing=100.0, fiber_spacing=127.0, pad_gc_spacing=250.0, electrical_port_orientation=90, xs_metal='xs_metal_routing')
c.plot()
(Source code
, png
, hires.png
, pdf
)
add_fiducials#
- gdsfactory.components.add_fiducials(component: ComponentSpec = <function pad_array>, gap: float = 50, left: ComponentSpec | None = 'cross', right: ComponentSpec | None = 'cross', top: ComponentSpec | None = None, bottom: ComponentSpec | None = None, offset: Float2 = (0, 0), **kwargs) Component [source]#
Return component with fiducials.
- Parameters:
component – component to add to the new component.
gap – from component to fiducial edge.
left – optional left fiducial.
right – optional right fiducial.
top – optional top fiducial.
bottom – optional bottom fiducial.
offset – component offset coordinate (x, y).
kwargs – fiducial settings.
import gdsfactory as gf
c = gf.components.add_fiducials(gap=50, left='cross', right='cross', offset=[0, 0])
c.plot()
(Source code
, png
, hires.png
, pdf
)
add_fiducials_offsets#
- gdsfactory.components.add_fiducials_offsets(component: ComponentSpec = <function pad_array>, fiducial: ComponentSpec = 'cross', offsets: tuple[tuple[float, float], ...] | list[tuple[float, float]] = ((0, 100), (0, -100))) Component [source]#
Returns new component with fiducials from a list of offsets.
- Parameters:
component – add reference to component to the new Component.
fiducial – function to return fiducial.
offsets – list of offsets.
import gdsfactory as gf
c = gf.components.add_fiducials_offsets(fiducial='cross', offsets=[[0, 100], [0, -100]])
c.plot()
(Source code
, png
, hires.png
, pdf
)
add_frame#
- gdsfactory.components.add_frame(component: ComponentSpec = <function rectangle>, width: float = 10.0, spacing: float = 10.0, layer: LayerSpec = 'WG', layers: LayerSpecs | None = None) Component [source]#
Returns component with a frame around it.
- Parameters:
component – Component to frame.
width – of the frame.
spacing – of component to frame.
layer – frame layer.
layers – Optional. List of layers for geometry.
import gdsfactory as gf
c = gf.components.add_frame(width=10.0, spacing=10.0, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
add_grating_couplers#
- gdsfactory.components.add_grating_couplers(component: ComponentSpec = <function straight>, grating_coupler: ComponentSpec = functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), gc_port_name: str = 'o1', select_ports: ~collections.abc.Callable[[...], dict[str, ~gdsfactory.port.Port]] = functools.partial(<function select_ports>, port_type='optical')) Component [source]#
Returns new component with grating couplers and labels.
- Parameters:
component – to add grating_couplers.
grating_coupler – grating_coupler spec.
gc_port_name – where to add label.
select_ports – for selecting optical_ports.
import gdsfactory as gf
c = gf.components.add_grating_couplers(gc_port_name='o1')
c.plot()
(Source code
, png
, hires.png
, pdf
)
add_grating_couplers_fiber_array#
- gdsfactory.components.add_grating_couplers_fiber_array(component: ComponentSpec = {'component': 'spiral_inner_io', 'settings': {'length': 20000.0}}, grating_coupler: ComponentSpec = functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), excluded_ports: list[str] | None = None, grating_separation: float = 127.0, gc_port_name: str = 'o1', gc_rotation: int = -90, straight_separation: float = 5.0, bend: ComponentSpec = <function bend_euler>, *, with_loopback: bool = False, cross_section: CrossSectionSpec = 'xs_sc', select_ports: Callable = functools.partial(<function select_ports>, port_type='optical'), loopback_yspacing: float = 4.0) Component #
Returns a component with grating_couplers and optional reference loopback.
- Parameters:
component – to add grating_couplers.
grating_coupler – grating_coupler.
excluded_ports – list of ports to exclude.
grating_separation – in um.
gc_port_name – optional grating coupler name.
gc_rotation – grating coupler rotation in degrees.
straight_separation – in um.
bend – bend spec.
with_loopback – If True, add compact loopback alignment ports.
cross_section – CrossSectionSpec.
select_ports – function to select ports.
loopback_yspacing – in um.
import gdsfactory as gf
c = gf.components.add_grating_couplers_fiber_array(grating_separation=127.0, gc_port_name='o1', gc_rotation=-90, straight_separation=5.0, with_loopback=False, cross_section='xs_sc', loopback_yspacing=4.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
add_grating_couplers_with_loopback_fiber_array#
- gdsfactory.components.add_grating_couplers_with_loopback_fiber_array(component: ComponentSpec = {'component': 'spiral_inner_io', 'settings': {'length': 20000.0}}, grating_coupler: ComponentSpec = functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), excluded_ports: list[str] | None = None, grating_separation: float = 127.0, gc_port_name: str = 'o1', gc_rotation: int = -90, straight_separation: float = 5.0, bend: ComponentSpec = <function bend_euler>, with_loopback: bool = True, cross_section: CrossSectionSpec = 'xs_sc', select_ports: ~collections.abc.Callable = functools.partial(<function select_ports>, port_type='optical'), loopback_yspacing: float = 4.0) Component [source]#
Returns a component with grating_couplers and optional reference loopback.
- Parameters:
component – to add grating_couplers.
grating_coupler – grating_coupler.
excluded_ports – list of ports to exclude.
grating_separation – in um.
gc_port_name – optional grating coupler name.
gc_rotation – grating coupler rotation in degrees.
straight_separation – in um.
bend – bend spec.
with_loopback – If True, add compact loopback alignment ports.
cross_section – CrossSectionSpec.
select_ports – function to select ports.
loopback_yspacing – in um.
import gdsfactory as gf
c = gf.components.add_grating_couplers_with_loopback_fiber_array(grating_separation=127.0, gc_port_name='o1', gc_rotation=-90, straight_separation=5.0, with_loopback=True, cross_section='xs_sc', loopback_yspacing=4.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
add_grating_couplers_with_loopback_fiber_single#
- gdsfactory.components.add_grating_couplers_with_loopback_fiber_single(component: ComponentSpec = 'spiral_inner_io_fiber_single', grating_coupler: ComponentSpec = functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), gc_port_name: str = 'o1', select_ports: ~collections.abc.Callable[[...], dict[str, ~gdsfactory.port.Port]] = functools.partial(<function select_ports>, port_type='optical'), with_loopback: bool = True, cross_section: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5), loopback_xspacing: float = 5.0, rotation: int = 90) Component [source]#
Returns new component with all ports terminated with grating couplers.
- Parameters:
component – to add grating_couplers.
grating_coupler – grating_coupler spec function, string or dict.
gc_port_name – grating_coupler port name.
select_ports – function to select ports.
with_loopback – adds a reference loopback.
cross_section – for routing.
loopback_xspacing – in um.
rotation – in degrees, 90 for North South devices, 0 for East-West.
import gdsfactory as gf
c = gf.components.add_grating_couplers_with_loopback_fiber_single(component='spiral_inner_io_fiber_single', gc_port_name='o1', with_loopback=True, loopback_xspacing=5.0, rotation=90)
c.plot()
(Source code
, png
, hires.png
, pdf
)
add_trenches#
- gdsfactory.components.add_trenches(component: ComponentSpec = <function coupler>, cross_section: CrossSectionSpec = 'xs_rc_with_trenches', top: bool = True, bot: bool = True, right: bool = False, left: bool = False, layer_trench: LayerSpec = (3, 6), width_trench: float = 3, **kwargs) Component [source]#
Return component with trenches.
- Parameters:
component – component to add to the trenches.
cross_section – spec (CrossSection, string or dict).
top – add top trenches.
bot – add bot trenches.
right – add right trenches.
left – add left trenches.
layer_trench – layer for the trenches.
width_trench – width of the trenches.
kwargs – component settings.
import gdsfactory as gf
c = gf.components.add_trenches(cross_section='xs_rc_with_trenches', top=True, bot=True, right=False, left=False, layer_trench=[3, 6], width_trench=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
add_trenches90#
- gdsfactory.components.add_trenches90(*, component: ComponentSpec = <function bend_euler>, cross_section: CrossSectionSpec = 'xs_rc_with_trenches', top: bool = False, bot: bool = True, right: bool = True, left: bool = False, layer_trench: LayerSpec = (3, 6), width_trench: float = 3, **kwargs) Component #
Return component with trenches.
- Parameters:
component – component to add to the trenches.
cross_section – spec (CrossSection, string or dict).
top – add top trenches.
bot – add bot trenches.
right – add right trenches.
left – add left trenches.
layer_trench – layer for the trenches.
width_trench – width of the trenches.
kwargs – component settings.
import gdsfactory as gf
c = gf.components.add_trenches90(cross_section='xs_rc_with_trenches', top=False, bot=True, right=True, left=False, layer_trench=[3, 6], width_trench=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
align_wafer#
- gdsfactory.components.align_wafer(width: float = 10.0, spacing: float = 10.0, cross_length: float = 80.0, layer: LayerSpec = 'WG', layers: LayerSpecs | None = None, layer_cladding: tuple[int, int] | None = None, square_corner: str = 'bottom_left') Component [source]#
Returns cross inside a frame to align wafer.
- Parameters:
width – in um.
spacing – in um.
cross_length – for the cross.
layer – for the cross.
layers – Optional. List of layers for cross.
layer_cladding – optional.
square_corner – bottom_left, bottom_right, top_right, top_left.
import gdsfactory as gf
c = gf.components.align_wafer(width=10.0, spacing=10.0, cross_length=80.0, layer='WG', square_corner='bottom_left')
c.plot()
(Source code
, png
, hires.png
, pdf
)
array#
- gdsfactory.components.array(component: ComponentSpec = 'pad', spacing: tuple[float, float] = (150.0, 150.0), columns: int = 6, rows: int = 1, add_ports: bool = True, size: tuple[float, float] | None = None, centered: bool = False) Component [source]#
Returns an array of components.
- Parameters:
component – to replicate.
spacing – x, y spacing.
columns – in x.
rows – in y.
add_ports – add ports from component into the array.
size – Optional x, y size. Overrides columns and rows.
centered – center the array around the origin.
- Raises:
ValueError – If columns > 1 and spacing[0] = 0.
ValueError – If rows > 1 and spacing[1] = 0.
2 rows x 4 columns ___ ___ ___ ___ | | | | | | | | |___| |___| |___| |___| ___ ___ ___ ___ | | | | | | | | |___| |___| |___| |___|
import gdsfactory as gf
c = gf.components.array(component='pad', spacing=[150.0, 150.0], columns=6, rows=1, add_ports=True, centered=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
array_with_fanout#
- gdsfactory.components.array_with_fanout(component: ComponentSpec = 'pad', columns: int = 3, pitch: float = 150.0, waveguide_pitch: float = 10.0, start_straight_length: float = 5.0, end_straight_length: float = 40.0, component_port_name: str = 'e4', bend: ComponentSpec = 'bend_euler', bend_port_name1: str | None = None, bend_port_name2: str | None = None, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Returns component array in X axis with west facing waveguides.
- Parameters:
component – to replicate.
columns – number of components.
pitch – for waveguides.
waveguide_pitch – for output waveguides.
start_straight_length – length of the start of the straight.
end_straight_length – length of the straight at the end.
component_port_name – for fanout.
bend – spec.
bend_port_name1 – optional port name.
bend_port_name2 – optional port name.
cross_section – cross_section spec.
import gdsfactory as gf
c = gf.components.array_with_fanout(component='pad', columns=3, pitch=150.0, waveguide_pitch=10.0, start_straight_length=5.0, end_straight_length=40.0, component_port_name='e4', bend='bend_euler', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
array_with_fanout_2d#
- gdsfactory.components.array_with_fanout_2d(pitch: float = 150.0, pitch_x: float | None = None, pitch_y: float | None = None, columns: int = 3, rows: int = 2, **kwargs) Component [source]#
Returns 2D array with fanout waveguides facing west.
- Parameters:
pitch – 2D pitch.
pitch_x – defaults to pitch.
pitch_y – defaults to pitch.
columns – number of columns.
rows – number of rows.
- Keyword Arguments:
component – to replicate.
pitch – in um.
waveguide_pitch – for fanout in um.
start_straight_length – length of the start of the straight in um.
end_straight_length – length of the straight at the end in um.
radius – bend radius in um.
cross_section – cross_section factory.
component_port_name
bend_port_name1
bend_port_name2
import gdsfactory as gf
c = gf.components.array_with_fanout_2d(pitch=150.0, columns=3, rows=2)
c.plot()
(Source code
, png
, hires.png
, pdf
)
array_with_via#
- gdsfactory.components.array_with_via(component: ComponentSpec = <function pad>, columns: int = 3, spacing: float = 150.0, via_spacing: float = 10.0, straight_length: float = 60.0, cross_section: CrossSectionSpec | None = functools.partial(<function cross_section>, layer='M2', width=10.0, port_names=('e1', 'e2'), port_types=('electrical', 'electrical'), radius=None), via_stack: ComponentSpec = <function via_stack>, via_stack_dy: float = 0, port_orientation: float = 180, port_offset: Float2 | None = None, **kwargs) Component [source]#
Returns an array of vias in X axis with fanout waveguides facing west.
- Parameters:
component – to replicate in the array.
columns – number of components.
spacing – for the array in um.
via_spacing – for fanout in um.
straight_length – length of the straight at the end in um.
waveguide – waveguide definition.
cross_section – spec.
via_stack – spec.
via_stack_dy – via_stack offset in um.
port_orientation – 180: facing west.
port_offset – Optional port movement in um.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.array_with_via(columns=3, spacing=150.0, via_spacing=10.0, straight_length=60.0, via_stack_dy=0, port_orientation=180)
c.plot()
(Source code
, png
, hires.png
, pdf
)
array_with_via_2d#
- gdsfactory.components.array_with_via_2d(spacing: tuple[float, float] = (150.0, 150.0), columns: int = 3, rows: int = 2, **kwargs) Component [source]#
Returns 2D array with fanout waveguides facing west.
- Parameters:
spacing – 2D spacing x,y in um.
columns – number of columns.
rows – number of rows.
- Keyword Arguments:
component – to replicate
columns – number of components
spacing – float
via_spacing – for fanout
straight_length – length of the straight at the end
via_stack_port_name
import gdsfactory as gf
c = gf.components.array_with_via_2d(spacing=[150.0, 150.0], columns=3, rows=2)
c.plot()
(Source code
, png
, hires.png
, pdf
)
awg#
- gdsfactory.components.awg(arms: int = 10, outputs: int = 3, free_propagation_region_input_function=functools.partial(<function free_propagation_region>, inputs=1), free_propagation_region_output_function=functools.partial(<function free_propagation_region>, inputs=10, width1=10, width2=20.0), fpr_spacing: float = 50.0) Component [source]#
Returns a basic Arrayed Waveguide grating.
- Parameters:
arms – number of arms.
outputs – number of outputs.
free_propagation_region_input_function – for input.
free_propagation_region_output_function – for output.
fpr_spacing – x separation between input/output free propagation region.
import gdsfactory as gf
c = gf.components.awg(arms=10, outputs=3, fpr_spacing=50.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
bbox#
- gdsfactory.components.bbox(bbox=((-1.0, -1.0), (3.0, 4.0)), layer: tuple[int, int] = (1, 0), top: float = 0, bottom: float = 0, left: float = 0, right: float = 0) Component [source]#
Returns bounding box rectangle from coordinates.
- Parameters:
bbox – Coordinates of the box [(x1, y1), (x2, y2)].
layer – for bbox.
top – north offset.
bottom – south offset.
left – west offset.
right – east offset.
import gdsfactory as gf
c = gf.components.bbox(bbox=[[-1.0, -1.0], [3.0, 4.0]], layer=[1, 0], top=0, bottom=0, left=0, right=0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
bend_circular#
- gdsfactory.components.bend_circular(radius: float | None = None, angle: float = 90.0, npoints: int | None = None, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns a radial arc.
- Parameters:
radius – in um. Defaults to cross_section_radius.
angle – angle of arc (degrees).
npoints – number of points.
layer – layer to use. Defaults to cross_section.layer.
width – width to use. Defaults to cross_section.width.
cross_section – spec (CrossSection, string or dict).
kwargs – additional cross_section arguments.
o2 | / / / o1_____/
import gdsfactory as gf
c = gf.components.bend_circular(angle=90.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
bend_circular_heater#
- gdsfactory.components.bend_circular_heater(radius: float | None = None, angle: float = 90, npoints: int | None = None, heater_to_wg_distance: float = 1.2, heater_width: float = 0.5, layer_heater: LayerSpec = 'HEATER', cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Creates an arc of arclength theta starting at angle start_angle.
- Parameters:
radius – in um. Defaults to cross_section.radius.
angle – angle of arc (degrees).
npoints – Number of points used per 360 degrees.
heater_to_wg_distance – in um.
heater_width – in um.
layer_heater – for heater.
cross_section – specification (CrossSection, string, CrossSectionFactory dict).
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.bend_circular_heater(angle=90, heater_to_wg_distance=1.2, heater_width=0.5, layer_heater='HEATER', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
bend_euler#
- gdsfactory.components.bend_euler(radius: float | None = None, angle: float = 90.0, p: float = 0.5, with_arc_floorplan: bool = True, npoints: int | None = None, direction: str = 'ccw', cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Euler bend with changing bend radius.
By default, radius corresponds to the minimum radius of curvature of the bend. However, if with_arc_floorplan is True, radius corresponds to the effective radius of curvature (making the curve a drop-in replacement for an arc). If p < 1.0, will create a “partial euler” curve as described in Vogelbacher et. al. https://dx.doi.org/10.1364/oe.27.031394
default p = 0.5 based on this paper https://www.osapublishing.org/oe/fulltext.cfm?uri=oe-25-8-9150&id=362937
- Parameters:
radius – in um. Defaults to cross_section_radius.
angle – total angle of the curve.
p – Proportion of the curve that is an Euler curve.
with_arc_floorplan – If False: radius is the minimum radius of curvature If True: The curve scales such that the endpoints match a bend_circular with parameters radius and angle.
npoints – Number of points used per 360 degrees.
direction – cw (clock-wise) or ccw (counter clock-wise).
cross_section – specification (CrossSection, string, CrossSectionFactory dict).
kwargs – additional cross_section arguments.
o2 | / / / o1_____/
import gdsfactory as gf
c = gf.components.bend_euler(angle=90.0, p=0.5, with_arc_floorplan=True, direction='ccw', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
bend_euler_s#
- gdsfactory.components.bend_euler_s(**kwargs) Component [source]#
Sbend made of 2 euler bends.
- Keyword Arguments:
angle – total angle of the curve.
p – Proportion of the curve that is an Euler curve.
with_arc_floorplan – If False: radius is the minimum radius of curvature If True: The curve scales such that the endpoints match a bend_circular with parameters radius and angle.
npoints – Number of points used per 360 degrees.
direction – cw (clock-wise) or ccw (counter clock-wise).
cross_section – specification (CrossSection, string, CrossSectionFactory dict).
kwargs – cross_section settings.
_____ o2 / / / / | / / / o1_____/
import gdsfactory as gf
c = gf.components.bend_euler_s()
c.plot()
(Source code
, png
, hires.png
, pdf
)
bend_euler_trenches#
- gdsfactory.components.bend_euler_trenches(*, component: ComponentSpec = <function bend_euler>, cross_section: CrossSectionSpec = 'xs_rc_with_trenches', top: bool = False, bot: bool = True, right: bool = True, left: bool = False, layer_trench: LayerSpec = (3, 6), width_trench: float = 3, **kwargs) Component #
Return component with trenches.
- Parameters:
component – component to add to the trenches.
cross_section – spec (CrossSection, string or dict).
top – add top trenches.
bot – add bot trenches.
right – add right trenches.
left – add left trenches.
layer_trench – layer for the trenches.
width_trench – width of the trenches.
kwargs – component settings.
import gdsfactory as gf
c = gf.components.bend_euler_trenches(cross_section='xs_rc_with_trenches', top=False, bot=True, right=True, left=False, layer_trench=[3, 6], width_trench=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
bend_s#
- gdsfactory.components.bend_s(size: tuple[float, float] = (11.0, 1.8), npoints: int = 99, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Return S bend with bezier curve.
stores min_bend_radius property in self.info[‘min_bend_radius’] min_bend_radius depends on height and length
- Parameters:
size – in x and y direction.
npoints – number of points.
cross_section – spec.
add_pins – add pins to the component.
- Keyword Arguments:
with_manhattan_facing_angles – bool.
start_angle – optional start angle in deg.
end_angle – optional end angle in deg.
import gdsfactory as gf
c = gf.components.bend_s(size=[11.0, 1.8], npoints=99, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
bend_straight_bend#
- gdsfactory.components.bend_straight_bend(straight_length: float = 10.0, angle: float = 90, p: float = 0.5, with_arc_floorplan: bool = True, npoints: int = 720, direction: str = 'ccw', cross_section: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5), radius: float | None = None, **kwargs) Component [source]#
Sbend made of 2 euler bends and straight section in between.
- Parameters:
straight_length – in um.
angle – total angle of the curve.
p – Proportion of the curve that is an Euler curve.
with_arc_floorplan – If False: radius is the minimum radius of curvature If True: The curve scales such that the endpoints match a bend_circular with parameters radius and angle.
npoints – Number of points used per 360 degrees.
direction – cw (clock-wise) or ccw (counter clock-wise).
cross_section – specification (CrossSection, string, CrossSectionFactory dict).
radius – in um. Defaults to cross_section_radius.
kwargs – additional cross_section arguments.
import gdsfactory as gf
c = gf.components.bend_straight_bend(straight_length=10.0, angle=90, p=0.5, with_arc_floorplan=True, npoints=720, direction='ccw')
c.plot()
(Source code
, png
, hires.png
, pdf
)
bezier#
- gdsfactory.components.bezier(control_points: tuple[tuple[float, float], ...] | list[tuple[float, float]] = ((0.0, 0.0), (5.0, 0.0), (5.0, 1.8), (10.0, 1.8)), npoints: int = 201, with_manhattan_facing_angles: bool = True, start_angle: int | None = None, end_angle: int | None = None, cross_section: CrossSectionSpec = 'xs_sc', bend_radius_error_type: ErrorType | None = None) Component [source]#
Returns Bezier bend.
- Parameters:
control_points – list of points.
npoints – number of points varying between 0 and 1.
with_manhattan_facing_angles – bool.
start_angle – optional start angle in deg.
end_angle – optional end angle in deg.
cross_section – spec.
import gdsfactory as gf
c = gf.components.bezier(control_points=[[0.0, 0.0], [5.0, 0.0], [5.0, 1.8], [10.0, 1.8]], npoints=201, with_manhattan_facing_angles=True, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
cavity#
- gdsfactory.components.cavity(component: ComponentSpec = <function dbr>, coupler: ComponentSpec = 'coupler', length: float = 0.1, gap: float = 0.2, **kwargs) Component [source]#
Returns cavity from a coupler and a mirror.
connects the W0 port of the mirror to E1 and W1 coupler ports creating a resonant cavity
- Parameters:
component – mirror.
coupler – coupler library.
length – coupler length.
gap – coupler gap.
kwargs – coupler_settings.
ml (mirror left) mr (mirror right) | | |o1 - o2__ __o3 - o1| | \ / | \ / ---=========--- o1 o1 length o4 o2
import gdsfactory as gf
c = gf.components.cavity(coupler='coupler', length=0.1, gap=0.2)
c.plot()
(Source code
, png
, hires.png
, pdf
)
cdc#
- gdsfactory.components.cdc(length: float = 30.0, gap: float = 0.5, period: float = 0.22, dc: float = 0.5, dx: float = 10.0, dy: float = 1.8, width_top: float = 2.0, width_bot: float = 0.75, fins: bool = False, fin_size: tuple[float, float] = (0.2, 0.05), cross_section: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5), **kwargs) Component [source]#
Grating-Assisted Contra-Directional Coupler.
- Parameters:
length – Length of the coupling region.
gap – Distance between the two straights.
period – Period of the grating.
dc – Duty cycle of the grating. Must be between 0 and 1.
width_top – Width of the top straight in the coupling region.
width_bot – Width of the bottom straight in the coupling region.
dx – size of bends in x-direction.
dy – size of bends in y-direction.
fins – If True, adds fins to the input/output straights. In this case a different template for the component must be specified. This feature is useful when performing electron-beam lithography and using different beam currents for fine features (helps to reduce stitching errors).
fin_size – Specifies the x- and y-size of the fins. Defaults to 200 nm x 50 nm.
cross_section – CrossSection spec.
- kwargs:
cross_section kwargs.
import gdsfactory as gf
c = gf.components.cdc(length=30.0, gap=0.5, period=0.22, dc=0.5, dx=10.0, dy=1.8, width_top=2.0, width_bot=0.75, fins=False, fin_size=[0.2, 0.05])
c.plot()
(Source code
, png
, hires.png
, pdf
)
cdsem_all#
- gdsfactory.components.cdsem_all(widths: tuple[float, ...] = (0.4, 0.45, 0.5, 0.6, 0.8, 1.0), dense_lines_width: float | None = 0.3, dense_lines_width_difference: float = 0.02, dense_lines_gap: float = 0.3, dense_lines_labels: tuple[str, ...] = ('DL', 'DM', 'DH'), straight: ComponentSpec = 'straight', bend90: ComponentSpec | None = 'bend_circular', cross_section: CrossSectionSpec = 'xs_sc', text: ComponentFactory = functools.partial(<function text_rectangular>, size=1)) Component [source]#
Column with all optical PCMs.
- Parameters:
widths – for straight lines.
dense_lines_width – in um.
dense_lines_width_difference – in um.
dense_lines_gap – in um.
dense_lines_labels – strings.
straight – spec.
bend90 – spec.
cross_section – spec.
text – spec.
import gdsfactory as gf
c = gf.components.cdsem_all(widths=[0.4, 0.45, 0.5, 0.6, 0.8, 1.0], dense_lines_width=0.3, dense_lines_width_difference=0.02, dense_lines_gap=0.3, dense_lines_labels=['DL', 'DM', 'DH'], straight='straight', bend90='bend_circular', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
cdsem_bend180#
- gdsfactory.components.cdsem_bend180(width: float = 0.5, radius: float = 10.0, wg_length: float = 420.0, straight: ComponentSpec = 'straight', bend90: ComponentSpec = 'bend_circular', cross_section: CrossSectionSpec = 'xs_sc', text: ComponentFactory = functools.partial(<function text_rectangular>, size=1)) Component [source]#
Returns CDSEM structures.
- Parameters:
width – of the line.
radius – um.
wg_length – in um.
straight – spec.
bend90 – spec.
cross_section – spec.
text – spec.
import gdsfactory as gf
c = gf.components.cdsem_bend180(width=0.5, radius=10.0, wg_length=420.0, straight='straight', bend90='bend_circular', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
cdsem_coupler#
- gdsfactory.components.cdsem_coupler(length: float = 420.0, gaps: tuple[float, ...] = (0.15, 0.2, 0.25), cross_section: CrossSectionSpec = 'xs_sc', text: ComponentFactory | None = functools.partial(<function text_rectangular>, size=1), spacing: float | None = 7.0, positions: tuple[float, ...] | None = None, **kwargs) Component [source]#
Returns 2 coupled waveguides gap sweep.
- Parameters:
length – for the line.
gaps – list of gaps for the sweep.
cross_section – for the lines.
text – optional text for labels.
spacing – Optional center to center spacing.
positions – Optional positions for the text labels.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.cdsem_coupler(length=420.0, gaps=[0.15, 0.2, 0.25], cross_section='xs_sc', spacing=7.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
cdsem_straight#
- gdsfactory.components.cdsem_straight(widths: tuple[float, ...] = (0.4, 0.45, 0.5, 0.6, 0.8, 1.0), length: float = 420.0, cross_section: CrossSectionSpec = 'xs_sc', text: ComponentFactory | None = functools.partial(<function text_rectangular>, size=1), spacing: float | None = 7.0, positions: tuple[float, ...] | None = None, **kwargs) Component [source]#
Returns straight waveguide lines width sweep.
- Parameters:
widths – for the sweep.
length – for the line.
cross_section – for the lines.
text – optional text for labels.
spacing – Optional center to center spacing.
positions – Optional positions for the text labels.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.cdsem_straight(widths=[0.4, 0.45, 0.5, 0.6, 0.8, 1.0], length=420.0, cross_section='xs_sc', spacing=7.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
cdsem_straight_density#
- gdsfactory.components.cdsem_straight_density(widths: Floats = (0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3), gaps: Floats = (0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3), length: float = 420.0, label: str = '', cross_section: CrossSectionSpec | CrossSectionSpecs = 'xs_sc', text: ComponentFactory | None = functools.partial(<function text_rectangular>, size=1)) Component [source]#
Returns sweep of dense straight lines.
- Parameters:
widths – list of widths.
gaps – list of gaps.
length – of the lines.
label – defaults to widths[0] gaps[0].
cross_section – spec. Can be a list and then each line has a corresponding cross_section.
text – optional function for text.
import gdsfactory as gf
c = gf.components.cdsem_straight_density(widths=[0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3], gaps=[0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3], length=420.0, label='', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
circle#
- gdsfactory.components.circle(radius: float = 10.0, angle_resolution: float = 2.5, layer: LayerSpec = 'WG') Component [source]#
Generate a circle geometry.
- Parameters:
radius – of the circle.
angle_resolution – number of degrees per point.
layer – layer.
import gdsfactory as gf
c = gf.components.circle(radius=10.0, angle_resolution=2.5, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coh_rx_dual_pol#
- gdsfactory.components.coh_rx_dual_pol(bend: ComponentSpec = <function bend_euler>, cross_section: CrossSectionSpec = 'xs_sc', lo_splitter: ComponentSpec = 'mmi1x2', signal_splitter: ComponentSpec | None = None, spol_coh_rx: ComponentSpec = <function coh_rx_single_pol>, single_pol_rx_spacing: float = 50.0, splitter_coh_rx_spacing: float = 40.0, lo_input_coupler: ComponentSpec | None = None, signal_input_coupler: ComponentSpec | None = None) Component [source]#
Dual polarization coherent receiver.
- Parameters:
bend – 90 degrees bend library.
cross_section – for routing (splitter to mzms and mzms to combiners).
lo_splitter – splitter function for the LO input.
signal_splitter – splitter function for the signal input.
spol_coh_rx – function generating a coherent rx for a single polarization.
single_pol_rx_spacing – vertical spacing between each single polarization coherent receiver.
splitter_coh_rx_spacing – horizontal spacing between the signal splitter and the single pol coh rxs.
lo_input_coupler – Optional coupler to add before the LO splitter.
signal_input_coupler – Optional coupler to add before the signal splitter.
import gdsfactory as gf
c = gf.components.coh_rx_dual_pol(cross_section='xs_sc', lo_splitter='mmi1x2', single_pol_rx_spacing=50.0, splitter_coh_rx_spacing=40.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
coh_rx_single_pol#
- gdsfactory.components.coh_rx_single_pol(bend: ComponentSpec = 'bend_euler', cross_section: CrossSectionSpec = 'xs_sc', hybrid_90deg: ComponentSpec = <function mmi_90degree_hybrid>, detector: ComponentSpec = <function ge_detector_straight_si_contacts>, det_spacing: tuple[float, float] = (60.0, 50.0), with_pads: bool = True, pad_det_spacing: float = 80.0, in_wg_length: float = 20.0, lo_input_coupler: ComponentSpec | None = None, signal_input_coupler: ComponentSpec | None = None) Component [source]#
Single polarization coherent receiver.
- Parameters:
bend – 90 degrees bend library.
cross_section – for routing.
hybrid_90deg – generates the 90 degree hybrid.
detector – generates the detector.
det_spacing – spacing between 90 degree hybrid and detector and vertical spacing between detectors.
with_pads – if True, it draws pads for the balanced detectors.
pad_det_spacing – spacing between the pads and the detectors (if with_pads=True).
in_wg_length – length of the straight waveguides at the input of the 90 deg hybrid.
lo_input_coupler – Optional coupler for the LO.
signal_input_coupler – Optional coupler for the signal.
_________ (lo_in_coupler)---| |--- detI1 \\ __ i signal | 90 deg |--- detI2 // (signal_in_coupler)---| hybrid |--- detQ1 \\ __ q signal |__________|--- detQ2 //
import gdsfactory as gf
c = gf.components.coh_rx_single_pol(bend='bend_euler', cross_section='xs_sc', det_spacing=[60.0, 50.0], with_pads=True, pad_det_spacing=80.0, in_wg_length=20.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
coh_tx_dual_pol#
- gdsfactory.components.coh_tx_dual_pol(splitter: ComponentSpec = 'mmi1x2', combiner: ComponentSpec | None = None, spol_coh_tx: ComponentSpec = 'coh_tx_single_pol', yspacing: float = 10.0, xspacing: float = 40.0, input_coupler: ComponentSpec | None = None, output_coupler: ComponentSpec | None = None, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Dual polarization coherent transmitter.
- Parameters:
splitter – splitter function.
combiner – combiner function.
spol_coh_tx – function generating a coherent tx for a single polarization.
yspacing – vertical spacing between each single polarization coherent tx.
xspacing – horizontal spacing between splitter and combiner.
input_coupler – Optional coupler to add before the splitter.
output_coupler – Optional coupler to add after the combiner.
cross_section – for routing (splitter to mzms and mzms to combiners).
kwargs –
cross_section settings.
___ single_pol_tx__ | | | | | | (in_coupler)---splitter==| |==combiner---(out_coupler) | | | | |___ single_pol_tx_|
import gdsfactory as gf
c = gf.components.coh_tx_dual_pol(splitter='mmi1x2', spol_coh_tx='coh_tx_single_pol', yspacing=10.0, xspacing=40.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coh_tx_single_pol#
- gdsfactory.components.coh_tx_single_pol(balanced_phase_shifters: bool = False, mzm_y_spacing: float = 50.0, phase_shifter: ComponentSpec = 'straight_pin', phase_shifter_length: float = 100.0, mzm_ps_spacing: float = 40.0, splitter: ComponentSpec = 'mmi1x2', combiner: ComponentSpec | None = None, mzm: ComponentSpec = {'component': 'mzi', 'settings': {'cross_section_x_top': 'xs_pin', 'delta_length': 10.0, 'straight_x_top': 'straight_pin'}}, mzm_length: float = 200.0, with_pads: bool = False, xspacing: float = 40.0, input_coupler: ComponentSpec | None = None, output_coupler: ComponentSpec | None = None, pad_array: ComponentSpec = 'pad_array', cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
MZM-based single polarization coherent transmitter.
- Parameters:
balanced_phase_shifters – True adds phase sifters after the MZM at both the I and Q arms. False, only adds Q arm has a phase shifter.
mzm_y_spacing – vertical spacing between the bottom of the I MZM and the top of the Q MZM.
phase_shifter – phase_shifter spec.
phase_shifter_length – length of the phase shifter.
mzm_ps_spacing – spacing between the end of the mzm and the phase shifter.
splitter – splitter spec.
combiner – combiner spec.
mzm – Mach-Zehnder modulator spec.
mzm_length – length of the MZMs.
xspacing – horizontal spacing between the splitter and combiner and the mzm.
input_coupler – Optional coupler to add before the splitter.
output_coupler – Optional coupler to add after the combiner.
pad_array – array of pads spec.
cross_section – for routing (splitter to mzms and mzms to combiners).
kwargs – cross_section settings.
___ mzm_i __ ps_i__ | | | | | | (in_coupler)---splitter==| |==combiner---(out_coupler) | | | | |___ mzm_q __ ps_q_|
import gdsfactory as gf
c = gf.components.coh_tx_single_pol(balanced_phase_shifters=False, mzm_y_spacing=50.0, phase_shifter='straight_pin', phase_shifter_length=100.0, mzm_ps_spacing=40.0, splitter='mmi1x2', mzm_length=200.0, with_pads=False, xspacing=40.0, pad_array='pad_array', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
compass#
- gdsfactory.components.compass(size=(4.0, 2.0), layer: LayerSpec = 'WG', port_type: str | None = 'electrical', port_inclusion: float = 0.0, port_orientations: tuple[int, ...] | None = (180, 90, 0, -90)) Component [source]#
Rectangle with ports on each edge (north, south, east, and west).
- Parameters:
size – rectangle size.
layer – tuple (int, int).
port_type – optical, electrical. None does not add ports.
port_inclusion – from edge.
port_orientations – list of port_orientations to add. None add one port only.
import gdsfactory as gf
c = gf.components.compass(size=[4.0, 2.0], layer='WG', port_type='electrical', port_inclusion=0.0, port_orientations=[180, 90, 0, -90])
c.plot()
(Source code
, png
, hires.png
, pdf
)
compensation_path#
- gdsfactory.components.compensation_path(crossing45: ComponentSpec = functools.partial(<function crossing45>, cross_section='xs_sc'), crossing: ComponentSpec = <function crossing>, direction: str = 'top', cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Returns Component Path with same path length as the crossing.
with input and output ports having same y coordinates
- Parameters:
crossing45 – component that we want to match in path length. needs to have .info[“components”] with bends and crossing.
direction – the direction in which the bend should go “top” / “bottom”.
---- ---- \ / \ / \ / X / \ / \ / \ ---- ----
Compensation path:
--+-- _/ \_ --/ \--
import gdsfactory as gf
c = gf.components.compensation_path(direction='top', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
component_lattice#
- gdsfactory.components.component_lattice(lattice: str = '\n C-X\n CXX\n CXX\n C-X\n ', symbol_to_component: dict[str, Component] | None = None, grid_per_unit: int = 1000) Component [source]#
Return a lattice Component of N inputs and outputs Columns must have.
components with the same x spacing between input/output ports Lines must have components with the same y spacing between input/output ports.
- Parameters:
lattice – ASCII map with character.
symbol_to_component – dict of ASCII character to component.
grid_per_unit – int.
Lattice example:
X-X XCX XCX X-X
import gdsfactory as gf from gdsfactory.components.crossing_waveguide import crossing45 from gdsfactory.components.crossing_waveguide import compensation_path symbol_to_component = { "C": gf.routing.fanout2x2(component=gf.components.coupler(), port_spacing=40.0), "X": crossing45(port_spacing=40.0), "-": compensation_path(crossing45=crossing45(port_spacing=40.0)), } c = gf.components.component_lattice(symbol_to_component=symbol_to_component) c.plot()
(
Source code
,png
,hires.png
,pdf
)
component_lattice_generic#
- gdsfactory.components.component_lattice_generic(network: list[list] | None = None) Component [source]#
The shape of the network matrix determines the physical interconnection. Note that there should be at least S+1=N modes based on this formalism of interconnection, and the position of the component implements a connectivity in between the modes, and assumes a 2x2 network encoding. One nice functionality by this component is that it can generate a component lattice for generic variable components with different x and y pitches. Initially this will maximise the surface area required but different placement algorithms can compact the size.
- Parameters:
network – A list of lists of components that are to be placed in the lattice.
- Returns:
A component lattice that implements the physical network.
- Return type:
The placement matrix is in this form: .. math:
M = X & 0 & X 0 & P & 0 X & 0 & X
- Include-source:
import gdsfactory as gf from gdsfactory.components.mzi import mzi2x2_2x2
- example_component_lattice = [
[mzi2x2_2x2(), 0, mzi2x2_2x2()], [0, mzi2x2_2x2(delta_length=30.0), 0], [mzi2x2_2x2(), 0, mzi2x2_2x2()],
] c = gf.components.component_lattice_generic(example_component_lattice)
Another example that demonstrates the generic-nature of this component lattice algorithm can be with an mixed set of actively driven and passiver interferometers. The placement matrix is in this form:
\[M = Y & 0 & A 0 & B & 0 C & 0 & Y\]- Include-source:
import gdsfactory as gf from gdsfactory.components import mzi2x2_2x2_phase_shifter, mzi2x2_2x2
- example_mixed_component_lattice = [
[mzi2x2_2x2_phase_shifter(), 0, mzi2x2_2x2(delta_length=20.0)], [0, mzi2x2_2x2(delta_length=30.0), 0], [mzi2x2_2x2(delta_length=15.0), 0, mzi2x2_2x2_phase_shifter()],
] c = gf.components.component_lattice_generic(
network=example_mixed_component_lattice
)
# TODO implement balanced waveguide paths function per stage # TODO automatic electrical fanout? # TODO multiple placement optimization algorithms.
import gdsfactory as gf
c = gf.components.component_lattice_generic()
c.plot()
(Source code
, png
, hires.png
, pdf
)
component_sequence#
- gdsfactory.components.component_sequence(sequence: str, symbol_to_component: dict[str, tuple[ComponentSpec, str, str]], ports_map: dict[str, tuple[str, str]] | None = None, port_name1: str = 'o1', port_name2: str = 'o2', start_orientation: float = 0.0) Component [source]#
Returns component from ASCII sequence.
if you prefix a symbol with ! it mirrors the component
- Parameters:
sequence – a string or a list of symbols.
symbol_to_component – maps symbols to (component, input, output).
ports_map – (optional) extra port mapping using the convention. {port_name: (alias_name, port_name)}
port_name1 – input port_name.
port_name2 – output port_name.
start_orientation – in degrees.
- Returns:
- containing the sequence of sub-components
instantiated and connected together in the sequence order.
- Return type:
component
import gdsfactory as gf bend180 = gf.components.bend_circular180() wg_pin = gf.components.straight_pin(length=40) wg = gf.components.straight() # Define a map between symbols and (component, input port, output port) symbol_to_component = { "A": (bend180, 'o1', 'o2'), "B": (bend180, 'o2', 'o1'), "H": (wg_pin, 'o1', 'o2'), "-": (wg, 'o1', 'o2'), } # Each character in the sequence represents a component s = "AB-H-H-H-H-BA" c = gf.components.component_sequence(sequence=s, symbol_to_component=symbol_to_component) c.plot()
(
Source code
,png
,hires.png
,pdf
)
copy_layers#
- gdsfactory.components.copy_layers(factory: ComponentSpec = <function cross>, layers: LayerSpecs = ((1, 0), (2, 0)), **kwargs) Component [source]#
Returns a component with the geometry copied in different layers.
- Parameters:
factory – component spec.
layers – iterable of layers.
kwargs – keyword arguments.
import gdsfactory as gf
c = gf.components.copy_layers(layers=[[1, 0], [2, 0]])
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler#
- gdsfactory.components.coupler(gap: float = 0.236, length: float = 20.0, coupler_symmetric: ComponentFactory = <function coupler_symmetric>, coupler_straight: ComponentFactory = <function coupler_straight>, dy: float = 4.0, dx: float = 10.0, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Symmetric coupler.
- Parameters:
gap – between straights in um.
length – of coupling region in um.
coupler_symmetric – spec for bend coupler.
coupler_straight – spec for straight coupler.
dy – port to port vertical spacing in um.
dx – length of bend in x direction in um.
cross_section – spec (CrossSection, string or dict).
dx dx |------| |------| o2 ________ ______o3 \ / | \ length / | ======================= gap | dy / \ | ________/ \_______ | o1 o4 coupler_straight coupler_symmetric
import gdsfactory as gf
c = gf.components.coupler(gap=0.236, length=20.0, dy=4.0, dx=10.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler90#
- gdsfactory.components.coupler90(gap: float = 0.2, radius: float = 10.0, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, cross_section: CrossSectionSpec = 'xs_sc', cross_section_bend: CrossSectionSpec | None = None) Component [source]#
Straight coupled to a bend.
- Parameters:
gap – um.
radius – um.
straight – for straight.
bend – bend spec.
cross_section – cross_section spec.
cross_section_bend – optional bend cross_section spec.
o3 | / / o2_/ o1___o4
import gdsfactory as gf
c = gf.components.coupler90(gap=0.2, radius=10.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler90bend#
- gdsfactory.components.coupler90bend(radius: float = 10.0, gap: float = 0.2, bend: ComponentSpec = <function bend_euler>, cross_section_inner: CrossSectionSpec = 'xs_sc', cross_section_outer: CrossSectionSpec = 'xs_sc') Component [source]#
Returns 2 coupled bends.
- Parameters:
radius – um.
gap – um.
bend – for bend.
cross_section_inner – spec inner bend.
cross_section_outer – spec outer bend.
r 3 4 | | | | / / | / / 2____/ / 1_____/
import gdsfactory as gf
c = gf.components.coupler90bend(radius=10.0, gap=0.2, cross_section_inner='xs_sc', cross_section_outer='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler90circular#
- gdsfactory.components.coupler90circular(gap: float = 0.2, radius: float = 10.0, *, bend: ComponentSpec = <function bend_circular>, straight: ComponentSpec = <function straight>, cross_section: CrossSectionSpec = 'xs_sc', cross_section_bend: CrossSectionSpec | None = None) Component #
Straight coupled to a bend.
- Parameters:
gap – um.
radius – um.
straight – for straight.
bend – bend spec.
cross_section – cross_section spec.
cross_section_bend – optional bend cross_section spec.
o3 | / / o2_/ o1___o4
import gdsfactory as gf
c = gf.components.coupler90circular(gap=0.2, radius=10.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_adiabatic#
- gdsfactory.components.coupler_adiabatic(length1: float = 20.0, length2: float = 50.0, length3: float = 30.0, wg_sep: float = 1.0, input_wg_sep: float = 3.0, output_wg_sep: float = 3.0, dw: float = 0.1, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Returns 50/50 adiabatic coupler.
Design based on asymmetric adiabatic 3dB coupler designs, such as those. - https://doi.org/10.1364/CLEO.2010.CThAA2, - https://doi.org/10.1364/CLEO_SI.2017.SF1I.5 - https://doi.org/10.1364/CLEO_SI.2018.STh4B.4
input Bezier curves, with poles set to half of the x-length of the S-bend. 1. is the first half of input S-bend where input widths taper by +dw and -dw 2. is the second half of the S-bend straight with constant, unbalanced widths 3. is the region where the two asymmetric straights gradually come together 4. straights taper back to the original width at a fixed distance from one another 5. is the output S-bend straight.
- Parameters:
length1 – region that gradually brings the two asymmetric straights together. In this region the straight widths gradually change to be different by dw.
length2 – coupling region, where asymmetric straights gradually become the same width.
length3 – output region where the two straights separate.
wg_sep – Distance between center-to-center in the coupling region (Region 2).
input_wg_sep – Separation of the two straights at the input, center-to-center.
output_wg_sep – Separation of the two straights at the output, center-to-center.
dw – Change in straight width. In Region 1, top arm tapers to width+dw/2.0, bottom taper to width-dw/2.0.
cross_section – cross_section spec.
import gdsfactory as gf
c = gf.components.coupler_adiabatic(length1=20.0, length2=50.0, length3=30.0, wg_sep=1.0, input_wg_sep=3.0, output_wg_sep=3.0, dw=0.1, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_asymmetric#
- gdsfactory.components.coupler_asymmetric(bend: ComponentSpec = <function bend_s>, gap: float = 0.234, dy: float = 2.5, dx: float = 10.0, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Bend coupled to straight waveguide.
- Parameters:
bend – spec.
gap – um.
dy – port to port vertical spacing.
dx – bend length in x direction.
cross_section – spec.
dx |-----| _____ o2 / | _____/ | gap o1____________ | dy o3
import gdsfactory as gf
c = gf.components.coupler_asymmetric(gap=0.234, dy=2.5, dx=10.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_bend#
- gdsfactory.components.coupler_bend(radius: float = 10.0, coupler_gap: float = 0.2, coupling_angle_coverage: float = 120.0, cross_section: CrossSectionSpec = 'xs_sc', cross_section_inner: CrossSectionSpec = 'xs_sc', cross_section_outer: CrossSectionSpec = 'xs_sc', bend: ComponentSpec = <function bend_circular>) Component [source]#
Compact curved coupler with bezier escape.
TODO: fix for euler bends.
- Parameters:
radius – um.
gap – um.
angle_inner – of the inner bend, from beginning to end. Depending on the bend chosen, gap may not be preserved.
angle_outer – of the outer bend, from beginning to end. Depending on the bend chosen, gap may not be preserved.
bend – for bend.
cross_section – cross_section.
cross_section_inner – spec inner bend.
cross_section_outer – spec outer bend.
r 4 | | | / ___3 | / / 2____/ / 1_____/
import gdsfactory as gf
c = gf.components.coupler_bend(radius=10.0, coupler_gap=0.2, coupling_angle_coverage=120.0, cross_section='xs_sc', cross_section_inner='xs_sc', cross_section_outer='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_bent#
- gdsfactory.components.coupler_bent(gap: float = 0.2, radius: float = 26, length: float = 8.6, width1: float = 0.4, width2: float = 0.4, length_straight: float = 10, cross_section: str = 'xs_sc') Component [source]#
Returns Broadband SOI curved / straight directional coupler. based on: https://doi.org/10.1038/s41598-017-07618-6
- Parameters:
gap – gap.
radius – radius coupling.
length – coupler_length.
width1 – width1.
width2 – width2.
length_straight – input and output straight length.
cross_section – cross_section.
import gdsfactory as gf
c = gf.components.coupler_bent(gap=0.2, radius=26, length=8.6, width1=0.4, width2=0.4, length_straight=10, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_broadband#
- gdsfactory.components.coupler_broadband(w_sc: float = 0.5, gap_sc: float = 0.2, w_top: float = 0.6, gap_pc: float = 0.3, legnth_taper: float = 1.0, bend: ComponentFactory = <function bend_euler>, coupler_straight: ComponentFactory = <function coupler_straight>, length_coupler_straight: float = 12.4, lenght_coupler_big_gap: float = 4.7, cross_section: CrossSectionSpec = 'xs_sc', radius: float = 10.0) Component [source]#
Returns broadband coupler component.
https://docs.flexcompute.com/projects/tidy3d/en/latest/notebooks/BroadbandDirectionalCoupler.html proposed in Zeqin Lu, Han Yun, Yun Wang, Zhitian Chen, Fan Zhang, Nicolas A. F. Jaeger, and Lukas Chrostowski, “Broadband silicon photonic directional coupler using asymmetric-waveguide based phase control,” Opt. Express 23, 3795-3808 (2015), DOI: 10.1364/OE.23.003795.
- Parameters:
w_sc – width of waveguides in the symmetric coupler section.
gap_sc – gap size between the waveguides in the symmetric coupler section.
w_top – width of the top waveguide in the phase control section.
gap_pc – gap size in the phase control section.
legnth_taper – length of the tapers.
bend – bend factory.
coupler_straight – coupler_straight factory.
length_coupler_straight – optimal L_1 from the 3d fdtd analysis.
lenght_coupler_big_gap – optimal L_2 from the 3d fdtd analysis.
cross_section – cross_section of the waveguides.
radius – bend radius.
import gdsfactory as gf
c = gf.components.coupler_broadband(w_sc=0.5, gap_sc=0.2, w_top=0.6, gap_pc=0.3, legnth_taper=1.0, length_coupler_straight=12.4, lenght_coupler_big_gap=4.7, cross_section='xs_sc', radius=10.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_full#
- gdsfactory.components.coupler_full(coupling_length: float = 40.0, dx: float = 10.0, dy: float = 4.8, gap: float = 0.5, dw: float = 0.1, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Adiabatic Full coupler.
Design based on asymmetric adiabatic full coupler designs, such as the one reported in ‘Integrated Optic Adiabatic Devices on Silicon’ by Y. Shani, et al (IEEE Journal of Quantum Electronics, Vol. 27, No. 3 March 1991).
1. is the first half of the input S-bend straight where the input straights widths taper by +dw and -dw, 2. is the second half of the S-bend straight with constant, unbalanced widths, 3. is the coupling region where the straights from unbalanced widths to balanced widths to reverse polarity unbalanced widths, 4. is the fixed width straight that curves away from the coupling region, 5.is the final curve where the straights taper back to the regular width specified in the straight template.
- Parameters:
coupling_length – Length of the coupling region in um.
dx – Length of the bend regions in um.
dy – Port-to-port distance between the bend regions in um.
gap – Distance between the two straights in um.
dw – delta width. Top arm tapers to width - dw, bottom to width + dw in um.
cross_section – cross-section spec.
- Keyword Arguments:
kwargs. (cross_section)
import gdsfactory as gf
c = gf.components.coupler_full(coupling_length=40.0, dx=10.0, dy=4.8, gap=0.5, dw=0.1, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_ring#
- gdsfactory.components.coupler_ring(gap: float = 0.2, radius: float = 5.0, length_x: float = 4.0, coupler90: ComponentFactory = <function coupler90>, bend: ComponentSpec = <function bend_euler>, coupler_straight: ComponentFactory = <function coupler_straight>, cross_section: CrossSectionSpec = 'xs_sc', cross_section_bend: CrossSectionSpec | None = None, length_extension: float = 3) Component [source]#
Coupler for ring.
- Parameters:
gap – spacing between parallel coupled straight waveguides.
radius – of the bends.
length_x – length of the parallel coupled straight waveguides.
coupler90 – straight coupled to a 90deg bend.
bend – bend spec.
coupler_straight – two parallel coupled straight waveguides.
cross_section – cross_section spec.
cross_section_bend – optional bend cross_section spec.
length_extension – for the ports.
o2 o3 | | \ / \ / ---=========--- o1 length_x o4
import gdsfactory as gf
c = gf.components.coupler_ring(gap=0.2, radius=5.0, length_x=4.0, cross_section='xs_sc', length_extension=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_ring_point#
- gdsfactory.components.coupler_ring_point(coupler_ring: ComponentFactory = <function coupler_ring>, open_layers: LayerSpecs | None = None, open_sizes: Coordinates | None = None, **kwargs) Component [source]#
Coupler ring that removes some layers at the coupling region.
This allows short interaction lengths (point couplers).
- Parameters:
coupler_ring – coupler_ring component to process.
open_layers – layers to perform the boolean operations on.
open_sizes – sizes of the boxes to use to remove layers, centered at bus center.
- Keyword Arguments:
gap – spacing between parallel coupled straight waveguides.
radius – of the bends.
length_x – length of the parallel coupled straight waveguides.
coupler90 – straight coupled to a 90deg bend.
bend – bend spec.
coupler_straight – two parallel coupled straight waveguides.
cross_section – cross_section spec.
length_extension – for the ports.
import gdsfactory as gf
c = gf.components.coupler_ring_point()
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_straight#
- gdsfactory.components.coupler_straight(length: float = 10.0, gap: float = 0.27, straight: ComponentSpec = <function straight>, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Coupler_straight with two parallel straights.
- Parameters:
length – of straight.
gap – between straights.
straight – straight component (straight, bend_euler, bend_heater).
cross_section – specification (CrossSection, string or dict).
kwargs – cross_section settings.
o2──────▲─────────o3 │gap o1──────▼─────────o4
import gdsfactory as gf
c = gf.components.coupler_straight(length=10.0, gap=0.27, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_straight_asymmetric#
- gdsfactory.components.coupler_straight_asymmetric(length: float = 10.0, gap: float = 0.27, width_top: float = 0.5, width_bot: float = 1, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Coupler with two parallel straights of different widths.
- Parameters:
length – of straight.
gap – between straights.
width_top – of top straight.
width_bot – of bottom straight.
import gdsfactory as gf
c = gf.components.coupler_straight_asymmetric(length=10.0, gap=0.27, width_top=0.5, width_bot=1, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_symmetric#
- gdsfactory.components.coupler_symmetric(bend: ComponentSpec = <function bend_s>, gap: float = 0.234, dy: float = 4.0, dx: float = 10.0, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Two coupled straights with bends.
- Parameters:
bend – bend spec.
gap – in um.
dy – port to port vertical spacing.
dx – bend length in x direction.
cross_section – section.
dx |-----| ___ o3 / | o2 _____/ | | o1 _____ | dy \ | \___ | o4
import gdsfactory as gf
c = gf.components.coupler_symmetric(gap=0.234, dy=4.0, dx=10.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
coupler_trenches#
- gdsfactory.components.coupler_trenches(*, component: ComponentSpec = <function coupler>, cross_section: CrossSectionSpec = 'xs_rc_with_trenches', top: bool = True, bot: bool = True, right: bool = False, left: bool = False, layer_trench: LayerSpec = (3, 6), width_trench: float = 3, **kwargs) Component #
Return component with trenches.
- Parameters:
component – component to add to the trenches.
cross_section – spec (CrossSection, string or dict).
top – add top trenches.
bot – add bot trenches.
right – add right trenches.
left – add left trenches.
layer_trench – layer for the trenches.
width_trench – width of the trenches.
kwargs – component settings.
import gdsfactory as gf
c = gf.components.coupler_trenches(cross_section='xs_rc_with_trenches', top=True, bot=True, right=False, left=False, layer_trench=[3, 6], width_trench=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
cross#
- gdsfactory.components.cross(length: float = 10.0, width: float = 3.0, layer: LayerSpec = 'WG', layers: LayerSpecs | None = None, port_type: str | None = None) Component [source]#
Returns a cross from two rectangles of length and width.
- Parameters:
length – float Length of the cross from one end to the other.
width – float Width of the arms of the cross.
layer – layer for geometry.
layers – Optional. List of layers for geometry.
port_type – None, optical, electrical.
import gdsfactory as gf
c = gf.components.cross(length=10.0, width=3.0, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
crossing#
- gdsfactory.components.crossing(arm: ComponentSpec = <function crossing_arm>, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Waveguide crossing.
- Parameters:
arm – arm spec.
cross_section – spec.
import gdsfactory as gf
c = gf.components.crossing(cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
crossing45#
- gdsfactory.components.crossing45(crossing: ComponentSpec = <function crossing>, port_spacing: float = 40.0, dx: float | None = None, alpha: float = 0.08, npoints: int = 101, cross_section: CrossSectionSpec = 'xs_sc', cross_section_bends: CrossSectionSpec = 'xs_sc') Component [source]#
Returns 45deg crossing with bends.
- Parameters:
crossing – crossing function.
port_spacing – target I/O port spacing.
dx – target length.
alpha – optimization parameter. diminish it for tight bends, increase it if raises assertion angle errors
npoints – number of points.
cross_section – waveguide cross_section.
cross_section_bends – waveguide cross_section for the bends.
The 45 Degree crossing CANNOT be kept as an SRef since we only allow for multiples of 90Deg rotations in SRef.
---- ---- \ / X / \ --- ----
import gdsfactory as gf
c = gf.components.crossing45(port_spacing=40.0, alpha=0.08, npoints=101, cross_section='xs_sc', cross_section_bends='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
crossing_arm#
- gdsfactory.components.crossing_arm(r1: float = 3.0, r2: float = 1.1, w: float = 1.2, L: float = 3.4, layer_slab: LayerSpec = 'SLAB150', cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Returns crossing arm.
- Parameters:
r1 – ellipse radius1.
r2 – ellipse radius2.
w – width in um.
L – length in um.
layer_slab – for the shallow etch.
cross_section – spec.
import gdsfactory as gf
c = gf.components.crossing_arm(r1=3.0, r2=1.1, w=1.2, L=3.4, layer_slab='SLAB150', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
crossing_etched#
- gdsfactory.components.crossing_etched(width: float = 0.5, r1: float = 3.0, r2: float = 1.1, w: float = 1.2, L: float = 3.4, layer_wg: LayerSpec = 'WG', layer_slab: LayerSpec = 'SLAB150') Component [source]#
Waveguide crossing.
Full crossing has to be on WG layer (to start with a 220nm slab). Then we etch the ellipses down to 150nm slabs and we keep linear taper at 220nm.
- Parameters:
width – input waveguides width.
r1 – radii.
r2 – radii.
w – wide width.
L – length.
layer_wg – waveguide layer.
layer_slab – shallow etch layer.
import gdsfactory as gf
c = gf.components.crossing_etched(width=0.5, r1=3.0, r2=1.1, w=1.2, L=3.4, layer_wg='WG', layer_slab='SLAB150')
c.plot()
(Source code
, png
, hires.png
, pdf
)
crossing_from_taper#
- gdsfactory.components.crossing_from_taper(taper=functools.partial(<function taper>, width2=2.5, length=3)) Component [source]#
Returns Crossing based on a taper.
The default is a dummy taper.
- Parameters:
taper – taper function.
import gdsfactory as gf
c = gf.components.crossing_from_taper()
c.plot()
(Source code
, png
, hires.png
, pdf
)
cutback_2x2#
- gdsfactory.components.cutback_2x2(component: ComponentSpec = <function mmi2x2>, cols: int = 4, rows: int = 5, port1: str = 'o1', port2: str = 'o2', port3: str = 'o3', port4: str = 'o4', bend180: ComponentSpec | ComponentSpecOrList = functools.partial(<function bend_circular>, angle=180), mirror: bool = False, straight_length: float | None = None, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Returns a daisy chain of splitters for measuring their loss.
- Parameters:
component – for cutback.
cols – number of columns.
rows – number of rows.
port1 – name of first optical port.
port2 – name of second optical port.
bend180 – ubend. If a list, a different bend is used for each of the 2 ports.
straight – waveguide spec to connect both sides.
mirror – Flips component. Useful when ‘o2’ is the port that you want to route to.
straight_length – length of the straight section between cutbacks.
cross_section – specification (CrossSection, string or dict).
import gdsfactory as gf
c = gf.components.cutback_2x2(cols=4, rows=5, port1='o1', port2='o2', port3='o3', port4='o4', mirror=False, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
cutback_bend#
- gdsfactory.components.cutback_bend(component: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, straight_length: float = 5.0, rows: int = 6, cols: int = 5, **kwargs) Component [source]#
Deprecated.
Use cutback_bend90 instead with smaller footprint.
- Parameters:
bend90 – bend spec.
straight – straight spec.
straight_length – in um.
rows – number of rows.
cols – number of cols.
kwargs – cross_section settings.
this is a column _ _| _| _ this is a row
import gdsfactory as gf
c = gf.components.cutback_bend(straight_length=5.0, rows=6, cols=5)
c.plot()
(Source code
, png
, hires.png
, pdf
)
cutback_bend180#
- gdsfactory.components.cutback_bend180(component: ComponentSpec = functools.partial(<function bend_euler>, angle=180), straight: ComponentSpec = <function straight>, straight_length: float = 5.0, rows: int = 6, cols: int = 6, spacing: int = 3, **kwargs) Component [source]#
Returns cutback to measure u bend loss.
- Parameters:
bend180 – bend spec.
straight – straight spec.
straight_length – in um.
rows – number of rows.
cols – number of cols.
spacing – in um.
kwargs – cross_section settings.
_ _| |_ this is a row _ this is a column
import gdsfactory as gf
c = gf.components.cutback_bend180(straight_length=5.0, rows=6, cols=6, spacing=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
cutback_bend180circular#
- gdsfactory.components.cutback_bend180circular(*, component: ComponentSpec = functools.partial(<function bend_circular>, angle=180), straight: ComponentSpec = <function straight>, straight_length: float = 5.0, rows: int = 6, cols: int = 6, spacing: int = 3, **kwargs) Component #
Returns cutback to measure u bend loss.
- Parameters:
bend180 – bend spec.
straight – straight spec.
straight_length – in um.
rows – number of rows.
cols – number of cols.
spacing – in um.
kwargs – cross_section settings.
_ _| |_ this is a row _ this is a column
import gdsfactory as gf
c = gf.components.cutback_bend180circular(straight_length=5.0, rows=6, cols=6, spacing=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
cutback_bend90#
- gdsfactory.components.cutback_bend90(component: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, straight_length: float = 5.0, rows: int = 6, cols: int = 6, spacing: int = 5, **kwargs) Component [source]#
Returns bend90 cutback.
- Parameters:
component – bend spec.
straight – straight spec.
straight_length – in um.
rows – number of rows.
cols – number of cols.
spacing – in um.
kwargs – cross_section settings.
_ |_| |
import gdsfactory as gf
c = gf.components.cutback_bend90(straight_length=5.0, rows=6, cols=6, spacing=5)
c.plot()
(Source code
, png
, hires.png
, pdf
)
cutback_bend90circular#
- gdsfactory.components.cutback_bend90circular(*, component: ComponentSpec = <function bend_circular>, straight: ComponentSpec = <function straight>, straight_length: float = 5.0, rows: int = 6, cols: int = 6, spacing: int = 5, **kwargs) Component #
Returns bend90 cutback.
- Parameters:
component – bend spec.
straight – straight spec.
straight_length – in um.
rows – number of rows.
cols – number of cols.
spacing – in um.
kwargs – cross_section settings.
_ |_| |
import gdsfactory as gf
c = gf.components.cutback_bend90circular(straight_length=5.0, rows=6, cols=6, spacing=5)
c.plot()
(Source code
, png
, hires.png
, pdf
)
cutback_component#
- gdsfactory.components.cutback_component(component: ComponentSpec = <function taper_from_csv>, cols: int = 4, rows: int = 5, port1: str = 'o1', port2: str = 'o2', bend180: ComponentSpec = functools.partial(<function bend_euler>, angle=180), mirror: bool = False, mirror1: bool = False, mirror2: bool = False, straight_length: float | None = None, straight_length_pair: float | None = None, cross_section: CrossSectionSpec = 'xs_sc', ports_map: dict[str, tuple[str, str]] | None = None, **kwargs) Component [source]#
Returns a daisy chain of components for measuring their loss.
Works only for components with 2 ports (input, output).
The number of components is given by cols * rows * 4.
- Parameters:
component – for cutback.
cols – number of columns.
rows – number of rows.
port1 – name of first optical port.
port2 – name of second optical port.
bend180 – ubend.
mirror – Flips component. Useful when ‘o2’ is the port that you want to route to.
mirror1 – mirrors first component.
mirror2 – mirrors second component.
straight_length – length of the straight section between cutbacks.
straight_length_pair – length of the straight section between each component pair.
cross_section – specification (CrossSection, string or dict).
ports_map – (optional) extra port mapping for the underlying component_sequence using the convention. {port_name: (alias_name, port_name)} An and Bn are the aliases for the components here, with n integers.
kwargs – component settings.
import gdsfactory as gf
c = gf.components.cutback_component(cols=4, rows=5, port1='o1', port2='o2', mirror=False, mirror1=False, mirror2=False, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
cutback_component_mirror#
- gdsfactory.components.cutback_component_mirror(component: ComponentSpec = <function taper_from_csv>, cols: int = 4, rows: int = 5, port1: str = 'o1', port2: str = 'o2', bend180: ComponentSpec = functools.partial(<function bend_euler>, angle=180), *, mirror: bool = True, mirror1: bool = False, mirror2: bool = False, straight_length: float | None = None, straight_length_pair: float | None = None, cross_section: CrossSectionSpec = 'xs_sc', ports_map: dict[str, tuple[str, str]] | None = None, **kwargs) Component #
Returns a daisy chain of components for measuring their loss.
Works only for components with 2 ports (input, output).
The number of components is given by cols * rows * 4.
- Parameters:
component – for cutback.
cols – number of columns.
rows – number of rows.
port1 – name of first optical port.
port2 – name of second optical port.
bend180 – ubend.
mirror – Flips component. Useful when ‘o2’ is the port that you want to route to.
mirror1 – mirrors first component.
mirror2 – mirrors second component.
straight_length – length of the straight section between cutbacks.
straight_length_pair – length of the straight section between each component pair.
cross_section – specification (CrossSection, string or dict).
ports_map – (optional) extra port mapping for the underlying component_sequence using the convention. {port_name: (alias_name, port_name)} An and Bn are the aliases for the components here, with n integers.
kwargs – component settings.
import gdsfactory as gf
c = gf.components.cutback_component_mirror(cols=4, rows=5, port1='o1', port2='o2', mirror=True, mirror1=False, mirror2=False, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
cutback_splitter#
- gdsfactory.components.cutback_splitter(component: ComponentSpec = <function mmi1x2>, cols: int = 4, rows: int = 5, port1: str = 'o1', port2: str = 'o2', port3: str = 'o3', bend180: ComponentSpec = functools.partial(<function bend_euler>, angle=180), mirror: bool = False, straight_length: float | None = None, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns a daisy chain of splitters for measuring their loss.
- Parameters:
component – for cutback.
cols – number of columns.
rows – number of rows.
port1 – name of first optical port.
port2 – name of second optical port.
bend180 – ubend.
straight – waveguide spec to connect both sides.
mirror – Flips component. Useful when ‘o2’ is the port that you want to route to.
straight_length – length of the straight section between cutbacks.
cross_section – specification (CrossSection, string or dict).
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.cutback_splitter(cols=4, rows=5, port1='o1', port2='o2', port3='o3', mirror=False, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
dbr#
- gdsfactory.components.dbr(w1: float = 0.475, w2: float = 0.525, l1: float = 0.159, l2: float = 0.159, n: int = 10, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Distributed Bragg Reflector.
- Parameters:
w1 – thin width in um.
l1 – thin length in um.
w2 – thick width in um.
l2 – thick length in um.
n – number of periods.
cross_section – cross_section spec.
kwargs – cross_section settings.
l1 l2 <-----><--------> _________ _______| w1 w2 ... n times _______ |_________
import gdsfactory as gf
c = gf.components.dbr(w1=0.475, w2=0.525, l1=0.159, l2=0.159, n=10, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
dbr_tapered#
- gdsfactory.components.dbr_tapered(length: float = 10.0, period: float = 0.85, dc: float = 0.5, w1: float = 0.4, w2: float = 1.0, taper_length: float = 20.0, fins: bool = False, fin_size: tuple[float, float] = (0.2, 0.05), cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Distributed Bragg Reflector Cell class.
Tapers the input straight to a periodic straight structure with varying width (1-D photonic crystal).
- Parameters:
length – Length of the DBR region.
period – Period of the repeated unit.
dc – Duty cycle of the repeated unit (must be a float between 0 and 1.0).
w1 – thin section width. w1 = 0 corresponds to disconnected periodic blocks.
w2 – wide section width.
taper_length – between the input/output straight and the DBR region.
fins – If True, adds fins to the input/output straights.
fin_size – Specifies the x- and y-size of the fins. Defaults to 200 nm x 50 nm
cross_section – cross_section spec.
- Keyword Arguments:
kwargs. (cross_section)
period <-----><--------> _________ _______| w1 w2 ... n times _______ |_________
import gdsfactory as gf
c = gf.components.dbr_tapered(length=10.0, period=0.85, dc=0.5, w1=0.4, w2=1.0, taper_length=20.0, fins=False, fin_size=[0.2, 0.05], cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
delay_snake#
- gdsfactory.components.delay_snake(length: float = 1600.0, L0: float = 5.0, n: int = 2, bend: ComponentSpec = 'bend_euler', cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns Snake with a starting straight and 90 bends.
Input faces west output faces east.
- Parameters:
length – delay length in um.
L0 – initial xoffset in um.
n – number of loops.
bend – bend spec.
cross_section – cross_section spec.
kwargs – cross_section settings.
| L0 | L2 | ->-------------| | pi * radius |-------------------| | |-------------------> | DL |
import gdsfactory as gf
c = gf.components.delay_snake(length=1600.0, L0=5.0, n=2, bend='bend_euler', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
delay_snake2#
- gdsfactory.components.delay_snake2(length: float = 1600.0, length0: float = 0.0, length2: float = 0.0, n: int = 2, bend180: ComponentSpec = 'bend_euler180', cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns Snake with a starting straight and 180 bends.
Input faces west output faces east.
- Parameters:
length – total length.
length0 – start length.
length2 – end length.
n – number of loops.
bend180 – ubend spec.
cross_section – cross_section spec.
kwargs – cross_section settings.
| length0 | length1 | >---------| | bend180.length |-------------------| | |------------------->------- | length2 | delta_length | |
import gdsfactory as gf
c = gf.components.delay_snake2(length=1600.0, length0=0.0, length2=0.0, n=2, bend180='bend_euler180', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
delay_snake3#
- gdsfactory.components.delay_snake3(length: float = 1600.0, length0: float = 0.0, length2: float = 0.0, n: int = 2, bend180: ComponentSpec = functools.partial(<function bend_euler>, angle=180), cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns Snake with a starting bend and 180 bends.
- Parameters:
length – total length.
length0 – start length.
length2 – end length.
n – number of loops.
bend180 – ubend spec.
cross_section – cross_section spec.
kwargs – cross_section settings.
| length0 | >---------\ \bend180.info['length'] / |-------------------/ | |------------------->------->| length2 | delta_length | |
import gdsfactory as gf
c = gf.components.delay_snake3(length=1600.0, length0=0.0, length2=0.0, n=2, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
delay_snake_sbend#
- gdsfactory.components.delay_snake_sbend(length: float = 100.0, length1: float = 0.0, length4: float = 0.0, radius: float = 5.0, waveguide_spacing: float = 5.0, bend: ComponentSpec = 'bend_euler', sbend: ComponentSpec = 'bend_s', sbend_xsize: float = 100.0, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns compact Snake with sbend in the middle.
Input port faces west and output port faces east.
- Parameters:
length – total length.
length1 – first straight section length in um.
length3 – third straight section length in um.
radius – u bend radius in um.
waveguide_spacing – waveguide pitch in um.
bend – bend spec.
sbend – sbend spec.
sbend_size – sbend size.
cross_section – cross_section spec.
kwargs – cross_section settings.
length1 <---------------------------- length2 spacing | _______ | | \ | | \ | bend1 radius | \sbend | bend2| \ | | \ | | \__| | ---------------------->-----------> length3 length4 We adjust length2 and length3
import gdsfactory as gf
c = gf.components.delay_snake_sbend(length=100.0, length1=0.0, length4=0.0, radius=5.0, waveguide_spacing=5.0, bend='bend_euler', sbend='bend_s', sbend_xsize=100.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
dicing_lane#
- gdsfactory.components.dicing_lane(size: Float2 = (50, 300), marker: ComponentSpec = functools.partial(<function triangle>, layer='MTOP', xtop=2), layer_dicing: LayerSpec = 'DICING', layers: LayerSpecs | None = None) Component [source]#
Dicing lane with triangular markers on both sides.
- Parameters:
size – (tuple) Width and height of rectangle.
marker – function to generate the dicing lane markers.
layer_dicing – Specific layer to put polygon geometry on.
layers – optional list of layers to duplicate the geometry.
import gdsfactory as gf
c = gf.components.dicing_lane(size=[50, 300], layer_dicing='DICING')
c.plot()
(Source code
, png
, hires.png
, pdf
)
die#
- gdsfactory.components.die(size: tuple[float, float] = (10000.0, 10000.0), street_width: float = 100.0, street_length: float = 1000.0, die_name: str | None = 'chip99', text_size: float = 100.0, text_location: str | Float2 = 'SW', layer: LayerSpec = 'FLOORPLAN', layers: LayerSpecs | None = None, bbox_layer: LayerSpec | None = 'FLOORPLAN', text: ComponentFactory = <function text>, draw_corners: bool = False) Component [source]#
Returns die with optional markers marking the boundary of the die.
- Parameters:
size – x, y dimensions of the die.
street_width – Width of the corner marks for die-sawing.
street_length – Length of the corner marks for die-sawing.
die_name – Label text. If None, no label is added.
text_size – Label text size.
text_location – {‘NW’, ‘N’, ‘NE’, ‘SW’, ‘S’, ‘SE’} or (x, y) coordinate.
layer – For street widths. None to not draw the street widths.
layers – optional layers for the street widths.
bbox_layer – optional bbox layer drawn bounding box around the die.
text – function use for generating text. Needs to accept text, size, layer.
draw_corners – True draws only corners. False draws a square die.
import gdsfactory as gf
c = gf.components.die(size=[10000.0, 10000.0], street_width=100.0, street_length=1000.0, die_name='chip99', text_size=100.0, text_location='SW', layer='FLOORPLAN', bbox_layer='FLOORPLAN', draw_corners=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
die_bbox#
- gdsfactory.components.die_bbox(component: ComponentSpec = functools.partial(<function rectangle>, size=(1300, 2600)), street_width: float = 100.0, street_length: float | None = None, die_name: str | None = None, text_size: float = 100.0, text_anchor: ~typing.Literal['ce', 'cw', 'nc', 'ne', 'nw', 'sc', 'se', 'sw', 'center', 'cc'] = 'sw', layer: LayerSpec = 'MTOP', padding: float = 10.0) Component [source]#
Returns component with boundary box frame around it.
Perfect for defining the boundary of the chip/die it can also add a label with the name of the die. similar to die and bbox.
- Parameters:
component – to frame.
street_width – Width of the boundary box.
street_length – length of the boundary box.
die_name – Label text.
text_size – Label text size.
text_anchor – {‘nw’, ‘nc’, ‘ne’, ‘sw’, ‘sc’, ‘se’} text location.
layer – Specific layer(s) to put polygon geometry on.
padding – adds padding.
import gdsfactory as gf
c = gf.components.die_bbox(street_width=100.0, text_size=100.0, text_anchor='sw', layer='MTOP', padding=10.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
die_bbox_frame#
- gdsfactory.components.die_bbox_frame(bbox: tuple[tuple[float | int, float | int], tuple[float | int, float | int]] = ((-1.0, -1.0), (3.0, 4.0)), street_width: float = 100.0, street_length: float = 1000.0, die_name: str | None = None, text_size: float = 100.0, text_anchor: Literal['ce', 'cw', 'nc', 'ne', 'nw', 'sc', 'se', 'sw', 'center', 'cc'] = 'sw', layer: LayerSpec = 'MTOP', padding: float = 10.0) Component [source]#
Return boundary box frame.
The chip/die boundary can include a label with the name of the die.
- Parameters:
bbox – bounding box to frame.
street_width – Width of the boundary box.
street_length – length of the boundary box.
die_name – Label text.
text_size – Label text size.
text_anchor – {‘nw’, ‘nc’, ‘ne’, ‘sw’, ‘sc’, ‘se’} text location.
layer – Specific layer(s) to put polygon geometry on.
padding – adds padding.
import gdsfactory as gf
c = gf.components.die_bbox_frame(bbox=[[-1.0, -1.0], [3.0, 4.0]], street_width=100.0, street_length=1000.0, text_size=100.0, text_anchor='sw', layer='MTOP', padding=10.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
disk#
- gdsfactory.components.disk(radius: float = 10.0, gap: float = 0.2, wrap_angle_deg: float = 180.0, parity: int = 1, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Disk Resonator.
- Parameters:
radius – disk resonator radius.
gap – Distance between the bus straight and resonator.
wrap_angle_deg – Angle in degrees between 0 and 180. determines how much the bus straight wraps along the resonator. 0 corresponds to a straight bus straight. 180 corresponds to a bus straight wrapped around half of the resonator.
parity (1 or -1) – 1, resonator left from bus straight, -1 resonator to the right.
cross_section – cross_section spec.
import gdsfactory as gf
c = gf.components.disk(radius=10.0, gap=0.2, wrap_angle_deg=180.0, parity=1, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
disk_heater#
- gdsfactory.components.disk_heater(radius: float = 10.0, gap: float = 0.2, wrap_angle_deg: float = 180.0, parity: int = 1, cross_section: CrossSectionSpec = 'xs_sc', heater_layer: LayerSpec = 'HEATER', via_stack: ComponentSpec = 'via_stack_heater_mtop', heater_width: float = 5.0, heater_extent: float = 2.0, via_width: float = 10.0, port_orientation: float | None = 90) Component [source]#
Disk Resonator with top metal heater.
- Parameters:
radius – disk resonator radius.
gap – Distance between the bus straight and resonator.
wrap_angle_deg – Angle in degrees between 0 and 180. determines how much the bus straight wraps along the resonator. 0 corresponds to a straight bus straight. 180 corresponds to a bus straight wrapped around half of the resonator.
parity (1 or -1) – 1, resonator left from bus straight, -1 resonator to the right.
cross_section – cross_section spec.
heater_layer – layer of the heater.
heater_width – width of the heater.
heater_extent – length of heater beyond disk.
via_width – size of the square via at the end of the heater.
port_orientation – in degrees.
import gdsfactory as gf
c = gf.components.disk_heater(radius=10.0, gap=0.2, wrap_angle_deg=180.0, parity=1, cross_section='xs_sc', heater_layer='HEATER', via_stack='via_stack_heater_mtop', heater_width=5.0, heater_extent=2.0, via_width=10.0, port_orientation=90)
c.plot()
(Source code
, png
, hires.png
, pdf
)
edge_coupler_array#
- gdsfactory.components.edge_coupler_array(edge_coupler: ComponentSpec | ComponentSpecOrList = functools.partial(<function taper>, width2=0.2, length=100, with_two_ports=True, port_types=('optical', 'edge_te')), n: int = 5, pitch: float = 127.0, x_reflection: bool = False, text: ComponentSpec | None = <function text_rectangular>, text_offset: Float2 = (10, 20), text_rotation: float = 0, text_mirror: bool = False, angle: float = 0, bend: ComponentSpec = <function bend_euler>, place_x_by_port: bool = True, space_y_by_port: bool = False, alignment_port: str = 'o1') Component [source]#
Fiber array edge coupler based on an inverse taper.
Each edge coupler adds a ruler for polishing.
- Parameters:
edge_coupler – edge coupler spec or list of edge coupler specs.
n – number of channels. Overwritten if edge_coupler is a list.
pitch – Fiber pitch.
x_reflection – horizontal mirror.
text – text spec.
text_offset – from edge coupler.
text_rotation – text rotation in degrees.
text_mirror – mirrors the text.
angle – rotation in degrees.
bend – bend spec. Used only if angle > 0.
place_x_by_port – If True it aligns the ports in the x direction. If False it aligns the right edge.
space_y_by_port – If True it spaces the edge couplers based on port. If False it just places the y of the edge coupler at the given pitch
alignment_port – port that we use to align and space edge couplers
Requires edge coupler waveguide port to face left.
import gdsfactory as gf
c = gf.components.edge_coupler_array(n=5, pitch=127.0, x_reflection=False, text_offset=[10, 20], text_rotation=0, text_mirror=False, angle=0, place_x_by_port=True, space_y_by_port=False, alignment_port='o1')
c.plot()
(Source code
, png
, hires.png
, pdf
)
edge_coupler_array_with_loopback#
- gdsfactory.components.edge_coupler_array_with_loopback(edge_coupler: ComponentSpec | ComponentSpecOrList = functools.partial(<function taper>, width2=0.2, length=100, with_two_ports=True, port_types=('optical', 'edge_te')), cross_section: CrossSectionSpec | None = 'xs_sc', radius: float = 30, n: int = 8, pitch: float = 127.0, extension_length: float = 1.0, right_loopback: bool = True, x_reflection: bool = False, text: ComponentSpec | None = <function text_rectangular>, text_offset: Float2 = (0, 0), text_rotation: float = 0, text_mirror: bool = False, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, taper: ComponentSpec | None = None, angle: float = 0, place_x_by_port: bool = True, space_y_by_port: bool = False, alignment_port: str = 'o1') Component [source]#
Fiber array edge coupler.
- Parameters:
edge_coupler – edge coupler.
cross_section – spec.
radius – bend radius loopback (um).
n – number of channels.
pitch – Fiber pitch (um).
extension_length – in um.
right_loopback – adds right loopback.
x_reflection – horizontal mirror.
text – Optional text spec.
text_offset – x, y.
text_rotation – text rotation in degrees.
text_mirror – mirrors the text.
bend – bend spec.
straight – straight spec.
taper – taper spec.
angle – rotation in degrees.
import gdsfactory as gf
c = gf.components.edge_coupler_array_with_loopback(cross_section='xs_sc', radius=30, n=8, pitch=127.0, extension_length=1.0, right_loopback=True, x_reflection=False, text_offset=[0, 0], text_rotation=0, text_mirror=False, angle=0, place_x_by_port=True, space_y_by_port=False, alignment_port='o1')
c.plot()
(Source code
, png
, hires.png
, pdf
)
edge_coupler_silicon#
- gdsfactory.components.edge_coupler_silicon(*, length: float = 100, width1: float = 0.5, width2: float | None = 0.2, port: Port | None = None, with_two_ports: bool = True, cross_section: CrossSectionSpec = 'xs_sc', port_names: tuple | None = ('o1', 'o2'), port_types: tuple | None = ('optical', 'edge_te'), **kwargs) Component #
Linear taper, which tapers only the main cross section section.
Deprecated, use gf.components.taper_cross_section instead
- Parameters:
length – taper length.
width1 – width of the west/left port.
width2 – width of the east/right port. Defaults to width1.
port – can taper from a port instead of defining width1.
with_two_ports – includes a second port. False for terminator and edge coupler fiber interface.
cross_section – specification (CrossSection, string, CrossSectionFactory dict).
port_names (tuple) – Ordered tuple of port names. First port is default taper port, second name only if with_two_ports flags used.
port_types (tuple) – Ordered tuple of port types. First port is default taper port, second name only if with_two_ports flags used.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.edge_coupler_silicon(length=100, width1=0.5, width2=0.2, with_two_ports=True, cross_section='xs_sc', port_names=['o1', 'o2'], port_types=['optical', 'edge_te'])
c.plot()
(Source code
, png
, hires.png
, pdf
)
ellipse#
- gdsfactory.components.ellipse(radii: tuple[float, float] = (10.0, 5.0), angle_resolution: float = 2.5, layer: LayerSpec = 'WG') Component [source]#
Returns ellipse component.
- Parameters:
radii – Semimajor and semiminor axis lengths of the ellipse.
angle_resolution – number of degrees per point.
layer – Specific layer(s) to put polygon geometry on.
The orientation of the ellipse is determined by the order of the radii variables; if the first element is larger, the ellipse will be horizontal and if the second element is larger, the ellipse will be vertical.
import gdsfactory as gf
c = gf.components.ellipse(radii=[10.0, 5.0], angle_resolution=2.5, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
extend_port#
extend_ports#
- gdsfactory.components.extend_ports(component: ComponentSpec = <function mmi1x2>, port_names: tuple[str, ...] | None = None, length: float = 5.0, extension: ComponentSpec | None = None, port1: str | None = None, port2: str | None = None, port_type: str = 'optical', centered: bool = False, cross_section: CrossSectionSpec | None = None, extension_port_names: list[str] | None = None, **kwargs) Component [source]#
Returns a new component with some ports extended.
You can define extension Spec defaults to port cross_section of each port to extend.
- Parameters:
component – component to extend ports.
port_names – list of ports names to extend, if None it extends all ports.
length – extension length.
extension – function to extend ports (defaults to a straight).
port1 – extension input port name.
port2 – extension output port name.
port_type – type of the ports to extend.
centered – if True centers rectangle at (0, 0).
cross_section – extension cross_section, defaults to port cross_section if port has no cross_section it creates one using width and layer.
extension_port_names – extension port names add to the new component.
- Keyword Arguments:
layer – port GDS layer.
prefix – port name prefix.
orientation – in degrees.
width – port width.
layers_excluded – List of layers to exclude.
port_type – optical, electrical, ….
clockwise – if True, sort ports clockwise, False: counter-clockwise.
import gdsfactory as gf
c = gf.components.extend_ports(length=5.0, port_type='optical', centered=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
extend_ports_list#
- gdsfactory.components.extend_ports_list(ports: list[Port], extension: ComponentSpec, extension_port_name: str | None = None, ignore_ports: tuple[str, ...] | None = None) Component [source]#
Returns a component with the extensions for a list of ports.
- Parameters:
ports – list of ports.
extension – function for extension.
extension_port_name – to connect extension.
ignore_ports – list of port names to ignore.
fiber#
- gdsfactory.components.fiber(core_diameter: float = 10, cladding_diameter: float = 125, layer_core: LayerSpec = 'WG', layer_cladding: LayerSpec = 'WGCLAD') Component [source]#
Returns a fiber.
- Parameters:
core_diameter – in um.
cladding_diameter – in um.
layer_core – layer spec for fiber core.
layer_cladding – layer spec for fiber cladding.
import gdsfactory as gf
c = gf.components.fiber(core_diameter=10, cladding_diameter=125, layer_core='WG', layer_cladding='WGCLAD')
c.plot()
(Source code
, png
, hires.png
, pdf
)
fiber_array#
- gdsfactory.components.fiber_array(n: int = 8, pitch: float = 127.0, core_diameter: float = 10, cladding_diameter: float = 125, layer_core: LayerSpec = 'WG', layer_cladding: LayerSpec = 'WGCLAD') Component [source]#
Returns a fiber array footprint for estimating its size when testing.
- Parameters:
n – number of fibers.
pitch – spacing.
core_diameter – 10um.
cladding_diameter – in um.
layer_core – layer spec for fiber core.
layer_cladding – layer spec for fiber cladding.
pitch <-> _________ | | lid | o o o o | | | base |_________| length
import gdsfactory as gf
c = gf.components.fiber_array(n=8, pitch=127.0, core_diameter=10, cladding_diameter=125, layer_core='WG', layer_cladding='WGCLAD')
c.plot()
(Source code
, png
, hires.png
, pdf
)
fiducial_squares#
- gdsfactory.components.fiducial_squares(layer: LayerSpec = 'WG', layers: LayerSpecs | None = None, size: Float2 = (5.0, 5.0), offset: float = 0.14) Component [source]#
Returns fiducials with two squares.
- Parameters:
layer – layer for geometry.
layers – optional list of layers to duplicate the geometry.
size – in um.
offset – between squares in um.
import gdsfactory as gf
c = gf.components.fiducial_squares(layer='WG', size=[5.0, 5.0], offset=0.14)
c.plot()
(Source code
, png
, hires.png
, pdf
)
ge_detector_straight_si_contacts#
- gdsfactory.components.ge_detector_straight_si_contacts(length: float = 80.0, cross_section: CrossSectionSpec = <function pn_ge_detector_si_contacts>, via_stack: ComponentSpec | tuple[ComponentSpec, ComponentSpec] = functools.partial(<function via_stack>, layers=('SLAB90', 'M1', 'M2', 'MTOP'), vias=(functools.partial(<function via>, layer='VIAC'), functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2'), None)), via_stack_width: float = 10.0, via_stack_spacing: float = 5.0, via_stack_offset: float = 0.0, taper: ComponentSpec | None = functools.partial(<function taper>, length=20.0, width1=0.5, width2=0.8, cross_section='xs_sc')) Component [source]#
Returns a straight Ge on Si detector with silicon contacts.
There are no contacts on the Ge. These detectors could have lower dark current and sensitivity compared to those with contacts in the Ge. See Chen et al., “High-Responsivity Low-Voltage 28-Gb/s Ge p-i-n Photodetector With Silicon Contacts”, Journal of Lightwave Technology 33(4), 2015.
https://doi.org/10.1109/JLT.2014.2367134
- Parameters:
length – total length of the waveguide including the tapers.
cross_section – for the waveguide.
via_stack – for the via_stacks. First element
via_stack_width – width of the via_stack.
via_stack_spacing – spacing between via_stacks.
via_stack_offset – with respect to the detector
taper – optional taper to transition from the input waveguide into the absorption region.
import gdsfactory as gf
c = gf.components.ge_detector_straight_si_contacts(length=80.0, via_stack_width=10.0, via_stack_spacing=5.0, via_stack_offset=0.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_array#
- gdsfactory.components.grating_coupler_array(grating_coupler: ComponentSpec = <function grating_coupler_elliptical>, pitch: float = 127.0, n: int = 6, port_name: str = 'o1', rotation: int = 0, with_loopback: bool = False, cross_section: str = 'xs_sc', bend: ComponentSpec = <function bend_euler>, grating_coupler_spacing: float = 0.0, **kwargs) Component [source]#
Array of grating couplers.
- Parameters:
grating_coupler – ComponentSpec.
pitch – x spacing.
n – number of grating couplers.
port_name – port name.
rotation – rotation angle for each reference.
with_loopback – if True, adds a loopback between edge GCs. Only works for rotation = 90 for now.
cross_section – cross_section for the routing.
bend – bend component.
grating_coupler_spacing – spacing between grating couplers.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.grating_coupler_array(pitch=127.0, n=6, port_name='o1', rotation=0, with_loopback=False, cross_section='xs_sc', grating_coupler_spacing=0.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_dual_pol#
- gdsfactory.components.grating_coupler_dual_pol(unit_cell: ComponentSpec = functools.partial(<function rectangle>, size=(0.3, 0.3), layer='SLAB150', centered=True, port_type=None), period_x: float = 0.58, period_y: float = 0.58, x_span: float = 11, y_span: float = 11, length_taper: float = 150.0, width_taper: float = 10.0, polarization: str = 'dual', wavelength: float = 1.55, taper: ComponentSpec = <function taper>, base_layer: LayerSpec | None = 'WG', cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
2 dimensional, dual polarization grating coupler.
Based on a photonic crystal with a unit cell that is usually an ellipse, a rectangle or a circle. The default values are loosely based on Taillaert et al, “A Compact Two-Dimensional Grating Coupler Used as a Polarization Splitter”, IEEE Phot. Techn. Lett. 15(9), 2003
- Parameters:
unit_cell – component describing the unit cell of the photonic crystal.
period_x – spacing between unit cells in the x direction [um].
period_y – spacing between unit cells in the y direction [um].
x_span – full x span of the photonic crystal.
y_span – full y span of the photonic crystal.
length_taper – taper length [um].
width_taper – width of the taper at the grating coupler side [um].
polarization – polarization of the grating coupler.
wavelength – operation wavelength [um]
taper – function to generate the tapers.
base_layer – layer to draw over the whole photonic crystal (necessary if the unit cells are etched into a base layer).
cross_section – for the routing waveguides.
kwargs – cross_section settings.
side view fiber / / / / / / / / _|-|_|-|_|-|___ --> unit_cells base_layer | o1 ______________| top view ------------- // | o o o | o1 __ // | o o o | \\ | o o o | \\ | o o o | ------------- \\ // \\ // | o2
import gdsfactory as gf
c = gf.components.grating_coupler_dual_pol(period_x=0.58, period_y=0.58, x_span=11, y_span=11, length_taper=150.0, width_taper=10.0, polarization='dual', wavelength=1.55, base_layer='WG', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_elliptical#
- gdsfactory.components.grating_coupler_elliptical(taper_length: float = 16.6, taper_angle: float = 40.0, wavelength: float = 1.554, fiber_angle: float = 15.0, grating_line_width: float = 0.343, neff: float = 2.638, nclad: float = 1.443, n_periods: int = 30, big_last_tooth: bool = False, layer_slab: LayerSpec | None = 'SLAB150', slab_xmin: float = -1.0, slab_offset: float = 2.0, spiked: bool = True, cross_section: CrossSectionSpec = 'xs_sc', polarization: str = 'te', **kwargs) Component [source]#
Grating coupler with parametrization based on Lumerical FDTD simulation.
- Parameters:
taper_length – taper length from input.
taper_angle – grating flare angle.
wavelength – grating transmission central wavelength (um).
fiber_angle – fibre angle in degrees determines ellipticity.
grating_line_width – in um.
neff – tooth effective index.
nclad – cladding effective index.
n_periods – number of periods.
big_last_tooth – adds a big_last_tooth.
layer_slab – layer that protects the slab under the grating.
slab_xmin – where 0 is at the start of the taper.
slab_offset – in um.
spiked – grating teeth have sharp spikes to avoid non-manhattan drc errors.
cross_section – specification (CrossSection, string or dict).
polarization – te or tm.
kwargs – cross_section settings.
fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________|
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical(taper_length=16.6, taper_angle=40.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.343, neff=2.638, nclad=1.443, n_periods=30, big_last_tooth=False, layer_slab='SLAB150', slab_xmin=-1.0, slab_offset=2.0, spiked=True, cross_section='xs_sc', polarization='te')
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_elliptical_arbitrary#
- gdsfactory.components.grating_coupler_elliptical_arbitrary(gaps: Floats = (0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1), widths: Floats = (0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), taper_length: float = 16.6, taper_angle: float = 60.0, wavelength: float = 1.554, fiber_angle: float = 15.0, nclad: float = 1.443, layer_slab: LayerSpec | None = 'SLAB150', layer_grating: LayerSpec | None = None, taper_to_slab_offset: float = -3.0, polarization: str = 'te', spiked: bool = True, bias_gap: float = 0, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Grating coupler with parametrization based on Lumerical FDTD simulation.
The ellipticity is derived from Lumerical knowledge base it depends on fiber_angle (degrees), neff, and nclad
- Parameters:
gaps – list of gaps.
widths – list of widths.
taper_length – taper length from input.
taper_angle – grating flare angle.
wavelength – grating transmission central wavelength (um).
fiber_angle – fibre angle in degrees determines ellipticity.
nclad – cladding effective index to compute ellipticity.
layer_slab – Optional slab.
layer_grating – Optional layer for grating. by default None uses cross_section.layer. if different from cross_section.layer expands taper.
taper_to_slab_offset – 0 is where taper ends.
polarization – te or tm.
spiked – grating teeth have spikes to avoid drc errors.
bias_gap – etch gap (um). Positive bias increases gap and reduces width to keep period constant.
cross_section – cross_section spec for waveguide port.
kwargs – cross_section settings.
https://en.wikipedia.org/wiki/Ellipse c = (a1 ** 2 - b1 ** 2) ** 0.5 e = (1 - (b1 / a1) ** 2) ** 0.5 print(e)
fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________|
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_arbitrary(gaps=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], widths=[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], taper_length=16.6, taper_angle=60.0, wavelength=1.554, fiber_angle=15.0, nclad=1.443, layer_slab='SLAB150', taper_to_slab_offset=-3.0, polarization='te', spiked=True, bias_gap=0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_elliptical_lumerical#
- gdsfactory.components.grating_coupler_elliptical_lumerical(parameters: Floats = (-2.4298362615732447, 0.1, 0.48007023217536954, 0.1, 0.607397685752365, 0.1, 0.4498844003086115, 0.1, 0.4274116312627637, 0.1, 0.4757904248387285, 0.1, 0.5026649898504233, 0.10002922416240886, 0.5100366774007897, 0.1, 0.494399635363353, 0.1079599958465788, 0.47400592737426483, 0.14972685326277918, 0.43272750134545823, 0.1839530796530385, 0.3872023336708212, 0.2360175325711591, 0.36032212454768675, 0.24261846353500535, 0.35770350120764394, 0.2606637836858316, 0.3526104381544335, 0.24668202254540886, 0.3717488388788273, 0.22920754299702897, 0.37769616507688464, 0.2246528336925301, 0.3765437598650894, 0.22041773376471022, 0.38047596041838994, 0.21923601658169187, 0.3798873698864591, 0.21700438236445285, 0.38291698672245644, 0.21827768053295463, 0.3641322152037017, 0.23729077006065105, 0.3676834419346081, 0.24865079519725933, 0.34415050295044936, 0.2733570818755685, 0.3306230780901629, 0.27350446437732157), layer: LayerSpec = 'WG', layer_slab: LayerSpec | None = 'SLAB150', taper_angle: float = 55, taper_length: float = 12.6, fiber_angle: float = 5, bias_gap: float = 0, **kwargs) Component [source]#
Returns a grating coupler from lumerical inverse design 3D optimization.
this is a wrapper of components.grating_coupler_elliptical_arbitrary https://support.lumerical.com/hc/en-us/articles/1500000306621 https://support.lumerical.com/hc/en-us/articles/360042800573
Here are the simulation settings used in lumerical
n_bg=1.44401 #Refractive index of the background material (cladding) wg=3.47668 # Refractive index of the waveguide material (core) lambda0=1550e-9 bandwidth = 0e-9 polarization = ‘TE’ wg_width=500e-9 # Waveguide width wg_height=220e-9 # Waveguide height etch_depth=80e-9 # etch depth theta_fib_mat = 5 # Angle of the fiber mode in material theta_taper=30 efficiency=0.55 # 5.2 dB
- Parameters:
parameters – xinput, gap1, width1, gap2, width2 …
layer – for waveguide.
layer_slab – for slab.
taper_angle – in deg.
taper_length – in um.
fiber_angle – used to compute ellipticity.
bias_gap – gap/trenches bias (um) to compensate for etching bias.
- Keyword Arguments:
taper_length – taper length from input in um.
taper_angle – grating flare angle in degrees.
wavelength – grating transmission central wavelength (um).
fiber_angle – fibre angle in degrees determines ellipticity.
neff – tooth effective index.
nclad – cladding effective index.
polarization – te or tm.
spiked – grating teeth include sharp spikes to avoid non-manhattan drc errors.
cross_section – cross_section spec for waveguide port.
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_lumerical(parameters=[-2.429836, 0.1, 0.48007, 0.1, 0.607398, 0.1, 0.449884, 0.1, 0.427412, 0.1, 0.47579, 0.1, 0.502665, 0.100029, 0.510037, 0.1, 0.4944, 0.10796, 0.474006, 0.149727, 0.432728, 0.183953, 0.387202, 0.236018, 0.360322, 0.242618, 0.357704, 0.260664, 0.35261, 0.246682, 0.371749, 0.229208, 0.377696, 0.224653, 0.376544, 0.220418, 0.380476, 0.219236, 0.379887, 0.217004, 0.382917, 0.218278, 0.364132, 0.237291, 0.367683, 0.248651, 0.344151, 0.273357, 0.330623, 0.273504], layer='WG', layer_slab='SLAB150', taper_angle=55, taper_length=12.6, fiber_angle=5, bias_gap=0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_elliptical_trenches#
- gdsfactory.components.grating_coupler_elliptical_trenches(polarization: str = 'te', taper_length: float = 16.6, taper_angle: float = 30.0, trenches_extra_angle: float = 9.0, wavelength: float = 1.53, fiber_angle: float = 15.0, grating_line_width: float = 0.343, neff: float = 2.638, ncladding: float = 1.443, layer_trench: LayerSpec | None = 'SHALLOW_ETCH', p_start: int = 26, n_periods: int = 30, end_straight_length: float = 0.2, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns Grating coupler with defined trenches.
Some foundries define the grating coupler by a shallow etch step (trenches) Others define the slab that they keep (see grating_coupler_elliptical)
- Parameters:
polarization – ‘te’ or ‘tm’.
taper_length – taper length from straight I/O.
taper_angle – grating flare angle.
wavelength – grating transmission central wavelength.
fiber_angle – fibre polish angle in degrees.
grating_line_width – of the 220 ridge.
neff – tooth effective index.
ncladding – cladding index.
layer_trench – for the trench.
p_start – first tooth.
n_periods – number of grating teeth.
end_straight_length – at the end of straight.
cross_section – cross_section spec.
kwargs – cross_section settings.
fiber / / / / / / / / _|-|_|-|_|-|___ WG o1 ______________|
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_trenches(polarization='te', taper_length=16.6, taper_angle=30.0, trenches_extra_angle=9.0, wavelength=1.53, fiber_angle=15.0, grating_line_width=0.343, neff=2.638, ncladding=1.443, layer_trench='SHALLOW_ETCH', p_start=26, n_periods=30, end_straight_length=0.2, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_elliptical_uniform#
- gdsfactory.components.grating_coupler_elliptical_uniform(n_periods: int = 20, period: float = 0.75, fill_factor: float = 0.5, **kwargs) Component [source]#
Grating coupler with parametrization based on Lumerical FDTD simulation.
The ellipticity is derived from Lumerical knowledge base it depends on fiber_angle (degrees), neff, and nclad
- Parameters:
n_periods – number of grating periods.
period – grating pitch in um.
fill_factor – ratio of grating width vs gap.
- Keyword Arguments:
taper_length – taper length from input.
taper_angle – grating flare angle.
wavelength – grating transmission central wavelength (um).
fiber_angle – fibre angle in degrees determines ellipticity.
neff – tooth effective index to compute ellipticity.
nclad – cladding effective index to compute ellipticity.
layer_slab – Optional slab.
taper_to_slab_offset – where 0 is at the start of the taper.
polarization – te or tm.
spiked – grating teeth have spikes to avoid drc errors..
bias_gap – etch gap (um). Positive bias increases gap and reduces width to keep period constant.
cross_section – cross_section spec for waveguide port.
kwargs – cross_section settings.
fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________|
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_uniform(n_periods=20, period=0.75, fill_factor=0.5)
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_loss_fiber_array#
- gdsfactory.components.grating_coupler_loss_fiber_array(pitch: float = 127.0, grating_coupler: ComponentSpec = functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), port_name: str = 'o1', cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns Grating coupler fiber array loopback.
- Parameters:
pitch – spacing.
grating_coupler – spec for grating coupler.
port_name – for the grating_coupler port.
cross_section – spec.
- Keyword Arguments:
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.grating_coupler_loss_fiber_array(pitch=127.0, port_name='o1', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_loss_fiber_array4#
- gdsfactory.components.grating_coupler_loss_fiber_array4(pitch: float = 127.0, grating_coupler: ComponentSpec = functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), **kwargs) Component [source]#
Returns a grating coupler test structure for fiber array.
Measures all combinations for a 4 fiber fiber_array
Connects channel 1->3, 2->4 Connects channel 1->4, 2->3 Connects channel 1->2, 3->4
- Parameters:
pitch – grating_coupler_pitch.
grating_coupler – function.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.grating_coupler_loss_fiber_array4(pitch=127.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_loss_fiber_single#
- gdsfactory.components.grating_coupler_loss_fiber_single(grating_coupler: ComponentSpec = functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns grating coupler test structure.
for testing with single fiber input/output
- Parameters:
grating_coupler – function.
cross_section – spec.
- Keyword Arguments:
layer_label – for test and measurement label.
min_input_to_output_spacing – spacing from input to output fiber.
max_y0_optical – None.
get_input_labels_function – function to get input labels for grating couplers.
optical_routing_type – None: autoselection, 0: no extension.
get_input_label_text_function – for the grating couplers input label.
get_input_label_text_loopback_function – for the loopbacks input label.
import gdsfactory as gf
c = gf.components.grating_coupler_loss_fiber_single(cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_rectangular#
- gdsfactory.components.grating_coupler_rectangular(n_periods: int = 20, period: float = 0.75, fill_factor: float = 0.5, width_grating: float = 11.0, length_taper: float = 150.0, polarization: str = 'te', wavelength: float = 1.55, taper: ComponentSpec = <function taper>, layer_slab: LayerSpec | None = None, layer_grating: LayerSpec | None = None, fiber_angle: float | None = None, slab_xmin: float = -1.0, slab_offset: float = 1.0, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Grating coupler with rectangular shapes (not elliptical).
Needs longer taper than elliptical. Grating teeth are straight. For a focusing grating take a look at grating_coupler_elliptical.
- Parameters:
n_periods – number of grating teeth.
period – grating pitch.
fill_factor – ratio of grating width vs gap.
width_grating –
length_taper –
polarization – ‘te’ or ‘tm’.
wavelength – in um.
taper – function.
layer_slab – layer that protects the slab under the grating.
layer_grating – optional layer for the grating. Defaults to the cross_section main layer.
fiber_angle – in degrees.
slab_xmin – where 0 is at the start of the taper.
slab_offset – from edge of grating to edge of the slab.
cross_section – for input waveguide port.
kwargs – cross_section settings.
side view fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________| top view _________ /| | | | | / | | | | | /taper_angle /_ _| | | | | wg_width | | | | | | \ | | | | | \ | | | | | \ | | | | | \|_|_|_|_| <--> taper_length
import gdsfactory as gf
c = gf.components.grating_coupler_rectangular(n_periods=20, period=0.75, fill_factor=0.5, width_grating=11.0, length_taper=150.0, polarization='te', wavelength=1.55, slab_xmin=-1.0, slab_offset=1.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_rectangular_arbitrary#
- gdsfactory.components.grating_coupler_rectangular_arbitrary(gaps: Floats = (0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2), widths: Floats = (0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), width_grating: float = 11.0, length_taper: float = 150.0, polarization: str = 'te', wavelength: float = 1.55, taper: ComponentSpec | None = <function taper>, layer_grating: LayerSpec | None = None, layer_slab: LayerSpec | None = None, slab_xmin: float = -1.0, slab_offset: float = 1.0, fiber_angle: float | None = None, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Grating coupler uniform with rectangular shape (not elliptical). Therefore it needs a longer taper. Grating teeth are straight instead of elliptical.
- Parameters:
gaps – list of gaps between grating teeth.
widths – list of grating widths.
width_grating – grating teeth width.
length_taper – taper length (um).
polarization – ‘te’ or ‘tm’.
wavelength – in um.
taper – function.
layer_grating – Optional layer for grating. by default None uses cross_section.layer. if different from cross_section.layer expands taper.
layer_slab – layer that protects the slab under the grating.
slab_xmin – where 0 is at the start of the taper.
slab_offset – from edge of grating to edge of the slab.
fiber_angle – in degrees.
cross_section – for input waveguide port.
kwargs – cross_section settings.
fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________| top view _________ /| | | | | / | | | | | /taper_angle /_ _| | | | | wg_width | | | | | | \ | | | | | \ | | | | | \ | | | | | \|_|_|_|_| <--> taper_length
import gdsfactory as gf
c = gf.components.grating_coupler_rectangular_arbitrary(gaps=[0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2], widths=[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], width_grating=11.0, length_taper=150.0, polarization='te', wavelength=1.55, slab_xmin=-1.0, slab_offset=1.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_rectangular_arbitrary_slab#
- gdsfactory.components.grating_coupler_rectangular_arbitrary_slab(gaps: Floats = (0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2), widths: Floats = (0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), width_grating: float = 11.0, length_taper: float = 150.0, polarization: str = 'te', wavelength: float = 1.55, taper: ComponentSpec = functools.partial(<function taper_strip_to_ridge>, layer_slab='SLAB150'), layer_slab: LayerSpec | None = 'SLAB150', layer_grating: LayerSpec | None = None, slab_offset: float = 2.0, fiber_angle: float = 15, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Grating coupler uniform (grating with rectangular shape not elliptical). Therefore it needs a longer taper. Grating teeth are straight instead of elliptical.
- Parameters:
gaps – list of gaps.
widths – list of widths.
width_grating – um.
length_taper – um.
polarization – ‘te’ or ‘tm’.
wavelength – in um.
taper – function.
layer_slab – for pedestal.
layer_grating – optional layer for the grating. Defaults to the cross_section main layer.
slab_offset – from edge.
fiber_angle – in degrees.
cross_section – for input waveguide port.
kwargs – cross_section settings.
side view fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________| top view _________ /| | | | | / | | | | | /taper_angle /_ _| | | | | wg_width | | | | | | \ | | | | | \ | | | | | \ | | | | | \|_|_|_|_| <--> taper_length
import gdsfactory as gf
c = gf.components.grating_coupler_rectangular_arbitrary_slab(gaps=[0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2], widths=[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], width_grating=11.0, length_taper=150.0, polarization='te', wavelength=1.55, layer_slab='SLAB150', slab_offset=2.0, fiber_angle=15, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_coupler_tree#
- gdsfactory.components.grating_coupler_tree(n: int = 4, straight_spacing: float = 4.0, grating_coupler: ComponentSpec = <function grating_coupler_elliptical>, with_loopback: bool = False, bend: ComponentSpec = 'bend_euler', fanout_length: float = 0.0, layer_label: LayerSpec | None = None, **kwargs) Component [source]#
Array of straights connected with grating couplers.
useful to align the 4 corners of the chip
- Parameters:
n – number of gratings.
straight_spacing – in um.
grating_coupler – spec.
with_loopback – adds loopback.
bend – bend spec.
fanout_length – in um.
layer_label – for layer. Optional removes label.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.grating_coupler_tree(n=4, straight_spacing=4.0, with_loopback=False, bend='bend_euler', fanout_length=0.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
greek_cross#
- gdsfactory.components.greek_cross(length: float = 30, layers: list[tuple[int, int] | str] | tuple[tuple[int, int] | str, ...] | set[tuple[int, int] | str] = ('WG', 'N'), widths: tuple[float, ...] = (2.0, 3.0), offsets: tuple[float, ...] | None = None, via_stack: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | ~gdsfactory.component.Component | dict[str, ~typing.Any] = functools.partial(<function via_stack>, layers=('WG', 'NPP', 'M1'), vias=(None, None, functools.partial(<function via>, layer='VIAC')))) Component [source]#
Simple greek cross with via stacks at the endpoints.
Process control monitor for dopant sheet resistivity and linewidth variation.
- Parameters:
length – length of cross arms.
layers – list of layers.
widths – list of widths (same order as layers).
offsets – how much to extend each layer beyond the cross length negative shorter, positive longer.
via_stack – via component to attach to the cross.
via_stack <-------> _________ length ________ | |<-------------------->| 2x | | | ↓ |<-->| | |======== width =======| |_______|<--> | ↑ |<-->|________ offset offset
References:
Walton, Anthony J.. “MICROELECTRONIC TEST STRUCTURES.” (1999).
Versnel, Analysis of the Greek cross, a Van der Pauw structure with finite
contacts, Solid-State Electronics, Volume 22, Issue 11, 1979, Pages 911-914, ISSN 0038-1101, https://doi.org/10.1016/0038-1101(79)90061-3.
Enderling et al., “Sheet resistance measurement of non-standard cleanroom
materials using suspended Greek cross test structures,” IEEE Transactions on Semiconductor Manufacturing, vol. 19, no. 1, pp. 2-9, Feb. 2006, doi: 10.1109/TSM.2005.863248.
https://download.tek.com/document/S530_VanDerPauwSheetRstnce.pdf
import gdsfactory as gf
c = gf.components.greek_cross(length=30, layers=['WG', 'N'], widths=[2.0, 3.0])
c.plot()
(Source code
, png
, hires.png
, pdf
)
greek_cross_offset_pads#
- gdsfactory.components.greek_cross_offset_pads(cross_struct_length: float = 30.0, cross_struct_width: float = 1.0, cross_struct_layers: list[tuple[int, int] | str] | tuple[tuple[int, int] | str, ...] | set[tuple[int, int] | str] = ('WG',), cross_implant_length: float = 30.0, cross_implant_width: float = 2.0, cross_implant_layers: list[tuple[int, int] | str] | tuple[tuple[int, int] | str, ...] | set[tuple[int, int] | str] = ('N',), contact_layers: list[tuple[int, int] | str] | tuple[tuple[int, int] | str, ...] | set[tuple[int, int] | str] = ('WG', 'NPP'), contact_offset: float = 10, contact_buffer: float = 10, pad_width: float = 50) Component [source]#
Greek cross, with silicon islands on each side of the cross to place larger contacting regions.
- Parameters:
cross_struct_length – length of structural part of cross e.g. silicon core.
cross_struct_width – width of structural part of cross e.g. silicon core.
cross_struct_layers – layers to be considered “structural”.
cross_implant_length – length of implantation part of cross.
cross_implant_width – width of implantation part of cross.
cross_implant_layers – layers to be considered “implants”.
contact_layers – layers to include under and around the pad.
contact_offset – fudge factor to move pad relative to cross.
contact_buffer – amount of dopants around pad in contact.
pad_width – pad size.
pad_width <-------> _________ cross_implant_length, cross_struct_length | |<-------> 4x | | ↓ | |======== cross_implant_width, cross_struct_width |_______| ↑ <--------------> contact_offset (fudge)
References: - Walton, Anthony J.. “MICROELECTRONIC TEST STRUCTURES.” (1999). - W. Versnel, Analysis of the Greek cross, a Van der Pauw structure with finite
contacts, Solid-State Electronics, Volume 22, Issue 11, 1979, Pages 911-914, ISSN 0038-1101, https://doi.org/10.1016/0038-1101(79)90061-3.
Enderling et al., “Sheet resistance measurement of non-standard cleanroom
materials using suspended Greek cross test structures,” IEEE Transactions on Semiconductor Manufacturing, vol. 19, no. 1, pp. 2-9, Feb. 2006, doi: 10.1109/TSM.2005.863248.
import gdsfactory as gf
c = gf.components.greek_cross_offset_pads(cross_struct_length=30.0, cross_struct_width=1.0, cross_struct_layers=['WG'], cross_implant_length=30.0, cross_implant_width=2.0, cross_implant_layers=['N'], contact_layers=['WG', 'NPP'], contact_offset=10, contact_buffer=10, pad_width=50)
c.plot()
(Source code
, png
, hires.png
, pdf
)
greek_cross_with_pads#
- gdsfactory.components.greek_cross_with_pads(pad: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | ~gdsfactory.component.Component | dict[str, ~typing.Any] = <function pad>, pad_spacing: float = 150.0, greek_cross_component: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | ~gdsfactory.component.Component | dict[str, ~typing.Any] = <function greek_cross>, pad_via: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | ~gdsfactory.component.Component | dict[str, ~typing.Any] = functools.partial(<function via_stack>, layers=('M1', 'M2', 'MTOP'), vias=(functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2'), None)), xs_metal: ~collections.abc.Callable[[...], ~gdsfactory.cross_section.CrossSection] | ~gdsfactory.cross_section.CrossSection | dict[str, ~typing.Any] | str | ~gdsfactory.cross_section.Transition = functools.partial(<function cross_section>, layer='M1', width=10.0, port_names=('e1', 'e2'), port_types=('electrical', 'electrical'), radius=None)) Component [source]#
Greek cross under 4 DC pads, ready to test.
- Parameters:
pad – component to use for probe pads
pad_spacing – spacing between pads
greek_cross_component – component to use for greek cross
pad_via – via to add to the pad
xs_metal – cross-section for cross via to pad via wiring
import gdsfactory as gf
c = gf.components.greek_cross_with_pads(pad_spacing=150.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
hexagon#
- gdsfactory.components.hexagon(*, sides: int = 6, side_length: float = 10, layer: LayerSpec = 'WG', port_type: str | None = 'placement', snap_to_grid: bool = True) Component #
Returns a regular N-sided polygon, with ports on each edge.
- Parameters:
sides – number of sides for the polygon.
side_length – of the edges.
layer – Specific layer to put polygon geometry on.
port_type – optical, electrical.
snap_to_grid – snap ports to grid.
import gdsfactory as gf
c = gf.components.hexagon(sides=6, side_length=10, layer='WG', port_type='placement', snap_to_grid=True)
c.plot()
(Source code
, png
, hires.png
, pdf
)
hline#
- gdsfactory.components.hline(length: float = 10.0, width: float = 0.5, layer: LayerSpec = 'WG', port_type: str = 'optical') Component [source]#
Horizontal line straight, with ports on east and west sides.
import gdsfactory as gf
c = gf.components.hline(length=10.0, width=0.5, layer='WG', port_type='optical')
c.plot()
(Source code
, png
, hires.png
, pdf
)
interdigital_capacitor#
- gdsfactory.components.interdigital_capacitor(fingers: int = 4, finger_length: float | int = 20.0, finger_gap: float | int = 2.0, thickness: float | int = 5.0, layer: LayerSpec = 'WG') Component [source]#
Generates an interdigital capacitor with ports on both ends.
See for example Zhu et al., Accurate circuit model of interdigital capacitor and its application to design of new uasi-lumped miniaturized filters with suppression of harmonic resonance, doi: 10.1109/22.826833.
Note
finger_length=0
effectively provides a plate capacitor.- Parameters:
fingers – total fingers of the capacitor.
finger_length – length of the probing fingers.
finger_gap – length of gap between the fingers.
thickness – Thickness of fingers and section before the fingers.
layer – spec.
import gdsfactory as gf
c = gf.components.interdigital_capacitor(fingers=4, finger_length=20.0, finger_gap=2.0, thickness=5.0, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
interdigital_capacitor_enclosed#
- gdsfactory.components.interdigital_capacitor_enclosed(enclosure_box: Sequence[Sequence[float | int]] = [[-200, -200], [200, 200]], cpw_dimensions: tuple[float | int, float | int] = (10, 6), gap_to_ground: float | int = 5, gap_layer: LayerSpec = 'DEEPTRENCH', metal_layer: LayerSpec = 'WG', **kwargs) Component [source]#
Generates an interdigital capacitor surrounded by a ground plane and coplanar waveguides with ports on both ends. See for
interdigital_capacitor()
for details.Note
finger_length=0
effectively provides a plate capacitor.- Parameters:
enclosure_box – Bounding box dimensions for a ground metal enclosure.
cpw_dimensions – Dimensions for the trace width and gap width of connecting coplanar waveguides.
gap_to_ground – Size of gap from capacitor to ground metal.
gap_layer – layer for trenching.
metal_layer – layer for metalization.
- Keyword Arguments:
fingers – total fingers of the capacitor.
finger_length – length of the probing fingers.
finger_gap – length of gap between the fingers.
thickness – Thickness of fingers and section before the fingers.
import gdsfactory as gf
c = gf.components.interdigital_capacitor_enclosed(cpw_dimensions=[10, 6], gap_to_ground=5, gap_layer='DEEPTRENCH', metal_layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
litho_calipers#
- gdsfactory.components.litho_calipers(notch_size: tuple[float, float] = (2.0, 5.0), notch_spacing: float = 2.0, num_notches: int = 11, offset_per_notch: float = 0.1, row_spacing: float = 0.0, layer1: LayerSpec = 'WG', layer2: LayerSpec = 'SLAB150') Component [source]#
Vernier caliper structure to test lithography alignment.
Only the middle finger is aligned and the rest are offset.
based on phidl
- Parameters:
notch_size – [xwidth, yheight].
notch_spacing – in um.
num_notches – number of notches.
offset_per_notch – in um.
row_spacing – 0
layer1 – layer.
layer2 – layer.
import gdsfactory as gf
c = gf.components.litho_calipers(notch_size=[2.0, 5.0], notch_spacing=2.0, num_notches=11, offset_per_notch=0.1, row_spacing=0.0, layer1='WG', layer2='SLAB150')
c.plot()
(Source code
, png
, hires.png
, pdf
)
litho_ruler#
- gdsfactory.components.litho_ruler(height: float = 2, width: float = 0.5, spacing: float = 2.0, scale: tuple[float, ...] = (3, 1, 1, 1, 1, 2, 1, 1, 1, 1), num_marks: int = 21, layer: LayerSpec = 'WG') Component [source]#
Ruler structure for lithographic measurement.
Includes marks of varying scales to allow for easy reading by eye.
based on phidl.geometry
- Parameters:
height – Height of the ruling marks in um.
width – Width of the ruling marks in um.
spacing – Center-to-center spacing of the ruling marks in um.
scale – Height scale pattern of marks.
num_marks – Total number of marks to generate.
layer – Specific layer to put the ruler geometry on.
import gdsfactory as gf
c = gf.components.litho_ruler(height=2, width=0.5, spacing=2.0, scale=[3, 1, 1, 1, 1, 2, 1, 1, 1, 1], num_marks=21, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
litho_steps#
- gdsfactory.components.litho_steps(line_widths: tuple[float, ...] = (1.0, 2.0, 4.0, 8.0, 16.0), line_spacing: float = 10.0, height: float = 100.0, layer: LayerSpec = 'WG') Component [source]#
Positive + negative tone linewidth test.
used for lithography resolution test patterning based on phidl
- Parameters:
line_widths – in um.
line_spacing – in um.
height – in um.
layer – Specific layer to put the ruler geometry on.
import gdsfactory as gf
c = gf.components.litho_steps(line_widths=[1.0, 2.0, 4.0, 8.0, 16.0], line_spacing=10.0, height=100.0, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
logo#
- gdsfactory.components.logo(text: str = 'GDSFACTORY', layer: LayerSpec | None = None) Component [source]#
Returns GDSfactory logo.
- Parameters:
text – text to write.
layer – optional layer to use for the text.
import gdsfactory as gf
c = gf.components.logo(text='GDSFACTORY')
c.plot()
(Source code
, png
, hires.png
, pdf
)
loop_mirror#
- gdsfactory.components.loop_mirror(component: ComponentSpec = <function mmi1x2>, bend90: ComponentSpec = 'bend_euler') Component [source]#
Returns Sagnac loop_mirror.
- Parameters:
component – 1x2 splitter.
bend90 – 90 deg bend.
import gdsfactory as gf
c = gf.components.loop_mirror(bend90='bend_euler')
c.plot()
(Source code
, png
, hires.png
, pdf
)
loss_deembedding_ch12_34#
- gdsfactory.components.loss_deembedding_ch12_34(pitch: float = 127.0, grating_coupler: ComponentSpec = functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), port_name: str = 'o1', cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Grating coupler test structure for fiber array.
Connects channel 1->2, 3->4
- Parameters:
pitch – um.
grating_coupler – spec.
port_name – for the grating_coupler port.
cross_section – spec.
- Keyword Arguments:
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.loss_deembedding_ch12_34(pitch=127.0, port_name='o1', cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
loss_deembedding_ch13_24#
- gdsfactory.components.loss_deembedding_ch13_24(pitch: float = 127.0, grating_coupler: ComponentSpec = functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), cross_section: CrossSectionSpec = 'xs_sc', port_name: str = 'o1', **kwargs) Component [source]#
Grating coupler test structure for fiber array.
Connects channel 1->3, 2->4
- Parameters:
pitch – um.
grating_coupler – spec.
cross_section – spec.
port_name – for the grating_coupler port.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.loss_deembedding_ch13_24(pitch=127.0, cross_section='xs_sc', port_name='o1')
c.plot()
(Source code
, png
, hires.png
, pdf
)
loss_deembedding_ch14_23#
- gdsfactory.components.loss_deembedding_ch14_23(pitch: float = 127.0, grating_coupler: ComponentSpec = functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), cross_section: CrossSectionSpec = 'xs_sc', port_name: str = 'o1', **kwargs) Component [source]#
Grating coupler test structure for fiber array.
Connects channel 1->4, 2->3
- Parameters:
pitch – um.
grating_coupler – spec.
cross_section – spec.
port_name – for the grating_coupler port.
- Keyword Arguments:
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.loss_deembedding_ch14_23(pitch=127.0, cross_section='xs_sc', port_name='o1')
c.plot()
(Source code
, png
, hires.png
, pdf
)
mimcap#
- gdsfactory.components.mimcap(size: tuple[float, float] = (64, 64), width_contact: float = 2.5, gap_top_metal: float = 2, via_stack=functools.partial(<function via_stack>, layers=('M2', 'MTOP'), vias=(functools.partial(<function via>, layer='VIA2'), None)), layers_bot: list[tuple[int, int] | str] | tuple[tuple[int, int] | str, ...] | set[tuple[int, int] | str] = ('M2', ), offsets_bot: tuple[float, ...] = (0.5, )) Component [source]#
Returns high speed GSG pads for calibrating the RF probes.
By default contact is on the left
- Parameters:
size – for the mimcap. (right).
width_contact – width of the contact (left).
gap_top_metal – between left and right sides.
import gdsfactory as gf
c = gf.components.mimcap(size=[64, 64], width_contact=2.5, gap_top_metal=2, layers_bot=['M2'], offsets_bot=[0.5])
c.plot()
(Source code
, png
, hires.png
, pdf
)
mmi#
- gdsfactory.components.mmi(inputs: int = 1, outputs: int = 4, width: float | None = None, width_taper: float = 1.0, length_taper: float = 10.0, length_mmi: float = 5.5, width_mmi: float = 5, gap_input_tapers: float = 0.25, gap_output_tapers: float = 0.25, taper: ComponentFactory = <function taper>, cross_section: CrossSectionSpec = 'xs_sc', input_positions: list[float] | None = None, output_positions: list[float] | None = None) Component [source]#
mxn MultiMode Interferometer (MMI).
- Parameters:
inputs – number of inputs.
outputs – number of outputs.
width – input and output straight width. Defaults to cross_section.
width_taper – interface between input straights and mmi region.
length_taper – into the mmi region.
length_mmi – in x direction.
width_mmi – in y direction.
gap_input_tapers – gap between input tapers from edge to edge.
gap_output_tapers – gap between output tapers from edge to edge.
taper – taper function.
cross_section – specification (CrossSection, string or dict).
input_positions – optional positions of the inputs.
output_positions – optional positions of the outputs.
length_mmi <------> ________ | | __/ \__ o2 __ __ o3 \ /_ _ _ _ | | _ _ _ _| gap_output_tapers __/ \__ o1 __ __ o4 \ / |________| | | <-> length_taper
import gdsfactory as gf
c = gf.components.mmi(inputs=1, outputs=4, width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=5, gap_input_tapers=0.25, gap_output_tapers=0.25, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
mmi1x2#
- gdsfactory.components.mmi1x2(width: float | None = None, width_taper: float = 1.0, length_taper: float = 10.0, length_mmi: float = 5.5, width_mmi: float = 2.5, gap_mmi: float = 0.25, taper: ComponentFactory = <function taper>, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
1x2 MultiMode Interferometer (MMI).
- Parameters:
width – input and output straight width. Defaults to cross_section width.
width_taper – interface between input straights and mmi region.
length_taper – into the mmi region.
length_mmi – in x direction.
width_mmi – in y direction.
gap_mmi – gap between tapered wg.
taper – taper function.
cross_section – specification (CrossSection, string or dict).
length_mmi <------> ________ | | | \__ | __ o2 __/ /_ _ _ _ o1 __ | _ _ _ _| gap_mmi \ \__ | __ o3 | / |________| <-> length_taper
import gdsfactory as gf
c = gf.components.mmi1x2(width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
mmi1x2_with_sbend#
- gdsfactory.components.mmi1x2_with_sbend(with_sbend: bool = True, s_bend: ~collections.abc.Callable[[...], ~gdsfactory.component.Component] = <function bend_s>, cross_section: ~collections.abc.Callable[[...], ~gdsfactory.cross_section.CrossSection] | ~gdsfactory.cross_section.CrossSection | dict[str, ~typing.Any] | str | ~gdsfactory.cross_section.Transition = 'xs_sc') Component [source]#
Returns 1x2 splitter for Cband.
https://opg.optica.org/oe/fulltext.cfm?uri=oe-21-1-1310&id=248418
- Parameters:
with_sbend – add sbend.
s_bend – S-bend spec.
cross_section – spec.
import gdsfactory as gf
c = gf.components.mmi1x2_with_sbend(with_sbend=True, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
mmi2x2#
- gdsfactory.components.mmi2x2(width: float | None = None, width_taper: float = 1.0, length_taper: float = 10.0, length_mmi: float = 5.5, width_mmi: float = 2.5, gap_mmi: float = 0.25, taper: ComponentFactory = <function taper>, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Mmi 2x2.
- Parameters:
width – input and output straight width.
width_taper – interface between input straights and mmi region.
length_taper – into the mmi region.
length_mmi – in x direction.
width_mmi – in y direction.
gap_mmi – (width_taper + gap between tapered wg)/2.
taper – taper function.
straight – straight function.
with_bbox – add rectangular box in cross_section bbox_layers and bbox_offsets to avoid DRC sharp edges.
cross_section – spec.
length_mmi <------> ________ | | __/ \__ o2 __ __ o3 \ /_ _ _ _ | | _ _ _ _| gap_mmi __/ \__ o1 __ __ o4 \ / |________| <-> length_taper
import gdsfactory as gf
c = gf.components.mmi2x2(width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
mmi2x2_with_sbend#
- gdsfactory.components.mmi2x2_with_sbend(with_sbend: bool = True, s_bend: ~collections.abc.Callable[[...], ~gdsfactory.component.Component] = <function bend_s>, cross_section: ~collections.abc.Callable[[...], ~gdsfactory.cross_section.CrossSection] | ~gdsfactory.cross_section.CrossSection | dict[str, ~typing.Any] | str | ~gdsfactory.cross_section.Transition = 'xs_sc') Component [source]#
Returns mmi2x2 for Cband.
C_band 2x2MMI in 220nm thick silicon https://opg.optica.org/oe/fulltext.cfm?uri=oe-25-23-28957&id=376719
- Parameters:
with_sbend – add sbend.
s_bend – S-bend function.
cross_section – spec.
import gdsfactory as gf
c = gf.components.mmi2x2_with_sbend(with_sbend=True, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
mmi_90degree_hybrid#
- gdsfactory.components.mmi_90degree_hybrid(width: float = 0.5, width_taper: float = 1.7, length_taper: float = 40.0, length_mmi: float = 175.0, width_mmi: float = 10.0, gap_mmi: float = 0.8, taper: ComponentSpec = <function taper>, straight: ComponentFactory = <function straight>, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
90 degree hybrid based on a 4x4 MMI.
Default values from Watanabe et al., “Coherent few mode demultiplexer realized as a 2D grating coupler array in silicon”, Optics Express 28(24), 2020
It could be interesting to consider the design in Guan et al., “Compact and low loss 90° optical hybrid on a silicon-on-insulator platform”, Optics Express 25(23), 2017
- Parameters:
width – input and output straight width.
width_taper – interface between input straights and mmi region.
length_taper – into the mmi region.
length_mmi – in x direction.
width_mmi – in y direction.
gap_mmi – (width_taper + gap between tapered wg)/2.
taper – taper function.
straight – straight function.
with_bbox – box in bbox_layers and bbox_offsets avoid DRC sharp edges.
cross_section – spec.
length_mmi <------> ________ | | __/ \__ signal_in __ __ I_out1 \ /_ _ _ _ | | _ _ _ _| gap_mmi | \__ | __ Q_out1 | / | | | __/ \__ LO_in __ __ Q_out2 \ /_ _ _ _ | | _ _ _ _| gap_mmi | \__ | __ I_out2 | / | ________| <-> length_taper
import gdsfactory as gf
c = gf.components.mmi_90degree_hybrid(width=0.5, width_taper=1.7, length_taper=40.0, length_mmi=175.0, width_mmi=10.0, gap_mmi=0.8, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
mode_converter#
- gdsfactory.components.mode_converter(gap: float = 0.3, length: float = 10, coupler_straight_asymmetric: ComponentSpec = <function coupler_straight_asymmetric>, bend: ComponentSpec = functools.partial(<function bend_euler_s>, angle=45), taper: ComponentSpec = <function taper>, mm_width: float = 1.2, mc_mm_width: float = 1, sm_width: float = 0.5, taper_length: float = 25, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns Mode converter from TE0 to TE1.
By matching the effective indices of two waveguides with different widths, light can couple from different transverse modes e.g. TE0 <-> TE1. https://doi.org/10.1109/JPHOT.2019.2941742
- Parameters:
gap – directional coupler gap.
length – coupler length interaction.
coupler_straight_asymmetric – spec.
mm_width – input/output multimode waveguide width.
mc_mm_width – mode converter multimode waveguide width
sm_width – single mode waveguide width.
cross_section – cross_section spec.
kwargs – cross_section settings.
o2 --- --- o4 \ / \ / ------- o1 -----=======----- o3 |-----| length = : multimode width - : singlemode width
import gdsfactory as gf
c = gf.components.mode_converter(gap=0.3, length=10, mm_width=1.2, mc_mm_width=1, sm_width=0.5, taper_length=25, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzi#
- gdsfactory.components.mzi(delta_length: float = 10.0, length_y: float = 2.0, length_x: float | None = 0.1, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = None, straight_x_bot: ComponentSpec | None = None, extend_ports_straight_x: float | None = None, splitter: ComponentSpec = 'mmi1x2', combiner: ComponentSpec | None = None, with_splitter: bool = True, port_e1_splitter: str = 'o2', port_e0_splitter: str = 'o3', port_e1_combiner: str = 'o2', port_e0_combiner: str = 'o3', nbends: int = 2, cross_section: CrossSectionSpec = 'xs_sc', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, add_electrical_ports_bot: bool = True, min_length: float = 0.01) Component [source]#
Mzi.
- Parameters:
delta_length – bottom arm vertical extra length.
length_y – vertical length for both and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
extend_ports_straight_x – optional extend ports for straight_x_bot/top.
splitter – splitter function.
combiner – combiner function.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
cross_section_x_top – optional top cross_section (defaults to cross_section).
cross_section_x_bot – optional bottom cross_section (defaults to cross_section).
mirror_bot – if true, mirrors the bottom arm.
add_optical_ports_arms – add all other optical ports in the arms with top_ and bot_ prefix.
add_electrical_ports_bot – add electrical ports to the bottom arm.
min_length – minimum length for the straight_x_bot/top.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi(delta_length=10.0, length_y=2.0, length_x=0.1, splitter='mmi1x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o2', port_e0_combiner='o3', nbends=2, cross_section='xs_sc', mirror_bot=False, add_optical_ports_arms=False, add_electrical_ports_bot=True, min_length=0.01)
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzi1x2_2x2#
- gdsfactory.components.mzi1x2_2x2(delta_length: float = 10.0, length_y: float = 2.0, length_x: float | None = 0.1, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = None, straight_x_bot: ComponentSpec | None = None, extend_ports_straight_x: float | None = None, splitter: ComponentSpec = 'mmi1x2', *, combiner: ComponentSpec | None = <function mmi2x2>, with_splitter: bool = True, port_e1_splitter: str = 'o2', port_e0_splitter: str = 'o3', port_e1_combiner: str = 'o3', port_e0_combiner: str = 'o4', nbends: int = 2, cross_section: CrossSectionSpec = 'xs_sc', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, add_electrical_ports_bot: bool = True, min_length: float = 0.01) Component #
Mzi.
- Parameters:
delta_length – bottom arm vertical extra length.
length_y – vertical length for both and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
extend_ports_straight_x – optional extend ports for straight_x_bot/top.
splitter – splitter function.
combiner – combiner function.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
cross_section_x_top – optional top cross_section (defaults to cross_section).
cross_section_x_bot – optional bottom cross_section (defaults to cross_section).
mirror_bot – if true, mirrors the bottom arm.
add_optical_ports_arms – add all other optical ports in the arms with top_ and bot_ prefix.
add_electrical_ports_bot – add electrical ports to the bottom arm.
min_length – minimum length for the straight_x_bot/top.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi1x2_2x2(delta_length=10.0, length_y=2.0, length_x=0.1, splitter='mmi1x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o3', port_e0_combiner='o4', nbends=2, cross_section='xs_sc', mirror_bot=False, add_optical_ports_arms=False, add_electrical_ports_bot=True, min_length=0.01)
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzi2x2_2x2_phase_shifter#
- gdsfactory.components.mzi2x2_2x2_phase_shifter(delta_length: float = 10.0, length_y: float = 2.0, *, length_x: float | None = 200, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = 'straight_heater_metal', straight_x_bot: ComponentSpec | None = None, extend_ports_straight_x: float | None = None, splitter: ComponentSpec = <function mmi2x2>, combiner: ComponentSpec | None = <function mmi2x2>, with_splitter: bool = True, port_e1_splitter: str = 'o3', port_e0_splitter: str = 'o4', port_e1_combiner: str = 'o3', port_e0_combiner: str = 'o4', nbends: int = 2, cross_section: CrossSectionSpec = 'xs_sc', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, add_electrical_ports_bot: bool = True, min_length: float = 0.01) Component #
Mzi.
- Parameters:
delta_length – bottom arm vertical extra length.
length_y – vertical length for both and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
extend_ports_straight_x – optional extend ports for straight_x_bot/top.
splitter – splitter function.
combiner – combiner function.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
cross_section_x_top – optional top cross_section (defaults to cross_section).
cross_section_x_bot – optional bottom cross_section (defaults to cross_section).
mirror_bot – if true, mirrors the bottom arm.
add_optical_ports_arms – add all other optical ports in the arms with top_ and bot_ prefix.
add_electrical_ports_bot – add electrical ports to the bottom arm.
min_length – minimum length for the straight_x_bot/top.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi2x2_2x2_phase_shifter(delta_length=10.0, length_y=2.0, length_x=200, straight_x_top='straight_heater_metal', with_splitter=True, port_e1_splitter='o3', port_e0_splitter='o4', port_e1_combiner='o3', port_e0_combiner='o4', nbends=2, cross_section='xs_sc', mirror_bot=False, add_optical_ports_arms=False, add_electrical_ports_bot=True, min_length=0.01)
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzi_arm#
- gdsfactory.components.mzi_arm(length_y_left: float = 0.8, length_y_right: float = 0.8, length_x: float = 0.1, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, straight_x: ComponentSpec | None = None, straight_y: ComponentSpec | None = None, **kwargs) Component [source]#
Mzi.
- Parameters:
length_y_left – vertical length.
length_y_right – vertical length.
length_x – horizontal length.
bend – 90 degrees bend library.
straight – straight function.
straight_x – straight for length_x.
straight_y – straight for length_y.
kwargs – cross_section settings.
B__Lx__B | | Ly Lyr | | B B
import gdsfactory as gf
c = gf.components.mzi_arm(length_y_left=0.8, length_y_right=0.8, length_x=0.1)
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzi_lattice#
- gdsfactory.components.mzi_lattice(coupler_lengths: tuple[float, ...] = (10.0, 20.0), coupler_gaps: tuple[float, ...] = (0.2, 0.3), delta_lengths: tuple[float, ...] = (10.0, ), mzi: ComponentSpec = functools.partial(<function mzi>, splitter=<function coupler>, combiner=<function coupler>, port_e1_splitter='o3', port_e0_splitter='o4', port_e1_combiner='o3', port_e0_combiner='o4'), splitter: ComponentSpec = <function coupler>, **kwargs) Component [source]#
Mzi lattice filter.
- Parameters:
coupler_lengths – list of length for each coupler.
coupler_gaps – list of coupler gaps.
delta_lengths – list of length differences.
mzi – function for the mzi.
splitter – splitter function.
- Keyword Arguments:
length_y – vertical length for both and top arms.
length_x – horizontal length.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
cross_section – for routing (sxtop/sxbot to combiner).
______ ______ | | | | | | | | cp1==| |===cp2=====| |=== .... ===cp_last=== | | | | | | | | DL1 | DL2 | | | | | |______| | | |______|
import gdsfactory as gf
c = gf.components.mzi_lattice(coupler_lengths=[10.0, 20.0], coupler_gaps=[0.2, 0.3], delta_lengths=[10.0])
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzi_lattice_mmi#
- gdsfactory.components.mzi_lattice_mmi(coupler_widths=(None, None), coupler_widths_tapers: tuple[float, ...] = (1.0, 1.0), coupler_lengths_tapers: tuple[float, ...] = (10.0, 10.0), coupler_lengths_mmis: tuple[float, ...] = (5.5, 5.5), coupler_widths_mmis: tuple[float, ...] = (2.5, 2.5), coupler_gaps_mmis: tuple[float, ...] = (0.25, 0.25), taper_functions_mmis=(<function taper>, <function taper>), cross_sections_mmis=('xs_sc', 'xs_sc'), delta_lengths: tuple[float, ...] = (10.0, ), mzi=functools.partial(<function mzi>, splitter=<function mmi2x2>, combiner=<function mmi2x2>, port_e1_splitter='o3', port_e0_splitter='o4', port_e1_combiner='o3', port_e0_combiner='o4'), splitter=<function mmi2x2>, **kwargs) Component [source]#
Mzi lattice filter, with MMI couplers.
- Parameters:
coupler_widths – (for each MMI coupler, list of) input and output straight width.
coupler_widths_tapers – (for each MMI coupler, list of) interface between input straights and mmi region.
coupler_lengths_tapers – (for each MMI coupler, list of) into the mmi region.
coupler_lengths_mmis – (for each MMI coupler, list of) in x direction.
coupler_widths_mmis – (for each MMI coupler, list of) in y direction.
coupler_gaps_mmis – (for each MMI coupler, list of) (width_taper + gap between tapered wg)/2.
taper_functions_mmis – (for each MMI coupler, list of) taper function.
cross_sections_mmis – (for each MMI coupler, list of) spec.
delta_lengths – list of length differences.
mzi – function for the mzi.
splitter – splitter function.
- Keyword Arguments:
length_y – vertical length for both and top arms.
length_x – horizontal length.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
cross_section – for routing (sxtop/sxbot to combiner).
______ ______ | | | | | | | | cp1==| |===cp2=====| |=== .... ===cp_last=== | | | | | | | | DL1 | DL2 | | | | | |______| | | |______|
import gdsfactory as gf
c = gf.components.mzi_lattice_mmi(coupler_widths=[None, None], coupler_widths_tapers=[1.0, 1.0], coupler_lengths_tapers=[10.0, 10.0], coupler_lengths_mmis=[5.5, 5.5], coupler_widths_mmis=[2.5, 2.5], coupler_gaps_mmis=[0.25, 0.25], taper_functions_mmis=[{'function': 'taper'}, {'function': 'taper'}], cross_sections_mmis=['xs_sc', 'xs_sc'], delta_lengths=[10.0])
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzi_pads_center#
- gdsfactory.components.mzi_pads_center(ps_top: ComponentSpec = functools.partial(<function straight_heater_metal_undercut>, with_undercut=False, length_straight_input=0.1, length_undercut=5, length_undercut_spacing=0), ps_bot: ComponentSpec = functools.partial(<function straight_heater_metal_undercut>, with_undercut=False, length_straight_input=0.1, length_undercut=5, length_undercut_spacing=0), mzi: ComponentSpec = <function mzi>, pad: ComponentSpec = functools.partial(<function pad>, size=(80, 80)), length_x: float = 500, length_y: float = 40, mzi_sig_top: str = 'top_r_e2', mzi_gnd_top: str = 'top_l_e2', mzi_sig_bot: str = 'bot_l_e2', mzi_gnd_bot: str = 'bot_r_e2', pad_sig_bot: str = 'e1_1_1', pad_sig_top: str = 'e3_1_3', pad_gnd_bot: str = 'e4_1_2', pad_gnd_top: str = 'e2_1_2', delta_length: float = 40.0, cross_section: CrossSectionSpec = 'xs_sc', cross_section_metal: CrossSectionSpec = 'xs_metal_routing', pad_spacing: float | str = 'pad_spacing', min_straight_length: float = 5.0, **kwargs) Component [source]#
Return Mzi phase shifter with pads in the middle.
GND is the middle pad and is shared between top and bottom phase shifters.
- Parameters:
ps_top – phase shifter top.
ps_bot – phase shifter bottom.
mzi – interferometer.
pad – pad function.
length_x – horizontal length.
length_y – vertical length.
mzi_sig_top – port name for top phase shifter signal.
mzi_gnd_top – port name for top phase shifter GND.
mzi_sig_bot – port name for top phase shifter signal.
mzi_gnd_bot – port name for top phase shifter GND.
pad_sig_bot – port name for top pad.
pad_sig_top – port name for top pad.
pad_gnd_bot – port name for top pad.
pad_gnd_top – port name for top pad.
delta_length – mzi length imbalance.
cross_section – for the mzi.
cross_section_metal – for routing metal.
pad_spacing – pad pitch in um.
kwargs – routing settings.
import gdsfactory as gf
c = gf.components.mzi_pads_center(length_x=500, length_y=40, mzi_sig_top='top_r_e2', mzi_gnd_top='top_l_e2', mzi_sig_bot='bot_l_e2', mzi_gnd_bot='bot_r_e2', pad_sig_bot='e1_1_1', pad_sig_top='e3_1_3', pad_gnd_bot='e4_1_2', pad_gnd_top='e2_1_2', delta_length=40.0, cross_section='xs_sc', cross_section_metal='xs_metal_routing', pad_spacing='pad_spacing', min_straight_length=5.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzi_phase_shifter#
- gdsfactory.components.mzi_phase_shifter(delta_length: float = 10.0, length_y: float = 2.0, *, length_x: float | None = 200, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = 'straight_heater_metal', straight_x_bot: ComponentSpec | None = None, extend_ports_straight_x: float | None = None, splitter: ComponentSpec = 'mmi1x2', combiner: ComponentSpec | None = None, with_splitter: bool = True, port_e1_splitter: str = 'o2', port_e0_splitter: str = 'o3', port_e1_combiner: str = 'o2', port_e0_combiner: str = 'o3', nbends: int = 2, cross_section: CrossSectionSpec = 'xs_sc', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, add_electrical_ports_bot: bool = True, min_length: float = 0.01) Component #
Mzi.
- Parameters:
delta_length – bottom arm vertical extra length.
length_y – vertical length for both and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
extend_ports_straight_x – optional extend ports for straight_x_bot/top.
splitter – splitter function.
combiner – combiner function.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
cross_section_x_top – optional top cross_section (defaults to cross_section).
cross_section_x_bot – optional bottom cross_section (defaults to cross_section).
mirror_bot – if true, mirrors the bottom arm.
add_optical_ports_arms – add all other optical ports in the arms with top_ and bot_ prefix.
add_electrical_ports_bot – add electrical ports to the bottom arm.
min_length – minimum length for the straight_x_bot/top.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi_phase_shifter(delta_length=10.0, length_y=2.0, length_x=200, straight_x_top='straight_heater_metal', splitter='mmi1x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o2', port_e0_combiner='o3', nbends=2, cross_section='xs_sc', mirror_bot=False, add_optical_ports_arms=False, add_electrical_ports_bot=True, min_length=0.01)
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzit#
- gdsfactory.components.mzit(w0: float = 0.5, w1: float = 0.45, w2: float = 0.55, dy: float = 2.0, delta_length: float = 10.0, length: float = 1.0, coupler_length1: float = 5.0, coupler_length2: float = 10.0, coupler_gap1: float = 0.2, coupler_gap2: float = 0.3, taper: ComponentFactory = <function taper>, taper_length: float = 5.0, bend90: ComponentFactory = <function bend_euler>, straight: ComponentFactory = <function straight>, coupler1: ComponentFactory | None = <function coupler>, coupler2: ComponentFactory = <function coupler>, cross_section: str = 'xs_sc') Component [source]#
Mzi tolerant to fabrication variations.
based on Yufei Xing thesis http://photonics.intec.ugent.be/publications/PhD.asp?ID=250
- Parameters:
w1 – narrow waveguide width (um).
w2 – wide waveguide width (um).
dy – port to port vertical spacing.
delta_length – length difference between arms (um).
length – shared length for w1 and w2.
coupler_length1 – length of coupler1.
coupler_length2 – length of coupler2.
coupler_gap1 – coupler1.
coupler_gap2 – coupler2.
taper – taper spec.
taper_length – from w0 to w1.
bend90 – bend spec.
straight – spec.
coupler1 – coupler1 spec (optional).
coupler2 – coupler2 spec.
cp1 4 2 __ __ 3___w0_t2 _w2___ \ / \ \ length1 / | ============== gap1 | / \ | __/ \_____w0___t1 _w1 | 3 1 4 \ | | | 2 2 | | __ __w0____t1____w1___/ | \ / | \ length2 / | ============== gap2 | / \ | | __/ \ E0_w0__t2 __w1______/ 1 1 cp2
import gdsfactory as gf
c = gf.components.mzit(w0=0.5, w1=0.45, w2=0.55, dy=2.0, delta_length=10.0, length=1.0, coupler_length1=5.0, coupler_length2=10.0, coupler_gap1=0.2, coupler_gap2=0.3, taper_length=5.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzit_lattice#
- gdsfactory.components.mzit_lattice(coupler_lengths: tuple[float, ...] = (10.0, 20.0), coupler_gaps: tuple[float, ...] = (0.2, 0.3), delta_lengths: tuple[float, ...] = (10.0, ), mzi: ComponentSpec = <function mzit>) Component [source]#
Mzi fab tolerant lattice filter.
cp1 o4 o2 __ __ o3___w0_t2 _w2___ \ / \ \ length1 / | ============== gap1 | / \ | __/ \_____w0___t1 _w1 | o3 o1 o4 \ | . ... | | . o2 o2 o3 | | . __ _____w0___t1___w1__/ | \ / | \ lengthN / | ============== gapN | / \ | __/ \_ | o1 o1 \___w0___t2___w1_____/ cpN o4
import gdsfactory as gf
c = gf.components.mzit_lattice(coupler_lengths=[10.0, 20.0], coupler_gaps=[0.2, 0.3], delta_lengths=[10.0])
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzm#
- gdsfactory.components.mzm(phase_shifter: ComponentSpec = <function straight_pin>, length_x: float = 500, length_y: float = 2.0, delta_length: float = 0.0, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, splitter: ComponentSpec = 'mmi1x2', combiner: ComponentSpec | None = 'mmi1x2', with_splitter: bool = True, port_e1_splitter: str = 'o2', port_e0_splitter: str = 'o3', port_e1_combiner: str = 'o2', port_e0_combiner: str = 'o3', nbends: int = 2, cross_section: CrossSectionSpec = 'xs_sc', mirror_bot: bool = False, min_length: float = 0.01) Component [source]#
Mzm modulator.
- Parameters:
phase_shifter – for bottom and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
length_y – vertical length for both and top arms.
delta_length – bottom arm vertical extra length.
bend – 90 degrees bend spec.
straight – straight function for vertical.
splitter – splitter function.
combiner – combiner function. Optional adds ports.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
mirror_bot – mirrors bottom arm.
min_length – minimum length for straight_x_bot/top.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzm(length_x=500, length_y=2.0, delta_length=0.0, splitter='mmi1x2', combiner='mmi1x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o2', port_e0_combiner='o3', nbends=2, cross_section='xs_sc', mirror_bot=False, min_length=0.01)
c.plot()
(Source code
, png
, hires.png
, pdf
)
nxn#
- gdsfactory.components.nxn(west: int = 1, east: int = 4, north: int = 0, south: int = 0, xsize: float | None = None, ysize: float | None = None, wg_width: float = 0.5, layer: LayerSpec = 'WG', wg_margin: float = 1.0, **kwargs) Component [source]#
Returns a nxn component with nxn ports (west, east, north, south).
- Parameters:
west – number of west ports.
east – number of east ports.
north – number of north ports.
south – number of south ports.
xsize – size in X.
ysize – size in Y.
wg_width – width of the straight ports.
wg_margin – margin from straight to component edge.
kwargs – port_settings.
3 4 |___|_ 2 -| |- 5 | | 1 -|______|- 6 | | 8 7
import gdsfactory as gf
c = gf.components.nxn(west=1, east=4, north=0, south=0, wg_width=0.5, layer='WG', wg_margin=1.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
octagon#
- gdsfactory.components.octagon(*, sides: int = 8, side_length: float = 10, layer: LayerSpec = 'WG', port_type: str | None = 'placement', snap_to_grid: bool = True) Component #
Returns a regular N-sided polygon, with ports on each edge.
- Parameters:
sides – number of sides for the polygon.
side_length – of the edges.
layer – Specific layer to put polygon geometry on.
port_type – optical, electrical.
snap_to_grid – snap ports to grid.
import gdsfactory as gf
c = gf.components.octagon(sides=8, side_length=10, layer='WG', port_type='placement', snap_to_grid=True)
c.plot()
(Source code
, png
, hires.png
, pdf
)
optimal_90deg#
- gdsfactory.components.optimal_90deg(width: float = 100, num_pts: int = 15, length_adjust: float = 1, layer: LayerSpec = (1, 0)) Component [source]#
Returns optimally-rounded 90 degree bend that is sharp on the outer corner.
- Parameters:
width – Width of the ports on either side of the bend.
num_pts – The number of points comprising the curved section of the bend.
length_adjust – Adjusts the length of the non-curved portion of the bend.
layer – Specific layer(s) to put polygon geometry on.
Notes
Optimal structure from https://doi.org/10.1103/PhysRevB.84.174510 Clem, J., & Berggren, K. (2011). Geometry-dependent critical currents in superconducting nanocircuits. Physical Review B, 84(17), 1–27.
import gdsfactory as gf
c = gf.components.optimal_90deg(width=100, num_pts=15, length_adjust=1, layer=[1, 0])
c.plot()
(Source code
, png
, hires.png
, pdf
)
optimal_hairpin#
- gdsfactory.components.optimal_hairpin(width: float = 0.2, pitch: float = 0.6, length: float = 10, turn_ratio: float = 4, num_pts: int = 50, layer: LayerSpec = (1, 0)) Component [source]#
Returns an optimally-rounded hairpin geometry, with a 180 degree turn on the right end of the polygon connected to two prongs extending towards ports on the left end.
based on phidl.geometry
- Parameters:
width – Width of the hairpin leads.
pitch – Distance between the two hairpin leads. Must be greater than width.
length – Length of the hairpin from the connectors to the opposite end of the curve.
turn_ratio – int or float Specifies how much of the hairpin is dedicated to the 180 degree turn. A turn_ratio of 10 will result in 20% of the hairpin being comprised of the turn.
num_pts – Number of points constituting the 180 degree turn.
layer – Specific layer(s) to put polygon geometry on.
Notes
Hairpin pitch must be greater than width.
Optimal structure from https://doi.org/10.1103/PhysRevB.84.174510 Clem, J., & Berggren, K. (2011). Geometry-dependent critical currents in superconducting nanocircuits. Physical Review B, 84(17), 1–27.
import gdsfactory as gf
c = gf.components.optimal_hairpin(width=0.2, pitch=0.6, length=10, turn_ratio=4, num_pts=50, layer=[1, 0])
c.plot()
(Source code
, png
, hires.png
, pdf
)
optimal_step#
- gdsfactory.components.optimal_step(start_width: float = 10, end_width: float = 22, num_pts: int = 50, width_tol: float = 0.001, anticrowding_factor: float = 1.2, symmetric: bool = False, layer: LayerSpec = (1, 0)) Component [source]#
Returns an optimally-rounded step geometry.
- Parameters:
start_width – Width of the connector on the left end of the step.
end_width – Width of the connector on the right end of the step.
num_pts – number of points comprising the entire step geometry.
width_tol – Point at which to terminate the calculation of the optimal step
anticrowding_factor – Factor to reduce current crowding by elongating the structure and reducing the curvature
symmetric – If True, adds a mirrored copy of the step across the x-axis to the geometry and adjusts the width of the ports.
layer – layer spec to put polygon geometry on.
based on phidl.geometry
Notes
Optimal structure from https://doi.org/10.1103/PhysRevB.84.174510 Clem, J., & Berggren, K. (2011). Geometry-dependent critical currents in superconducting nanocircuits. Physical Review B, 84(17), 1–27.
import gdsfactory as gf
c = gf.components.optimal_step(start_width=10, end_width=22, num_pts=50, width_tol=0.001, anticrowding_factor=1.2, symmetric=False, layer=[1, 0])
c.plot()
(Source code
, png
, hires.png
, pdf
)
pack_doe#
- gdsfactory.components.pack_doe(doe: ComponentSpec = 'mmi1x2', settings: dict[str, list[Any]] = {'length_mmi': [2.5, 100], 'width_mmi': [4, 10]}, do_permutations: bool = False, function: str | Callable[[...], Component] | dict[str, Any] | None = None, **kwargs) Component [source]#
Packs a component DOE (Design of Experiment) using pack.
- Parameters:
doe – function to return Components.
settings – component settings.
do_permutations – for each setting.
function – to apply (add padding, grating couplers).
- Keyword Arguments:
spacing – Minimum distance between adjacent shapes.
aspect_ratio – (width, height) ratio of the rectangular bin.
max_size – Limits the size into which the shapes will be packed.
sort_by_area – Pre-sorts the shapes by area.
density – Values closer to 1 pack tighter but require more computation.
precision – Desired precision for rounding vertex coordinates.
text – Optional function to add text labels.
text_prefix – for labels. For example. ‘A’ for ‘A1’, ‘A2’…
text_offsets – relative to component size info anchor. Defaults to center.
text_anchors – relative to component (ce cw nc ne nw sc se sw center cc).
name_prefix – for each packed component (avoids the Unnamed cells warning). Note that the suffix contains a uuid so the name will not be deterministic.
rotation – for each component in degrees.
h_mirror – horizontal mirror in y axis (x, 1) (1, 0). This is the most common.
v_mirror – vertical mirror using x axis (1, y) (0, y).
import gdsfactory as gf
c = gf.components.pack_doe(doe='mmi1x2', do_permutations=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pack_doe_grid#
- gdsfactory.components.pack_doe_grid(doe: ComponentSpec = 'mmi1x2', settings: dict[str, list[Any]] = {'length_mmi': [2.5, 100], 'width_mmi': [4, 10]}, do_permutations: bool = False, function: str | Callable[[...], Component] | dict[str, Any] | None = None, with_text: bool = False, **kwargs) Component [source]#
Packs a component DOE (Design of Experiment) using grid.
- Parameters:
component – function to return Components.
settings – component settings.
do_permutations – for each setting.
function – to apply to component (add padding, grating couplers).
with_text – includes text label.
- Keyword Arguments:
spacing – between adjacent elements on the grid, can be a tuple for different distances in height and width.
separation – If True, guarantees elements are separated with fixed spacing if False, elements are spaced evenly along a grid.
shape – x, y shape of the grid (see np.reshape). If no shape and the list is 1D, if np.reshape were run with (1, -1).
align_x – {‘x’, ‘xmin’, ‘xmax’} for x (column) alignment along.
align_y – {‘y’, ‘ymin’, ‘ymax’} for y (row) alignment along.
edge_x – {‘x’, ‘xmin’, ‘xmax’} for x (column) (ignored if separation = True).
edge_y – {‘y’, ‘ymin’, ‘ymax’} for y (row) (ignored if separation = True).
rotation – for each component in degrees.
h_mirror – horizontal mirror y axis (x, 1) (1, 0). most common mirror.
v_mirror – vertical mirror using x axis (1, y) (0, y).
import gdsfactory as gf
c = gf.components.pack_doe_grid(doe='mmi1x2', do_permutations=False, with_text=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pad#
- gdsfactory.components.pad(size: str | tuple[float, float] = (100.0, 100.0), layer: LayerSpec = 'MTOP', bbox_layers: tuple[LayerSpec, ...] | None = None, bbox_offsets: tuple[float, ...] | None = None, port_inclusion: float = 0, port_orientation: float | None = None) Component [source]#
Returns rectangular pad with ports.
- Parameters:
size – x, y size.
layer – pad layer.
bbox_layers – list of layers.
bbox_offsets – Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.
port_inclusion – from edge.
port_orientation – in degrees.
import gdsfactory as gf
c = gf.components.pad(size=[100.0, 100.0], layer='MTOP', port_inclusion=0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pad_array#
- gdsfactory.components.pad_array(pad: ComponentSpec = 'pad', spacing: tuple[float, float] = (150.0, 150.0), columns: int = 6, rows: int = 1, orientation: float | None = 270) Component [source]#
Returns 2D array of pads.
- Parameters:
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
orientation – port orientation in deg. None for low speed DC ports.
import gdsfactory as gf
c = gf.components.pad_array(pad='pad', spacing=[150.0, 150.0], columns=6, rows=1, orientation=270)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pad_array0#
- gdsfactory.components.pad_array0(pad: ComponentSpec = 'pad', spacing: tuple[float, float] = (150.0, 150.0), *, columns: int = 1, rows: int = 3, orientation: float | None = 0) Component #
Returns 2D array of pads.
- Parameters:
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
orientation – port orientation in deg. None for low speed DC ports.
import gdsfactory as gf
c = gf.components.pad_array0(pad='pad', spacing=[150.0, 150.0], columns=1, rows=3, orientation=0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pad_array180#
- gdsfactory.components.pad_array180(pad: ComponentSpec = 'pad', spacing: tuple[float, float] = (150.0, 150.0), *, columns: int = 1, rows: int = 3, orientation: float | None = 180) Component #
Returns 2D array of pads.
- Parameters:
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
orientation – port orientation in deg. None for low speed DC ports.
import gdsfactory as gf
c = gf.components.pad_array180(pad='pad', spacing=[150.0, 150.0], columns=1, rows=3, orientation=180)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pad_array270#
- gdsfactory.components.pad_array270(pad: ComponentSpec = 'pad', spacing: tuple[float, float] = (150.0, 150.0), columns: int = 6, rows: int = 1, *, orientation: float | None = 270) Component #
Returns 2D array of pads.
- Parameters:
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
orientation – port orientation in deg. None for low speed DC ports.
import gdsfactory as gf
c = gf.components.pad_array270(pad='pad', spacing=[150.0, 150.0], columns=6, rows=1, orientation=270)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pad_array90#
- gdsfactory.components.pad_array90(pad: ComponentSpec = 'pad', spacing: tuple[float, float] = (150.0, 150.0), columns: int = 6, rows: int = 1, *, orientation: float | None = 90) Component #
Returns 2D array of pads.
- Parameters:
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
orientation – port orientation in deg. None for low speed DC ports.
import gdsfactory as gf
c = gf.components.pad_array90(pad='pad', spacing=[150.0, 150.0], columns=6, rows=1, orientation=90)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pad_gsg_open#
- gdsfactory.components.pad_gsg_open(via_stack: ComponentSpec = functools.partial(<function rectangle>, layer='MTOP'), size: Float2 = (22, 7), layer_metal: LayerSpec = 'MTOP', metal_spacing: float = 5.0, *, short: bool = False, pad: ComponentSpec = <function pad>, pad_spacing: float = 150) Component #
Returns high speed GSG pads for calibrating the RF probes.
- Parameters:
via_stack – where the RF pads connect to.
size – for the via_stack.
layer_metal – for the short.
metal_spacing – in um.
short – if False returns an open.
pad – function for pad.
pad_spacing – in um.
import gdsfactory as gf
c = gf.components.pad_gsg_open(size=[22, 7], layer_metal='MTOP', metal_spacing=5.0, short=False, pad_spacing=150)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pad_gsg_short#
- gdsfactory.components.pad_gsg_short(via_stack: ComponentSpec = functools.partial(<function rectangle>, layer='MTOP'), size: tuple[float, float] = (22, 7), layer_metal: LayerSpec = 'MTOP', metal_spacing: float = 5.0, short: bool = True, pad: ComponentSpec = <function pad>, pad_spacing: float = 150) Component [source]#
Returns high speed GSG pads for calibrating the RF probes.
- Parameters:
via_stack – where the RF pads connect to.
size – for the via_stack.
layer_metal – for the short.
metal_spacing – in um.
short – if False returns an open.
pad – function for pad.
pad_spacing – in um.
import gdsfactory as gf
c = gf.components.pad_gsg_short(size=[22, 7], layer_metal='MTOP', metal_spacing=5.0, short=True, pad_spacing=150)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pad_rectangular#
- gdsfactory.components.pad_rectangular(*, size: str | Float2 = 'pad_size', layer: LayerSpec = 'MTOP', bbox_layers: tuple[LayerSpec, ...] | None = None, bbox_offsets: tuple[float, ...] | None = None, port_inclusion: float = 0, port_orientation: float | None = None) Component #
Returns rectangular pad with ports.
- Parameters:
size – x, y size.
layer – pad layer.
bbox_layers – list of layers.
bbox_offsets – Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.
port_inclusion – from edge.
port_orientation – in degrees.
import gdsfactory as gf
c = gf.components.pad_rectangular(size='pad_size', layer='MTOP', port_inclusion=0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pads_shorted#
- gdsfactory.components.pads_shorted(pad: ComponentSpec = <function pad>, columns: int = 8, pad_spacing: float = 150.0, layer_metal: LayerSpec = 'MTOP', metal_width: float = 10) Component [source]#
Returns a 1D array of shorted_pads.
- Parameters:
pad – pad spec.
columns – number of columns.
pad_spacing – in um
layer_metal – for the short.
metal_width – for the short.
import gdsfactory as gf
c = gf.components.pads_shorted(columns=8, pad_spacing=150.0, layer_metal='MTOP', metal_width=10)
c.plot()
(Source code
, png
, hires.png
, pdf
)
pixel#
- gdsfactory.components.pixel(size: int = 1.0, layer: LayerSpec = 'WG', layers: LayerSpecs | None = None) Component [source]#
import gdsfactory as gf
c = gf.components.pixel(size=1.0, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
polarization_splitter_rotator#
- gdsfactory.components.polarization_splitter_rotator(width_taper_in: tuple[float, float, float] = (0.54, 0.69, 0.83), length_taper_in: tuple[float, float] | tuple[float, float, float] = (4.0, 44.0), width_coupler: tuple[float, float] = (0.9, 0.405), length_coupler: float = 7.0, gap: float = 0.15, width_out: float = 0.54, length_out: float = 14.33, dy: float = 5.0, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Returns polarization splitter rotator
“Novel concept for ultracompact polarization splitter-rotator based on silicon nanowires.” By D. Dai, and J. E. Bowers (Optics express vol 19, no. 11 pp. 10940-10949 (2011)).
- Parameters:
width_taper_in – Three west widths of the input tapers in um.
length_taper_in – Two or three length of the bend regions in um.
width_coupler – Top and bottom widths of the coupling region in um.
length_coupler – Length of the coupling region in um.
gap – Distance between the coupler in um.
width_out – Width of the splitter region in um.
length_out – Length of the splitter region in um.
dy – Port-to-port distance between the splitter region in um.
cross_section – cross-section spec.
Notes
The length of third input taper is automatically determined if only two lengths are in arguments.
import gdsfactory as gf
c = gf.components.polarization_splitter_rotator(width_taper_in=[0.54, 0.69, 0.83], length_taper_in=[4.0, 44.0], width_coupler=[0.9, 0.405], length_coupler=7.0, gap=0.15, width_out=0.54, length_out=14.33, dy=5.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
qrcode#
- gdsfactory.components.qrcode(data: str = 'mask01', psize: int = 1, layer: LayerSpec = 'WG') Component [source]#
Returns QRCode.
import gdsfactory as gf
c = gf.components.qrcode(data='mask01', psize=1, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
ramp#
- gdsfactory.components.ramp(length: float = 10.0, width1: float = 5.0, width2: float | None = 8.0, layer: LayerSpec = 'WG') Component [source]#
Return a ramp component.
Based on phidl.
- Parameters:
length – Length of the ramp section.
width1 – Width of the start of the ramp section.
width2 – Width of the end of the ramp section (defaults to width1).
layer – Specific layer to put polygon geometry on.
import gdsfactory as gf
c = gf.components.ramp(length=10.0, width1=5.0, width2=8.0, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
rectangle#
- gdsfactory.components.rectangle(size=(4.0, 2.0), layer: LayerSpec = 'WG', centered: bool = False, port_type: str | None = 'electrical', port_orientations: tuple[int, ...] | None = (180, 90, 0, -90), round_corners_east_west: bool = False, round_corners_north_south: bool = False) Component [source]#
Returns a rectangle.
- Parameters:
size – (tuple) Width and height of rectangle.
layer – Specific layer to put polygon geometry on.
centered – True sets center to (0, 0), False sets south-west to (0, 0).
port_type – optical, electrical.
port_orientations – list of port_orientations to add.
round_corners_east_west – if True adds rounded east / west corners using circles at the edges.
round_corners_north_south – if True adds rounded north / south corners using circles at the edges.
import gdsfactory as gf
c = gf.components.rectangle(size=[4.0, 2.0], layer='WG', centered=False, port_type='electrical', port_orientations=[180, 90, 0, -90], round_corners_east_west=False, round_corners_north_south=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
rectangle_with_slits#
- gdsfactory.components.rectangle_with_slits(size: tuple[float, float] = (100.0, 200.0), layer: LayerSpec = 'WG', layer_slit: LayerSpec = 'SLAB150', centered: bool = False, port_type: str | None = None, slit_size: tuple[float, float] = (1.0, 1.0), slit_spacing: tuple[float, float] = (20, 20), slit_enclosure: float = 10) Component [source]#
Returns a rectangle with slits.
Metal slits reduce stress.
- Parameters:
size – (tuple) Width and height of rectangle.
layer – Specific layer to put polygon geometry on.
layer_slit – does a boolean NOT when None.
centered – True sets center to (0, 0), False sets south-west to (0, 0)
port_type – for the rectangle.
slit_size – x, y slit size.
slit_spacing – pitch_x, pitch_y for slits.
slit_enclosure – from slit to rectangle edge.
slit_enclosure _____________________________________ |<---> | | | | ______________________ | | | | | | | | slit_size[1] | |______________________| | | | | | | slit_spacing | | | | size[1] | | ______________________ | | | | | | | | | | | | | |______________________| | | <---------------------> | | slit_size[0] | |___________________________________| size[0]
import gdsfactory as gf
c = gf.components.rectangle_with_slits(size=[100.0, 200.0], layer='WG', layer_slit='SLAB150', centered=False, slit_size=[1.0, 1.0], slit_spacing=[20, 20], slit_enclosure=10)
c.plot()
(Source code
, png
, hires.png
, pdf
)
rectangles#
- gdsfactory.components.rectangles(size=(4.0, 2.0), offsets=(0, 1), layers=('WG', 'SLAB150'), centered: bool = True, **kwargs) Component [source]#
Returns overimposed rectangles.
- Parameters:
size – (tuple) Width and height of rectangle.
layers – Specific layer to put polygon geometry on.
offsets – list of offsets.
centered – True sets center to (0, 0), False sets south-west of first rectangle to (0, 0).
- Keyword Arguments:
port_type – optical, electrical.
port_orientations – list of port_orientations to add.
┌──────────────┐ │ │ │ ┌──────┐ │ │ │ │ │ │ │ ├───► │ │ │offset │ └──────┘ │ │ │ └──────────────┘
import gdsfactory as gf
c = gf.components.rectangles(size=[4.0, 2.0], offsets=[0, 1], layers=['WG', 'SLAB150'], centered=True)
c.plot()
(Source code
, png
, hires.png
, pdf
)
rectangular_ring#
- gdsfactory.components.rectangular_ring(enclosed_size=(4.0, 2.0), width: float = 0.5, layer: tuple[int, int] | str = 'WG', centered: bool = False) Component [source]#
Returns a Rectangular Ring
- Parameters:
enclosed_size – (width, height) of the enclosed area.
width – width of the ring.
layer – Specific layer to put polygon geometry on.
centered – True sets center to (0,0), False sets south-west to (0,0).
import gdsfactory as gf
c = gf.components.rectangular_ring(enclosed_size=[4.0, 2.0], width=0.5, layer='WG', centered=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
regular_polygon#
- gdsfactory.components.regular_polygon(sides: int = 6, side_length: float = 10, layer: LayerSpec = 'WG', port_type: str | None = 'placement', snap_to_grid: bool = True) Component [source]#
Returns a regular N-sided polygon, with ports on each edge.
- Parameters:
sides – number of sides for the polygon.
side_length – of the edges.
layer – Specific layer to put polygon geometry on.
port_type – optical, electrical.
snap_to_grid – snap ports to grid.
import gdsfactory as gf
c = gf.components.regular_polygon(sides=6, side_length=10, layer='WG', port_type='placement', snap_to_grid=True)
c.plot()
(Source code
, png
, hires.png
, pdf
)
resistance_meander#
- gdsfactory.components.resistance_meander(pad_size: tuple[float, float] = (50.0, 50.0), num_squares: int = 1000, width: float = 1.0, res_layer: LayerSpec = 'MTOP', pad_layer: LayerSpec = 'MTOP', gnd_layer: LayerSpec = 'MTOP') Component [source]#
Return meander to test resistance.
based on phidl.geometry
- Parameters:
pad_size – Size of the two matched impedance pads (microns).
num_squares – Number of squares comprising the resonator wire.
width – The width of the squares (microns).
res_layer – resistance layer.
pad_layer – pad layer.
gnd_layer – ground layer.
import gdsfactory as gf
c = gf.components.resistance_meander(pad_size=[50.0, 50.0], num_squares=1000, width=1.0, res_layer='MTOP', pad_layer='MTOP', gnd_layer='MTOP')
c.plot()
(Source code
, png
, hires.png
, pdf
)
resistance_sheet#
- gdsfactory.components.resistance_sheet(width: float = 10, layers: LayerSpecs = ('SLAB90', 'NPP'), layer_offsets: tuple[float, ...] = (0, 0.2), pad: ComponentSpec = functools.partial(<function via_stack>, layers=('SLAB90', 'NPP', 'M1'), vias=(None, None, functools.partial(<function via>, layer='VIAC')), size=(80, 80)), pad_pitch: float = 100.0, ohms_per_square: float | None = None, port_orientation1: int = 180, port_orientation2: int = 0) Component [source]#
Returns Sheet resistance.
keeps connectivity for pads and first layer in layers
- Parameters:
width – in um.
layers – for the middle part.
layer_offsets – from edge, positive: over, negative: inclusion.
pad – function to create a pad.
pad_pitch – in um.
ohms_per_square – optional sheet resistance to compute info.resistance.
port_orientation1 – in degrees.
port_orientation2 – in degrees.
import gdsfactory as gf
c = gf.components.resistance_sheet(width=10, layers=['SLAB90', 'NPP'], layer_offsets=[0, 0.2], pad_pitch=100.0, port_orientation1=180, port_orientation2=0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring#
- gdsfactory.components.ring(radius: float = 10.0, width: float = 0.5, angle_resolution: float = 2.5, layer: LayerSpec = 'WG', angle: float | None = 360) Component [source]#
Returns a ring.
- Parameters:
radius – ring radius.
width – of the ring.
angle_resolution – number of points per degree.
layer – layer.
angle – angular coverage of the ring
import gdsfactory as gf
c = gf.components.ring(radius=10.0, width=0.5, angle_resolution=2.5, layer='WG', angle=360)
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_crow#
- gdsfactory.components.ring_crow(gaps: tuple[float, ...] = (0.2, 0.2, 0.2, 0.2), radius: tuple[float, ...] = (10.0, 10.0, 10.0), bends: tuple[ComponentSpec, ...] | None = None, ring_cross_sections: tuple[CrossSectionSpec, ...] = ('xs_sc', 'xs_sc', 'xs_sc'), length_x: float = 0, lengths_y: tuple[float, ...] = (0, 0, 0), input_straight_cross_section: CrossSectionSpec | None = None, output_straight_cross_section: CrossSectionSpec | None = None, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Coupled ring resonators.
- Parameters:
gaps – gap between rings.
radius – for each ring.
bends – bend spec for each ring.
ring_cross_sections – cross_section spec for each ring.
length_x – ring coupler length.
lengths_y – vertical straight length.
input_straight_cross_section – cross_section spec for input and output straight. Defaults to cross_section.
output_straight_cross_section – cross_section spec for input and output straight. Defaults to cross_section.
cross_section – cross_section spec for input and output straight.
--==ct==-- gap[N-1] | | sl sr ring[N-1] | | --==cb==-- gap[N-2] . . . --==ct==-- | | sl sr lengths_y[1], ring[1] | | --==cb==-- gap[1] --==ct==-- | | sl sr lengths_y[0], ring[0] | | --==cb==-- gap[0] length_x
import gdsfactory as gf
c = gf.components.ring_crow(gaps=[0.2, 0.2, 0.2, 0.2], radius=[10.0, 10.0, 10.0], ring_cross_sections=['xs_sc', 'xs_sc', 'xs_sc'], length_x=0, lengths_y=[0, 0, 0], cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_crow_couplers#
- gdsfactory.components.ring_crow_couplers(radius: list[float] = [10.0, 10.0, 10.0], bends: list[ComponentSpec] = [<function bend_circular>, <function bend_circular>, <function bend_circular>], ring_cross_sections: list[CrossSectionSpec] = [functools.partial(<function cross_section>, radius=10, radius_min=5), functools.partial(<function cross_section>, radius=10, radius_min=5), functools.partial(<function cross_section>, radius=10, radius_min=5)], couplers: list[ComponentSpec] = [<function coupler>, <function coupler>, <function coupler>, <function coupler>]) Component [source]#
Coupled ring resonators with coupler components between gaps.
- Parameters:
gap – gap between for coupler.
radius – for the bend and coupler.
length_x – ring coupler length.
length_y – vertical straight length.
coupler – ring coupler spec.
straight – straight spec.
bend – bend spec.
cross_section – cross_section spec.
couplers – coupling component between rings and bus.
--==ct==-- gap[N-1] <------- couplers[N-1] | | sl sr ring[N-1] | | --==cb==-- gap[N-2] <------- couplers[N-2] . . . --==ct==-- | | sl sr lengths_y[1], ring[1] | | --==cb==-- gap[1] <------- couplers[1] --==ct==-- | | sl sr lengths_y[0], ring[0] | | --==cb==-- gap[0] <------- couplers[0] length_x
import gdsfactory as gf
c = gf.components.ring_crow_couplers()
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_double#
- gdsfactory.components.ring_double(gap: float = 0.2, gap_top: float | None = None, radius: float = 10.0, length_x: float = 0.01, length_y: float = 0.01, coupler_ring: ComponentSpec = <function coupler_ring>, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Returns a double bus ring.
two couplers (ct: top, cb: bottom) connected with two vertical straights (sl: left, sr: right)
- Parameters:
gap – gap between for coupler.
gap_top – optional gap between top waveguides. Defaults to gap.
radius – for the bend and coupler.
length_x – ring coupler length.
length_y – vertical straight length.
coupler – ring coupler spec.
bend – bend spec.
straight – straight spec.
cross_section – cross_section spec.
o2──────▲─────────o3 │gap_top xx──────▼─────────xxx xxx xxx xxx xxx xx xxx x xxx xx xx▲ xx xx│length_y xx xx▼ xx xx xx length_x x xx ◄───────────────► x xx xxx xx xxx xxx──────▲─────────xxx │gap o1──────▼─────────o4
import gdsfactory as gf
c = gf.components.ring_double(gap=0.2, radius=10.0, length_x=0.01, length_y=0.01, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_double_heater#
- gdsfactory.components.ring_double_heater(gap: float = 0.2, gap_top: float | None = None, radius: float = 10.0, length_x: float = 1.0, length_y: float = 0.01, coupler_ring: ComponentFactory = <function coupler_ring>, coupler_ring_top: ComponentFactory | None = None, straight: ComponentFactory = <function straight>, straight_heater: ComponentFactory = <function straight>, bend: ComponentFactory = <function bend_euler>, cross_section_heater: CrossSectionSpec = 'xs_heater_metal', cross_section_waveguide_heater: CrossSectionSpec = 'xs_sc_heater_metal', cross_section: CrossSectionSpec = 'xs_sc', via_stack: ComponentSpec = functools.partial(<function via_stack>, layers=('HEATER', 'M2', 'MTOP'), vias=(None, functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2')), size=(4, 4)), port_orientation: float | Float2 | None = None, via_stack_offset: Float2 = (1, 0)) Component [source]#
Returns a double bus ring with heater on top.
two couplers (ct: top, cb: bottom) connected with two vertical straights (sl: left, sr: right)
- Parameters:
gap – gap between bottom coupler waveguides.
gap_top – optional gap between top waveguides. Defaults to gap.
radius – for the bend and coupler.
length_x – ring coupler length.
length_y – vertical straight length.
coupler_ring – ring coupler spec.
coupler_ring_top – ring coupler spec for coupler away from vias (defaults to coupler_ring)
straight – straight spec.
bend – bend spec.
cross_section_heater – for heater.
cross_section_waveguide_heater – for waveguide with heater.
cross_section – for regular waveguide.
via_stack – for heater to routing metal.
port_orientation – for electrical ports to promote from via_stack. Tuple allows the left and right contacts to be defined differently.
via_stack_offset – x,y offset for via_stack.
o2──────▲─────────o3 │gap_top xx──────▼─────────xxx xxx xxx xxx xxx xx xxx x xxx xx xx▲ xx xx│length_y xx xx▼ xx xx xx length_x x xx ◄───────────────► x xx xxx xx xxx xxx──────▲─────────xxx │gap o1──────▼─────────o4
import gdsfactory as gf
c = gf.components.ring_double_heater(gap=0.2, radius=10.0, length_x=1.0, length_y=0.01, cross_section_heater='xs_heater_metal', cross_section_waveguide_heater='xs_sc_heater_metal', cross_section='xs_sc', via_stack_offset=[1, 0])
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_double_pn#
- gdsfactory.components.ring_double_pn(add_gap: float = 0.3, drop_gap: float = 0.3, radius: float = 5.0, doping_angle: float = 85, cross_section: CrossSectionFactory = CrossSection(sections=(Section(width=0.5, offset=0.0, insets=None, layer='WG', port_names=('o1', 'o2'), port_types=('optical', 'optical'), name='_default', hidden=False, simplify=None, width_function=None, offset_function=None), Section(width=6.0, offset=0, insets=None, layer='SLAB90', port_names=(None, None), port_types=('optical', 'optical'), name='slab', hidden=False, simplify=0.05, width_function=None, offset_function=None)), components_along_path=(), radius=20.0, radius_min=20.0, bbox_layers=['DEVREC'], bbox_offsets=(0.0,)), pn_cross_section: CrossSectionFactory = functools.partial(<function pn>, width_doping=2.425, width_slab=4.85, layer_via='VIAC', width_via=0.5, layer_metal='M1', width_metal=0.5), doped_heater: bool = True, doped_heater_angle_buffer: float = 10, doped_heater_layer: LayerSpec = 'NPP', doped_heater_width: float = 0.5, doped_heater_waveguide_offset: float = 2.175, heater_vias: ComponentSpec = functools.partial(<function via_stack>, size=(0.5, 0.5), layers=('M1', 'M2'), vias=(functools.partial(<function via>, layer='VIAC', size=(0.1, 0.1), spacing=(0.2, 0.2), enclosure=0.1), functools.partial(<function via>, layer='VIA1', size=(0.1, 0.1), spacing=(0.2, 0.2), enclosure=0.1)))) Component [source]#
Returns add-drop pn ring with optional doped heater.
- Parameters:
add_gap – gap to add waveguide.
drop_gap – gap to drop waveguide.
radius – for the bend and coupler.
doping_angle – angle in degrees representing portion of ring that is doped.
length_x – ring coupler length.
length_y – vertical straight length.
cross_section – cross_section spec for non-PN doped rib waveguide sections.
pn_cross_section – cross section of pn junction.
doped_heater – boolean for if we include doped heater or not.
doped_heater_angle_buffer – angle in degrees buffering heater from pn junction.
doped_heater_layer – doping layer for heater.
doped_heater_width – width of doped heater.
doped_heater_waveguide_offset – distance from the center of the ring waveguide to the center of the doped heater.
heater_vias – components specifications for heater vias
import gdsfactory as gf
c = gf.components.ring_double_pn(add_gap=0.3, drop_gap=0.3, radius=5.0, doping_angle=85, doped_heater=True, doped_heater_angle_buffer=10, doped_heater_layer='NPP', doped_heater_width=0.5, doped_heater_waveguide_offset=2.175)
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_double_trenches#
- gdsfactory.components.ring_double_trenches(*, component: ComponentSpec = <function ring_double>, cross_section: CrossSectionSpec = 'xs_rc_with_trenches', top: bool = True, bot: bool = True, right: bool = False, left: bool = False, layer_trench: LayerSpec = (3, 6), width_trench: float = 3, **kwargs) Component #
Return component with trenches.
- Parameters:
component – component to add to the trenches.
cross_section – spec (CrossSection, string or dict).
top – add top trenches.
bot – add bot trenches.
right – add right trenches.
left – add left trenches.
layer_trench – layer for the trenches.
width_trench – width of the trenches.
kwargs – component settings.
import gdsfactory as gf
c = gf.components.ring_double_trenches(cross_section='xs_rc_with_trenches', top=True, bot=True, right=False, left=False, layer_trench=[3, 6], width_trench=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_section_based#
- gdsfactory.components.ring_section_based(gap: float | tuple[float, ...] = 0.3, radius: float = 5.0, add_drop: bool = False, cross_sections: dict[str, str] = {'A': 'xs_rc', 'B': 'xs_sc'}, cross_sections_sequence: str | list[str] | tuple[str, ...] = 'AB', cross_sections_angles: dict[str, float] | None = {'A': 6.0, 'B': 6.0}, start_cross_section: Callable[[...], CrossSection] | CrossSection | dict[str, Any] | str | Transition | None = None, start_angle: float | None = 10.0, drop_cross_section: Callable[[...], CrossSection] | CrossSection | dict[str, Any] | str | Transition | None = None, bus_cross_section: Callable[[...], CrossSection] | CrossSection | dict[str, Any] | str | Transition = 'xs_sc', ang_res: float | None = 0.1) Component [source]#
Returns a ring made of the specified cross sections.
We start with start_cross section if indicated, then repeat the sequence in cross_section_sequence until the whole ring is filled.
- Parameters:
gap – bus waveguide - ring gap.
radius – ring radius.
add_drop – if True, we draw an add-drop ring
cross_sections – dictionary of cross sections to add consecutively to the ring until the ring is filled. Keys should be single character.
cross_sections_sequence – sequence to follow filling the ring. Ex: “AB” means we will put first section A, then section B, then section A again… until the ring is filled If we have a drop, then this can be a list of two strings, where the first sequence is for one side of the ring and the second for the other side of the ring
cross_sections_angles – angular extent of each cross section in the cross_sections dictionary (deg). If not indicated, then we assume that the sequence is only repeated once and calculate the necessary angular length
start_cross_section – it is likely that the cross section at the ring-bus junction is different than the sequence we want to repeat. If that’s the case, then here you indicate the initial cross section.
start_angle – angular extent of the initial cross section (deg)
drop_cross_section – cross section for the drop port. If not indicated, we assume it is the same as init_cross_section.
bus_cross_section – cross section for the bus waveguide.
ang_res – angular resolution to draw the bends for each section.
import gdsfactory as gf
c = gf.components.ring_section_based(gap=0.3, radius=5.0, add_drop=False, cross_sections_sequence='AB', start_angle=10.0, bus_cross_section='xs_sc', ang_res=0.1)
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_single#
- gdsfactory.components.ring_single(gap: float = 0.2, radius: float = 10.0, length_x: float = 4.0, length_y: float = 0.6, coupler_ring: ComponentFactory = <function coupler_ring>, bend: ComponentFactory = <function bend_euler>, bend_coupler: ComponentFactory | None = <function bend_euler>, straight: ComponentFactory = <function straight>, cross_section: CrossSectionSpec = 'xs_sc', pass_cross_section_to_bend: bool = True) Component [source]#
Returns a single ring.
ring coupler (cb: bottom) connects to two vertical straights (sl: left, sr: right), two bends (bl, br) and horizontal straight (wg: top)
- Parameters:
gap – gap between for coupler.
radius – for the bend and coupler.
length_x – ring coupler length.
length_y – vertical straight length.
coupler_ring – ring coupler spec.
bend – 90 degrees bend spec.
bend_coupler – optional bend for coupler.
straight – straight spec.
cross_section – cross_section spec.
pass_cross_section_to_bend – pass cross_section to bend.
xxxxxxxxxxxxx xxxxx xxxx xxx xxx xxx xxx xx xxx x xxx xx xx▲ xx xx│length_y xx xx▼ xx xx xx length_x x xx ◄───────────────► x xx xxx xx xxx xxx──────▲─────────xxx │gap o1──────▼─────────o2
import gdsfactory as gf
c = gf.components.ring_single(gap=0.2, radius=10.0, length_x=4.0, length_y=0.6, cross_section='xs_sc', pass_cross_section_to_bend=True)
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_single_array#
- gdsfactory.components.ring_single_array(ring: ComponentFactory = <function ring_single>, spacing: float = 5.0, list_of_dicts: tuple[dict[str, float], ...] | None = None, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Ring of single bus connected with straights.
- Parameters:
ring – ring function.
spacing – between rings.
list_of_dicts – settings for each ring.
cross_section – spec.
______ ______ | | | | | | length_y | | | | | | --======-- spacing ----==gap==-- length_x
import gdsfactory as gf
c = gf.components.ring_single_array(spacing=5.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_single_bend_coupler#
- gdsfactory.components.ring_single_bend_coupler(radius: float = 5.0, gap: float = 0.2, coupling_angle_coverage: float = 180.0, bend: ComponentSpec = <function bend_circular>, length_x: float = 0.6, length_y: float = 0.6, cross_section: CrossSectionSpec = 'xs_sc', cross_section_inner: CrossSectionSpec = 'xs_sc', cross_section_outer: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns ring with curved coupler.
TODO: enable euler bends.
- Parameters:
radius – um.
gap – um.
angle_inner – of the inner bend, from beginning to end. Depending on the bend chosen, gap may not be preserved.
angle_outer – of the outer bend, from beginning to end. Depending on the bend chosen, gap may not be preserved.
bend – for bend.
length_x – horizontal straight length.
length_y – vertical straight length.
cross_section – cross_section.
cross_section_inner – spec inner bend.
cross_section_outer – spec outer bend.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.ring_single_bend_coupler(radius=5.0, gap=0.2, coupling_angle_coverage=180.0, length_x=0.6, length_y=0.6, cross_section='xs_sc', cross_section_inner='xs_sc', cross_section_outer='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_single_dut#
- gdsfactory.components.ring_single_dut(component: ComponentSpec = functools.partial(<function taper>, width2=3), gap: float = 0.2, length_x: float = 4, length_y: float = 0, radius: float = 5.0, coupler: ComponentSpec = <function coupler_ring>, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, with_component: bool = True, port_name: str = 'o1', **kwargs) Component [source]#
Single bus ring made of two couplers (ct: top, cb: bottom) connected.
with two vertical straights (wyl: left, wyr: right) (Component Under Test) in the middle to extract loss from quality factor.
- Parameters:
component – device under test.
gap – in um.
length – in um.
length_y – in um.
radius – in um.
coupler – coupler function.
bend – bend function.
with_component – True adds component. False adds waveguide.
port_name – for component input.
kwargs – cross_section settings.
with_component – if False changes component for just a straight.
bl-wt-br | | length_y wl component | | --==cb==-- gap length_x
import gdsfactory as gf
c = gf.components.ring_single_dut(gap=0.2, length_x=4, length_y=0, radius=5.0, with_component=True, port_name='o1')
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_single_heater#
- gdsfactory.components.ring_single_heater(gap: float = 0.2, radius: float = 10.0, length_x: float = 4.0, length_y: float = 0.6, coupler_ring: ComponentSpec = <function coupler_ring>, bend: ComponentSpec = <function bend_euler>, bend_coupler: ComponentFactory | None = <function bend_euler>, straight: ComponentFactory = <function straight>, cross_section_waveguide_heater: CrossSectionSpec = 'xs_sc_heater_metal', cross_section: CrossSectionSpec = 'xs_sc', via_stack: ComponentSpec = functools.partial(<function via_stack>, layers=('HEATER', 'M2', 'MTOP'), vias=(None, functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2')), size=(4, 4)), port_orientation: float | Float2 | None = None, via_stack_offset: Float2 = (0, 0)) Component [source]#
Returns a single ring with heater on top.
ring coupler (cb: bottom) connects to two vertical straights (sl: left, sr: right), two bends (bl, br) and horizontal straight (wg: top)
- Parameters:
gap – gap between for coupler.
radius – for the bend and coupler.
length_x – ring coupler length.
length_y – vertical straight length.
coupler_ring – ring coupler function.
bend – 90 degrees bend function.
straight – straight function.
cross_section_waveguide_heater – for heater.
cross_section – for regular waveguide.
via_stack – for heater to routing metal.
port_orientation – for electrical ports to promote from via_stack. Tuple allows the left and right contacts to be defined differently.
via_stack_offset – x,y offset for via_stack.
xxxxxxxxxxxxx xxxxx xxxx xxx xxx xxx xxx xx xxx x xxx xx xx▲ xx xx│length_y xx xx▼ xx xx xx length_x x xx ◄───────────────► x xx xxx xx xxx xxx──────▲─────────xxx │gap o1──────▼─────────o2
import gdsfactory as gf
c = gf.components.ring_single_heater(gap=0.2, radius=10.0, length_x=4.0, length_y=0.6, cross_section_waveguide_heater='xs_sc_heater_metal', cross_section='xs_sc', via_stack_offset=[0, 0])
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_single_pn#
- gdsfactory.components.ring_single_pn(gap: float = 0.3, radius: float = 5.0, doping_angle: float = 250, cross_section: ~gdsfactory.cross_section.CrossSection = functools.partial(<function cross_section>, radius=10, radius_min=5, sections=(Section(width=4.85, offset=0, insets=None, layer='SLAB90', port_names=(None, None), port_types=('optical', 'optical'), name='slab', hidden=False, simplify=None, width_function=None, offset_function=None), )), pn_cross_section: ~gdsfactory.cross_section.CrossSection = functools.partial(<function pn>, width_doping=2.425, width_slab=4.85, layer_via='VIAC', width_via=0.5, layer_metal='M1', width_metal=0.5), doped_heater: bool = True, doped_heater_angle_buffer: float = 10, doped_heater_layer: LayerSpec = 'NPP', doped_heater_width: float = 0.5, doped_heater_waveguide_offset: float = 2.175, heater_vias: ComponentSpec = functools.partial(<function via_stack>, size=(0.5, 0.5), layers=('M1', 'M2'), vias=(functools.partial(<function via>, layer='VIAC', size=(0.1, 0.1), spacing=(0.2, 0.2), enclosure=0.1), functools.partial(<function via>, layer='VIA1', size=(0.1, 0.1), spacing=(0.2, 0.2), enclosure=0.1))), **kwargs) Component [source]#
Returns single pn ring with optional doped heater.
- Parameters:
gap – gap between for coupler.
radius – for the bend and coupler.
doping_angle – angle in degrees representing portion of ring that is doped.
length_x – ring coupler length.
length_y – vertical straight length.
cross_section – cross_section spec for non-PN doped rib waveguide sections.
pn_cross_section – cross section of pn junction.
doped_heater – boolean for if we include doped heater or not.
doped_heater_angle_buffer – angle in degrees buffering heater from pn junction.
doped_heater_layer – doping layer for heater.
doped_heater_width – width of doped heater.
doped_heater_waveguide_offset – distance from the center of the ring waveguide to the center of the doped heater.
heater_vias – components specifications for heater vias.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.ring_single_pn(gap=0.3, radius=5.0, doping_angle=250, doped_heater=True, doped_heater_angle_buffer=10, doped_heater_layer='NPP', doped_heater_width=0.5, doped_heater_waveguide_offset=2.175)
c.plot()
(Source code
, png
, hires.png
, pdf
)
ring_single_trenches#
- gdsfactory.components.ring_single_trenches(*, component: ComponentSpec = <function ring_single>, cross_section: CrossSectionSpec = 'xs_rc_with_trenches', top: bool = True, bot: bool = True, right: bool = False, left: bool = False, layer_trench: LayerSpec = (3, 6), width_trench: float = 3, **kwargs) Component #
Return component with trenches.
- Parameters:
component – component to add to the trenches.
cross_section – spec (CrossSection, string or dict).
top – add top trenches.
bot – add bot trenches.
right – add right trenches.
left – add left trenches.
layer_trench – layer for the trenches.
width_trench – width of the trenches.
kwargs – component settings.
import gdsfactory as gf
c = gf.components.ring_single_trenches(cross_section='xs_rc_with_trenches', top=True, bot=True, right=False, left=False, layer_trench=[3, 6], width_trench=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
seal_ring#
- gdsfactory.components.seal_ring(bbox=((-1.0, -1.0), (3.0, 4.0)), seal: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | ~gdsfactory.component.Component | dict[str, ~typing.Any] = <function via_stack>, width: float = 10, padding: float = 10.0, with_north: bool = True, with_south: bool = True, with_east: bool = True, with_west: bool = True) Component [source]#
Returns a continuous seal ring boundary at the chip/die.
Prevents cracks from spreading and shields when connected to ground.
- Parameters:
bbox – to add seal ring around. You can pass Component.bbox.
seal – function for the seal.
width – of the seal.
padding – from component to seal.
with_north – includes seal.
with_south – includes seal.
with_east – includes seal.
with_west – includes seal.
import gdsfactory as gf
c = gf.components.seal_ring(bbox=[[-1.0, -1.0], [3.0, 4.0]], width=10, padding=10.0, with_north=True, with_south=True, with_east=True, with_west=True)
c.plot()
(Source code
, png
, hires.png
, pdf
)
seal_ring_segmented#
- gdsfactory.components.seal_ring_segmented(bbox=((-1.0, -1.0), (3.0, 4.0)), length_segment: float = 10, width_segment: float = 3, spacing_segment: float = 2, corner: ~gdsfactory.component.Component = <function via_stack_corner45_extended>, via_stack: ~gdsfactory.component.Component = functools.partial(<function via_stack>, layers=('M1', 'M2', 'MTOP'), vias=(functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2'), None)), with_north: bool = True, with_south: bool = True, with_east: bool = True, with_west: bool = True, padding: float = 10.0) Component [source]#
Segmented Seal ring.
- Parameters:
size – size of the seal ring.
length_segment – length of each segment.
width_segment – width of each segment.
spacing_segment – spacing between segments.
corner – corner component.
via_stack – via_stack component.
with_north – includes seal.
with_south – includes seal.
with_east – includes seal.
with_west – includes seal.
padding – from component to seal.
import gdsfactory as gf
c = gf.components.seal_ring_segmented(bbox=[[-1.0, -1.0], [3.0, 4.0]], length_segment=10, width_segment=3, spacing_segment=2, with_north=True, with_south=True, with_east=True, with_west=True, padding=10.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
snspd#
- gdsfactory.components.snspd(wire_width: float = 0.2, wire_pitch: float = 0.6, size: tuple[float, float] = (10, 8), num_squares: int | None = None, turn_ratio: float = 4, terminals_same_side: bool = False, layer: LayerSpec = (1, 0)) Component [source]#
Creates an optimally-rounded SNSPD.
- Parameters:
width – Width of the wire.
pitch – Distance between two adjacent wires. Must be greater than width.
size – None or array-like[2] of int or float (width, height) of the rectangle formed by the outer boundary of the SNSPD. Must be none if num_squares is specified.
num_squares – int or None Total number of squares inside the SNSPD length. Must be none if size is specified.
turn_ratio – int or float Specifies how much of the SNSPD width is dedicated to the 180 degree turn. A turn_ratio of 10 will result in 20% of the width being comprised of the turn.
terminals_same_side – bool If True, both ports will be located on the same side of the SNSPD.
layer – layer spec to put polygon geometry on.
import gdsfactory as gf
c = gf.components.snspd(wire_width=0.2, wire_pitch=0.6, size=[10, 8], turn_ratio=4, terminals_same_side=False, layer=[1, 0])
c.plot()
(Source code
, png
, hires.png
, pdf
)
spiral_double#
- gdsfactory.components.spiral_double(min_bend_radius: float | None = None, separation: float = 2.0, number_of_loops: float = 3, npoints: int = 1000, cross_section: ~collections.abc.Callable[[...], ~gdsfactory.cross_section.CrossSection] | ~gdsfactory.cross_section.CrossSection | dict[str, ~typing.Any] | str | ~gdsfactory.cross_section.Transition = 'xs_sc', bend: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | ~gdsfactory.component.Component | dict[str, ~typing.Any] = <function bend_circular>) Component [source]#
Returns a spiral double (spiral in, and then out).
- Parameters:
min_bend_radius – inner radius of the spiral. Defaults to cross_section radius.
separation – separation between the loops.
number_of_loops – number of loops per spiral.
npoints – points for the spiral.
cross_section – cross-section to extrude the structure with.
bend – factory for the bends in the middle of the double spiral.
import gdsfactory as gf
c = gf.components.spiral_double(separation=2.0, number_of_loops=3, npoints=1000, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
spiral_external_io#
- gdsfactory.components.spiral_external_io(N: int = 6, x_inner_length_cutback: float = 300.0, x_inner_offset: float = 0.0, y_straight_inner_top: float = 0.0, xspacing: float = 3.0, yspacing: float = 3.0, bend: ComponentSpec = <function bend_euler>, length: float | None = None, cross_section: CrossSectionSpec = 'xs_sc', with_inner_ports: bool = False, y_straight_outer_offset: float = 0.0, inner_loop_spacing_offset: float = 0.0, mirror_straight: bool = False, **kwargs) Component [source]#
Returns spiral with input and output ports outside the spiral.
- Parameters:
N – number of loops.
x_inner_length_cutback – x inner length.
x_inner_offset – x inner offset.
y_straight_inner_top – y straight inner top.
xspacing – center to center x-spacing.
yspacing – center to center y-spacing.
bend – function.
length – length in um, it is the approximates total length.
cross_section – spec.
with_inner_ports – if True, removes the internal S-bend and exposes new ports
y_straight_outer_offset – amount to add/remove to the last points at the outer output of the spiral
inner_loop_spacing_offset – extra difference between the inner ports
mirror_straight – if True, mirrors the straight cross section in round_corners (can help when xs is asymmetric)
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.spiral_external_io(N=6, x_inner_length_cutback=300.0, x_inner_offset=0.0, y_straight_inner_top=0.0, xspacing=3.0, yspacing=3.0, cross_section='xs_sc', with_inner_ports=False, y_straight_outer_offset=0.0, inner_loop_spacing_offset=0.0, mirror_straight=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
spiral_inner_io#
- gdsfactory.components.spiral_inner_io(N: int = 6, x_straight_inner_right: float = 150.0, x_straight_inner_left: float = 50.0, y_straight_inner_top: float = 50.0, y_straight_inner_bottom: float = 10.0, grating_spacing: float = 127.0, waveguide_spacing: float = 3.0, bend90: ComponentSpec = <function bend_euler>, bend180: ComponentSpec = functools.partial(<function bend_euler>, angle=180), straight: ComponentSpec = <function straight>, length: float | None = None, cross_section: CrossSectionSpec = 'xs_sc', cross_section_bend: CrossSectionSpec | None = None, cross_section_bend180: CrossSectionSpec | None = None, asymmetric_cross_section: bool = False, **kwargs) Component [source]#
Returns Spiral with ports inside the spiral loop.
You can add grating couplers inside the spiral to save space.
- Parameters:
N – number of loops.
x_straight_inner_right – xlength.
x_straight_inner_left – x length left.
y_straight_inner_top – x inner top.
y_straight_inner_bottom – y length.
grating_spacing – defaults to 127 for fiber array.
waveguide_spacing – center to center spacing.
bend90 – bend90 spec.
bend180 – bend180 spec.
straight – straight spec.
length – spiral target length (um), overrides x_straight_inner_left. to match the length by a simple 1D interpolation.
cross_section – spec.
cross_section_bend – for the bends.
cross_section_bend180 – for 180 bend.
asymmetric_cross_section – if the cross_section is asymmetric, it needs to be mirrored at the halfway point.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.spiral_inner_io(N=6, x_straight_inner_right=150.0, x_straight_inner_left=50.0, y_straight_inner_top=50.0, y_straight_inner_bottom=10.0, grating_spacing=127.0, waveguide_spacing=3.0, cross_section='xs_sc', asymmetric_cross_section=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
spiral_inner_io_fiber_array#
- gdsfactory.components.spiral_inner_io_fiber_array(N: int = 6, x_straight_inner_right: float = 150.0, x_straight_inner_left: float = 50.0, y_straight_inner_top: float = 50.0, y_straight_inner_bottom: float = 10.0, grating_spacing: float = 127.0, waveguide_spacing: float = 3.0, bend90: ComponentSpec = <function bend_euler>, bend180: ComponentSpec = functools.partial(<function bend_euler>, angle=180), straight: ComponentSpec = <function straight>, length: float | None = 20000.0, cross_section: CrossSectionSpec = 'xs_sc', cross_section_bend: CrossSectionSpec | None = None, cross_section_bend180: CrossSectionSpec | None = None, cross_section_loopback: CrossSectionSpec = 'xs_sc', asymmetric_cross_section: bool = False, add_grating_couplers: ComponentFactory | None = <function add_grating_couplers_with_loopback_fiber_array>, **kwargs) Component [source]#
Returns Spiral with fiber array grating couplers.
- Parameters:
N – number of loops.
x_straight_inner_right – xlength.
x_straight_inner_left – x length left.
y_straight_inner_top – x inner top.
y_straight_inner_bottom – y length.
grating_spacing – defaults to 127 for fiber array.
waveguide_spacing – center to center spacing.
bend90 – bend90 spec.
bend180 – bend180 spec.
straight – straight spec.
length – spiral target length (um), overrides x_straight_inner_left. to match the length by a simple 1D interpolation.
cross_section – spec.
cross_section_bend – for the bends.
cross_section_bend180 – for 180 bend.
asymmetric_cross_section – if the cross_section is asymmetric, it needs to be mirrored at the halfway point.
add_grating_couplers – function to add grating couplers.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.spiral_inner_io_fiber_array(N=6, x_straight_inner_right=150.0, x_straight_inner_left=50.0, y_straight_inner_top=50.0, y_straight_inner_bottom=10.0, grating_spacing=127.0, waveguide_spacing=3.0, length=20000.0, cross_section='xs_sc', cross_section_loopback='xs_sc', asymmetric_cross_section=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
spiral_inner_io_fiber_single#
- gdsfactory.components.spiral_inner_io_fiber_single(cross_section: CrossSectionSpec = 'xs_sc', cross_section_bend: CrossSectionSpec | None = None, cross_section_ports: CrossSectionSpec | None = None, x_straight_inner_right: float = 40.0, x_straight_inner_left: float = 75.0, y_straight_inner_top: float = 10.0, y_straight_inner_bottom: float = 0.0, grating_spacing: float = 200.0, **kwargs) Component [source]#
Returns Spiral with 90 and 270 degree ports.
You can add single fiber north and south grating couplers inside the spiral to save space
- Parameters:
cross_section – for the straight sections in the spiral.
cross_section_bend – for the bends in the spiral.
cross_section_ports – for input/output ports.
x_straight_inner_right – in um.
x_straight_inner_left – in um.
y_straight_inner_top – in um.
y_straight_inner_bottom – in um.
grating_spacing – in um.
- Keyword Arguments:
N – number of loops.
waveguide_spacing – center to center spacing.
bend90 – bend90 spec.
bend180 – bend180 spec.
straight – straight spec.
length – computes spiral length from simple interpolation.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.spiral_inner_io_fiber_single(cross_section='xs_sc', x_straight_inner_right=40.0, x_straight_inner_left=75.0, y_straight_inner_top=10.0, y_straight_inner_bottom=0.0, grating_spacing=200.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
spiral_meander#
- gdsfactory.components.spiral_meander(*, length: float = 1000.0, spacing: float = 2.0, cross_section: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5), heater_width: float = 2.5, extension_length: float = 15.0, layer_heater: LayerSpec | None = None, radius: float | None = None, via_stack: ComponentSpec | None = 'via_stack_heater_mtop', port_orientation1: int | None = None, port_orientation2: int | None = None, heater_taper_length: float | None = 10.0, straight_widths: Floats | None = None, taper_length: float = 10, n: int | None = 3, straight: ComponentFactory = <function straight>, bend: ComponentFactory = <function bend_euler>, taper: ComponentFactory = functools.partial(<function taper_cross_section>, linear=True, npoints=2)) Component #
Returns a meander based heater.
based on SungWon Chung, Makoto Nakai, and Hossein Hashemi, Low-power thermo-optic silicon modulator for large-scale photonic integrated systems Opt. Express 27, 13430-13459 (2019) https://www.osapublishing.org/oe/abstract.cfm?URI=oe-27-9-13430
- Parameters:
length – total length of the optical path.
spacing – waveguide spacing (center to center).
cross_section – for waveguide.
heater_width – for heater.
extension_length – of input and output optical ports.
layer_heater – for top heater, if None, it does not add a heater.
radius – for the meander bends.
via_stack – for the heater to via_stack metal.
port_orientation1 – in degrees. None adds all orientations.
port_orientation2 – in degrees. None adds all orientations.
heater_taper_length – minimizes current concentrations from heater to via_stack.
straight_widths – widths of the straight sections.
taper_length – from the cross_section.
n – Optional number of passes. If None, it is calculated from the straight_widths.
straight – ComponentFactory for the straight sections.
bend – ComponentFactory for the bend sections.
taper – ComponentFactory for the photonic taper sections.
import gdsfactory as gf
c = gf.components.spiral_meander(length=1000.0, spacing=2.0, heater_width=2.5, extension_length=15.0, via_stack='via_stack_heater_mtop', heater_taper_length=10.0, taper_length=10, n=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
spiral_racetrack#
- gdsfactory.components.spiral_racetrack(min_radius: float | None = 5.0, straight_length: float = 20.0, spacings: Floats = (2, 2, 3, 3, 2, 2), straight_factory: ComponentFactory = <function straight>, bend_factory: ComponentFactory = <function bend_euler>, bend_s_factory: ComponentFactory = <function bend_s>, cross_section: CrossSectionSpec = 'xs_sc', cross_section_s: CrossSectionSpec | None = None, n_bend_points: int | None = None, with_inner_ports: bool = False, extra_90_deg_bend: bool = False) Component [source]#
Returns Racetrack-Spiral.
- Parameters:
min_radius – smallest radius in um.
straight_length – length of the straight segments in um.
spacings – space between the center of neighboring waveguides in um.
straight_factory – factory to generate the straight segments.
bend_factory – factory to generate the bend segments.
bend_s_factory – factory to generate the s-bend segments.
cross_section – cross-section of the waveguides.
cross_section_s – cross-section of the s bend waveguide (optional).
n_bend_points – optional bend points.
with_inner_ports – if True, will build the spiral, but expose the inner ports where the S-bend would be.
extra_90_deg_bend – if True, we add an additional straight + 90 degree bent at the output, so the output port is looking down.
import gdsfactory as gf
c = gf.components.spiral_racetrack(min_radius=5.0, straight_length=20.0, spacings=[2, 2, 3, 3, 2, 2], cross_section='xs_sc', with_inner_ports=False, extra_90_deg_bend=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
spiral_racetrack_fixed_length#
- gdsfactory.components.spiral_racetrack_fixed_length(length: float = 1000, in_out_port_spacing: float = 150, n_straight_sections: int = 8, min_radius: float | None = 5.0, min_spacing: float = 5.0, straight_factory: ComponentFactory = <function straight>, bend_factory: ComponentFactory = <function bend_euler>, bend_s_factory: ComponentFactory = <function bend_s>, cross_section: CrossSectionSpec = 'xs_sc', cross_section_s: CrossSectionSpec | None = None, n_bend_points: int | None = None, with_inner_ports: bool = False) Component [source]#
Returns Racetrack-Spiral with a specified total length.
The input and output ports are aligned in y. This class is meant to be used for generating interferometers with long waveguide lengths, where the most important parameter is the length difference between the arms.
- Parameters:
length – total length of the spiral from input to output ports in um.
in_out_port_spacing – spacing between input and output ports of the spiral in um.
n_straight_sections – total number of straight sections for the racetrack spiral. Has to be even.
min_radius – smallest radius in um.
min_spacing – minimum center-center spacing between adjacent waveguides.
straight_factory – factory to generate the straight segments.
bend_factory – factory to generate the bend segments.
bend_s_factory – factory to generate the s-bend segments.
cross_section – cross-section of the waveguides.
cross_section_s – cross-section of the s bend waveguide (optional).
n_bend_points – optional bend points.
with_inner_ports – if True, will build the spiral, but expose the inner ports where the S-bend would be.
import gdsfactory as gf
c = gf.components.spiral_racetrack_fixed_length(length=1000, in_out_port_spacing=150, n_straight_sections=8, min_radius=5.0, min_spacing=5.0, cross_section='xs_sc', with_inner_ports=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
spiral_racetrack_heater_doped#
- gdsfactory.components.spiral_racetrack_heater_doped(min_radius: float | None = None, straight_length: float = 30, spacing: float = 2, num: int = 8, straight_factory: ComponentFactory = <function straight>, bend_factory: ComponentFactory = <function bend_euler>, bend_s_factory: ComponentFactory = <function bend_s>, waveguide_cross_section: CrossSectionSpec = 'xs_sc', heater_cross_section: CrossSectionSpec = 'xs_npp') Component [source]#
Returns spiral racetrack with a heater between the loops.
based on https://doi.org/10.1364/OL.400230 but with the heater between the loops.
- Parameters:
min_radius – smallest radius in um.
straight_length – length of the straight segments in um.
spacing – space between the center of neighboring waveguides in um.
num – half number of straight sections on each spiral side.
straight_factory – factory to generate the straight segments.
bend_factory – factory to generate the bend segments.
bend_s_factory – factory to generate the s-bend segments.
waveguide_cross_section – cross-section of the waveguides.
heater_cross_section – cross-section of the heater.
import gdsfactory as gf
c = gf.components.spiral_racetrack_heater_doped(straight_length=30, spacing=2, num=8, waveguide_cross_section='xs_sc', heater_cross_section='xs_npp')
c.plot()
(Source code
, png
, hires.png
, pdf
)
spiral_racetrack_heater_metal#
- gdsfactory.components.spiral_racetrack_heater_metal(min_radius: float | None = None, straight_length: float = 30, spacing: float = 2, num: int = 8, straight_factory: ComponentFactory = <function straight>, bend_factory: ComponentFactory = <function bend_euler>, bend_s_factory: ComponentFactory = <function bend_s>, waveguide_cross_section: CrossSectionSpec = 'xs_sc', heater_cross_section: CrossSectionSpec = 'xs_heater_metal', via_stack: ComponentSpec | None = 'via_stack_heater_mtop') Component [source]#
Returns spiral racetrack with a heater above.
based on https://doi.org/10.1364/OL.400230 .
- Parameters:
min_radius – smallest radius.
straight_length – length of the straight segments.
spacing – space between the center of neighboring waveguides.
num – number of straight sections on each spiral side.
straight_factory – factory to generate the straight segments.
bend_factory – factory to generate the bend segments.
bend_s_factory – factory to generate the s-bend segments.
waveguide_cross_section – cross-section of the waveguides.
heater_cross_section – cross-section of the heater.
via_stack – via stack to connect the heater to the metal layer.
import gdsfactory as gf
c = gf.components.spiral_racetrack_heater_metal(straight_length=30, spacing=2, num=8, waveguide_cross_section='xs_sc', heater_cross_section='xs_heater_metal', via_stack='via_stack_heater_mtop')
c.plot()
(Source code
, png
, hires.png
, pdf
)
splitter_chain#
- gdsfactory.components.splitter_chain(splitter: ComponentSpec = <function mmi1x2>, columns: int = 3, bend: ComponentSpec = <function bend_s>) Component [source]#
Chain of splitters.
- Parameters:
splitter – splitter to chain.
columns – number of splitters to chain.
bend – bend to connect splitters.
__o5 __| __| |__o4 o1 _| |__o3 |__o2 __o2 o1 _| |__o3
import gdsfactory as gf
c = gf.components.splitter_chain(columns=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
splitter_tree#
- gdsfactory.components.splitter_tree(coupler: ComponentSpec = <function mmi1x2>, noutputs: int = 4, spacing: Float2 = (90.0, 50.0), bend_s: ComponentSpec | None = <function bend_s>, bend_s_xsize: float | None = None, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Tree of power splitters.
- Parameters:
coupler – coupler factory.
noutputs – number of outputs.
spacing – x, y spacing between couplers.
bend_s – Sbend function for termination.
bend_s_xsize – xsize for the sbend.
cross_section – cross_section.
__| __| |__ _| |__ |__ dy dx
import gdsfactory as gf
c = gf.components.splitter_tree(noutputs=4, spacing=[90.0, 50.0], cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
staircase#
- gdsfactory.components.staircase(component: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, length_v: float = 5.0, length_h: float = 5.0, rows: int = 4, **kwargs) Component [source]#
Returns staircase.
- Parameters:
bend90 – bend spec.
straight – straight spec.
length_v – vertical length.
length_h – vertical length.
rows – number of rows.
cols – number of cols.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.staircase(length_v=5.0, length_h=5.0, rows=4)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight#
- gdsfactory.components.straight(length: float = 10.0, npoints: int = 2, cross_section: CrossSectionSpec = 'xs_sc', **kwargs) Component [source]#
Returns a Straight waveguide.
- Parameters:
length – straight length (um).
npoints – number of points.
cross_section – specification (CrossSection, string or dict).
kwargs – additional cross_section arguments.
o1 -------------- o2 length
import gdsfactory as gf
c = gf.components.straight(length=10.0, npoints=2, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_array#
- gdsfactory.components.straight_array(n: int = 4, spacing: float = 4.0, length: float = 10.0, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Array of straights connected with grating couplers.
useful to align the 4 corners of the chip
- Parameters:
n – number of straights.
spacing – edge to edge straight spacing.
length – straight length (um).
cross_section – specification (CrossSection, string or dict).
import gdsfactory as gf
c = gf.components.straight_array(n=4, spacing=4.0, length=10.0, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_heater_doped_rib#
- gdsfactory.components.straight_heater_doped_rib(length: float = 320.0, nsections: int = 3, cross_section: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5, sections=(Section(width=0.2, offset=0, insets=None, layer='SLAB90', port_names=(None, None), port_types=('optical', 'optical'), name='slab', hidden=False, simplify=None, width_function=None, offset_function=None), )), cross_section_heater: CrossSectionSpec = <function rib_heater_doped>, via_stack: ComponentSpec | None = functools.partial(<function via_stack>, layers=('SLAB90', 'NPP', 'M1'), vias=(None, None, functools.partial(<function via>, layer='VIAC'))), via_stack_metal: ComponentSpec | None = functools.partial(<function via_stack>, layers=('M1', 'M2', 'MTOP'), vias=(functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2'), None)), via_stack_metal_size: tuple[float, float] = (10.0, 10.0), via_stack_size: tuple[float, float] = (10.0, 10.0), taper: ComponentSpec | None = <function taper_cross_section>, heater_width: float = 2.0, heater_gap: float = 0.8, via_stack_gap: float = 0.0, width: float = 0.5, xoffset_tip1: float = 0.2, xoffset_tip2: float = 0.4) Component [source]#
Returns a doped thermal phase shifter.
dimensions from https://doi.org/10.1364/OE.27.010456
- Parameters:
length – of the waveguide in um.
nsections – between via_stacks.
cross_section – for the input/output ports.
cross_section_heater – for the heater.
via_stack – optional function to connect the heater strip.
via_stack_metal – function to connect the metal area.
via_stack_metal_size – x, y size in um.
via_stack_size – x, y size in um.
taper – optional taper spec.
heater_width – in um.
heater_gap – in um.
via_stack_gap – from edge of via_stack to waveguide.
width – waveguide width on the ridge.
xoffset_tip1 – distance in um from input taper to via_stack.
xoffset_tip2 – distance in um from output taper to via_stack.
length |<--------------------------------------------->| | length_section | | <---------------------------> | | length_via_stack | | <-------> taper| | __________ _________ | | | | | | | | | via_stack|__________________| | | | | size | heater width | | | | /|__________|__________________|________|\ | | / | heater_gap | \ | |/ |______________________________________| \ | \ |_______________width__________________| / \ | | / \|_____________heater_gap______________ |/ | | | | | |____heater_width____| | | | | | |________| |________| taper cross_section_heater |<------width------>| ____________________ heater_gap slab_gap top_via_stack | |<---------->| bot_via_stack <--> ___ ______________________| |___________________________|___ | | | undoped Si | | | | |layer_heater| intrinsic region |layer_heater | | |___|____________|__________________________________________|______________|___| <------------> heater_width <------------------------------------------------------------------------------> slab_width
import gdsfactory as gf
c = gf.components.straight_heater_doped_rib(length=320.0, nsections=3, via_stack_metal_size=[10.0, 10.0], via_stack_size=[10.0, 10.0], heater_width=2.0, heater_gap=0.8, via_stack_gap=0.0, width=0.5, xoffset_tip1=0.2, xoffset_tip2=0.4)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_heater_doped_strip#
- gdsfactory.components.straight_heater_doped_strip(length: float = 320.0, nsections: int = 3, cross_section: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5, sections=(Section(width=0.2, offset=0, insets=None, layer='SLAB90', port_names=(None, None), port_types=('optical', 'optical'), name='slab', hidden=False, simplify=None, width_function=None, offset_function=None), )), *, cross_section_heater: CrossSectionSpec = <function strip_heater_doped>, via_stack: ComponentSpec | None = functools.partial(<function via_stack>, layers=('WG', 'NPP', 'M1'), vias=(None, None, functools.partial(<function via>, layer='VIAC'))), via_stack_metal: ComponentSpec | None = functools.partial(<function via_stack>, layers=('M1', 'M2', 'MTOP'), vias=(functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2'), None)), via_stack_metal_size: tuple[float, float] = (10.0, 10.0), via_stack_size: tuple[float, float] = (10.0, 10.0), taper: ComponentSpec | None = <function taper_cross_section>, heater_width: float = 2.0, heater_gap: float = 0.8, via_stack_gap: float = 0.0, width: float = 0.5, xoffset_tip1: float = 0.2, xoffset_tip2: float = 0.4) Component #
Returns a doped thermal phase shifter.
dimensions from https://doi.org/10.1364/OE.27.010456
- Parameters:
length – of the waveguide in um.
nsections – between via_stacks.
cross_section – for the input/output ports.
cross_section_heater – for the heater.
via_stack – optional function to connect the heater strip.
via_stack_metal – function to connect the metal area.
via_stack_metal_size – x, y size in um.
via_stack_size – x, y size in um.
taper – optional taper spec.
heater_width – in um.
heater_gap – in um.
via_stack_gap – from edge of via_stack to waveguide.
width – waveguide width on the ridge.
xoffset_tip1 – distance in um from input taper to via_stack.
xoffset_tip2 – distance in um from output taper to via_stack.
length |<--------------------------------------------->| | length_section | | <---------------------------> | | length_via_stack | | <-------> taper| | __________ _________ | | | | | | | | | via_stack|__________________| | | | | size | heater width | | | | /|__________|__________________|________|\ | | / | heater_gap | \ | |/ |______________________________________| \ | \ |_______________width__________________| / \ | | / \|_____________heater_gap______________ |/ | | | | | |____heater_width____| | | | | | |________| |________| taper cross_section_heater |<------width------>| ____________________ heater_gap slab_gap top_via_stack | |<---------->| bot_via_stack <--> ___ ______________________| |___________________________|___ | | | undoped Si | | | | |layer_heater| intrinsic region |layer_heater | | |___|____________|__________________________________________|______________|___| <------------> heater_width <------------------------------------------------------------------------------> slab_width
import gdsfactory as gf
c = gf.components.straight_heater_doped_strip(length=320.0, nsections=3, via_stack_metal_size=[10.0, 10.0], via_stack_size=[10.0, 10.0], heater_width=2.0, heater_gap=0.8, via_stack_gap=0.0, width=0.5, xoffset_tip1=0.2, xoffset_tip2=0.4)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_heater_meander#
- gdsfactory.components.straight_heater_meander(length: float = 300.0, spacing: float = 2.0, cross_section: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5), heater_width: float = 2.5, extension_length: float = 15.0, layer_heater: LayerSpec | None = 'HEATER', radius: float | None = None, via_stack: ComponentSpec | None = 'via_stack_heater_mtop', port_orientation1: int | None = None, port_orientation2: int | None = None, heater_taper_length: float | None = 10.0, straight_widths: Floats | None = (0.8, 0.9, 0.8), taper_length: float = 10, n: int | None = None, straight: ComponentFactory = <function straight>, bend: ComponentFactory = <function bend_euler>, taper: ComponentFactory = functools.partial(<function taper_cross_section>, linear=True, npoints=2)) Component [source]#
Returns a meander based heater.
based on SungWon Chung, Makoto Nakai, and Hossein Hashemi, Low-power thermo-optic silicon modulator for large-scale photonic integrated systems Opt. Express 27, 13430-13459 (2019) https://www.osapublishing.org/oe/abstract.cfm?URI=oe-27-9-13430
- Parameters:
length – total length of the optical path.
spacing – waveguide spacing (center to center).
cross_section – for waveguide.
heater_width – for heater.
extension_length – of input and output optical ports.
layer_heater – for top heater, if None, it does not add a heater.
radius – for the meander bends.
via_stack – for the heater to via_stack metal.
port_orientation1 – in degrees. None adds all orientations.
port_orientation2 – in degrees. None adds all orientations.
heater_taper_length – minimizes current concentrations from heater to via_stack.
straight_widths – widths of the straight sections.
taper_length – from the cross_section.
n – Optional number of passes. If None, it is calculated from the straight_widths.
straight – ComponentFactory for the straight sections.
bend – ComponentFactory for the bend sections.
taper – ComponentFactory for the photonic taper sections.
import gdsfactory as gf
c = gf.components.straight_heater_meander(length=300.0, spacing=2.0, heater_width=2.5, extension_length=15.0, layer_heater='HEATER', via_stack='via_stack_heater_mtop', heater_taper_length=10.0, straight_widths=[0.8, 0.9, 0.8], taper_length=10)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_heater_meander_doped#
- gdsfactory.components.straight_heater_meander_doped(length: float = 300.0, spacing: float = 2.0, cross_section: gf.typings.CrossSectionSpec = 'xs_sc', heater_width: float = 1.5, extension_length: float = 15.0, layers_doping: LayerSpecs = ('P', 'PP', 'PPP'), radius: float = 5.0, via_stack: ComponentSpec | None = functools.partial(<function via_stack>, size=(1.5, 1.5), layers=('M1', 'M2'), vias=(functools.partial(<function via>, layer='VIAC', size=(0.1, 0.1), spacing=(0.2, 0.2), enclosure=0.1), functools.partial(<function via>, layer='VIA1', size=(0.1, 0.1), spacing=(0.2, 0.2), enclosure=0.1))), port_orientation1: int | None = None, port_orientation2: int | None = None, straight_widths: Floats = (0.8, 0.9, 0.8), taper_length: float = 10) Component [source]#
Returns a meander based heater.
based on SungWon Chung, Makoto Nakai, and Hossein Hashemi, Low-power thermo-optic silicon modulator for large-scale photonic integrated systems Opt. Express 27, 13430-13459 (2019) https://www.osapublishing.org/oe/abstract.cfm?URI=oe-27-9-13430
- Parameters:
length – total length of the optical path.
spacing – waveguide spacing (center to center).
cross_section – for waveguide.
heater_width – for heater.
extension_length – of input and output optical ports.
layers_doping – doping layers to be used for heater.
radius – for the meander bends.
via_stack – for the heater to via_stack metal.
port_orientation1 – in degrees. None adds all orientations.
port_orientation2 – in degrees. None adds all orientations.
straight_width – width of the straight section.
taper_length – from the cross_section.
import gdsfactory as gf
c = gf.components.straight_heater_meander_doped(length=300.0, spacing=2.0, cross_section='xs_sc', heater_width=1.5, extension_length=15.0, layers_doping=['P', 'PP', 'PPP'], radius=5.0, straight_widths=[0.8, 0.9, 0.8], taper_length=10)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_heater_metal#
- gdsfactory.components.straight_heater_metal(length: float = 320.0, *, length_undercut_spacing: float = 0, length_undercut: float = 5, length_straight: float = 0.1, length_straight_input: float = 0.1, cross_section: CrossSectionSpec = 'xs_sc', cross_section_heater: CrossSectionSpec = 'xs_heater_metal', cross_section_waveguide_heater: CrossSectionSpec = 'xs_sc_heater_metal', cross_section_heater_undercut: CrossSectionSpec = 'xs_sc_heater_metal_undercut', with_undercut: bool = False, via_stack: ComponentSpec | None = 'via_stack_heater_mtop', port_orientation1: int | None = None, port_orientation2: int | None = None, heater_taper_length: float | None = 5.0, ohms_per_square: float | None = None, straight: ComponentSpec = <function straight>) Component #
Returns a thermal phase shifter.
dimensions from https://doi.org/10.1364/OE.27.010456
- Parameters:
length – of the waveguide.
length_undercut_spacing – from undercut regions.
length_undercut – length of each undercut section.
length_straight – from where the trenches start to the via_stack.
length_straight_input – from input port to where trenches start.
cross_section – for waveguide ports.
cross_section_heater – for heated sections. heater metal only.
cross_section_waveguide_heater – for heated sections.
cross_section_heater_undercut – for heated sections with undercut.
with_undercut – isolation trenches for higher efficiency.
via_stack – via stack.
port_orientation1 – left via stack port orientation.
port_orientation2 – right via stack port orientation.
heater_taper_length – minimizes current concentrations from heater to via_stack.
ohms_per_square – to calculate resistance.
straight – straight component.
import gdsfactory as gf
c = gf.components.straight_heater_metal(length=320.0, length_undercut_spacing=0, length_undercut=5, length_straight=0.1, length_straight_input=0.1, cross_section='xs_sc', cross_section_heater='xs_heater_metal', cross_section_waveguide_heater='xs_sc_heater_metal', cross_section_heater_undercut='xs_sc_heater_metal_undercut', with_undercut=False, via_stack='via_stack_heater_mtop', heater_taper_length=5.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_heater_metal_90_90#
- gdsfactory.components.straight_heater_metal_90_90(length: float = 320.0, *, length_undercut_spacing: float = 0, length_undercut: float = 5, length_straight: float = 0.1, length_straight_input: float = 0.1, cross_section: CrossSectionSpec = 'xs_sc', cross_section_heater: CrossSectionSpec = 'xs_heater_metal', cross_section_waveguide_heater: CrossSectionSpec = 'xs_sc_heater_metal', cross_section_heater_undercut: CrossSectionSpec = 'xs_sc_heater_metal_undercut', with_undercut: bool = False, via_stack: ComponentSpec | None = 'via_stack_heater_mtop', port_orientation1: int | None = 90, port_orientation2: int | None = 90, heater_taper_length: float | None = 5.0, ohms_per_square: float | None = None, straight: ComponentSpec = <function straight>) Component #
Returns a thermal phase shifter.
dimensions from https://doi.org/10.1364/OE.27.010456
- Parameters:
length – of the waveguide.
length_undercut_spacing – from undercut regions.
length_undercut – length of each undercut section.
length_straight – from where the trenches start to the via_stack.
length_straight_input – from input port to where trenches start.
cross_section – for waveguide ports.
cross_section_heater – for heated sections. heater metal only.
cross_section_waveguide_heater – for heated sections.
cross_section_heater_undercut – for heated sections with undercut.
with_undercut – isolation trenches for higher efficiency.
via_stack – via stack.
port_orientation1 – left via stack port orientation.
port_orientation2 – right via stack port orientation.
heater_taper_length – minimizes current concentrations from heater to via_stack.
ohms_per_square – to calculate resistance.
straight – straight component.
import gdsfactory as gf
c = gf.components.straight_heater_metal_90_90(length=320.0, length_undercut_spacing=0, length_undercut=5, length_straight=0.1, length_straight_input=0.1, cross_section='xs_sc', cross_section_heater='xs_heater_metal', cross_section_waveguide_heater='xs_sc_heater_metal', cross_section_heater_undercut='xs_sc_heater_metal_undercut', with_undercut=False, via_stack='via_stack_heater_mtop', port_orientation1=90, port_orientation2=90, heater_taper_length=5.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_heater_metal_simple#
- gdsfactory.components.straight_heater_metal_simple(length: float = 320.0, cross_section_heater: CrossSectionSpec = 'xs_heater_metal', cross_section_waveguide_heater: CrossSectionSpec = 'xs_sc_heater_metal', via_stack: ComponentSpec | None = 'via_stack_heater_mtop', port_orientation1: int | None = None, port_orientation2: int | None = None, heater_taper_length: float | None = 5.0, ohms_per_square: float | None = None, straight: ComponentSpec = <function straight>) Component [source]#
Returns a thermal phase shifter that has properly fixed electrical connectivity to extract a suitable electrical netlist and models. dimensions from https://doi.org/10.1364/OE.27.010456
- Parameters:
length – of the waveguide.
cross_section_heater – for heated sections. heater metal only.
cross_section_waveguide_heater – for heated sections.
via_stack – via stack.
port_orientation1 – left via stack port orientation.
port_orientation2 – right via stack port orientation.
heater_taper_length – minimizes current concentrations from heater to via_stack.
ohms_per_square – to calculate resistance.
straight – straight component.
import gdsfactory as gf
c = gf.components.straight_heater_metal_simple(length=320.0, cross_section_heater='xs_heater_metal', cross_section_waveguide_heater='xs_sc_heater_metal', via_stack='via_stack_heater_mtop', heater_taper_length=5.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_heater_metal_undercut#
- gdsfactory.components.straight_heater_metal_undercut(length: float = 320.0, length_undercut_spacing: float = 6.0, length_undercut: float = 30.0, length_straight: float = 0.1, length_straight_input: float = 15.0, cross_section: CrossSectionSpec = 'xs_sc', cross_section_heater: CrossSectionSpec = 'xs_heater_metal', cross_section_waveguide_heater: CrossSectionSpec = 'xs_sc_heater_metal', cross_section_heater_undercut: CrossSectionSpec = 'xs_sc_heater_metal_undercut', with_undercut: bool = True, via_stack: ComponentSpec | None = 'via_stack_heater_mtop', port_orientation1: int | None = None, port_orientation2: int | None = None, heater_taper_length: float | None = 5.0, ohms_per_square: float | None = None, straight: ComponentSpec = <function straight>) Component [source]#
Returns a thermal phase shifter.
dimensions from https://doi.org/10.1364/OE.27.010456
- Parameters:
length – of the waveguide.
length_undercut_spacing – from undercut regions.
length_undercut – length of each undercut section.
length_straight – from where the trenches start to the via_stack.
length_straight_input – from input port to where trenches start.
cross_section – for waveguide ports.
cross_section_heater – for heated sections. heater metal only.
cross_section_waveguide_heater – for heated sections.
cross_section_heater_undercut – for heated sections with undercut.
with_undercut – isolation trenches for higher efficiency.
via_stack – via stack.
port_orientation1 – left via stack port orientation.
port_orientation2 – right via stack port orientation.
heater_taper_length – minimizes current concentrations from heater to via_stack.
ohms_per_square – to calculate resistance.
straight – straight component.
import gdsfactory as gf
c = gf.components.straight_heater_metal_undercut(length=320.0, length_undercut_spacing=6.0, length_undercut=30.0, length_straight=0.1, length_straight_input=15.0, cross_section='xs_sc', cross_section_heater='xs_heater_metal', cross_section_waveguide_heater='xs_sc_heater_metal', cross_section_heater_undercut='xs_sc_heater_metal_undercut', with_undercut=True, via_stack='via_stack_heater_mtop', heater_taper_length=5.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_heater_metal_undercut_90_90#
- gdsfactory.components.straight_heater_metal_undercut_90_90(length: float = 320.0, length_undercut_spacing: float = 6.0, length_undercut: float = 30.0, length_straight: float = 0.1, length_straight_input: float = 15.0, cross_section: CrossSectionSpec = 'xs_sc', cross_section_heater: CrossSectionSpec = 'xs_heater_metal', cross_section_waveguide_heater: CrossSectionSpec = 'xs_sc_heater_metal', cross_section_heater_undercut: CrossSectionSpec = 'xs_sc_heater_metal_undercut', with_undercut: bool = True, via_stack: ComponentSpec | None = 'via_stack_heater_mtop', *, port_orientation1: int | None = 90, port_orientation2: int | None = 90, heater_taper_length: float | None = 5.0, ohms_per_square: float | None = None, straight: ComponentSpec = <function straight>) Component #
Returns a thermal phase shifter.
dimensions from https://doi.org/10.1364/OE.27.010456
- Parameters:
length – of the waveguide.
length_undercut_spacing – from undercut regions.
length_undercut – length of each undercut section.
length_straight – from where the trenches start to the via_stack.
length_straight_input – from input port to where trenches start.
cross_section – for waveguide ports.
cross_section_heater – for heated sections. heater metal only.
cross_section_waveguide_heater – for heated sections.
cross_section_heater_undercut – for heated sections with undercut.
with_undercut – isolation trenches for higher efficiency.
via_stack – via stack.
port_orientation1 – left via stack port orientation.
port_orientation2 – right via stack port orientation.
heater_taper_length – minimizes current concentrations from heater to via_stack.
ohms_per_square – to calculate resistance.
straight – straight component.
import gdsfactory as gf
c = gf.components.straight_heater_metal_undercut_90_90(length=320.0, length_undercut_spacing=6.0, length_undercut=30.0, length_straight=0.1, length_straight_input=15.0, cross_section='xs_sc', cross_section_heater='xs_heater_metal', cross_section_waveguide_heater='xs_sc_heater_metal', cross_section_heater_undercut='xs_sc_heater_metal_undercut', with_undercut=True, via_stack='via_stack_heater_mtop', port_orientation1=90, port_orientation2=90, heater_taper_length=5.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_pin#
- gdsfactory.components.straight_pin(length: float = 500.0, cross_section: CrossSectionSpec = <function pin>, via_stack: ComponentSpec = functools.partial(<function via_stack>, layers=('SLAB90', 'M1', 'M2', 'MTOP'), vias=(functools.partial(<function via>, layer='VIAC'), functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2'), None)), via_stack_width: float = 10.0, via_stack_spacing: float = 2, taper: ComponentSpec | None = <function taper_strip_to_ridge>) Component [source]#
Returns rib waveguide with doping and via_stacks used for PN and PIN modulators.
For PIN: https://doi.org/10.1364/OE.26.029983
500um length for PI phase shift https://ieeexplore.ieee.org/document/8268112
to go beyond 2PI, you will need at least 1mm https://ieeexplore.ieee.org/document/8853396/
For PN: Typical lengths in practice are 2-5mm depending on doping,engineering and application: https://opg.optica.org/oe/fulltext.cfm?uri=oe-21-25-30350&id=275107 https://opg.optica.org/oe/fulltext.cfm?uri=oe-20-11-12014&id=233271
- Parameters:
length – of the waveguide.
cross_section – for the waveguide.
via_stack – for the via_stacks.
via_stack_width – width of the via_stack.
via_stack_spacing – spacing between via_stacks.
taper – optional taper.
import gdsfactory as gf
c = gf.components.straight_pin(length=500.0, via_stack_width=10.0, via_stack_spacing=2)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_pin_slot#
- gdsfactory.components.straight_pin_slot(length: float = 500.0, cross_section: CrossSectionSpec = <function pin>, via_stack: ComponentSpec | None = functools.partial(<function via_stack>, layers=('M1', 'M2', 'MTOP'), vias=(functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2'), None)), via_stack_width: float = 10.0, via_stack_slab: ComponentSpec | None = functools.partial(<function via_stack_slot>, layers=('M1', ), via=functools.partial(<function via>, layer='VIAC'), layer_offsets=(0, )), via_stack_slab_top: ComponentSpec | None = None, via_stack_slab_bot: ComponentSpec | None = None, via_stack_slab_width: float | None = None, via_stack_spacing: float = 3.0, via_stack_slab_spacing: float = 2.0, taper: ComponentSpec | None = <function taper_strip_to_ridge>, **kwargs) Component [source]#
Returns a PIN straight waveguide with slotted via.
https://doi.org/10.1364/OE.26.029983
500um length for PI phase shift https://ieeexplore.ieee.org/document/8268112
to go beyond 2PI, you will need at least 1mm https://ieeexplore.ieee.org/document/8853396/
- Parameters:
length – of the waveguide.
cross_section – for the waveguide.
via_stack – for via_stacking the metal.
via_stack_width – in um.
via_stack_slab – function for the component via_stacking the slab.
via_stack_slab_top – Optional, defaults to via_stack_slab.
via_stack_slab_bot – Optional, defaults to via_stack_slab.
via_stack_slab_width – defaults to via_stack_width.
via_stack_spacing – spacing between via_stacks.
via_stack_slab_spacing – spacing between via_stacks slabs.
taper – optional taper.
horizontal_via_stack – if True, the waveguide is horizontal.
kwargs – straight settings.
import gdsfactory as gf
c = gf.components.straight_pin_slot(length=500.0, via_stack_width=10.0, via_stack_spacing=3.0, via_stack_slab_spacing=2.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_pn#
- gdsfactory.components.straight_pn(*, length: float = 2000, cross_section: CrossSectionSpec = <function pn>, via_stack: ComponentSpec = functools.partial(<function via_stack>, layers=('SLAB90', 'M1', 'M2', 'MTOP'), vias=(functools.partial(<function via>, layer='VIAC'), functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2'), None)), via_stack_width: float = 10.0, via_stack_spacing: float = 2, taper: ComponentSpec | None = <function taper_strip_to_ridge>) Component #
Returns rib waveguide with doping and via_stacks used for PN and PIN modulators.
For PIN: https://doi.org/10.1364/OE.26.029983
500um length for PI phase shift https://ieeexplore.ieee.org/document/8268112
to go beyond 2PI, you will need at least 1mm https://ieeexplore.ieee.org/document/8853396/
For PN: Typical lengths in practice are 2-5mm depending on doping,engineering and application: https://opg.optica.org/oe/fulltext.cfm?uri=oe-21-25-30350&id=275107 https://opg.optica.org/oe/fulltext.cfm?uri=oe-20-11-12014&id=233271
- Parameters:
length – of the waveguide.
cross_section – for the waveguide.
via_stack – for the via_stacks.
via_stack_width – width of the via_stack.
via_stack_spacing – spacing between via_stacks.
taper – optional taper.
import gdsfactory as gf
c = gf.components.straight_pn(length=2000, via_stack_width=10.0, via_stack_spacing=2)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_rib#
- gdsfactory.components.straight_rib(length: float = 10.0, npoints: int = 2, *, cross_section: CrossSectionSpec = functools.partial(<function cross_section>, radius=20, radius_min=20, sections=(Section(width=6.0, offset=0, insets=None, layer='SLAB90', port_names=(None, None), port_types=('optical', 'optical'), name='slab', hidden=False, simplify=0.05, width_function=None, offset_function=None), )), **kwargs) Component #
Returns a Straight waveguide.
- Parameters:
length – straight length (um).
npoints – number of points.
cross_section – specification (CrossSection, string or dict).
kwargs – additional cross_section arguments.
o1 -------------- o2 length
import gdsfactory as gf
c = gf.components.straight_rib(length=10.0, npoints=2)
c.plot()
(Source code
, png
, hires.png
, pdf
)
straight_rib_tapered#
- gdsfactory.components.straight_rib_tapered(*, component: ComponentSpec = functools.partial(<function straight>, cross_section=functools.partial(<function cross_section>, radius=20, radius_min=20, sections=(Section(width=6.0, offset=0, insets=None, layer='SLAB90', port_names=(None, None), port_types=('optical', 'optical'), name='slab', hidden=False, simplify=0.05, width_function=None, offset_function=None), ))), port_names: tuple[str, ...] | None = None, length: float = 5.0, extension: ComponentSpec | None = <function taper_strip_to_ridge>, port1: str | None = 'o2', port2: str | None = 'o1', port_type: str = 'optical', centered: bool = False, cross_section: CrossSectionSpec | None = None, extension_port_names: list[str] | None = None, **kwargs) Component #
Returns a new component with some ports extended.
You can define extension Spec defaults to port cross_section of each port to extend.
- Parameters:
component – component to extend ports.
port_names – list of ports names to extend, if None it extends all ports.
length – extension length.
extension – function to extend ports (defaults to a straight).
port1 – extension input port name.
port2 – extension output port name.
port_type – type of the ports to extend.
centered – if True centers rectangle at (0, 0).
cross_section – extension cross_section, defaults to port cross_section if port has no cross_section it creates one using width and layer.
extension_port_names – extension port names add to the new component.
- Keyword Arguments:
layer – port GDS layer.
prefix – port name prefix.
orientation – in degrees.
width – port width.
layers_excluded – List of layers to exclude.
port_type – optical, electrical, ….
clockwise – if True, sort ports clockwise, False: counter-clockwise.
import gdsfactory as gf
c = gf.components.straight_rib_tapered(length=5.0, port1='o2', port2='o1', port_type='optical', centered=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
switch_tree#
- gdsfactory.components.switch_tree(*, coupler: ComponentSpec = functools.partial(<function mzi>, combiner=<function mmi2x2>, port_e1_combiner='o3', port_e0_combiner='o4', delta_length=0, straight_x_top=functools.partial(<function straight_heater_metal_undercut>, with_undercut=False, length_straight_input=0.1, length_undercut=5, length_undercut_spacing=0), length_x=None), noutputs: int = 4, spacing: Float2 = (500, 100), bend_s: ComponentSpec | None = <function bend_s>, bend_s_xsize: float | None = None, cross_section: CrossSectionSpec = 'xs_sc') Component #
Tree of power splitters.
- Parameters:
coupler – coupler factory.
noutputs – number of outputs.
spacing – x, y spacing between couplers.
bend_s – Sbend function for termination.
bend_s_xsize – xsize for the sbend.
cross_section – cross_section.
__| __| |__ _| |__ |__ dy dx
import gdsfactory as gf
c = gf.components.switch_tree(noutputs=4, spacing=[500, 100], cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
taper#
- gdsfactory.components.taper(length: float = 10.0, width1: float = 0.5, width2: float | None = None, port: Port | None = None, with_two_ports: bool = True, cross_section: CrossSectionSpec = 'xs_sc', port_names: tuple | None = ('o1', 'o2'), port_types: tuple | None = ('optical', 'optical'), **kwargs) Component [source]#
Linear taper, which tapers only the main cross section section.
Deprecated, use gf.components.taper_cross_section instead
- Parameters:
length – taper length.
width1 – width of the west/left port.
width2 – width of the east/right port. Defaults to width1.
port – can taper from a port instead of defining width1.
with_two_ports – includes a second port. False for terminator and edge coupler fiber interface.
cross_section – specification (CrossSection, string, CrossSectionFactory dict).
port_names (tuple) – Ordered tuple of port names. First port is default taper port, second name only if with_two_ports flags used.
port_types (tuple) – Ordered tuple of port types. First port is default taper port, second name only if with_two_ports flags used.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.taper(length=10.0, width1=0.5, with_two_ports=True, cross_section='xs_sc', port_names=['o1', 'o2'], port_types=['optical', 'optical'])
c.plot()
(Source code
, png
, hires.png
, pdf
)
taper_adiabatic#
- gdsfactory.components.taper_adiabatic(width1: float = 0.5, width2: float = 5.0, length: float = 0, neff_w: ~collections.abc.Callable = <function neff_TE1550SOI_220nm>, alpha: float = 1, wavelength: float = 1.55, npoints: int = 200, cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Returns a straight adiabatic_taper from an effective index callable.
- Parameters:
width1 – initial width.
width2 – final width.
length – 0 uses the optimized length, and otherwise the optimal shape is compressed/stretched to the specified length.
neff_w – a callable that returns the effective index as a function of width - By default, will use a compact model of neff(y) for fundamental 1550 nm TE mode of 220nm-thick core with 3.45 index, fully clad with 1.44 index. Many coefficients are needed to capture the behaviour.
alpha – parameter that scales the rate of width change. - closer to 0 means longer and more adiabatic; - 1 is the intuitive limit beyond which higher order modes are excited; - [2] reports good performance up to 1.4 for fundamental TE in SOI (for multiple core thicknesses)
wavelength – wavelength in um.
npoints – number of points for sampling.
cross_section – cross_section specification.
References
[1] Burns, W. K., et al. “Optical waveguide parabolic coupling horns.” Appl. Phys. Lett., vol. 30, no. 1, 1 Jan. 1977, pp. 28-30, doi:10.1063/1.89199. [2] Fu, Yunfei, et al. “Efficient adiabatic silicon-on-insulator waveguide taper.” Photonics Res., vol. 2, no. 3, 1 June 2014, pp. A41-A44, doi:10.1364/PRJ.2.000A41. npoints: number of points for sampling
import gdsfactory as gf
c = gf.components.taper_adiabatic(width1=0.5, width2=5.0, length=0, alpha=1, wavelength=1.55, npoints=200, cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
taper_cross_section#
- gdsfactory.components.taper_cross_section(cross_section1: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5, sections=(Section(width=0.2, offset=0, insets=None, layer='SLAB90', port_names=(None, None), port_types=('optical', 'optical'), name='slab', hidden=False, simplify=None, width_function=None, offset_function=None), )), cross_section2: CrossSectionSpec = 'xs_rc', length: float = 10, npoints: int = 100, linear: bool = False, width_type: str = 'sine', **kwargs) Component [source]#
Returns taper transition between cross_section1 and cross_section2.
- Parameters:
cross_section1 – start cross_section factory.
cross_section2 – end cross_section factory.
length – transition length.
npoints – number of points.
linear – shape of the transition, sine when False.
width_type – shape of the transition ONLY IF linear is False.
kwargs – cross_section settings for both cross_sections.
_____________________ / _______/______________________ / cross_section1 | cross_section2 ______\_______________________ \ \_____________________
import gdsfactory as gf
c = gf.components.taper_cross_section(cross_section2='xs_rc', length=10, npoints=100, linear=False, width_type='sine')
c.plot()
(Source code
, png
, hires.png
, pdf
)
taper_cross_section_linear#
- gdsfactory.components.taper_cross_section_linear(cross_section1: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5, sections=(Section(width=0.2, offset=0, insets=None, layer='SLAB90', port_names=(None, None), port_types=('optical', 'optical'), name='slab', hidden=False, simplify=None, width_function=None, offset_function=None), )), cross_section2: CrossSectionSpec = 'xs_rc', length: float = 10, *, npoints: int = 2, linear: bool = True, width_type: str = 'sine', **kwargs) Component #
Returns taper transition between cross_section1 and cross_section2.
- Parameters:
cross_section1 – start cross_section factory.
cross_section2 – end cross_section factory.
length – transition length.
npoints – number of points.
linear – shape of the transition, sine when False.
width_type – shape of the transition ONLY IF linear is False.
kwargs – cross_section settings for both cross_sections.
_____________________ / _______/______________________ / cross_section1 | cross_section2 ______\_______________________ \ \_____________________
import gdsfactory as gf
c = gf.components.taper_cross_section_linear(cross_section2='xs_rc', length=10, npoints=2, linear=True, width_type='sine')
c.plot()
(Source code
, png
, hires.png
, pdf
)
taper_cross_section_parabolic#
- gdsfactory.components.taper_cross_section_parabolic(cross_section1: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5, sections=(Section(width=0.2, offset=0, insets=None, layer='SLAB90', port_names=(None, None), port_types=('optical', 'optical'), name='slab', hidden=False, simplify=None, width_function=None, offset_function=None), )), cross_section2: CrossSectionSpec = 'xs_rc', length: float = 10, *, npoints: int = 101, linear: bool = False, width_type: str = 'parabolic', **kwargs) Component #
Returns taper transition between cross_section1 and cross_section2.
- Parameters:
cross_section1 – start cross_section factory.
cross_section2 – end cross_section factory.
length – transition length.
npoints – number of points.
linear – shape of the transition, sine when False.
width_type – shape of the transition ONLY IF linear is False.
kwargs – cross_section settings for both cross_sections.
_____________________ / _______/______________________ / cross_section1 | cross_section2 ______\_______________________ \ \_____________________
import gdsfactory as gf
c = gf.components.taper_cross_section_parabolic(cross_section2='xs_rc', length=10, npoints=101, linear=False, width_type='parabolic')
c.plot()
(Source code
, png
, hires.png
, pdf
)
taper_cross_section_sine#
- gdsfactory.components.taper_cross_section_sine(cross_section1: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5, sections=(Section(width=0.2, offset=0, insets=None, layer='SLAB90', port_names=(None, None), port_types=('optical', 'optical'), name='slab', hidden=False, simplify=None, width_function=None, offset_function=None), )), cross_section2: CrossSectionSpec = 'xs_rc', length: float = 10, *, npoints: int = 101, linear: bool = False, width_type: str = 'sine', **kwargs) Component #
Returns taper transition between cross_section1 and cross_section2.
- Parameters:
cross_section1 – start cross_section factory.
cross_section2 – end cross_section factory.
length – transition length.
npoints – number of points.
linear – shape of the transition, sine when False.
width_type – shape of the transition ONLY IF linear is False.
kwargs – cross_section settings for both cross_sections.
_____________________ / _______/______________________ / cross_section1 | cross_section2 ______\_______________________ \ \_____________________
import gdsfactory as gf
c = gf.components.taper_cross_section_sine(cross_section2='xs_rc', length=10, npoints=101, linear=False, width_type='sine')
c.plot()
(Source code
, png
, hires.png
, pdf
)
taper_from_csv#
- gdsfactory.components.taper_from_csv(filepath: Path = PosixPath('/home/runner/work/gdsfactory7/gdsfactory7/gdsfactory/components/csv_data/taper_strip_0p5_3_36.csv'), cross_section: CrossSectionSpec = 'xs_sc') Component [source]#
Returns taper from CSV file.
- Parameters:
filepath – for CSV file.
cross_section – specification (CrossSection, string, CrossSectionFactory dict).
import gdsfactory as gf
c = gf.components.taper_from_csv(cross_section='xs_sc')
c.plot()
(Source code
, png
, hires.png
, pdf
)
taper_parabolic#
- gdsfactory.components.taper_parabolic(length: float = 20, width1: float = 0.5, width2: float = 5.0, exp: float = 0.5, npoints: int = 100, layer: LayerSpec = 'WG') Component [source]#
Returns a parabolic_taper.
- Parameters:
length – in um.
width1 – in um.
width2 – in um.
exp – exponent.
npoints – number of points.
layer – layer spec.
import gdsfactory as gf
c = gf.components.taper_parabolic(length=20, width1=0.5, width2=5.0, exp=0.5, npoints=100, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
taper_sc_nc#
- gdsfactory.components.taper_sc_nc(*, length: float = 20.0, width1: float = 0.5, width2: float = 0.15, w_slab1: float = 0.15, w_slab2: float = 1.0, layer_wg: LayerSpec = 'WG', layer_slab: LayerSpec = 'WGN', cross_section: CrossSectionSpec = 'xs_sc', use_slab_port: bool = True, **kwargs) Component #
Linear taper from strip to rib.
Deprecated, use gf.components.taper_cross_section instead.
- Parameters:
length – taper length (um).
width1 – in um.
width2 – in um.
w_slab1 – slab width in um.
w_slab2 – slab width in um.
layer_wg – for input waveguide.
layer_slab – for output waveguide with slab.
cross_section – for input waveguide.
use_slab_port – if True, uses the port associated with the slab layer (layer_slab) for the second output port of the component. If False, the second port uses the same layer as the first port (layer_wg).
kwargs – cross_section settings.
__________________________ / | _______/____________|______________ / | width1 |w_slab1 | w_slab2 width2 ______\_____________|______________ \ | \__________________________
import gdsfactory as gf
c = gf.components.taper_sc_nc(length=20.0, width1=0.5, width2=0.15, w_slab1=0.15, w_slab2=1.0, layer_wg='WG', layer_slab='WGN', cross_section='xs_sc', use_slab_port=True)
c.plot()
(Source code
, png
, hires.png
, pdf
)
taper_strip_to_ridge#
- gdsfactory.components.taper_strip_to_ridge(length: float = 10.0, width1: float = 0.5, width2: float = 0.5, w_slab1: float = 0.15, w_slab2: float = 6.0, layer_wg: LayerSpec = 'WG', layer_slab: LayerSpec = 'SLAB90', cross_section: CrossSectionSpec = 'xs_sc', use_slab_port: bool = False, **kwargs) Component [source]#
Linear taper from strip to rib.
Deprecated, use gf.components.taper_cross_section instead.
- Parameters:
length – taper length (um).
width1 – in um.
width2 – in um.
w_slab1 – slab width in um.
w_slab2 – slab width in um.
layer_wg – for input waveguide.
layer_slab – for output waveguide with slab.
cross_section – for input waveguide.
use_slab_port – if True, uses the port associated with the slab layer (layer_slab) for the second output port of the component. If False, the second port uses the same layer as the first port (layer_wg).
kwargs – cross_section settings.
__________________________ / | _______/____________|______________ / | width1 |w_slab1 | w_slab2 width2 ______\_____________|______________ \ | \__________________________
import gdsfactory as gf
c = gf.components.taper_strip_to_ridge(length=10.0, width1=0.5, width2=0.5, w_slab1=0.15, w_slab2=6.0, layer_wg='WG', layer_slab='SLAB90', cross_section='xs_sc', use_slab_port=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
taper_strip_to_ridge_trenches#
- gdsfactory.components.taper_strip_to_ridge_trenches(length: float = 10.0, width: float = 0.5, slab_offset: float = 3.0, trench_width: float = 2.0, trench_layer: LayerSpec = 'DEEP_ETCH', layer_wg: LayerSpec = 'WG', trench_offset: float = 0.1) Component [source]#
Defines taper using trenches to define the etch.
- Parameters:
length – in um.
width – in um.
slab_offset – in um.
trench_width – in um.
trench_layer – trench layer.
layer_wg – waveguide layer.
trench_offset – after waveguide in um.
import gdsfactory as gf
c = gf.components.taper_strip_to_ridge_trenches(length=10.0, width=0.5, slab_offset=3.0, trench_width=2.0, trench_layer='DEEP_ETCH', layer_wg='WG', trench_offset=0.1)
c.plot()
(Source code
, png
, hires.png
, pdf
)
terminator#
- gdsfactory.components.terminator(length: float | None = 50, cross_section_input: CrossSectionSpec = functools.partial(<function cross_section>, radius=10, radius_min=5), cross_section_tip: CrossSectionSpec | None = None, tapered_width: float = 0.2, doping_layers: LayerSpecs | None = ('NPP', ), doping_offset: float = 1.0) Component [source]#
Returns doped taper to terminate waveguides.
- Parameters:
length – distance between input and narrow tapered end.
cross_section_input – input cross-section.
cross_section_tip – cross-section at the end of the termination.
tapered_width – width of the default cross-section at the end of the termination. Only used if cross_section_tip is not None.
doping_layers – optional doping layers to superimpose on the taper. Default N++.
doping_offset – offset of the doping layer beyond the bbox
import gdsfactory as gf
c = gf.components.terminator(length=50, tapered_width=0.2, doping_layers=['NPP'], doping_offset=1.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
text#
- gdsfactory.components.text(text: str = 'abcd', size: float = 10.0, position: Coordinate = (0, 0), justify: str = 'left', layer: LayerSpec = 'WG', layers: LayerSpecs | None = None) Component [source]#
Text shapes.
- Parameters:
text – string.
size – in um.
position – x, y position.
justify – left, right, center.
layer – for the text.
layers – optional for duplicating the text.
import gdsfactory as gf
c = gf.components.text(text='abcd', size=10.0, position=[0, 0], justify='left', layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
text_freetype#
- gdsfactory.components.text_freetype(text: str = 'abcd', size: int = 10, justify: str = 'left', font: PathType = PosixPath('/home/runner/work/gdsfactory7/gdsfactory7/gdsfactory/components/fonts/OCR-A.ttf'), layer: LayerSpec = 'WG', layers: LayerSpecs | None = None) Component [source]#
Returns text Component.
- Parameters:
text – string.
size – in um.
position – x, y position.
justify – left, right, center.
font – Font face to use. Default DEPLOF does not require additional libraries, otherwise freetype load fonts. You can choose font by name (e.g. “Times New Roman”), or by file OTF or TTF filepath.
layer – for the text.
layers – optional list of layers for the text.
import gdsfactory as gf
c = gf.components.text_freetype(text='abcd', size=10, justify='left', layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
text_lines#
- gdsfactory.components.text_lines(text: tuple[str, ...] = ('Chip', '01'), size: float = 0.4, layer: LayerSpec = 'WG') Component [source]#
Returns a Component from a text lines.
- Parameters:
text – list of strings.
size – text size.
layer – text layer.
import gdsfactory as gf
c = gf.components.text_lines(text=['Chip', '01'], size=0.4, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
text_rectangular#
- gdsfactory.components.text_rectangular(text: str = 'abcd', size: float = 10.0, position: tuple[float, float] = (0.0, 0.0), justify: str = 'left', layer: LayerSpec = 'WG', layers: LayerSpecs | None = None, font: Callable[..., dict[str, str]] = <functools._lru_cache_wrapper object>) Component [source]#
Pixel based font, guaranteed to be manhattan, without acute angles.
- Parameters:
text – string.
size – pixel size.
position – coordinate.
justify – left, right or center.
layer – for text.
layers – optional for duplicating the text.
font – function that returns dictionary of characters.
import gdsfactory as gf
c = gf.components.text_rectangular(text='abcd', size=10.0, position=[0.0, 0.0], justify='left', layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
text_rectangular_multi_layer#
- gdsfactory.components.text_rectangular_multi_layer(text: str = 'abcd', layers: LayerSpecs = ('WG', 'M1', 'M2', 'MTOP'), text_factory: ComponentSpec = <function text_rectangular>, **kwargs) Component [source]#
Returns rectangular text in different layers.
- Parameters:
text – string of text.
layers – list of layers to replicate the text.
text_factory – function to create the text Components.
- Keyword Arguments:
size – pixel size
position – coordinate
justify – left, right or center
font – function that returns dictionary of characters
import gdsfactory as gf
c = gf.components.text_rectangular_multi_layer(text='abcd', layers=['WG', 'M1', 'M2', 'MTOP'])
c.plot()
(Source code
, png
, hires.png
, pdf
)
triangle#
- gdsfactory.components.triangle(x: float = 10, xtop: float = 0, y: float = 20, ybot: float = 0, layer: LayerSpec = 'WG', layers: LayerSpecs | None = None) Component [source]#
Return triangle.
- Parameters:
x – base xsize.
xtop – top xsize.
y – ysize.
ybot – bottom ysize.
layer – layer.
layers – optional list of layers to duplicate the geometry.
xtop _ | \ | \ | \ y| \ | \ | \ |______|ybot x
import gdsfactory as gf
c = gf.components.triangle(x=10, xtop=0, y=20, ybot=0, layer='WG')
c.plot()
(Source code
, png
, hires.png
, pdf
)
triangle2#
- gdsfactory.components.triangle2(spacing: float = 3, **kwargs) Component [source]#
Return 2 triangles (bot, top).
- Parameters:
spacing – between top and bottom.
- Keyword Arguments:
x – base xsize.
xtop – top xsize.
y – ysize.
ybot – bottom ysize.
layer – layer.
layers – optional list of layers to duplicate the geometry.
import gdsfactory as gf
c = gf.components.triangle2(spacing=3)
c.plot()
(Source code
, png
, hires.png
, pdf
)
triangle4#
- gdsfactory.components.triangle4(**kwargs) Component [source]#
Return 4 triangles.
- Keyword Arguments:
x – base xsize.
xtop – top xsize.
y – ysize.
ybot – bottom ysize.
layer – layer.
layers – optional list of layers to duplicate the geometry.
/ | \ / | \ / | \ / | \ / | \ / | \ / | \ | | | \ | / \ | / \ | / \ | / \ | / \ |_/
import gdsfactory as gf
c = gf.components.triangle4()
c.plot()
(Source code
, png
, hires.png
, pdf
)
verniers#
- gdsfactory.components.verniers(widths: tuple[float, ...] = (0.1, 0.2, 0.3, 0.4, 0.5), gap: float = 0.1, xsize: float = 100.0, layer_label: LayerSpec = 'TEXT', **kwargs) Component [source]#
Returns a component with verniers.
- Parameters:
widths – list of widths.
gap – gap between verniers.
xsize – size of the component.
layer_label – layer for the labels.
**kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.verniers(widths=[0.1, 0.2, 0.3, 0.4, 0.5], gap=0.1, xsize=100.0, layer_label='TEXT')
c.plot()
(Source code
, png
, hires.png
, pdf
)
version_stamp#
- gdsfactory.components.version_stamp(labels: tuple[str, ...] = ('demo_label',), with_qr_code: bool = False, layer: LayerSpec = 'WG', pixel_size: int = 1, version: str | None = None, text_size: int = 10, layers: LayerSpecs | None = None) Component [source]#
Component with module version and date.
- Parameters:
labels – Iterable of labels.
with_qr_code – Add QR code with timestamp.
layer – Layer for text.
pixel_size – Size of the pixel for the QR code.
version – Version string.
text_size – Size of the text.
layers – List of layers for text.
import gdsfactory as gf
c = gf.components.version_stamp(labels=['demo_label'], with_qr_code=False, layer='WG', pixel_size=1, text_size=10)
c.plot()
(Source code
, png
, hires.png
, pdf
)
via_chain#
- gdsfactory.components.via_chain(num_vias: int = 100, cols: int = 10, via: ComponentSpec = functools.partial(<function via>, layer='VIA1', enclosure=2), contact: ComponentSpec = functools.partial(<function via_stack>, layers=('M2', 'MTOP'), vias=(functools.partial(<function via>, layer='VIA2'), None)), layers_bot: LayerSpecs = ('M1', ), layers_top: LayerSpecs = ('M2', ), offsets_top: tuple[float, ...] = (0, ), offsets_bot: tuple[float, ...] = (0, ), via_min_enclosure: float = 1.0, min_metal_spacing: float = 1.0, via_xoffset: float = 0.0, via_yoffset: float = 0.0) Component [source]#
Via chain to extract via resistance.
- Parameters:
num_vias – number of vias.
cols – number of column pairs.
via – via component.
contact – contact component.
layers_bot – list of bottom layers.
layers_top – list of top layers.
offsets_top – list of top layer offsets.
offsets_bot – list of bottom layer offsets.
via_min_enclosure – via_min_enclosure.
min_metal_spacing – min_metal_spacing.
via_xoffset – horizontal offset of the vias.
via_yoffset – vertical offset of the vias.
side view: min_metal_spacing ┌────────────────────────────────────┐ ┌────────────────────────────────────┐ │ layers_top │ │ │ │ │◄───────────► │ │ └─────────────┬─────┬────────────────┘ └───────────────┬─────┬──────────────┘ │ │ via_enclosure │ │ │ │◄───────────────► │ │ │ │ │ │ │ │ │ │ │width│ │ │ ◄─────► │ │ │ │ │ │ ┌─────────────┴─────┴───────────────────────────────────────────────┴─────┴───────────────┐ │ layers_bot │ │ │ └─────────────────────────────────────────────────────────────────────────────────────────┘ ◄─────────────────────────────────────────────────────────────────────────────────────────► 2*e + w + min_metal_spacing + 2*e + w
import gdsfactory as gf
c = gf.components.via_chain(num_vias=100, cols=10, layers_bot=['M1'], layers_top=['M2'], offsets_top=[0], offsets_bot=[0], via_min_enclosure=1.0, min_metal_spacing=1.0, via_xoffset=0.0, via_yoffset=0.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
via_corner#
- gdsfactory.components.via_corner(cross_section: list[tuple[~collections.abc.Callable[[...], ~gdsfactory.cross_section.CrossSection] | ~gdsfactory.cross_section.CrossSection | dict[str, ~typing.Any] | str | ~gdsfactory.cross_section.Transition, tuple[int, ...]]] = ((functools.partial(<function cross_section>, layer='M2', width=10.0, port_names=('e1', 'e2'), port_types=('electrical', 'electrical'), radius=None), (0, 180)), (functools.partial(<function cross_section>, layer='M3', width=10.0, port_names=('e1', 'e2'), port_types=('electrical', 'electrical'), radius=None), (90, 270))), vias: tuple[ComponentSpec] = (functools.partial(<function via>, layer='VIA1', enclosure=2),), layers_labels: tuple[str, ...] = ('m2', 'm3'), **kwargs) Component [source]#
Returns Corner via.
Use in place of wire_corner to route between two layers.
- Parameters:
cross_section – list of cross_section, orientation pairs.
vias – vias to use to fill the rectangles.
layers_labels – Labels to use for each layer.
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.via_corner(cross_section=[[{'function': 'cross_section', 'settings': {'layer': 'M2', 'width': 10.0, 'port_names': ['e1', 'e2'], 'port_types': ['electrical', 'electrical'], 'radius': None}, 'module': 'gdsfactory.cross_section'}, [0, 180]], [{'function': 'cross_section', 'settings': {'layer': 'M3', 'width': 10.0, 'port_names': ['e1', 'e2'], 'port_types': ['electrical', 'electrical'], 'radius': None}, 'module': 'gdsfactory.cross_section'}, [90, 270]]], layers_labels=['m2', 'm3'])
c.plot()
via_cutback#
- gdsfactory.components.via_cutback(num_vias: float = 200.0, wire_width: float = 10.0, via_width: float = 5.0, via_spacing: float = 30.0, min_pad_spacing: float = 10.0, pad: ComponentSpec = functools.partial(<function via_stack>, layers=('HEATER', 'M2', 'MTOP'), vias=(None, functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2'))), pad_size: tuple[float, float] = (100, 100), layer1: LayerSpec = 'HEATER', layer2: LayerSpec = 'M1', via_layer: LayerSpec = 'VIAC', wire_pad_inclusion: float = 2.0) Component [source]#
Via cutback to extract via resistance.
based on phidl.geometry
- Parameters:
num_vias – total requested vias needs to be even.
wire_width – width of wire.
via_width – width of via.
via_spacing – via_spacing.
pad_size – (width, height).
min_pad_spacing.
pad_layer.
layer1 – top wiring.
layer2 – bottom wiring.
via_layer – via.
wire_pad_inclusion – in um.
import gdsfactory as gf
c = gf.components.via_cutback(num_vias=200.0, wire_width=10.0, via_width=5.0, via_spacing=30.0, min_pad_spacing=10.0, pad_size=[100, 100], layer1='HEATER', layer2='M1', via_layer='VIAC', wire_pad_inclusion=2.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
via_stack#
- gdsfactory.components.via_stack(size=(11.0, 11.0), layers: tuple[LayerSpec | None, ...] = ('M1', 'M2', 'MTOP'), layer_offsets: Floats | None = None, vias: tuple[ComponentSpec | None, ...] | None = (functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2'), None), layer_port: LayerSpec | None = None, correct_size: bool = True, slot_horizontal: bool = False, slot_vertical: bool = False) Component [source]#
Rectangular via array stack.
You can use it to connect different metal layers or metals to silicon. You can use the naming convention via_stack_layerSource_layerDestination contains 4 ports (e1, e2, e3, e4)
also know as Via array http://www.vlsi-expert.com/2017/12/vias.html
spacing = via.info[‘spacing’] enclosure = via.info[‘enclosure’]
- Parameters:
size – of the layers.
layers – layers on which to draw rectangles.
layer_offsets – Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.
vias – vias to use to fill the rectangles.
layer_port – if None assumes port is on the last layer.
correct_size – if True, if the specified dimensions are too small it increases them to the minimum possible to fit a via.
slot_horizontal – if True, then vias are horizontal.
slot_vertical – if True, then vias are vertical.
import gdsfactory as gf
c = gf.components.via_stack(size=[11.0, 11.0], layers=['M1', 'M2', 'MTOP'], correct_size=True, slot_horizontal=False, slot_vertical=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
via_stack_corner45#
- gdsfactory.components.via_stack_corner45(width: float = 10, layers: tuple[LayerSpec | None, ...] = ('M1', 'M2', 'MTOP'), layer_offsets: Floats | None = None, vias: tuple[ComponentSpec | None, ...] | None = (functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2'), None), layer_port: LayerSpec | None = None, correct_size: bool = True) Component [source]#
Rectangular via array stack at a 45 degree angle.
spacing = via.info[‘spacing’] enclosure = via.info[‘enclosure’]
- Parameters:
width – of the corner45.
layers – layers on which to draw rectangles.
layer_offsets – Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.
vias – vias to use to fill the rectangles.
layer_port – if None assumes port is on the last layer.
correct_size – if True, if the specified dimensions are too small it increases them to the minimum possible to fit a via.
import gdsfactory as gf
c = gf.components.via_stack_corner45(width=10, layers=['M1', 'M2', 'MTOP'], correct_size=True)
c.plot()
(Source code
, png
, hires.png
, pdf
)
via_stack_corner45_extended#
- gdsfactory.components.via_stack_corner45_extended(corner: ComponentSpec = <function via_stack_corner45>, via_stack: ComponentSpec = <function via_stack>, width: float = 3, length: float = 10) Component [source]#
Rectangular via array stack at a 45 degree angle.
- Parameters:
corner – corner component.
straight – straight component.
width – of the corner45.
length – of the straight.
import gdsfactory as gf
c = gf.components.via_stack_corner45_extended(width=3, length=10)
c.plot()
(Source code
, png
, hires.png
, pdf
)
via_stack_from_rules#
- gdsfactory.components.via_stack_from_rules(size: Float2 = (1.2, 1.2), layers: LayerSpecs = ('M1', 'M2', 'MTOP'), layer_offsets: tuple[float, ...] | None = None, vias: tuple[ComponentSpec | None, ...] | None = (functools.partial(<function via>, layer='VIA1', enclosure=2), functools.partial(<function via>, layer='VIA2')), via_min_size: tuple[Float2, ...] = ((0.2, 0.2), (0.2, 0.2)), via_min_gap: tuple[Float2, ...] = ((0.1, 0.1), (0.1, 0.1)), via_min_enclosure: Float2 = (0.15, 0.25), layer_port: LayerSpec | None = None) Component [source]#
Rectangular via array stack, with optimized dimension for vias.
Uses inclusion, minimum width, and minimum spacing rules to place the maximum number of individual vias, each with maximum via area.
- Parameters:
size – of the layers, len(size).
layers – layers on which to draw rectangles.
layer_offsets – Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.
vias – list of base via components to modify.
via_min_size – via minimum x, y dimensions.
via_min_gap – via minimum x, y distances.
via_min_enclosure – via minimum inclusion into connecting layers.
layer_port – if None assumes port is on the last layer.
import gdsfactory as gf
c = gf.components.via_stack_from_rules(size=[1.2, 1.2], layers=['M1', 'M2', 'MTOP'], via_min_size=[[0.2, 0.2], [0.2, 0.2]], via_min_gap=[[0.1, 0.1], [0.1, 0.1]], via_min_enclosure=[0.15, 0.25])
c.plot()
(Source code
, png
, hires.png
, pdf
)
via_stack_slot#
- gdsfactory.components.via_stack_slot(size=(11.0, 11.0), layers: tuple[LayerSpecs | None, ...] = ('M1', 'M2'), layer_offsets: Floats | None = (0, 1.0), layer_offsetsx: Floats | None = None, layer_offsetsy: Floats | None = None, layer_port: LayerSpec | None = None, via: ComponentSpec = functools.partial(<function via>, layer='VIA1', enclosure=2), enclosure: float = 1.0, ysize: float = 0.5, yspacing: float = 2.0) Component [source]#
Rectangular via_stack with slotted via in X direction.
- Parameters:
size – of the layers.
layers – layers on which to draw rectangles.
layer_offsets – cladding_offset for each layer.
layer_offsetsx – optional xoffset for layers, defaults to layer_offsets.
layer_offsetsy – optional yoffset for layers, defaults to layer_offsets.
layer_port – if None assumes port is on the last layer.
via – via to use to fill the rectangles.
enclosure – of the via by rectangle.
ysize – via height in y.
yspacing – via spacing pitch in y.
__________________________________________ | | | | | layer_offsetsy[1] | | ______________|______________________ | | |<---> |<>| | |enclosure | layer_offsetsx[1] | | ______________________ | | | | | | | | | | | via | ysize| | | | |______________________| | | | | | | | | | | yspacing size[1]| | | | | | | | | | ______________________ | | | | | | | | | | | | | via | ysize| | | | | |______________________| | | | | | | | | | | | |___________________________________| | | size[0] | | | |_________________________________________|
import gdsfactory as gf
c = gf.components.via_stack_slot(size=[11.0, 11.0], layers=['M1', 'M2'], layer_offsets=[0, 1.0], enclosure=1.0, ysize=0.5, yspacing=2.0)
c.plot()
(Source code
, png
, hires.png
, pdf
)
via_stack_with_offset#
- gdsfactory.components.via_stack_with_offset(layers: LayerSpecs = ('PPP', 'M1'), size: Float2 = (10, 10), sizes: tuple[Float2, ...] | None = None, layer_offsets: Floats | None = None, vias: tuple[ComponentSpec | None, ...] = (None, functools.partial(<function via>, layer='VIAC')), offsets: tuple[float, ...] | None = None) Component [source]#
Rectangular layer transition with offset between layers.
- Parameters:
layers – layer specs between vias. None for no layer.
size – for all vias array.
sizes – Optional size for each via array. Overrides size.
layer_offsets – Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.
vias – via spec for previous layer. None for no via.
offsets – optional offset for each layer relatively to the previous one. By default it only offsets by size[1] if there is a via.
side view __________________________ | | | | layers[2] |__________________________| vias[2] = None | | | layer_offsets[1]+size | layers[1] |__________________________| | | vias[1] ___|_____|__ | | | sizes[0] | layers[0] |____________| vias[0] = None
import gdsfactory as gf
c = gf.components.via_stack_with_offset(layers=['PPP', 'M1'], size=[10, 10])
c.plot()
(Source code
, png
, hires.png
, pdf
)
wafer#
- gdsfactory.components.wafer(reticle: ComponentFactory = <function die>, cols: tuple[int, ...] = (2, 6, 6, 8, 8, 6, 6, 2), xspacing: float | None = None, yspacing: float | None = None, die_name_col_row: bool = False) Component [source]#
Returns complete wafer. Useful for mask aligner steps.
- Parameters:
reticle – spec for each wafer reticle.
cols – how many columns per row.
xspacing – optional spacing, defaults to reticle.xsize.
yspacing – optional spacing, defaults to reticle.ysize.
die_name_col_row – if True, die name is row_col, otherwise is a number
import gdsfactory as gf
c = gf.components.wafer(cols=[2, 6, 6, 8, 8, 6, 6, 2], die_name_col_row=False)
c.plot()
(Source code
, png
, hires.png
, pdf
)
wire_corner#
- gdsfactory.components.wire_corner(cross_section: CrossSectionSpec = 'xs_metal_routing', **kwargs) Component [source]#
Returns 45 degrees electrical corner wire.
- Parameters:
cross_section – spec.
kwarg – cross_section settings.
import gdsfactory as gf
c = gf.components.wire_corner(cross_section='xs_metal_routing')
c.plot()
(Source code
, png
, hires.png
, pdf
)
wire_corner45#
- gdsfactory.components.wire_corner45(cross_section: CrossSectionSpec | None = 'xs_metal_routing', width: float | None = None, layer: LayerSpec | None = None, radius: float = 10, with_corner90_ports: bool = True) Component [source]#
Returns 90 degrees electrical corner wire.
- Parameters:
cross_section – spec.
width – width of the wire.
layer – layer of the wire.
radius – radius of the corner.
with_corner90_ports – if True adds ports at 90 degrees.
import gdsfactory as gf
c = gf.components.wire_corner45(cross_section='xs_metal_routing', radius=10, with_corner90_ports=True)
c.plot()
(Source code
, png
, hires.png
, pdf
)
wire_straight#
- gdsfactory.components.wire_straight(length: float = 10.0, npoints: int = 2, *, cross_section: CrossSectionSpec = 'xs_metal_routing', **kwargs) Component #
Returns a Straight waveguide.
- Parameters:
length – straight length (um).
npoints – number of points.
cross_section – specification (CrossSection, string or dict).
kwargs – additional cross_section arguments.
o1 -------------- o2 length
import gdsfactory as gf
c = gf.components.wire_straight(length=10.0, npoints=2, cross_section='xs_metal_routing')
c.plot()
(Source code
, png
, hires.png
, pdf
)