Generic PDK

Contents

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, size=(10, 20), layer='WG', port_type='electrical')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-1.png

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)

_images/components-2.png

add_fiber_array_optical_south_electrical_north#

gdsfactory.components.add_fiber_array_optical_south_electrical_north(component: str | Callable[[...], Component] | dict[str, Any] | KCell, pad: str | Callable[[...], Component] | dict[str, Any] | KCell, grating_coupler: str | Callable[[...], Component] | dict[str, Any] | KCell, cross_section_metal: Callable[[...], CrossSection] | CrossSection | dict[str, Any] | str | Transition, 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, analysis_settings: dict[str, Any] | None = None, **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.

  • grating_coupler – grating coupler function.

  • cross_section_metal – metal cross section.

  • 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.

  • analysis_settings – analysis settings.

  • kwargs – additional arguments.

Keyword Arguments:
  • layer_label – layer for settings label.

  • measurement – measurement name.

  • measurement_settings – measurement settings.

  • analysis – analysis name.

  • analysis_settings – analysis settings.

  • doe – Design of Experiment.

  • anchor – anchor point for the label. Defaults to south-west “sw”. Valid options are: “n”, “s”, “e”, “w”, “ne”, “nw”, “se”, “sw”, “c”.

  • gc_port_name – grating coupler input port name.

  • gc_port_labels – grating coupler list of labels.

  • 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 – route_single.

  • 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, fiber_spacing=127, pad_gc_spacing=250, electrical_port_orientation=90)
c.plot()

(Source code)

add_frame#

gdsfactory.components.add_frame(component: ComponentSpec = <function rectangle>, width: float = 10.0, spacing: float = 10.0, layer: LayerSpec = 'WG') 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.

import gdsfactory as gf

c = gf.components.add_frame(width=10, spacing=10, layer='WG')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-4.png

add_termination#

gdsfactory.components.add_termination(component: ComponentSpec = 'straight', port_names: tuple[str, ...] | None = None, terminator: ComponentSpec = functools.partial(<function taper>, width2=0.1), terminator_port_name: str | None = None) Component[source]#

Returns component with terminator on some ports.

Parameters:
  • component – to add terminator.

  • port_names – ports to add terminator.

  • terminator – factory for the terminator.

  • terminator_port_name – for the terminator to connect to the component ports.

import gdsfactory as gf

c = gf.components.add_termination(component='straight')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-5.png

add_trenches#

gdsfactory.components.add_trenches(component: ComponentSpec = <function coupler>, layer_component: LayerSpec = 'WG', layer_trench: LayerSpec = 'DEEP_ETCH', width_trench: float = 2.0, cross_section: CrossSectionSpec = 'rib_with_trenches', top: float | None = None, bot: float | None = None, right: float | None = 0, left: float | None = 0, **kwargs) Component[source]#

Return component with trenches.

Parameters:
  • component – component to add to the trenches.

  • layer_component – layer of the component.

  • layer_trench – layer of the trenches.

  • width_trench – width of the trenches.

  • cross_section – spec (CrossSection, string or dict).

  • top – width of the trench on the top. If None uses width_trench.

  • bot – width of the trench on the bottom. If None uses width_trench.

  • right – width of the trench on the right. If None uses width_trench.

  • left – width of the trench on the left. If None uses width_trench.

  • kwargs – component settings.

import gdsfactory as gf

c = gf.components.add_trenches(layer_component='WG', layer_trench='DEEP_ETCH', width_trench=2, cross_section='rib_with_trenches', right=0, left=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-6.png

add_trenches90#

gdsfactory.components.add_trenches90(*, component: ComponentSpec = <function bend_euler>, layer_component: LayerSpec = 'WG', layer_trench: LayerSpec = 'DEEP_ETCH', width_trench: float = 2.0, cross_section: CrossSectionSpec = 'rib_with_trenches', top: float | None = 0, bot: float | None = None, right: float | None = None, left: float | None = 0, **kwargs) gf.Component#

Return component with trenches.

Parameters:
  • component – component to add to the trenches.

  • layer_component – layer of the component.

  • layer_trench – layer of the trenches.

  • width_trench – width of the trenches.

  • cross_section – spec (CrossSection, string or dict).

  • top – width of the trench on the top. If None uses width_trench.

  • bot – width of the trench on the bottom. If None uses width_trench.

  • right – width of the trench on the right. If None uses width_trench.

  • left – width of the trench on the left. If None uses width_trench.

  • kwargs – component settings.

import gdsfactory as gf

c = gf.components.add_trenches90(layer_component='WG', layer_trench='DEEP_ETCH', width_trench=2, cross_section='rib_with_trenches', top=0, left=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-7.png

align_wafer#

gdsfactory.components.align_wafer(width: float = 10.0, spacing: float = 10.0, cross_length: float = 80.0, layer: LayerSpec = 'WG', 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.

  • layer_cladding – optional.

  • square_corner – bottom_left, bottom_right, top_right, top_left.

import gdsfactory as gf

c = gf.components.align_wafer(width=10, spacing=10, cross_length=80, layer='WG', square_corner='bottom_left')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-8.png

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, 150), columns=6, rows=1, add_ports=True, centered=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-9.png

bbox#

gdsfactory.components.bbox(component: Component | Instance, layer: LayerSpec, top: float = 0, bottom: float = 0, left: float = 0, right: float = 0) Component[source]#

Returns bounding box rectangle from coordinates.

Parameters:
  • component – component or instance to get bbox from.

  • layer – for bbox.

  • top – north offset.

  • bottom – south offset.

  • left – west offset.

  • right – east offset.

import gdsfactory as gf

c = gf.components.bbox(top=0, bottom=0, left=0, right=0)
c.plot()

(Source code)

bend_circular#

gdsfactory.components.bend_circular(radius: float | None = None, angle: float = 90.0, npoints: int | None = None, layer: LayerEnum | str | tuple[int, int] | None = None, width: float | None = None, cross_section: CrossSectionSpec = 'strip', allow_min_radius_violation: bool = False) 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).

  • allow_min_radius_violation – if True allows radius to be smaller than cross_section radius.

import gdsfactory as gf

c = gf.components.bend_circular(angle=90, cross_section='strip', allow_min_radius_violation=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-11.png

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 = 'strip', allow_min_radius_violation: bool = False) 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).

  • allow_min_radius_violation – if True allows radius to be smaller than cross_section radius.

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='strip', allow_min_radius_violation=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-12.png

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, layer: LayerEnum | str | tuple[int, int] | None = None, width: float | None = None, cross_section: CrossSectionSpec = 'strip', allow_min_radius_violation: bool = False) Component[source]#

