PCells#
Parametric Cells for the Generic PDK.
Consider them a foundation from which you can draw inspiration. Feel free to modify their cross-sections and layers to tailor a unique PDK suited for any foundry of your choice.
By doing so, you’ll possess a versatile, retargetable PDK, empowering you to design your circuits with speed and flexibility.
components#
analog#
- gdsfactory.components.analog.interdigital_capacitor(fingers: int = 4, finger_length: float | int = 20.0, finger_gap: float | int = 2.0, thickness: float | int = 5.0, layer: LayerSpec = 'WG') Component [source]#
Generates an interdigital capacitor with ports on both ends.
See for example Zhu et al., Accurate circuit model of interdigital capacitor and its application to design of new uasi-lumped miniaturized filters with suppression of harmonic resonance, doi: 10.1109/22.826833.
Note
finger_length=0
effectively provides a plate capacitor.- Parameters:
fingers – total fingers of the capacitor.
finger_length – length of the probing fingers.
finger_gap – length of gap between the fingers.
thickness – Thickness of fingers and section before the fingers.
layer – spec.
import gdsfactory as gf
c = gf.components.interdigital_capacitor(fingers=4, finger_length=20, finger_gap=2, thickness=5, layer='WG').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
bends#
- gdsfactory.components.bends.bend_circular(radius: float | None = None, angle: float = 90.0, npoints: int | None = None, layer: tuple[int, int] | str | int | LayerEnum | None = None, width: float | None = None, cross_section: CrossSectionSpec = 'strip', allow_min_radius_violation: bool = False) Component [source]#
Returns a radial arc.
- Parameters:
radius – in um. Defaults to cross_section_radius.
angle – angle of arc (degrees).
npoints – number of points.
layer – layer to use. Defaults to cross_section.layer.
width – width to use. Defaults to cross_section.width.
cross_section – spec (CrossSection, string or dict).
allow_min_radius_violation – if True allows radius to be smaller than cross_section radius.
import gdsfactory as gf
c = gf.components.bend_circular(angle=90, cross_section='strip', allow_min_radius_violation=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.bends.bend_circular_heater(radius: float | None = None, angle: float = 90, npoints: int | None = None, heater_to_wg_distance: float = 1.2, heater_width: float = 0.5, layer_heater: LayerSpec = 'HEATER', cross_section: CrossSectionSpec = 'strip', allow_min_radius_violation: bool = False) Component [source]#
Creates an arc of arclength theta starting at angle start_angle.
- Parameters:
radius – in um. Defaults to cross_section.radius.
angle – angle of arc (degrees).
npoints – Number of points used per 360 degrees.
heater_to_wg_distance – in um.
heater_width – in um.
layer_heater – for heater.
cross_section – specification (CrossSection, string, CrossSectionFactory dict).
allow_min_radius_violation – if True allows radius to be smaller than cross_section radius.
import gdsfactory as gf
c = gf.components.bend_circular_heater(angle=90, heater_to_wg_distance=1.2, heater_width=0.5, layer_heater='HEATER', cross_section='strip', allow_min_radius_violation=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.bends.bend_euler(radius: float | None = None, angle: float = 90.0, p: float = 0.5, with_arc_floorplan: bool = True, npoints: int | None = None, layer: LayerSpec | None = None, width: float | None = None, cross_section: CrossSectionSpec = 'strip', allow_min_radius_violation: bool = False) Component [source]#
Regular degree euler bend.
- Parameters:
radius – in um. Defaults to cross_section_radius.
angle – total angle of the curve.
p – Proportion of the curve that is an Euler curve.
with_arc_floorplan – If False: radius is the minimum radius of curvature.
npoints – Number of points used per 360 degrees.
layer – layer to use. Defaults to cross_section.layer.
width – width to use. Defaults to cross_section.width.
cross_section – specification (CrossSection, string, CrossSectionFactory dict).
allow_min_radius_violation – if True allows radius to be smaller than cross_section radius.
import gdsfactory as gf
c = gf.components.bend_euler(angle=90, p=0.5, with_arc_floorplan=True, cross_section='strip', allow_min_radius_violation=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.bends.bend_euler_s(radius: float | None = None, p: float = 0.5, with_arc_floorplan: bool = True, npoints: int | None = None, layer: LayerSpec | None = None, width: float | None = None, cross_section: CrossSectionSpec = 'strip', allow_min_radius_violation: bool = False, port1: str = 'o1', port2: str = 'o2') Component [source]#
Sbend made of 2 euler bends.
- Parameters:
radius – in um. Defaults to cross_section_radius.
p – Proportion of the curve that is an Euler curve.
with_arc_floorplan – If False: radius is the minimum radius of curvature.
npoints – Number of points used per 360 degrees.
layer – layer to use. Defaults to cross_section.layer.
width – width to use. Defaults to cross_section.width.
cross_section – specification (CrossSection, string, CrossSectionFactory dict).
allow_min_radius_violation – if True allows radius to be smaller than cross_section radius.
port1 – input port name.
port2 – output port name.
_____ o2 / / / / | / / / o1_____/
import gdsfactory as gf
c = gf.components.bend_euler_s(p=0.5, with_arc_floorplan=True, cross_section='strip', allow_min_radius_violation=False, port1='o1', port2='o2').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.bends.bend_s(size: tuple[float, float] = (11.0, 1.8), npoints: int = 99, cross_section: CrossSectionSpec = 'strip', allow_min_radius_violation: bool = False) Component [source]#
Return S bend with bezier curve.
stores min_bend_radius property in self.info[‘min_bend_radius’] min_bend_radius depends on height and length
- Parameters:
size – in x and y direction.
npoints – number of points.
cross_section – spec.
allow_min_radius_violation – bool.
import gdsfactory as gf
c = gf.components.bend_s(size=(11, 1.8), npoints=99, cross_section='strip', allow_min_radius_violation=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.bends.bezier(control_points: Sequence[tuple[float, float]] = ((0.0, 0.0), (5.0, 0.0), (5.0, 1.8), (10.0, 1.8)), npoints: int = 201, with_manhattan_facing_angles: bool = True, start_angle: int | None = None, end_angle: int | None = None, cross_section: CrossSectionSpec = 'strip', bend_radius_error_type: ErrorType | None = None, allow_min_radius_violation: bool = False) Component [source]#
Returns Bezier bend.
- Parameters:
control_points – list of points.
npoints – number of points varying between 0 and 1.
with_manhattan_facing_angles – bool.
start_angle – optional start angle in deg.
end_angle – optional end angle in deg.
cross_section – spec.
bend_radius_error_type – error type.
allow_min_radius_violation – bool.
import gdsfactory as gf
c = gf.components.bezier(control_points=((0, 0), (5, 0), (5, 1.8), (10, 1.8)), npoints=201, with_manhattan_facing_angles=True, cross_section='strip', allow_min_radius_violation=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
containers#
- gdsfactory.components.containers.add_fiber_array_optical_south_electrical_north(component: str | Callable[[...], Component] | dict[str, Any] | KCell, pad: str | Callable[[...], Component] | dict[str, Any] | KCell, grating_coupler: str | Callable[[...], Component] | dict[str, Any] | KCell, cross_section_metal: CrossSection | str | dict[str, Any] | Callable[[...], CrossSection] | SymmetricalCrossSection, with_loopback: bool = True, pad_pitch: float = 100.0, pitch: float = 127.0, pad_gc_spacing: float = 250.0, electrical_port_names: list[str] | None = None, electrical_port_orientation: float | None = 90, npads: int | None = None, port_types_grating_couplers: list[str] | None = None, pad_spacing: float | None = None, **kwargs: Any) Component [source]#
Returns a fiber array with Optical gratings on South and Electrical pads on North.
This a test configuration for DC pads.
- Parameters:
component – component spec to add fiber and pads.
pad – pad spec.
grating_coupler – grating coupler function.
cross_section_metal – metal cross section.
with_loopback – whether to add a loopback port.
pad_pitch – spacing between pads.
pitch – spacing between grating couplers.
pad_gc_spacing – spacing between pads and grating couplers.
electrical_port_names – list of electrical port names. Defaults to all.
electrical_port_orientation – orientation of electrical ports. Defaults to 90.
npads – number of pads. Defaults to one per electrical_port_names.
port_types_grating_couplers – port types for grating couplers. Defaults to vertical TE, TM, and dual.
pad_spacing – (deprecated).
kwargs – additional arguments.
- Keyword Arguments:
layer_label – layer for settings label.
measurement – measurement name.
measurement_settings – measurement settings.
analysis – analysis name.
doe – Design of Experiment.
anchor – anchor point for the label. Defaults to south-west “sw”. Valid options are: “n”, “s”, “e”, “w”, “ne”, “nw”, “se”, “sw”, “c”.
gc_port_name – grating coupler input port name.
gc_port_labels – grating coupler list of labels.
component_name – optional for the label.
select_ports – function to select ports.
cross_section – cross_section function.
get_input_labels_function – function to get input labels. None skips labels.
layer_label – optional layer for grating coupler label.
bend – bend spec.
straight – straight spec.
taper – taper spec.
get_input_label_text_loopback_function – function to get input label test.
get_input_label_text_function – for labels.
fanout_length – if None, automatic calculation of fanout length.
max_y0_optical – in um.
with_loopback – True, adds loopback structures.
straight_separation – from edge to edge.
list_port_labels – None, adds TM labels to port indices in this list.
connected_port_list_ids – names of ports only for type 0 optical routing.
nb_optical_ports_lines – number of grating coupler lines.
force_manhattan – False
excluded_ports – list of port names to exclude when adding gratings.
grating_indices – list of grating coupler indices.
routing_straight – function to route.
routing_method – route_single.
gc_rotation – fiber coupler rotation in degrees. Defaults to -90.
input_port_indexes – to connect.
import gdsfactory as gf
c = gf.components.add_fiber_array_optical_south_electrical_north(with_loopback=True, pad_pitch=100, pitch=127, pad_gc_spacing=250, electrical_port_orientation=90).copy()
c.draw_ports()
c.plot()
- gdsfactory.components.containers.add_termination(component: ComponentSpec = 'straight', port_names: tuple[str, ...] | None = None, terminator: ComponentSpec = functools.partial(<function taper>, width2=0.1), terminator_port_name: str | None = None) Component [source]#
Returns component with terminator on some ports.
- Parameters:
component – to add terminator.
port_names – ports to add terminator.
terminator – factory for the terminator.
terminator_port_name – for the terminator to connect to the component ports.
import gdsfactory as gf
c = gf.components.add_termination(component='straight').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.containers.add_trenches(component: ComponentSpec = 'coupler', layer_component: LayerSpec = 'WG', layer_trench: LayerSpec = 'DEEP_ETCH', width_trench: float = 2.0, cross_section: CrossSectionSpec = 'rib_with_trenches', top: float | None = None, bot: float | None = None, right: float | None = 0, left: float | None = 0, **kwargs: Any) Component [source]#
Return component with trenches.
- Parameters:
component – component to add to the trenches.
layer_component – layer of the component.
layer_trench – layer of the trenches.
width_trench – width of the trenches.
cross_section – spec (CrossSection, string or dict).
top – width of the trench on the top. If None uses width_trench.
bot – width of the trench on the bottom. If None uses width_trench.
right – width of the trench on the right. If None uses width_trench.
left – width of the trench on the left. If None uses width_trench.
kwargs – component settings.
import gdsfactory as gf
c = gf.components.add_trenches(component='coupler', layer_component='WG', layer_trench='DEEP_ETCH', width_trench=2, cross_section='rib_with_trenches', right=0, left=0).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.containers.add_trenches90(*, component: ComponentSpec = 'bend_euler', layer_component: LayerSpec = 'WG', layer_trench: LayerSpec = 'DEEP_ETCH', width_trench: float = 2.0, cross_section: CrossSectionSpec = 'rib_with_trenches', top: float | None = 0, bot: float | None = None, right: float | None = None, left: float | None = 0, **kwargs: Any) gf.Component #
Return component with trenches.
- Parameters:
component – component to add to the trenches.
layer_component – layer of the component.
layer_trench – layer of the trenches.
width_trench – width of the trenches.
cross_section – spec (CrossSection, string or dict).
top – width of the trench on the top. If None uses width_trench.
bot – width of the trench on the bottom. If None uses width_trench.
right – width of the trench on the right. If None uses width_trench.
left – width of the trench on the left. If None uses width_trench.
kwargs – component settings.
import gdsfactory as gf
c = gf.components.add_trenches90(component='bend_euler', layer_component='WG', layer_trench='DEEP_ETCH', width_trench=2, cross_section='rib_with_trenches', top=0, left=0).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.containers.array(component: ComponentSpec = 'pad', spacing: tuple[float, float] | None = None, columns: int = 6, rows: int = 1, column_pitch: float = 150, row_pitch: float = 150, add_ports: bool = True, size: tuple[float, float] | None = None, centered: bool = False, post_process: Sequence[Callable[[Component], None]] | None = None, auto_rename_ports: bool = False) Component [source]#
Returns an array of components.
- Parameters:
component – to replicate.
spacing – x, y spacing (deprecated).
columns – in x.
rows – in y.
column_pitch – pitch between columns.
row_pitch – pitch between rows.
auto_rename_ports – True to auto rename ports.
add_ports – add ports from component into the array.
size – Optional x, y size. Overrides columns and rows.
centered – center the array around the origin.
post_process – function to apply to the array after creation.
- Raises:
ValueError – If columns > 1 and spacing[0] = 0.
ValueError – If rows > 1 and spacing[1] = 0.
2 rows x 4 columns column_pitch <----------> ___ ___ ___ ___ | | | | | | | | |___| |___| |___| |___| ___ ___ ___ ___ | | | | | | | | |___| |___| |___| |___|
import gdsfactory as gf
c = gf.components.array(component='pad', columns=6, rows=1, column_pitch=150, row_pitch=150, add_ports=True, centered=False, auto_rename_ports=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.containers.component_sequence(sequence: str, symbol_to_component: dict[str, tuple[Component, str, str]], ports_map: dict[str, tuple[str, str]] | None = None, port_name1: str = 'o1', port_name2: str = 'o2', start_orientation: float = 0.0) Component [source]#
Returns component from ASCII sequence.
if you prefix a symbol with ! it mirrors the component
- Parameters:
sequence – a string or a list of symbols.
symbol_to_component – maps symbols to (component, input, output).
ports_map – (optional) extra port mapping using the convention. {port_name: (alias_name, port_name)}
port_name1 – input port_name.
port_name2 – output port_name.
start_orientation – in degrees.
- Returns:
- containing the sequence of sub-components
instantiated and connected together in the sequence order.
- Return type:
component
import gdsfactory as gf bend180 = gf.components.bend_circular180() wg_pin = gf.components.straight_pin(length=40) wg = gf.components.straight() # Define a map between symbols and (component, input port, output port) symbol_to_component = { "A": (bend180, 'o1', 'o2'), "B": (bend180, 'o2', 'o1'), "H": (wg_pin, 'o1', 'o2'), "-": (wg, 'o1', 'o2'), } # Each character in the sequence represents a component s = "AB-H-H-H-H-BA" c = gf.components.component_sequence(sequence=s, symbol_to_component=symbol_to_component) c.plot()
(
Source code
,png
,hires.png
,pdf
)
- gdsfactory.components.containers.copy_layers(factory: ComponentSpec = 'cross', layers: LayerSpecs = ((1, 0), (2, 0)), **kwargs: Any) Component [source]#
Returns a component with the geometry copied in different layers.
- Parameters:
factory – component spec.
layers – iterable of layers.
kwargs – keyword arguments.
import gdsfactory as gf
c = gf.components.copy_layers(factory='cross', layers=((1, 0), (2, 0))).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.containers.extend_ports(component: ComponentSpec = 'mmi1x2', port_names: PortNames | None = None, length: float = 5.0, extension: ComponentSpec | None = None, port1: str | None = None, port2: str | None = None, port_type: str = 'optical', centered: bool = False, cross_section: CrossSectionSpec | None = None, extension_port_names: list[str] | None = None, allow_width_mismatch: bool = False, auto_taper: bool = True, **kwargs: Any) Component [source]#
Returns a new component with some ports extended.
You can define extension Spec defaults to port cross_section of each port to extend.
- Parameters:
component – component to extend ports.
port_names – list of ports names to extend, if None it extends all ports.
length – extension length.
extension – function to extend ports (defaults to a straight).
port1 – extension input port name.
port2 – extension output port name.
port_type – type of the ports to extend.
centered – if True centers rectangle at (0, 0).
cross_section – extension cross_section, defaults to port cross_section if port has no cross_section it creates one using width and layer.
extension_port_names – extension port names add to the new component.
allow_width_mismatch – allow width mismatches.
auto_taper – if True adds automatic tapers.
kwargs – cross_section settings.
- Keyword Arguments:
layer – port GDS layer.
prefix – port name prefix.
orientation – in degrees.
width – port width.
layers_excluded – List of layers to exclude.
port_type – optical, electrical, ….
clockwise – if True, sort ports clockwise, False: counter-clockwise.
import gdsfactory as gf
c = gf.components.extend_ports(component='mmi1x2', length=5, port_type='optical', centered=False, allow_width_mismatch=False, auto_taper=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.containers.extend_ports_list(ports: Ports | Sequence[Port] | InstancePorts, extension: ComponentSpec, extension_port_name: str | None = None, ignore_ports: Sequence[str] | None = None) Component [source]#
Returns a component with an extension attached to a list of ports.
- Parameters:
ports – list of ports.
extension – function for extension.
extension_port_name – to connect extension.
ignore_ports – list of port names to ignore.
- gdsfactory.components.containers.splitter_chain(splitter: ComponentSpec = 'mmi1x2', columns: int = 3, bend: ComponentSpec = 'bend_s') Component [source]#
Chain of splitters.
- Parameters:
splitter – splitter to chain.
columns – number of splitters to chain.
bend – bend to connect splitters.
__o5 __| __| |__o4 o1 _| |__o3 |__o2 __o2 o1 _| |__o3
import gdsfactory as gf
c = gf.components.splitter_chain(splitter='mmi1x2', columns=3, bend='bend_s').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.containers.splitter_tree(coupler: ComponentSpec = 'mmi1x2', noutputs: int = 4, spacing: Float2 = (90.0, 50.0), bend_s: ComponentSpec | None = 'bend_s', bend_s_xsize: float | None = None, cross_section: CrossSectionSpec = 'strip') gf.Component [source]#
Tree of power splitters.
- Parameters:
coupler – coupler factory.
noutputs – number of outputs.
spacing – x, y spacing between couplers.
bend_s – Sbend function for termination.
bend_s_xsize – xsize for the sbend.
cross_section – cross_section.
__| __| |__ _| |__ |__ dy dx
import gdsfactory as gf
c = gf.components.splitter_tree(coupler='mmi1x2', noutputs=4, spacing=(90, 50), bend_s='bend_s', cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.containers.switch_tree(*, coupler: ComponentSpec = functools.partial(<function mzi>, combiner='mmi2x2', port_e1_combiner='o3', port_e0_combiner='o4', delta_length=0, straight_x_top='straight_heater_metal', length_x=None), noutputs: int = 4, spacing: Float2 = (500, 100), bend_s: ComponentSpec | None = 'bend_s', bend_s_xsize: float | None = None, cross_section: CrossSectionSpec = 'strip') gf.Component #
Tree of power splitters.
- Parameters:
coupler – coupler factory.
noutputs – number of outputs.
spacing – x, y spacing between couplers.
bend_s – Sbend function for termination.
bend_s_xsize – xsize for the sbend.
cross_section – cross_section.
__| __| |__ _| |__ |__ dy dx
import gdsfactory as gf
c = gf.components.switch_tree(noutputs=4, spacing=(500, 100), bend_s='bend_s', cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
couplers#
- gdsfactory.components.couplers.coupler(gap: float = 0.236, length: float = 20.0, dy: float = 4.0, dx: float = 10.0, cross_section: CrossSectionSpec = 'strip', allow_min_radius_violation: bool = False, bend: ComponentSpec = 'bend_s') Component [source]#
Symmetric coupler.
- Parameters:
gap – between straights in um.
length – of coupling region in um.
dy – port to port vertical spacing in um.
dx – length of bend in x direction in um.
cross_section – spec (CrossSection, string or dict).
allow_min_radius_violation – if True does not check for min bend radius.
bend – input and output sbend components.
dx dx |------| |------| o2 ________ ______o3 \ / | \ length / | ======================= gap | dy / \ | ________/ \_______ | o1 o4 coupler_straight coupler_symmetric
import gdsfactory as gf
c = gf.components.coupler(gap=0.236, length=20, dy=4, dx=10, cross_section='strip', allow_min_radius_violation=False, bend='bend_s').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.couplers.coupler90(gap: float = 0.2, radius: float | None = None, bend: ComponentSpec = 'bend_euler', straight: ComponentSpec = 'straight', cross_section: CrossSectionSpec = 'strip', cross_section_bend: CrossSectionSpec | None = None) Component [source]#
Straight coupled to a bend.
- Parameters:
gap – um.
radius – um.
straight – for straight.
bend – bend spec.
cross_section – cross_section spec.
cross_section_bend – optional bend cross_section spec.
o3 | / / o2_/ o1___o4
import gdsfactory as gf
c = gf.components.coupler90(gap=0.2, bend='bend_euler', straight='straight', cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.couplers.coupler90bend(radius: float = 10.0, gap: float = 0.2, bend: ComponentSpec = 'bend_euler', cross_section_inner: CrossSectionSpec = 'strip', cross_section_outer: CrossSectionSpec = 'strip') Component [source]#
Returns 2 coupled bends.
- Parameters:
radius – um.
gap – um.
bend – for bend.
cross_section_inner – spec inner bend.
cross_section_outer – spec outer bend.
r 3 4 | | | | / / | / / 2____/ / 1_____/
import gdsfactory as gf
c = gf.components.coupler90bend(radius=10, gap=0.2, bend='bend_euler', cross_section_inner='strip', cross_section_outer='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.couplers.coupler90circular(gap: float = 0.2, radius: float | None = None, *, bend: ComponentSpec = 'bend_circular', straight: ComponentSpec = 'straight', cross_section: CrossSectionSpec = 'strip', cross_section_bend: CrossSectionSpec | None = None) Component #
Straight coupled to a bend.
- Parameters:
gap – um.
radius – um.
straight – for straight.
bend – bend spec.
cross_section – cross_section spec.
cross_section_bend – optional bend cross_section spec.
o3 | / / o2_/ o1___o4
import gdsfactory as gf
c = gf.components.coupler90circular(gap=0.2, bend='bend_circular', straight='straight', cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.couplers.coupler_adiabatic(length1: float = 20.0, length2: float = 50.0, length3: float = 30.0, wg_sep: float = 1.0, input_wg_sep: float = 3.0, output_wg_sep: float = 3.0, dw: float = 0.1, cross_section: CrossSectionSpec = 'strip') Component [source]#
Returns 50/50 adiabatic coupler.
Design based on asymmetric adiabatic 3dB coupler designs, such as those. - https://doi.org/10.1364/CLEO.2010.CThAA2, - https://doi.org/10.1364/CLEO_SI.2017.SF1I.5 - https://doi.org/10.1364/CLEO_SI.2018.STh4B.4
input Bezier curves, with poles set to half of the x-length of the S-bend. 1. is the first half of input S-bend where input widths taper by +dw and -dw 2. is the second half of the S-bend straight with constant, unbalanced widths 3. is the region where the two asymmetric straights gradually come together 4. straights taper back to the original width at a fixed distance from one another 5. is the output S-bend straight.
- Parameters:
length1 – region that gradually brings the two asymmetric straights together. In this region the straight widths gradually change to be different by dw.
length2 – coupling region, where asymmetric straights gradually become the same width.
length3 – output region where the two straights separate.
wg_sep – Distance between center-to-center in the coupling region (Region 2).
input_wg_sep – Separation of the two straights at the input, center-to-center.
output_wg_sep – Separation of the two straights at the output, center-to-center.
dw – Change in straight width. In Region 1, top arm tapers to width+dw/2.0, bottom taper to width-dw/2.0.
cross_section – cross_section spec.
import gdsfactory as gf
c = gf.components.coupler_adiabatic(length1=20, length2=50, length3=30, wg_sep=1, input_wg_sep=3, output_wg_sep=3, dw=0.1, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.couplers.coupler_asymmetric(gap: float = 0.234, dy: float = 2.5, dx: float = 10.0, cross_section: CrossSectionSpec = 'strip') Component [source]#
Bend coupled to straight waveguide.
- Parameters:
gap – um.
dy – port to port vertical spacing.
dx – bend length in x direction.
cross_section – spec.
dx |-----| _____ o2 / | _____/ | gap o1____________ | dy o3
import gdsfactory as gf
c = gf.components.coupler_asymmetric(gap=0.234, dy=2.5, dx=10, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.couplers.coupler_bent(gap: float = 0.2, radius: float = 26, length: float = 8.6, width1: float = 0.4, width2: float = 0.4, length_straight: float = 10, cross_section: str = 'strip') Component [source]#
Returns Broadband SOI curved / straight directional coupler.
based on: https://doi.org/10.1038/s41598-017-07618-6.
- Parameters:
gap – gap.
radius – radius coupling.
length – coupler_length.
width1 – width1.
width2 – width2.
length_straight – input and output straight length.
cross_section – cross_section.
import gdsfactory as gf
c = gf.components.coupler_bent(gap=0.2, radius=26, length=8.6, width1=0.4, width2=0.4, length_straight=10, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.couplers.coupler_broadband(w_sc: float = 0.5, gap_sc: float = 0.2, w_top: float = 0.6, gap_pc: float = 0.3, legnth_taper: float = 1.0, bend: ComponentSpec = 'bend_euler', coupler_straight: ComponentSpec = 'coupler_straight', length_coupler_straight: float = 12.4, lenght_coupler_big_gap: float = 4.7, cross_section: CrossSectionSpec = 'strip', radius: float = 10.0) Component [source]#
Returns broadband coupler component.
https://docs.flexcompute.com/projects/tidy3d/en/latest/notebooks/BroadbandDirectionalCoupler.html proposed in Zeqin Lu, Han Yun, Yun Wang, Zhitian Chen, Fan Zhang, Nicolas A. F. Jaeger, and Lukas Chrostowski, “Broadband silicon photonic directional coupler using asymmetric-waveguide based phase control,” Opt. Express 23, 3795-3808 (2015), DOI: 10.1364/OE.23.003795.
- Parameters:
w_sc – width of waveguides in the symmetric coupler section.
gap_sc – gap size between the waveguides in the symmetric coupler section.
w_top – width of the top waveguide in the phase control section.
gap_pc – gap size in the phase control section.
legnth_taper – length of the tapers.
bend – bend factory.
coupler_straight – coupler_straight factory.
length_coupler_straight – optimal L_1 from the 3d fdtd analysis.
lenght_coupler_big_gap – optimal L_2 from the 3d fdtd analysis.
cross_section – cross_section of the waveguides.
radius – bend radius.
import gdsfactory as gf
c = gf.components.coupler_broadband(w_sc=0.5, gap_sc=0.2, w_top=0.6, gap_pc=0.3, legnth_taper=1, bend='bend_euler', coupler_straight='coupler_straight', length_coupler_straight=12.4, lenght_coupler_big_gap=4.7, cross_section='strip', radius=10).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.couplers.coupler_full(coupling_length: float = 40.0, dx: float = 10.0, dy: float = 4.8, gap: float = 0.5, dw: float = 0.1, cross_section: CrossSectionSpec = 'strip', width: float | None = None) Component [source]#
Adiabatic Full coupler.
Design based on asymmetric adiabatic full coupler designs, such as the one reported in ‘Integrated Optic Adiabatic Devices on Silicon’ by Y. Shani, et al (IEEE Journal of Quantum Electronics, Vol. 27, No. 3 March 1991).
1. is the first half of the input S-bend straight where the input straights widths taper by +dw and -dw, 2. is the second half of the S-bend straight with constant, unbalanced widths, 3. is the coupling region where the straights from unbalanced widths to balanced widths to reverse polarity unbalanced widths, 4. is the fixed width straight that curves away from the coupling region, 5.is the final curve where the straights taper back to the regular width specified in the straight template.
- Parameters:
coupling_length – Length of the coupling region in um.
dx – Length of the bend regions in um.
dy – Port-to-port distance between the bend regions in um.
gap – Distance between the two straights in um.
dw – delta width. Top arm tapers to width - dw, bottom to width + dw in um.
cross_section – cross-section spec.
width – width of the waveguide. If None, it will use the width of the cross_section.
import gdsfactory as gf
c = gf.components.coupler_full(coupling_length=40, dx=10, dy=4.8, gap=0.5, dw=0.1, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.couplers.coupler_ring(gap: float = 0.2, radius: float = 5.0, length_x: float = 4.0, bend: ComponentSpec = 'bend_euler', straight: ComponentSpec = 'straight', cross_section: CrossSectionSpec = 'strip', cross_section_bend: CrossSectionSpec | None = None, length_extension: float = 3) Component [source]#
Coupler for ring.
- Parameters:
gap – spacing between parallel coupled straight waveguides.
radius – of the bends.
length_x – length of the parallel coupled straight waveguides.
bend – 90 degrees bend spec.
straight – straight spec.
cross_section – cross_section spec.
cross_section_bend – optional bend cross_section spec.
length_extension – for the ports.
o2 o3 | | \ / \ / ---=========--- o1 length_x o4
import gdsfactory as gf
c = gf.components.coupler_ring(gap=0.2, radius=5, length_x=4, bend='bend_euler', straight='straight', cross_section='strip', length_extension=3).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.couplers.coupler_straight(length: float = 10.0, gap: float = 0.27, cross_section: CrossSectionSpec = 'strip') Component [source]#
Coupler_straight with two parallel straights.
- Parameters:
length – of straight.
gap – between straights.
cross_section – specification (CrossSection, string or dict).
o2──────▲─────────o3 │gap o1──────▼─────────o4
import gdsfactory as gf
c = gf.components.coupler_straight(length=10, gap=0.27, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.couplers.coupler_straight_asymmetric(length: float = 10.0, gap: float = 0.27, width_top: float = 0.5, width_bot: float = 1, cross_section: CrossSectionSpec = 'strip') Component [source]#
Coupler with two parallel straights of different widths.
- Parameters:
length – of straight.
gap – between straights.
width_top – of top straight.
width_bot – of bottom straight.
cross_section – cross_section spec.
import gdsfactory as gf
c = gf.components.coupler_straight_asymmetric(length=10, gap=0.27, width_top=0.5, width_bot=1, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
detectors#
- gdsfactory.components.detectors.ge_detector_straight_si_contacts(length: float = 40.0, cross_section: CrossSectionSpec = 'pn_ge_detector_si_contacts', via_stack: ComponentSpec = 'via_stack_slab_m3', via_stack_width: float = 10.0, via_stack_spacing: float = 5.0, via_stack_offset: float = 0.0, taper_length: float = 20.0, taper_width: float = 0.8, taper_cros_section: CrossSectionSpec = 'strip') Component [source]#
Returns a straight Ge on Si detector with silicon contacts.
There are no contacts on the Ge. These detectors could have lower dark current and sensitivity compared to those with contacts in the Ge. See Chen et al., “High-Responsivity Low-Voltage 28-Gb/s Ge p-i-n Photodetector With Silicon Contacts”, Journal of Lightwave Technology 33(4), 2015.
https://doi.org/10.1109/JLT.2014.2367134
- Parameters:
length – pd length.
cross_section – for the waveguide.
via_stack – for the via_stacks. First element
via_stack_width – width of the via_stack.
via_stack_spacing – spacing between via_stacks.
via_stack_offset – with respect to the detector
taper_length – length of the taper.
taper_width – width of the taper.
taper_cros_section – cross_section of the taper.
import gdsfactory as gf
c = gf.components.ge_detector_straight_si_contacts(length=40, cross_section='pn_ge_detector_si_contacts', via_stack='via_stack_slab_m3', via_stack_width=10, via_stack_spacing=5, via_stack_offset=0, taper_length=20, taper_width=0.8, taper_cros_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
dies#
- gdsfactory.components.dies.add_frame(component: ComponentSpec = 'rectangle', width: float = 10.0, spacing: float = 10.0, layer: LayerSpec = 'WG') Component [source]#
Returns component with a frame around it.
- Parameters:
component – Component to frame.
width – of the frame.
spacing – of component to frame.
layer – frame layer.
import gdsfactory as gf
c = gf.components.add_frame(component='rectangle', width=10, spacing=10, layer='WG').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.dies.align_wafer(width: float = 10.0, spacing: float = 10.0, cross_length: float = 80.0, layer: LayerSpec = 'WG', layer_cladding: tuple[int, int] | None = None, square_corner: str = 'bottom_left') Component [source]#
Returns cross inside a frame to align wafer.
- Parameters:
width – in um.
spacing – in um.
cross_length – for the cross.
layer – for the cross.
layer_cladding – optional.
square_corner – bottom_left, bottom_right, top_right, top_left.
import gdsfactory as gf
c = gf.components.align_wafer(width=10, spacing=10, cross_length=80, layer='WG', square_corner='bottom_left').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.dies.die(size: Size = (10000.0, 10000.0), street_width: float = 100.0, street_length: float = 1000.0, die_name: str | None = 'chip99', text_size: float = 100.0, text_location: str | Float2 = 'SW', layer: LayerSpec | None = 'FLOORPLAN', bbox_layer: LayerSpec | None = 'FLOORPLAN', text: ComponentSpec = 'text', draw_corners: bool = False) gf.Component [source]#
Returns die with optional markers marking the boundary of the die.
- Parameters:
size – x, y dimensions of the die.
street_width – Width of the corner marks for die-sawing.
street_length – Length of the corner marks for die-sawing.
die_name – Label text. If None, no label is added.
text_size – Label text size.
text_location – {‘NW’, ‘N’, ‘NE’, ‘SW’, ‘S’, ‘SE’} or (x, y) coordinate.
layer – For street widths. None to not draw the street widths.
bbox_layer – optional bbox layer drawn bounding box around the die.
text – function use for generating text. Needs to accept text, size, layer.
draw_corners – True draws only corners. False draws a square die.
import gdsfactory as gf
c = gf.components.die(size=(10000, 10000), street_width=100, street_length=1000, die_name='chip99', text_size=100, text_location='SW', layer='FLOORPLAN', bbox_layer='FLOORPLAN', text='text', draw_corners=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.dies.die_with_pads(size: tuple[float, float] = (11470.0, 4900.0), ngratings: int = 14, npads: int = 31, grating_pitch: float = 250.0, pad_pitch: float = 300.0, grating_coupler: str | Callable[[...], Component] | dict[str, Any] | KCell = 'grating_coupler_te', cross_section: CrossSection | str | dict[str, Any] | Callable[[...], CrossSection] | SymmetricalCrossSection = 'strip', pad: str | Callable[[...], Component] | dict[str, Any] | KCell = 'pad', layer_floorplan: tuple[int, int] | str | int | LayerEnum = 'FLOORPLAN', edge_to_pad_distance: float = 150.0, edge_to_grating_distance: float = 150.0, with_loopback: bool = True, loopback_radius: float | None = None) Component [source]#
A die with grating couplers and pads.
- Parameters:
size – the size of the die, in um.
ngratings – the number of grating couplers.
npads – the number of pads.
grating_pitch – the pitch of the grating couplers, in um.
pad_pitch – the pitch of the pads, in um.
grating_coupler – the grating coupler component.
cross_section – the cross section.
pad – the pad component.
layer_floorplan – the layer of the floorplan.
edge_to_pad_distance – the distance from the edge to the pads, in um.
edge_to_grating_distance – the distance from the edge to the grating couplers, in um.
with_loopback – if True, adds a loopback between edge GCs. Only works for rotation = 90 for now.
loopback_radius – optional radius for loopback.
import gdsfactory as gf
c = gf.components.die_with_pads(size=(11470, 4900), ngratings=14, npads=31, grating_pitch=250, pad_pitch=300, grating_coupler='grating_coupler_te', cross_section='strip', pad='pad', layer_floorplan='FLOORPLAN', edge_to_pad_distance=150, edge_to_grating_distance=150, with_loopback=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.dies.seal_ring(size: tuple[float, float] = (500, 500), seal: ComponentSpec = 'via_stack', width: float = 10, padding: float = 10.0, with_north: bool = True, with_south: bool = True, with_east: bool = True, with_west: bool = True) Component [source]#
Returns a continuous seal ring boundary at the chip/die.
Prevents cracks from spreading and shields when connected to ground.
- Parameters:
size – of the seal.
seal – function for the seal.
width – of the seal.
padding – from component to seal.
with_north – includes seal.
with_south – includes seal.
with_east – includes seal.
with_west – includes seal.
import gdsfactory as gf
c = gf.components.seal_ring(size=(500, 500), seal='via_stack', width=10, padding=10, with_north=True, with_south=True, with_east=True, with_west=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.dies.seal_ring_segmented(size: tuple[float, float] = (500, 500), length_segment: float = 10, width_segment: float = 3, spacing_segment: float = 2, corner: ComponentSpec = 'via_stack_corner45_extended', via_stack: ComponentSpec = 'via_stack_m1_mtop', with_north: bool = True, with_south: bool = True, with_east: bool = True, with_west: bool = True) Component [source]#
Segmented Seal ring.
- Parameters:
size – of the seal ring.
length_segment – length of each segment.
width_segment – width of each segment.
spacing_segment – spacing between segments.
corner – corner component.
via_stack – via_stack component.
with_north – includes seal.
with_south – includes seal.
with_east – includes seal.
with_west – includes seal.
import gdsfactory as gf
c = gf.components.seal_ring_segmented(size=(500, 500), length_segment=10, width_segment=3, spacing_segment=2, corner='via_stack_corner45_extended', via_stack='via_stack_m1_mtop', with_north=True, with_south=True, with_east=True, with_west=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.dies.wafer(reticle: ComponentSpec = 'die', cols: tuple[int, ...] = (2, 6, 6, 8, 8, 6, 6, 2), xspacing: float | None = None, yspacing: float | None = None, die_name_col_row: bool = False) Component [source]#
Returns complete wafer. Useful for mask aligner steps.
- Parameters:
reticle – spec for each wafer reticle.
cols – how many columns per row.
xspacing – optional spacing, defaults to reticle.dxsize.
yspacing – optional spacing, defaults to reticle.dysize.
die_name_col_row – if True, die name is row_col, otherwise is a number
import gdsfactory as gf
c = gf.components.wafer(reticle='die', cols=(2, 6, 6, 8, 8, 6, 6, 2), die_name_col_row=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
edge_couplers#
- gdsfactory.components.edge_couplers.edge_coupler_array(edge_coupler: ComponentSpec = 'edge_coupler_silicon', n: int = 5, pitch: float = 127.0, x_reflection: bool = False, text: ComponentSpec | None = 'text_rectangular', text_offset: Float2 = (10, 20), text_rotation: float = 0) Component [source]#
Fiber array edge coupler based on an inverse taper.
Each edge coupler adds a ruler for polishing.
- Parameters:
edge_coupler – edge coupler spec.
n – number of channels.
pitch – Fiber pitch.
x_reflection – horizontal mirror.
text – text spec.
text_offset – from edge coupler.
text_rotation – text rotation in degrees.
import gdsfactory as gf
c = gf.components.edge_coupler_array(edge_coupler='edge_coupler_silicon', n=5, pitch=127, x_reflection=False, text='text_rectangular', text_offset=(10, 20), text_rotation=0).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.edge_couplers.edge_coupler_array_with_loopback(edge_coupler: ComponentSpec = 'edge_coupler_silicon', cross_section: CrossSectionSpec = 'strip', radius: float = 30, n: int = 8, pitch: float = 127.0, extension_length: float = 1.0, x_reflection: bool = False, text: ComponentSpec | None = 'text_rectangular', text_offset: Float2 = (0, 10), text_rotation: float = 0) Component [source]#
Fiber array edge coupler.
- Parameters:
edge_coupler – edge coupler.
cross_section – spec.
radius – bend radius loopback (um).
n – number of channels.
pitch – Fiber pitch (um).
extension_length – in um.
x_reflection – horizontal mirror.
text – Optional text spec.
text_offset – x, y.
text_rotation – text rotation in degrees.
import gdsfactory as gf
c = gf.components.edge_coupler_array_with_loopback(edge_coupler='edge_coupler_silicon', cross_section='strip', radius=30, n=8, pitch=127, extension_length=1, x_reflection=False, text='text_rectangular', text_offset=(0, 10), text_rotation=0).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.edge_couplers.edge_coupler_silicon(length: float = 100, width1: float = 0.5, width2: float = 0.2, with_two_ports: bool = True, port_names: tuple[str, str] = ('o1', 'o2'), port_types: tuple[str, str] = ('optical', 'edge_coupler'), cross_section: CrossSectionSpec = 'strip') Component [source]#
Edge coupler for silicon photonics.
- Parameters:
length – length of the taper.
width1 – width1 of the taper.
width2 – width2 of the taper.
with_two_ports – add two ports.
port_names – tuple with port names.
port_types – tuple with port types.
cross_section – cross_section spec.
import gdsfactory as gf
c = gf.components.edge_coupler_silicon(length=100, width1=0.5, width2=0.2, with_two_ports=True, port_names=('o1', 'o2'), port_types=('optical', 'edge_coupler'), cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
filters#
- gdsfactory.components.filters.awg(arms: int = 10, outputs: int = 3, free_propagation_region_input_function: ComponentSpec = functools.partial(<function free_propagation_region>, inputs=1), free_propagation_region_output_function: ComponentSpec = functools.partial(<function free_propagation_region>, inputs=10, width1=10, width2=20.0), fpr_spacing: float = 50.0, arm_spacing: float = 1.0, cross_section: CrossSectionSpec = 'strip') Component [source]#
Returns a basic Arrayed Waveguide grating.
To simulate you can use dnrobin/awg-python
- Parameters:
arms – number of arms.
outputs – number of outputs.
free_propagation_region_input_function – for input.
free_propagation_region_output_function – for output.
fpr_spacing – x separation between input/output free propagation region.
arm_spacing – y separation between arms.
cross_section – cross_section function.
import gdsfactory as gf
c = gf.components.awg(arms=10, outputs=3, fpr_spacing=50, arm_spacing=1, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.filters.dbr(w1: float = 0.45, w2: float = 0.55, l1: float = 0.159, l2: float = 0.159, n: int = 10, cross_section: CrossSectionSpec = 'strip', straight_length: float = 0.01) Component [source]#
Distributed Bragg Reflector.
- Parameters:
w1 – thin width in um.
w2 – thick width in um.
l1 – thin length in um.
l2 – thick length in um.
n – number of periods.
cross_section – cross_section spec.
straight_length – length of the straight section between cutbacks.
l1 l2 <-----><--------> _________ _______| w1 w2 ... n times _______ |_________
import gdsfactory as gf
c = gf.components.dbr(w1=0.45, w2=0.55, l1=0.159, l2=0.159, n=10, cross_section='strip', straight_length=0.01).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.filters.dbr_cell(w1: float = 0.45, w2: float = 0.55, l1: float = 0.159, l2: float = 0.159, cross_section: CrossSectionSpec = 'strip') Component [source]#
Distributed Bragg Reflector unit cell.
- Parameters:
w1 – thin width in um.
l1 – thin length in um.
w2 – thick width in um.
l2 – thick length in um.
n – number of periods.
cross_section – cross_section spec.
l1 l2 <-----><--------> _________ _______| w1 w2 _______ |_________
import gdsfactory as gf
c = gf.components.dbr_cell(w1=0.45, w2=0.55, l1=0.159, l2=0.159, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.filters.dbr_tapered(length: float = 10.0, period: float = 0.85, dc: float = 0.5, w1: float = 0.4, w2: float = 1.0, taper_length: float = 20.0, fins: bool = False, fin_size: tuple[float, float] = (0.2, 0.05), cross_section: CrossSectionSpec = 'strip') Component [source]#
Distributed Bragg Reflector Cell class.
Tapers the input straight to a periodic straight structure with varying width (1-D photonic crystal).
- Parameters:
length – Length of the DBR region.
period – Period of the repeated unit.
dc – Duty cycle of the repeated unit (must be a float between 0 and 1.0).
w1 – thin section width. w1 = 0 corresponds to disconnected periodic blocks.
w2 – wide section width.
taper_length – between the input/output straight and the DBR region.
fins – If True, adds fins to the input/output straights.
fin_size – Specifies the x- and y-size of the fins. Defaults to 200 nm x 50 nm
cross_section – cross_section spec.
period <-----><--------> _________ _______| w1 w2 ... n times _______ |_________
import gdsfactory as gf
c = gf.components.dbr_tapered(length=10, period=0.85, dc=0.5, w1=0.4, w2=1, taper_length=20, fins=False, fin_size=(0.2, 0.05), cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.filters.fiber(core_diameter: float = 10, cladding_diameter: float = 125, layer_core: LayerSpec = 'WG', layer_cladding: LayerSpec = 'WGCLAD') Component [source]#
Returns a fiber.
- Parameters:
core_diameter – in um.
cladding_diameter – in um.
layer_core – layer spec for fiber core.
layer_cladding – layer spec for fiber cladding.
import gdsfactory as gf
c = gf.components.fiber(core_diameter=10, cladding_diameter=125, layer_core='WG', layer_cladding='WGCLAD').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.filters.fiber_array(n: int = 8, pitch: float = 127.0, core_diameter: float = 10, cladding_diameter: float = 125, layer_core: LayerSpec = 'WG', layer_cladding: LayerSpec = 'WGCLAD') Component [source]#
Returns a fiber array.
- Parameters:
n – number of fibers.
pitch – spacing.
core_diameter – 10um.
cladding_diameter – in um.
layer_core – layer spec for fiber core.
layer_cladding – layer spec for fiber cladding.
pitch <-> _________ | | lid | o o o o | | | base |_________| length
import gdsfactory as gf
c = gf.components.fiber_array(n=8, pitch=127, core_diameter=10, cladding_diameter=125, layer_core='WG', layer_cladding='WGCLAD').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.filters.free_propagation_region(width1: float = 2.0, width2: float = 20.0, length: float = 20.0, wg_width: float = 0.5, inputs: int = 1, outputs: int = 10, cross_section: CrossSectionSpec = 'strip') Component [source]#
Free propagation region.
- Parameters:
width1 – width of the input region.
width2 – width of the output region.
length – length of the free propagation region.
wg_width – waveguide width.
inputs – number of inputs.
outputs – number of outputs.
cross_section – cross_section function.
length <--> /| / | width1| | width2 \ | \|
import gdsfactory as gf
c = gf.components.free_propagation_region(width1=2, width2=20, length=20, wg_width=0.5, inputs=1, outputs=10, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.filters.loop_mirror(component: ComponentSpec = 'mmi1x2', bend90: ComponentSpec = 'bend_euler', cross_section: CrossSectionSpec = 'strip') Component [source]#
Returns Sagnac loop_mirror.
- Parameters:
component – 1x2 splitter.
bend90 – 90 deg bend.
cross_section – cross_section settings.
import gdsfactory as gf
c = gf.components.loop_mirror(component='mmi1x2', bend90='bend_euler', cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.filters.mode_converter(gap: float = 0.3, length: float = 10, coupler_straight_asymmetric: ComponentSpec = 'coupler_straight_asymmetric', bend: ComponentSpec = functools.partial(<function bend_s>, size=(25, 3)), taper: ComponentSpec = 'taper', mm_width: float = 1.2, mc_mm_width: float = 1, sm_width: float = 0.5, taper_length: float = 25, cross_section: CrossSectionSpec = 'strip') Component [source]#
Returns Mode converter from TE0 to TE1.
By matching the effective indices of two waveguides with different widths, light can couple from different transverse modes e.g. TE0 <-> TE1. https://doi.org/10.1109/JPHOT.2019.2941742
- Parameters:
gap – directional coupler gap.
length – coupler length interaction.
coupler_straight_asymmetric – spec.
bend – spec.
taper – spec.
mm_width – input/output multimode waveguide width.
mc_mm_width – mode converter multimode waveguide width
sm_width – single mode waveguide width.
taper_length – taper length.
cross_section – cross_section spec.
o2 --- --- o4 \ / \ / ------- o1 -----=======----- o3 |-----| length = : multimode width - : singlemode width
import gdsfactory as gf
c = gf.components.mode_converter(gap=0.3, length=10, coupler_straight_asymmetric='coupler_straight_asymmetric', taper='taper', mm_width=1.2, mc_mm_width=1, sm_width=0.5, taper_length=25, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.filters.polarization_splitter_rotator(width_taper_in: tuple[float, float, float] = (0.54, 0.69, 0.83), length_taper_in: tuple[float, float] | tuple[float, float, float] = (4.0, 44.0), width_coupler: tuple[float, float] = (0.9, 0.404), length_coupler: float = 7.0, gap: float = 0.15, width_out: float = 0.54, length_out: float = 14.33, dy: float = 5.0, cross_section: CrossSectionSpec = 'strip') Component [source]#
Returns polarization splitter rotator.
“Novel concept for ultracompact polarization splitter-rotator based on silicon nanowires.” By D. Dai, and J. E. Bowers (Optics express vol 19, no. 11 pp. 10940-10949 (2011)).
- Parameters:
width_taper_in – Three west widths of the input tapers in um.
length_taper_in – Two or three length of the bend regions in um.
width_coupler – Top and bottom widths of the coupling region in um.
length_coupler – Length of the coupling region in um.
gap – Distance between the coupler in um.
width_out – Width of the splitter region in um.
length_out – Length of the splitter region in um.
dy – Port-to-port distance between the splitter region in um.
cross_section – cross-section spec.
Notes
The length of third input taper is automatically determined if only two lengths are in arguments.
import gdsfactory as gf
c = gf.components.polarization_splitter_rotator(width_taper_in=(0.54, 0.69, 0.83), length_taper_in=(4, 44), width_coupler=(0.9, 0.404), length_coupler=7, gap=0.15, width_out=0.54, length_out=14.33, dy=5, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.filters.terminator(length: float | None = 50, cross_section_input: CrossSectionSpec = <function strip>, cross_section_tip: CrossSectionSpec | None = None, tapered_width: float = 0.2, doping_layers: LayerSpecs = ('NPP', ), doping_offset: float = 1.0) gf.Component [source]#
Returns doped taper to terminate waveguides.
- Parameters:
length – distance between input and narrow tapered end.
cross_section_input – input cross-section.
cross_section_tip – cross-section at the end of the termination.
tapered_width – width of the default cross-section at the end of the termination. Only used if cross_section_tip is not None.
doping_layers – doping layers to superimpose on the taper. Default N++.
doping_offset – offset of the doping layer beyond the bbox
import gdsfactory as gf
c = gf.components.terminator(length=50, tapered_width=0.2, doping_layers=('NPP',), doping_offset=1).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
grating_couplers#
- gdsfactory.components.grating_couplers.grating_coupler_array(grating_coupler: ComponentSpec = 'grating_coupler_elliptical', pitch: float = 127.0, n: int = 6, port_name: str = 'o1', rotation: int = -90, with_loopback: bool = False, cross_section: CrossSectionSpec = 'strip', straight_to_grating_spacing: float = 10.0, centered: bool = True, radius: float | None = None) Component [source]#
Array of grating couplers.
- Parameters:
grating_coupler – ComponentSpec.
pitch – x spacing.
n – number of grating couplers.
port_name – port name.
rotation – rotation angle for each reference.
with_loopback – if True, adds a loopback between edge GCs. Only works for rotation = 90 for now.
cross_section – cross_section for the routing.
straight_to_grating_spacing – spacing between the last grating coupler and the loopback.
centered – if True, centers the array around the origin.
radius – optional radius for routing the loopback.
import gdsfactory as gf
c = gf.components.grating_coupler_array(grating_coupler='grating_coupler_elliptical', pitch=127, n=6, port_name='o1', rotation=-90, with_loopback=False, cross_section='strip', straight_to_grating_spacing=10, centered=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.grating_couplers.grating_coupler_dual_pol(unit_cell: ComponentSpec = <function _unit_cell>, period_x: float = 0.58, period_y: float = 0.58, x_span: float = 11, y_span: float = 11, length_taper: float = 150.0, width_taper: float = 10.0, polarization: str = 'te', wavelength: float = 1.55, taper: ComponentSpec = 'taper', base_layer: LayerSpec = 'WG', cross_section: CrossSectionSpec = 'strip') Component [source]#
2 dimensional, dual polarization grating coupler.
Based on a photonic crystal with a unit cell that is usually an ellipse, a rectangle or a circle. # The default values are loosely based on Taillaert et al, # “A Compact Two-Dimensional Grating Coupler Used as a Polarization Splitter”, IEEE Phot. Techn. Lett. 15(9), 2003
- Parameters:
unit_cell – component describing the unit cell of the photonic crystal.
period_x – spacing between unit cells in the x direction [um].
period_y – spacing between unit cells in the y direction [um].
x_span – full x span of the photonic crystal.
y_span – full y span of the photonic crystal.
length_taper – taper length [um].
width_taper – width of the taper at the grating coupler side [um].
polarization – polarization of the grating coupler.
wavelength – operation wavelength [um]
taper – function to generate the tapers.
base_layer – layer to draw over the whole photonic crystal (necessary if the unit cells are etched into a base layer).
cross_section – for the routing waveguides.
side view fiber / / / / / / / / _|-|_|-|_|-|___ --> unit_cells base_layer | o1 ______________| top view ------------- // | o o o | o1 __ // | o o o | \\ | o o o | \\ | o o o | ------------- \\ // \\ // | o2
import gdsfactory as gf
c = gf.components.grating_coupler_dual_pol(period_x=0.58, period_y=0.58, x_span=11, y_span=11, length_taper=150, width_taper=10, polarization='te', wavelength=1.55, taper='taper', base_layer='WG', cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.grating_couplers.grating_coupler_elliptical(polarization: str = 'te', taper_length: float = 16.6, taper_angle: float = 40.0, wavelength: float = 1.554, fiber_angle: float = 15.0, grating_line_width: float = 0.343, neff: float = 2.638, nclad: float = 1.443, n_periods: int = 30, big_last_tooth: bool = False, layer_slab: LayerSpec | None = 'SLAB150', slab_xmin: float = -1.0, slab_offset: float = 2.0, spiked: bool = True, cross_section: CrossSectionSpec = 'strip') Component [source]#
Grating coupler with parametrization based on Lumerical FDTD simulation.
- Parameters:
polarization – te or tm.
taper_length – taper length from input.
taper_angle – grating flare angle.
wavelength – grating transmission central wavelength (um).
fiber_angle – fibre angle in degrees determines ellipticity.
grating_line_width – in um.
neff – tooth effective index.
nclad – cladding effective index.
n_periods – number of periods.
big_last_tooth – adds a big_last_tooth.
layer_slab – layer that protects the slab under the grating.
slab_xmin – where 0 is at the start of the taper.
slab_offset – in um.
spiked – grating teeth have sharp spikes to avoid non-manhattan drc errors.
cross_section – specification (CrossSection, string or dict).
fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________|
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical(polarization='te', taper_length=16.6, taper_angle=40, wavelength=1.554, fiber_angle=15, grating_line_width=0.343, neff=2.638, nclad=1.443, n_periods=30, big_last_tooth=False, layer_slab='SLAB150', slab_xmin=-1, slab_offset=2, spiked=True, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.grating_couplers.grating_coupler_elliptical_arbitrary(gaps: Floats = (0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1), widths: Floats = (0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), taper_length: float = 16.6, taper_angle: float = 60.0, wavelength: float = 1.554, fiber_angle: float = 15.0, nclad: float = 1.443, layer_slab: LayerSpec | None = 'SLAB150', layer_grating: LayerSpec | None = None, taper_to_slab_offset: float = -3.0, polarization: str = 'te', spiked: bool = True, bias_gap: float = 0, cross_section: CrossSectionSpec = 'strip') Component [source]#
Grating coupler with parametrization based on Lumerical FDTD simulation.
The ellipticity is derived from Lumerical knowledge base it depends on fiber_angle (degrees), neff, and nclad
- Parameters:
gaps – list of gaps.
widths – list of widths.
taper_length – taper length from input.
taper_angle – grating flare angle.
wavelength – grating transmission central wavelength (um).
fiber_angle – fibre angle in degrees determines ellipticity.
nclad – cladding effective index to compute ellipticity.
layer_slab – Optional slab.
layer_grating – Optional layer for grating. by default None uses cross_section.layer. if different from cross_section.layer expands taper.
taper_to_slab_offset – 0 is where taper ends.
polarization – te or tm.
spiked – grating teeth have spikes to avoid drc errors.
bias_gap – etch gap (um). Positive bias increases gap and reduces width to keep period constant.
cross_section – cross_section spec for waveguide port.
https://en.wikipedia.org/wiki/Ellipse c = (a1 ** 2 - b1 ** 2) ** 0.5 e = (1 - (b1 / a1) ** 2) ** 0.5 print(e)
fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________|
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_arbitrary(gaps=(0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1), widths=(0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), taper_length=16.6, taper_angle=60, wavelength=1.554, fiber_angle=15, nclad=1.443, layer_slab='SLAB150', taper_to_slab_offset=-3, polarization='te', spiked=True, bias_gap=0, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.grating_couplers.grating_coupler_elliptical_lumerical(parameters: Floats = (-2.4298362615732447, 0.1, 0.48007023217536954, 0.1, 0.607397685752365, 0.1, 0.4498844003086115, 0.1, 0.4274116312627637, 0.1, 0.4757904248387285, 0.1, 0.5026649898504233, 0.10002922416240886, 0.5100366774007897, 0.1, 0.494399635363353, 0.1079599958465788, 0.47400592737426483, 0.14972685326277918, 0.43272750134545823, 0.1839530796530385, 0.3872023336708212, 0.2360175325711591, 0.36032212454768675, 0.24261846353500535, 0.35770350120764394, 0.2606637836858316, 0.3526104381544335, 0.24668202254540886, 0.3717488388788273, 0.22920754299702897, 0.37769616507688464, 0.2246528336925301, 0.3765437598650894, 0.22041773376471022, 0.38047596041838994, 0.21923601658169187, 0.3798873698864591, 0.21700438236445285, 0.38291698672245644, 0.21827768053295463, 0.3641322152037017, 0.23729077006065105, 0.3676834419346081, 0.24865079519725933, 0.34415050295044936, 0.2733570818755685, 0.3306230780901629, 0.27350446437732157), layer_slab: LayerSpec | None = 'SLAB150', taper_angle: float = 55, taper_length: float = 12.6, fiber_angle: float = 5, info: dict[str, Any] | None = None, bias_gap: float = 0, cross_section: CrossSectionSpec = 'strip') Component [source]#
Returns a grating coupler from lumerical inverse design 3D optimization.
this is a wrapper of components.grating_coupler_elliptical_arbitrary https://support.lumerical.com/hc/en-us/articles/1500000306621 https://support.lumerical.com/hc/en-us/articles/360042800573
Here are the simulation settings used in lumerical
n_bg=1.44401 #Refractive index of the background material (cladding) wg=3.47668 # Refractive index of the waveguide material (core) lambda0=1550e-9 bandwidth = 0e-9 polarization = ‘TE’ wg_width=500e-9 # Waveguide width wg_height=220e-9 # Waveguide height etch_depth=80e-9 # etch depth theta_fib_mat = 5 # Angle of the fiber mode in material theta_taper=30 efficiency=0.55 # 5.2 dB
- Parameters:
parameters – xinput, gap1, width1, gap2, width2 …
layer – for waveguide.
layer_slab – for slab.
taper_angle – in deg.
taper_length – in um.
fiber_angle – used to compute ellipticity.
info – optional simulation settings.
bias_gap – gap/trenches bias (um) to compensate for etching bias.
- Keyword Arguments:
taper_length – taper length from input in um.
taper_angle – grating flare angle in degrees.
wavelength – grating transmission central wavelength (um).
fiber_angle – fibre angle in degrees determines ellipticity.
neff – tooth effective index.
nclad – cladding effective index.
polarization – te or tm.
spiked – grating teeth include sharp spikes to avoid non-manhattan drc errors.
cross_section – cross_section spec for waveguide port.
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_lumerical(parameters=(-2.43, 0.1, 0.48, 0.1, 0.607, 0.1, 0.45, 0.1, 0.427, 0.1, 0.476, 0.1, 0.503, 0.1, 0.51, 0.1, 0.494, 0.108, 0.474, 0.15, 0.433, 0.184, 0.387, 0.236, 0.36, 0.243, 0.358, 0.261, 0.353, 0.247, 0.372, 0.229, 0.378, 0.225, 0.377, 0.22, 0.38, 0.219, 0.38, 0.217, 0.383, 0.218, 0.364, 0.237, 0.368, 0.249, 0.344, 0.273, 0.331, 0.274), layer_slab='SLAB150', taper_angle=55, taper_length=12.6, fiber_angle=5, bias_gap=0, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.grating_couplers.grating_coupler_elliptical_lumerical_etch70(parameters: Floats = (-2.4298362615732447, 0.1, 0.48007023217536954, 0.1, 0.607397685752365, 0.1, 0.4498844003086115, 0.1, 0.4274116312627637, 0.1, 0.4757904248387285, 0.1, 0.5026649898504233, 0.10002922416240886, 0.5100366774007897, 0.1, 0.494399635363353, 0.1079599958465788, 0.47400592737426483, 0.14972685326277918, 0.43272750134545823, 0.1839530796530385, 0.3872023336708212, 0.2360175325711591, 0.36032212454768675, 0.24261846353500535, 0.35770350120764394, 0.2606637836858316, 0.3526104381544335, 0.24668202254540886, 0.3717488388788273, 0.22920754299702897, 0.37769616507688464, 0.2246528336925301, 0.3765437598650894, 0.22041773376471022, 0.38047596041838994, 0.21923601658169187, 0.3798873698864591, 0.21700438236445285, 0.38291698672245644, 0.21827768053295463, 0.3641322152037017, 0.23729077006065105, 0.3676834419346081, 0.24865079519725933, 0.34415050295044936, 0.2733570818755685, 0.3306230780901629, 0.27350446437732157), layer_slab: LayerSpec | None = 'SLAB150', taper_angle: float = 55, taper_length: float = 12.6, fiber_angle: float = 5, *, info: dict[str, Any] | None = {'efficiency': 0.55, 'etch_depth': 0.08, 'fiber_angle': 5, 'gap_min': 0.1, 'link': 'https://support.lumerical.com/hc/en-us/articles/1500000306621', 'width_min': 0.1}, bias_gap: float = 0, cross_section: CrossSectionSpec = 'strip') Component #
Returns a grating coupler from lumerical inverse design 3D optimization.
this is a wrapper of components.grating_coupler_elliptical_arbitrary https://support.lumerical.com/hc/en-us/articles/1500000306621 https://support.lumerical.com/hc/en-us/articles/360042800573
Here are the simulation settings used in lumerical
n_bg=1.44401 #Refractive index of the background material (cladding) wg=3.47668 # Refractive index of the waveguide material (core) lambda0=1550e-9 bandwidth = 0e-9 polarization = ‘TE’ wg_width=500e-9 # Waveguide width wg_height=220e-9 # Waveguide height etch_depth=80e-9 # etch depth theta_fib_mat = 5 # Angle of the fiber mode in material theta_taper=30 efficiency=0.55 # 5.2 dB
- Parameters:
parameters – xinput, gap1, width1, gap2, width2 …
layer – for waveguide.
layer_slab – for slab.
taper_angle – in deg.
taper_length – in um.
fiber_angle – used to compute ellipticity.
info – optional simulation settings.
bias_gap – gap/trenches bias (um) to compensate for etching bias.
- Keyword Arguments:
taper_length – taper length from input in um.
taper_angle – grating flare angle in degrees.
wavelength – grating transmission central wavelength (um).
fiber_angle – fibre angle in degrees determines ellipticity.
neff – tooth effective index.
nclad – cladding effective index.
polarization – te or tm.
spiked – grating teeth include sharp spikes to avoid non-manhattan drc errors.
cross_section – cross_section spec for waveguide port.
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_lumerical_etch70(parameters=(-2.43, 0.1, 0.48, 0.1, 0.607, 0.1, 0.45, 0.1, 0.427, 0.1, 0.476, 0.1, 0.503, 0.1, 0.51, 0.1, 0.494, 0.108, 0.474, 0.15, 0.433, 0.184, 0.387, 0.236, 0.36, 0.243, 0.358, 0.261, 0.353, 0.247, 0.372, 0.229, 0.378, 0.225, 0.377, 0.22, 0.38, 0.219, 0.38, 0.217, 0.383, 0.218, 0.364, 0.237, 0.368, 0.249, 0.344, 0.273, 0.331, 0.274), layer_slab='SLAB150', taper_angle=55, taper_length=12.6, fiber_angle=5, bias_gap=0, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.grating_couplers.grating_coupler_elliptical_trenches(polarization: str = 'te', taper_length: float = 16.6, taper_angle: float = 30.0, trenches_extra_angle: float = 9.0, wavelength: float = 1.53, fiber_angle: float = 15.0, grating_line_width: float = 0.343, neff: float = 2.638, ncladding: float = 1.443, layer_trench: LayerSpec = 'SHALLOW_ETCH', p_start: int = 26, n_periods: int = 30, end_straight_length: float = 0.2, taper: ComponentSpec = 'taper', cross_section: CrossSectionSpec = 'strip') Component [source]#
Returns Grating coupler with defined trenches.
Some foundries define the grating coupler by a shallow etch step (trenches) Others define the slab that they keep (see grating_coupler_elliptical)
- Parameters:
polarization – ‘te’ or ‘tm’.
taper_length – taper length from straight I/O.
taper_angle – grating flare angle.
trenches_extra_angle – extra angle for the trenches.
wavelength – grating transmission central wavelength.
fiber_angle – fibre polish angle in degrees.
grating_line_width – of the 220 ridge.
neff – tooth effective index.
ncladding – cladding index.
layer_trench – for the trench.
p_start – first tooth.
n_periods – number of grating teeth.
end_straight_length – at the end of straight.
taper – taper function.
cross_section – cross_section spec.
fiber / / / / / / / / _|-|_|-|_|-|___ WG o1 ______________|
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_trenches(polarization='te', taper_length=16.6, taper_angle=30, trenches_extra_angle=9, wavelength=1.53, fiber_angle=15, grating_line_width=0.343, neff=2.638, ncladding=1.443, layer_trench='SHALLOW_ETCH', p_start=26, n_periods=30, end_straight_length=0.2, taper='taper', cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.grating_couplers.grating_coupler_elliptical_uniform(n_periods: int = 20, period: float = 0.75, fill_factor: float = 0.5, **kwargs: Any) Component [source]#
Grating coupler with parametrization based on Lumerical FDTD simulation.
The ellipticity is derived from Lumerical knowledge base it depends on fiber_angle (degrees), neff, and nclad
- Parameters:
n_periods – number of grating periods.
period – grating pitch in um.
fill_factor – ratio of grating width vs gap.
- Keyword Arguments:
taper_length – taper length from input.
taper_angle – grating flare angle.
wavelength – grating transmission central wavelength (um).
fiber_angle – fibre angle in degrees determines ellipticity.
neff – tooth effective index to compute ellipticity.
nclad – cladding effective index to compute ellipticity.
layer_slab – Optional slab.
taper_to_slab_offset – where 0 is at the start of the taper.
polarization – te or tm.
spiked – grating teeth have spikes to avoid drc errors..
bias_gap – etch gap (um). Positive bias increases gap and reduces width to keep period constant.
cross_section – cross_section spec for waveguide port.
kwargs – cross_section settings.
fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________|
import gdsfactory as gf
c = gf.components.grating_coupler_elliptical_uniform(n_periods=20, period=0.75, fill_factor=0.5).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.grating_couplers.grating_coupler_loss(pitch: float = 127.0, grating_coupler: ComponentSpec = 'grating_coupler_elliptical_trenches', cross_section: CrossSectionSpec = 'strip', port_name: str = 'o1', rotation: float = -90, nfibers: int = 10) Component [source]#
Grating coupler test structure for de-embeding fiber array.
Connects channel 1->3, 1->5 … 1->nfibers with grating couplers.
Only odd channels are connected to the grating couplers as even channels in the align_tree.
- Parameters:
pitch – um.
grating_coupler – spec.
cross_section – spec.
port_name – for the grating_coupler port.
rotation – degrees.
nfibers – number of fibers to connect.
import gdsfactory as gf
c = gf.components.grating_coupler_loss(pitch=127, grating_coupler='grating_coupler_elliptical_trenches', cross_section='strip', port_name='o1', rotation=-90, nfibers=10).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.grating_couplers.grating_coupler_rectangular(n_periods: int = 20, period: float = 0.75, fill_factor: float = 0.5, width_grating: float = 11.0, length_taper: float = 150.0, polarization: str = 'te', wavelength: float = 1.55, taper: ComponentSpec = 'taper', layer_slab: LayerSpec | None = 'SLAB150', layer_grating: LayerSpec | None = None, fiber_angle: float = 15, slab_xmin: float = -1.0, slab_offset: float = 1.0, cross_section: CrossSectionSpec = 'strip') Component [source]#
Grating coupler with rectangular shapes (not elliptical).
Needs longer taper than elliptical. Grating teeth are straight. For a focusing grating take a look at grating_coupler_elliptical.
- Parameters:
n_periods – number of grating teeth.
period – grating pitch.
fill_factor – ratio of grating width vs gap.
width_grating –
length_taper –
polarization – ‘te’ or ‘tm’.
wavelength – in um.
taper – function.
layer_slab – layer that protects the slab under the grating.
layer_grating – layer for the grating.
fiber_angle – in degrees.
slab_xmin – where 0 is at the start of the taper.
slab_offset – from edge of grating to edge of the slab.
cross_section – for input waveguide port.
side view fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________| top view _________ /| | | | | / | | | | | /taper_angle /_ _| | | | | wg_width | | | | | | \ | | | | | \ | | | | | \ | | | | | \|_|_|_|_| <--> taper_length
import gdsfactory as gf
c = gf.components.grating_coupler_rectangular(n_periods=20, period=0.75, fill_factor=0.5, width_grating=11, length_taper=150, polarization='te', wavelength=1.55, taper='taper', layer_slab='SLAB150', fiber_angle=15, slab_xmin=-1, slab_offset=1, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.grating_couplers.grating_coupler_rectangular_arbitrary(gaps: Floats = (0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2), widths: Floats = (0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), width_grating: float = 11.0, length_taper: float = 150.0, polarization: str = 'te', wavelength: float = 1.55, layer_grating: LayerSpec | None = None, layer_slab: LayerSpec | None = None, slab_xmin: float = -1.0, slab_offset: float = 1.0, fiber_angle: float = 15, cross_section: CrossSectionSpec = 'strip') Component [source]#
Grating coupler uniform with rectangular shape (not elliptical).
Therefore it needs a longer taper. Grating teeth are straight instead of elliptical.
- Parameters:
gaps – list of gaps between grating teeth.
widths – list of grating widths.
width_grating – grating teeth width.
length_taper – taper length (um).
polarization – ‘te’ or ‘tm’.
wavelength – in um.
layer_grating – Optional layer for grating. by default None uses cross_section.layer. if different from cross_section.layer expands taper.
layer_slab – layer that protects the slab under the grating.
slab_xmin – where 0 is at the start of the taper.
slab_offset – from edge of grating to edge of the slab.
fiber_angle – in degrees.
cross_section – for input waveguide port.
fiber / / / / / / / / _|-|_|-|_|-|___ layer layer_slab | o1 ______________| top view _________ /| | | | | / | | | | | /taper_angle /_ _| | | | | wg_width | | | | | | \ | | | | | \ | | | | | \ | | | | | \|_|_|_|_| <--> taper_length
import gdsfactory as gf
c = gf.components.grating_coupler_rectangular_arbitrary(gaps=(0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2), widths=(0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5), width_grating=11, length_taper=150, polarization='te', wavelength=1.55, slab_xmin=-1, slab_offset=1, fiber_angle=15, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.grating_couplers.grating_coupler_tree(n: int = 4, straight_spacing: float = 4.0, grating_coupler: ComponentSpec = 'grating_coupler_elliptical_te', with_loopback: bool = False, bend: ComponentSpec = 'bend_euler', fanout_length: float = 0.0, cross_section: CrossSectionSpec = 'strip', **kwargs: Any) Component [source]#
Array of straights connected with grating couplers.
useful to align the 4 corners of the chip
- Parameters:
n – number of gratings.
straight_spacing – in um.
grating_coupler – spec.
with_loopback – adds loopback.
bend – bend spec.
fanout_length – in um.
cross_section – cross_section function.
kwargs – additional arguments.
import gdsfactory as gf
c = gf.components.grating_coupler_tree(n=4, straight_spacing=4, grating_coupler='grating_coupler_elliptical_te', with_loopback=False, bend='bend_euler', fanout_length=0, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
mmis#
- gdsfactory.components.mmis.mmi(inputs: int = 1, outputs: int = 4, width: float | None = None, width_taper: float = 1.0, length_taper: float = 10.0, length_mmi: float = 5.5, width_mmi: float = 5, gap_input_tapers: float = 0.25, gap_output_tapers: float = 0.25, taper: ComponentSpec = 'taper', straight: ComponentSpec = 'straight', cross_section: CrossSectionSpec = 'strip', input_positions: list[float] | None = None, output_positions: list[float] | None = None) Component [source]#
Mxn MultiMode Interferometer (MMI).
- Parameters:
inputs – number of inputs.
outputs – number of outputs.
width – input and output straight width. Defaults to cross_section.
width_taper – interface between input straights and mmi region.
length_taper – into the mmi region.
length_mmi – in x direction.
width_mmi – in y direction.
gap_input_tapers – gap between input tapers from edge to edge.
gap_output_tapers – gap between output tapers from edge to edge.
taper – taper function.
straight – straight function.
cross_section – specification (CrossSection, string or dict).
input_positions – optional positions of the inputs.
output_positions – optional positions of the outputs.
length_mmi <------> ________ | | __/ \__ o2 __ __ o3 \ /_ _ _ _ | | _ _ _ _| gap_output_tapers __/ \__ o1 __ __ o4 \ / |________| | | <-> length_taper
import gdsfactory as gf
c = gf.components.mmi(inputs=1, outputs=4, width_taper=1, length_taper=10, length_mmi=5.5, width_mmi=5, gap_input_tapers=0.25, gap_output_tapers=0.25, taper='taper', straight='straight', cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mmis.mmi1x2(width: float | None = None, width_taper: float = 1.0, length_taper: float = 10.0, length_mmi: float = 5.5, width_mmi: float = 2.5, gap_mmi: float = 0.25, taper: ComponentSpec = <function taper>, straight: ComponentSpec = <function straight>, cross_section: CrossSectionSpec = 'strip') Component [source]#
1x2 MultiMode Interferometer (MMI).
- Parameters:
width – input and output straight width. Defaults to cross_section width.
width_taper – interface between input straights and mmi region.
length_taper – into the mmi region.
length_mmi – in x direction.
width_mmi – in y direction.
gap_mmi – gap between tapered wg.
taper – taper function.
straight – straight function.
cross_section – specification (CrossSection, string or dict).
length_mmi <------> ________ | | | \__ | __ o2 __/ /_ _ _ _ o1 __ | _ _ _ _| gap_mmi \ \__ | __ o3 | / |________| <-> length_taper
import gdsfactory as gf
c = gf.components.mmi1x2(width_taper=1, length_taper=10, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mmis.mmi1x2_with_sbend(with_sbend: bool = True, s_bend: ~collections.abc.Callable[[...], ~gdsfactory.component.Component] = <function bend_s>, cross_section: ~gdsfactory.cross_section.CrossSection | str | dict[str, ~typing.Any] | ~collections.abc.Callable[[...], ~gdsfactory.cross_section.CrossSection] | ~kfactory.cross_section.SymmetricalCrossSection = 'strip') Component [source]#
Returns 1x2 splitter for Cband.
https://opg.optica.org/oe/fulltext.cfm?uri=oe-21-1-1310&id=248418
- Parameters:
with_sbend – add sbend.
s_bend – S-bend spec.
cross_section – spec.
import gdsfactory as gf
c = gf.components.mmi1x2_with_sbend(with_sbend=True, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mmis.mmi2x2(width: float | None = None, width_taper: float = 1.0, length_taper: float = 10.0, length_mmi: float = 5.5, width_mmi: float = 2.5, gap_mmi: float = 0.25, taper: ComponentSpec = <function taper>, straight: ComponentSpec = <function straight>, cross_section: CrossSectionSpec = 'strip') Component [source]#
Mmi 2x2.
- Parameters:
width – input and output straight width.
width_taper – interface between input straights and mmi region.
length_taper – into the mmi region.
length_mmi – in x direction.
width_mmi – in y direction.
gap_mmi – (width_taper + gap between tapered wg)/2.
taper – taper function.
straight – straight function.
cross_section – spec.
length_mmi <------> ________ | | __/ \__ o2 __ __ o3 \ /_ _ _ _ | | _ _ _ _| gap_mmi __/ \__ o1 __ __ o4 \ / |________| <-> length_taper
import gdsfactory as gf
c = gf.components.mmi2x2(width_taper=1, length_taper=10, length_mmi=5.5, width_mmi=2.5, gap_mmi=0.25, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mmis.mmi2x2_with_sbend(with_sbend: bool = True, s_bend: ~collections.abc.Callable[[...], ~gdsfactory.component.Component] = <function bend_s>, cross_section: ~gdsfactory.cross_section.CrossSection | str | dict[str, ~typing.Any] | ~collections.abc.Callable[[...], ~gdsfactory.cross_section.CrossSection] | ~kfactory.cross_section.SymmetricalCrossSection = 'strip') Component [source]#
Returns mmi2x2 for Cband.
C_band 2x2MMI in 220nm thick silicon https://opg.optica.org/oe/fulltext.cfm?uri=oe-25-23-28957&id=376719
- Parameters:
with_sbend – add sbend.
s_bend – S-bend function.
cross_section – spec.
import gdsfactory as gf
c = gf.components.mmi2x2_with_sbend(with_sbend=True, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mmis.mmi_90degree_hybrid(width: float = 0.5, width_taper: float = 1.7, length_taper: float = 40.0, length_mmi: float = 175.0, width_mmi: float = 10.0, gap_mmi: float = 0.8, straight: ComponentSpec = 'straight', cross_section: CrossSectionSpec = 'strip') Component [source]#
90 degree hybrid based on a 4x4 MMI.
Default values from Watanabe et al., “Coherent few mode demultiplexer realized as a 2D grating coupler array in silicon”, Optics Express 28(24), 2020
It could be interesting to consider the design in Guan et al., “Compact and low loss 90° optical hybrid on a silicon-on-insulator platform”, Optics Express 25(23), 2017
- Parameters:
width – input and output straight width.
width_taper – interface between input straights and mmi region.
length_taper – into the mmi region.
length_mmi – in x direction.
width_mmi – in y direction.
gap_mmi – (width_taper + gap between tapered wg)/2.
straight – straight function.
with_bbox – box in bbox_layers and bbox_offsets avoid DRC sharp edges.
cross_section – spec.
length_mmi <------> ________ | | __/ \__ signal_in __ __ I_out1 \ /_ _ _ _ | | _ _ _ _| gap_mmi | \__ | __ Q_out1 | / | | | __/ \__ LO_in __ __ Q_out2 \ /_ _ _ _ | | _ _ _ _| gap_mmi | \__ | __ I_out2 | / | ________| <-> length_taper
import gdsfactory as gf
c = gf.components.mmi_90degree_hybrid(width=0.5, width_taper=1.7, length_taper=40, length_mmi=175, width_mmi=10, gap_mmi=0.8, straight='straight', cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mmis.mmi_tapered(inputs: int = 1, outputs: int = 2, width: float | None = None, width_taper_in: float = 2.0, length_taper_in: float = 1.0, width_taper_out: float | None = None, length_taper_out: float | None = None, width_taper: float = 1.0, length_taper: float = 10.0, length_mmi: float = 5.5, width_mmi: float = 5, width_mmi_inner: float | None = None, gap_input_tapers: float = 0.25, gap_output_tapers: float = 0.25, taper: ComponentFactory = <function taper>, cross_section: CrossSectionSpec = 'strip', input_positions: list[float] | None = None, output_positions: list[float] | None = None) Component [source]#
Mxn MultiMode Interferometer (MMI).
This is jut a more general version of the mmi component. Make sure you simulate and optimize the component before using it.
- Parameters:
inputs – number of inputs.
outputs – number of outputs.
width – input and output straight width. Defaults to cross_section.
width_taper_in – interface between input straights and mmi region.
length_taper_in – into the mmi region.
width_taper_out – interface between mmi region and output straights.
length_taper_out – into the mmi region.
width_taper – interface between mmi region and output straights.
length_taper – into the mmi region.
length_mmi – in x direction.
width_mmi – in y direction.
width_mmi_inner – allows adding a different width for the inner mmi region.
gap_input_tapers – gap between input tapers from edge to edge.
gap_output_tapers – gap between output tapers from edge to edge.
taper – taper function.
cross_section – specification (CrossSection, string or dict).
input_positions – optional positions of the inputs.
output_positions – optional positions of the outputs.
◄──────────────────► ┌───────────────────────────────────────────┐ │ ├───────────────────┐ │ │ ├─────────────┐ │ │ │ │ │ │ │ │ width_taper │ │ │ │ ▲ ┌────────────────┤ │ ├─────────────┘ │ │ │ ├───────────────────┘ ┌───────────┼─┤ │ │ │ │ │◄──────────────►│ │ ◄───────────┼─► │ ├───────────────────┐ └───────────┼─┐ │ │ ├──────────────┐ length_taper│ │ │ │ │ │ ▼ └────────────────┤ │ │ │ │ │ │ │ ◄───────────────►│ │ ├──────────────┘ length_taper_in│ ├───────────────────┘ └───────────────────────────────────────────┘ length_taper_out length_taper ◄───────────────────────────────────────────► length_mmi
import gdsfactory as gf
c = gf.components.mmi_tapered(inputs=1, outputs=2, width_taper_in=2, length_taper_in=1, width_taper=1, length_taper=10, length_mmi=5.5, width_mmi=5, gap_input_tapers=0.25, gap_output_tapers=0.25, cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
mzis#
- gdsfactory.components.mzis.mzi(delta_length: float = 10.0, length_y: float = 2.0, length_x: float | None = 0.1, bend: ComponentSpec = 'bend_euler', straight: ComponentSpec = 'straight', straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = None, straight_x_bot: ComponentSpec | None = None, splitter: ComponentSpec = 'mmi1x2', combiner: ComponentSpec | None = None, with_splitter: bool = True, port_e1_splitter: str = 'o2', port_e0_splitter: str = 'o3', port_e1_combiner: str = 'o2', port_e0_combiner: str = 'o3', port1: str = 'o1', port2: str = 'o2', nbends: int = 2, cross_section: CrossSectionSpec = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) Component [source]#
Mzi.
- Parameters:
delta_length – bottom arm vertical extra length.
length_y – vertical length for both and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
splitter – splitter function.
combiner – combiner function.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
port1 – input port name.
port2 – output port name.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
cross_section_x_top – optional top cross_section (defaults to cross_section).
cross_section_x_bot – optional bottom cross_section (defaults to cross_section).
mirror_bot – if true, mirrors the bottom arm.
add_optical_ports_arms – add all other optical ports in the arms with top_ and bot_ prefix.
min_length – minimum length for the straight.
auto_rename_ports – if True, renames ports.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi(delta_length=10, length_y=2, length_x=0.1, bend='bend_euler', straight='straight', splitter='mmi1x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o2', port_e0_combiner='o3', port1='o1', port2='o2', nbends=2, cross_section='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mzis.mzi1x2_2x2(delta_length: float = 10.0, length_y: float = 2.0, length_x: float | None = 0.1, bend: ComponentSpec = 'bend_euler', straight: ComponentSpec = 'straight', straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = None, straight_x_bot: ComponentSpec | None = None, splitter: ComponentSpec = 'mmi1x2', *, combiner: ComponentSpec | None = 'mmi2x2', with_splitter: bool = True, port_e1_splitter: str = 'o2', port_e0_splitter: str = 'o3', port_e1_combiner: str = 'o3', port_e0_combiner: str = 'o4', port1: str = 'o1', port2: str = 'o2', nbends: int = 2, cross_section: CrossSectionSpec = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) Component #
Mzi.
- Parameters:
delta_length – bottom arm vertical extra length.
length_y – vertical length for both and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
splitter – splitter function.
combiner – combiner function.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
port1 – input port name.
port2 – output port name.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
cross_section_x_top – optional top cross_section (defaults to cross_section).
cross_section_x_bot – optional bottom cross_section (defaults to cross_section).
mirror_bot – if true, mirrors the bottom arm.
add_optical_ports_arms – add all other optical ports in the arms with top_ and bot_ prefix.
min_length – minimum length for the straight.
auto_rename_ports – if True, renames ports.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi1x2_2x2(delta_length=10, length_y=2, length_x=0.1, bend='bend_euler', straight='straight', splitter='mmi1x2', combiner='mmi2x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o3', port_e0_combiner='o4', port1='o1', port2='o2', nbends=2, cross_section='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mzis.mzi2x2_2x2_phase_shifter(delta_length: float = 10.0, length_y: float = 2.0, *, length_x: float | None = 200, bend: ComponentSpec = 'bend_euler', straight: ComponentSpec = 'straight', straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = 'straight_heater_metal', straight_x_bot: ComponentSpec | None = None, splitter: ComponentSpec = 'mmi2x2', combiner: ComponentSpec | None = 'mmi2x2', with_splitter: bool = True, port_e1_splitter: str = 'o3', port_e0_splitter: str = 'o4', port_e1_combiner: str = 'o3', port_e0_combiner: str = 'o4', port1: str = 'o1', port2: str = 'o2', nbends: int = 2, cross_section: CrossSectionSpec = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) Component #
Mzi.
- Parameters:
delta_length – bottom arm vertical extra length.
length_y – vertical length for both and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
splitter – splitter function.
combiner – combiner function.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
port1 – input port name.
port2 – output port name.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
cross_section_x_top – optional top cross_section (defaults to cross_section).
cross_section_x_bot – optional bottom cross_section (defaults to cross_section).
mirror_bot – if true, mirrors the bottom arm.
add_optical_ports_arms – add all other optical ports in the arms with top_ and bot_ prefix.
min_length – minimum length for the straight.
auto_rename_ports – if True, renames ports.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi2x2_2x2_phase_shifter(delta_length=10, length_y=2, length_x=200, bend='bend_euler', straight='straight', straight_x_top='straight_heater_metal', splitter='mmi2x2', combiner='mmi2x2', with_splitter=True, port_e1_splitter='o3', port_e0_splitter='o4', port_e1_combiner='o3', port_e0_combiner='o4', port1='o1', port2='o2', nbends=2, cross_section='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mzis.mzi_lattice(coupler_lengths: Sequence[float] = (10.0, 20.0), coupler_gaps: Sequence[float] = (0.2, 0.3), delta_lengths: Sequence[float] = (10.0,), mzi: str = 'mzi_coupler', splitter: str = 'coupler', **kwargs: Any) Component [source]#
Mzi lattice filter.
- Parameters:
coupler_lengths – list of length for each coupler.
coupler_gaps – list of coupler gaps.
delta_lengths – list of length differences.
mzi – function for the mzi.
splitter – splitter function.
kwargs – additional settings.
- Keyword Arguments:
length_y – vertical length for both and top arms.
length_x – horizontal length.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
cross_section – for routing (sxtop/sxbot to combiner).
______ ______ | | | | | | | | cp1==| |===cp2=====| |=== .... ===cp_last=== | | | | | | | | DL1 | DL2 | | | | | |______| | | |______|
import gdsfactory as gf
c = gf.components.mzi_lattice(coupler_lengths=(10, 20), coupler_gaps=(0.2, 0.3), delta_lengths=(10,), mzi='mzi_coupler', splitter='coupler').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mzis.mzi_lattice_mmi(coupler_widths: tuple[float | None, float | None] = (None, None), coupler_widths_tapers: tuple[float, ...] = (1.0, 1.0), coupler_lengths_tapers: tuple[float, ...] = (10.0, 10.0), coupler_lengths_mmis: tuple[float, ...] = (5.5, 5.5), coupler_widths_mmis: tuple[float, ...] = (2.5, 2.5), coupler_gaps_mmis: tuple[float, ...] = (0.25, 0.25), taper_functions_mmis: tuple[str, ...] = ('taper', 'taper'), straight_functions_mmis: tuple[str, ...] = ('straight', 'straight'), cross_sections_mmis: tuple[str, ...] = ('strip', 'strip'), delta_lengths: tuple[float, ...] = (10.0,), mzi: str = 'mzi2x2_2x2', splitter: str = 'mmi2x2', **kwargs: Any) Component [source]#
Mzi lattice filter, with MMI couplers.
- Parameters:
coupler_widths – (for each MMI coupler, list of) input and output straight width.
coupler_widths_tapers – (for each MMI coupler, list of) interface between input straights and mmi region.
coupler_lengths_tapers – (for each MMI coupler, list of) into the mmi region.
coupler_lengths_mmis – (for each MMI coupler, list of) in x direction.
coupler_widths_mmis – (for each MMI coupler, list of) in y direction.
coupler_gaps_mmis – (for each MMI coupler, list of) (width_taper + gap between tapered wg)/2.
taper_functions_mmis – (for each MMI coupler, list of) taper function.
straight_functions_mmis – (for each MMI coupler, list of) straight function.
cross_sections_mmis – (for each MMI coupler, list of) spec.
delta_lengths – list of length differences.
mzi – function for the mzi.
splitter – splitter function.
kwargs – additional settings.
- Keyword Arguments:
length_y – vertical length for both and top arms.
length_x – horizontal length.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
cross_section – for routing (sxtop/sxbot to combiner).
______ ______ | | | | | | | | cp1==| |===cp2=====| |=== .... ===cp_last=== | | | | | | | | DL1 | DL2 | | | | | |______| | | |______|
import gdsfactory as gf
c = gf.components.mzi_lattice_mmi(coupler_widths=(None, None), coupler_widths_tapers=(1, 1), coupler_lengths_tapers=(10, 10), coupler_lengths_mmis=(5.5, 5.5), coupler_widths_mmis=(2.5, 2.5), coupler_gaps_mmis=(0.25, 0.25), taper_functions_mmis=('taper', 'taper'), straight_functions_mmis=('straight', 'straight'), cross_sections_mmis=('strip', 'strip'), delta_lengths=(10,), mzi='mzi2x2_2x2', splitter='mmi2x2').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mzis.mzi_pads_center(ps_top: ComponentSpec = 'straight_heater_metal', ps_bot: ComponentSpec = 'straight_heater_metal', mzi: ComponentSpec = 'mzi', pad: ComponentSpec = 'pad_small', length_x: float = 500, length_y: float = 40, mzi_sig_top: str | None = 'top_r_e2', mzi_gnd_top: str | None = 'top_l_e2', mzi_sig_bot: str | None = 'bot_l_e2', mzi_gnd_bot: str | None = 'bot_r_e2', pad_sig_bot: str = 'e1_1_1', pad_sig_top: str = 'e3_1_3', pad_gnd_bot: str = 'e4_1_2', pad_gnd_top: str = 'e2_1_2', delta_length: float = 40.0, cross_section: CrossSectionSpec = 'strip', cross_section_metal: CrossSectionSpec = 'metal_routing', pad_pitch: float | str = 'pad_pitch', **kwargs: Any) Component [source]#
Return Mzi phase shifter with pads in the middle.
GND is the middle pad and is shared between top and bottom phase shifters.
- Parameters:
ps_top – phase shifter top.
ps_bot – phase shifter bottom.
mzi – interferometer.
pad – pad function.
length_x – horizontal length.
length_y – vertical length.
mzi_sig_top – port name for top phase shifter signal. None if no connection.
mzi_gnd_top – port name for top phase shifter GND. None if no connection.
mzi_sig_bot – port name for top phase shifter signal. None if no connection.
mzi_gnd_bot – port name for top phase shifter GND. None if no connection.
pad_sig_bot – port name for top pad.
pad_sig_top – port name for top pad.
pad_gnd_bot – port name for top pad.
pad_gnd_top – port name for top pad.
delta_length – mzi length imbalance.
cross_section – for the mzi.
cross_section_metal – for routing metal.
pad_pitch – pad pitch in um.
kwargs – routing settings.
import gdsfactory as gf
c = gf.components.mzi_pads_center(ps_top='straight_heater_metal', ps_bot='straight_heater_metal', mzi='mzi', pad='pad_small', length_x=500, length_y=40, mzi_sig_top='top_r_e2', mzi_gnd_top='top_l_e2', mzi_sig_bot='bot_l_e2', mzi_gnd_bot='bot_r_e2', pad_sig_bot='e1_1_1', pad_sig_top='e3_1_3', pad_gnd_bot='e4_1_2', pad_gnd_top='e2_1_2', delta_length=40, cross_section='strip', cross_section_metal='metal_routing', pad_pitch='pad_pitch').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mzis.mzi_phase_shifter(delta_length: float = 10.0, length_y: float = 2.0, *, length_x: float | None = 200, bend: ComponentSpec = 'bend_euler', straight: ComponentSpec = 'straight', straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = 'straight_heater_metal', straight_x_bot: ComponentSpec | None = None, splitter: ComponentSpec = 'mmi1x2', combiner: ComponentSpec | None = None, with_splitter: bool = True, port_e1_splitter: str = 'o2', port_e0_splitter: str = 'o3', port_e1_combiner: str = 'o2', port_e0_combiner: str = 'o3', port1: str = 'o1', port2: str = 'o2', nbends: int = 2, cross_section: CrossSectionSpec = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) Component #
Mzi.
- Parameters:
delta_length – bottom arm vertical extra length.
length_y – vertical length for both and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
splitter – splitter function.
combiner – combiner function.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
port1 – input port name.
port2 – output port name.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
cross_section_x_top – optional top cross_section (defaults to cross_section).
cross_section_x_bot – optional bottom cross_section (defaults to cross_section).
mirror_bot – if true, mirrors the bottom arm.
add_optical_ports_arms – add all other optical ports in the arms with top_ and bot_ prefix.
min_length – minimum length for the straight.
auto_rename_ports – if True, renames ports.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi_phase_shifter(delta_length=10, length_y=2, length_x=200, bend='bend_euler', straight='straight', 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', port1='o1', port2='o2', nbends=2, cross_section='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mzis.mzi_phase_shifter_top_heater_metal(delta_length: float = 10.0, length_y: float = 2.0, *, length_x: float | None = 200, bend: ComponentSpec = 'bend_euler', straight: ComponentSpec = 'straight', straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = 'straight_heater_metal', straight_x_bot: ComponentSpec | None = None, splitter: ComponentSpec = 'mmi1x2', combiner: ComponentSpec | None = None, with_splitter: bool = True, port_e1_splitter: str = 'o2', port_e0_splitter: str = 'o3', port_e1_combiner: str = 'o2', port_e0_combiner: str = 'o3', port1: str = 'o1', port2: str = 'o2', nbends: int = 2, cross_section: CrossSectionSpec = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) Component #
Mzi.
- Parameters:
delta_length – bottom arm vertical extra length.
length_y – vertical length for both and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
splitter – splitter function.
combiner – combiner function.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
port1 – input port name.
port2 – output port name.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
cross_section_x_top – optional top cross_section (defaults to cross_section).
cross_section_x_bot – optional bottom cross_section (defaults to cross_section).
mirror_bot – if true, mirrors the bottom arm.
add_optical_ports_arms – add all other optical ports in the arms with top_ and bot_ prefix.
min_length – minimum length for the straight.
auto_rename_ports – if True, renames ports.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi_phase_shifter_top_heater_metal(delta_length=10, length_y=2, length_x=200, bend='bend_euler', straight='straight', 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', port1='o1', port2='o2', nbends=2, cross_section='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mzis.mzi_pin(*, delta_length: float = 0.0, length_y: float = 2.0, length_x: float | None = 100, bend: ComponentSpec = 'bend_euler', straight: ComponentSpec = 'straight', straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = 'straight_pin', straight_x_bot: ComponentSpec | None = None, splitter: ComponentSpec = 'mmi1x2', combiner: ComponentSpec | None = None, with_splitter: bool = True, port_e1_splitter: str = 'o2', port_e0_splitter: str = 'o3', port_e1_combiner: str = 'o2', port_e0_combiner: str = 'o3', port1: str = 'o1', port2: str = 'o2', nbends: int = 2, cross_section: CrossSectionSpec = 'strip', cross_section_x_top: CrossSectionSpec | None = 'pin', cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) Component #
Mzi.
- Parameters:
delta_length – bottom arm vertical extra length.
length_y – vertical length for both and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
splitter – splitter function.
combiner – combiner function.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
port1 – input port name.
port2 – output port name.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
cross_section_x_top – optional top cross_section (defaults to cross_section).
cross_section_x_bot – optional bottom cross_section (defaults to cross_section).
mirror_bot – if true, mirrors the bottom arm.
add_optical_ports_arms – add all other optical ports in the arms with top_ and bot_ prefix.
min_length – minimum length for the straight.
auto_rename_ports – if True, renames ports.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzi_pin(delta_length=0, length_y=2, length_x=100, bend='bend_euler', straight='straight', straight_x_top='straight_pin', splitter='mmi1x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o2', port_e0_combiner='o3', port1='o1', port2='o2', nbends=2, cross_section='strip', cross_section_x_top='pin', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mzis.mzit(w0: float = 0.5, w1: float = 0.45, w2: float = 0.55, dy: Delta = 2.0, delta_length: float = 10.0, length: float = 1.0, coupler_length1: float = 5.0, coupler_length2: float = 10.0, coupler_gap1: float = 0.2, coupler_gap2: float = 0.3, taper: ComponentSpec = 'taper', taper_length: float = 5.0, bend90: ComponentSpec = 'bend_euler', straight: ComponentSpec = 'straight', coupler1: ComponentSpec | None = 'coupler', coupler2: ComponentSpec = 'coupler', cross_section: str = 'strip') Component [source]#
Mzi tolerant to fabrication variations.
based on Yufei Xing thesis http://photonics.intec.ugent.be/publications/PhD.asp?ID=250
- Parameters:
w0 – input waveguide width (um).
w1 – narrow waveguide width (um).
w2 – wide waveguide width (um).
dy – port to port vertical spacing.
delta_length – length difference between arms (um).
length – shared length for w1 and w2.
coupler_length1 – length of coupler1.
coupler_length2 – length of coupler2.
coupler_gap1 – coupler1.
coupler_gap2 – coupler2.
taper – taper spec.
taper_length – from w0 to w1.
bend90 – bend spec.
straight – spec.
coupler1 – coupler1 spec (optional).
coupler2 – coupler2 spec.
cross_section – cross_section spec.
cp1 4 2 __ __ 3___w0_t2 _w2___ \ / \ \ length1 / | ============== gap1 | / \ | __/ \_____w0___t1 _w1 | 3 1 4 \ | | | 2 2 | | __ __w0____t1____w1___/ | \ / | \ length2 / | ============== gap2 | / \ | | __/ \ E0_w0__t2 __w1______/ 1 1 cp2
import gdsfactory as gf
c = gf.components.mzit(w0=0.5, w1=0.45, w2=0.55, dy=2, delta_length=10, length=1, coupler_length1=5, coupler_length2=10, coupler_gap1=0.2, coupler_gap2=0.3, taper='taper', taper_length=5, bend90='bend_euler', straight='straight', coupler1='coupler', coupler2='coupler', cross_section='strip').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mzis.mzit_lattice(coupler_lengths: ~collections.abc.Sequence[float] = (10.0, 20.0), coupler_gaps: ~collections.abc.Sequence[float] = (0.2, 0.3), delta_lengths: ~collections.abc.Sequence[float] = (10.0, ), mzi: ComponentSpec = <function mzit>) Component [source]#
Mzi fab tolerant lattice filter.
cp1 o4 o2 __ __ o3___w0_t2 _w2___ \ / \ \ length1 / | ============== gap1 | / \ | __/ \_____w0___t1 _w1 | o3 o1 o4 \ | . ... | | . o2 o2 o3 | | . __ _____w0___t1___w1__/ | \ / | \ lengthN / | ============== gapN | / \ | __/ \_ | o1 o1 \___w0___t2___w1_____/ cpN o4
import gdsfactory as gf
c = gf.components.mzit_lattice(coupler_lengths=(10, 20), coupler_gaps=(0.2, 0.3), delta_lengths=(10,)).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.mzis.mzm(delta_length: float = 10.0, length_y: float = 2.0, *, length_x: float | None = 200, bend: ComponentSpec = 'bend_euler', straight: ComponentSpec = 'straight', straight_y: ComponentSpec | None = None, straight_x_top: ComponentSpec | None = 'straight_pin', straight_x_bot: ComponentSpec | None = 'straight_pin', splitter: ComponentSpec = 'mmi1x2', combiner: ComponentSpec | None = None, with_splitter: bool = True, port_e1_splitter: str = 'o2', port_e0_splitter: str = 'o3', port_e1_combiner: str = 'o2', port_e0_combiner: str = 'o3', port1: str = 'o1', port2: str = 'o2', nbends: int = 2, cross_section: CrossSectionSpec = 'strip', cross_section_x_top: CrossSectionSpec | None = None, cross_section_x_bot: CrossSectionSpec | None = None, mirror_bot: bool = False, add_optical_ports_arms: bool = False, min_length: float = 0.01, auto_rename_ports: bool = True) Component #
Mzi.
- Parameters:
delta_length – bottom arm vertical extra length.
length_y – vertical length for both and top arms.
length_x – horizontal length. None uses to the straight_x_bot/top defaults.
bend – 90 degrees bend library.
straight – straight function.
straight_y – straight for length_y and delta_length.
straight_x_top – top straight for length_x.
straight_x_bot – bottom straight for length_x.
splitter – splitter function.
combiner – combiner function.
with_splitter – if False removes splitter.
port_e1_splitter – east top splitter port.
port_e0_splitter – east bot splitter port.
port_e1_combiner – east top combiner port.
port_e0_combiner – east bot combiner port.
port1 – input port name.
port2 – output port name.
nbends – from straight top/bot to combiner (at least 2).
cross_section – for routing (sxtop/sxbot to combiner).
cross_section_x_top – optional top cross_section (defaults to cross_section).
cross_section_x_bot – optional bottom cross_section (defaults to cross_section).
mirror_bot – if true, mirrors the bottom arm.
add_optical_ports_arms – add all other optical ports in the arms with top_ and bot_ prefix.
min_length – minimum length for the straight.
auto_rename_ports – if True, renames ports.
b2______b3 | sxtop | straight_y | | | b1 b4 splitter==| |==combiner b5 b8 | | straight_y | | | delta_length/2 | | | b6__sxbot__b7 Lx
import gdsfactory as gf
c = gf.components.mzm(delta_length=10, length_y=2, length_x=200, bend='bend_euler', straight='straight', straight_x_top='straight_pin', straight_x_bot='straight_pin', splitter='mmi1x2', with_splitter=True, port_e1_splitter='o2', port_e0_splitter='o3', port_e1_combiner='o2', port_e0_combiner='o3', port1='o1', port2='o2', nbends=2, cross_section='strip', mirror_bot=False, add_optical_ports_arms=False, min_length=0.01, auto_rename_ports=True).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
pads#
- gdsfactory.components.pads.pad(size: tuple[float, float] = (100.0, 100.0), layer: LayerSpec = 'MTOP', bbox_layers: tuple[LayerSpec, ...] | None = None, bbox_offsets: tuple[float, ...] | None = None, port_inclusion: float = 0, port_orientation: float | None = 0, port_orientations: tuple[int, ...] | list[int] | None = (180, 90, 0, -90), port_type: str = 'pad') Component [source]#
Returns rectangular pad with ports.
- Parameters:
size – x, y size.
layer – pad layer.
bbox_layers – list of layers.
bbox_offsets – Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.
port_inclusion – from edge.
port_orientation – in degrees for the center port.
port_orientations – list of port_orientations to add. None does not add ports.
port_type – port type for pad port.
import gdsfactory as gf
c = gf.components.pad(size=(100, 100), layer='MTOP', port_inclusion=0, port_orientation=0, port_orientations=(180, 90, 0, -90), port_type='pad').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pads.pad_array(pad: ComponentSpec = 'pad', spacing: tuple[float, float] | None = None, columns: int = 6, rows: int = 1, column_pitch: float = 150.0, row_pitch: float = 150.0, port_orientation: float = 0, orientation: float | None = None, size: tuple[float, float] = (100.0, 100.0), layer: LayerSpec = 'MTOP', centered_ports: bool = False, auto_rename_ports: bool = False) Component [source]#
Returns 2D array of pads.
- Parameters:
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
column_pitch – x pitch.
row_pitch – y pitch.
port_orientation – port orientation in deg. None for low speed DC ports.
orientation – (deprecated).
size – pad size.
layer – pad layer.
centered_ports – True add ports to center. False add ports to the edge.
auto_rename_ports – True to auto rename ports.
import gdsfactory as gf
c = gf.components.pad_array(pad='pad', columns=6, rows=1, column_pitch=150, row_pitch=150, port_orientation=0, size=(100, 100), layer='MTOP', centered_ports=False, auto_rename_ports=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pads.pad_array0(pad: ComponentSpec = 'pad', spacing: Spacing | None = None, *, columns: int = 1, rows: int = 3, column_pitch: float = 150.0, row_pitch: float = 150.0, port_orientation: AngleInDegrees = 0, orientation: AngleInDegrees | None = None, size: Float2 = (100.0, 100.0), layer: LayerSpec = 'MTOP', centered_ports: bool = False, auto_rename_ports: bool = False) Component #
Returns 2D array of pads.
- Parameters:
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
column_pitch – x pitch.
row_pitch – y pitch.
port_orientation – port orientation in deg. None for low speed DC ports.
orientation – (deprecated).
size – pad size.
layer – pad layer.
centered_ports – True add ports to center. False add ports to the edge.
auto_rename_ports – True to auto rename ports.
import gdsfactory as gf
c = gf.components.pad_array0(pad='pad', columns=1, rows=3, column_pitch=150, row_pitch=150, port_orientation=0, size=(100, 100), layer='MTOP', centered_ports=False, auto_rename_ports=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pads.pad_array180(pad: ComponentSpec = 'pad', spacing: Spacing | None = None, *, columns: int = 1, rows: int = 3, column_pitch: float = 150.0, row_pitch: float = 150.0, port_orientation: AngleInDegrees = 180, orientation: AngleInDegrees | None = None, size: Float2 = (100.0, 100.0), layer: LayerSpec = 'MTOP', centered_ports: bool = False, auto_rename_ports: bool = False) Component #
Returns 2D array of pads.
- Parameters:
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
column_pitch – x pitch.
row_pitch – y pitch.
port_orientation – port orientation in deg. None for low speed DC ports.
orientation – (deprecated).
size – pad size.
layer – pad layer.
centered_ports – True add ports to center. False add ports to the edge.
auto_rename_ports – True to auto rename ports.
import gdsfactory as gf
c = gf.components.pad_array180(pad='pad', columns=1, rows=3, column_pitch=150, row_pitch=150, port_orientation=180, size=(100, 100), layer='MTOP', centered_ports=False, auto_rename_ports=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pads.pad_array270(pad: ComponentSpec = 'pad', spacing: Spacing | None = None, columns: int = 6, rows: int = 1, column_pitch: float = 150.0, row_pitch: float = 150.0, *, port_orientation: AngleInDegrees = 270, orientation: AngleInDegrees | None = None, size: Float2 = (100.0, 100.0), layer: LayerSpec = 'MTOP', centered_ports: bool = False, auto_rename_ports: bool = False) Component #
Returns 2D array of pads.
- Parameters:
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
column_pitch – x pitch.
row_pitch – y pitch.
port_orientation – port orientation in deg. None for low speed DC ports.
orientation – (deprecated).
size – pad size.
layer – pad layer.
centered_ports – True add ports to center. False add ports to the edge.
auto_rename_ports – True to auto rename ports.
import gdsfactory as gf
c = gf.components.pad_array270(pad='pad', columns=6, rows=1, column_pitch=150, row_pitch=150, port_orientation=270, size=(100, 100), layer='MTOP', centered_ports=False, auto_rename_ports=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pads.pad_array90(pad: ComponentSpec = 'pad', spacing: Spacing | None = None, columns: int = 6, rows: int = 1, column_pitch: float = 150.0, row_pitch: float = 150.0, *, port_orientation: AngleInDegrees = 90, orientation: AngleInDegrees | None = None, size: Float2 = (100.0, 100.0), layer: LayerSpec = 'MTOP', centered_ports: bool = False, auto_rename_ports: bool = False) Component #
Returns 2D array of pads.
- Parameters:
pad – pad element.
spacing – x, y pitch.
columns – number of columns.
rows – number of rows.
column_pitch – x pitch.
row_pitch – y pitch.
port_orientation – port orientation in deg. None for low speed DC ports.
orientation – (deprecated).
size – pad size.
layer – pad layer.
centered_ports – True add ports to center. False add ports to the edge.
auto_rename_ports – True to auto rename ports.
import gdsfactory as gf
c = gf.components.pad_array90(pad='pad', columns=6, rows=1, column_pitch=150, row_pitch=150, port_orientation=90, size=(100, 100), layer='MTOP', centered_ports=False, auto_rename_ports=False).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pads.pad_gsg_open(size: Float2 = (22, 7), layer_metal: LayerSpec = 'MTOP', metal_spacing: float = 5.0, *, short: bool = False, pad: ComponentSpec = 'pad', pad_pitch: float = 150, route_xsize: float = 50) gf.Component #
Returns high speed GSG pads for calibrating the RF probes.
- Parameters:
size – for the short.
layer_metal – for the short.
metal_spacing – in um.
short – if False returns an open.
pad – function for pad.
pad_pitch – in um.
route_xsize – in um.
import gdsfactory as gf
c = gf.components.pad_gsg_open(size=(22, 7), layer_metal='MTOP', metal_spacing=5, short=False, pad='pad', pad_pitch=150, route_xsize=50).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pads.pad_gsg_short(size: tuple[float, float] = (22, 7), layer_metal: LayerSpec = 'MTOP', metal_spacing: float = 5.0, short: bool = True, pad: ComponentSpec = 'pad', pad_pitch: float = 150, route_xsize: float = 50) Component [source]#
Returns high speed GSG pads for calibrating the RF probes.
- Parameters:
size – for the short.
layer_metal – for the short.
metal_spacing – in um.
short – if False returns an open.
pad – function for pad.
pad_pitch – in um.
route_xsize – in um.
import gdsfactory as gf
c = gf.components.pad_gsg_short(size=(22, 7), layer_metal='MTOP', metal_spacing=5, short=True, pad='pad', pad_pitch=150, route_xsize=50).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pads.pad_rectangular(*, size: Size = 'pad_size', layer: LayerSpec = 'MTOP', bbox_layers: tuple[LayerSpec, ...] | None = None, bbox_offsets: tuple[float, ...] | None = None, port_inclusion: float = 0, port_orientation: AngleInDegrees | None = 0, port_orientations: Ints | None = (180, 90, 0, -90), port_type: str = 'pad') Component #
Returns rectangular pad with ports.
- Parameters:
size – x, y size.
layer – pad layer.
bbox_layers – list of layers.
bbox_offsets – Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.
port_inclusion – from edge.
port_orientation – in degrees for the center port.
port_orientations – list of port_orientations to add. None does not add ports.
port_type – port type for pad port.
import gdsfactory as gf
c = gf.components.pad_rectangular(size='pad_size', layer='MTOP', port_inclusion=0, port_orientation=0, port_orientations=(180, 90, 0, -90), port_type='pad').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pads.pad_small(*, size: Size = (80, 80), layer: LayerSpec = 'MTOP', bbox_layers: tuple[LayerSpec, ...] | None = None, bbox_offsets: tuple[float, ...] | None = None, port_inclusion: float = 0, port_orientation: AngleInDegrees | None = 0, port_orientations: Ints | None = (180, 90, 0, -90), port_type: str = 'pad') Component #
Returns rectangular pad with ports.
- Parameters:
size – x, y size.
layer – pad layer.
bbox_layers – list of layers.
bbox_offsets – Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.
port_inclusion – from edge.
port_orientation – in degrees for the center port.
port_orientations – list of port_orientations to add. None does not add ports.
port_type – port type for pad port.
import gdsfactory as gf
c = gf.components.pad_small(size=(80, 80), layer='MTOP', port_inclusion=0, port_orientation=0, port_orientations=(180, 90, 0, -90), port_type='pad').copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pads.pads_shorted(pad: ComponentSpec = 'pad', columns: int = 8, pad_pitch: float = 150.0, layer_metal: LayerSpec = 'MTOP', metal_width: float = 10) Component [source]#
Returns a 1D array of shorted_pads.
- Parameters:
pad – pad spec.
columns – number of columns.
pad_pitch – in um
layer_metal – for the short.
metal_width – for the short.
import gdsfactory as gf
c = gf.components.pads_shorted(pad='pad', columns=8, pad_pitch=150, layer_metal='MTOP', metal_width=10).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pads.rectangle_with_slits(size: tuple[float, float] = (100.0, 200.0), layer: LayerSpec = 'WG', layer_slit: LayerSpec = 'SLAB150', centered: bool = False, port_type: str | None = None, slit_size: tuple[float, float] = (1.0, 1.0), slit_spacing: tuple[float, float] | None = None, slit_column_pitch: float = 20, slit_row_pitch: float = 20, slit_enclosure: float = 10) Component [source]#
Returns a rectangle with slits.
Metal slits reduce stress.
- Parameters:
size – (tuple) Width and height of rectangle.
layer – Specific layer to put polygon geometry on.
layer_slit – does a boolean NOT when None.
centered – True sets center to (0, 0), False sets south-west to (0, 0)
port_type – for the rectangle.
slit_size – x, y slit size.
slit_spacing – pitch_x, pitch_y for slits.
slit_column_pitch – pitch for columns of slits.
slit_row_pitch – pitch for rows of slits.
slit_enclosure – from slit to rectangle edge.
slit_enclosure _____________________________________ |<---> | | | | ______________________ | | | | | | | | slit_size[1] | _ |______________________| | | | | | | slit_row_pitch | | | | size[1] | | ______________________ | | | | | | | | | | | | _ |______________________| | | <---------------------> | | slit_size[0] | |___________________________________| size[0]
import gdsfactory as gf
c = gf.components.rectangle_with_slits(size=(100, 200), layer='WG', layer_slit='SLAB150', centered=False, slit_size=(1, 1), slit_column_pitch=20, slit_row_pitch=20, slit_enclosure=10).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
pcms#
- gdsfactory.components.pcms.cavity(component: ComponentSpec = 'dbr', coupler: ComponentSpec = 'coupler', length: float = 0.1, gap: float = 0.2, **kwargs: Any) Component [source]#
Returns cavity from a coupler and a mirror.
connects the W0 port of the mirror to E1 and W1 coupler ports creating a resonant cavity
- Parameters:
component – mirror.
coupler – coupler library.
length – coupler length.
gap – coupler gap.
kwargs – coupler_settings.
ml (mirror left) mr (mirror right) | | |o1 - o2__ __o3 - o1| | \ / | \ / ---=========--- o1 o1 length o4 o2
import gdsfactory as gf
c = gf.components.cavity(component='dbr', coupler='coupler', length=0.1, gap=0.2).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pcms.cdsem_all(widths: tuple[float, ...] = (0.4, 0.45, 0.5, 0.6, 0.8, 1.0), dense_lines_width: float | None = 0.3, dense_lines_width_difference: float = 0.02, dense_lines_gap: float = 0.3, dense_lines_labels: tuple[str, ...] = ('DL', 'DM', 'DH'), straight: ComponentSpec = 'straight', bend90: ComponentSpec | None = 'bend_circular', cross_section: CrossSectionSpec = 'strip', text: ComponentSpec = 'text_rectangular', spacing: float = 5, cdsem_bend180: ComponentSpec = 'cdsem_bend180', text_size: float = 1) Component [source]#
Column with all optical PCMs.
- Parameters:
widths – for straight lines.
dense_lines_width – in um.
dense_lines_width_difference – in um.
dense_lines_gap – in um.
dense_lines_labels – strings.
straight – spec.
bend90 – spec.
cross_section – spec.
text – spec.
spacing – from group to group.
cdsem_bend180 – spec.
text_size – in um.
import gdsfactory as gf
c = gf.components.cdsem_all(widths=(0.4, 0.45, 0.5, 0.6, 0.8, 1), dense_lines_width=0.3, dense_lines_width_difference=0.02, dense_lines_gap=0.3, dense_lines_labels=('DL', 'DM', 'DH'), straight='straight', bend90='bend_circular', cross_section='strip', text='text_rectangular', spacing=5, cdsem_bend180='cdsem_bend180', text_size=1).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pcms.cdsem_bend180(width: float = 0.5, radius: float = 10.0, wg_length: float | None = 420.0, straight: ComponentSpec = 'straight', bend90: ComponentSpec = 'bend_circular', cross_section: CrossSectionSpec = 'strip', text: ComponentSpec = 'text_rectangular', text_size: float = 1.0) Component [source]#
Returns CDSEM structures.
- Parameters:
width – of the line.
radius – um.
wg_length – in um.
straight – spec.
bend90 – spec.
cross_section – spec.
text – spec.
text_size – um.
import gdsfactory as gf
c = gf.components.cdsem_bend180(width=0.5, radius=10, wg_length=420, straight='straight', bend90='bend_circular', cross_section='strip', text='text_rectangular', text_size=1).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pcms.cdsem_coupler(length: float = 420.0, gaps: Sequence[float] = (0.15, 0.2, 0.25), cross_section: CrossSectionSpec = 'strip_no_ports', text: ComponentSpec | None = 'text_rectangular', spacing: float = 7.0, positions: Sequence[float | None] | None = None, width: float | None = None, text_size: float = 1.0) Component [source]#
Returns 2 coupled waveguides gap sweep.
- Parameters:
length – for the line.
gaps – list of gaps for the sweep.
cross_section – for the lines.
text – optional text for labels.
spacing – Optional center to center spacing.
positions – Optional positions for the text labels.
width – width of the waveguide. If None, it will use the width of the cross_section.
text_size – size of the text.
import gdsfactory as gf
c = gf.components.cdsem_coupler(length=420, gaps=(0.15, 0.2, 0.25), cross_section='strip_no_ports', text='text_rectangular', spacing=7, text_size=1).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pcms.cdsem_straight(widths: Sequence[float] = (0.4, 0.45, 0.5, 0.6, 0.8, 1.0), length: float = 420.0, cross_section: CrossSectionSpec = 'strip_no_ports', text: ComponentSpec | None = 'text_rectangular', spacing: float = 7.0, positions: Sequence[float | None] | None = None, text_size: float = 1) Component [source]#
Returns straight waveguide lines width sweep.
- Parameters:
widths – for the sweep.
length – for the line.
cross_section – for the lines.
text – optional text for labels.
spacing – Optional center to center spacing.
positions – Optional positions for the text labels.
text_size – in um.
import gdsfactory as gf
c = gf.components.cdsem_straight(widths=(0.4, 0.45, 0.5, 0.6, 0.8, 1), length=420, cross_section='strip_no_ports', text='text_rectangular', spacing=7, text_size=1).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pcms.cdsem_straight_density(widths: Floats = (0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3), gaps: Floats = (0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3), length: float = 420.0, label: str = '', cross_section: CrossSectionSpec = 'strip_no_ports', text: ComponentSpec | None = 'text_rectangular', text_size: float = 1.0) Component [source]#
Returns sweep of dense straight lines.
- Parameters:
widths – list of widths.
gaps – list of gaps.
length – of the lines.
label – defaults to widths[0] gaps[0].
cross_section – spec.
text – optional function for text.
text_size – size of the text.
import gdsfactory as gf
c = gf.components.cdsem_straight_density(widths=(0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3), gaps=(0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3), length=420, label='', cross_section='strip_no_ports', text='text_rectangular', text_size=1).copy()
c.draw_ports()
c.plot()
(Source code
, png
, hires.png
, pdf
)
- gdsfactory.components.pcms.cutback_2x2(component: ComponentSpec = 'mmi2x2', cols: int = 4, rows: int = 5, port1: str = 'o1', port2: str = 'o2', port3: str = 'o3', port4: str = 'o4', bend180: ComponentSpec = 'bend_circular180', mirror: bool = False, straight_length: