Components
Contents
Here is a list of generic component factories that you can customize for your fab or use it as an inspiration to build your own.
Components#
C#
- gdsfactory.components.C(width=1.0, size=(10.0, 20.0), layer='WG')[source]#
Generates a ‘C’ geometry with ports on both ends. Adapted from phidl
- Parameters
width (
float
) – of the line.size (
Tuple
[float
,float
]) – length and height of the base.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer spec.
- Return type
import gdsfactory as gf
c = gf.components.C(width=1.0, size=[10.0, 20.0], layer='WG')
c.plot()
(Source code, png, hires.png, pdf)

L#
- gdsfactory.components.L(width=1, size=(10, 20), layer='M3', port_type='electrical')[source]#
Generates an ‘L’ geometry with ports on both ends.
Based on phidl.
- Parameters
width (
Union
[int
,float
]) – of the line.size (
Tuple
[int
,int
]) – length and height of the base.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – spec.port_type (
str
) – for port.
- Return type
import gdsfactory as gf
c = gf.components.L(width=1, size=[10, 20], layer='M3', port_type='electrical')
c.plot()
(Source code, png, hires.png, pdf)

add_fidutials#
- gdsfactory.components.add_fidutials(component=<function pad_array>, gap=50, left=<function cross>, right=<function cross>, top=None, bottom=None, offset=(0, 0), **kwargs)[source]#
Return component with fidutials.
- Parameters
component (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – component to add to the new component.gap (
float
) – from component to fidutial edge.left (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – optional left fidutial.right (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – optional right fidutial.top (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – optional top fidutial.bottom (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – optional bottom fidutial.offset (
Tuple
[float
,float
]) – component offset coordinate (x, y).kwargs – fidutial settings.
- Return type
import gdsfactory as gf
c = gf.components.add_fidutials(gap=50, offset=[0, 0])
c.plot()
(Source code, png, hires.png, pdf)

add_fidutials_offsets#
- gdsfactory.components.add_fidutials_offsets(component=<function pad_array>, fidutial=<function cross>, offsets=((0, 100), (0, -100)))[source]#
Returns new component with fidutials from a list of offsets.
- Parameters
- Return type
import gdsfactory as gf
c = gf.components.add_fidutials_offsets(offsets=[[0, 100], [0, -100]])
c.plot()
(Source code, png, hires.png, pdf)

add_frame#
- gdsfactory.components.add_frame(component=<function rectangle>, width=10.0, spacing=10.0, layer='WG')[source]#
Returns component with a frame around it.
import gdsfactory as gf
c = gf.components.add_frame(width=10.0, spacing=10.0, layer='WG')
c.plot()
(Source code, png, hires.png, pdf)

align_wafer#
- gdsfactory.components.align_wafer(width=10.0, spacing=10.0, cross_length=80.0, layer='WG', layer_cladding=None, square_corner='bottom_left')[source]#
Returns cross inside a frame to align wafer.
- Parameters
width (
float
) – in um.spacing (
float
) – in um.cross_length (
float
) – for the cross.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – for the cross.layer_cladding (
Optional
[Tuple
[int
,int
]]) – optional.square_corner (
str
) – bottom_left, bottom_right, top_right, top_left.
- Return type
import gdsfactory as gf
c = gf.components.align_wafer(width=10.0, spacing=10.0, cross_length=80.0, layer='WG', square_corner='bottom_left')
c.plot()
(Source code, png, hires.png, pdf)

array#
- gdsfactory.components.array(component=<function straight>, spacing=(150.0, 150.0), columns=6, rows=1)[source]#
Returns an array of components.
- Parameters
- Raises
ValueError – If columns > 1 and spacing[0] = 0.
ValueError – If rows > 1 and spacing[1] = 0.
2 rows x 4 columns ___ ___ ___ ___ | | | | | | | | |___| |___| |___| |___| ___ ___ ___ ___ | | | | | | | | |___| |___| |___| |___|
- Return type
import gdsfactory as gf
c = gf.components.array(spacing=[150.0, 150.0], columns=6, rows=1)
c.plot()
(Source code, png, hires.png, pdf)

array_with_fanout#
- gdsfactory.components.array_with_fanout(component=<function pad>, columns=3, pitch=150.0, waveguide_pitch=10.0, start_straight_length=5.0, end_straight_length=40.0, radius=5.0, component_port_name='e4', bend=<function bend_euler>, bend_port_name1=None, bend_port_name2=None, cross_section='strip', **kwargs)[source]#
Returns an array of components in X axis with west facing waveguides fanout.
- Parameters
component (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – to replicate.columns (
int
) – number of components.pitch (
float
) – for waveguides.waveguide_pitch (
float
) – for output waveguides.start_straight_length (
float
) – length of the start of the straight.end_straight_length (
float
) – length of the straight at the end.radius (
float
) – bend radius.component_port_name (
str
) – for fanout.bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – spec.bend_port_name1 (
Optional
[str
]) – optional port name.bend_port_name2 (
Optional
[str
]) – optional port name.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – cross_section spec.kwargs – cross_section settings.
- Return type
import gdsfactory as gf
c = gf.components.array_with_fanout(columns=3, pitch=150.0, waveguide_pitch=10.0, start_straight_length=5.0, end_straight_length=40.0, radius=5.0, component_port_name='e4', cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

array_with_fanout_2d#
- gdsfactory.components.array_with_fanout_2d(pitch=150.0, pitch_x=None, pitch_y=None, columns=3, rows=2, **kwargs)[source]#
Returns 2D array with fanout waveguides facing west.
- Parameters
pitch (
float
) – 2D pitch.pitch_x (
Optional
[float
]) – defaults to pitch.pitch_y (
Optional
[float
]) – defaults to pitch.columns (
int
) – number of columns.rows (
int
) – number of rows.
- Keyword Arguments
component – to replicate
pitch – float
waveguide_pitch – for fanout
start_straight_length – length of the start of the straight
end_straight_length – length of the straight at the end
radius – bend radius
cross_section – cross_section factory
component_port_name –
bend_port_name1 –
bend_port_name2 –
- Return type
import gdsfactory as gf
c = gf.components.array_with_fanout_2d(pitch=150.0, columns=3, rows=2)
c.plot()
(Source code, png, hires.png, pdf)

array_with_via#
- gdsfactory.components.array_with_via(component=<function pad>, columns=3, spacing=150.0, via_spacing=10.0, straight_length=60.0, cross_section=functools.partial(<cyfunction cross_section>, layer='M2', width=10.0, port_names=('e1', 'e2'), port_types=('electrical', 'electrical')), via_stack=<function via_stack>, via_stack_dy=0, port_orientation=180, port_offset=None, **kwargs)[source]#
Returns an array of components in X axis with fanout waveguides facing west
- Parameters
component (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – to replicate in the array.columns (
int
) – number of components.spacing (
float
) – for the array.via_spacing (
float
) – for fanout.straight_length (
float
) – length of the straight at the end.waveguide – waveguide definition.
cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
],None
]) – spec.via_stack (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – spec.via_stack_dy (
float
) – via_stack offset.port_orientation (
float
) – 180: facing west.port_offset (
Optional
[Tuple
[float
,float
]]) – Optional port movement.kwargs – cross_section settings.
- Return type
import gdsfactory as gf
c = gf.components.array_with_via(columns=3, spacing=150.0, via_spacing=10.0, straight_length=60.0, via_stack_dy=0, port_orientation=180)
c.plot()
(Source code, png, hires.png, pdf)

array_with_via_2d#
- gdsfactory.components.array_with_via_2d(spacing=(150.0, 150.0), columns=3, rows=2, **kwargs)[source]#
Returns 2D array with fanout waveguides facing west.
import gdsfactory as gf
c = gf.components.array_with_via_2d(spacing=[150.0, 150.0], columns=3, rows=2)
c.plot()
(Source code, png, hires.png, pdf)

awg#
- gdsfactory.components.awg(arms=10, outputs=3, free_propagation_region_input_function=<function free_propagation_region_input>, free_propagation_region_output_function=<function free_propagation_region_output>, fpr_spacing=50.0)[source]#
Returns a basic Arrayed Waveguide grating.
- Parameters
arms (
int
) – number of arms.outputs (
int
) – number of outputs.free_propagation_region_input_function – for input.
free_propagation_region_output_function – for output.
fpr_spacing (
float
) – x separation between input/output free popagation region.
- Return type
import gdsfactory as gf
c = gf.components.awg(arms=10, outputs=3, fpr_spacing=50.0)
c.plot()
(Source code, png, hires.png, pdf)

bbox#
- gdsfactory.components.bbox(bbox=((- 1.0, - 1.0), (3.0, 4.0)), layer=(1, 0), top=0, bottom=0, left=0, right=0)[source]#
Returns bounding box rectangle from coordinates.
- Parameters
bbox (
Tuple
[Union
[Tuple
[float
,float
],array
],Union
[Tuple
[float
,float
],array
]]) – Coordinates of the box [(x1, y1), (x2, y2)].layer (
Tuple
[int
,int
]) – for bbox.top (
float
) – north offset.bottom (
float
) – south offset.left (
float
) – west offset.right (
float
) – east offset.
- Return type
import gdsfactory as gf
c = gf.components.bbox(bbox=[[-1.0, -1.0], [3.0, 4.0]], layer=[1, 0], top=0, bottom=0, left=0, right=0)
c.plot()
(Source code, png, hires.png, pdf)

bend_circular#
- gdsfactory.components.bend_circular(angle=90.0, npoints=720, with_bbox=True, cross_section=functools.partial(<cyfunction cross_section>, add_pins=functools.partial(<function add_pins_siepic>, pin_length=0.002), add_bbox=<function add_bbox_siepic>, cladding_layers=('DEVREC', ), cladding_offsets=(0, )), **kwargs)[source]#
Returns a radial arc.
- Parameters
angle (
float
) – angle of arc (degrees).npoints (
int
) – number of points.with_bbox (
bool
) – box in bbox_layers and bbox_offsets to avoid DRC sharp edges.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – spec (CrossSection, string or dict).kwargs – cross_section settings.
o2 | / / / o1_____/
- Return type
import gdsfactory as gf
c = gf.components.bend_circular(angle=90.0, npoints=720, with_bbox=True)
c.plot()
(Source code, png, hires.png, pdf)

bend_circular180#
- gdsfactory.components.bend_circular180(*, angle: float = 180, npoints: int = 720, with_bbox: bool = True, cross_section: typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]] = functools.partial(<cyfunction cross_section>, add_pins=functools.partial(<function add_pins_siepic>, pin_length=0.002), add_bbox=<function add_bbox_siepic>, cladding_layers=('DEVREC',), cladding_offsets=(0,)), **kwargs) gdsfactory.component.Component #
Returns a radial arc.
- Parameters
angle – angle of arc (degrees).
npoints – number of points.
with_bbox – box in bbox_layers and bbox_offsets to avoid DRC sharp edges.
cross_section – spec (CrossSection, string or dict).
kwargs – cross_section settings.
o2 | / / / o1_____/
import gdsfactory as gf
c = gf.components.bend_circular180(angle=180, npoints=720, with_bbox=True)
c.plot()
(Source code, png, hires.png, pdf)

bend_circular_heater#
- gdsfactory.components.bend_circular_heater(radius=10, angle=90, npoints=720, heater_to_wg_distance=1.2, heater_width=0.5, layer_heater=(47, 0), with_bbox=True, cross_section='strip', **kwargs)[source]#
Creates an arc of arclength
theta
starting at anglestart_angle
- Parameters
radius (
float
) – in um.angle (
float
) – angle of arc (degrees).npoints (
int
) – Number of points used per 360 degrees.heater_to_wg_distance (
float
) – in um.heater_width (
float
) – in um.layer_heater – for heater.
with_bbox (
bool
) – box in bbox_layers and bbox_offsets to avoid DRC sharp edges.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – specification (CrossSection, string, CrossSectionFactory dict).kwargs – cross_section settings.
- Return type
import gdsfactory as gf
c = gf.components.bend_circular_heater(radius=10, angle=90, npoints=720, heater_to_wg_distance=1.2, heater_width=0.5, layer_heater=[47, 0], with_bbox=True, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

bend_euler#
- gdsfactory.components.bend_euler(angle=90.0, p=0.5, with_arc_floorplan=True, npoints=720, direction='ccw', with_bbox=True, cross_section='strip', **kwargs)[source]#
Returns an euler bend that adiabatically transitions from straight to curved. By default, radius corresponds to the minimum radius of curvature of the bend. However, if with_arc_floorplan is True, radius corresponds to the effective radius of curvature (making the curve a drop-in replacement for an arc). If p < 1.0, will create a “partial euler” curve as described in Vogelbacher et. al. https://dx.doi.org/10.1364/oe.27.031394
default p = 0.5 based on this paper https://www.osapublishing.org/oe/fulltext.cfm?uri=oe-25-8-9150&id=362937
- Parameters
angle (
float
) – total angle of the curve.p (
float
) – Proportion of the curve that is an Euler curve.with_arc_floorplan (
bool
) – 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 anglenpoints (
int
) – Number of points used per 360 degrees.direction (
str
) – cw (clock-wise) or ccw (counter clock-wise).with_bbox (
bool
) – add bbox_layers and bbox_offsets to avoid DRC sharp edges.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – specification (CrossSection, string, CrossSectionFactory dict).kwargs – cross_section settings.
o2 | / / / o1_____/
- Return type
import gdsfactory as gf
c = gf.components.bend_euler(angle=90.0, p=0.5, with_arc_floorplan=True, npoints=720, direction='ccw', with_bbox=True, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

bend_euler180#
- gdsfactory.components.bend_euler180(*, angle: float = 180, p: float = 0.5, with_arc_floorplan: bool = True, npoints: int = 720, direction: str = 'ccw', with_bbox: bool = True, cross_section: Union[str, Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, Dict[str, Any]] = 'strip', **kwargs) gdsfactory.component.Component #
Returns an euler bend that adiabatically transitions from straight to curved. By default, radius corresponds to the minimum radius of curvature of the bend. However, if with_arc_floorplan is True, radius corresponds to the effective radius of curvature (making the curve a drop-in replacement for an arc). If p < 1.0, will create a “partial euler” curve as described in Vogelbacher et. al. https://dx.doi.org/10.1364/oe.27.031394
default p = 0.5 based on this paper https://www.osapublishing.org/oe/fulltext.cfm?uri=oe-25-8-9150&id=362937
- Parameters
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_euler180(angle=180, p=0.5, with_arc_floorplan=True, npoints=720, direction='ccw', with_bbox=True, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

bend_euler_s#
import gdsfactory as gf
c = gf.components.bend_euler_s()
c.plot()
(Source code, png, hires.png, pdf)

bend_port#
- gdsfactory.components.bend_port(component=functools.partial(<function straight_heater_metal_undercut>, with_undercut=False), port_name='e1', port_name2='e2', port_name1_bend=None, port_name2_bend=None, cross_section='metal3', bend=<function bend_circular>, angle=180, extension_length=None, **kwargs)[source]#
Returns a component with a bend and a straight extension.
- Parameters
component (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – to bend.port_name (
str
) – of the component.port_name2 (
str
) – of the component, to extend to.port_name1_bend (
Optional
[str
]) – for bend port.port_name2_bend (
Optional
[str
]) – for bend port.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – for the bend.bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – factory for the bend.angle (
float
) – for the bend.extension_length (
Optional
[float
]) – for the straight after the bend.kwargs – cross_section settings.
- Return type
import gdsfactory as gf
c = gf.components.bend_port(port_name='e1', port_name2='e2', cross_section='metal3', angle=180)
c.plot()
(Source code, png, hires.png, pdf)

bend_s#
- gdsfactory.components.bend_s(size=(10.0, 2.0), nb_points=99, with_bbox=True, cross_section='strip', **kwargs)[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 (
Tuple
[float
,float
]) – in x and y direction.nb_points (
int
) – number of points.with_bbox (
bool
) – box in bbox_layers and bbox_offsets to avoid DRC sharp edges.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – spec.kwargs – cross_section settings.
- Return type
import gdsfactory as gf
c = gf.components.bend_s(size=[10.0, 2.0], nb_points=99, with_bbox=True, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

bend_straight_bend#
- gdsfactory.components.bend_straight_bend(straight_length=10.0, angle=90, p=0.5, with_arc_floorplan=True, npoints=720, direction='ccw', cross_section=functools.partial(<cyfunction cross_section>, add_pins=functools.partial(<function add_pins_siepic>, pin_length=0.002), add_bbox=<function add_bbox_siepic>, cladding_layers=('DEVREC', ), cladding_offsets=(0, )), **kwargs)[source]#
Sbend made of 2 euler bends and straight section in between.
- Parameters
straight_length (
float
) –angle (
float
) – total angle of the curvep (
float
) – Proportion of the curve that is an Euler curvewith_arc_floorplan (
bool
) – 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 anglenpoints (
int
) – Number of points used per 360 degreesdirection (
str
) – cw (clock-wise) or ccw (counter clock-wise)cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – specification (CrossSection, string, CrossSectionFactory dict).kwargs – cross_section settings
- Return type
import gdsfactory as gf
c = gf.components.bend_straight_bend(straight_length=10.0, angle=90, p=0.5, with_arc_floorplan=True, npoints=720, direction='ccw')
c.plot()
(Source code, png, hires.png, pdf)

cavity#
- gdsfactory.components.cavity(component=<function dbr>, coupler=<function coupler>, length=0.1, gap=0.2, **kwargs)[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
ml (mirror left) mr (mirror right) | | |o1 - o2__ __o3 - o1| | \ / | \ / ---=========--- o1 o1 length o4 o2
- Return type
import gdsfactory as gf
c = gf.components.cavity(length=0.1, gap=0.2)
c.plot()
(Source code, png, hires.png, pdf)

cdc#
- gdsfactory.components.cdc(length=30.0, gap=0.5, period=0.22, dc=0.5, angle=0.5235987755982988, width_top=2.0, width_bot=0.75, input_bot=False, dw_top=None, dw_bot=None, fins=False, fin_size=(0.2, 0.05), contradc_wgt=None, port_midpoint=(0, 0), direction='EAST', waveguide_template=<function strip>, **kwargs)[source]#
Grating-Assisted Contra-Directional Coupler.
- Parameters
length (
float
) – Length of the coupling region.gap (
float
) – Distance between the two straights.period (
float
) – Period of the grating.dc (
float
) – Duty cycle of the grating. Must be between 0 and 1.angle (
float
) – in radians at which the straight bends towards the coupling region.width_top (
float
) – Width of the top straight in the coupling region.width_bot (
float
) – Width of the bottom straight in the coupling region.dw_top (
Optional
[float
]) – Amplitude of the width variation on the top. Default=gap/2.0.dw_bot (
Optional
[float
]) – Amplitude of the width variation on the bottom. Default=gap/2.0.input_bot (
bool
) – True makes the default input the bottom straight (rather than top).fins (
bool
) – If True, adds fins to the input/output straights. In this case a different template for the component must be specified. This feature is useful when performing electron-beam lithography and using different beam currents for fine features (helps to reduce stitching errors).fin_size (
Tuple
[float
,float
]) – Specifies the x- and y-size of the fins. Defaults to 200 nm x 50 nmcontradc_wgt (
None
) – waveguide_template.port_midpoint (
Tuple
[int
,int
]) – Cartesian coordinate of the input port (AT TOP if input_bot=False, AT BOTTOM if input_bot=True).direction (
str
) – Direction that the component will point towards, can be of type ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, OR an angle (float, in radians).waveguide_template (
Callable
) – Picwriter WaveguideTemplate function.
- Return type
import gdsfactory as gf
c = gf.components.cdc(length=30.0, gap=0.5, period=0.22, dc=0.5, angle=0.5235987755982988, width_top=2.0, width_bot=0.75, input_bot=False, fins=False, fin_size=[0.2, 0.05], port_midpoint=[0, 0], direction='EAST')
c.plot()
(Source code, png, hires.png, pdf)

cdsem_all#
- gdsfactory.components.cdsem_all(widths=(0.4, 0.45, 0.5, 0.6, 0.8, 1.0), dense_lines_width=0.3, dense_lines_width_difference=0.02, dense_lines_gap=0.3, dense_lines_labels=('DL', 'DM', 'DH'), straight=<function straight>, bend90=<function bend_circular>, cross_section=functools.partial(<cyfunction cross_section>, add_pins=functools.partial(<function add_pins_siepic>, pin_length=0.002), add_bbox=<function add_bbox_siepic>, cladding_layers=('DEVREC', ), cladding_offsets=(0, )), text=functools.partial(<function text_rectangular>, size=1))[source]#
column with all optical PCMs
- Parameters
widths (
Tuple
[float
,...
]) – for straight lines.dense_lines_width (
Optional
[float
]) – in um.dense_lines_width_difference (
float
) – in um.dense_lines_gap (
float
) – in um.dense_lines_labels (
Tuple
[str
,...
]) – strings.straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – spec.bend90 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – spec.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – spec.text (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – sepc.
- Return type
import gdsfactory as gf
c = gf.components.cdsem_all(widths=[0.4, 0.45, 0.5, 0.6, 0.8, 1.0], dense_lines_width=0.3, dense_lines_width_difference=0.02, dense_lines_gap=0.3, dense_lines_labels=['DL', 'DM', 'DH'])
c.plot()
(Source code, png, hires.png, pdf)

circle#
- gdsfactory.components.circle(radius=10.0, angle_resolution=2.5, layer='WG')[source]#
Generate a circle geometry.
- Parameters
radius (
float
) – of the circle.angle_resolution (
float
) – number of degrees per point.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer.
- Return type
import gdsfactory as gf
c = gf.components.circle(radius=10.0, angle_resolution=2.5, layer='WG')
c.plot()
(Source code, png, hires.png, pdf)

compass#
- gdsfactory.components.compass(size=(4.0, 2.0), layer='WG', port_type='electrical', port_inclusion=0.0, port_orientations=(180, 90, 0, - 90))[source]#
Rectangular via_stack pad with centered ports on rectangle edges (north, south, east, and west)
- Parameters
size (
Tuple
[float
,float
]) – rectangle size.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – tuple (int, int).port_type (
Optional
[str
]) – optical, electrical.port_inclusion (
float
) – from edge.port_orientations (
Optional
[Tuple
[int
,...
]]) – list of port_orientations to add. None add one port only.
- Return type
import gdsfactory as gf
c = gf.components.compass(size=[4.0, 2.0], layer='WG', port_type='electrical', port_inclusion=0.0, port_orientations=[180, 90, 0, -90])
c.plot()
(Source code, png, hires.png, pdf)

compensation_path#
- gdsfactory.components.compensation_path(crossing45=<function crossing45>, direction='top', cross_section='strip')[source]#
Returns Component Path with same path length as the crossing.
with input and output ports having same y coordinates
- Parameters
---- ---- \ / \ / \ / X / \ / \ / \ ---- ----
Compensation path:
--+-- _/ \_ --/ \--
- Return type
import gdsfactory as gf
c = gf.components.compensation_path(direction='top', cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

component_lattice#
- gdsfactory.components.component_lattice(lattice='\\n C-X\\n CXX\\n CXX\\n C-X\\n ', symbol_to_component=None, grid_per_unit=1000)[source]#
Return a lattice Component of N inputs and outputs Columns must have components with the same x spacing between input/output ports Lines must have components with the same y spacing between input/output ports
- Parameters
lattice (
str
) – ASCII map with character:symbol_to_component (
Optional
[Dict
[str
,Component
]]) –grid_per_unit (
int
) –
Lattice example:
X-X XCX XCX X-X
import gdsfactory as gf from gdsfactory.components.crossing_waveguide import crossing45 from gdsfactory.components.crossing_waveguide import compensation_path symbol_to_component = { "C": gf.routing.fanout2x2(component=gf.components.coupler(), port_spacing=40.0), "X": crossing45(port_spacing=40.0), "-": compensation_path(crossing45=crossing45(port_spacing=40.0)), } c = gf.components.component_lattice(symbol_to_component=symbol_to_component) c.plot()
(Source code, png, hires.png, pdf)
- Return type
component_sequence#
- gdsfactory.components.component_sequence(sequence, symbol_to_component, ports_map=None, port_name1='o1', port_name2='o2', start_orientation=0.0)[source]#
Returns component from a ASCII sequence and a dictionary to interpret each symbol
- Parameters
sequence (
str
) – a string or a list of symbols.symbol_to_component (
Dict
[str
,Tuple
[Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]],str
,str
]]) – maps symbols to (component, input, output).ports_map (
Optional
[Dict
[str
,Tuple
[str
,str
]]]) – (optional) extra port mapping using the convention. {port_name: (alias_name, port_name)}port_name1 (
str
) – input port_name.port_name2 (
str
) – output port_name.start_orientation (
float
) – in degrees.
- Returns
- containing the sequence of sub-components
instantiated and connected together in the sequence order.
- Return type
component
import gdsfactory as gf bend180 = gf.components.bend_circular180() wg_pin = gf.components.straight_pin(length=40) wg = gf.components.straight() # Define a map between symbols and (component, input port, output port) symbol_to_component = { "A": (bend180, 'o1', 'o2'), "B": (bend180, 'o2', 'o1'), "H": (wg_pin, 'o1', 'o2'), "-": (wg, 'o1', 'o2'), } # Each character in the sequence represents a component s = "AB-H-H-H-H-BA" c = gf.components.component_sequence(sequence=s, symbol_to_component=symbol_to_component) c.plot()
(Source code, png, hires.png, pdf)
copy_layers#
- gdsfactory.components.copy_layers(factory=<function cross>, layers=((1, 0), (2, 0)), **kwargs)[source]#
Returns a component with the geometry copied in different layers.
import gdsfactory as gf
c = gf.components.copy_layers(layers=[[1, 0], [2, 0]])
c.plot()
(Source code, png, hires.png, pdf)

coupler#
- gdsfactory.components.coupler(gap=0.236, length=20.0, coupler_symmetric=<function coupler_symmetric>, coupler_straight=<function coupler_straight>, dy=5.0, dx=10.0, cross_section='strip', **kwargs)[source]#
Symmetric coupler.
- Parameters
gap (
float
) – between straights in um.length (
float
) – of coupling region in um.coupler_symmetric. –
coupler_straight. –
dy (
float
) – port to port vertical spacing in um.dx (
float
) – length of bend in x direction in um.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – spec (CrossSection, string or dict).kwargs – cross_section settings.
dx dx |------| |------| o2 ________ ______o3 \ / | \ length / | ======================= gap | dy / \ | ________/ \_______ | o1 o4 coupler_straight coupler_symmetric
- Return type
import gdsfactory as gf
c = gf.components.coupler(gap=0.236, length=20.0, dy=5.0, dx=10.0, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

coupler90#
- gdsfactory.components.coupler90(gap=0.2, radius=10.0, bend=<function bend_euler>, cross_section='strip', bend_cross_section=None, **kwargs)[source]#
straight coupled to a bend.
- Parameters
gap (
float
) – um.radius (
float
) – um.straight – for straight.
bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – bend spec.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – cross_section spec.bend_cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
],None
]) – optional bend cross_section spec.kwargs – cross_section settings.
3 | / / 2_/ 1____4
- Return type
import gdsfactory as gf
c = gf.components.coupler90(gap=0.2, radius=10.0, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

coupler90bend#
- gdsfactory.components.coupler90bend(radius=10.0, gap=0.2, bend=<function bend_euler>, cross_section_inner='strip', cross_section_outer='strip')[source]#
Returns 2 coupled bends.
- Parameters
radius (
float
) – um.gap (
float
) – um.bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – for bend.cross_section_inner (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – spec inner bend.cross_section_outer (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – spec outer bend.
r 3 4 | | | | / / | / / 2____/ / 1_____/
- Return type
import gdsfactory as gf
c = gf.components.coupler90bend(radius=10.0, gap=0.2, cross_section_inner='strip', cross_section_outer='strip')
c.plot()
(Source code, png, hires.png, pdf)

coupler90circular#
- gdsfactory.components.coupler90circular(gap: float = 0.2, radius: float = 10.0, *, bend: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function bend_circular>, cross_section: typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]] = 'strip', bend_cross_section: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]]] = None, **kwargs) gdsfactory.component.Component #
straight coupled to a bend.
- Parameters
gap – um.
radius – um.
straight – for straight.
bend – bend spec.
cross_section – cross_section spec.
bend_cross_section – optional bend cross_section spec.
kwargs – cross_section settings.
3 | / / 2_/ 1____4
import gdsfactory as gf
c = gf.components.coupler90circular(gap=0.2, radius=10.0, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

coupler_adiabatic#
- gdsfactory.components.coupler_adiabatic(length1=20.0, length2=50.0, length3=30.0, wg_sep=1.0, input_wg_sep=3.0, output_wg_sep=3.0, dw=0.1, port=(0, 0), direction='EAST', waveguide_template=<function strip>, cross_section='strip', **kwargs)[source]#
Returns 50/50 adiabatic coupler. Design based on asymmetric adiabatic 3dB coupler designs, such as those
Has input Bezier curves, with poles set to half of the x-length of the S-bend.
I is the first half of input S-bend where input widths taper by +dw and -dw II is the second half of the S-bend straight with constant, unbalanced widths III is the region where the two asymmetric straights gradually come together IV straights taper back to the original width at a fixed distance from one another IV is the output S-bend straight.
- Parameters
length1 (
float
) – region that gradually brings the two asymmetric straights together. In this region the straight widths gradually change to be different by dw.length2 (
float
) – coupling region, where asymmetric straights gradually become the same width.length3 (
float
) – output region where the two straights separate.wg_sep (
float
) – Distance between center-to-center in the coupling region (Region 2).input_wg_sep (
float
) – Separation of the two straights at the input, center-to-center.output_wg_sep (
float
) – Separation of the two straights at the output, center-to-center.dw (
float
) – Change in straight width. In Region 1, top arm tapers to width+dw/2.0, bottom taper to width-dw/2.0.port (
Tuple
[int
,int
]) – coordinate of the input port (top left).direction (
str
) – for component NORTH, WEST, SOUTH, EAST,or angle in radians.waveguide_template (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – object or function.
- Keyword Arguments
wg_width – in um.
wg_layer – gf.LAYER.WG[0].
wg_datatype – gf.LAYER.WG[1].
clad_layer – gf.LAYER.WGCLAD[0].
clad_datatype – gf.LAYER.WGCLAD[1].
bend_radius – in um.
cladding_offset – in um.
- Return type
import gdsfactory as gf
c = gf.components.coupler_adiabatic(length1=20.0, length2=50.0, length3=30.0, wg_sep=1.0, input_wg_sep=3.0, output_wg_sep=3.0, dw=0.1, port=[0, 0], direction='EAST', cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

coupler_asymmetric#
- gdsfactory.components.coupler_asymmetric(bend=<function bend_s>, straight=<function straight>, gap=0.234, dy=5.0, dx=10.0, cross_section='strip', **kwargs)[source]#
bend coupled to straight waveguide
- Parameters
bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – spec.straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – straight spec.gap (
float
) – um.dy (
float
) – port to port vertical spacing.dx (
float
) – bend length in x direction.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – spec.kwargs – cross_section settings.
dx |-----| _____ o2 / | _____/ | gap o1____________ | dy o3
- Return type
import gdsfactory as gf
c = gf.components.coupler_asymmetric(gap=0.234, dy=5.0, dx=10.0, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

coupler_full#
- gdsfactory.components.coupler_full(length=40.0, gap=0.5, dw=0.1, angle=0.5235987755982988, parity=1, port=(0, 0), direction='EAST', waveguide_template=<function strip>, cross_section='strip', **kwargs)[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).
Region I is the first half of the input S-bend straight where the input straights widths taper by +dw and -dw, Region II is the second half of the S-bend straight with constant, unbalanced widths, Region III is the coupling region where the straights from unbalanced widths to balanced widths to reverse polarity unbalanced widths, Region IV is the fixed width straight that curves away from the coupling region, Region V is the final curve where the straights taper back to the regular width specified in the straight template.
- Parameters
length (
float
) – Length of the coupling region.gap (
float
) – Distance between the two straights.dw (
float
) – Change in straight width. Top arm tapers to width - dw, bottom to width - dw.angle (
float
) – Angle in radians at which the straight bends towards the coupling region.parity (integer -1 or 1) – If -1, mirror-flips the structure so that input port is actually the bottom port.
port (
Tuple
[int
,int
]) – Cartesian coordinate for input port (AT TOP if parity=1, AT BOTTOM if parity=-1).direction (
str
) – Direction that the component points towards, can be of type NORTH, WEST, SOUTH, EAST, OR an angle (float in radians).waveguide_template (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – function that returns Picwriter WaveguideTemplate object
- Keyword Arguments
wg_width – 0.5.
wg_layer – gf.LAYER.WG[0].
wg_datatype – gf.LAYER.WG[1].
clad_layer – gf.LAYER.WGCLAD[0].
clad_datatype – gf.LAYER.WGCLAD[1].
bend_radius – in um.
cladding_offset – in um.
- Return type
import gdsfactory as gf
c = gf.components.coupler_full(length=40.0, gap=0.5, dw=0.1, angle=0.5235987755982988, parity=1, port=[0, 0], direction='EAST', cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

coupler_ring#
- gdsfactory.components.coupler_ring(gap=0.2, radius=5.0, length_x=4.0, coupler90=<function coupler90>, bend=None, straight=<function straight>, coupler_straight=<function coupler_straight>, cross_section='strip', bend_cross_section=None, **kwargs)[source]#
Coupler for ring.
- Parameters
gap (
float
) – spacing between parallel coupled straight waveguides.radius (
float
) – of the bends.length_x (
float
) – length of the parallel coupled straight waveguides.coupler90 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – straight coupled to a 90deg bend.bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – bend spec.coupler_straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – two parallel coupled straight waveguides.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – cross_section spec.bend_cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
],None
]) – optional bend cross_section spec.kwargs – cross_section settings for bend and coupler.
2 3 | | \ / \ / ---=========--- 1 length_x 4
- Return type
import gdsfactory as gf
c = gf.components.coupler_ring(gap=0.2, radius=5.0, length_x=4.0, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

coupler_straight#
- gdsfactory.components.coupler_straight(length=10.0, gap=0.27, straight=<function straight>, **kwargs)[source]#
Coupler_straight with two parallel straights.
import gdsfactory as gf
c = gf.components.coupler_straight(length=10.0, gap=0.27)
c.plot()
(Source code, png, hires.png, pdf)

coupler_symmetric#
- gdsfactory.components.coupler_symmetric(bend=<function bend_s>, gap=0.234, dy=5.0, dx=10.0, cross_section=functools.partial(<cyfunction cross_section>, add_pins=functools.partial(<function add_pins_siepic>, pin_length=0.002), add_bbox=<function add_bbox_siepic>, cladding_layers=('DEVREC', ), cladding_offsets=(0, )), **kwargs)[source]#
Two coupled straights with bends.
- Parameters
bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – bend spec.gap (
float
) – in um.dy (
float
) – port to port vertical spacing.dx (
float
) – bend length in x direction.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – section.**kwargs – cross_section settings.
dx |-----| ___ E1 / | _____/ | gap _____ | dy \ | \___ | E0
- Return type
import gdsfactory as gf
c = gf.components.coupler_symmetric(gap=0.234, dy=5.0, dx=10.0)
c.plot()
(Source code, png, hires.png, pdf)

cross#
- gdsfactory.components.cross(length=10.0, width=3.0, layer='WG', port_type=None)[source]#
Returns a cross from two rectangles of length and width.
- Parameters
length (
float
) – float Length of the cross from one end to the other.width (
float
) – float Width of the arms of the cross.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer for geometry.port_type (
Optional
[str
]) – None, optical, electrical.
- Return type
import gdsfactory as gf
c = gf.components.cross(length=10.0, width=3.0, layer='WG')
c.plot()
(Source code, png, hires.png, pdf)

crossing#
- gdsfactory.components.crossing(arm=<function crossing_arm>, cross_section='strip')[source]#
Waveguide crossing.
import gdsfactory as gf
c = gf.components.crossing(cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

crossing45#
- gdsfactory.components.crossing45(crossing=<function crossing>, port_spacing=40.0, dx=None, alpha=0.08, npoints=101, cross_section='strip')[source]#
Returns 45deg crossing with bends.
- Parameters
crossing (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – crossing function.port_spacing (
float
) – target I/O port spacing.dx (
Optional
[float
]) – target length.alpha (
float
) – optimization parameter. diminish it for tight bends, increase it if raises assertion angle errorsnpoints (
int
) – number of points.
The 45 Degree crossing CANNOT be kept as an SRef since we only allow for multiples of 90Deg rotations in SRef.
---- ---- \ / X / \ --- ----
- Return type
import gdsfactory as gf
c = gf.components.crossing45(port_spacing=40.0, alpha=0.08, npoints=101, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

crossing_arm#
- gdsfactory.components.crossing_arm(r1=3.0, r2=1.1, w=1.2, L=3.4, layer_slab='SLAB150', cross_section='strip')[source]#
Returns crossing arm.
- Parameters
r1 (
float
) – ellipse radius1.r2 (
float
) – ellipse radius2.w (
float
) – width in um.L (
float
) – length in um.layer_slab (
Union
[Tuple
[int
,int
],int
,str
,None
]) – for the shallow etch.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – spec.
- Return type
import gdsfactory as gf
c = gf.components.crossing_arm(r1=3.0, r2=1.1, w=1.2, L=3.4, layer_slab='SLAB150', cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

crossing_etched#
- gdsfactory.components.crossing_etched(width=0.5, r1=3.0, r2=1.1, w=1.2, L=3.4, layer_wg='WG', layer_slab='SLAB150')[source]#
Waveguide crossing. - The 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. What we write is what we etch on this step
- Parameters
width (
float
) – input waveguides width.r1 (
float
) – radii.r2 (
float
) – radii.w (
float
) – wide width.L (
float
) – length.layer_wg (
Union
[Tuple
[int
,int
],int
,str
,None
]) – waveguide layer.layer_slab (
Union
[Tuple
[int
,int
],int
,str
,None
]) – shallow etch layer.
- Return type
import gdsfactory as gf
c = gf.components.crossing_etched(width=0.5, r1=3.0, r2=1.1, w=1.2, L=3.4, layer_wg='WG', layer_slab='SLAB150')
c.plot()
(Source code, png, hires.png, pdf)

crossing_from_taper#
- gdsfactory.components.crossing_from_taper(taper=<function <lambda>>)[source]#
Returns Crossing based on a taper. The default is a dummy taper
- Parameters
taper – taper function.
- Return type
import gdsfactory as gf
c = gf.components.crossing_from_taper()
c.plot()
(Source code, png, hires.png, pdf)

cutback_bend#
- gdsfactory.components.cutback_bend(bend90=<function bend_euler>, straight_length=5.0, rows=6, columns=5, straight=<function straight>, **kwargs)[source]#
Deprecated. Use cutback_bend90 instead with smaller footprint.
- Parameters
bend90 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – bend spec.straight_length (
float
) – in um.rows (
int
) – number of rows.columns (
int
) – number of columns.straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – straight spec.kwargs – cross_section settings.
this is a column _ _| _| _ this is a row
- Return type
import gdsfactory as gf
c = gf.components.cutback_bend(straight_length=5.0, rows=6, columns=5)
c.plot()
(Source code, png, hires.png, pdf)

cutback_bend180#
- gdsfactory.components.cutback_bend180(bend180=functools.partial(<function bend_euler>, angle=180), straight_length=5.0, rows=6, columns=6, spacing=3, straight=<function straight>, **kwargs)[source]#
Returns cutback to measure u bend loss.
- Parameters
bend180 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – bend spec.straight_length (
float
) – in um.rows (
int
) – number of rows.columns (
int
) – number of columns.spacing (
int
) – in um.straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – straight spec.kwargs – cross_section settings.
_ _| |_ this is a row _ this is a column
- Return type
import gdsfactory as gf
c = gf.components.cutback_bend180(straight_length=5.0, rows=6, columns=6, spacing=3)
c.plot()
(Source code, png, hires.png, pdf)

cutback_bend180circular#
- gdsfactory.components.cutback_bend180circular(*, bend180: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = functools.partial(<function bend_circular>, angle=180), straight_length: float = 5.0, rows: int = 6, columns: int = 6, spacing: int = 3, straight: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function straight>, **kwargs) gdsfactory.component.Component #
Returns cutback to measure u bend loss.
- Parameters
bend180 – bend spec.
straight_length – in um.
rows – number of rows.
columns – number of columns.
spacing – in um.
straight – straight spec.
kwargs – cross_section settings.
_ _| |_ this is a row _ this is a column
import gdsfactory as gf
c = gf.components.cutback_bend180circular(straight_length=5.0, rows=6, columns=6, spacing=3)
c.plot()
(Source code, png, hires.png, pdf)

cutback_bend90#
- gdsfactory.components.cutback_bend90(bend90=<function bend_euler>, straight_length=5.0, rows=6, columns=6, spacing=5, straight=<function straight>, **kwargs)[source]#
Returns bend90 cutback.
- Parameters
bend90 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – bend spec.straight_length (
float
) – in um.rows (
int
) – number of rows.columns (
int
) – number of columns.straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – straight spec.kwargs – cross_section settings.
_ |_| |
- Return type
import gdsfactory as gf
c = gf.components.cutback_bend90(straight_length=5.0, rows=6, columns=6, spacing=5)
c.plot()
(Source code, png, hires.png, pdf)

cutback_bend90circular#
- gdsfactory.components.cutback_bend90circular(*, bend90: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function bend_circular>, straight_length: float = 5.0, rows: int = 6, columns: int = 6, spacing: int = 5, straight: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function straight>, **kwargs) gdsfactory.component.Component #
Returns bend90 cutback.
- Parameters
bend90 – bend spec.
straight_length – in um.
rows – number of rows.
columns – number of columns.
straight – straight spec.
kwargs – cross_section settings.
_ |_| |
import gdsfactory as gf
c = gf.components.cutback_bend90circular(straight_length=5.0, rows=6, columns=6, spacing=5)
c.plot()
(Source code, png, hires.png, pdf)

cutback_component#
- gdsfactory.components.cutback_component(component=functools.partial(<function taper_from_csv>, filepath=PosixPath('/home/runner/work/gdsfactory/gdsfactory/gdsfactory/components/csv_data/taper_strip_0p5_3_36.csv')), cols=4, rows=5, radius=5.0, port1='o1', port2='o2', bend180=functools.partial(<function bend_euler>, angle=180), straight=<function straight>, mirror=False, straight_length=None)[source]#
Returns a daisy chain of components for measuring their loss.
- Parameters
component (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – for cutback.cols (
int
) – number of columns.rows (
int
) – number of rows.radius (
float
) – for bend.port1 (
str
) – name of first optical port.port2 (
str
) – name of second optical port.bend180 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – ubend.straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – waveguide spec to connect both sides.mirror (
bool
) – Flips component. Useful when ‘o2’ is the port that you want to route to.straight_length (
Optional
[float
]) – length of the straight section between cutbacks.
- Return type
import gdsfactory as gf
c = gf.components.cutback_component(cols=4, rows=5, radius=5.0, port1='o1', port2='o2', mirror=False)
c.plot()
(Source code, png, hires.png, pdf)

cutback_component_mirror#
- gdsfactory.components.cutback_component_mirror(component: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = 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, radius: float = 5.0, port1: str = 'o1', port2: str = 'o2', bend180: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = functools.partial(<function bend_euler>, angle=180), straight: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function straight>, *, mirror: bool = True, straight_length: typing.Optional[float] = None) gdsfactory.component.Component #
Returns a daisy chain of components for measuring their loss.
- Parameters
component – for cutback.
cols – number of columns.
rows – number of rows.
radius – for bend.
port1 – name of first optical port.
port2 – name of second optical port.
bend180 – ubend.
straight – waveguide spec to connect both sides.
mirror – Flips component. Useful when ‘o2’ is the port that you want to route to.
straight_length – length of the straight section between cutbacks.
import gdsfactory as gf
c = gf.components.cutback_component_mirror(cols=4, rows=5, radius=5.0, port1='o1', port2='o2', mirror=True)
c.plot()
(Source code, png, hires.png, pdf)

dbr#
- gdsfactory.components.dbr(w1=0.475, w2=0.525, l1=0.159, l2=0.159, n=10, straight=<function straight>)[source]#
Distributed Bragg Reflector.
- Parameters
l1 l2 <-----><--------> _________ _______| w1 w2 ... n times _______ |_________
- Return type
import gdsfactory as gf
c = gf.components.dbr(w1=0.475, w2=0.525, l1=0.159, l2=0.159, n=10)
c.plot()
(Source code, png, hires.png, pdf)

dbr_tapered#
- gdsfactory.components.dbr_tapered(length=10.0, period=0.85, dc=0.5, w1=0.4, w2=1.0, taper_length=20.0, fins=False, fin_size=(0.2, 0.05), port=(0, 0), direction='EAST', waveguide_template=<function strip>, waveguide_template_dbr=None, **kwargs)[source]#
Distributed Bragg Reflector Cell class. Tapers the input straight to a periodic straight structure with varying width (1-D photonic crystal).
- Parameters
length (
float
) – Length of the DBR region.period (
float
) – Period of the repeated unit.dc (
float
) – Duty cycle of the repeated unit (must be a float between 0 and 1.0).w1 (
float
) – thin section width. w1 = 0 corresponds to disconnected periodic blocks.w2 (
float
) – wide section width.taper_length (
float
) – between the input/output straight and the DBR region.fins (
bool
) – If True, adds fins to the input/output straights.fin_size (
Tuple
[float
,float
]) – Specifies the x- and y-size of the fins. Defaults to 200 nm x 50 nmwaveguide_template_dbr (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – If fins is True, a WaveguideTemplate must be specified.port (
Tuple
[int
,int
]) – Cartesian coordinate of the input port. Defaults to (0,0).direction (
str
) – Direction that the component points towards, ‘NORTH’, ‘WEST’, ‘SOUTH’, ‘EAST’, OR an angle (float, in radians).waveguide_template (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – WaveguideTemplate object.
- Keyword Arguments
wg_width – 0.5.
wg_layer – gf.LAYER.WG[0].
wg_datatype – gf.LAYER.WG[1].
clad_layer – gf.LAYER.WGCLAD[0].
clad_datatype – gf.LAYER.WGCLAD[1].
bend_radius –
cladding_offset –
period <-----><--------> _________ _______| w1 w2 ... n times _______ |_________
- Return type
import gdsfactory as gf
c = gf.components.dbr_tapered(length=10.0, period=0.85, dc=0.5, w1=0.4, w2=1.0, taper_length=20.0, fins=False, fin_size=[0.2, 0.05], port=[0, 0], direction='EAST')
c.plot()
(Source code, png, hires.png, pdf)

delay_snake#
- gdsfactory.components.delay_snake(wg_width=0.5, wg_width_wide=2.0, total_length=1600.0, L0=5.0, taper_length=10.0, n=2, taper=<function taper>, bend=<function bend_euler>, straight=<function straight>, **kwargs)[source]#
Snake input facing west output facing east.
- Parameters
wg_width (
float
) – waveguide width.wg_width_wide (
float
) – for the wide.total_length (
float
) – of the delay.L0 (
float
) – initial offset.taper_length (
float
) – length of the taper.n (
int
) – number of loops.taper (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – taper library.bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – bend spec.straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – straight spec.
| L0 | L2 | ->-------------| | pi * radius |-------------------| | |-------------------> | DL |
- Return type
import gdsfactory as gf
c = gf.components.delay_snake(wg_width=0.5, wg_width_wide=2.0, total_length=1600.0, L0=5.0, taper_length=10.0, n=2)
c.plot()
(Source code, png, hires.png, pdf)

delay_snake2#
- gdsfactory.components.delay_snake2(length=1600.0, length0=0.0, n=2, bend180=functools.partial(<function bend_euler>, angle=180), cross_section='strip', **kwargs)[source]#
Snake input facing west.
Snake output facing east This snakes can have a starting offset (length0)
- Parameters
length (
float
) – total length.length0 (
float
) – initial offset.n (
int
) – number of loops.bend180 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – ubend spec.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – cross_section spec.kwargs – cross_section settings.
| length0 | length1 | >---------| | bend180.length |-------------------| | |-------------------> | delta_length |
- Return type
import gdsfactory as gf
c = gf.components.delay_snake2(length=1600.0, length0=0.0, n=2, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

delay_snake3#
- gdsfactory.components.delay_snake3(length=1600.0, length0=0.0, n=2, bend180=functools.partial(<function bend_euler>, angle=180), cross_section='strip', **kwargs)[source]#
Snake input facing west.
- Parameters
length (
float
) – total length.length0 (
float
) – initial offset.n (
int
) – number of loops.bend180 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – ubend spec.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – cross_section spec.kwargs – cross_section settings.
| length0 | >---------\ \bend180.info['length'] / |-------------------/ | |-------------------> | delta_length |
- Return type
import gdsfactory as gf
c = gf.components.delay_snake3(length=1600.0, length0=0.0, n=2, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

delay_snake_sbend#
- gdsfactory.components.delay_snake_sbend(length=100.0, length1=0.0, length4=0.0, radius=5.0, waveguide_spacing=5.0, bend=<function bend_euler>, sbend=<function bend_s>, sbend_xsize=100.0, straight=<function straight>, **kwargs)[source]#
Returns compact Snake with sbend in the middle.
Input port faces west and output port faces east.
- Parameters
length (
float
) – total length.length1 (
float
) – first straight section length.length3 – third straight section length.
radius (
float
) – u bend radius.waveguide_spacing (
float
) – waveguide pitch.bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – bend spec.sbend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – sbend spec.sbend_size – sbend size.
straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – straight spec.kwargs – cross_section settings.
length1 <---------------------------- length2 spacing | _______ | | \ | | \ | bend1 radius | \sbend | bend2| \ | | \ | | \__| | ---------------------->-----------> length3 length4 We adjust length2 and length3
- Return type
import gdsfactory as gf
c = gf.components.delay_snake_sbend(length=100.0, length1=0.0, length4=0.0, radius=5.0, waveguide_spacing=5.0, sbend_xsize=100.0)
c.plot()
(Source code, png, hires.png, pdf)

dicing_lane#
- gdsfactory.components.dicing_lane(size=(50, 300), marker=functools.partial(<function triangle>, layer='M3', xtop=2), layer_dicing='DICING')[source]#
Dicing lane with triangular markers on both sides.
- Parameters
- Return type
import gdsfactory as gf
c = gf.components.dicing_lane(size=[50, 300], layer_dicing='DICING')
c.plot()
(Source code, png, hires.png, pdf)

die#
- gdsfactory.components.die(size=(10000.0, 10000.0), street_width=100.0, street_length=1000.0, die_name='chip99', text_size=100.0, text_location='SW', layer='FLOORPLAN', bbox_layer='FLOORPLAN', draw_corners=True, draw_dicing_lane=True)[source]#
Returns basic die with 4 right angle corners marking the boundary of the chip/die and a label with the name of the die.
- Parameters
size (
Tuple
[float
,float
]) – x, y dimensions of the die.street_width (
float
) – Width of the corner marks for die-sawing.street_length (
float
) – Length of the corner marks for die-sawing.die_name (
Optional
[str
]) – Label text.text_size (
float
) – Label text size.text_location (
str
) – {‘NW’, ‘N’, ‘NE’, ‘SW’, ‘S’, ‘SE’} Label text compass location.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – Specific layer to put polygon geometry on.bbox_layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – optional bbox layer.draw_corners (
bool
) – around die.draw_dicing_lane (
bool
) – around die.
- Return type
import gdsfactory as gf
c = gf.components.die(size=[10000.0, 10000.0], street_width=100.0, street_length=1000.0, die_name='chip99', text_size=100.0, text_location='SW', layer='FLOORPLAN', bbox_layer='FLOORPLAN', draw_corners=True, draw_dicing_lane=True)
c.plot()
(Source code, png, hires.png, pdf)

die_bbox#
- gdsfactory.components.die_bbox(component=functools.partial(<function rectangle>, size=(1300, 2600)), street_width=100.0, street_length=None, die_name=None, text_size=100.0, text_anchor='sw', layer='M3', padding=10.0)[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 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – to frame.street_width (
float
) – Width of the boundary box.street_length (
Optional
[float
]) – length of the boundary box.die_name (
Optional
[str
]) – Label text.text_size (
float
) – Label text size.text_anchor (
Literal
[‘ce’, ‘cw’, ‘nc’, ‘ne’, ‘nw’, ‘sc’, ‘se’, ‘sw’, ‘center’, ‘cc’]) – {‘nw’, ‘nc’, ‘ne’, ‘sw’, ‘sc’, ‘se’} text location.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – Specific layer(s) to put polygon geometry on.padding (
float
) – adds padding.
- Return type
import gdsfactory as gf
c = gf.components.die_bbox(street_width=100.0, text_size=100.0, text_anchor='sw', layer='M3', padding=10.0)
c.plot()
(Source code, png, hires.png, pdf)

die_bbox_frame#
- gdsfactory.components.die_bbox_frame(bbox=((- 1.0, - 1.0), (3.0, 4.0)), street_width=100.0, street_length=1000.0, die_name=None, text_size=100.0, text_anchor='sw', layer='M3', padding=10.0)[source]#
Return boundary box frame. Perfect for defining dicing lanes. the boundary of the chip/die it can also add a label with the name of the die. similar to die and bbox
adapted from phidl.geometry
- Parameters
bbox (
Tuple
[Union
[Tuple
[float
,float
],Tuple
[int
,int
]],Union
[Tuple
[float
,float
],Tuple
[int
,int
]]]) – bounding box to frame.street_width (
float
) – Width of the boundary box.street_length (
float
) – length of the boundary box.die_name (
Optional
[str
]) – Label text.text_size (
float
) – Label text size.text_anchor (
Literal
[‘ce’, ‘cw’, ‘nc’, ‘ne’, ‘nw’, ‘sc’, ‘se’, ‘sw’, ‘center’, ‘cc’]) – {‘nw’, ‘nc’, ‘ne’, ‘sw’, ‘sc’, ‘se’} text location.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – Specific layer(s) to put polygon geometry on.padding (
float
) – adds padding.
- Return type
import gdsfactory as gf
c = gf.components.die_bbox_frame(bbox=[[-1.0, -1.0], [3.0, 4.0]], street_width=100.0, street_length=1000.0, text_size=100.0, text_anchor='sw', layer='M3', padding=10.0)
c.plot()
(Source code, png, hires.png, pdf)

disk#
- gdsfactory.components.disk(radius=10.0, gap=0.2, wrap_angle_deg=180.0, parity=1, port=(0, 0), direction='EAST', waveguide_template=<function strip>, **kwargs)[source]#
Disk Resonator
- Parameters
radius (
float
) – disk resonator radius.gap (
float
) – Distance between the bus straight and resonator.wrap_angle_deg (
float
) – 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.
port (
Tuple
[int
,int
]) – Cartesian coordinate of the input port (x1, y1).direction (
str
) – of component ‘NORTH’, `’WEST’, ‘SOUTH’, `’EAST’.waveguide_template (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – Picwriter WaveguideTemplate object.
- Keyword Arguments
wg_width – 0.5.
wg_layer – gf.LAYER.WG[0].
wg_datatype – gf.LAYER.WG[1].
clad_layer – gf.LAYER.WGCLAD[0].
clad_datatype – gf.LAYER.WGCLAD[1].
bend_radius –
cladding_offset –
- Return type
import gdsfactory as gf
c = gf.components.disk(radius=10.0, gap=0.2, wrap_angle_deg=180.0, parity=1, port=[0, 0], direction='EAST')
c.plot()
(Source code, png, hires.png, pdf)

edge_coupler_array#
- gdsfactory.components.edge_coupler_array(edge_coupler=functools.partial(<function taper>, width2=0.2, length=100, with_two_ports=False), n=5, pitch=127.0, h_mirror=False, v_mirror=False, text=<function text_rectangular>, text_offset=(10, 20))[source]#
Fiber array edge coupler based on an inverse taper.
Each edge coupler adds a ruler for polishing.
- Parameters
edge_coupler (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – edge coupler spec.n (
int
) – number of channels.pitch (
float
) – Fiber pitch.h_mirror (
bool
) – horizontal mirror.v_mirror (
bool
) – vertical mirror.text (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – text spec.text_offset (
Tuple
[float
,float
]) – from edge coupler.
- Return type
import gdsfactory as gf
c = gf.components.edge_coupler_array(n=5, pitch=127.0, h_mirror=False, v_mirror=False, text_offset=[10, 20])
c.plot()
(Source code, png, hires.png, pdf)

edge_coupler_array_with_loopback#
- gdsfactory.components.edge_coupler_array_with_loopback(edge_coupler=functools.partial(<function taper>, width2=0.2, length=100, with_two_ports=False), cross_section='strip', radius=30, n=8, pitch=127.0, extension_length=1.0, h_mirror=False, v_mirror=False, right_loopback=True, text=<function text_rectangular>, text_offset=(0, 0))[source]#
Fiber array edge coupler.
- Parameters
edge_coupler (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – edge coupler.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – spec.radius (
float
) – bend radius loopback (um).n (
int
) – number of channels.pitch (
float
) – Fiber pitch (um).extension_length (
float
) – in um.h_mirror (
bool
) – horizontal mirror.v_mirror (
bool
) – vertical mirror.right_loopback (
bool
) – adds right loopback.text (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – Optional text spec.text_offset (
Tuple
[float
,float
]) – x, y.
- Return type
import gdsfactory as gf
c = gf.components.edge_coupler_array_with_loopback(cross_section='strip', radius=30, n=8, pitch=127.0, extension_length=1.0, h_mirror=False, v_mirror=False, right_loopback=True, text_offset=[0, 0])
c.plot()
(Source code, png, hires.png, pdf)

edge_coupler_silicon#
- gdsfactory.components.edge_coupler_silicon(*, length: float = 100, width1: float = 0.5, width2: Optional[float] = 0.2, port: Optional[gdsfactory.port.Port] = None, with_bbox: bool = True, with_two_ports: bool = False, cross_section: Union[str, Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, Dict[str, Any]] = 'strip', **kwargs) gdsfactory.component.Component #
Linear taper.
Deprecated, use gf.components.taper_cross_section instead
- Parameters
length – taper length.
width1 – width of the west port.
width2 – width of the east port.
port – can taper from a port instead of defining width1.
with_bbox – box in bbox_layers and bbox_offsets to avoid DRC sharp edges.
with_two_ports – includes a second port. False for terminator and edge coupler fiber interface.
cross_section – specification (CrossSection, string, CrossSectionFactory dict).
kwargs – cross_section settings.
import gdsfactory as gf
c = gf.components.edge_coupler_silicon(length=100, width1=0.5, width2=0.2, with_bbox=True, with_two_ports=False, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

ellipse#
- gdsfactory.components.ellipse(radii=(10.0, 5.0), angle_resolution=2.5, layer='WG')[source]#
Returns ellipse component.
- Parameters
radii (
Tuple
[float
,float
]) – Semimajor and semiminor axis lengths of the ellipse.angle_resolution (
float
) – number of degrees per point.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – 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.
- Return type
import gdsfactory as gf
c = gf.components.ellipse(radii=[10.0, 5.0], angle_resolution=2.5, layer='WG')
c.plot()
(Source code, png, hires.png, pdf)

extend_port#
- gdsfactory.components.extend_port(port, length, layer=None)[source]#
Returns a straight extension component out of a port.
- Parameters
port (
Port
) – port to extend.length (
float
) – extension length in um.layer (
Optional
[Tuple
[int
,int
]]) – for the straight section.
- Return type
import gdsfactory as gf
c = gf.components.extend_port()
c.plot()
extend_ports#
- gdsfactory.components.extend_ports(component=<function mmi1x2>, port_names=None, length=5.0, extension=None, port1=None, port2=None, port_type='optical', centered=False, cross_section=None, **kwargs)[source]#
Returns a new component with some ports extended.
you can define an extension otherwise, defaults to the port cross_section of each port to extend
- Parameters
component (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – component to extend ports.port_names (
Optional
[Tuple
[str
,...
]]) – list of ports names to extend, if None it extends all ports.length (
float
) – extension length.extension (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – function to extend ports (defaults to a straight).port1 (
Optional
[str
]) – input port name.port2 (
Optional
[str
]) – output port name.port_type (
str
) – type of the ports to extend.centered (
bool
) – if True centers rectangle at (0, 0).cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
],None
]) – extension cross_section, defaults to port cross_section if port has no cross_section it creates one using width and layer.
- 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.
- Return type
import gdsfactory as gf
c = gf.components.extend_ports(length=5.0, port_type='optical', centered=False)
c.plot()
(Source code, png, hires.png, pdf)

fiber#
- gdsfactory.components.fiber(core_diameter=10, cladding_diameter=125, layer_core='WG', layer_cladding='WGCLAD')[source]#
Returns a fiber.
- Parameters
core_diameter (
float
) – in um.cladding_diameter (
float
) – in um.layer_core (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer spec for fiber core.layer_cladding (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer spec for fiber cladding.
- Return type
import gdsfactory as gf
c = gf.components.fiber(core_diameter=10, cladding_diameter=125, layer_core='WG', layer_cladding='WGCLAD')
c.plot()
(Source code, png, hires.png, pdf)

fiber_array#
- gdsfactory.components.fiber_array(n=8, pitch=127.0, core_diameter=10, cladding_diameter=125, layer_core='WG', layer_cladding='WGCLAD')[source]#
Returns a fiber array
- Parameters
n (
int
) – number of fibers.pitch (
float
) – spacing.core_diameter (
float
) – 10um.cladding_diameter (
float
) – in um.layer_core (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer spec for fiber core.layer_cladding (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer spec for fiber cladding.
pitch <-> _________ | | lid | o o o o | | | base |_________| length
- Return type
import gdsfactory as gf
c = gf.components.fiber_array(n=8, pitch=127.0, core_diameter=10, cladding_diameter=125, layer_core='WG', layer_cladding='WGCLAD')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_array#
- gdsfactory.components.grating_coupler_array(grating_coupler=<function grating_coupler_circular>, pitch=127.0, n=6, port_name='o1', rotation=0)[source]#
Array of rectangular pads.
import gdsfactory as gf
c = gf.components.grating_coupler_array(pitch=127.0, n=6, port_name='o1', rotation=0)
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_circular#
- gdsfactory.components.grating_coupler_circular(taper_angle=30.0, taper_length=10.0, length=30.0, period=1.0, fill_factor=0.7, n_periods=30, bias_gap=0, port=(0.0, 0.0), layer_slab=None, layer_cladding='WGCLAD', gaps=None, widths=None, direction='EAST', polarization='te', wavelength=1.55, fiber_marker_width=11.0, fiber_marker_layer='TE', cladding_offset=2.0, cross_section='strip', **kwargs)[source]#
Return circular Grating coupler.
- Parameters
taper_angle (
float
) – taper flare angle in degrees.taper_length (
float
) – Length of the taper before the grating coupler.length (
float
) – total grating coupler length.period (
float
) – Grating period.fill_factor (
float
) – (period-gap)/period.n_periods (
int
) – number of grating teeth.bias_gap (
float
) – etch gap (um). Positive bias increases gap and reduces width to keep period constant.port (
Tuple
[float
,float
]) – (x, y) for input port.layer_slab (
Union
[Tuple
[int
,int
],int
,str
,None
]) – slab layer for partial etched gratings.layer_cladding (
Union
[Tuple
[int
,int
],int
,str
,None
]) – for the cladding (using cladding_offset).gaps (
Optional
[Tuple
[float
,...
]]) – optional gap list (um). Overrides period, fill_factor and n_periods.widths (
Optional
[Tuple
[float
,...
]]) – optional width list (um). Overrides period, fill_factor and n_periods.direction (
str
) – Direction that the component will point towards, can be of type NORTH, WEST, SOUTH, EAST, OR an angle (float, in radians).polarization (
str
) – te or tm.wavelength (
float
) – wavelength um.fiber_marker_width (
float
) – (um).cladding_offset (
float
) – (um).cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – for input waveguide port.kwargs – cross_section settings.
side view fiber / / / / / / / / _|-|_|-|_|-|___ WG o1 ______________| / top view / | /| | / | | /taper_angle /_ _| | wg_width | | | \ | | \ | | \ | | \| | <--> taper_length
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_circular(taper_angle=30.0, taper_length=10.0, length=30.0, period=1.0, fill_factor=0.7, n_periods=30, bias_gap=0, port=[0.0, 0.0], layer_cladding='WGCLAD', direction='EAST', polarization='te', wavelength=1.55, fiber_marker_width=11.0, fiber_marker_layer='TE', cladding_offset=2.0, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_elliptical#
- gdsfactory.components.grating_coupler_elliptical(polarization='te', taper_length=16.6, taper_angle=40.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.343, neff=2.638, nclad=1.443, n_periods=30, big_last_tooth=False, layer_slab='SLAB150', slab_xmin=- 1.0, slab_offset=2.0, fiber_marker_width=11.0, fiber_marker_layer='TE', spiked=True, cross_section='strip', **kwargs)[source]#
Grating coupler with parametrization based on Lumerical FDTD simulation.
- Parameters
polarization (
str
) – te or tm.taper_length (
float
) – taper length from input.taper_angle (
float
) – grating flare angle.wavelength (
float
) – grating transmission central wavelength (um).fiber_angle (
float
) – fibre angle in degrees determines ellipticity.grating_line_width (
float
) – in um.neff (
float
) – tooth effective index.nclad (
float
) – cladding effective index.n_periods (
int
) – number of periods.big_last_tooth (
bool
) – adds a big_last_tooth.layer_slab (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer that protects the slab under the grating.slab_xmin (
float
) – where 0 is at the start of the taper.slab_offset (
float
) – in um.fiber_marker_width (
Optional
[float
]) – width in um.fiber_marker_layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – fiber marker layer.spiked (
bool
) – grating teeth have sharp spikes to avoid non-manhattan drc errors.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – specification (CrossSection, string or dict).kwargs – cross_section settings.
fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________|
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical(polarization='te', taper_length=16.6, taper_angle=40.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.343, neff=2.638, nclad=1.443, n_periods=30, big_last_tooth=False, layer_slab='SLAB150', slab_xmin=-1.0, slab_offset=2.0, fiber_marker_width=11.0, fiber_marker_layer='TE', spiked=True, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_elliptical_arbitrary#
- gdsfactory.components.grating_coupler_elliptical_arbitrary(gaps=(0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1), widths=(0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), taper_length=16.6, taper_angle=60.0, wavelength=1.554, fiber_angle=15.0, neff=2.638, nclad=1.443, layer_slab='SLAB150', slab_xmin=- 3.0, polarization='te', fiber_marker_width=11.0, fiber_marker_layer='TE', spiked=True, bias_gap=0, cross_section='strip', **kwargs)[source]#
Grating coupler with parametrization based on Lumerical FDTD simulation.
The ellipticity is derived from Lumerical knowdledge base it depends on fiber_angle (degrees), neff, and nclad
- Parameters
gaps (
Tuple
[float
,...
]) – list of gaps.widths (
Tuple
[float
,...
]) – list of widths.taper_length (
float
) – taper length from input.taper_angle (
float
) – grating flare angle.wavelength (
float
) – grating transmission central wavelength (um).fiber_angle (
float
) – fibre angle in degrees determines ellipticity.neff (
float
) – tooth effective index.nclad (
float
) – cladding effective index.layer_slab (
Union
[Tuple
[int
,int
],int
,str
,None
]) – Optional slab.slab_xmin (
float
) – where 0 is at the start of the taper.polarization (
str
) – te or tm.fiber_marker_width (
float
) – in um.fiber_marker_layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – Optional marker.spiked (
bool
) – grating teeth have spikes to avoid drc errors..bias_gap (
float
) – etch gap (um). Positive bias increases gap and reduces width to keep period constant.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – 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 ______________|
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_arbitrary(gaps=[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1], widths=[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], taper_length=16.6, taper_angle=60.0, wavelength=1.554, fiber_angle=15.0, neff=2.638, nclad=1.443, layer_slab='SLAB150', slab_xmin=-3.0, polarization='te', fiber_marker_width=11.0, fiber_marker_layer='TE', spiked=True, bias_gap=0, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_elliptical_lumerical#
- gdsfactory.components.grating_coupler_elliptical_lumerical(parameters=(- 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='WG', layer_slab='SLAB150', taper_angle=55, taper_length=12.6, fiber_angle=5, info=None, bias_gap=0, **kwargs)[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 (
Tuple
[float
,...
]) – xinput, gap1, width1, gap2, width2 …layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – for waveguide.layer_slab (
Union
[Tuple
[int
,int
],int
,str
,None
]) – for slab.taper_angle (
float
) – in deg.taper_length (
float
) – in um.fiber_angle (
float
) – used to compute ellipticity.info (
Optional
[Dict
[str
,Any
]]) – optional simulation settings.bias_gap (
float
) – gap/trenches bias (um) to compensate for etching bias.
- Keyword Arguments
wg_width – waveguide width.
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.
nclad – cladding effective index.
polarization – te or tm.
fiber_marker_width. –
fiber_marker_layer. –
spiked – grating teeth have sharp spikes to avoid non-manhattan drc errors.
cross_section – cross_section spec for waveguide port.
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_lumerical(parameters=[-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='WG', layer_slab='SLAB150', taper_angle=55, taper_length=12.6, fiber_angle=5, bias_gap=0)
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_elliptical_te#
- gdsfactory.components.grating_coupler_elliptical_te(polarization='te', taper_length=16.6, taper_angle=40.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.343, neff=2.638, nclad=1.443, n_periods=30, big_last_tooth=False, layer_slab='SLAB150', slab_xmin=- 1.0, slab_offset=2.0, fiber_marker_width=11.0, fiber_marker_layer='TE', spiked=True, cross_section='strip', **kwargs)#
Grating coupler with parametrization based on Lumerical FDTD simulation.
- Parameters
polarization (
str
) – te or tm.taper_length (
float
) – taper length from input.taper_angle (
float
) – grating flare angle.wavelength (
float
) – grating transmission central wavelength (um).fiber_angle (
float
) – fibre angle in degrees determines ellipticity.grating_line_width (
float
) – in um.neff (
float
) – tooth effective index.nclad (
float
) – cladding effective index.n_periods (
int
) – number of periods.big_last_tooth (
bool
) – adds a big_last_tooth.layer_slab (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer that protects the slab under the grating.slab_xmin (
float
) – where 0 is at the start of the taper.slab_offset (
float
) – in um.fiber_marker_width (
Optional
[float
]) – width in um.fiber_marker_layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – fiber marker layer.spiked (
bool
) – grating teeth have sharp spikes to avoid non-manhattan drc errors.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – specification (CrossSection, string or dict).kwargs – cross_section settings.
fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________|
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_te(polarization='te', taper_length=16.6, taper_angle=40.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.343, neff=2.638, nclad=1.443, n_periods=30, big_last_tooth=False, layer_slab='SLAB150', slab_xmin=-1.0, slab_offset=2.0, fiber_marker_width=11.0, fiber_marker_layer='TE', spiked=True, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_elliptical_tm#
- gdsfactory.components.grating_coupler_elliptical_tm(*, polarization: str = 'tm', taper_length: float = 30, taper_angle: float = 40.0, wavelength: float = 1.554, fiber_angle: float = 15.0, grating_line_width: float = 0.707, neff: float = 1.8, nclad: float = 1.443, n_periods: int = 16, big_last_tooth: bool = False, layer_slab: Optional[Union[Tuple[int, int], int, str]] = 'SLAB150', slab_xmin: float = - 2, slab_offset: float = 2.0, fiber_marker_width: Optional[float] = 11.0, fiber_marker_layer: Optional[Union[Tuple[int, int], int, str]] = 'TM', spiked: bool = True, cross_section: Union[str, Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, Dict[str, Any]] = 'strip', **kwargs) gdsfactory.component.Component #
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.
fiber_marker_width – width in um.
fiber_marker_layer – fiber marker layer.
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_tm(polarization='tm', taper_length=30, taper_angle=40.0, wavelength=1.554, fiber_angle=15.0, grating_line_width=0.707, neff=1.8, nclad=1.443, n_periods=16, big_last_tooth=False, layer_slab='SLAB150', slab_xmin=-2, slab_offset=2.0, fiber_marker_width=11.0, fiber_marker_layer='TM', spiked=True, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_elliptical_trenches#
- gdsfactory.components.grating_coupler_elliptical_trenches(polarization='te', fiber_marker_width=11.0, fiber_marker_layer='TE', taper_length=16.6, taper_angle=30.0, trenches_extra_angle=9.0, wavelength=1.53, fiber_angle=15.0, grating_line_width=0.343, neff=2.638, ncladding=1.443, layer_trench='SLAB150', p_start=26, n_periods=30, end_straight_length=0.2, cross_section='strip', **kwargs)[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 (
str
) – ‘te’ or ‘tm’.taper_length (
float
) – taper length from straight I/O.taper_angle (
float
) – grating flare angle.wavelength (
float
) – grating transmission central wavelength.fiber_angle (
float
) – fibre polish angle in degrees.grating_line_width (
float
) – of the 220 ridge.neff (
float
) – tooth effective index.ncladding (
float
) – cladding index.layer_trench (
Union
[Tuple
[int
,int
],int
,str
,None
]) – for the trench.p_start (
int
) – first tooth.n_periods (
int
) – number of grating teeth.end_straight_length (
float
) – at the end of straight.kwargs – cross_section settings.
fiber / / / / / / / / _|-|_|-|_|-|___ WG o1 ______________|
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_trenches(polarization='te', fiber_marker_width=11.0, fiber_marker_layer='TE', taper_length=16.6, taper_angle=30.0, trenches_extra_angle=9.0, wavelength=1.53, fiber_angle=15.0, grating_line_width=0.343, neff=2.638, ncladding=1.443, layer_trench='SLAB150', p_start=26, n_periods=30, end_straight_length=0.2, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_loss_fiber_array#
- gdsfactory.components.grating_coupler_loss_fiber_array(pitch=127.0, grating_coupler=functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), input_port_indexes=(0, 1), **kwargs)[source]#
Returns Grating coupler fiber array loopback.
- Parameters
- Keyword Arguments
cross_section – spec.
kwargs – cross_section settings.
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_loss_fiber_array(pitch=127.0, input_port_indexes=[0, 1])
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_loss_fiber_array4#
- gdsfactory.components.grating_coupler_loss_fiber_array4(pitch=127.0, grating_coupler=functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), **kwargs)[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
import gdsfactory as gf
c = gf.components.grating_coupler_loss_fiber_array4(pitch=127.0)
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_loss_fiber_single#
- gdsfactory.components.grating_coupler_loss_fiber_single(grating_coupler=functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), cross_section='strip', **kwargs)[source]#
Returns grating coupler test structure.
for testing with single fiber input/output
- Parameters
- Keyword Arguments
layer_label – for test and measurement label.
min_input_to_output_spacing – spacing from input to output fiber.
max_y0_optical – None.
get_input_labels_function – function to get input labels for grating couplers.
optical_routing_type – None: autoselection, 0: no extension.
get_input_label_text_function – for the grating couplers input label.
get_input_label_text_loopback_function – for the loopacks input label.
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_loss_fiber_single(cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_rectangular#
- gdsfactory.components.grating_coupler_rectangular(n_periods=20, period=0.75, fill_factor=0.5, width_grating=11.0, length_taper=150.0, polarization='te', wavelength=1.55, taper=<function taper>, layer_slab='SLAB150', fiber_marker_layer='TE', slab_xmin=-1.0, slab_offset=1.0, cross_section='strip', **kwargs)[source]#
Grating coupler uniform (grating with rectangular shape not elliptical). Therefore it needs a longer taper. Grating teeth are straight. For a focusing grating take a look at grating_coupler_elliptical.
- Parameters
n_periods (
int
) – number of grating teeth.period (
float
) – grating pitch.fill_factor (
float
) – ratio of grating width vs gap.width_grating (
float
) –length_taper (
float
) –wg_width – input waveguide width.
layer – for grating teeth.
polarization (
str
) – ‘te’ or ‘tm’.wavelength (
float
) – in um.taper (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – function.layer_slab (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer that protects the slab under the grating.slab_xmin (
float
) – where 0 is at the start of the taper.slab_offset (
float
) – from edge of grating to edge of the slab.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – for input waveguide port.kwargs – cross_section settings.
side view fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________| top view _________ /| | | | | / | | | | | /taper_angle /_ _| | | | | wg_width | | | | | | \ | | | | | \ | | | | | \ | | | | | \|_|_|_|_| <--> taper_length
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_rectangular(n_periods=20, period=0.75, fill_factor=0.5, width_grating=11.0, length_taper=150.0, polarization='te', wavelength=1.55, layer_slab='SLAB150', fiber_marker_layer='TE', slab_xmin=-1.0, slab_offset=1.0, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_rectangular_arbitrary#
- gdsfactory.components.grating_coupler_rectangular_arbitrary(gaps=(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2), widths=(0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), width_grating=11.0, length_taper=150.0, polarization='te', wavelength=1.55, taper=<function taper>, layer_slab='SLAB150', slab_xmin=-1.0, slab_offset=1.0, fiber_marker_layer='TE', cross_section='strip', **kwargs)[source]#
Grating coupler uniform with rectangular shape (not elliptical). Therefore it needs a longer taper. Grating teeth are straight instead of elliptical.
- Parameters
gaps (
Tuple
[float
,...
]) – list of gaps between grating teeth.widths (
Tuple
[float
,...
]) – list of grating widths.width_grating (
float
) – grating teeth width.length_taper (
float
) – taper length (um).polarization (
str
) – ‘te’ or ‘tm’.wavelength (
float
) – in um.taper (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – function.layer_slab (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer that protects the slab under the grating.slab_xmin (
float
) – where 0 is at the start of the taper.slab_offset (
float
) – from edge of grating to edge of the slab.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – for input waveguide port.kwargs – cross_section settings.
fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________| top view _________ /| | | | | / | | | | | /taper_angle /_ _| | | | | wg_width | | | | | | \ | | | | | \ | | | | | \ | | | | | \|_|_|_|_| <--> taper_length
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_rectangular_arbitrary(gaps=[0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2], widths=[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], width_grating=11.0, length_taper=150.0, polarization='te', wavelength=1.55, layer_slab='SLAB150', slab_xmin=-1.0, slab_offset=1.0, fiber_marker_layer='TE', cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_rectangular_arbitrary_slab#
- gdsfactory.components.grating_coupler_rectangular_arbitrary_slab(gaps=(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2), widths=(0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), width_grating=11.0, length_taper=150.0, polarization='te', wavelength=1.55, taper=functools.partial(<function taper_strip_to_ridge>, layer_slab='SLAB150'), layer_slab='SLAB150', slab_offset=2.0, fiber_marker_layer='TE', cross_section='strip', **kwargs)[source]#
Grating coupler uniform (grating with rectangular shape not elliptical). Therefore it needs a longer taper. Grating teeth are straight instead of elliptical.
- Parameters
gaps (
Tuple
[float
,...
]) – list of gaps.widths (
Tuple
[float
,...
]) – list of widths.width_grating (
float
) – um.length_taper (
float
) – um.polarization (
str
) – ‘te’ or ‘tm’.wavelength (
float
) – in um.taper (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – function.layer_slab (
Union
[Tuple
[int
,int
],int
,str
,None
]) – for pedestal.slab_offset (
float
) – from edge.fiber_marker_layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer for fiber.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – for input waveguide port.kwargs – cross_section settings.
side view fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________| top view _________ /| | | | | / | | | | | /taper_angle /_ _| | | | | wg_width | | | | | | \ | | | | | \ | | | | | \ | | | | | \|_|_|_|_| <--> taper_length
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_rectangular_arbitrary_slab(gaps=[0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2], widths=[0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], width_grating=11.0, length_taper=150.0, polarization='te', wavelength=1.55, layer_slab='SLAB150', slab_offset=2.0, fiber_marker_layer='TE', cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_te#
- gdsfactory.components.grating_coupler_te(*, polarization: str = 'te', fiber_marker_width: float = 11.0, fiber_marker_layer: Optional[Union[Tuple[int, int], int, str]] = 'TE', taper_length: float = 16.6, taper_angle: float = 35, 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: Optional[Union[Tuple[int, int], int, str]] = 'SLAB150', p_start: int = 26, n_periods: int = 30, end_straight_length: float = 0.2, cross_section: Union[str, Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, Dict[str, Any]] = 'strip', **kwargs) gdsfactory.component.Component #
Returns Grating coupler with defined trenches.
Some foundries define the grating coupler by a shallow etch step (trenches) Others define the slab that they keep (see grating_coupler_elliptical)
- Parameters
polarization – ‘te’ or ‘tm’.
taper_length – taper length from straight I/O.
taper_angle – grating flare angle.
wavelength – grating transmission central wavelength.
fiber_angle – fibre polish angle in degrees.
grating_line_width – of the 220 ridge.
neff – tooth effective index.
ncladding – cladding index.
layer_trench – for the trench.
p_start – first tooth.
n_periods – number of grating teeth.
end_straight_length – at the end of straight.
kwargs – cross_section settings.
fiber / / / / / / / / _|-|_|-|_|-|___ WG o1 ______________|
import gdsfactory as gf
c = gf.components.grating_coupler_te(polarization='te', fiber_marker_width=11.0, fiber_marker_layer='TE', taper_length=16.6, taper_angle=35, trenches_extra_angle=9.0, wavelength=1.53, fiber_angle=15.0, grating_line_width=0.343, neff=2.638, ncladding=1.443, layer_trench='SLAB150', p_start=26, n_periods=30, end_straight_length=0.2, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_tm#
- gdsfactory.components.grating_coupler_tm(*, polarization: str = 'tm', fiber_marker_width: float = 11.0, fiber_marker_layer: Optional[Union[Tuple[int, int], int, str]] = 'TM', 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.6, neff: float = 1.8, ncladding: float = 1.443, layer_trench: Optional[Union[Tuple[int, int], int, str]] = 'SLAB150', p_start: int = 26, n_periods: int = 30, end_straight_length: float = 0.2, cross_section: Union[str, Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, Dict[str, Any]] = 'strip', **kwargs) gdsfactory.component.Component #
Returns Grating coupler with defined trenches.
Some foundries define the grating coupler by a shallow etch step (trenches) Others define the slab that they keep (see grating_coupler_elliptical)
- Parameters
polarization – ‘te’ or ‘tm’.
taper_length – taper length from straight I/O.
taper_angle – grating flare angle.
wavelength – grating transmission central wavelength.
fiber_angle – fibre polish angle in degrees.
grating_line_width – of the 220 ridge.
neff – tooth effective index.
ncladding – cladding index.
layer_trench – for the trench.
p_start – first tooth.
n_periods – number of grating teeth.
end_straight_length – at the end of straight.
kwargs – cross_section settings.
fiber / / / / / / / / _|-|_|-|_|-|___ WG o1 ______________|
import gdsfactory as gf
c = gf.components.grating_coupler_tm(polarization='tm', fiber_marker_width=11.0, fiber_marker_layer='TM', taper_length=16.6, taper_angle=30.0, trenches_extra_angle=9.0, wavelength=1.53, fiber_angle=15.0, grating_line_width=0.6, neff=1.8, ncladding=1.443, layer_trench='SLAB150', p_start=26, n_periods=30, end_straight_length=0.2, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

grating_coupler_tree#
- gdsfactory.components.grating_coupler_tree(n=4, straight_spacing=4.0, grating_coupler=<function grating_coupler_elliptical>, with_loopback=False, bend=<function bend_euler>, fanout_length=0.0, layer_label='TEXT', **kwargs)[source]#
Array of straights connected with grating couplers.
useful to align the 4 corners of the chip
- Parameters
n (
int
) – number of gratings.straight_spacing (
float
) – in um.grating_coupler (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – spec.with_loopback (
bool
) – adds loopback.bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – bend spec.fanout_length (
float
) – in um.layer_label (
Union
[Tuple
[int
,int
],int
,str
,None
]) – for layer.kwargs – cross_section settings.
- Return type
import gdsfactory as gf
c = gf.components.grating_coupler_tree(n=4, straight_spacing=4.0, with_loopback=False, fanout_length=0.0, layer_label='TEXT')
c.plot()
(Source code, png, hires.png, pdf)

hline#
- gdsfactory.components.hline(length=10.0, width=0.5, layer='WG', port_type='optical')[source]#
Horizontal line straight, with ports on east and west sides
- Return type
import gdsfactory as gf
c = gf.components.hline(length=10.0, width=0.5, layer='WG', port_type='optical')
c.plot()
(Source code, png, hires.png, pdf)

litho_calipers#
- gdsfactory.components.litho_calipers(notch_size=(2.0, 5.0), notch_spacing=2.0, num_notches=11, offset_per_notch=0.1, row_spacing=0.0, layer1='WG', layer2='SLAB150')[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 (
Tuple
[float
,float
]) – [xwidth, yheight].notch_spacing (
float
) – in um.num_notches (
int
) – number of notches.offset_per_notch (
float
) – in um.row_spacing (
float
) – 0layer1 (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer.layer2 (
Union
[Tuple
[int
,int
],int
,str
,None
]) – layer.
- Return type
import gdsfactory as gf
c = gf.components.litho_calipers(notch_size=[2.0, 5.0], notch_spacing=2.0, num_notches=11, offset_per_notch=0.1, row_spacing=0.0, layer1='WG', layer2='SLAB150')
c.plot()
(Source code, png, hires.png, pdf)

litho_ruler#
- gdsfactory.components.litho_ruler(height=2, width=0.5, spacing=2.0, scale=(3, 1, 1, 1, 1, 2, 1, 1, 1, 1), num_marks=21, layer='WG')[source]#
Creates a ruler structure for lithographic measurement with marks of varying scales to allow for easy reading by eye.
adapted from phidl.geometry
- Parameters
height (
float
) – Height of the ruling marks.width (
float
) – Width of the ruling marks.spacing (
float
) – Center-to-center spacing of the ruling marks.scale (
Tuple
[float
]) – Height scale pattern of marks.num_marks (
int
) – Total number of marks to generate.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – Specific layer to put the ruler geometry on.
- Return type
import gdsfactory as gf
c = gf.components.litho_ruler(height=2, width=0.5, spacing=2.0, scale=[3, 1, 1, 1, 1, 2, 1, 1, 1, 1], num_marks=21, layer='WG')
c.plot()
litho_steps#
- gdsfactory.components.litho_steps(line_widths=(1.0, 2.0, 4.0, 8.0, 16.0), line_spacing=10.0, height=100.0, layer='WG')[source]#
Positive + negative tone linewidth test
used for lithography resolution test patterning adapted from phidl
- Parameters
line_widths (
Tuple
[float
,...
]) – in um.line_spacing (
float
) – in um.height (
float
) – in um.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – Specific layer to put the ruler geometry on.
- Return type
import gdsfactory as gf
c = gf.components.litho_steps(line_widths=[1.0, 2.0, 4.0, 8.0, 16.0], line_spacing=10.0, height=100.0, layer='WG')
c.plot()
(Source code, png, hires.png, pdf)

logo#
import gdsfactory as gf
c = gf.components.logo(text='GDSFACTORY')
c.plot()
(Source code, png, hires.png, pdf)

loop_mirror#
- gdsfactory.components.loop_mirror(component=<function mmi1x2>, bend90=<function bend_euler>)[source]#
Returns Sagnac loop_mirror.
- Return type
import gdsfactory as gf
c = gf.components.loop_mirror()
c.plot()
(Source code, png, hires.png, pdf)

loss_deembedding_ch12_34#
- gdsfactory.components.loss_deembedding_ch12_34(pitch=127.0, grating_coupler=functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), input_port_indexes=(0, 2), **kwargs)[source]#
Grating coupler test structure for fiber array.
Connects channel 1->2, 3->4
import gdsfactory as gf
c = gf.components.loss_deembedding_ch12_34(pitch=127.0, input_port_indexes=[0, 2])
c.plot()
(Source code, png, hires.png, pdf)

loss_deembedding_ch13_24#
- gdsfactory.components.loss_deembedding_ch13_24(pitch=127.0, grating_coupler=functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), input_port_indexes=(0, 1), cross_section='strip', **kwargs)[source]#
Grating coupler test structure for fiber array.
Connects channel 1->3, 2->4
- Parameters
- Return type
import gdsfactory as gf
c = gf.components.loss_deembedding_ch13_24(pitch=127.0, input_port_indexes=[0, 1], cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

loss_deembedding_ch14_23#
- gdsfactory.components.loss_deembedding_ch14_23(pitch=127.0, grating_coupler=functools.partial(<function grating_coupler_elliptical_trenches>, polarization='te', taper_angle=35), input_port_indexes=(0, 1), **kwargs)[source]#
Grating coupler test structure for fiber array.
Connects channel 1->4, 2->3
import gdsfactory as gf
c = gf.components.loss_deembedding_ch14_23(pitch=127.0, input_port_indexes=[0, 1])
c.plot()
(Source code, png, hires.png, pdf)

mmi1x2#
- gdsfactory.components.mmi1x2(width=0.5, width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, taper=<function taper>, with_bbox=True, cross_section='strip')[source]#
Mmi 1x2.
- Parameters
width (
float
) – input and output straight width.width_taper (
float
) – interface between input straights and mmi region.length_taper (
float
) – into the mmi region.length_mmi (
float
) – in x direction.width_mmi (
float
) – in y direction.gap_mmi (
float
) – gap between tapered wg.taper (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – taper function.straight – straight function.
with_bbox (
bool
) – add rectangular box in cross_section bbox_layers and bbox_offsets to avoid DRC sharp edges.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – specification (CrossSection, string or dict).
length_mmi <------> ________ | | | \__ | __ E1 __/ /_ _ _ _ W0 __ | _ _ _ _| gap_mmi \ \__ | __ E0 | / |________| <-> length_taper
- Return type
import gdsfactory as gf
c = gf.components.mmi1x2(width=0.5, width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, with_bbox=True, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

mmi2x2#
- gdsfactory.components.mmi2x2(width=0.5, width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, taper=<function taper>, straight=<function straight>, with_bbox=True, cross_section='strip')[source]#
Mmi 2x2.
- Parameters
width (
float
) – input and output straight width.width_taper (
float
) – interface between input straights and mmi region.length_taper (
float
) – into the mmi region.length_mmi (
float
) – in x direction.width_mmi (
float
) – in y direction.gap_mmi (
float
) – (width_taper + gap between tapered wg)/2.taper (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – taper function.straight (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – straight function.with_bbox (
bool
) – box in bbox_layers and bbox_offsets to avoid DRC sharp edges.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – spec.
length_mmi <------> ________ | | __/ \__ W1 __ __ E1 \ /_ _ _ _ | | _ _ _ _| gap_mmi __/ \__ W0 __ __ E0 \ / |________| <-> length_taper
- Return type
import gdsfactory as gf
c = gf.components.mmi2x2(width=0.5, width_taper=1.0, length_taper=10.0, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, with_bbox=True, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

mzi#
- gdsfactory.components.mzi(delta_length=10.0, length_y=2.0, length_x=0.1, bend=<function bend_euler>, straight=<function straight>, straight_y=None, straight_x_top=None, straight_x_bot=None, splitter='mmi1x2', combiner=None, 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=None, cross_section_x_bot=None)[source]#
Mzi.
- Parameters
delta_length (
float
) – bottom arm vertical extra length.length_y (
float
) – vertical length for both and top arms.length_x (
Optional
[float
]) – horizontal length. None uses to the straight_x_bot/top defaults.bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – 90 degrees bend library.straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – straight function.straight_y (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – straight for length_y and delta_length.straight_x_top (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – top straight for length_x.straight_x_bot (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – bottom straight for length_x.splitter (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – splitter function.combiner (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – combiner function.with_splitter (
bool
) – if False removes splitter.port_e1_combiner (
str
) – east top combiner port.port_e0_splitter (
str
) – east bot splitter port.port_e1_splitter (
str
) – east top splitter port.port_e0_combiner (
str
) – east bot combiner port.nbends (
int
) – from straight top/bot to combiner (at least 2).cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – for routing (sxtop/sxbot to combiner).cross_section_x_top (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
],None
]) – optional top cross_section (defaults to cross_section).cross_section_x_bot (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
],None
]) – optional bottom cross_section (defaults to cross_section).
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
- Return type
import gdsfactory as gf
c = gf.components.mzi(delta_length=10.0, length_y=2.0, length_x=0.1, splitter='mmi1x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o2', port_e0_combiner='o3', nbends=2, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

mzi1x2_2x2#
- gdsfactory.components.mzi1x2_2x2(delta_length: float = 10.0, length_y: float = 2.0, length_x: typing.Optional[float] = 0.1, bend: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function bend_euler>, straight: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function straight>, straight_y: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, straight_x_top: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, straight_x_bot: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, splitter: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = 'mmi1x2', *, combiner: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = <function mmi2x2>, with_splitter: bool = True, port_e1_splitter: str = 'o2', port_e0_splitter: str = 'o3', port_e1_combiner: str = 'o3', port_e0_combiner: str = 'o4', nbends: int = 2, cross_section: typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]] = 'strip', cross_section_x_top: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]]] = None, cross_section_x_bot: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]]] = None) gdsfactory.component.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_combiner – east top combiner port.
port_e0_splitter – east bot splitter port.
port_e1_splitter – east top splitter 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).
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi1x2_2x2(delta_length=10.0, length_y=2.0, length_x=0.1, splitter='mmi1x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o3', port_e0_combiner='o4', nbends=2, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

mzi2x2_2x2#
- gdsfactory.components.mzi2x2_2x2(delta_length: float = 10.0, length_y: float = 2.0, length_x: typing.Optional[float] = 0.1, bend: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function bend_euler>, straight: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function straight>, straight_y: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, straight_x_top: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, straight_x_bot: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, *, splitter: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function mmi2x2>, combiner: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = <function mmi2x2>, with_splitter: bool = True, port_e1_splitter: str = 'o3', port_e0_splitter: str = 'o4', port_e1_combiner: str = 'o3', port_e0_combiner: str = 'o4', nbends: int = 2, cross_section: typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]] = 'strip', cross_section_x_top: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]]] = None, cross_section_x_bot: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]]] = None) gdsfactory.component.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_combiner – east top combiner port.
port_e0_splitter – east bot splitter port.
port_e1_splitter – east top splitter 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).
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(delta_length=10.0, length_y=2.0, length_x=0.1, with_splitter=True, port_e1_splitter='o3', port_e0_splitter='o4', port_e1_combiner='o3', port_e0_combiner='o4', nbends=2, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

mzi_arm#
- gdsfactory.components.mzi_arm(length_y_left=0.8, length_y_right=0.8, length_x=0.1, bend=<function bend_euler>, straight=<function straight>, straight_x=None, straight_y=None, **kwargs)[source]#
Mzi.
- Parameters
length_y_left (
float
) – vertical length.length_y_rigth – vertical length.
length_x (
float
) – horizontal length.bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – 90 degrees bend library.straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – straight function.straight_x (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – straight for length_x.straight_y (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – straight for length_y.kwargs – cross_section settings.
B__Lx__B | | Ly Lyr | | B B
- Return type
import gdsfactory as gf
c = gf.components.mzi_arm(length_y_left=0.8, length_y_right=0.8, length_x=0.1)
c.plot()
(Source code, png, hires.png, pdf)

mzi_arms#
- gdsfactory.components.mzi_arms(delta_length=10.0, length_y=0.8, length_x=0.1, bend=<function bend_euler>, straight=<function straight>, straight_y=None, straight_x_top=None, straight_x_bot=None, splitter=<function mmi1x2>, combiner=None, with_splitter=True, delta_yright=0, **kwargs)[source]#
Mzi made with arms.
This MZI code is slightly deprecated. You can find a more robust mzi in gf.components.mzi
- Parameters
delta_length (
float
) – bottom arm vertical extra length.length_y (
float
) – vertical length for both and top arms.length_x (
float
) – horizontal length.bend (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – 90 degrees bend library.straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – straight spec.straight_y (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – straight for length_y and delta_length.straight_x_top (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – top straight for length_x.straight_x_bot (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – bottom straight for length_x.splitter (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – splitter spec.combiner (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – combiner spec.with_splitter (
bool
) – if False removes splitter.delta_yright (
float
) – extra length for right y-oriented waveguide.kwargs – cross_section settings.
__Lx__ | | Ly Lyr (not a parameter) | | splitter==| |==combiner | | Ly Lyr (not a parameter) | | | delta_length/2 | | |__Lx__| ____________ __________ | | | | | ___| ____| |____ | splitter d1 d2 combiner ____| ____ | | ____ | | | |__________| |__________
- Return type
import gdsfactory as gf
c = gf.components.mzi_arms(delta_length=10.0, length_y=0.8, length_x=0.1, with_splitter=True, delta_yright=0)
c.plot()
(Source code, png, hires.png, pdf)

mzi_coupler#
- gdsfactory.components.mzi_coupler(delta_length: float = 10.0, length_y: float = 2.0, length_x: typing.Optional[float] = 0.1, bend: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function bend_euler>, straight: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function straight>, straight_y: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, straight_x_top: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, straight_x_bot: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, *, splitter: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function coupler>, combiner: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = <function coupler>, 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: typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]] = 'strip', cross_section_x_top: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]]] = None, cross_section_x_bot: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]]] = None) gdsfactory.component.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_combiner – east top combiner port.
port_e0_splitter – east bot splitter port.
port_e1_splitter – east top splitter 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).
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_coupler(delta_length=10.0, length_y=2.0, length_x=0.1, with_splitter=True, port_e1_splitter='o3', port_e0_splitter='o4', port_e1_combiner='o3', port_e0_combiner='o4', nbends=2, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

mzi_lattice#
- gdsfactory.components.mzi_lattice(coupler_lengths=(10.0, 20.0), coupler_gaps=(0.2, 0.3), delta_lengths=(10.0, ), mzi=functools.partial(<function mzi>, splitter=<function coupler>, combiner=<function coupler>, port_e1_splitter='o3', port_e0_splitter='o4', port_e1_combiner='o3', port_e0_combiner='o4'), splitter=<function coupler>, **kwargs)[source]#
Mzi lattice filter.
- Parameters
coupler_lengths (
Tuple
[float
,...
]) – list of length for each coupler.coupler_gaps (
Tuple
[float
,...
]) – list of coupler gaps.delta_lengths (
Tuple
[float
,...
]) – list of length differences.mzi (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – function for the mzi.splitter (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – splitter function.
- Keyword Arguments
length_y – vertical length for both and top arms.
length_x – horizontal length.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
cross_section – for routing (sxtop/sxbot to combiner).
______ ______ | | | | | | | | cp1==| |===cp2=====| |=== .... ===cp_last=== | | | | | | | | DL1 | DL2 | | | | | |______| | | |______|
- Return type
import gdsfactory as gf
c = gf.components.mzi_lattice(coupler_lengths=[10.0, 20.0], coupler_gaps=[0.2, 0.3], delta_lengths=[10.0])
c.plot()
(Source code, png, hires.png, pdf)

mzi_pads_center#
- gdsfactory.components.mzi_pads_center(ps_top=functools.partial(<function straight_heater_metal_undercut>, with_undercut=False), ps_bot=functools.partial(<function straight_heater_metal_undercut>, with_undercut=False), mzi=<function mzi>, pad=<function pad>, length_x=500, length_y=40, mzi_sig_top='e3', mzi_gnd_top='e2', mzi_sig_bot='e1', mzi_gnd_bot='e4', pad_sig_bot='e1_1_1', pad_sig_top='e3_1_3', pad_gnd_bot='e4_1_2', pad_gnd_top='e2_1_2', delta_length=40.0, end_straight_length=5, start_straight_length=5, metal_route_width=10, cross_section=functools.partial(<cyfunction cross_section>, add_pins=functools.partial(<function add_pins_siepic>, pin_length=0.002), add_bbox=<function add_bbox_siepic>, cladding_layers=('DEVREC', ), cladding_offsets=(0, )), cross_section_metal=functools.partial(<cyfunction cross_section>, layer='M3', width=10.0, port_names=('e1', 'e2'), port_types=('electrical', 'electrical')))[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 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – phase shifter top.ps_bot (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – phase shifter bottom.mzi (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – interforemeter.pad (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – pad function.length_x (
float
) – horizontal length.length_y (
float
) – vertical length.mzi_sig_top (
str
) – port name for top phase shifter signal.mzi_gnd_top (
str
) – port name for top phase shifter GND.mzi_sig_bot (
str
) – port name for top phase shifter signal.mzi_gnd_bot (
str
) – port name for top phase shifter GND.pad_sig_bot (
str
) – port name for top pad.pad_sig_top (
str
) – port name for top pad.pad_gnd_bot (
str
) – port name for top pad.pad_gnd_top (
str
) – port name for top pad.delta_length (
float
) – mzi length imbalance.end_straight_length (
float
) – for routing metal.start_straight_length (
float
) – for routing metal.metal_route_width (
float
) – for routing metal.cross_section (
Union
[str
,Callable
[...
,CrossSection
],CrossSection
,Dict
[str
,Any
]]) – for the mzi.cross_section_metal (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – for routing metal.
- Return type
import gdsfactory as gf
c = gf.components.mzi_pads_center(length_x=500, length_y=40, mzi_sig_top='e3', mzi_gnd_top='e2', mzi_sig_bot='e1', mzi_gnd_bot='e4', pad_sig_bot='e1_1_1', pad_sig_top='e3_1_3', pad_gnd_bot='e4_1_2', pad_gnd_top='e2_1_2', delta_length=40.0, end_straight_length=5, start_straight_length=5, metal_route_width=10)
c.plot()
(Source code, png, hires.png, pdf)

mzi_phase_shifter#
- gdsfactory.components.mzi_phase_shifter(delta_length: float = 10.0, length_y: float = 2.0, *, length_x: typing.Optional[float] = 200, bend: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function bend_euler>, straight: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function straight>, straight_y: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, straight_x_top: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = 'straight_heater_metal', straight_x_bot: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, splitter: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = 'mmi1x2', combiner: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = 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: typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]] = 'strip', cross_section_x_top: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]]] = None, cross_section_x_bot: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]]] = None) gdsfactory.component.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_combiner – east top combiner port.
port_e0_splitter – east bot splitter port.
port_e1_splitter – east top splitter 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).
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi_phase_shifter(delta_length=10.0, length_y=2.0, length_x=200, straight_x_top='straight_heater_metal', splitter='mmi1x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o2', port_e0_combiner='o3', nbends=2, cross_section='strip')
c.plot()
(Source code, png, hires.png, pdf)

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: typing.Optional[float] = 200, bend: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function bend_euler>, straight: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = <function straight>, straight_y: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, straight_x_top: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = functools.partial(<function straight_heater_metal_undercut>, with_undercut=False), straight_x_bot: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = None, splitter: typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]] = 'mmi1x2', combiner: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, typing.Dict[str, typing.Any]]] = 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: typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]] = 'strip', cross_section_x_top: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]]] = None, cross_section_x_bot: typing.Optional[typing.Union[str, typing.Callable[[...], gdsfactory.cross_section.CrossSection], gdsfactory.cross_section.CrossSection, typing.Dict[str, typing.Any]]] = None) gdsfactory.component.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_combiner – east top combiner port.
port_e0_splitter – east bot splitter port.
port_e1_splitter – east top splitter 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).
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.0, length_y=2.0, 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')
c.plot()
(Source code, png, hires.png, pdf)

mzit#
- gdsfactory.components.mzit(w0=0.5, w1=0.45, w2=0.55, dy=2.0, delta_length=10.0, length=1.0, coupler_length1=5.0, coupler_length2=10.0, coupler_gap1=0.2, coupler_gap2=0.3, taper=<function taper>, taper_length=5.0, bend90=<function bend_euler>, straight=<function straight>, coupler1=<function coupler>, coupler2=<function coupler>, **kwargs)[source]#
Mzi tolerant to fabrication variations.
based on Yufei Xing thesis http://photonics.intec.ugent.be/publications/PhD.asp?ID=250
- Parameters
w1 (
float
) – narrow waveguide width (um).w2 (
float
) – wide waveguide width (um).dy (
float
) – port to port vertical spacing.delta_length (
float
) – length difference between arms (um).length (
float
) – shared length for w1 and w2.coupler_length1 (
float
) – length of coupler1.coupler_length2 (
float
) – length of coupler2.coupler_gap1 (
float
) – coupler1.coupler_gap2 (
float
) – coupler2.taper (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – taper spec.taper_length (
float
) – from w0 to w1.bend90 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – bend spec.straight (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – spec.coupler1 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
],None
]) – coupler1 spec (optional).coupler2 (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – coupler2 spec.kwargs – cross_section settings.
cp1 4 2 __ __ 3___w0_t2 _w2___ \ / \ \ length1 / | ============== gap1 | / \ | __/ \_____w0___t1 _w1 | 3 1 4 \ | | | 2 2 | | __ __w0____t1____w1___/ | \ / | \ length2 / | ============== gap2 | / \ | __/ \_ | 1 1 \ E0_w0__t2 __w1_____/ cp2
- Return type
import gdsfactory as gf
c = gf.components.mzit(w0=0.5, w1=0.45, w2=0.55, dy=2.0, delta_length=10.0, length=1.0, coupler_length1=5.0, coupler_length2=10.0, coupler_gap1=0.2, coupler_gap2=0.3, taper_length=5.0)
c.plot()
(Source code, png, hires.png, pdf)

mzit_lattice#
- gdsfactory.components.mzit_lattice(coupler_lengths=(10.0, 20.0), coupler_gaps=(0.2, 0.3), delta_lengths=(10.0, ), mzi=<function mzit>)[source]#
Mzi fab tolerant lattice filter.
cp1 W3 W1 __ __ E1___w0_t2 _w2___ \ / \ \ length1 / | ============== gap1 | / \ | __/ \_____w0___t1 _w1 | W2 W0 E0 \ | . ... | | . W1 W1 | | . __ __w0____t1____w1___/ | \ / | \ lengthN / | ============== gapN | / \ | __/ \_ | W0 W0 \ E0_w0__t2 __w1_____/ cpN
- Return type
import gdsfactory as gf
c = gf.components.mzit_lattice(coupler_lengths=[10.0, 20.0], coupler_gaps=[0.2, 0.3], delta_lengths=[10.0])
c.plot()
(Source code, png, hires.png, pdf)

nxn#
- gdsfactory.components.nxn(west=1, east=4, north=0, south=0, xsize=8.0, ysize=8.0, wg_width=0.5, layer='WG', wg_margin=1.0, **kwargs)[source]#
returns a nxn component with nxn ports (west, east, north, south)
- Parameters
west (
int
) – number of west ports.east (
int
) – number of east ports.north (
int
) – number of north ports.south (
int
) – number of south ports.xsize (
float
) – size in X.ysize (
float
) – size in Y.wg_width (
float
) – width of the straight ports.wg_margin (
float
) – margin from straight to component edge.kwargs – port_settings.
3 4 |___|_ 2 -| |- 5 | | 1 -|______|- 6 | | 8 7
- Return type
import gdsfactory as gf
c = gf.components.nxn(west=1, east=4, north=0, south=0, xsize=8.0, ysize=8.0, wg_width=0.5, layer='WG', wg_margin=1.0)
c.plot()
(Source code, png, hires.png, pdf)

pack_doe#
- gdsfactory.components.pack_doe(doe, settings, do_permutations=False, function=None, **kwargs)[source]#
Packs a component DOE (Design of Experiment) using pack.
- Parameters
doe (
Union
[str
,Callable
[...
,Component
],Component
,Dict
[str
,Any
]]) – function to return Components.settings (
Dict
[str
,List
[Any
]]) – component settings.do_permutations (
bool
) – for each setting.function (
Union
[str
,Callable
[...
,Component
],Dict
[str
,Any
],None
]) – for the component (add padding, grating couplers …)
- Keyword Arguments
spacing – Minimum distance between adjacent shapes
aspect_ratio – (width, height) ratio of the rectangular bin
max_size – Limits the size into which the shapes will be packed
sort_by_area – Pre-sorts the shapes by area
density – Values closer to 1 pack tighter but require more computation
precision – Desired precision for rounding vertex coordinates.
text – Optional function to add text labels.
text_prefix – for labels. For example. ‘A’ will produce ‘A1’, ‘A2’, …
text_offsets – relative to component size info anchor. Defaults to center.
text_anchors – relative to component (ce cw nc ne nw sc se sw center cc).
name_prefix – for each packed component (avoids the Unnamed cells warning). Note that the suffix contains a uuid so the name will not be deterministic
rotation – for each component in degrees
h_mirror – horizontal mirror in y axis (x, 1) (1, 0). This is the most common.
v_mirror – vertical mirror using x axis (1, y) (0, y)
- Return type
import gdsfactory as gf
c = gf.components.pack_doe(do_permutations=False)
c.plot()
pack_doe_grid#
- gdsfactory.components.pack_doe_grid(doe, settings, do_permutations=False, function=None, with_text=False, **kwargs)[source]#
Packs a component DOE (Design of Experiment) using grid.
- Parameters
component – function to return Components.
settings (
Dict
[str
,List
[Any
]]) – component settings.do_permutations (
bool
) – for each setting.function (
Union
[str
,Callable
[...
,Component
],Dict
[str
,Any
],None
]) – for the component (add padding, grating couplers …)with_text (
bool
) – includes text label.
- Keyword Arguments
spacing – between adjacent elements on the grid, can be a tuple for different distances in height and width.
separation – If True, guarantees elements are separated with fixed spacing if False, elements are spaced evenly along a grid.
shape – x, y shape of the grid (see np.reshape). If no shape and the list is 1D, if np.reshape were run with (1, -1).
align_x – {‘x’, ‘xmin’, ‘xmax’} for x (column) alignment along
align_y – {‘y’, ‘ymin’, ‘ymax’} for y (row) alignment along
edge_x – {‘x’, ‘xmin’, ‘xmax’} for x (column) (ignored if separation = True)
edge_y – {‘y’, ‘ymin’, ‘ymax’} for y (row) (ignored if separation = True)
rotation – for each component in degrees.
h_mirror – horizontal mirror y axis (x, 1) (1, 0). most common mirror.
v_mirror – vertical mirror using x axis (1, y) (0, y).
- Return type
import gdsfactory as gf
c = gf.components.pack_doe_grid(do_permutations=False, with_text=False)
c.plot()
pad#
- gdsfactory.components.pad(size=(100.0, 100.0), layer='M3', bbox_layers=None, bbox_offsets=None, port_inclusion=0, port_orientation=0)[source]#
Returns rectangular pad with 4 ports (1, 2, 3, 4).
- Parameters
size (
Tuple
[float
,float
]) – x, y size.layer (
Union
[Tuple
[int
,int
],int
,str
,None
]) – pad layer.bbox_layers (
Optional
[Tuple
[Union
[Tuple
[int
,int
],str
,int
,None
],...
]]) – list of layers.bbox_offsets (
Optional
[Tuple
[float
,...
]]) – list of offsets.port_inclusion (
float
) – from edge.port_orientation (
Optional
[float
]) – in degrees.
- Return type
import gdsfactory as gf
c = gf.components.pad(size=[100.0, 100.0], layer='M3', port_inclusion=0, port_orientation=0)
c.plot()
(Source code, png, hires.png, pdf)

pad_array#
- gdsfactory.components.pad_array(pad='pad', spacing=(150.0, 150.0), columns=6, rows=1, orientation=270)[source]#
Returns 2D array of pads
- Parameters
- Return type
import gdsfactory as gf
c = gf.components.pad_array(pad='pad', spacing=[150.0, 150.0], columns=6, rows=1, orientation=270)
c.plot()
(Source code, png, hires.png, pdf)

pad_array0#
- gdsfactory.components.pad_array0(pad: Union[str, Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, Dict[str, Any]] = 'pad', spacing: Tuple[float, float] = (150.0, 150.0), *, columns: int = 1, rows: int = 3, orientation: Optional[float] = 0) gdsfactory.component.Component #
Returns 2D array of pads
- Parameters
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
orientation – port orientation in deg. None for low speed DC ports.
import gdsfactory as gf
c = gf.components.pad_array0(pad='pad', spacing=[150.0, 150.0], columns=1, rows=3, orientation=0)
c.plot()
(Source code, png, hires.png, pdf)

pad_array180#
- gdsfactory.components.pad_array180(pad: Union[str, Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, Dict[str, Any]] = 'pad', spacing: Tuple[float, float] = (150.0, 150.0), *, columns: int = 1, rows: int = 3, orientation: Optional[float] = 180) gdsfactory.component.Component #
Returns 2D array of pads
- Parameters
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
orientation – port orientation in deg. None for low speed DC ports.
import gdsfactory as gf
c = gf.components.pad_array180(pad='pad', spacing=[150.0, 150.0], columns=1, rows=3, orientation=180)
c.plot()
(Source code, png, hires.png, pdf)

pad_array270#
- gdsfactory.components.pad_array270(pad: Union[str, Callable[[...], gdsfactory.component.Component], gdsfactory.component.Component, Dict[str, Any]] = 'pad', spacing: Tuple[float, float] = (150.0, 150.0), columns: int = 6, rows: int = 1, *, orientation: Optional[float] = 270) gdsfactory.component.Component #
Returns 2D array of pads
- Parameters
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
orientation – port orientation in deg. None for low speed DC ports.
import gdsfactory as gf
c = gf.components.pad_array270(pad='pad', spacing=[150.0, 150.0], columns=6, rows=1, orien