Regular degree euler bend.

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.

  • npoints – Number of points used per 360 degrees.

  • layer – layer to use. Defaults to cross_section.layer.

  • width – width to use. Defaults to cross_section.width.

  • cross_section – specification (CrossSection, string, CrossSectionFactory dict).

  • allow_min_radius_violation – if True allows radius to be smaller than cross_section radius.

import gdsfactory as gf

c = gf.components.bend_euler(angle=90, p=0.5, with_arc_floorplan=True, cross_section='strip', allow_min_radius_violation=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-13.png

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).

  • with_bbox – add bbox_layers and bbox_offsets to avoid DRC sharp edges.

  • 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)

_images/components-14.png

bend_euler_trenches#

gdsfactory.components.bend_euler_trenches(*, component: ComponentSpec = <function bend_euler>, layer_component: LayerSpec = 'WG', layer_trench: LayerSpec = 'DEEP_ETCH', width_trench: float = 2.0, cross_section: CrossSectionSpec = 'rib_with_trenches', top: float | None = 0, bot: float | None = None, right: float | None = None, left: float | None = 0, **kwargs) gf.Component#

Return component with trenches.

Parameters:
  • component – component to add to the trenches.

  • layer_component – layer of the component.

  • layer_trench – layer of the trenches.

  • width_trench – width of the trenches.

  • cross_section – spec (CrossSection, string or dict).

  • top – width of the trench on the top. If None uses width_trench.

  • bot – width of the trench on the bottom. If None uses width_trench.

  • right – width of the trench on the right. If None uses width_trench.

  • left – width of the trench on the left. If None uses width_trench.

  • kwargs – component settings.

import gdsfactory as gf

c = gf.components.bend_euler_trenches(layer_component='WG', layer_trench='DEEP_ETCH', width_trench=2, cross_section='rib_with_trenches', top=0, left=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-15.png

bend_s#

gdsfactory.components.bend_s(size: tuple[float, float] = (11.0, 1.8), npoints: int = 99, cross_section: CrossSectionSpec = 'strip', allow_min_radius_violation: bool = False, **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.

  • allow_min_radius_violation – bool.

  • kwargs – cross_section settings.

import gdsfactory as gf

c = gf.components.bend_s(size=(11, 1.8), npoints=99, cross_section='strip', allow_min_radius_violation=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-16.png

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 = 'strip', bend_radius_error_type: ErrorType | None = None, allow_min_radius_violation: bool = False) 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.

  • bend_radius_error_type – error type.

  • allow_min_radius_violation – bool.

import gdsfactory as gf

c = gf.components.bezier(control_points=((0, 0), (5, 0), (5, 1.8), (10, 1.8)), npoints=201, with_manhattan_facing_angles=True, cross_section='strip', allow_min_radius_violation=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-17.png

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)

_images/components-18.png

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 = 'strip', text: ComponentFactory = 'text_rectangular_mini', spacing: float = 5) 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.

  • spacing – from group to group.

import gdsfactory as gf

c = gf.components.cdsem_all(widths=(0.4, 0.45, 0.5, 0.6, 0.8, 1), 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='strip', text='text_rectangular_mini', spacing=5)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-19.png

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 = 'strip', text: ComponentFactory = 'text_rectangular_mini') 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, wg_length=420, straight='straight', bend90='bend_circular', cross_section='strip', text='text_rectangular_mini')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-20.png

cdsem_coupler#

gdsfactory.components.cdsem_coupler(length: float = 420.0, gaps: tuple[float, ...] = (0.15, 0.2, 0.25), cross_section: CrossSectionSpec = 'strip', text: ComponentFactory | None = functools.partial(<function text_rectangular>, size=1), spacing: float | None = 7.0, positions: Iterable[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, gaps=(0.15, 0.2, 0.25), cross_section='strip', spacing=7)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-21.png

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 = 'strip', text: ComponentSpec | None = 'text_rectangular_mini', spacing: float | None = 7.0, positions: tuple[float, ...] | None = None) 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.

import gdsfactory as gf

c = gf.components.cdsem_straight(widths=(0.4, 0.45, 0.5, 0.6, 0.8, 1), length=420, cross_section='strip', text='text_rectangular_mini', spacing=7)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-22.png

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 = 'strip', 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.

  • 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, label='', cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-23.png

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, angle_resolution=2.5, layer='WG')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-24.png

coh_rx_single_pol#

gdsfactory.components.coh_rx_single_pol(bend: ComponentSpec = 'bend_euler', cross_section: CrossSectionSpec = 'strip', hybrid_90deg: ComponentSpec = <function mmi_90degree_hybrid>, detector: ComponentSpec = <function ge_detector_straight_si_contacts>, det_spacing: tuple[float, float] = (60.0, 50.0), in_wg_length: float = 20.0, lo_input_coupler: ComponentSpec | None = None, signal_input_coupler: ComponentSpec | None = None, cross_section_metal_top: CrossSectionSpec = 'metal3', cross_section_metal: CrossSectionSpec = 'metal2') 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.

  • 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.

  • cross_section_metal_top – cross_section for the top metal layer.

  • cross_section_metal – cross_section for the metal layer.

                        _________
    (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='strip', det_spacing=(60, 50), in_wg_length=20, cross_section_metal_top='metal3', cross_section_metal='metal2')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-25.png

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 = 'strip') 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).

                             ___ 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, xspacing=40, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-26.png

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 = 'mzi_pin', mzm_length: float = 200.0, xspacing: float = 40.0, input_coupler: ComponentSpec | None = None, output_coupler: ComponentSpec | None = None, pad_array: ComponentSpec = 'pad_array', cross_section: CrossSectionSpec = 'strip') 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).

                         ___ 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, phase_shifter='straight_pin', phase_shifter_length=100, mzm_ps_spacing=40, splitter='mmi1x2', mzm='mzi_pin', mzm_length=200, xspacing=40, pad_array='pad_array', cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-27.png

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.

  • 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, 2), layer='WG', port_type='electrical', port_inclusion=0, port_orientations=(180, 90, 0, -90))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-28.png

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)

_images/components-29.png

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)

_images/components-30.png

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 = 'strip') 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, dy=4, dx=10, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-31.png

coupler90#

gdsfactory.components.coupler90(gap: float = 0.2, radius: float = 10.0, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, cross_section: CrossSectionSpec = 'strip', 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, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-32.png

coupler90bend#

gdsfactory.components.coupler90bend(radius: float = 10.0, gap: float = 0.2, bend: ComponentSpec = <function bend_euler>, cross_section_inner: CrossSectionSpec = 'strip', cross_section_outer: CrossSectionSpec = 'strip') 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, gap=0.2, cross_section_inner='strip', cross_section_outer='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-33.png

coupler90circular#

gdsfactory.components.coupler90circular(gap: float = 0.2, radius: float = 10.0, *, bend: ComponentSpec = <function bend_circular>, straight: ComponentSpec = <function straight>, cross_section: CrossSectionSpec = 'strip', 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, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-34.png

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 = 'strip') 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, length2=50, length3=30, wg_sep=1, input_wg_sep=3, output_wg_sep=3, dw=0.1, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-35.png

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 = 'strip') 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, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-36.png

coupler_bend#

gdsfactory.components.coupler_bend(radius: float = 10.0, coupler_gap: float = 0.2, coupling_angle_coverage: float = 120.0, cross_section_inner: CrossSectionSpec = 'strip', cross_section_outer: CrossSectionSpec = 'strip', bend: ComponentSpec = <function bend_circular_all_angle>, bend_output: ComponentSpec = <function bend_euler_all_angle>) Component[source]#

Compact curved coupler with bezier escape.

TODO: fix for euler bends.

Parameters:
  • radius – um.

  • coupler_gap – um.

  • coupling_angle_coverage – degrees.

  • cross_section_inner – spec inner bend.

  • cross_section_outer – spec outer bend.

  • bend – for bend.

  • bend_output – for bend.

    r   4
    |   |
    |  / ___3
    | / /
2____/ /
1_____/
import gdsfactory as gf

c = gf.components.coupler_bend(radius=10, coupler_gap=0.2, coupling_angle_coverage=120, cross_section_inner='strip', cross_section_outer='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-37.png

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 = 'strip') 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='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-38.png

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 = 'strip', 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, length_coupler_straight=12.4, lenght_coupler_big_gap=4.7, cross_section='strip', radius=10)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-39.png

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 = 'strip', **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.

  • kwargs – cross_section settings.

Keyword Arguments:

kwargs. (cross_section)

import gdsfactory as gf

c = gf.components.coupler_full(coupling_length=40, dx=10, dy=4.8, gap=0.5, dw=0.1, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-40.png

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 = 'strip', 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, length_x=4, cross_section='strip', length_extension=3)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-41.png

coupler_straight#

gdsfactory.components.coupler_straight(length: float = 10.0, gap: float = 0.27, cross_section: CrossSectionSpec = 'strip') Component[source]#

Coupler_straight with two parallel straights.

Parameters:
  • length – of straight.

  • gap – between straights.

  • cross_section – specification (CrossSection, string or dict).

o2──────▲─────────o3
        │gap
o1──────▼─────────o4
import gdsfactory as gf

c = gf.components.coupler_straight(length=10, gap=0.27, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-42.png

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 = 'strip') 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.

  • cross_section – cross_section spec.

import gdsfactory as gf

c = gf.components.coupler_straight_asymmetric(length=10, gap=0.27, width_top=0.5, width_bot=1, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-43.png

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 = 'strip') 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, dx=10, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-44.png

coupler_trenches#

gdsfactory.components.coupler_trenches(*, component: ComponentSpec = <function coupler>, layer_component: LayerSpec = 'WG', layer_trench: LayerSpec = 'DEEP_ETCH', width_trench: float = 2.0, cross_section: CrossSectionSpec = 'rib_with_trenches', top: float | None = None, bot: float | None = None, right: float | None = 0, left: float | None = 0, **kwargs) gf.Component#

Return component with trenches.

Parameters:
  • component – component to add to the trenches.

  • layer_component – layer of the component.

  • layer_trench – layer of the trenches.

  • width_trench – width of the trenches.

  • cross_section – spec (CrossSection, string or dict).

  • top – width of the trench on the top. If None uses width_trench.

  • bot – width of the trench on the bottom. If None uses width_trench.

  • right – width of the trench on the right. If None uses width_trench.

  • left – width of the trench on the left. If None uses width_trench.

  • kwargs – component settings.

import gdsfactory as gf

c = gf.components.coupler_trenches(layer_component='WG', layer_trench='DEEP_ETCH', width_trench=2, cross_section='rib_with_trenches', right=0, left=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-45.png

cross#

gdsfactory.components.cross(length: float = 10.0, width: float = 3.0, layer: LayerSpec = 'WG', 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.

  • port_type – None, optical, electrical.

import gdsfactory as gf

c = gf.components.cross(length=10, width=3, layer='WG')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-46.png

crossing#

gdsfactory.components.crossing(arm: ComponentSpec = <function crossing_arm>, cross_section: CrossSectionSpec = 'strip') Component[source]#

Waveguide crossing.

Parameters:
  • arm – arm spec.

  • cross_section – spec.

import gdsfactory as gf

c = gf.components.crossing(cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-47.png

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 = 'strip', cross_section_bends: CrossSectionSpec = 'strip') 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 – cross_section spec.

  • cross_section_bends – cross_section spec.

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, alpha=0.08, npoints=101, cross_section='strip', cross_section_bends='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-48.png

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 = 'strip') 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, r2=1.1, w=1.2, L=3.4, layer_slab='SLAB150', cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-49.png

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, r2=1.1, w=1.2, L=3.4, layer_wg='WG', layer_slab='SLAB150')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-50.png

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)

_images/components-51.png

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 = functools.partial(<function bend_circular>, angle=180), mirror: bool = False, straight_length: float | None = None, cross_section: CrossSectionSpec = 'strip') 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.

  • port3 – name of third optical port.

  • port4 – name of fourth optical port.

  • bend180 – ubend.

  • 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='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-52.png

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:
  • component – 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, rows=6, cols=5)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-53.png

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: float = 3.0, **kwargs) Component[source]#

Returns cutback to measure u bend loss.

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.

  _
_| |_  this is a row

_ this is a column
import gdsfactory as gf

c = gf.components.cutback_bend180(straight_length=5, rows=6, cols=6, spacing=3)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-54.png

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: float = 3.0, **kwargs) Component#

Returns cutback to measure u bend loss.

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.

  _
_| |_  this is a row

_ this is a column
import gdsfactory as gf

c = gf.components.cutback_bend180circular(straight_length=5, rows=6, cols=6, spacing=3)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-55.png

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, rows=6, cols=6, spacing=5)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-56.png

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, rows=6, cols=6, spacing=5)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-57.png

cutback_component#

gdsfactory.components.cutback_component(component: ComponentSpec = functools.partial(<function taper_from_csv>, filepath=PosixPath('/home/runner/work/gdsfactory/gdsfactory/gdsfactory/components/csv_data/taper_strip_0p5_3_36.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 = 'strip', **kwargs) Component[source]#

Returns a daisy chain of components for measuring their loss.

Works only for components with 2 ports (input, output).

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).

  • 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='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-58.png

cutback_component_mirror#

gdsfactory.components.cutback_component_mirror(component: ComponentSpec = functools.partial(<function taper_from_csv>, filepath=PosixPath('/home/runner/work/gdsfactory/gdsfactory/gdsfactory/components/csv_data/taper_strip_0p5_3_36.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 = 'strip', **kwargs) Component#

Returns a daisy chain of components for measuring their loss.

Works only for components with 2 ports (input, output).

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).

  • 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='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-59.png

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: ComponentSpec = <function straight>, straight_length: float | None = None, cross_section: CrossSectionSpec = 'strip', **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.

  • port3 – name of third optical port.

  • bend180 – ubend.

  • mirror – Flips component. Useful when ‘o2’ is the port that you want to route to.

  • straight – waveguide spec to connect both sides.

  • 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='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-60.png

dbr#

gdsfactory.components.dbr(w1: float = 0.45, w2: float = 0.55, l1: float = 0.159, l2: float = 0.159, n: int = 10, cross_section: CrossSectionSpec = 'strip', straight_length: float = 0.01, **kwargs) Component[source]#

Distributed Bragg Reflector.

Parameters:
  • w1 – thin width in um.

  • w2 – thick width in um.

  • l1 – thin length in um.

  • l2 – thick length in um.

  • n – number of periods.

  • cross_section – cross_section spec.

  • straight_length – length of the straight section between cutbacks.

  • kwargs – cross_section settings.

   l1      l2
<-----><-------->
        _________
_______|

  w1       w2       ...  n times
_______
       |_________
import gdsfactory as gf

c = gf.components.dbr(w1=0.45, w2=0.55, l1=0.159, l2=0.159, n=10, cross_section='strip', straight_length=0.01)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-61.png

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 = 'strip', **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.

  • kwargs – cross_section settings.

Keyword Arguments:

kwargs. (cross_section)

         period
<-----><-------->
        _________
_______|

  w1       w2       ...  n times
_______
       |_________
import gdsfactory as gf

c = gf.components.dbr_tapered(length=10, period=0.85, dc=0.5, w1=0.4, w2=1, taper_length=20, fins=False, fin_size=(0.2, 0.05), cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-62.png

delay_snake#

gdsfactory.components.delay_snake(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 = 'strip', **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_snake(length=1600, length0=0, length2=0, n=2, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-63.png

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 = 'strip', **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, length0=0, length2=0, n=2, bend180='bend_euler180', cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-64.png

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 = 'strip', **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.

  • length4 – fourth straight section length in um.

  • radius – u bend radius in um.

  • waveguide_spacing – waveguide pitch in um.

  • bend – bend spec.

  • sbend – sbend spec.

  • sbend_xsize – 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, length1=0, length4=0, radius=5, waveguide_spacing=5, bend='bend_euler', sbend='bend_s', sbend_xsize=100, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-65.png

dicing_lane#

gdsfactory.components.dicing_lane(size: tuple[float, float] = (50, 300), marker: ComponentSpec = functools.partial(<function triangle>, layer='MTOP', xtop=2), layer_dicing: LayerSpec = 'DICING') 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.

import gdsfactory as gf

c = gf.components.dicing_lane(size=(50, 300), layer_dicing='DICING')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-66.png

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 | None = 'FLOORPLAN', bbox_layer: LayerSpec | None = 'FLOORPLAN', text: ComponentFactory = 'text', draw_corners: bool = False) gf.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.

  • 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, 10000), street_width=100, street_length=1000, die_name='chip99', text_size=100, text_location='SW', layer='FLOORPLAN', bbox_layer='FLOORPLAN', text='text', draw_corners=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-67.png

die_bbox#

gdsfactory.components.die_bbox(component: ComponentSpec = functools.partial(<function rectangle>, size=(1300, 2600), centered=False), 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, text_size=100, text_anchor='sw', layer='MTOP', padding=10)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-68.png

die_with_pads#

gdsfactory.components.die_with_pads(size: tuple[float, float] = (11470.0, 4900.0), ngratings: int = 14, npads: int = 31, grating_pitch: float = 250.0, pad_pitch: float = 300.0, grating_coupler: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | dict[str, ~typing.Any] | ~kfactory.kcell.KCell = 'grating_coupler_te', cross_section: ~collections.abc.Callable[[...], ~gdsfactory.cross_section.CrossSection] | ~gdsfactory.cross_section.CrossSection | dict[str, ~typing.Any] | str | ~gdsfactory.cross_section.Transition = 'strip', pad: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | dict[str, ~typing.Any] | ~kfactory.kcell.KCell = 'pad', layer_floorplan: ~kfactory.kcell.LayerEnum | str | tuple[int, int] = <LAYER.FLOORPLAN: 32>, edge_to_pad_distance: float = 150.0, edge_to_grating_distance: float = 150.0) Component[source]#

A die with grating couplers and pads.

Parameters:
  • size – the size of the die, in um.

  • ngratings – the number of grating couplers.

  • npads – the number of pads.

  • grating_pitch – the pitch of the grating couplers, in um.

  • pad_pitch – the pitch of the pads, in um.

  • grating_coupler – the grating coupler component.

  • cross_section – the cross section.

  • pad – the pad component.

  • layer_floorplan – the layer of the floorplan.

  • edge_to_pad_distance – the distance from the edge to the pads, in um.

  • edge_to_grating_distance – the distance from the edge to the grating couplers, in um.

import gdsfactory as gf

c = gf.components.die_with_pads(size=(11470, 4900), ngratings=14, npads=31, grating_pitch=250, pad_pitch=300, grating_coupler='grating_coupler_te', cross_section='strip', pad='pad', layer_floorplan='FLOORPLAN', edge_to_pad_distance=150, edge_to_grating_distance=150)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-69.png

disk#

gdsfactory.components.disk(radius: float = 10.0, gap: float = 0.2, wrap_angle_deg: float = 180.0, parity: int = 1, cross_section: CrossSectionSpec = 'strip') 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, gap=0.2, wrap_angle_deg=180, parity=1, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-70.png

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 = 'strip', 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.

  • via_stack – via stack component.

  • 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, gap=0.2, wrap_angle_deg=180, parity=1, cross_section='strip', heater_layer='HEATER', via_stack='via_stack_heater_mtop', heater_width=5, heater_extent=2, via_width=10, port_orientation=90)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-71.png

edge_coupler_array#

gdsfactory.components.edge_coupler_array(edge_coupler: ComponentSpec = 'edge_coupler_silicon', n: int = 5, pitch: float = 127.0, x_reflection: bool = False, text: ComponentSpec | None = 'text_rectangular', text_offset: Float2 = (10, 20), text_rotation: float = 0) 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.

  • n – number of channels.

  • pitch – Fiber pitch.

  • x_reflection – horizontal mirror.

  • text – text spec.

  • text_offset – from edge coupler.

  • text_rotation – text rotation in degrees.

import gdsfactory as gf

c = gf.components.edge_coupler_array(edge_coupler='edge_coupler_silicon', n=5, pitch=127, x_reflection=False, text='text_rectangular', text_offset=(10, 20), text_rotation=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-72.png

edge_coupler_array_with_loopback#

gdsfactory.components.edge_coupler_array_with_loopback(edge_coupler: ComponentSpec = 'edge_coupler_silicon', cross_section: CrossSectionSpec = 'strip', radius: float = 30, n: int = 8, pitch: float = 127.0, extension_length: float = 1.0, x_reflection: bool = False, text: ComponentSpec | None = 'text_rectangular', text_offset: Float2 = (0, 10), text_rotation: float = 0) 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.

  • x_reflection – horizontal mirror.

  • text – Optional text spec.

  • text_offset – x, y.

  • text_rotation – text rotation in degrees.

import gdsfactory as gf

c = gf.components.edge_coupler_array_with_loopback(edge_coupler='edge_coupler_silicon', cross_section='strip', radius=30, n=8, pitch=127, extension_length=1, x_reflection=False, text='text_rectangular', text_offset=(0, 10), text_rotation=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-73.png

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 = 'strip', port_names: tuple | None = ('o1', 'o2'), port_types: tuple | None = ('optical', 'optical'), with_bbox: bool = True, **kwargs) Component#

Linear taper, which tapers only the main cross section section.

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 – Ordered tuple of port names. First port is default taper port, second name only if with_two_ports flags used.

  • port_types – Ordered tuple of port types. First port is default taper port, second name only if with_two_ports flags used.

  • with_bbox – box in bbox_layers and bbox_offsets to avoid DRC sharp edges.

  • 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='strip', port_names=('o1', 'o2'), port_types=('optical', 'optical'), with_bbox=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-74.png

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, 5), angle_resolution=2.5, layer='WG')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-75.png

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.

  • kwargs – cross_section settings.

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, port_type='optical', centered=False)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-76.png

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 an extension attached to 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)

_images/components-77.png

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.

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, core_diameter=10, cladding_diameter=125, layer_core='WG', layer_cladding='WGCLAD')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-78.png

fiducial_squares#

gdsfactory.components.fiducial_squares(layers: Layers = ((1, 0),), size: tuple[float, float] = (5, 5), offset: float = 0.14) Component[source]#

Returns fiducials with two squares.

Parameters:
  • layers – list of layers.

  • size – in um.

  • offset – in um.

import gdsfactory as gf

c = gf.components.fiducial_squares(layers=((1, 0),), size=(5, 5), offset=0.14)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-79.png

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=('viac', 'via1', '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='strip')) 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, via_stack_width=10, via_stack_spacing=5, via_stack_offset=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-80.png

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 = -90, with_loopback: bool = False, cross_section: CrossSectionSpec = 'strip', straight_to_grating_spacing: float = 10.0, centered: bool = True) 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.

  • straight_to_grating_spacing – spacing between the last grating coupler and the loopback.

  • centered – if True, centers the array around the origin.

import gdsfactory as gf

c = gf.components.grating_coupler_array(pitch=127, n=6, port_name='o1', rotation=-90, with_loopback=False, cross_section='strip', straight_to_grating_spacing=10, centered=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-81.png

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 = 'strip', **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.

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, width_taper=10, polarization='dual', wavelength=1.55, base_layer='WG', cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-82.png

grating_coupler_elliptical#

gdsfactory.components.grating_coupler_elliptical(polarization: str = 'te', 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 = 'strip', **kwargs) Component[source]#

Grating coupler with parametrization based on Lumerical FDTD simulation.

Parameters:
  • polarization – te or tm.

  • 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).

  • kwargs – cross_section settings.

          fiber

       /  /  /  /
      /  /  /  /

    _|-|_|-|_|-|___ layer
       layer_slab |
o1  ______________|
import gdsfactory as gf

c = gf.components.grating_coupler_elliptical(polarization='te', taper_length=16.6, taper_angle=40, wavelength=1.554, fiber_angle=15, grating_line_width=0.343, neff=2.638, nclad=1.443, n_periods=30, big_last_tooth=False, layer_slab='SLAB150', slab_xmin=-1, slab_offset=2, spiked=True, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-83.png

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 = 'strip', **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, wavelength=1.554, fiber_angle=15, nclad=1.443, layer_slab='SLAB150', taper_to_slab_offset=-3, polarization='te', spiked=True, bias_gap=0, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-84.png

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, info: dict[str, Any] | None = None, 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.

  • info – optional simulation settings.

  • bias_gap – gap/trenches bias (um) to compensate for etching bias.

  • kwargs – cross_section settings.

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.43, 0.1, 0.48, 0.1, 0.607, 0.1, 0.45, 0.1, 0.427, 0.1, 0.476, 0.1, 0.503, 0.1, 0.51, 0.1, 0.494, 0.108, 0.474, 0.15, 0.433, 0.184, 0.387, 0.236, 0.36, 0.243, 0.358, 0.261, 0.353, 0.247, 0.372, 0.229, 0.378, 0.225, 0.377, 0.22, 0.38, 0.219, 0.38, 0.217, 0.383, 0.218, 0.364, 0.237, 0.368, 0.249, 0.344, 0.273, 0.331, 0.274), 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)

_images/components-85.png

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 = 'strip', **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.

  • trenches_extra_angle – extra angle for the trenches.

  • 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, trenches_extra_angle=9, wavelength=1.53, fiber_angle=15, 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='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-86.png

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)

_images/components-87.png

grating_coupler_loss_fiber_array#

gdsfactory.components.grating_coupler_loss_fiber_array(pitch: float = 127.0, grating_coupler: ComponentSpec = 'grating_coupler_te', port_name: str = 'o1', cross_section: CrossSectionSpec = 'strip', rotation: float = -90, **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.

  • rotation – degrees.

  • kwargs – cross_section settings.

Keyword Arguments:

kwargs – cross_section settings.

import gdsfactory as gf

c = gf.components.grating_coupler_loss_fiber_array(pitch=127, grating_coupler='grating_coupler_te', port_name='o1', cross_section='strip', rotation=-90)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-88.png

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)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-89.png

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 = 'SLAB150', layer_grating: LayerSpec | None = None, fiber_angle: float = 15, slab_xmin: float = -1.0, slab_offset: float = 1.0, cross_section: CrossSectionSpec = 'strip', **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 – layer for the grating.

  • 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, length_taper=150, polarization='te', wavelength=1.55, layer_slab='SLAB150', fiber_angle=15, slab_xmin=-1, slab_offset=1, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-90.png

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, layer_grating: LayerSpec | None = None, layer_slab: LayerSpec | None = None, slab_xmin: float = -1.0, slab_offset: float = 1.0, fiber_angle: float = 15, cross_section: CrossSectionSpec = 'strip') 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.

  • 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.

              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, length_taper=150, polarization='te', wavelength=1.55, slab_xmin=-1, slab_offset=1, fiber_angle=15, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-91.png

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, **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.

  • kwargs – cross_section settings.

import gdsfactory as gf

c = gf.components.grating_coupler_tree(n=4, straight_spacing=4, with_loopback=False, bend='bend_euler', fanout_length=0)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-92.png

greek_cross#

gdsfactory.components.greek_cross(length: float = 30, layers: list[LayerEnum | str | tuple[int, int]] | tuple[LayerEnum | str | tuple[int, int], ...] | None = ('WG', 'N'), widths: tuple[float, ...] = (2.0, 3.0), offsets: tuple[float, ...] | None = None, via_stack: str | Callable[[...], Component] | dict[str, Any] | KCell = 'via_stack_npp_m1') 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). - 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.

import gdsfactory as gf

c = gf.components.greek_cross(length=30, layers=('WG', 'N'), widths=(2, 3), via_stack='via_stack_npp_m1')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-93.png

greek_cross_with_pads#

gdsfactory.components.greek_cross_with_pads(pad: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | dict[str, ~typing.Any] | ~kfactory.kcell.KCell = 'pad', pad_spacing: float = 150.0, greek_cross_component: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | dict[str, ~typing.Any] | ~kfactory.kcell.KCell = 'greek_cross', pad_via: str | ~collections.abc.Callable[[...], ~gdsfactory.component.Component] | dict[str, ~typing.Any] | ~kfactory.kcell.KCell = 'via_stack_m1_mtop', cross_section: ~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

  • cross_section – cross-section for cross via to pad via wiring

import gdsfactory as gf

c = gf.components.greek_cross_with_pads(pad='pad', pad_spacing=150, greek_cross_component='greek_cross', pad_via='via_stack_m1_mtop')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-94.png

hexagon#

gdsfactory.components.hexagon(*, sides: int = 6, side_length: float = 10, layer: LayerSpec = 'WG', port_type: str | None = 'placement') 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.

import gdsfactory as gf

c = gf.components.hexagon(sides=6, side_length=10, layer='WG', port_type='placement')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-95.png

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, width=0.5, layer='WG', port_type='optical')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-96.png

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, finger_gap=2, thickness=5, layer='WG')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-97.png

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. adapted from 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, 5), notch_spacing=2, num_notches=11, offset_per_notch=0.1, row_spacing=0, layer1='WG', layer2='SLAB150')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-98.png

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, scale=(3, 1, 1, 1, 1, 2, 1, 1, 1, 1), num_marks=21, layer='WG')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-99.png

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, 2, 4, 8, 16), line_spacing=10, height=100, layer='WG')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-100.png

loop_mirror#

gdsfactory.components.loop_mirror(component: ComponentSpec = '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(component='mmi1x2', bend90='bend_euler')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-101.png

loss_deembedding_ch12_34#

gdsfactory.components.loss_deembedding_ch12_34(pitch: float = 127.0, grating_coupler: ComponentSpec = 'grating_coupler_te', port_name: str = 'o1', cross_section: CrossSectionSpec = 'strip', rotation: float = -90, **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.

  • rotation – degrees.

  • kwargs – cross_section settings.

Keyword Arguments:

kwargs – cross_section settings.

import gdsfactory as gf

c = gf.components.loss_deembedding_ch12_34(pitch=127, grating_coupler='grating_coupler_te', port_name='o1', cross_section='strip', rotation=-90)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-102.png

loss_deembedding_ch13_24#

gdsfactory.components.loss_deembedding_ch13_24(pitch: float = 127.0, grating_coupler: ComponentSpec = 'grating_coupler_te', cross_section: CrossSectionSpec = 'strip', port_name: str = 'o1', rotation: float = -90, yspacing: float | None = None, **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.

  • rotation – degrees.

  • yspacing – um.

  • kwargs – cross_section settings.

import gdsfactory as gf

c = gf.components.loss_deembedding_ch13_24(pitch=127, grating_coupler='grating_coupler_te', cross_section='strip', port_name='o1', rotation=-90)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-103.png

loss_deembedding_ch14_23#

gdsfactory.components.loss_deembedding_ch14_23(pitch: float = 127.0, grating_coupler: ComponentSpec = 'grating_coupler_te', cross_section: CrossSectionSpec = 'strip', port_name: str = 'o1', rotation: float = -90, **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.

  • rotation – degrees.

  • kwargs – cross_section settings.

Keyword Arguments:

kwargs – cross_section settings.

import gdsfactory as gf

c = gf.components.loss_deembedding_ch14_23(pitch=127, grating_coupler='grating_coupler_te', cross_section='strip', port_name='o1', rotation=-90)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-104.png

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>, straight: ComponentFactory = <function straight>, cross_section: CrossSectionSpec = 'strip', 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.

  • straight – straight 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, length_taper=10, length_mmi=5.5, width_mmi=5, gap_input_tapers=0.25, gap_output_tapers=0.25, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-105.png

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: ComponentSpec = <function taper>, straight: ComponentSpec = <function straight>, cross_section: CrossSectionSpec = 'strip') 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.

  • straight – straight 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, length_taper=10, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-106.png

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 = 'strip') 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='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-107.png

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: ComponentSpec = <function taper>, straight: ComponentSpec = <function straight>, cross_section: CrossSectionSpec = 'strip') 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.

  • cross_section – spec.

       length_mmi
        <------>
        ________
       |        |
    __/          \__
o2  __            __  o3
      \          /_ _ _ _
      |         | _ _ _ _| gap_mmi
    __/          \__
o1  __            __  o4
      \          /
       |________|

     <->
length_taper
import gdsfactory as gf

c = gf.components.mmi2x2(width_taper=1, length_taper=10, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-108.png

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 = 'strip') 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='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-109.png

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 = 'strip') 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, length_mmi=175, width_mmi=10, gap_mmi=0.8, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-110.png

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_s>, size=(25, 3)), 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 = 'strip') 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.

  • bend – spec.

  • taper – spec.

  • mm_width – input/output multimode waveguide width.

  • mc_mm_width – mode converter multimode waveguide width

  • sm_width – single mode waveguide width.

  • taper_length – taper length.

  • cross_section – cross_section spec.

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='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-111.png

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, 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 = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) 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.

  • 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.

  • min_length – minimum length for the straight.

  • auto_rename_ports – if True, renames ports.

               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, length_y=2, 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='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-112.png

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, splitter: ComponentSpec = 'mmi1x2', *, combiner: ComponentSpec | None = '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 = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) 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.

  • 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.

  • min_length – minimum length for the straight.

  • auto_rename_ports – if True, renames ports.

               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, length_y=2, length_x=0.1, splitter='mmi1x2', combiner='mmi2x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o3', port_e0_combiner='o4', nbends=2, cross_section='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-113.png

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, splitter: ComponentSpec = 'mmi2x2', combiner: ComponentSpec | None = '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 = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) 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.

  • 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.

  • min_length – minimum length for the straight.

  • auto_rename_ports – if True, renames ports.

               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, length_y=2, length_x=200, straight_x_top='straight_heater_metal', splitter='mmi2x2', combiner='mmi2x2', with_splitter=True, port_e1_splitter='o3', port_e0_splitter='o4', port_e1_combiner='o3', port_e0_combiner='o4', nbends=2, cross_section='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-114.png

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)

_images/components-115.png

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: ComponentFactory = 'mzi_coupler', splitter: ComponentFactory = '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.

  • kwargs – additional settings.

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, 20), coupler_gaps=(0.2, 0.3), delta_lengths=(10,), mzi='mzi_coupler', splitter='coupler')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-116.png

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=('taper', 'taper'), straight_functions_mmis=('straight', 'straight'), cross_sections_mmis=('strip', 'strip'), delta_lengths: tuple[float, ...] = (10.0,), mzi='mzi2x2_2x2', splitter='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.

  • straight_functions_mmis – (for each MMI coupler, list of) straight 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.

  • kwargs – additional settings.

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, 1), coupler_lengths_tapers=(10, 10), coupler_lengths_mmis=(5.5, 5.5), coupler_widths_mmis=(2.5, 2.5), coupler_gaps_mmis=(0.25, 0.25), taper_functions_mmis=('taper', 'taper'), straight_functions_mmis=('straight', 'straight'), cross_sections_mmis=('strip', 'strip'), delta_lengths=(10,), mzi='mzi2x2_2x2', splitter='mmi2x2')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-117.png

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 = 'strip', cross_section_metal: CrossSectionSpec = 'metal_routing', pad_spacing: float | str = 'pad_spacing', **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, cross_section='strip', cross_section_metal='metal_routing', pad_spacing='pad_spacing')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-118.png

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, 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 = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) 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.

  • 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.

  • min_length – minimum length for the straight.

  • auto_rename_ports – if True, renames ports.

               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, length_y=2, 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='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-119.png

mzi_phase_shifter_top_heater_metal#

gdsfactory.components.mzi_phase_shifter_top_heater_metal(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 = functools.partial(<function straight_heater_metal_undercut>, with_undercut=False, length_straight_input=0.1, length_undercut=5, length_undercut_spacing=0), straight_x_bot: ComponentSpec | 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 = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) 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.

  • 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.

  • min_length – minimum length for the straight.

  • auto_rename_ports – if True, renames ports.

               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_top_heater_metal(delta_length=10, length_y=2, length_x=200, 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='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-120.png

mzi_pin#

gdsfactory.components.mzi_pin(*, delta_length: float = 0.0, length_y: float = 2.0, length_x: float | None = 100, bend: ComponentSpec = <function bend_euler>, straight: ComponentSpec = <function straight>, straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = 'straight_pin', straight_x_bot: ComponentSpec | 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 = 'strip', cross_section_x_top: CrossSectionSpec | None = 'pin', cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) 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.

  • 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.

  • min_length – minimum length for the straight.

  • auto_rename_ports – if True, renames ports.

               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_pin(delta_length=0, length_y=2, length_x=100, straight_x_top='straight_pin', 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='strip', cross_section_x_top='pin', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True)
c.plot()

(Source code, png, hires.png, pdf)

_images/components-121.png

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 = 'strip') Component[source]#

Mzi tolerant to fabrication variations.

based on Yufei Xing thesis http://photonics.intec.ugent.be/publications/PhD.asp?ID=250

Parameters:
  • w0 – input waveguide width (um).

  • 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.

  • cross_section – cross_section 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, delta_length=10, length=1, coupler_length1=5, coupler_length2=10, coupler_gap1=0.2, coupler_gap2=0.3, taper_length=5, cross_section='strip')
c.plot()

(Source code, png, hires.png, pdf)

_images/components-122.png

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, 20), coupler_gaps=(0.2, 0.3), delta_lengths=(10,))
c.plot()

(Source code, png, hires.png, pdf)

_images/components-123.png

mzm#

gdsfactory.components.mzm(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_pin', straight_x_bot: ComponentSpec | None = 'straight_pin', 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 = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) 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.

  • 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.

  • min_length – minimum length for the straight.

  • auto_rename_ports – if True, renames ports.

               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(delta_length=10, length_y=2, length_x=200, straight_x_top='straight_pin', straight_x_bot='straight_pin', 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='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True)
c.plot()

(Source code, png, hires.png, pdf)