Skip to content

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

inductor

inductor(
    width: float = 2.0,
    space: float = 2.1,
    diameter: float = 25.35,
    resistance: float = 0.5777,
    inductance: float = 3.3303e-11,
    turns: int = 1,
    layer_metal: LayerSpec = "M3",
    layer_inductor: LayerSpec = "M1",
    layer_metal_pin: LayerSpec = "WG_PIN",
    layers_no_fill: LayerSpecs = ("DEVREC", "NO_TILE_SI"),
) -> Component

Create a 2-turn inductor.

Parameters:

Name Type Description Default
width float

Width of the inductor trace in micrometers.

2.0
space float

Space between turns in micrometers.

2.1
diameter float

Inner diameter in micrometers.

25.35
resistance float

Resistance in ohms.

0.5777
inductance float

Inductance in henries.

3.3303e-11
turns int

Number of turns (default 1 for inductor2).

1
layer_metal LayerSpec

Layer for the metal trace.

'M3'
layer_inductor LayerSpec

Layer for the inductor region.

'M1'
layer_metal_pin LayerSpec

Layer for the metal pins.

'WG_PIN'
layers_no_fill LayerSpecs

Layers to exclude from fill.

('DEVREC', 'NO_TILE_SI')

Returns:

Type Description
Component

Component with inductor layout.

Source code in gdsfactory/components/analog/inductors.py
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@gf.cell_with_module_name(schematic_function=inductor_schematic, tags=["analog"])
def inductor(
    width: float = 2.0,
    space: float = 2.1,
    diameter: float = 25.35,
    resistance: float = 0.5777,
    inductance: float = 33.303e-12,
    turns: int = 1,
    layer_metal: LayerSpec = "M3",
    layer_inductor: LayerSpec = "M1",
    layer_metal_pin: LayerSpec = "WG_PIN",
    layers_no_fill: LayerSpecs = ("DEVREC", "NO_TILE_SI"),
) -> Component:
    """Create a 2-turn inductor.

    Args:
        width: Width of the inductor trace in micrometers.
        space: Space between turns in micrometers.
        diameter: Inner diameter in micrometers.
        resistance: Resistance in ohms.
        inductance: Inductance in henries.
        turns: Number of turns (default 1 for inductor2).
        layer_metal: Layer for the metal trace.
        layer_inductor: Layer for the inductor region.
        layer_metal_pin: Layer for the metal pins.
        layers_no_fill: Layers to exclude from fill.

    Returns:
        Component with inductor layout.
    """
    return cf.inductor(
        width=width,
        space=space,
        diameter=diameter,
        resistance=resistance,
        inductance=inductance,
        turns=turns,
        layer_metal=layer_metal,
        layer_inductor=layer_inductor,
        layer_metal_pin=layer_metal_pin,
        layers_no_fill=layers_no_fill,
    )

inductor

interdigital_capacitor

interdigital_capacitor

interdigital_capacitor(
    fingers: int = 4,
    finger_length: float | int = 20.0,
    finger_gap: float | int = 2.0,
    thickness: float | int = 5.0,
    layer: LayerSpec = "M1",
) -> Component

Generate an interdigital capacitor component with ports on both ends.

An interdigital capacitor consists of interleaved metal fingers that create a distributed capacitance. This component creates a planar capacitor with two sets of interleaved fingers extending from opposite ends.

See for example Zhu et al., Accurate circuit model of interdigital capacitor and its application to design of new quasi-lumped miniaturized filters with suppression of harmonic resonance, doi: 10.1109/22.826833.

Note

finger_length=0 effectively provides a parallel plate capacitor. The capacitance scales approximately linearly with the number of fingers and finger length.

Parameters:

Name Type Description Default
fingers int

Total number of fingers of the capacitor (must be >= 1).

4
finger_length float | int

Length of each finger in μm.

20.0
finger_gap float | int

Gap between adjacent fingers in μm.

2.0
thickness float | int

Thickness of fingers and the base section in μm.

5.0
layer LayerSpec

Layer specification for the capacitor geometry.

'M1'

Returns:

Name Type Description
Component Component

A gdsfactory component with the interdigital capacitor geometry

Component

and two electrical ports ('e1' and 'e2') on opposing sides.

Source code in gdsfactory/components/analog/interdigital_capacitor.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@gf.cell_with_module_name(schematic_function=capacitor_schematic, tags=["analog"])
def interdigital_capacitor(
    fingers: int = 4,
    finger_length: float | int = 20.0,
    finger_gap: float | int = 2.0,
    thickness: float | int = 5.0,
    layer: LayerSpec = "M1",
) -> Component:
    """Generate an interdigital capacitor component with ports on both ends.

    An interdigital capacitor consists of interleaved metal fingers that create
    a distributed capacitance. This component creates a planar capacitor with
    two sets of interleaved fingers extending from opposite ends.

    See for example Zhu et al., `Accurate circuit model of interdigital
    capacitor and its application to design of new quasi-lumped miniaturized
    filters with suppression of harmonic resonance`, doi: 10.1109/22.826833.

    Note:
        ``finger_length=0`` effectively provides a parallel plate capacitor.
        The capacitance scales approximately linearly with the number of fingers
        and finger length.

    Args:
        fingers: Total number of fingers of the capacitor (must be >= 1).
        finger_length: Length of each finger in μm.
        finger_gap: Gap between adjacent fingers in μm.
        thickness: Thickness of fingers and the base section in μm.
        layer: Layer specification for the capacitor geometry.

    Returns:
        Component: A gdsfactory component with the interdigital capacitor geometry
        and two electrical ports ('e1' and 'e2') on opposing sides.
    """
    return cf.interdigital_capacitor(
        fingers=fingers,
        finger_length=finger_length,
        finger_gap=finger_gap,
        thickness=thickness,
        layer=layer,
    )

interdigital_capacitor

interdigitated_electrodes

interdigitated_electrodes

interdigitated_electrodes(
    n_fingers: int = 10,
    finger_width: float = 0.5,
    finger_length: float = 10.0,
    finger_gap: float = 0.5,
    bus_width: float = 2.0,
    bus_length: float | None = None,
    layer: LayerSpec = "MTOP",
    port_type: str = "electrical",
) -> Component

Interdigitated electrode pattern.

Two horizontal bus bars (top and bottom) with alternating fingers extending from each bus toward the opposite one. Fingers from the top bus extend downward and fingers from the bottom bus extend upward, interleaving with a gap between the finger tips and the opposite bus.

Parameters:

Name Type Description Default
n_fingers int

Total number of fingers (split between top and bottom buses).

10
finger_width float

Width of each finger in um.

0.5
finger_length float

Length of each finger in um.

10.0
finger_gap float

Gap between adjacent fingers (edge to edge) in um.

0.5
bus_width float

Width (height) of each bus bar in um.

2.0
bus_length float | None

Length of each bus bar in um. Defaults to the total width needed to accommodate all fingers.

None
layer LayerSpec

Layer specification for all geometry.

'MTOP'
port_type str

Port type for electrical ports at bus bar ends.

'electrical'
Source code in gdsfactory/components/analog/interdigitated_electrodes.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@gf.cell_with_module_name(tags=["analog"])
def interdigitated_electrodes(
    n_fingers: int = 10,
    finger_width: float = 0.5,
    finger_length: float = 10.0,
    finger_gap: float = 0.5,
    bus_width: float = 2.0,
    bus_length: float | None = None,
    layer: LayerSpec = "MTOP",
    port_type: str = "electrical",
) -> Component:
    """Interdigitated electrode pattern.

    Two horizontal bus bars (top and bottom) with alternating fingers extending
    from each bus toward the opposite one. Fingers from the top bus extend
    downward and fingers from the bottom bus extend upward, interleaving
    with a gap between the finger tips and the opposite bus.

    Args:
        n_fingers: Total number of fingers (split between top and bottom buses).
        finger_width: Width of each finger in um.
        finger_length: Length of each finger in um.
        finger_gap: Gap between adjacent fingers (edge to edge) in um.
        bus_width: Width (height) of each bus bar in um.
        bus_length: Length of each bus bar in um. Defaults to the total width
            needed to accommodate all fingers.
        layer: Layer specification for all geometry.
        port_type: Port type for electrical ports at bus bar ends.
    """
    return cf.interdigitated_electrodes(
        n_fingers=n_fingers,
        finger_width=finger_width,
        finger_length=finger_length,
        finger_gap=finger_gap,
        bus_width=bus_width,
        bus_length=bus_length,
        layer=layer,
        port_type=port_type,
    )

interdigitated_electrodes

spiral_inductor

spiral_inductor(
    d_out: float = 130.0,
    N: int = 3,
    sides: int = 8,
    width: float = 10.0,
    spacing: float = 4.0,
    aspect_ratio: float = 1.0,
    port_side: str = "same",
    add_pgs: bool = False,
    pgs_diameter: float = 150.0,
    pgs_width: float = 2.0,
    pgs_spacing: float = 1.0,
    via: ComponentSpec = "via2",
    resistance: float = 0.5777,
    inductance: float = 3.3303e-11,
    layer_winding: LayerSpec = "M3",
    layer_underpass: LayerSpec = "M2",
    layers_pgs: LayerSpecs = ("M1",),
) -> Component

Polygonal spiral inductor.

Parameters:

Name Type Description Default
d_out float

Outer diameter of the spiral in micrometers.

130.0
N int

Number of complete turns.

3
sides int

Number of polygon sides per full turn (8 = octagonal).

8
width float

Metal trace width in micrometers.

10.0
spacing float

Gap between adjacent turns in micrometers.

4.0
aspect_ratio float

Y-axis scale factor for non-square spirals (1.0 = symmetric).

1.0
port_side str

"same" keeps both ports on the same side; "opposite" places them on opposite sides.

'same'
add_pgs bool

When True, add a patterned ground shield on layers_pgs.

False
pgs_diameter float

Bounding size D of the ground shield square, in micrometers.

150.0
pgs_width float

Strip width w of each ground shield finger, in micrometers.

2.0
pgs_spacing float

Gap s between adjacent ground shield fingers, in micrometers.

1.0
via ComponentSpec

via ComponentSpec connecting winding <-> underpass.

'via2'
resistance float

Series resistance in ohms, stored as metadata only.

0.5777
inductance float

Inductance in henries, stored as metadata only.

3.3303e-11
layer_winding LayerSpec

Metal layer for the main spiral winding.

'M3'
layer_underpass LayerSpec

Metal layer for the inner-terminal underpass bridge (one layer below layer_winding).

'M2'
layers_pgs LayerSpecs

Layers on which the patterned ground shield is drawn, kept separate from both layer_winding and layer_underpass since the underpass carries a live signal and shouldn't s hare a layer with a grounded shield.

('M1',)

Returns:

Type Description
Component

Component with 2 RF ports: P1 -> entry terminal (layer_winding) P2 -> exit terminal (layer_underpass)

Source code in gdsfactory/components/analog/inductors.py
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
@gf.cell_with_module_name(tags=["analog"])
def spiral_inductor(
    d_out: float = 130.0,
    N: int = 3,
    sides: int = 8,
    width: float = 10.0,
    spacing: float = 4.0,
    aspect_ratio: float = 1.0,
    port_side: str = "same",
    add_pgs: bool = False,
    pgs_diameter: float = 150.0,
    pgs_width: float = 2.0,
    pgs_spacing: float = 1.0,
    via: ComponentSpec = "via2",
    resistance: float = 0.5777,
    inductance: float = 33.303e-12,
    layer_winding: LayerSpec = "M3",
    layer_underpass: LayerSpec = "M2",
    layers_pgs: LayerSpecs = ("M1",),
) -> Component:
    """Polygonal spiral inductor.

    Args:
        d_out: Outer diameter of the spiral in micrometers.
        N: Number of complete turns.
        sides: Number of polygon sides per full turn (8 = octagonal).
        width: Metal trace width in micrometers.
        spacing: Gap between adjacent turns in micrometers.
        aspect_ratio: Y-axis scale factor for non-square spirals (1.0 = symmetric).
        port_side: ``"same"`` keeps both ports on the same side;
            ``"opposite"`` places them on opposite sides.
        add_pgs: When True, add a patterned ground shield on layers_pgs.
        pgs_diameter: Bounding size D of the ground shield square, in micrometers.
        pgs_width: Strip width w of each ground shield finger, in micrometers.
        pgs_spacing: Gap s between adjacent ground shield fingers, in micrometers.
        via: via ComponentSpec connecting winding <-> underpass.
        resistance: Series resistance in ohms, stored as metadata only.
        inductance: Inductance in henries, stored as metadata only.
        layer_winding: Metal layer for the main spiral winding.
        layer_underpass: Metal layer for the inner-terminal underpass bridge (one layer below layer_winding).
        layers_pgs: Layers on which the patterned ground shield is drawn,
            kept separate from both layer_winding and layer_underpass
            since the underpass carries a live signal and shouldn't s
            hare a layer with a grounded shield.

    Returns:
        Component with 2 RF ports:
          P1  ->  entry terminal  (layer_winding)
          P2  ->  exit terminal   (layer_underpass)
    """
    return cf.analog.inductors.spiral_inductor(
        d_out=d_out,
        N=N,
        sides=sides,
        width=width,
        spacing=spacing,
        aspect_ratio=aspect_ratio,
        port_side=port_side,
        add_pgs=add_pgs,
        pgs_diameter=pgs_diameter,
        pgs_width=pgs_width,
        pgs_spacing=pgs_spacing,
        via=via,
        resistance=resistance,
        inductance=inductance,
        layer_winding=layer_winding,
        layer_underpass=layer_underpass,
        layers_pgs=layers_pgs,
    )

spiral_inductor

stacked_transformer

stacked_transformer(
    d_out: float = 150.0,
    N1: int = 3,
    N2: int = 3,
    sides: int = 8,
    width: float = 10.0,
    spacing: float = 2.0,
    center_tap_primary: bool = False,
    center_tap_secondary: bool = False,
    via_extent: float | None = None,
    port_spacing: float | None = None,
    via_primary: ComponentSpec = "via3",
    via_secondary: ComponentSpec = "via1",
    resistance: float = 0.5777,
    inductance: float = 3.3303e-11,
    add_pgs: bool = False,
    pgs_diameter: float = 180.0,
    pgs_width: float = 4.0,
    pgs_spacing: float = 2.0,
    layer_winding_primary: LayerSpec | None = None,
    layer_crossing_primary: LayerSpec = "M3",
    layer_winding_secondary: LayerSpec = "M2",
    layer_crossing_secondary: LayerSpec = "M1",
    layers_pgs: LayerSpecs = (),
) -> Component

Stacked transformer.

The primary winding sits on layer_winding_primary with its crossings on layer_crossing_primary (connected by via_primary); the secondary winding sits on layer_winding_secondary with its crossings on layer_crossing_secondary (connected by via_secondary), mirrored to sit on the opposite side of d_out so the two windings stack vertically over the same footprint.

LAYER STACK: this gdsfactory generic PDK only has 3 real metals (M1/M2/M3). A fully isolated stacked transformer needs 4 independent metals (primary winding, primary crossing, secondary winding, secondary crossing), so the defaults here use an EXTRA, non-native 4th metal registered via gf.kcl.layer() at import time (M4_LAYER, layer (53, 0)) with its own via (via3(), VIA3_LAYER, layer (48, 0)) connecting it to M3. This gives full primary/secondary isolation by default: layer_winding_primary=M4_LAYER, layer_crossing_primary="M3", via_primary=via3 layer_winding_secondary="M2", layer_crossing_secondary="M1", via_secondary="via1"

M4_LAYER/VIA3_LAYER are valid GDS layers but are NOT part of this PDK's real, fabricatable metal stack. If you need this component to be simulation-ready (Palace/gsim meshing) ortape-out-accurate, call get_extended_layer_stack() instead of the PDK's default stack, e.g. sim.set_stack(stack=get_extended_layer_stack()).

If your ACTUAL target PDK has a genuine 4th metal, pass its real layer name/via in place of M4_LAYER/via3 instead of relying on this synthetic one.

layers_pgs defaults to an empty tuple: even with M4 in play, all of M1/M2/M3/M4 are live signal layers in the default configuration, so there's still no obviously-safe spare metal for a patterned ground shield — pass an explicit LayerSpecs of your own (accepting whatever coupling that implies) if you need one anyway.

Parameters:

Name Type Description Default
d_out float

Outer diameter of each winding, in micrometers.

150.0
N1 int

Number of turns in the primary winding.

3
N2 int

Number of turns in the secondary winding.

3
sides int

Number of polygon sides per full turn (8 = octagonal).

8
width float

Metal trace width in micrometers.

10.0
spacing float

Gap between adjacent turns in micrometers.

2.0
center_tap_primary bool

When True, add a center-tap bridge and CT_P port to the primary winding.

False
center_tap_secondary bool

When True, add a center-tap bridge and CT_S port to the secondary winding.

False
via_extent float | None

Length crossing routes extend past their crossing box, and the box size used to size the crossing/centertap via arrays, for both halves. If None, it's derived independently for each half from that half's own via geometry (same derivation spiral_inductor/symmetric_inductor use).

None
port_spacing float | None

Horizontal spacing of both differential port pairs. Defaults to spacing.

None
via_primary ComponentSpec

via ComponentSpec connecting layer_winding_primary <-> layer_crossing_primary.

'via3'
via_secondary ComponentSpec

via ComponentSpec connecting layer_winding_secondary <-> layer_crossing_secondary.

'via1'
resistance float

Series resistance in ohms, stored as metadata only.

0.5777
inductance float

Inductance in henries, stored as metadata only.

3.3303e-11
add_pgs bool

When True, add a patterned ground shield on layers_pgs. See the layer-stack caveat above before enabling this.

False
pgs_diameter float

Bounding size D of the ground shield square, in micrometers.

180.0
pgs_width float

Strip width w of each ground shield finger, in micrometers.

4.0
pgs_spacing float

Gap s between adjacent ground shield fingers, in micrometers.

2.0
layer_winding_primary LayerSpec | None

Metal layer for the primary winding.

None
layer_crossing_primary LayerSpec

Metal layer for the primary crossings.

'M3'
layer_winding_secondary LayerSpec

Metal layer for the secondary winding.

'M2'
layer_crossing_secondary LayerSpec

Metal layer for the secondary crossings.

'M1'
layers_pgs LayerSpecs

Layers on which the patterned ground shield is drawn.

()

Returns:

Type Description
Component

Component with 4-6 ports: P+ / P- -> primary differential terminals (layer_winding_primary) S+ / S- -> secondary differential terminals (layer_winding_secondary) CT_P -> present if center_tap_primary=True CT_S -> present if center_tap_secondary=True

Source code in gdsfactory/components/analog/transformers.py
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
@gf.cell_with_module_name(tags=["analog"])
def stacked_transformer(
    d_out: float = 150.0,
    N1: int = 3,
    N2: int = 3,
    sides: int = 8,
    width: float = 10.0,
    spacing: float = 2.0,
    center_tap_primary: bool = False,
    center_tap_secondary: bool = False,
    via_extent: float | None = None,
    port_spacing: float | None = None,
    via_primary: ComponentSpec = "via3",
    via_secondary: ComponentSpec = "via1",
    resistance: float = 0.5777,
    inductance: float = 33.303e-12,
    add_pgs: bool = False,
    pgs_diameter: float = 180.0,
    pgs_width: float = 4.0,
    pgs_spacing: float = 2.0,
    # Defaults use the synthetic M4/VIA3 layers for full 4-metal isolation —
    # see the module-level comment above M4_LAYER for the SIMULATION
    # PIPELINE WARNING: use get_extended_layer_stack() with sim.set_stack(),
    # not the PDK default, when meshing a component built with these.
    layer_winding_primary: LayerSpec | None = None,
    layer_crossing_primary: LayerSpec = "M3",
    layer_winding_secondary: LayerSpec = "M2",
    layer_crossing_secondary: LayerSpec = "M1",
    layers_pgs: LayerSpecs = (),
) -> Component:
    """Stacked transformer.

    The primary winding sits on layer_winding_primary with
    its crossings on layer_crossing_primary (connected by via_primary);
    the secondary winding sits on layer_winding_secondary with its
    crossings on layer_crossing_secondary (connected by via_secondary),
    mirrored to sit on the opposite side of d_out so the two windings
    stack vertically over the same footprint.

    LAYER STACK: this gdsfactory generic PDK only has 3 real metals
    (M1/M2/M3). A fully isolated stacked transformer needs 4 independent
    metals (primary winding, primary crossing, secondary winding,
    secondary crossing), so the defaults here use an EXTRA, non-native
    4th metal registered via gf.kcl.layer() at import time (M4_LAYER,
    layer (53, 0)) with its own via (via3(), VIA3_LAYER, layer (48, 0))
    connecting it to M3. This gives full primary/secondary isolation by
    default:
        layer_winding_primary=M4_LAYER, layer_crossing_primary="M3", via_primary=via3
        layer_winding_secondary="M2",   layer_crossing_secondary="M1", via_secondary="via1"

    M4_LAYER/VIA3_LAYER are valid GDS layers but are NOT part of this PDK's real,
    fabricatable metal stack. If you need this component to be simulation-ready
    (Palace/gsim meshing) ortape-out-accurate, call get_extended_layer_stack()
    instead of the PDK's default stack, e.g. sim.set_stack(stack=get_extended_layer_stack()).

    If your ACTUAL target PDK has a genuine 4th metal, pass its real
    layer name/via in place of M4_LAYER/via3 instead of relying on this
    synthetic one.

    layers_pgs defaults to an empty tuple: even with M4 in play, all of
    M1/M2/M3/M4 are live signal layers in the default configuration, so
    there's still no obviously-safe spare metal for a patterned ground
    shield — pass an explicit LayerSpecs of your own (accepting whatever
    coupling that implies) if you need one anyway.

    Args:
        d_out: Outer diameter of each winding, in micrometers.
        N1: Number of turns in the primary winding.
        N2: Number of turns in the secondary winding.
        sides: Number of polygon sides per full turn (8 = octagonal).
        width: Metal trace width in micrometers.
        spacing: Gap between adjacent turns in micrometers.
        center_tap_primary: When True, add a center-tap bridge and CT_P
            port to the primary winding.
        center_tap_secondary: When True, add a center-tap bridge and CT_S
            port to the secondary winding.
        via_extent: Length crossing routes extend past their crossing box,
            and the box size used to size the crossing/centertap via
            arrays, for both halves. If None, it's derived independently
            for each half from that half's own via geometry (same
            derivation spiral_inductor/symmetric_inductor use).
        port_spacing: Horizontal spacing of both differential port pairs.
            Defaults to spacing.
        via_primary: via ComponentSpec connecting layer_winding_primary <-> layer_crossing_primary.
        via_secondary: via ComponentSpec connecting layer_winding_secondary <-> layer_crossing_secondary.
        resistance: Series resistance in ohms, stored as metadata only.
        inductance: Inductance in henries, stored as metadata only.
        add_pgs: When True, add a patterned ground shield on layers_pgs.
            See the layer-stack caveat above before enabling this.
        pgs_diameter: Bounding size D of the ground shield square, in micrometers.
        pgs_width: Strip width w of each ground shield finger, in micrometers.
        pgs_spacing: Gap s between adjacent ground shield fingers, in micrometers.
        layer_winding_primary: Metal layer for the primary winding.
        layer_crossing_primary: Metal layer for the primary crossings.
        layer_winding_secondary: Metal layer for the secondary winding.
        layer_crossing_secondary: Metal layer for the secondary crossings.
        layers_pgs: Layers on which the patterned ground shield is drawn.

    Returns:
        Component with 4-6 ports:
          P+ / P-    ->  primary differential terminals   (layer_winding_primary)
          S+ / S-    ->  secondary differential terminals (layer_winding_secondary)
          CT_P       ->  present if center_tap_primary=True
          CT_S       ->  present if center_tap_secondary=True
    """
    return cf.stacked_transformer(
        d_out=d_out,
        N1=N1,
        N2=N2,
        sides=sides,
        width=width,
        spacing=spacing,
        center_tap_primary=center_tap_primary,
        center_tap_secondary=center_tap_secondary,
        via_extent=via_extent,
        port_spacing=port_spacing,
        via_primary=via_primary,
        via_secondary=via_secondary,
        resistance=resistance,
        inductance=inductance,
        add_pgs=add_pgs,
        pgs_diameter=pgs_diameter,
        pgs_width=pgs_width,
        pgs_spacing=pgs_spacing,
        layer_winding_primary=layer_winding_primary,
        layer_crossing_primary=layer_crossing_primary,
        layer_winding_secondary=layer_winding_secondary,
        layer_crossing_secondary=layer_crossing_secondary,
        layers_pgs=layers_pgs,
    )

stacked_transformer

symmetric_inductor

symmetric_inductor(
    d_out: float = 150.0,
    N: int = 3,
    sides: int = 8,
    width: float = 10.0,
    spacing: float = 2.0,
    center_tap: bool = False,
    via_extent: float | None = None,
    port_spacing: float | None = None,
    aspect_ratio: float = 1.0,
    via: ComponentSpec = "via2",
    resistance: float = 0.5777,
    inductance: float = 3.3303e-11,
    add_pgs: bool = False,
    pgs_diameter: float = 180.0,
    pgs_width: float = 4.0,
    pgs_spacing: float = 2.0,
    layer_winding: LayerSpec = "M3",
    layer_underpass: LayerSpec = "M2",
    layers_pgs: LayerSpecs = ("M1",),
) -> Component

Symmetric (differential) spiral inductor.

Parameters:

Name Type Description Default
d_out float

Outer diameter of the two-lobe structure, in micrometers.

150.0
N int

Number of complete windings per side.

3
sides int

Number of polygon sides per full turn (8 = octagonal).

8
width float

Metal trace width in micrometers.

10.0
spacing float

Gap between adjacent turns in micrometers.

2.0
center_tap bool

When True, add a center-tap bridge (and CT port) routed through layer_underpass with its own via connection to the winding.

False
via_extent float | None

Length the crossing route extends past the crossing box on layer_underpass, and the box size used to size the crossing/centertap via arrays. If None, it's derived from the chosen via's own geometry.

None
port_spacing float | None

Horizontal spacing of the differential ports P1/P2.

None
aspect_ratio float

Y-axis scale factor for non-square windings

1.0
via ComponentSpec

via ComponentSpec connecting winding <-> crossing/centertap.

'via2'
resistance float

Series resistance in ohms, stored as metadata only

0.5777
inductance float

Inductance in henries, stored as metadata only

3.3303e-11
add_pgs bool

When True, add a patterned ground shield on layers_pgs.

False
pgs_diameter float

Bounding size D of the ground shield square, in micrometers.

180.0
pgs_width float

Strip width w of each ground shield finger, in micrometers.

4.0
pgs_spacing float

Gap s between adjacent ground shield fingers, in micrometers.

2.0
layer_winding LayerSpec

Metal layer for the main winding (top metal).

'M3'
layer_underpass LayerSpec

Metal layer for crossings and the center-tap bridge (one layer below layer_winding).

'M2'
layers_pgs LayerSpecs

Layers on which the patterned ground shield is drawn.

('M1',)

Returns:

Type Description
Component

Component with 2 or 3 ports: P1 -> left differential terminal (layer_winding) P2 -> right differential terminal (layer_winding) CT -> center tap (only if center_tap=True), on layer_winding if N <= 2, else on layer_underpass.

Source code in gdsfactory/components/analog/inductors.py
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
@gf.cell_with_module_name(tags=["analog"])
def symmetric_inductor(
    d_out: float = 150.0,
    N: int = 3,
    sides: int = 8,
    width: float = 10.0,
    spacing: float = 2.0,
    center_tap: bool = False,
    via_extent: float | None = None,
    port_spacing: float | None = None,
    aspect_ratio: float = 1.0,
    via: ComponentSpec = "via2",
    resistance: float = 0.5777,
    inductance: float = 33.303e-12,
    add_pgs: bool = False,
    pgs_diameter: float = 180.0,
    pgs_width: float = 4.0,
    pgs_spacing: float = 2.0,
    layer_winding: LayerSpec = "M3",
    layer_underpass: LayerSpec = "M2",
    layers_pgs: LayerSpecs = ("M1",),
) -> Component:
    """Symmetric (differential) spiral inductor.

    Args:
        d_out: Outer diameter of the two-lobe structure, in micrometers.
        N: Number of complete windings per side.
        sides: Number of polygon sides per full turn (8 = octagonal).
        width: Metal trace width in micrometers.
        spacing: Gap between adjacent turns in micrometers.
        center_tap: When True, add a center-tap bridge (and CT port)
            routed through layer_underpass with its own via connection
            to the winding.
        via_extent: Length the crossing route extends past the crossing
            box on layer_underpass, and the box size used to size the
            crossing/centertap via arrays. If None, it's derived from the
            chosen via's own geometry.
        port_spacing: Horizontal spacing of the differential ports P1/P2.
        aspect_ratio: Y-axis scale factor for non-square windings
        via: via ComponentSpec connecting winding <-> crossing/centertap.
        resistance: Series resistance in ohms, stored as metadata only
        inductance: Inductance in henries, stored as metadata only
        add_pgs: When True, add a patterned ground shield on layers_pgs.
        pgs_diameter: Bounding size D of the ground shield square, in micrometers.
        pgs_width: Strip width w of each ground shield finger, in micrometers.
        pgs_spacing: Gap s between adjacent ground shield fingers, in micrometers.
        layer_winding: Metal layer for the main winding (top metal).
        layer_underpass: Metal layer for crossings and the center-tap bridge (one layer below layer_winding).
        layers_pgs: Layers on which the patterned ground shield is drawn.

    Returns:
        Component with 2 or 3 ports:
          P1  ->  left differential terminal   (layer_winding)
          P2  ->  right differential terminal  (layer_winding)
          CT  ->  center tap (only if center_tap=True), on layer_winding
                  if N <= 2, else on layer_underpass.
    """
    return cf.analog.inductors.symmetric_inductor(
        d_out=d_out,
        N=N,
        sides=sides,
        width=width,
        spacing=spacing,
        center_tap=center_tap,
        via_extent=via_extent,
        port_spacing=port_spacing,
        aspect_ratio=aspect_ratio,
        via=via,
        resistance=resistance,
        inductance=inductance,
        add_pgs=add_pgs,
        pgs_diameter=pgs_diameter,
        pgs_width=pgs_width,
        pgs_spacing=pgs_spacing,
        layer_winding=layer_winding,
        layer_underpass=layer_underpass,
        layers_pgs=layers_pgs,
    )

symmetric_inductor

symmetric_transformer

symmetric_transformer(
    d_out: float = 150.0,
    N1: int = 2,
    N2: int = 3,
    sides: int = 8,
    width: float = 7.0,
    spacing: float = 2.0,
    center_tap_primary: bool = False,
    center_tap_secondary: bool = False,
    via_extent: float | None = None,
    port_spacing: float | None = None,
    via: ComponentSpec = "via2",
    resistance: float = 0.5777,
    inductance: float = 3.3303e-11,
    add_pgs: bool = False,
    pgs_diameter: float = 180.0,
    pgs_width: float = 4.0,
    pgs_spacing: float = 2.0,
    layer_winding: LayerSpec = "M3",
    layer_underpass: LayerSpec = "M2",
    layers_pgs: LayerSpecs = ("M1",),
) -> Component

Symmetric (interleaved) transformer.

Two interleaved windings (primary: N1 turns, secondary: N2 turns) share the same octagonal spiral, alternating turn-by-turn. Crossings are routed on layer_underpass wherever a turn boundary needs to jump between quadrants; bridges wire together the top/bottom/left/right quadrant segments directly on layer_winding.

Parameters:

Name Type Description Default
d_out float

Outer diameter of the winding structure, in micrometers.

150.0
N1 int

Number of turns in the primary winding.

2
N2 int

Number of turns in the secondary winding.

3
sides int

Number of polygon sides per full turn (8 = octagonal). Must be a multiple of 4 (quadrant angle lists use sides // 4).

8
width float

Metal trace width in micrometers.

7.0
spacing float

Gap between adjacent turns in micrometers.

2.0
center_tap_primary bool

When True, add a center-tap bridge (and CT1 or CT2 port, depending on parity) for the primary winding.

False
center_tap_secondary bool

When True, add a center-tap bridge (and CT1 or CT2 port, depending on parity) for the secondary winding.

False
via_extent float | None

Length crossing/bridge routes extend past their crossing box on layer_underpass, and the box size used to size the crossing/centertap via arrays. If None, it's derived from the chosen via's own geometry the same way spiral_inductor and symmetric_inductor derive their "extend" value.

None
port_spacing float | None

Horizontal spacing of the differential port pairs.

None
via ComponentSpec

via ComponentSpec connecting winding <-> crossing/centertap.

'via2'
resistance float

Series resistance in ohms, stored as metadata only.

0.5777
inductance float

Inductance in henries, stored as metadata only.

3.3303e-11
add_pgs bool

When True, add a patterned ground shield on layers_pgs.

False
pgs_diameter float

Bounding size D of the ground shield square, in micrometers.

180.0
pgs_width float

Strip width w of each ground shield finger, in micrometers.

4.0
pgs_spacing float

Gap s between adjacent ground shield fingers, in micrometers.

2.0
layer_winding LayerSpec

Metal layer for the main winding (top metal).

'M3'
layer_underpass LayerSpec

Metal layer for crossings and center-tap bridges (one layer below layer_winding).

'M2'
layers_pgs LayerSpecs

Layers on which the patterned ground shield is drawn, kept separate from both layer_winding and layer_underpass

('M1',)

Returns:

Type Description
Component

Component with 4-6 ports: P1+ / P1- -> primary differential terminals (bottom, layer_winding) P2+ / P2- -> secondary differential terminals (top, layer_winding) CT1 -> present if a center tap lands on the bottom side CT2 -> present if a center tap lands on the top side

Source code in gdsfactory/components/analog/transformers.py
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@gf.cell_with_module_name(tags=["analog"])
def symmetric_transformer(
    d_out: float = 150.0,
    N1: int = 2,
    N2: int = 3,
    sides: int = 8,
    width: float = 7.0,
    spacing: float = 2.0,
    center_tap_primary: bool = False,
    center_tap_secondary: bool = False,
    via_extent: float | None = None,
    port_spacing: float | None = None,
    via: ComponentSpec = "via2",
    resistance: float = 0.5777,
    inductance: float = 33.303e-12,
    add_pgs: bool = False,
    pgs_diameter: float = 180.0,
    pgs_width: float = 4.0,
    pgs_spacing: float = 2.0,
    layer_winding: LayerSpec = "M3",
    layer_underpass: LayerSpec = "M2",
    layers_pgs: LayerSpecs = ("M1",),
) -> Component:
    """Symmetric (interleaved) transformer.

    Two interleaved windings (primary: N1 turns, secondary: N2 turns) share
    the same octagonal spiral, alternating turn-by-turn. Crossings are
    routed on layer_underpass wherever a turn boundary needs to jump
    between quadrants; bridges wire together the top/bottom/left/right
    quadrant segments directly on layer_winding.

    Args:
        d_out: Outer diameter of the winding structure, in micrometers.
        N1: Number of turns in the primary winding.
        N2: Number of turns in the secondary winding.
        sides: Number of polygon sides per full turn (8 = octagonal).
            Must be a multiple of 4 (quadrant angle lists use sides // 4).
        width: Metal trace width in micrometers.
        spacing: Gap between adjacent turns in micrometers.
        center_tap_primary: When True, add a center-tap bridge (and CT1 or
            CT2 port, depending on parity) for the primary winding.
        center_tap_secondary: When True, add a center-tap bridge (and CT1
            or CT2 port, depending on parity) for the secondary winding.
        via_extent: Length crossing/bridge routes extend past their
            crossing box on layer_underpass, and the box size used to size
            the crossing/centertap via arrays. If None, it's derived from
            the chosen via's own geometry the same way spiral_inductor and
            symmetric_inductor derive their "extend" value.
        port_spacing: Horizontal spacing of the differential port pairs.
        via: via ComponentSpec connecting winding <-> crossing/centertap.
        resistance: Series resistance in ohms, stored as metadata only.
        inductance: Inductance in henries, stored as metadata only.
        add_pgs: When True, add a patterned ground shield on layers_pgs.
        pgs_diameter: Bounding size D of the ground shield square, in micrometers.
        pgs_width: Strip width w of each ground shield finger, in micrometers.
        pgs_spacing: Gap s between adjacent ground shield fingers, in micrometers.
        layer_winding: Metal layer for the main winding (top metal).
        layer_underpass: Metal layer for crossings and center-tap bridges (one layer below layer_winding).
        layers_pgs: Layers on which the patterned ground shield is drawn,
            kept separate from both layer_winding and layer_underpass

    Returns:
        Component with 4-6 ports:
          P1+ / P1-  ->  primary differential terminals   (bottom, layer_winding)
          P2+ / P2-  ->  secondary differential terminals (top, layer_winding)
          CT1        ->  present if a center tap lands on the bottom side
          CT2        ->  present if a center tap lands on the top side
    """
    return cf.symmetric_transformer(
        d_out=d_out,
        N1=N1,
        N2=N2,
        sides=sides,
        width=width,
        spacing=spacing,
        center_tap_primary=center_tap_primary,
        center_tap_secondary=center_tap_secondary,
        via_extent=via_extent,
        port_spacing=port_spacing,
        via=via,
        resistance=resistance,
        inductance=inductance,
        add_pgs=add_pgs,
        pgs_diameter=pgs_diameter,
        pgs_width=pgs_width,
        pgs_spacing=pgs_spacing,
        layer_winding=layer_winding,
        layer_underpass=layer_underpass,
        layers_pgs=layers_pgs,
    )

symmetric_transformer

transformer_concentric_secondary

transformer_concentric_secondary(
    width: float = 3.0,
    space: float = 3.1,
    diameter: float = 50.0,
    layer_metal: LayerSpec = "M2",
    layer_jumper: LayerSpec = "M1",
    via: ComponentSpec = "via1",
    via_size: float = 3.0,
) -> Component

Single-turn octagonal coil, the secondary of transformer_concentric.

The two leads jump to a lower metal (layer_jumper) right where they meet the coil body, so the leads can be routed straight out past an outer coil without shorting it.

Parameters:

Name Type Description Default
width float

Metal trace width in micrometers.

3.0
space float

Space between the coil and the leads/gap, in micrometers.

3.1
diameter float

Coil diameter in micrometers.

50.0
layer_metal LayerSpec

Layer for the coil body.

'M2'
layer_jumper LayerSpec

Layer for the two leads (must be via-connectable to layer_metal).

'M1'
via ComponentSpec

via ComponentSpec connecting layer_jumper <-> layer_metal.

'via1'
via_size float

Side length of the square via_stack junction pad, in micrometers. via_stack() requires this to be large enough to enclose at least one via square with its enclosure margin — too small raises a ValueError from via_stack() itself.

3.0

Returns:

Type Description
Component

Component with ports P1, P2 on layer_jumper.

Source code in gdsfactory/components/analog/transformers.py
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
@gf.cell
def transformer_concentric_secondary(
    width: float = 3.0,
    space: float = 3.1,
    diameter: float = 50.0,
    layer_metal: LayerSpec = "M2",
    layer_jumper: LayerSpec = "M1",
    via: ComponentSpec = "via1",
    via_size: float = 3.0,
) -> Component:
    """Single-turn octagonal coil, the secondary of transformer_concentric.

    The two leads jump to a lower metal (layer_jumper) right where
    they meet the coil body, so the leads can be routed straight out
    past an outer coil without shorting it.

    Args:
        width: Metal trace width in micrometers.
        space: Space between the coil and the leads/gap, in micrometers.
        diameter: Coil diameter in micrometers.
        layer_metal: Layer for the coil body.
        layer_jumper: Layer for the two leads (must be via-connectable
            to layer_metal).
        via: via ComponentSpec connecting layer_jumper <-> layer_metal.
        via_size: Side length of the square via_stack junction pad, in
            micrometers. via_stack() requires this to be large enough to
            enclose at least one via square with its enclosure margin —
            too small raises a ValueError from via_stack() itself.

    Returns:
        Component with ports P1, P2 on layer_jumper.
    """
    return cf.transformer_concentric_secondary(
        width=width,
        space=space,
        diameter=diameter,
        layer_metal=layer_metal,
        layer_jumper=layer_jumper,
        via=via,
        via_size=via_size,
    )

transformer_concentric_secondary

via3

via3(
    size: tuple[float, float] = (0.7, 0.7),
    enclosure: float = 1.0,
    pitch: float = 2.0,
) -> Component

Via connecting M3 <-> M4, mirroring via1/via2/viac's shape (0.7x0.7um squares, 1um enclosure, 2um pitch) but on VIA3_LAYER.

Only meaningful once M4 also has real z-geometry — see get_extended_layer_stack() for the matching LayerStack entry.

Parameters:

Name Type Description Default
size tuple[float, float]

(width, height) of the via square, in um.

(0.7, 0.7)
enclosure float

metal enclosure around the via, in um.

1.0
pitch float

via array pitch, in um.

2.0
Source code in gdsfactory/components/analog/transformers.py
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
@gf.cell
def via3(
    size: tuple[float, float] = (0.7, 0.7),
    enclosure: float = 1.0,
    pitch: float = 2.0,
) -> Component:
    """Via connecting M3 <-> M4, mirroring via1/via2/viac's shape (0.7x0.7um squares, 1um enclosure, 2um pitch) but on VIA3_LAYER.

    Only meaningful once M4 also has real z-geometry — see
    get_extended_layer_stack() for the matching LayerStack entry.

    Args:
        size: (width, height) of the via square, in um.
        enclosure: metal enclosure around the via, in um.
        pitch: via array pitch, in um.
    """
    return cf.via3(
        size=size,
        enclosure=enclosure,
        pitch=pitch,
    )

via3

bends

bend_circular

bend_circular

bend_circular(
    radius: float | None = None,
    angle: float = 90.0,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    **kwargs: Unpack[ExtrusionPorts]
) -> Component

Returns a radial arc.

Parameters:

Name Type Description Default
radius float | None

in um. Defaults to cross_section_radius.

None
angle float

angle of arc (degrees).

90.0
npoints int | None

number of points.

None
angular_step float | None

If provided, determines the angular step (in degrees) between points. Mutually exclusive with npoints.

None
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
cross_section CrossSectionSpec

spec (CrossSection, string or dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
kwargs Unpack[ExtrusionPorts]

optional port_type override for ports o1/o2. Defaults to the PDK's port policy.

{}
Source code in gdsfactory/components/bends/bend_circular.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@gf.cell_with_module_name(schematic_function=bend_schematic, tags=["bends"])
def bend_circular(
    radius: float | None = None,
    angle: float = 90.0,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: gf.typings.LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    **kwargs: Unpack[ExtrusionPorts],
) -> Component:
    """Returns a radial arc.

    Args:
        radius: in um. Defaults to cross_section_radius.
        angle: angle of arc (degrees).
        npoints: number of points.
        angular_step: If provided, determines the angular step (in degrees) between points. Mutually exclusive with npoints.
        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.
        kwargs: optional ``port_type`` override for ports o1/o2.
            Defaults to the PDK's port policy.
    """
    return cf.bend_circular(
        radius=radius,
        angle=angle,
        npoints=npoints,
        angular_step=angular_step,
        layer=layer,
        width=width,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        **kwargs,
    )

bend_circular_all_angle

bend_circular_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> ComponentAllAngle

Returns a radial arc.

Parameters:

Name Type Description Default
radius float | None

in um. Defaults to cross_section_radius.

None
angle float

angle of arc (degrees).

90.0
npoints int | None

number of points.

None
angular_step float | None

If provided, determines the angular step (in degrees) between points. Mutually exclusive with npoints.

None
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
cross_section CrossSectionSpec

spec (CrossSection, string or dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
Source code in gdsfactory/components/bends/bend_circular.py
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@gf.vcell
def bend_circular_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: gf.typings.LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> ComponentAllAngle:
    """Returns a radial arc.

    Args:
        radius: in um. Defaults to cross_section_radius.
        angle: angle of arc (degrees).
        npoints: number of points.
        angular_step: If provided, determines the angular step (in degrees) between points. Mutually exclusive with npoints.
        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.
    """
    return cf.bend_circular_all_angle(
        radius=radius,
        angle=angle,
        npoints=npoints,
        angular_step=angular_step,
        layer=layer,
        width=width,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
    )

bend_circular

bend_circular_all_angle

bend_circular_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> ComponentAllAngle

Returns a radial arc.

Parameters:

Name Type Description Default
radius float | None

in um. Defaults to cross_section_radius.

None
angle float

angle of arc (degrees).

90.0
npoints int | None

number of points.

None
angular_step float | None

If provided, determines the angular step (in degrees) between points. Mutually exclusive with npoints.

None
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
cross_section CrossSectionSpec

spec (CrossSection, string or dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
Source code in gdsfactory/components/bends/bend_circular.py
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@gf.vcell
def bend_circular_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: gf.typings.LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> ComponentAllAngle:
    """Returns a radial arc.

    Args:
        radius: in um. Defaults to cross_section_radius.
        angle: angle of arc (degrees).
        npoints: number of points.
        angular_step: If provided, determines the angular step (in degrees) between points. Mutually exclusive with npoints.
        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.
    """
    return cf.bend_circular_all_angle(
        radius=radius,
        angle=angle,
        npoints=npoints,
        angular_step=angular_step,
        layer=layer,
        width=width,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
    )
import gdsfactory as gf

gf.gpdk.PDK.activate()

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

bend_circular_heater

bend_circular_heater

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

Creates an arc of arclength theta starting at angle start_angle.

Parameters:

Name Type Description Default
radius float | None

in um. Defaults to cross_section.radius.

None
angle float

angle of arc (degrees).

90
npoints int | None

Number of points used per 360 degrees.

None
heater_to_wg_distance float

in um.

1.2
heater_width float

in um.

0.5
layer_heater LayerSpec

for heater.

'HEATER'
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
Source code in gdsfactory/components/bends/bend_circular_heater.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@gf.cell_with_module_name(schematic_function=bend_schematic, tags=["bends"])
def 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:
    """Creates an arc of arclength `theta` starting at angle `start_angle`.

    Args:
        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.
    """
    return cf.bend_circular_heater(
        radius=radius,
        angle=angle,
        npoints=npoints,
        heater_to_wg_distance=heater_to_wg_distance,
        heater_width=heater_width,
        layer_heater=layer_heater,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
    )

bend_circular_heater

bend_euler

bend_euler

bend_euler(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.5,
    with_arc_floorplan: bool = True,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> Component

Regular degree euler bend.

Parameters:

Name Type Description Default
radius float | None

in um. Defaults to cross_section_radius.

None
angle float

total angle of the curve.

90.0
p float

Proportion of the curve that is an Euler curve.

0.5
with_arc_floorplan bool

if True the size of the bend will be adjusted to match an arc bend with the specified radius. If False: radius is the minimum radius of curvature.

True
npoints int | None

Number of points used per 360 degrees.

None
angular_step float | None

if not None, the angle step in degrees for the all_angle bend.

None
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
Source code in gdsfactory/components/bends/bend_euler.py
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
@gf.cell_with_module_name(schematic_function=bend_schematic, tags=["bends"])
def bend_euler(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.5,
    with_arc_floorplan: bool = True,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> Component:
    """Regular degree euler bend.

    Args:
        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 True the size of the bend will be adjusted to match an arc bend with the specified radius. If False: `radius` is the minimum radius of curvature.
        npoints: Number of points used per 360 degrees.
        angular_step: if not None, the angle step in degrees for the all_angle bend.
        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.
    """
    return cf.bend_euler(
        radius=radius,
        angle=angle,
        p=p,
        with_arc_floorplan=with_arc_floorplan,
        npoints=npoints,
        angular_step=angular_step,
        layer=layer,
        width=width,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
    )

bend_euler_all_angle

bend_euler_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.5,
    with_arc_floorplan: bool = True,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> ComponentAllAngle

Regular degree euler bend.

Parameters:

Name Type Description Default
radius float | None

in um. Defaults to cross_section_radius.

None
angle float

total angle of the curve.

90.0
p float

Proportion of the curve that is an Euler curve.

0.5
with_arc_floorplan bool

If False: radius is the minimum radius of curvature

True
npoints int | None

Number of points used per 360 degrees.

None
angular_step float | None

if not None, the angle step in degrees for the all_angle bend.

None
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
Source code in gdsfactory/components/bends/bend_euler.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
@gf.vcell
def bend_euler_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.5,
    with_arc_floorplan: bool = True,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: gf.typings.LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> ComponentAllAngle:
    """Regular degree euler bend.

    Args:
        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.
        angular_step: if not None, the angle step in degrees for the all_angle bend.
        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.

    """
    return cf.bend_euler_all_angle(
        radius=radius,
        angle=angle,
        p=p,
        with_arc_floorplan=with_arc_floorplan,
        npoints=npoints,
        angular_step=angular_step,
        layer=layer,
        width=width,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
    )

bend_euler_s

bend_euler_s(
    radius: float | None = None,
    p: float = 0.5,
    with_arc_floorplan: bool = True,
    npoints: int | None = None,
    angular_step: float | 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

Sbend made of 2 euler bends.

Parameters:

Name Type Description Default
radius float | None

in um. Defaults to cross_section_radius.

None
p float

Proportion of the curve that is an Euler curve.

0.5
with_arc_floorplan bool

If False: radius is the minimum radius of curvature.

True
npoints int | None

Number of points used per 360 degrees.

None
angular_step float | None

if not None, the angle step in degrees for the all_angle bend.

None
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
port1 str

input port name.

'o1'
port2 str

output port name.

'o2'
                    _____ o2
                   /
                  /
                 /
                /
                |
               /
              /
             /
     o1_____/
Source code in gdsfactory/components/bends/bend_euler.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@gf.cell_with_module_name(schematic_function=sbend_schematic, tags=["bends"])
def bend_euler_s(
    radius: float | None = None,
    p: float = 0.5,
    with_arc_floorplan: bool = True,
    npoints: int | None = None,
    angular_step: float | 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:
    r"""Sbend made of 2 euler bends.

    Args:
        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.
        angular_step: if not None, the angle step in degrees for the all_angle bend.
        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.

    ```text
                        _____ o2
                       /
                      /
                     /
                    /
                    |
                   /
                  /
                 /
         o1_____/
    ```

    """
    return cf.bend_euler_s(
        radius=radius,
        p=p,
        with_arc_floorplan=with_arc_floorplan,
        npoints=npoints,
        angular_step=angular_step,
        layer=layer,
        width=width,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        port1=port1,
        port2=port2,
    )

bend_euler

bend_euler_all_angle

bend_euler_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.5,
    with_arc_floorplan: bool = True,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> ComponentAllAngle

Regular degree euler bend.

Parameters:

Name Type Description Default
radius float | None

in um. Defaults to cross_section_radius.

None
angle float

total angle of the curve.

90.0
p float

Proportion of the curve that is an Euler curve.

0.5
with_arc_floorplan bool

If False: radius is the minimum radius of curvature

True
npoints int | None

Number of points used per 360 degrees.

None
angular_step float | None

if not None, the angle step in degrees for the all_angle bend.

None
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
Source code in gdsfactory/components/bends/bend_euler.py
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
@gf.vcell
def bend_euler_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.5,
    with_arc_floorplan: bool = True,
    npoints: int | None = None,
    angular_step: float | None = None,
    layer: gf.typings.LayerSpec | None = None,
    width: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> ComponentAllAngle:
    """Regular degree euler bend.

    Args:
        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.
        angular_step: if not None, the angle step in degrees for the all_angle bend.
        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.

    """
    return cf.bend_euler_all_angle(
        radius=radius,
        angle=angle,
        p=p,
        with_arc_floorplan=with_arc_floorplan,
        npoints=npoints,
        angular_step=angular_step,
        layer=layer,
        width=width,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
    )
import gdsfactory as gf

gf.gpdk.PDK.activate()

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

bend_euler_s

bend_euler_s(
    radius: float | None = None,
    p: float = 0.5,
    with_arc_floorplan: bool = True,
    npoints: int | None = None,
    angular_step: float | 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

Sbend made of 2 euler bends.

Parameters:

Name Type Description Default
radius float | None

in um. Defaults to cross_section_radius.

None
p float

Proportion of the curve that is an Euler curve.

0.5
with_arc_floorplan bool

If False: radius is the minimum radius of curvature.

True
npoints int | None

Number of points used per 360 degrees.

None
angular_step float | None

if not None, the angle step in degrees for the all_angle bend.

None
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
port1 str

input port name.

'o1'
port2 str

output port name.

'o2'
                    _____ o2
                   /
                  /
                 /
                /
                |
               /
              /
             /
     o1_____/
Source code in gdsfactory/components/bends/bend_euler.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@gf.cell_with_module_name(schematic_function=sbend_schematic, tags=["bends"])
def bend_euler_s(
    radius: float | None = None,
    p: float = 0.5,
    with_arc_floorplan: bool = True,
    npoints: int | None = None,
    angular_step: float | 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:
    r"""Sbend made of 2 euler bends.

    Args:
        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.
        angular_step: if not None, the angle step in degrees for the all_angle bend.
        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.

    ```text
                        _____ o2
                       /
                      /
                     /
                    /
                    |
                   /
                  /
                 /
         o1_____/
    ```

    """
    return cf.bend_euler_s(
        radius=radius,
        p=p,
        with_arc_floorplan=with_arc_floorplan,
        npoints=npoints,
        angular_step=angular_step,
        layer=layer,
        width=width,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        port1=port1,
        port2=port2,
    )

bend_euler_s

bend_modified_hermite

bend_modified_hermite

bend_modified_hermite(
    radius: float = 15,
    angle: float = 90.0,
    inner_tangent_magnitude: float = 26.5,
    outer_tangent_magnitude: float = 30,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width1: float | None = None,
    width2: float | None = None,
    port1: str = "o1",
    port2: str = "o2",
) -> Component

Modified Hermite curve, described in "Low-Loss Silicon Nitride Bent Waveguides at O-Band with Modified Hermite Curves", Donghao Li et al, https://www.mdpi.com/2304-6732/13/2/175 .

Default parameters are taken from Table 3 of https://www.mdpi.com/2304-6732/13/2/175 .

Note that the default inner_tangent_magnitude and outer_tangent_magnitude parameters will need to be changed if you change radius or angle, as optimal values for those parameters depend on radius and angle.

Parameters:

Name Type Description Default
radius float

effective bend radius

15
angle float

angle, in degrees.

90.0
inner_tangent_magnitude float

a1 parameter from Li et al.

26.5
outer_tangent_magnitude float

a2 parameter from Li et al.

30
npoints int

number of points to use for the inner wall of the curve, and the outer wall.

100
cross_section CrossSectionSpec

spec (CrossSection, string or dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width1 float | None

width to use at input. Defaults to cross_section.width.

None
width2 float | None

width to use at output. Defaults to cross_section.width.

None
port1 str

name of input port.

'o1'
port2 str

name of output port.

'o2'
Source code in gdsfactory/components/bends/bend_modified_hermite.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
@gf.cell_with_module_name(schematic_function=bend_schematic, tags=["bends"])
def bend_modified_hermite(
    radius: float = 15,
    angle: float = 90.0,
    inner_tangent_magnitude: float = 26.5,
    outer_tangent_magnitude: float = 30,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width1: float | None = None,
    width2: float | None = None,
    port1: str = "o1",
    port2: str = "o2",
) -> Component:
    """Modified Hermite curve, described in "Low-Loss Silicon Nitride Bent Waveguides at O-Band with Modified Hermite Curves", Donghao Li et al, <https://www.mdpi.com/2304-6732/13/2/175> .

    Default parameters are taken from Table 3 of <https://www.mdpi.com/2304-6732/13/2/175> .

    Note that the default inner_tangent_magnitude and outer_tangent_magnitude parameters will need to be changed if you change radius or angle, as optimal values for those parameters depend on radius and angle.

    Args:
        radius: effective bend radius
        angle: angle, in degrees.
        inner_tangent_magnitude: a1 parameter from Li et al.
        outer_tangent_magnitude: a2 parameter from Li et al.
        npoints: number of points to use for the inner wall of the curve, and the outer wall.
        cross_section: spec (CrossSection, string or dict).
        allow_min_radius_violation: if True allows radius to be smaller than cross_section radius.
        layer: layer to use. Defaults to cross_section.layer.
        width1: width to use at input. Defaults to cross_section.width.
        width2: width to use at output. Defaults to cross_section.width.
        port1: name of input port.
        port2: name of output port.
    """
    return cf.bend_modified_hermite(
        radius=radius,
        angle=angle,
        inner_tangent_magnitude=inner_tangent_magnitude,
        outer_tangent_magnitude=outer_tangent_magnitude,
        npoints=npoints,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        layer=layer,
        width1=width1,
        width2=width2,
        port1=port1,
        port2=port2,
    )

bend_modified_hermite_all_angle

bend_modified_hermite_all_angle(
    radius: float = 15,
    angle: float = 90.0,
    inner_tangent_magnitude: float = 26.5,
    outer_tangent_magnitude: float = 30,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width1: float | None = None,
    width2: float | None = None,
    port1: str = "o1",
    port2: str = "o2",
) -> ComponentAllAngle

Modified Hermite curve, described in "Low-Loss Silicon Nitride Bent Waveguides at O-Band with Modified Hermite Curves", Donghao Li et al, https://www.mdpi.com/2304-6732/13/2/175 .

Default parameters are taken from Table 3 of https://www.mdpi.com/2304-6732/13/2/175 .

This is the all_angle version that can handle angles that aren't integer multiples of 90 degrees.

Note that the default inner_tangent_magnitude and outer_tangent_magnitude parameters will need to be changed if you change radius or angle, as optimal values for those parameters depend on radius and angle.

Parameters:

Name Type Description Default
radius float

effective bend radius

15
angle float

angle, in degrees.

90.0
inner_tangent_magnitude float

a1 parameter from Li et al.

26.5
outer_tangent_magnitude float

a2 parameter from Li et al.

30
npoints int

number of points to use for the inner wall of the curve, and the outer wall.

100
cross_section CrossSectionSpec

spec (CrossSection, string or dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width1 float | None

width to use at input. Defaults to cross_section.width.

None
width2 float | None

width to use at output. Defaults to cross_section.width.

None
port1 str

name of input port.

'o1'
port2 str

name of output port.

'o2'
Source code in gdsfactory/components/bends/bend_modified_hermite.py
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
@gf.vcell
def bend_modified_hermite_all_angle(
    radius: float = 15,
    angle: float = 90.0,
    inner_tangent_magnitude: float = 26.5,
    outer_tangent_magnitude: float = 30,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width1: float | None = None,
    width2: float | None = None,
    port1: str = "o1",
    port2: str = "o2",
) -> ComponentAllAngle:
    """Modified Hermite curve, described in "Low-Loss Silicon Nitride Bent Waveguides at O-Band with Modified Hermite Curves", Donghao Li et al, <https://www.mdpi.com/2304-6732/13/2/175> .

    Default parameters are taken from Table 3 of <https://www.mdpi.com/2304-6732/13/2/175> .

    This is the all_angle version that can handle angles that aren't integer multiples of 90 degrees.


    Note that the default inner_tangent_magnitude and outer_tangent_magnitude parameters will need to be changed if you change radius or angle, as optimal values for those parameters depend on radius and angle.

    Args:
        radius: effective bend radius
        angle: angle, in degrees.
        inner_tangent_magnitude: a1 parameter from Li et al.
        outer_tangent_magnitude: a2 parameter from Li et al.
        npoints: number of points to use for the inner wall of the curve, and the outer wall.
        cross_section: spec (CrossSection, string or dict).
        allow_min_radius_violation: if True allows radius to be smaller than cross_section radius.
        layer: layer to use. Defaults to cross_section.layer.
        width1: width to use at input. Defaults to cross_section.width.
        width2: width to use at output. Defaults to cross_section.width.
        port1: name of input port.
        port2: name of output port.
    """
    return cf.bend_modified_hermite_all_angle(
        radius=radius,
        angle=angle,
        inner_tangent_magnitude=inner_tangent_magnitude,
        outer_tangent_magnitude=outer_tangent_magnitude,
        npoints=npoints,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        layer=layer,
        width1=width1,
        width2=width2,
        port1=port1,
        port2=port2,
    )

bend_modified_hermite_s

bend_modified_hermite_s(
    radius: float = 15,
    inner_tangent_magnitude: float = 26.5,
    outer_tangent_magnitude: float = 30,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width: float | None = None,
    port1: str = "o1",
    port2: str = "o2",
) -> Component

Sbend made of 2 modified Hermite bends.

Parameters:

Name Type Description Default
radius float

effective bend radius

15
inner_tangent_magnitude float

a1 parameter from Li et al.

26.5
outer_tangent_magnitude float

a2 parameter from Li et al.

30
npoints int

number of points to use for the inner wall of the curve, and the outer wall.

100
cross_section CrossSectionSpec

spec (CrossSection, string or dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width at input and output (the width generally varies in the interior of the bend). Defaults to cross_section.width.

None
port1 str

name of input port.

'o1'
port2 str

name of output port.

'o2'
Source code in gdsfactory/components/bends/bend_modified_hermite.py
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
@gf.cell_with_module_name(schematic_function=sbend_schematic, tags=["bends"])
def bend_modified_hermite_s(
    radius: float = 15,
    inner_tangent_magnitude: float = 26.5,
    outer_tangent_magnitude: float = 30,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width: float | None = None,
    port1: str = "o1",
    port2: str = "o2",
) -> Component:
    """Sbend made of 2 modified Hermite bends.

    Args:
        radius: effective bend radius
        inner_tangent_magnitude: a1 parameter from Li et al.
        outer_tangent_magnitude: a2 parameter from Li et al.
        npoints: number of points to use for the inner wall of the curve, and the outer wall.
        cross_section: spec (CrossSection, string or dict).
        allow_min_radius_violation: if True allows radius to be smaller than cross_section radius.
        layer: layer to use. Defaults to cross_section.layer.
        width: width  at input and output (the width generally varies in the interior of the bend). Defaults to cross_section.width.
        port1: name of input port.
        port2: name of output port.
    """
    return cf.bend_modified_hermite_s(
        radius=radius,
        inner_tangent_magnitude=inner_tangent_magnitude,
        outer_tangent_magnitude=outer_tangent_magnitude,
        npoints=npoints,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        layer=layer,
        width=width,
        port1=port1,
        port2=port2,
    )

bend_modified_hermite

bend_modified_hermite180 module-attribute

bend_modified_hermite180 = CellAlias(
    bend_modified_hermite, angle=180
)

bend_modified_hermite180

bend_modified_hermite_all_angle

bend_modified_hermite_all_angle(
    radius: float = 15,
    angle: float = 90.0,
    inner_tangent_magnitude: float = 26.5,
    outer_tangent_magnitude: float = 30,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width1: float | None = None,
    width2: float | None = None,
    port1: str = "o1",
    port2: str = "o2",
) -> ComponentAllAngle

Modified Hermite curve, described in "Low-Loss Silicon Nitride Bent Waveguides at O-Band with Modified Hermite Curves", Donghao Li et al, https://www.mdpi.com/2304-6732/13/2/175 .

Default parameters are taken from Table 3 of https://www.mdpi.com/2304-6732/13/2/175 .

This is the all_angle version that can handle angles that aren't integer multiples of 90 degrees.

Note that the default inner_tangent_magnitude and outer_tangent_magnitude parameters will need to be changed if you change radius or angle, as optimal values for those parameters depend on radius and angle.

Parameters:

Name Type Description Default
radius float

effective bend radius

15
angle float

angle, in degrees.

90.0
inner_tangent_magnitude float

a1 parameter from Li et al.

26.5
outer_tangent_magnitude float

a2 parameter from Li et al.

30
npoints int

number of points to use for the inner wall of the curve, and the outer wall.

100
cross_section CrossSectionSpec

spec (CrossSection, string or dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width1 float | None

width to use at input. Defaults to cross_section.width.

None
width2 float | None

width to use at output. Defaults to cross_section.width.

None
port1 str

name of input port.

'o1'
port2 str

name of output port.

'o2'
Source code in gdsfactory/components/bends/bend_modified_hermite.py
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
@gf.vcell
def bend_modified_hermite_all_angle(
    radius: float = 15,
    angle: float = 90.0,
    inner_tangent_magnitude: float = 26.5,
    outer_tangent_magnitude: float = 30,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width1: float | None = None,
    width2: float | None = None,
    port1: str = "o1",
    port2: str = "o2",
) -> ComponentAllAngle:
    """Modified Hermite curve, described in "Low-Loss Silicon Nitride Bent Waveguides at O-Band with Modified Hermite Curves", Donghao Li et al, <https://www.mdpi.com/2304-6732/13/2/175> .

    Default parameters are taken from Table 3 of <https://www.mdpi.com/2304-6732/13/2/175> .

    This is the all_angle version that can handle angles that aren't integer multiples of 90 degrees.


    Note that the default inner_tangent_magnitude and outer_tangent_magnitude parameters will need to be changed if you change radius or angle, as optimal values for those parameters depend on radius and angle.

    Args:
        radius: effective bend radius
        angle: angle, in degrees.
        inner_tangent_magnitude: a1 parameter from Li et al.
        outer_tangent_magnitude: a2 parameter from Li et al.
        npoints: number of points to use for the inner wall of the curve, and the outer wall.
        cross_section: spec (CrossSection, string or dict).
        allow_min_radius_violation: if True allows radius to be smaller than cross_section radius.
        layer: layer to use. Defaults to cross_section.layer.
        width1: width to use at input. Defaults to cross_section.width.
        width2: width to use at output. Defaults to cross_section.width.
        port1: name of input port.
        port2: name of output port.
    """
    return cf.bend_modified_hermite_all_angle(
        radius=radius,
        angle=angle,
        inner_tangent_magnitude=inner_tangent_magnitude,
        outer_tangent_magnitude=outer_tangent_magnitude,
        npoints=npoints,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        layer=layer,
        width1=width1,
        width2=width2,
        port1=port1,
        port2=port2,
    )
import gdsfactory as gf

gf.gpdk.PDK.activate()

c = gf.components.bend_modified_hermite_all_angle(radius=15, angle=90, inner_tangent_magnitude=26.5, outer_tangent_magnitude=30, npoints=100, cross_section='strip', allow_min_radius_violation=False, port1='o1', port2='o2').copy()
c.draw_ports()
c.plot()

bend_modified_hermite_s

bend_modified_hermite_s(
    radius: float = 15,
    inner_tangent_magnitude: float = 26.5,
    outer_tangent_magnitude: float = 30,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width: float | None = None,
    port1: str = "o1",
    port2: str = "o2",
) -> Component

Sbend made of 2 modified Hermite bends.

Parameters:

Name Type Description Default
radius float

effective bend radius

15
inner_tangent_magnitude float

a1 parameter from Li et al.

26.5
outer_tangent_magnitude float

a2 parameter from Li et al.

30
npoints int

number of points to use for the inner wall of the curve, and the outer wall.

100
cross_section CrossSectionSpec

spec (CrossSection, string or dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width at input and output (the width generally varies in the interior of the bend). Defaults to cross_section.width.

None
port1 str

name of input port.

'o1'
port2 str

name of output port.

'o2'
Source code in gdsfactory/components/bends/bend_modified_hermite.py
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
@gf.cell_with_module_name(schematic_function=sbend_schematic, tags=["bends"])
def bend_modified_hermite_s(
    radius: float = 15,
    inner_tangent_magnitude: float = 26.5,
    outer_tangent_magnitude: float = 30,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width: float | None = None,
    port1: str = "o1",
    port2: str = "o2",
) -> Component:
    """Sbend made of 2 modified Hermite bends.

    Args:
        radius: effective bend radius
        inner_tangent_magnitude: a1 parameter from Li et al.
        outer_tangent_magnitude: a2 parameter from Li et al.
        npoints: number of points to use for the inner wall of the curve, and the outer wall.
        cross_section: spec (CrossSection, string or dict).
        allow_min_radius_violation: if True allows radius to be smaller than cross_section radius.
        layer: layer to use. Defaults to cross_section.layer.
        width: width  at input and output (the width generally varies in the interior of the bend). Defaults to cross_section.width.
        port1: name of input port.
        port2: name of output port.
    """
    return cf.bend_modified_hermite_s(
        radius=radius,
        inner_tangent_magnitude=inner_tangent_magnitude,
        outer_tangent_magnitude=outer_tangent_magnitude,
        npoints=npoints,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        layer=layer,
        width=width,
        port1=port1,
        port2=port2,
    )

bend_modified_hermite_s

bend_s

bend_s

bend_s(
    size: Size = (11.0, 1.8),
    npoints: int = 99,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    width: float | None = None,
) -> Component

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:

Name Type Description Default
size Size

in x and y direction.

(11.0, 1.8)
npoints int

number of points.

99
cross_section CrossSectionSpec

spec.

'strip'
allow_min_radius_violation bool

bool.

False
width float | None

width to use. Defaults to cross_section.width.

None
Source code in gdsfactory/components/bends/bend_s.py
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
@gf.cell_with_module_name(schematic_function=sbend_schematic, tags=["bends"])
def bend_s(
    size: Size = (11.0, 1.8),
    npoints: int = 99,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    width: float | None = None,
) -> Component:
    """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

    Args:
        size: in x and y direction.
        npoints: number of points.
        cross_section: spec.
        allow_min_radius_violation: bool.
        width: width to use. Defaults to cross_section.width.

    """
    return cf.bend_s(
        size=size,
        npoints=npoints,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        width=width,
    )

bend_s_offset

bend_s_offset(
    offset: float = 40.0,
    radius: float | None = 10.0,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
    with_euler: bool | None = None,
    p: float = 1,
    with_arc_floorplan: bool = False,
    npoints: int | None = None,
    angular_step: float | None = None,
) -> gf.Component

Return S bend made of two bends with a straight section.

Parameters:

Name Type Description Default
offset float

in um.

40.0
radius float | None

in um. if None, uses cross_section_radius.

10.0
cross_section CrossSectionSpec

spec.

'strip'
width float | None

width to use. Defaults to cross_section.width.

None
with_euler bool | None

deprecated, use p=0 for circular arc instead.

None
p float

1 means standard Euler bend. 0 means circular arc.

1
with_arc_floorplan bool

if True the size of the bend will be adjusted to match an arc bend with the specified radius. If False: radius is the minimum radius of curvature.

False
npoints int | None

number of points.

None
angular_step float | None

If provided, determines the angular step (in degrees) between points. Mutually exclusive with npoints.

None
Source code in gdsfactory/components/bends/bend_s.py
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
@gf.cell_with_module_name(schematic_function=sbend_schematic, tags=["bends"])
def bend_s_offset(
    offset: float = 40.0,
    radius: float | None = 10.0,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
    with_euler: bool | None = None,
    p: float = 1,
    with_arc_floorplan: bool = False,
    npoints: int | None = None,
    angular_step: float | None = None,
) -> gf.Component:
    """Return S bend made of two bends with a straight section.

    Args:
        offset: in um.
        radius: in um. if None, uses cross_section_radius.
        cross_section: spec.
        width: width to use. Defaults to cross_section.width.
        with_euler: deprecated, use p=0 for circular arc instead.
        p: 1 means standard Euler bend. 0 means circular arc.
        with_arc_floorplan: if True the size of the bend will be adjusted to match an arc bend with the specified radius. If False: `radius` is the minimum radius of curvature.
        npoints: number of points.
        angular_step: If provided, determines the angular step (in degrees) between points. Mutually exclusive with npoints.
    """
    return cf.bend_s_offset(
        offset=offset,
        radius=radius,
        cross_section=cross_section,
        width=width,
        with_euler=with_euler,
        p=p,
        with_arc_floorplan=with_arc_floorplan,
        npoints=npoints,
        angular_step=angular_step,
    )

bezier

bezier(
    control_points: Coordinates = (
        (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,
    width: float | None = None,
    width_function: WidthFunction | None = None,
) -> Component

Returns Bezier bend.

Parameters:

Name Type Description Default
control_points Coordinates

list of points.

((0.0, 0.0), (5.0, 0.0), (5.0, 1.8), (10.0, 1.8))
npoints int

number of points varying between 0 and 1.

201
with_manhattan_facing_angles bool

bool.

True
start_angle int | None

optional start angle in deg.

None
end_angle int | None

optional end angle in deg.

None
cross_section CrossSectionSpec

spec.

'strip'
bend_radius_error_type ErrorType | None

error type.

None
allow_min_radius_violation bool

bool.

False
width float | None

width to use. Defaults to cross_section.width.

None
width_function WidthFunction | None

optional main-strip width along the extruded path.

None
Source code in gdsfactory/components/bends/bend_s.py
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@gf.cell_with_module_name(schematic_function=sbend_schematic, tags=["bends"])
def bezier(
    control_points: Coordinates = ((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,
    width: float | None = None,
    width_function: gf.typings.WidthFunction | None = None,
) -> Component:
    """Returns Bezier bend.

    Args:
        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.
        width: width to use. Defaults to cross_section.width.
        width_function: optional main-strip width along the extruded path.
    """
    return cf.bezier(
        control_points=control_points,
        npoints=npoints,
        with_manhattan_facing_angles=with_manhattan_facing_angles,
        start_angle=start_angle,
        end_angle=end_angle,
        cross_section=cross_section,
        bend_radius_error_type=bend_radius_error_type,
        allow_min_radius_violation=allow_min_radius_violation,
        width=width,
        width_function=width_function,
    )

bezier_curve

bezier_curve(
    t: NDArray[floating[Any]], control_points: Coordinates
) -> npt.NDArray[np.floating[Any]]

Returns bezier coordinates.

Parameters:

Name Type Description Default
t NDArray[floating[Any]]

1D array of points varying between 0 and 1.

required
control_points Coordinates

for the bezier curve.

required
Source code in gdsfactory/component_functions/bends/bend_s.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
def bezier_curve(
    t: npt.NDArray[np.floating[Any]], control_points: Coordinates
) -> npt.NDArray[np.floating[Any]]:
    """Returns bezier coordinates.

    Args:
        t: 1D array of points varying between 0 and 1.
        control_points: for the bezier curve.
    """
    from scipy.special import binom

    xs = 0.0
    ys = 0.0
    n = len(control_points) - 1
    for k in range(n + 1):
        ank = binom(n, k) * (1 - t) ** (n - k) * t**k
        xs += ank * control_points[k][0]
        ys += ank * control_points[k][1]

    return np.column_stack([xs, ys])

find_min_curv_bezier_control_points

find_min_curv_bezier_control_points(
    start_point: Coordinate,
    end_point: Coordinate,
    start_angle: float,
    end_angle: float,
    npoints: int = 201,
    alpha: float = 0.05,
    nb_pts: int = 2,
) -> Coordinates

Returns bezier control points that minimize curvature.

Parameters:

Name Type Description Default
start_point Coordinate

start point.

required
end_point Coordinate

end point.

required
start_angle float

start angle in deg.

required
end_angle float

end angle in deg.

required
npoints int

number of points varying between 0 and 1.

201
alpha float

weight for angle mismatch.

0.05
nb_pts int

number of control points.

2
Source code in gdsfactory/component_functions/bends/bend_s.py
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
def find_min_curv_bezier_control_points(
    start_point: Coordinate,
    end_point: Coordinate,
    start_angle: float,
    end_angle: float,
    npoints: int = 201,
    alpha: float = 0.05,
    nb_pts: int = 2,
) -> Coordinates:
    """Returns bezier control points that minimize curvature.

    Args:
        start_point: start point.
        end_point: end point.
        start_angle: start angle in deg.
        end_angle: end angle in deg.
        npoints: number of points varying between 0 and 1.
        alpha: weight for angle mismatch.
        nb_pts: number of control points.
    """
    from scipy.optimize import minimize

    t = np.linspace(0, 1, npoints)

    def array_1d_to_cpts(a: npt.NDArray[np.float64]) -> list[tuple[float, float]]:
        xs = a[::2]
        ys = a[1::2]
        return list(zip(xs, ys, strict=False))

    def objective_func(p: npt.NDArray[np.float64]) -> float:
        """Minimize  max curvaturea and negligible start angle and end angle mismatch."""
        ps = array_1d_to_cpts(p)
        control_points = [start_point] + ps + [end_point]
        path_points = bezier_curve(t, control_points)

        max_curv = max(np.abs(curvature(path_points, t)))

        angles = angles_deg(path_points)
        dstart_angle = abs(angles[0] - start_angle)
        dend_angle = abs(angles[-2] - end_angle)
        angle_mismatch = dstart_angle + dend_angle
        return float(angle_mismatch * alpha + max_curv)

    x0, y0 = start_point[0], start_point[1]
    xn, yn = end_point[0], end_point[1]

    initial_guess: list[float] = []
    for i in range(nb_pts):
        x = (i + 1) * (x0 + xn) / nb_pts
        y = (i + 1) * (y0 + yn) / nb_pts
        initial_guess += [x, y]

    # initial_guess = [(x0 + xn) / 2, y0, (x0 + xn) / 2, yn]
    res = minimize(objective_func, initial_guess, method="Nelder-Mead")
    p = res.x
    points = [start_point] + array_1d_to_cpts(p) + [end_point]
    return tuple(
        (gf.snap.snap_to_grid(float(x)), gf.snap.snap_to_grid(float(y)))
        for x, y in points
    )

get_min_sbend_size

get_min_sbend_size(
    size: tuple[float | None, float | None] = (None, 10.0),
    cross_section: CrossSectionSpec = "strip",
    num_points: int = 100,
) -> float

Returns the minimum sbend size to comply with bend radius requirements.

Parameters:

Name Type Description Default
size tuple[float | None, float | None]

in x and y direction. One of them is None, which is the size we need to figure out.

(None, 10.0)
cross_section CrossSectionSpec

spec.

'strip'
num_points int

number of points to iterate over between max_size and 0.1 * max_size.

100
Source code in gdsfactory/component_functions/bends/bend_s.py
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
def get_min_sbend_size(
    size: tuple[float | None, float | None] = (None, 10.0),
    cross_section: CrossSectionSpec = "strip",
    num_points: int = 100,
) -> float:
    """Returns the minimum sbend size to comply with bend radius requirements.

    Args:
        size: in x and y direction. One of them is None, which is the size we need to figure out.
        cross_section: spec.
        num_points: number of points to iterate over between max_size and 0.1 * max_size.
    """
    size_list = list(size)
    cross_section_f = gf.get_cross_section(cross_section)

    if size_list[0] is None:
        ind = 0
        known_s = size_list[1]
    elif size_list[1] is None:
        ind = 1
        known_s = size_list[0]
    else:
        raise ValueError("One of the two elements in size has to be None")

    min_radius = cross_section_f.radius

    if min_radius is None:
        raise ValueError("The min radius for the specified layer is not known!")

    min_size = np.inf

    assert known_s is not None

    # Guess sizes, iterate over them until we cannot achieve the min radius
    # the max size corresponds to an ellipsoid
    max_size = float(np.sqrt(np.abs(min_radius * known_s)) * 2.5)
    sizes = np.linspace(max_size, 0.1 * max_size, num_points)

    for s in sizes:
        sz = size_list
        sz[ind] = s
        dx, dy = size_list
        assert dx is not None and dy is not None
        control_points = ((0, 0), (dx / 2, 0), (dx / 2, dy), (dx, dy))
        npoints = 201
        t = np.linspace(0, 1, npoints)
        path_points = bezier_curve(t, control_points)
        curv = curvature(path_points, t)
        min_bend_radius = 1 / max(np.abs(curv))
        if min_bend_radius < min_radius:
            min_size = s
            break

    return min_size

bend_s

bend_s_offset

bend_s_offset(
    offset: float = 40.0,
    radius: float | None = 10.0,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
    with_euler: bool | None = None,
    p: float = 1,
    with_arc_floorplan: bool = False,
    npoints: int | None = None,
    angular_step: float | None = None,
) -> gf.Component

Return S bend made of two bends with a straight section.

Parameters:

Name Type Description Default
offset float

in um.

40.0
radius float | None

in um. if None, uses cross_section_radius.

10.0
cross_section CrossSectionSpec

spec.

'strip'
width float | None

width to use. Defaults to cross_section.width.

None
with_euler bool | None

deprecated, use p=0 for circular arc instead.

None
p float

1 means standard Euler bend. 0 means circular arc.

1
with_arc_floorplan bool

if True the size of the bend will be adjusted to match an arc bend with the specified radius. If False: radius is the minimum radius of curvature.

False
npoints int | None

number of points.

None
angular_step float | None

If provided, determines the angular step (in degrees) between points. Mutually exclusive with npoints.

None
Source code in gdsfactory/components/bends/bend_s.py
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
@gf.cell_with_module_name(schematic_function=sbend_schematic, tags=["bends"])
def bend_s_offset(
    offset: float = 40.0,
    radius: float | None = 10.0,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
    with_euler: bool | None = None,
    p: float = 1,
    with_arc_floorplan: bool = False,
    npoints: int | None = None,
    angular_step: float | None = None,
) -> gf.Component:
    """Return S bend made of two bends with a straight section.

    Args:
        offset: in um.
        radius: in um. if None, uses cross_section_radius.
        cross_section: spec.
        width: width to use. Defaults to cross_section.width.
        with_euler: deprecated, use p=0 for circular arc instead.
        p: 1 means standard Euler bend. 0 means circular arc.
        with_arc_floorplan: if True the size of the bend will be adjusted to match an arc bend with the specified radius. If False: `radius` is the minimum radius of curvature.
        npoints: number of points.
        angular_step: If provided, determines the angular step (in degrees) between points. Mutually exclusive with npoints.
    """
    return cf.bend_s_offset(
        offset=offset,
        radius=radius,
        cross_section=cross_section,
        width=width,
        with_euler=with_euler,
        p=p,
        with_arc_floorplan=with_arc_floorplan,
        npoints=npoints,
        angular_step=angular_step,
    )

bend_s_offset

bend_topic

bend_topic

bend_topic(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.1,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width: float | None = None,
) -> Component

Returns a regular degree Third Order Polynomial Interconnected Circular (TOPIC) bend component.

The implementation follows the description in this publication https://arxiv.org/html/2411.15025v1.

The bend consists of three parts: a. Initial transition from straight to bend, known as TOP segment. b. Circular part whose center and radius are calculated analytically. c. Mirroring of TOP segment with respect to the bisection of the angle.

Parameters:

Name Type Description Default
radius float | None

radius at the start and end of bend.

None
angle float

total angle of the curve in degrees.

90.0
p float

used to calculate the angle of the bend at the end of TOP / start of circular arc, as p*angle. It should be within [0, 0.5).

0.1
npoints int

Number of points used per 360 degrees.

100
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
Source code in gdsfactory/components/bends/bend_topic.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@gf.cell_with_module_name(schematic_function=bend_schematic, tags=["bends"])
def bend_topic(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.1,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width: float | None = None,
) -> Component:
    """Returns a regular degree Third Order Polynomial Interconnected Circular (TOPIC) bend component.

    The implementation follows the description in this publication <https://arxiv.org/html/2411.15025v1>.

    The bend consists of three parts:
    a. Initial transition from straight to bend, known as TOP segment.
    b. Circular part whose center and radius are calculated analytically.
    c. Mirroring of TOP segment with respect to the bisection of the angle.

    Args:
        radius: radius at the start and end of bend.
        angle: total angle of the curve in degrees.
        p: used to calculate the angle of the bend at the end of TOP / start of circular arc, as p*angle. It should be within [0, 0.5).
        npoints: Number of points used per 360 degrees.
        cross_section: specification (CrossSection, string, CrossSectionFactory dict).
        allow_min_radius_violation: if True allows radius to be smaller than cross_section radius.
        layer: layer to use. Defaults to cross_section.layer.
        width: width to use. Defaults to cross_section.width.
    """
    return cf.bend_topic(
        radius=radius,
        angle=angle,
        p=p,
        npoints=npoints,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        layer=layer,
        width=width,
    )

bend_topic_all_angle

bend_topic_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.1,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width: float | None = None,
) -> ComponentAllAngle

Returns a Third Order Polynomial Interconnected Circular (TOPIC) bend component of arbitrary angle.

The implementation follows the description in this publication https://arxiv.org/html/2411.15025v1.

The bend consists of three parts: a. Initial transition from straight to bend, known as TOP segment. b. Circular part whose center and radius are calculated analytically. c. Mirroring of TOP segment with respect to the bisection of the angle.

Parameters:

Name Type Description Default
radius float | None

radius at the start and end of bend.

None
angle float

total angle of the curve in degrees.

90.0
p float

used to calculate the angle of the bend at the end of TOP / start of circular arc, as p*angle. It should be within [0, 0.5).

0.1
npoints int

Number of points used per 360 degrees.

100
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
Source code in gdsfactory/components/bends/bend_topic.py
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@gf.vcell
def bend_topic_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.1,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width: float | None = None,
) -> ComponentAllAngle:
    """Returns a Third Order Polynomial Interconnected Circular (TOPIC) bend component of arbitrary angle.

    The implementation follows the description in this publication <https://arxiv.org/html/2411.15025v1>.

    The bend consists of three parts:
    a. Initial transition from straight to bend, known as TOP segment.
    b. Circular part whose center and radius are calculated analytically.
    c. Mirroring of TOP segment with respect to the bisection of the angle.

    Args:
        radius: radius at the start and end of bend.
        angle: total angle of the curve in degrees.
        p: used to calculate the angle of the bend at the end of TOP / start of circular arc, as p*angle. It should be within [0, 0.5).
        npoints: Number of points used per 360 degrees.
        cross_section: specification (CrossSection, string, CrossSectionFactory dict).
        allow_min_radius_violation: if True allows radius to be smaller than cross_section radius.
        layer: layer to use. Defaults to cross_section.layer.
        width: width to use. Defaults to cross_section.width.
    """
    return cf.bend_topic_all_angle(
        radius=radius,
        angle=angle,
        p=p,
        npoints=npoints,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        layer=layer,
        width=width,
    )

bend_topic_s

bend_topic_s(
    radius: float | None = None,
    p: float = 0.1,
    npoints: int = 100,
    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

Sbend made of 2 topic bends.

Parameters:

Name Type Description Default
radius float | None

radius at the start and end of bend.

None
p float

used to calculate the angle of the bend at the end of TOP / start of circular arc, as p*angle. It should be within [0, 0.5).

0.1
npoints int

Number of points used per 360 degrees.

100
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
port1 str

input port name.

'o1'
port2 str

output port name.

'o2'
                    _____ o2
                   /
                  /
                 /
                /
                |
               /
              /
             /
     o1_____/
Source code in gdsfactory/components/bends/bend_topic.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
@gf.cell_with_module_name(schematic_function=sbend_schematic, tags=["bends"])
def bend_topic_s(
    radius: float | None = None,
    p: float = 0.1,
    npoints: int = 100,
    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:
    r"""Sbend made of 2 topic bends.

    Args:
        radius: radius at the start and end of bend.
        p: used to calculate the angle of the bend at the end of TOP / start of circular arc, as p*angle. It should be within [0, 0.5).
        npoints: Number of points used per 360 degrees.
        cross_section: specification (CrossSection, string, CrossSectionFactory dict).
        allow_min_radius_violation: if True allows radius to be smaller than cross_section radius.
        layer: layer to use. Defaults to cross_section.layer.
        width: width to use. Defaults to cross_section.width.
        port1: input port name.
        port2: output port name.

    ```text
                        _____ o2
                       /
                      /
                     /
                    /
                    |
                   /
                  /
                 /
         o1_____/
    ```

    """
    return cf.bend_topic_s(
        radius=radius,
        p=p,
        npoints=npoints,
        layer=layer,
        width=width,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        port1=port1,
        port2=port2,
    )

bend_topic

bend_topic180 module-attribute

bend_topic180 = CellAlias(bend_topic, angle=180)

bend_topic180

bend_topic_all_angle

bend_topic_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.1,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width: float | None = None,
) -> ComponentAllAngle

Returns a Third Order Polynomial Interconnected Circular (TOPIC) bend component of arbitrary angle.

The implementation follows the description in this publication https://arxiv.org/html/2411.15025v1.

The bend consists of three parts: a. Initial transition from straight to bend, known as TOP segment. b. Circular part whose center and radius are calculated analytically. c. Mirroring of TOP segment with respect to the bisection of the angle.

Parameters:

Name Type Description Default
radius float | None

radius at the start and end of bend.

None
angle float

total angle of the curve in degrees.

90.0
p float

used to calculate the angle of the bend at the end of TOP / start of circular arc, as p*angle. It should be within [0, 0.5).

0.1
npoints int

Number of points used per 360 degrees.

100
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
Source code in gdsfactory/components/bends/bend_topic.py
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@gf.vcell
def bend_topic_all_angle(
    radius: float | None = None,
    angle: float = 90.0,
    p: float = 0.1,
    npoints: int = 100,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    layer: LayerSpec | None = None,
    width: float | None = None,
) -> ComponentAllAngle:
    """Returns a Third Order Polynomial Interconnected Circular (TOPIC) bend component of arbitrary angle.

    The implementation follows the description in this publication <https://arxiv.org/html/2411.15025v1>.

    The bend consists of three parts:
    a. Initial transition from straight to bend, known as TOP segment.
    b. Circular part whose center and radius are calculated analytically.
    c. Mirroring of TOP segment with respect to the bisection of the angle.

    Args:
        radius: radius at the start and end of bend.
        angle: total angle of the curve in degrees.
        p: used to calculate the angle of the bend at the end of TOP / start of circular arc, as p*angle. It should be within [0, 0.5).
        npoints: Number of points used per 360 degrees.
        cross_section: specification (CrossSection, string, CrossSectionFactory dict).
        allow_min_radius_violation: if True allows radius to be smaller than cross_section radius.
        layer: layer to use. Defaults to cross_section.layer.
        width: width to use. Defaults to cross_section.width.
    """
    return cf.bend_topic_all_angle(
        radius=radius,
        angle=angle,
        p=p,
        npoints=npoints,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        layer=layer,
        width=width,
    )
import gdsfactory as gf

gf.gpdk.PDK.activate()

c = gf.components.bend_topic_all_angle(angle=90, p=0.1, npoints=100, cross_section='strip', allow_min_radius_violation=False).copy()
c.draw_ports()
c.plot()

bend_topic_s

bend_topic_s(
    radius: float | None = None,
    p: float = 0.1,
    npoints: int = 100,
    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

Sbend made of 2 topic bends.

Parameters:

Name Type Description Default
radius float | None

radius at the start and end of bend.

None
p float

used to calculate the angle of the bend at the end of TOP / start of circular arc, as p*angle. It should be within [0, 0.5).

0.1
npoints int

Number of points used per 360 degrees.

100
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
allow_min_radius_violation bool

if True allows radius to be smaller than cross_section radius.

False
layer LayerSpec | None

layer to use. Defaults to cross_section.layer.

None
width float | None

width to use. Defaults to cross_section.width.

None
port1 str

input port name.

'o1'
port2 str

output port name.

'o2'
                    _____ o2
                   /
                  /
                 /
                /
                |
               /
              /
             /
     o1_____/
Source code in gdsfactory/components/bends/bend_topic.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
@gf.cell_with_module_name(schematic_function=sbend_schematic, tags=["bends"])
def bend_topic_s(
    radius: float | None = None,
    p: float = 0.1,
    npoints: int = 100,
    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:
    r"""Sbend made of 2 topic bends.

    Args:
        radius: radius at the start and end of bend.
        p: used to calculate the angle of the bend at the end of TOP / start of circular arc, as p*angle. It should be within [0, 0.5).
        npoints: Number of points used per 360 degrees.
        cross_section: specification (CrossSection, string, CrossSectionFactory dict).
        allow_min_radius_violation: if True allows radius to be smaller than cross_section radius.
        layer: layer to use. Defaults to cross_section.layer.
        width: width to use. Defaults to cross_section.width.
        port1: input port name.
        port2: output port name.

    ```text
                        _____ o2
                       /
                      /
                     /
                    /
                    |
                   /
                  /
                 /
         o1_____/
    ```

    """
    return cf.bend_topic_s(
        radius=radius,
        p=p,
        npoints=npoints,
        layer=layer,
        width=width,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        port1=port1,
        port2=port2,
    )

bend_topic_s

bezier

bezier(
    control_points: Coordinates = (
        (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,
    width: float | None = None,
    width_function: WidthFunction | None = None,
) -> Component

Returns Bezier bend.

Parameters:

Name Type Description Default
control_points Coordinates

list of points.

((0.0, 0.0), (5.0, 0.0), (5.0, 1.8), (10.0, 1.8))
npoints int

number of points varying between 0 and 1.

201
with_manhattan_facing_angles bool

bool.

True
start_angle int | None

optional start angle in deg.

None
end_angle int | None

optional end angle in deg.

None
cross_section CrossSectionSpec

spec.

'strip'
bend_radius_error_type ErrorType | None

error type.

None
allow_min_radius_violation bool

bool.

False
width float | None

width to use. Defaults to cross_section.width.

None
width_function WidthFunction | None

optional main-strip width along the extruded path.

None
Source code in gdsfactory/components/bends/bend_s.py
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@gf.cell_with_module_name(schematic_function=sbend_schematic, tags=["bends"])
def bezier(
    control_points: Coordinates = ((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,
    width: float | None = None,
    width_function: gf.typings.WidthFunction | None = None,
) -> Component:
    """Returns Bezier bend.

    Args:
        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.
        width: width to use. Defaults to cross_section.width.
        width_function: optional main-strip width along the extruded path.
    """
    return cf.bezier(
        control_points=control_points,
        npoints=npoints,
        with_manhattan_facing_angles=with_manhattan_facing_angles,
        start_angle=start_angle,
        end_angle=end_angle,
        cross_section=cross_section,
        bend_radius_error_type=bend_radius_error_type,
        allow_min_radius_violation=allow_min_radius_violation,
        width=width,
        width_function=width_function,
    )

bezier

containers

add_fiber_array_optical_south_electrical_north

add_fiber_array_optical_south_electrical_north

add_fiber_array_optical_south_electrical_north(
    component: ComponentSpec = "straight_heater_metal",
    pad: ComponentSpec = "pad",
    grating_coupler: ComponentSpec = "grating_coupler_te",
    cross_section_metal: CrossSectionSpec = "metal_routing",
    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: AngleInDegrees | None = 90,
    npads: int | None = None,
    port_types_grating_couplers: list[str] | None = None,
    auto_taper_pads: bool = True,
    **kwargs: Any
) -> Component

Returns a fiber array with Optical gratings on South and Electrical pads on North.

This a test configuration for DC pads.

Parameters:

Name Type Description Default
component ComponentSpec

component spec to add fiber and pads.

'straight_heater_metal'
pad ComponentSpec

pad spec.

'pad'
grating_coupler ComponentSpec

grating coupler function.

'grating_coupler_te'
cross_section_metal CrossSectionSpec

metal cross section.

'metal_routing'
with_loopback bool

whether to add a loopback port.

True
pad_pitch float

spacing between pads.

100.0
pitch float

spacing between grating couplers.

127.0
pad_gc_spacing float

spacing between pads and grating couplers.

250.0
electrical_port_names list[str] | None

list of electrical port names. Defaults to all.

None
electrical_port_orientation AngleInDegrees | None

orientation of electrical ports. Defaults to 90.

90
npads int | None

number of pads. Defaults to one per electrical_port_names.

None
port_types_grating_couplers list[str] | None

port types for grating couplers. Defaults to vertical TE, TM, and dual.

None
auto_taper_pads bool

whether to add a taper to the pads.

True
kwargs Any

additional arguments.

{}

Other Parameters:

Name Type Description
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 bool

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

gc_rotation

fiber coupler rotation in degrees. Defaults to -90.

input_port_indexes

to connect.

Source code in gdsfactory/components/containers/add_fiber_array_optical_south_electrical_north.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
@gf.cell_with_module_name(tags=["containers"])
def add_fiber_array_optical_south_electrical_north(
    component: ComponentSpec = "straight_heater_metal",
    pad: ComponentSpec = "pad",
    grating_coupler: ComponentSpec = "grating_coupler_te",
    cross_section_metal: CrossSectionSpec = "metal_routing",
    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: AngleInDegrees | None = 90,
    npads: int | None = None,
    port_types_grating_couplers: list[str] | None = None,
    auto_taper_pads: bool = True,
    **kwargs: Any,
) -> Component:
    """Returns a fiber array with Optical gratings on South and Electrical pads on North.

    This a test configuration for DC pads.

    Args:
        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.
        auto_taper_pads: whether to add a taper to the pads.
        kwargs: additional arguments.

    Keyword Args:
        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_bundle.
        gc_rotation: fiber coupler rotation in degrees. Defaults to -90.
        input_port_indexes: to connect.

    """
    return cf.add_fiber_array_optical_south_electrical_north(
        component=component,
        pad=pad,
        grating_coupler=grating_coupler,
        cross_section_metal=cross_section_metal,
        with_loopback=with_loopback,
        pad_pitch=pad_pitch,
        pitch=pitch,
        pad_gc_spacing=pad_gc_spacing,
        electrical_port_names=electrical_port_names,
        electrical_port_orientation=electrical_port_orientation,
        npads=npads,
        port_types_grating_couplers=port_types_grating_couplers,
        auto_taper_pads=auto_taper_pads,
        **kwargs,
    )

add_fiber_array_optical_south_electrical_north

add_termination

add_termination

add_termination(
    component: ComponentSpec = "straight",
    port_names: tuple[str, ...] | None = None,
    terminator: ComponentSpec = "taper_terminator",
    terminator_port_name: str | None = None,
) -> Component

Returns component with terminator on some ports.

Parameters:

Name Type Description Default
component ComponentSpec

to add terminator.

'straight'
port_names tuple[str, ...] | None

ports to add terminator.

None
terminator ComponentSpec

factory for the terminator.

'taper_terminator'
terminator_port_name str | None

for the terminator to connect to the component ports.

None
Source code in gdsfactory/components/containers/add_termination.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@gf.cell_with_module_name(tags=["containers"])
def add_termination(
    component: ComponentSpec = "straight",
    port_names: tuple[str, ...] | None = None,
    terminator: ComponentSpec = "taper_terminator",
    terminator_port_name: str | None = None,
) -> Component:
    """Returns component with terminator on some ports.

    Args:
        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.
    """
    return cf.add_termination(
        component=component,
        port_names=port_names,
        terminator=terminator,
        terminator_port_name=terminator_port_name,
    )

add_termination

add_trenches

add_trenches

add_trenches(
    component: ComponentSpec = "coupler",
    layer_component: LayerSpec = "WG",
    layer_trench: LayerSpec = "DEEP_ETCH",
    width_trench: float = 2.0,
    cross_section: CrossSectionSpec | None = None,
    top: float | None = None,
    bot: float | None = None,
    right: float | None = 0,
    left: float | None = 0,
) -> gf.Component

Return inverted component with trenches.

Parameters:

Name Type Description Default
component ComponentSpec

component to add to the trenches.

'coupler'
layer_component LayerSpec

layer of the component to invert.

'WG'
layer_trench LayerSpec

layer of the trenches.

'DEEP_ETCH'
width_trench float

width of the trenches.

2.0
cross_section CrossSectionSpec | None

spec (CrossSection, string or dict).

None
top float | None

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

None
bot float | None

width of the trench on the bottom. If None uses width_trench.

None
right float | None

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

0
left float | None

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

0
Source code in gdsfactory/components/containers/add_trenches.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@gf.cell_with_module_name(tags=["containers"])
def add_trenches(
    component: ComponentSpec = "coupler",
    layer_component: LayerSpec = "WG",
    layer_trench: LayerSpec = "DEEP_ETCH",
    width_trench: float = 2.0,
    cross_section: CrossSectionSpec | None = None,
    top: float | None = None,
    bot: float | None = None,
    right: float | None = 0,
    left: float | None = 0,
) -> gf.Component:
    """Return inverted component with trenches.

    Args:
        component: component to add to the trenches.
        layer_component: layer of the component to invert.
        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.
    """
    return cf.add_trenches(
        component=component,
        layer_component=layer_component,
        layer_trench=layer_trench,
        width_trench=width_trench,
        cross_section=cross_section,
        top=top,
        bot=bot,
        right=right,
        left=left,
    )

add_trenches

add_trenches90 module-attribute

add_trenches90 = CellAlias(
    add_trenches,
    component="bend_euler",
    top=0,
    left=0,
    right=None,
)

add_trenches90

array

array(
    component: ComponentSpec = "pad",
    columns: int = 6,
    rows: int = 1,
    column_pitch: float = 150,
    row_pitch: float = 150,
    add_ports: bool = True,
    size: Size | None = None,
    centered: bool = False,
    post_process: PostProcesses | None = None,
    auto_rename_ports: bool = False,
) -> Component

Returns a Component containing a regular array of references.

For an editable array, use Component.add_ref() and change the reference's na (columns) and nb (rows). See Resizing an existing array.

Parameters:

Name Type Description Default
component ComponentSpec

to replicate.

'pad'
columns int

in x.

6
rows int

in y.

1
column_pitch float

pitch between columns.

150
row_pitch float

pitch between rows.

150
auto_rename_ports bool

True to auto rename ports.

False
add_ports bool

add ports from component into the array.

True
size Size | None

Optional x, y size. Overrides columns and rows.

None
centered bool

center the array around the origin.

False
post_process PostProcesses | None

function to apply to the array after creation.

None

Raises:

Type Description
ValueError

If columns > 1 and spacing[0] = 0.

ValueError

If rows > 1 and spacing[1] = 0.

      column_pitch
      <---------->
     ___        ___       ___        ___
    |   |      |   |     |   |      |   |
    |___|      |___|     |___|      |___|
     ___        ___       ___        ___
    |   |      |   |     |   |      |   |
    |___|      |___|     |___|      |___|
Source code in gdsfactory/components/containers/array_component.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
@gf.cell_with_module_name(tags=["containers"])
def array(
    component: ComponentSpec = "pad",
    columns: int = 6,
    rows: int = 1,
    column_pitch: float = 150,
    row_pitch: float = 150,
    add_ports: bool = True,
    size: Size | None = None,
    centered: bool = False,
    post_process: PostProcesses | None = None,
    auto_rename_ports: bool = False,
) -> Component:
    """Returns a Component containing a regular array of references.

    For an editable array, use `Component.add_ref()` and change the reference's
    `na` (columns) and `nb` (rows). See
    [Resizing an existing array](https://gdsfactory.github.io/gdsfactory/notebooks/01_references/#resizing-an-existing-array).

    Args:
        component: to replicate.
        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

    ```text
          column_pitch
          <---------->
         ___        ___       ___        ___
        |   |      |   |     |   |      |   |
        |___|      |___|     |___|      |___|
    ```

    ```text
         ___        ___       ___        ___
        |   |      |   |     |   |      |   |
        |___|      |___|     |___|      |___|
    ```
    """
    return cf.array(
        component=component,
        columns=columns,
        rows=rows,
        column_pitch=column_pitch,
        row_pitch=row_pitch,
        add_ports=add_ports,
        size=size,
        centered=centered,
        post_process=post_process,
        auto_rename_ports=auto_rename_ports,
    )

array

array_hexagonal

array_hexagonal

array_hexagonal(
    component: ComponentSpec = "circle",
    columns: int = 10,
    rows: int = 10,
    pitch: float = 25.0,
    centered: bool = True,
    add_ports: bool = True,
) -> Component

Returns a hexagonal close-packed array of components.

Even rows are placed normally, odd rows are offset by pitch/2. Row spacing is pitch * sqrt(3)/2.

Parameters:

Name Type Description Default
component ComponentSpec

component to replicate.

'circle'
columns int

number of columns.

10
rows int

number of rows.

10
pitch float

spacing between adjacent elements.

25.0
centered bool

center the array around the origin.

True
add_ports bool

add ports from each element.

True
Source code in gdsfactory/components/containers/array_hexagonal.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@gf.cell_with_module_name(tags=["containers"])
def array_hexagonal(
    component: ComponentSpec = "circle",
    columns: int = 10,
    rows: int = 10,
    pitch: float = 25.0,
    centered: bool = True,
    add_ports: bool = True,
) -> Component:
    """Returns a hexagonal close-packed array of components.

    Even rows are placed normally, odd rows are offset by pitch/2.
    Row spacing is pitch * sqrt(3)/2.

    Args:
        component: component to replicate.
        columns: number of columns.
        rows: number of rows.
        pitch: spacing between adjacent elements.
        centered: center the array around the origin.
        add_ports: add ports from each element.
    """
    return cf.array_hexagonal(
        component=component,
        columns=columns,
        rows=rows,
        pitch=pitch,
        centered=centered,
        add_ports=add_ports,
    )

array_hexagonal

array_polar

array_polar

array_polar(
    component: ComponentSpec = "C",
    n_items: int = 6,
    radius: float = 50.0,
    start_angle: float = 0.0,
    end_angle: float = 360.0,
    rotate_items: bool = True,
    add_ports: bool = True,
) -> Component

Returns a polar/circular array of components.

Places component refs at equal angular intervals around a circle.

Parameters:

Name Type Description Default
component ComponentSpec

component to replicate.

'C'
n_items int

number of items in the array.

6
radius float

radius of the circle.

50.0
start_angle float

starting angle in degrees.

0.0
end_angle float

ending angle in degrees.

360.0
rotate_items bool

if True, rotate each item to point radially outward.

True
add_ports bool

add ports from each element.

True
Source code in gdsfactory/components/containers/array_polar.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@gf.cell(
    with_module_name=True,
    check_instances=CheckInstances.IGNORE,
    tags=["containers"],
)
def array_polar(
    component: ComponentSpec = "C",
    n_items: int = 6,
    radius: float = 50.0,
    start_angle: float = 0.0,
    end_angle: float = 360.0,
    rotate_items: bool = True,
    add_ports: bool = True,
) -> Component:
    """Returns a polar/circular array of components.

    Places component refs at equal angular intervals around a circle.

    Args:
        component: component to replicate.
        n_items: number of items in the array.
        radius: radius of the circle.
        start_angle: starting angle in degrees.
        end_angle: ending angle in degrees.
        rotate_items: if True, rotate each item to point radially outward.
        add_ports: add ports from each element.
    """
    return cf.array_polar(
        component=component,
        n_items=n_items,
        radius=radius,
        start_angle=start_angle,
        end_angle=end_angle,
        rotate_items=rotate_items,
        add_ports=add_ports,
    )

array_polar

component_sequence

SequenceGenerator

Source code in gdsfactory/components/containers/component_sequence.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
class SequenceGenerator:
    def __init__(
        self,
        start_sequence: str = "IL",
        repeated_sequence: str = "ASASBSBS",
        end_sequence: str = "LO",
    ) -> None:
        """Sequence generator.

        Main use case: any type of cascade of components with repeating patterns
        such as serpentine, cutbacks etc...
        Component sequences have two ports by default.
        it adds aliases for the components forming the sequence.
        They use the component symbol with a suffix index starting from 1,
        so you may access the ports from any subcomponent.

        Usually we can break these components in 3 parts:
        - there is a starting pattern with input and possibly some special
        connections
        - then a repeating pattern
        - An ending pattern with an output

        Example of symbol meaning

        A: bend connected with input W0
        B: bend connected with input N0
        I: taper with input '1'
        O: taper with input '2'
        S: short straight waveguide
        L: long straight waveguide

        Args:
            start_sequence: starting sequence.
            end_sequence: ending sequence.
            repeated_sequence: repeating sequence.
        """
        self.start_sequence = start_sequence
        self.end_sequence = end_sequence
        self.repeated_sequence = repeated_sequence

    def get_sequence(self, n: int = 2) -> str:
        return self.start_sequence + n * self.repeated_sequence + self.end_sequence

__init__

__init__(
    start_sequence: str = "IL",
    repeated_sequence: str = "ASASBSBS",
    end_sequence: str = "LO",
) -> None

Sequence generator.

Main use case: any type of cascade of components with repeating patterns such as serpentine, cutbacks etc... Component sequences have two ports by default. it adds aliases for the components forming the sequence. They use the component symbol with a suffix index starting from 1, so you may access the ports from any subcomponent.

Usually we can break these components in 3 parts: - there is a starting pattern with input and possibly some special connections - then a repeating pattern - An ending pattern with an output

Example of symbol meaning

A: bend connected with input W0 B: bend connected with input N0 I: taper with input '1' O: taper with input '2' S: short straight waveguide L: long straight waveguide

Parameters:

Name Type Description Default
start_sequence str

starting sequence.

'IL'
end_sequence str

ending sequence.

'LO'
repeated_sequence str

repeating sequence.

'ASASBSBS'
Source code in gdsfactory/components/containers/component_sequence.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
def __init__(
    self,
    start_sequence: str = "IL",
    repeated_sequence: str = "ASASBSBS",
    end_sequence: str = "LO",
) -> None:
    """Sequence generator.

    Main use case: any type of cascade of components with repeating patterns
    such as serpentine, cutbacks etc...
    Component sequences have two ports by default.
    it adds aliases for the components forming the sequence.
    They use the component symbol with a suffix index starting from 1,
    so you may access the ports from any subcomponent.

    Usually we can break these components in 3 parts:
    - there is a starting pattern with input and possibly some special
    connections
    - then a repeating pattern
    - An ending pattern with an output

    Example of symbol meaning

    A: bend connected with input W0
    B: bend connected with input N0
    I: taper with input '1'
    O: taper with input '2'
    S: short straight waveguide
    L: long straight waveguide

    Args:
        start_sequence: starting sequence.
        end_sequence: ending sequence.
        repeated_sequence: repeating sequence.
    """
    self.start_sequence = start_sequence
    self.end_sequence = end_sequence
    self.repeated_sequence = repeated_sequence

component_sequence

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: AngleInDegrees = 0.0,
    **kwargs: Any
) -> Component

Returns component from ASCII sequence.

if you prefix a symbol with ! it mirrors the component

Parameters:

Name Type Description Default
sequence str

a string or a list of symbols.

required
symbol_to_component dict[str, tuple[Component, str, str]]

maps symbols to (component, input, output).

required
ports_map dict[str, tuple[str, str]] | None

(optional) extra port mapping using the convention.

None
port_name1 str

input port_name.

'o1'
port_name2 str

output port_name.

'o2'
start_orientation AngleInDegrees

in degrees.

0.0
**kwargs Any

additional keyword arguments passed to the connect method.

{}

Returns:

Name Type Description
component Component

containing the sequence of sub-components instantiated and connected together in the sequence order.

Example

```python 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 in gdsfactory/components/containers/component_sequence.py
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
def 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: AngleInDegrees = 0.0,
    **kwargs: Any,
) -> Component:
    """Returns component from ASCII sequence.

    if you prefix a symbol with ! it mirrors the component

    Args:
        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.
        **kwargs: additional keyword arguments passed to the connect method.

    Returns:
        component: containing the sequence of sub-components
            instantiated and connected together in the sequence order.

    Example:
        ```python
        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()
    ```
    """
    ports_map = ports_map or {}
    named_references_counter: Counter[str] = Counter()
    component = Component()

    # Add first component reference and input port
    symbol = sequence[0] if "!" not in sequence[0] else sequence[:2]
    index = 2 if "!" in sequence[0] else 1
    name_start_device, do_flip = parse_component_name(symbol)
    component_input, input_port, prev_port = symbol_to_component[name_start_device]
    prev_device = component.add_ref(component_input, name=f"{symbol}{index}")
    named_references_counter.update({name_start_device: 1})

    if do_flip:
        prev_device = _flip_ref(prev_device, input_port)

    prev_device.rotate(angle=start_orientation)

    try:
        component.add_port(name=port_name1, port=prev_device.ports[input_port])
    except KeyError as exc:
        port_names = [port.name for port in prev_device.ports]
        raise KeyError(
            f"{prev_device.parent_cell.name!r} input_port {input_port!r} not in {port_names}"
        ) from exc

    ref: ComponentReference | None = None
    next_port: str | None = None

    while index < len(sequence):
        s = sequence[index]

        if s == "!":
            # if it's the last character skip
            if index + 1 >= len(sequence):
                index += 1
                continue
            s = sequence[index + 1]
            do_flip = True
            index += 1
        else:
            do_flip = False

        index += 1
        component_i, input_port, next_port = symbol_to_component[s]
        component_i = gf.get_component(component_i)
        named_references_counter.update({s: 1})
        alias = f"{s}{named_references_counter[s]}"
        ref = component.add_ref(component_i, name=alias)

        if do_flip:
            ref = _flip_ref(ref, input_port)

        try:
            ref.connect(input_port, prev_device.ports[prev_port], **kwargs)
        except KeyError as exc:
            port_names = [port.name for port in prev_device.ports]
            raise KeyError(
                f"{prev_device.parent_cell.name!r} port {prev_port!r} not in {port_names}"
            ) from exc

        prev_device = ref
        prev_port = next_port

    # Deal with edge case where the sequence contains only one component
    if len(sequence) == 1:
        ref = prev_device
        next_port = prev_port

    assert ref is not None
    assert next_port is not None

    component.add_port(name=port_name2, port=ref.ports[next_port])

    # Add any extra port specified in ports_map
    for name, (ref_name, alias_port_name) in ports_map.items():
        component.add_port(
            name=name, port=component.insts[ref_name].ports[alias_port_name]
        )

    return component

parse_component_name

parse_component_name(name: str) -> tuple[str, bool]

If the component name has more than one character and starts with "!".

then we need to flip along the axis given by the input port angle.

Source code in gdsfactory/components/containers/component_sequence.py
57
58
59
60
61
62
def parse_component_name(name: str) -> tuple[str, bool]:
    """If the component name has more than one character and starts with "!".

    then we need to flip along the axis given by the input port angle.
    """
    return (name[1:], True) if len(name) != 1 and name[0] == "!" else (name, False)

copy_layers

copy_layers

copy_layers(
    factory: ComponentSpec = "cross",
    layers: LayerSpecs = ((1, 0), (2, 0)),
    flatten: bool = False,
    **kwargs: Any
) -> Component

Returns a component with the geometry copied in different layers.

Parameters:

Name Type Description Default
factory ComponentSpec

component spec.

'cross'
layers LayerSpecs

iterable of layers.

((1, 0), (2, 0))
flatten bool

flatten the result.

False
kwargs Any

keyword arguments passed to the component.

{}
Source code in gdsfactory/components/containers/copy_layers.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@gf.cell_with_module_name(tags=["containers"])
def copy_layers(
    factory: ComponentSpec = "cross",
    layers: LayerSpecs = ((1, 0), (2, 0)),
    flatten: bool = False,
    **kwargs: Any,
) -> Component:
    """Returns a component with the geometry copied in different layers.

    Args:
        factory: component spec.
        layers: iterable of layers.
        flatten: flatten the result.
        kwargs: keyword arguments passed to the component.
    """
    return cf.copy_layers(
        factory=factory,
        layers=layers,
        flatten=flatten,
        **kwargs,
    )

copy_layers

extend_ports

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

Returns a new component with some ports extended.

You can define extension Spec defaults to port cross_section of each port to extend.

Parameters:

Name Type Description Default
component ComponentSpec

component to extend ports.

'mmi1x2'
port_names PortNames | None

list of ports names to extend, if None it extends all ports.

None
length float

extension length, added after any automatic taper, so the total extension is taper_length + length when a taper is inserted.

5.0
extension ComponentSpec | None

function to extend ports (defaults to a straight).

None
port1 str | None

extension input port name.

None
port2 str | None

extension output port name.

None
port_type str

type of the ports to extend.

'optical'
centered bool

if True centers rectangle at (0, 0).

False
cross_section CrossSectionSpec | None

extension cross_section, defaults to port cross_section if port has no cross_section it creates one using width and layer.

None
extension_port_names list[str] | None

extension port names add to the new component.

None
allow_width_mismatch bool

allow width mismatches.

False
auto_taper bool

if True adds automatic tapers.

True
kwargs Any

cross_section settings.

{}

Other Parameters:

Name Type Description
layer

port GDS layer.

prefix

port name prefix.

orientation

in degrees.

width

port width.

layers_excluded

List of layers to exclude.

port_type str

optical, electrical, ....

clockwise

if True, sort ports clockwise, False: counter-clockwise.

Source code in gdsfactory/components/containers/extension.py
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
@gf.cell_with_module_name(tags=["containers"])
def 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:
    """Returns a new component with some ports extended.

    You can define extension Spec
    defaults to port cross_section of each port to extend.

    Args:
        component: component to extend ports.
        port_names: list of ports names to extend, if None it extends all ports.
        length: extension length, added after any automatic taper, so the total
            extension is taper_length + length when a taper is inserted.
        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 Args:
        layer: port GDS layer.
        prefix: port name prefix.
        orientation: in degrees.
        width: port width.
        layers_excluded: List of layers to exclude.
        port_type: optical, electrical, ....
        clockwise: if True, sort ports clockwise, False: counter-clockwise.
    """
    return cf.extend_ports(
        component=component,
        port_names=port_names,
        length=length,
        extension=extension,
        port1=port1,
        port2=port2,
        port_type=port_type,
        centered=centered,
        cross_section=cross_section,
        extension_port_names=extension_port_names,
        allow_width_mismatch=allow_width_mismatch,
        auto_taper=auto_taper,
        **kwargs,
    )

extend_ports

extend_ports_list

extend_ports_list

extend_ports_list(
    component_spec: ComponentSpec,
    extension: ComponentSpec,
    extension_port_name: str | None = None,
    ignore_ports: Strs | None = None,
) -> Component

Returns a component with an extension attached to a list of ports.

Parameters:

Name Type Description Default
component_spec ComponentSpec

component from which to get ports.

required
extension ComponentSpec

function for extension.

required
extension_port_name str | None

to connect extension.

None
ignore_ports Strs | None

list of port names to ignore.

None
Source code in gdsfactory/components/containers/extend_ports_list.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@gf.cell(set_name=False, tags=["containers"])
def extend_ports_list(
    component_spec: ComponentSpec,
    extension: ComponentSpec,
    extension_port_name: str | None = None,
    ignore_ports: Strs | None = None,
) -> Component:
    """Returns a component with an extension attached to a list of ports.

    Args:
        component_spec: component from which to get ports.
        extension: function for extension.
        extension_port_name: to connect extension.
        ignore_ports: list of port names to ignore.
    """
    return cf.extend_ports_list(
        component_spec=component_spec,
        extension=extension,
        extension_port_name=extension_port_name,
        ignore_ports=ignore_ports,
    )

mzi1x2_2x2_heater module-attribute

mzi1x2_2x2_heater = CellAlias(
    mzi1x2_2x2,
    combiner="mmi2x2",
    delta_length=0,
    straight_x_top="straight_heater_metal",
    length_x=None,
)

mzi1x2_2x2_heater

splitter_chain

splitter_chain

splitter_chain(
    splitter: ComponentSpec = "mmi1x2",
    columns: int = 3,
    bend: ComponentSpec = "bend_s",
) -> Component

Chain of splitters.

Parameters:

Name Type Description Default
splitter ComponentSpec

splitter to chain.

'mmi1x2'
columns int

number of splitters to chain.

3
bend ComponentSpec

bend to connect splitters.

'bend_s'
             __o5
          __|
       __|  |__o4
  o1 _|  |__o3
      |__o2
       __o2
  o1 _|
      |__o3
Source code in gdsfactory/components/containers/splitter_chain.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@gf.cell_with_module_name(tags=["containers"])
def splitter_chain(
    splitter: ComponentSpec = "mmi1x2",
    columns: int = 3,
    bend: ComponentSpec = "bend_s",
) -> Component:
    """Chain of splitters.

    Args:
        splitter: splitter to chain.
        columns: number of splitters to chain.
        bend: bend to connect splitters.

    ```text
                 __o5
              __|
           __|  |__o4
      o1 _|  |__o3
          |__o2
    ```

    ```text
           __o2
      o1 _|
          |__o3
    ```
    """
    return cf.splitter_chain(
        splitter=splitter,
        columns=columns,
        bend=bend,
    )

splitter_chain

splitter_tree

Returns a switch_tree.

          __
        _|  |_
  __   | |  |_   _
 |  |__| |__|    |
_|  |__          |dy
 |__|  |  __     |
       |_|  |_   |
         |  |_   -
         |__|

|<-dx->|

splitter_tree

splitter_tree(
    coupler: ComponentSpec = "mmi1x2",
    noutputs: int = 4,
    spacing: Spacing = (90.0, 50.0),
    bend_s: ComponentSpec | None = "bend_s",
    bend_s_xsize: float | None = None,
    cross_section: CrossSectionSpec = "strip",
) -> gf.Component

Tree of power splitters.

Parameters:

Name Type Description Default
coupler ComponentSpec

coupler factory.

'mmi1x2'
noutputs int

number of outputs.

4
spacing Spacing

x, y spacing between couplers.

(90.0, 50.0)
bend_s ComponentSpec | None

Sbend function for termination.

'bend_s'
bend_s_xsize float | None

xsize for the sbend.

None
cross_section CrossSectionSpec

cross_section.

| | |__

'strip'
Source code in gdsfactory/components/containers/splitter_tree.py
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@gf.cell_with_module_name(tags=["containers"])
def splitter_tree(
    coupler: ComponentSpec = "mmi1x2",
    noutputs: int = 4,
    spacing: Spacing = (90.0, 50.0),
    bend_s: ComponentSpec | None = "bend_s",
    bend_s_xsize: float | None = None,
    cross_section: CrossSectionSpec = "strip",
) -> gf.Component:
    """Tree of power splitters.

    Args:
        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
    """
    return cf.splitter_tree(
        coupler=coupler,
        noutputs=noutputs,
        spacing=spacing,
        bend_s=bend_s,
        bend_s_xsize=bend_s_xsize,
        cross_section=cross_section,
    )

splitter_tree

switch_tree module-attribute

switch_tree = CellAlias(
    splitter_tree,
    coupler="mzi1x2_2x2_heater",
    spacing=(500, 100),
)

switch_tree

taper_terminator module-attribute

taper_terminator = CellAlias(taper, width2=0.1)

taper_terminator

couplers

coupler

coupler

coupler(
    gap: float = 0.236,
    length: float = 20.0,
    dy: Delta = 4.0,
    dx: Delta = 10.0,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    bend: ComponentSpec = "bend_s",
) -> Component

Symmetric coupler.

Parameters:

Name Type Description Default
gap float

between straights in um.

0.236
length float

of coupling region in um.

20.0
dy Delta

port to port vertical spacing in um.

4.0
dx Delta

length of bend in x direction in um.

10.0
cross_section CrossSectionSpec

spec (CrossSection, string or dict).

'strip'
allow_min_radius_violation bool

if True does not check for min bend radius.

False
bend ComponentSpec

input and output sbend components.

'bend_s'
           dx                                 dx
        |------|                           |------|
     o2 ________                           ______o3
                \                         /           |
                 \        length         /            |
                  ======================= gap         | dy
                 /                       \            |
        ________/                         \_______    |
     o1                                          o4
                coupler_straight  coupler_symmetric
Source code in gdsfactory/components/couplers/coupler.py
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["couplers"])
def coupler(
    gap: float = 0.236,
    length: float = 20.0,
    dy: Delta = 4.0,
    dx: Delta = 10.0,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
    bend: ComponentSpec = "bend_s",
) -> Component:
    r"""Symmetric coupler.

    Args:
        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.

    ```text
               dx                                 dx
            |------|                           |------|
         o2 ________                           ______o3
                    \                         /           |
                     \        length         /            |
                      ======================= gap         | dy
                     /                       \            |
            ________/                         \_______    |
         o1                                          o4
    ```

                        coupler_straight  coupler_symmetric
    """
    return cf.coupler(
        gap=gap,
        length=length,
        dy=dy,
        dx=dx,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
        bend=bend,
    )

coupler_straight

coupler_straight(
    length: float = 10.0,
    gap: float = 0.27,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Coupler_straight with two parallel straights.

Parameters:

Name Type Description Default
length float

of straight.

10.0
gap float

between straights.

0.27
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
    o2──────▲─────────o3
            │gap
    o1──────▼─────────o4
Source code in gdsfactory/components/couplers/coupler.py
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["couplers"])
def coupler_straight(
    length: float = 10.0,
    gap: float = 0.27,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Coupler_straight with two parallel straights.

    Args:
        length: of straight.
        gap: between straights.
        cross_section: specification (CrossSection, string or dict).

    ```text
        o2──────▲─────────o3
                │gap
        o1──────▼─────────o4
    ```
    """
    return cf.coupler_straight(
        length=length,
        gap=gap,
        cross_section=cross_section,
    )

coupler_symmetric

coupler_symmetric(
    bend: ComponentSpec = "bend_s",
    gap: float = 0.234,
    dy: Delta = 4.0,
    dx: Delta = 10.0,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> Component

Two coupled straights with bends.

Parameters:

Name Type Description Default
bend ComponentSpec

bend spec.

'bend_s'
gap float

in um.

0.234
dy Delta

port to port vertical spacing.

4.0
dx Delta

bend length in x direction.

10.0
cross_section CrossSectionSpec

section.

'strip'
allow_min_radius_violation bool

if True does not check for min bend radius.

False
                   dx
                |-----|
                   ___ o3
                  /       |
         o2 _____/        |
                          |
         o1 _____         |  dy
                 \        |
                  \___    |
                       o4
Source code in gdsfactory/components/couplers/coupler.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@gf.cell_with_module_name(tags=["couplers"])
def coupler_symmetric(
    bend: ComponentSpec = "bend_s",
    gap: float = 0.234,
    dy: Delta = 4.0,
    dx: Delta = 10.0,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> Component:
    r"""Two coupled straights with bends.

    Args:
        bend: bend spec.
        gap: in um.
        dy: port to port vertical spacing.
        dx: bend length in x direction.
        cross_section: section.
        allow_min_radius_violation: if True does not check for min bend radius.

    ```text
                       dx
                    |-----|
                       ___ o3
                      /       |
             o2 _____/        |
                              |
             o1 _____         |  dy
                     \        |
                      \___    |
                           o4
    ```

    """
    return cf.coupler_symmetric(
        bend=bend,
        gap=gap,
        dy=dy,
        dx=dx,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
    )

coupler

coupler90

coupler90

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,
    length_straight: float | None = None,
) -> Component

Straight coupled to a bend.

Parameters:

Name Type Description Default
gap float

um.

0.2
radius float | None

um.

None
straight ComponentSpec

for straight.

'straight'
bend ComponentSpec

bend spec.

'bend_euler'
cross_section CrossSectionSpec

cross_section spec.

'strip'
cross_section_bend CrossSectionSpec | None

optional bend cross_section spec.

None
length_straight float | None

optional length of the straight waveguide.

None
        o3
         |
        /
       /
   o2_/
   o1___o4
Source code in gdsfactory/components/couplers/coupler90.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["couplers"])
def 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,
    length_straight: float | None = None,
) -> Component:
    r"""Straight coupled to a bend.

    Args:
        gap: um.
        radius: um.
        straight: for straight.
        bend: bend spec.
        cross_section: cross_section spec.
        cross_section_bend: optional bend cross_section spec.
        length_straight: optional length of the straight waveguide.

    ```text
            o3
             |
            /
           /
       o2_/
       o1___o4
    ```

    """
    return cf.coupler90(
        gap=gap,
        radius=radius,
        bend=bend,
        straight=straight,
        cross_section=cross_section,
        cross_section_bend=cross_section_bend,
        length_straight=length_straight,
    )

coupler90

coupler90bend

coupler90bend

coupler90bend(
    radius: float = 10.0,
    gap: float = 0.2,
    bend: ComponentSpec = "bend_euler",
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
) -> Component

Returns 2 coupled bends.

Parameters:

Name Type Description Default
radius float

um.

10.0
gap float

um.

0.2
bend ComponentSpec

for bend.

'bend_euler'
cross_section_inner CrossSectionSpec

spec inner bend.

'strip'
cross_section_outer CrossSectionSpec

spec outer bend.

'strip'
        r   3 4
        |   | |
        |  / /
        | / /
    2____/ /
    1_____/
Source code in gdsfactory/components/couplers/coupler90bend.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["couplers"])
def coupler90bend(
    radius: float = 10.0,
    gap: float = 0.2,
    bend: ComponentSpec = "bend_euler",
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
) -> Component:
    r"""Returns 2 coupled bends.

    Args:
        radius: um.
        gap: um.
        bend: for bend.
        cross_section_inner: spec inner bend.
        cross_section_outer: spec outer bend.

    ```text
            r   3 4
            |   | |
            |  / /
            | / /
        2____/ /
        1_____/
    ```

    """
    return cf.coupler90bend(
        radius=radius,
        gap=gap,
        bend=bend,
        cross_section_inner=cross_section_inner,
        cross_section_outer=cross_section_outer,
    )

coupler90bend

coupler90circular module-attribute

coupler90circular = CellAlias(
    coupler90, bend="bend_circular"
)

coupler90circular

coupler_adiabatic

coupler_adiabatic

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

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

The coupler comprises five regions:

  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:

Name Type Description Default
length1 float

region that gradually brings the two asymmetric straights together. In this region the straight widths gradually change to be different by dw.

20.0
length2 float

coupling region, where asymmetric straights gradually become the same width.

50.0
length3 float

output region where the two straights separate.

30.0
wg_sep float

Distance between edge-to-edge in the coupling region (Region 2).

1.0
input_wg_sep float

Separation of the two straights at the input, edge-to-edge.

3.0
output_wg_sep float

Separation of the two straights at the output, edge-to-edge.

3.0
dw float

Change in straight width. In Region 1, top arm tapers to width+dw, bottom taper to width-dw.

0.1
cross_section CrossSectionSpec

cross_section spec.

'strip'
Source code in gdsfactory/components/couplers/coupler_adiabatic.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["couplers"])
def 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:
    """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>

    The coupler comprises five regions:

    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.

    Args:
        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 edge-to-edge in the coupling region (Region 2).
        input_wg_sep: Separation of the two straights at the input, edge-to-edge.
        output_wg_sep: Separation of the two straights at the output, edge-to-edge.
        dw: Change in straight width.
            In Region 1, top arm tapers to width+dw, bottom taper to width-dw.
        cross_section: cross_section spec.

    """
    return cf.coupler_adiabatic(
        length1=length1,
        length2=length2,
        length3=length3,
        wg_sep=wg_sep,
        input_wg_sep=input_wg_sep,
        output_wg_sep=output_wg_sep,
        dw=dw,
        cross_section=cross_section,
    )

coupler_adiabatic

coupler_asymmetric

coupler_asymmetric

coupler_asymmetric(
    gap: float = 0.234,
    dy: Delta = 2.5,
    dx: Delta = 10.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Bend coupled to straight waveguide.

Parameters:

Name Type Description Default
gap float

um.

0.234
dy Delta

port to port vertical spacing.

2.5
dx Delta

bend length in x direction.

10.0
cross_section CrossSectionSpec

spec.

'strip'
                    dx
                 |-----|
                  _____ o2
                 /         |
           _____/          |
     gap o1____________    |  dy
                        o3
Source code in gdsfactory/components/couplers/coupler_asymmetric.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@gf.cell_with_module_name(schematic_function=mmi_1x2_schematic, tags=["couplers"])
def coupler_asymmetric(
    gap: float = 0.234,
    dy: Delta = 2.5,
    dx: Delta = 10.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Bend coupled to straight waveguide.

    Args:
        gap: um.
        dy: port to port vertical spacing.
        dx: bend length in x direction.
        cross_section: spec.

    ```text
                        dx
                     |-----|
                      _____ o2
                     /         |
               _____/          |
         gap o1____________    |  dy
                            o3
    ```
    """
    return cf.coupler_asymmetric(
        gap=gap,
        dy=dy,
        dx=dx,
        cross_section=cross_section,
    )

coupler_asymmetric

coupler_bent

coupler_bent

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",
) -> gf.Component

Returns Broadband SOI curved / straight directional coupler.

based on: https://doi.org/10.1038/s41598-017-07618-6.

Parameters:

Name Type Description Default
gap float

gap.

0.2
radius float

radius coupling.

26
length float

coupler_length.

8.6
width1 float

width1.

0.4
width2 float

width2.

0.4
length_straight float

input and output straight length.

10
cross_section str

cross_section.

'strip'
Source code in gdsfactory/components/couplers/coupler_bent.py
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["couplers"])
def coupler_bent(
    gap: float = 0.200,
    radius: float = 26,
    length: float = 8.6,
    width1: float = 0.400,
    width2: float = 0.400,
    length_straight: float = 10,
    cross_section: str = "strip",
) -> gf.Component:
    """Returns Broadband SOI curved / straight directional coupler.

    based on: <https://doi.org/10.1038/s41598-017-07618-6>.

    Args:
        gap: gap.
        radius: radius coupling.
        length: coupler_length.
        width1: width1.
        width2: width2.
        length_straight: input and output straight length.
        cross_section: cross_section.
    """
    return cf.coupler_bent(
        gap=gap,
        radius=radius,
        length=length,
        width1=width1,
        width2=width2,
        length_straight=length_straight,
        cross_section=cross_section,
    )

coupler_bent_half

coupler_bent_half(
    gap: float = 0.2,
    radius: float = 26,
    length: float = 8.6,
    width1: float = 0.4,
    width2: float = 0.4,
    length_straight: float = 10,
    length_straight_exit: float = 18,
    cross_section: str = "strip",
) -> gf.Component

Returns Broadband SOI curved / straight directional coupler.

Parameters:

Name Type Description Default
gap float

gap.

0.2
radius float

radius coupling.

26
length float

coupler_length.

8.6
width1 float

width1.

0.4
width2 float

width2.

0.4
length_straight float

input and output straight length.

10
length_straight_exit float

length straight exit.

18
cross_section str

cross_section.

'strip'
Source code in gdsfactory/components/couplers/coupler_bent.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@gf.cell_with_module_name(tags=["couplers"])
def coupler_bent_half(
    gap: float = 0.200,
    radius: float = 26,
    length: float = 8.6,
    width1: float = 0.400,
    width2: float = 0.400,
    length_straight: float = 10,
    length_straight_exit: float = 18,
    cross_section: str = "strip",
) -> gf.Component:
    """Returns Broadband SOI curved / straight directional coupler.

    Args:
        gap: gap.
        radius: radius coupling.
        length: coupler_length.
        width1: width1.
        width2: width2.
        length_straight: input and output straight length.
        length_straight_exit: length straight exit.
        cross_section: cross_section.
    """
    return cf.coupler_bent_half(
        gap=gap,
        radius=radius,
        length=length,
        width1=width1,
        width2=width2,
        length_straight=length_straight,
        length_straight_exit=length_straight_exit,
        cross_section=cross_section,
    )

coupler_bent

coupler_bent_half

coupler_bent_half(
    gap: float = 0.2,
    radius: float = 26,
    length: float = 8.6,
    width1: float = 0.4,
    width2: float = 0.4,
    length_straight: float = 10,
    length_straight_exit: float = 18,
    cross_section: str = "strip",
) -> gf.Component

Returns Broadband SOI curved / straight directional coupler.

Parameters:

Name Type Description Default
gap float

gap.

0.2
radius float

radius coupling.

26
length float

coupler_length.

8.6
width1 float

width1.

0.4
width2 float

width2.

0.4
length_straight float

input and output straight length.

10
length_straight_exit float

length straight exit.

18
cross_section str

cross_section.

'strip'
Source code in gdsfactory/components/couplers/coupler_bent.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@gf.cell_with_module_name(tags=["couplers"])
def coupler_bent_half(
    gap: float = 0.200,
    radius: float = 26,
    length: float = 8.6,
    width1: float = 0.400,
    width2: float = 0.400,
    length_straight: float = 10,
    length_straight_exit: float = 18,
    cross_section: str = "strip",
) -> gf.Component:
    """Returns Broadband SOI curved / straight directional coupler.

    Args:
        gap: gap.
        radius: radius coupling.
        length: coupler_length.
        width1: width1.
        width2: width2.
        length_straight: input and output straight length.
        length_straight_exit: length straight exit.
        cross_section: cross_section.
    """
    return cf.coupler_bent_half(
        gap=gap,
        radius=radius,
        length=length,
        width1=width1,
        width2=width2,
        length_straight=length_straight,
        length_straight_exit=length_straight_exit,
        cross_section=cross_section,
    )

coupler_bent_half

coupler_broadband

coupler_broadband

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

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:

Name Type Description Default
w_sc float

width of waveguides in the symmetric coupler section.

0.5
gap_sc float

gap size between the waveguides in the symmetric coupler section.

0.2
w_top float

width of the top waveguide in the phase control section.

0.6
gap_pc float

gap size in the phase control section.

0.3
legnth_taper float

length of the tapers.

1.0
bend ComponentSpec

bend factory.

'bend_euler'
coupler_straight ComponentSpec

coupler_straight factory.

'coupler_straight'
length_coupler_straight float

optimal L_1 from the 3d fdtd analysis.

12.4
lenght_coupler_big_gap float

optimal L_2 from the 3d fdtd analysis.

4.7
cross_section CrossSectionSpec

cross_section of the waveguides.

'strip'
radius float

bend radius.

10.0
Source code in gdsfactory/components/couplers/coupler_broadband.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["couplers"])
def coupler_broadband(
    w_sc: float = 0.5,  # width of waveguides in the symmetric coupler section
    gap_sc: float = 0.2,  # gap size between the waveguides in the symmetric coupler section
    w_top: float = 0.6,  # width of the top waveguide in the phase control section
    gap_pc: float = 0.3,  # gap size in the phase control section
    legnth_taper: float = 1.0,  # length of the tapers
    bend: ComponentSpec = "bend_euler",
    coupler_straight: ComponentSpec = "coupler_straight",
    length_coupler_straight: float = 12.4,  # optimal L_1 from the 3d fdtd analysis
    lenght_coupler_big_gap: float = 4.7,  # optimal L_2 from the 3d fdtd analysis
    cross_section: CrossSectionSpec = "strip",
    radius: float = 10.0,
) -> Component:
    """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.

    Args:
        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.
    """
    return cf.coupler_broadband(
        w_sc=w_sc,
        gap_sc=gap_sc,
        w_top=w_top,
        gap_pc=gap_pc,
        legnth_taper=legnth_taper,
        bend=bend,
        coupler_straight=coupler_straight,
        length_coupler_straight=length_coupler_straight,
        lenght_coupler_big_gap=lenght_coupler_big_gap,
        cross_section=cross_section,
        radius=radius,
    )

coupler_broadband

coupler_full

coupler_full

coupler_full(
    coupling_length: float = 40.0,
    dx: Delta = 10.0,
    dy: Delta = 4.8,
    gap: float = 0.5,
    dw: float = 0.1,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
) -> Component

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:

Name Type Description Default
coupling_length float

Length of the coupling region in um.

40.0
dx Delta

Length of the bend regions in um.

10.0
dy Delta

Port-to-port distance between the bend regions in um.

4.8
gap float

Distance between the two straights in um.

0.5
dw float

delta width. Top arm tapers to width - dw, bottom to width + dw in um.

0.1
cross_section CrossSectionSpec

cross-section spec.

'strip'
width float | None

width of the waveguide. If None, it will use the width of the cross_section.

None
Source code in gdsfactory/components/couplers/coupler_full.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["couplers"])
def coupler_full(
    coupling_length: float = 40.0,
    dx: Delta = 10.0,
    dy: Delta = 4.8,
    gap: float = 0.5,
    dw: float = 0.1,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
) -> Component:
    """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.

    Args:
        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.

    """
    return cf.coupler_full(
        coupling_length=coupling_length,
        dx=dx,
        dy=dy,
        gap=gap,
        dw=dw,
        cross_section=cross_section,
        width=width,
    )

coupler_full

coupler_pulley

coupler_pulley

coupler_pulley(
    radius: float = 10.0,
    ring_width: float | None = None,
    gap: float = 0.2,
    coupling_angle: float = 60.0,
    wg_length: float = 40.0,
    wg_height: float = 10.0,
    n_segments: int = 128,
    cross_section: CrossSectionSpec = "strip",
    layer: LayerSpec = "WG",
) -> Component

Returns a disc or ring with a pulley-coupled waveguide.

A waveguide wraps symmetrically around the top of a disc/ring over coupling_angle degrees. Bezier S-curves (following the CNST discPulley construction, eq. 2.22) route the waveguide from the coupling arc down to horizontal exits on both sides.

Parameters:

Name Type Description Default
radius float

radius of the disc, or outer radius of the ring.

10.0
ring_width float | None

width of the ring annulus. None for a solid disc.

None
gap float

gap between the waveguide inner edge and the disc/ring.

0.2
coupling_angle float

total wrap angle in degrees (symmetric about top).

60.0
wg_length float

horizontal half-length of the waveguide from the disc center to the exit end. Controls S-curve extent. Corresponds to CNST parameter L.

40.0
wg_height float

vertical drop from disc center to exit waveguide level. Corresponds to CNST parameter H.

10.0
n_segments int

number of points for each curved section.

128
cross_section CrossSectionSpec

cross-section spec for the coupling waveguide.

'strip'
layer LayerSpec

layer spec for the disc/ring.

'WG'
Source code in gdsfactory/components/couplers/coupler_pulley.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@gf.cell_with_module_name(tags=["couplers"])
def coupler_pulley(
    radius: float = 10.0,
    ring_width: float | None = None,
    gap: float = 0.2,
    coupling_angle: float = 60.0,
    wg_length: float = 40.0,
    wg_height: float = 10.0,
    n_segments: int = 128,
    cross_section: CrossSectionSpec = "strip",
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a disc or ring with a pulley-coupled waveguide.

    A waveguide wraps symmetrically around the top of a disc/ring
    over coupling_angle degrees. Bezier S-curves (following the CNST
    discPulley construction, eq. 2.22) route the waveguide from the
    coupling arc down to horizontal exits on both sides.

    Args:
        radius: radius of the disc, or outer radius of the ring.
        ring_width: width of the ring annulus. None for a solid disc.
        gap: gap between the waveguide inner edge and the disc/ring.
        coupling_angle: total wrap angle in degrees (symmetric about top).
        wg_length: horizontal half-length of the waveguide from the disc
            center to the exit end. Controls S-curve extent. Corresponds
            to CNST parameter L.
        wg_height: vertical drop from disc center to exit waveguide level.
            Corresponds to CNST parameter H.
        n_segments: number of points for each curved section.
        cross_section: cross-section spec for the coupling waveguide.
        layer: layer spec for the disc/ring.
    """
    return cf.coupler_pulley(
        radius=radius,
        ring_width=ring_width,
        gap=gap,
        coupling_angle=coupling_angle,
        wg_length=wg_length,
        wg_height=wg_height,
        n_segments=n_segments,
        cross_section=cross_section,
        layer=layer,
    )

coupler_pulley

coupler_ring

coupler_ring

coupler_ring(
    gap: float = 0.2,
    radius: float | None = None,
    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 | None = None,
) -> Component

Coupler for ring.

Parameters:

Name Type Description Default
gap float

spacing between parallel coupled straight waveguides.

0.2
radius float | None

of the bends. Default is None, which uses the default radius of the cross_section.

None
length_x float

length of the parallel coupled straight waveguides.

4.0
bend ComponentSpec

90 degrees bend spec.

'bend_euler'
straight ComponentSpec

straight spec.

'straight'
cross_section CrossSectionSpec

cross_section spec.

'strip'
cross_section_bend CrossSectionSpec | None

optional bend cross_section spec.

None
length_extension float | None

straight length extension at the end of the coupler bottom ports.

None
      o2                              o3
      xx                              xx
      xx                             xx
       xx          length_x          x
        xx     ◄───────────────►    x
         xx                       xxx
           xx                   xxx
            xxx──────▲─────────xxx
                     │gap
             o1──────▼─────────◄──────────────► o4
                                length_extension
Source code in gdsfactory/components/couplers/coupler_ring.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@gf.cell_with_module_name(schematic_function=coupler_ring_schematic, tags=["couplers"])
def coupler_ring(
    gap: float = 0.2,
    radius: float | None = None,
    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 | None = None,
) -> Component:
    r"""Coupler for ring.

    Args:
        gap: spacing between parallel coupled straight waveguides.
        radius: of the bends. Default is None, which uses the default radius of the cross_section.
        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: straight length extension at the end of the coupler bottom ports.

    ```text
          o2                              o3
          xx                              xx
          xx                             xx
           xx          length_x          x
            xx     ◄───────────────►    x
             xx                       xxx
               xx                   xxx
                xxx──────▲─────────xxx
                         │gap
                 o1──────▼─────────◄──────────────► o4
                                    length_extension
    ```
    """
    return cf.coupler_ring(
        gap=gap,
        radius=radius,
        length_x=length_x,
        bend=bend,
        straight=straight,
        cross_section=cross_section,
        cross_section_bend=cross_section_bend,
        length_extension=length_extension,
    )

coupler_ring

coupler_straight

coupler_straight(
    length: float = 10.0,
    gap: float = 0.27,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Coupler_straight with two parallel straights.

Parameters:

Name Type Description Default
length float

of straight.

10.0
gap float

between straights.

0.27
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
    o2──────▲─────────o3
            │gap
    o1──────▼─────────o4
Source code in gdsfactory/components/couplers/coupler.py
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["couplers"])
def coupler_straight(
    length: float = 10.0,
    gap: float = 0.27,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Coupler_straight with two parallel straights.

    Args:
        length: of straight.
        gap: between straights.
        cross_section: specification (CrossSection, string or dict).

    ```text
        o2──────▲─────────o3
                │gap
        o1──────▼─────────o4
    ```
    """
    return cf.coupler_straight(
        length=length,
        gap=gap,
        cross_section=cross_section,
    )

coupler_straight

coupler_straight_asymmetric

coupler_straight_asymmetric

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

Coupler with two parallel straights of different widths.

Parameters:

Name Type Description Default
length float

of straight.

10.0
gap float

between straights.

0.27
width_top float

of top straight.

0.5
width_bot float

of bottom straight.

1
cross_section CrossSectionSpec

cross_section spec.

'strip'
Source code in gdsfactory/components/couplers/coupler_straight_asymmetric.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["couplers"])
def 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:
    """Coupler with two parallel straights of different widths.

    Args:
        length: of straight.
        gap: between straights.
        width_top: of top straight.
        width_bot: of bottom straight.
        cross_section: cross_section spec.
    """
    return cf.coupler_straight_asymmetric(
        length=length,
        gap=gap,
        width_top=width_top,
        width_bot=width_bot,
        cross_section=cross_section,
    )

coupler_straight_asymmetric

coupler_symmetric

coupler_symmetric(
    bend: ComponentSpec = "bend_s",
    gap: float = 0.234,
    dy: Delta = 4.0,
    dx: Delta = 10.0,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> Component

Two coupled straights with bends.

Parameters:

Name Type Description Default
bend ComponentSpec

bend spec.

'bend_s'
gap float

in um.

0.234
dy Delta

port to port vertical spacing.

4.0
dx Delta

bend length in x direction.

10.0
cross_section CrossSectionSpec

section.

'strip'
allow_min_radius_violation bool

if True does not check for min bend radius.

False
                   dx
                |-----|
                   ___ o3
                  /       |
         o2 _____/        |
                          |
         o1 _____         |  dy
                 \        |
                  \___    |
                       o4
Source code in gdsfactory/components/couplers/coupler.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@gf.cell_with_module_name(tags=["couplers"])
def coupler_symmetric(
    bend: ComponentSpec = "bend_s",
    gap: float = 0.234,
    dy: Delta = 4.0,
    dx: Delta = 10.0,
    cross_section: CrossSectionSpec = "strip",
    allow_min_radius_violation: bool = False,
) -> Component:
    r"""Two coupled straights with bends.

    Args:
        bend: bend spec.
        gap: in um.
        dy: port to port vertical spacing.
        dx: bend length in x direction.
        cross_section: section.
        allow_min_radius_violation: if True does not check for min bend radius.

    ```text
                       dx
                    |-----|
                       ___ o3
                      /       |
             o2 _____/        |
                              |
             o1 _____         |  dy
                     \        |
                      \___    |
                           o4
    ```

    """
    return cf.coupler_symmetric(
        bend=bend,
        gap=gap,
        dy=dy,
        dx=dx,
        cross_section=cross_section,
        allow_min_radius_violation=allow_min_radius_violation,
    )

coupler_symmetric

detectors

ge_detector_straight_si_contacts

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

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:

Name Type Description Default
length float

pd length.

40.0
cross_section CrossSectionSpec

for the waveguide.

'pn_ge_detector_si_contacts'
via_stack ComponentSpec

for the via_stacks. First element

'via_stack_slab_m3'
via_stack_width float

width of the via_stack.

10.0
via_stack_spacing float

spacing between via_stacks.

5.0
via_stack_offset float

with respect to the detector

0.0
taper_length float

length of the taper.

20.0
taper_width float

width of the taper.

0.8
taper_cros_section CrossSectionSpec

cross_section of the taper.

'strip'
Source code in gdsfactory/components/detectors/detector_ge.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@gf.cell_with_module_name(schematic_function=photodiode_schematic, tags=["detectors"])
def 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:
    """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>

    Args:
        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.
    """
    return cf.ge_detector_straight_si_contacts(
        length=length,
        cross_section=cross_section,
        via_stack=via_stack,
        via_stack_width=via_stack_width,
        via_stack_spacing=via_stack_spacing,
        via_stack_offset=via_stack_offset,
        taper_length=taper_length,
        taper_width=taper_width,
        taper_cros_section=taper_cros_section,
    )

ge_detector_straight_si_contacts

dies

add_frame

add_frame(
    component: ComponentSpec = "rectangle",
    width: float = 10.0,
    spacing: float = 10.0,
    layer: LayerSpec = "WG",
) -> Component

Returns component with a frame around it.

Parameters:

Name Type Description Default
component ComponentSpec

Component to frame.

'rectangle'
width float

of the frame.

10.0
spacing float

of component to frame.

10.0
layer LayerSpec

frame layer.

'WG'
Source code in gdsfactory/components/dies/align.py
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
@gf.cell_with_module_name(tags=["dies"])
def add_frame(
    component: ComponentSpec = "rectangle",
    width: float = 10.0,
    spacing: float = 10.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns component with a frame around it.

    Args:
        component: Component to frame.
        width: of the frame.
        spacing: of component to frame.
        layer: frame layer.
    """
    return cf.add_frame(
        component=component,
        width=width,
        spacing=spacing,
        layer=layer,
    )

add_frame

align_wafer

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

Returns cross inside a frame to align wafer.

Parameters:

Name Type Description Default
width float

in um.

10.0
spacing float

in um.

10.0
cross_length float

for the cross.

80.0
layer LayerSpec

for the cross.

'WG'
layer_cladding tuple[int, int] | None

optional.

None
square_corner str

bottom_left, bottom_right, top_right, top_left.

'bottom_left'
Source code in gdsfactory/components/dies/align.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@gf.cell_with_module_name(tags=["dies"])
def 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:
    """Returns cross inside a frame to align wafer.

    Args:
        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.
    """
    return cf.align_wafer(
        width=width,
        spacing=spacing,
        cross_length=cross_length,
        layer=layer,
        layer_cladding=layer_cladding,
        square_corner=square_corner,
    )

align_wafer

die

based on phidl.geometry.

die

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_layer: LayerSpec = "WG",
    text: ComponentSpec = "text",
    draw_corners: bool = False,
) -> gf.Component

Returns die with optional markers marking the boundary of the die.

Parameters:

Name Type Description Default
size Size

x, y dimensions of the die.

(10000.0, 10000.0)
street_width float

Width of the corner marks for die-sawing.

100.0
street_length float

Length of the corner marks for die-sawing.

1000.0
die_name str | None

Label text. If None, no label is added.

'chip99'
text_size float

Label text size.

100.0
text_location str | Float2

{'NW', 'N', 'NE', 'SW', 'S', 'SE'} or (x, y) coordinate.

'SW'
layer LayerSpec | None

For street widths. None to not draw the street widths.

'FLOORPLAN'
bbox_layer LayerSpec | None

optional bbox layer drawn bounding box around the die.

'FLOORPLAN'
text_layer LayerSpec

Layer for the die name text.

'WG'
text ComponentSpec

function use for generating text. Needs to accept text, size, layer.

'text'
draw_corners bool

True draws only corners. False draws a square die.

False
Source code in gdsfactory/components/dies/die.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@gf.cell_with_module_name(tags=["dies"])
def 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_layer: LayerSpec = "WG",
    text: ComponentSpec = "text",
    draw_corners: bool = False,
) -> gf.Component:
    """Returns die with optional markers marking the boundary of the die.

    Args:
        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_layer: Layer for the die name text.
        text: function use for generating text. Needs to accept text, size, layer.
        draw_corners: True draws only corners. False draws a square die.
    """
    return cf.die(
        size=size,
        street_width=street_width,
        street_length=street_length,
        die_name=die_name,
        text_size=text_size,
        text_location=text_location,
        layer=layer,
        bbox_layer=bbox_layer,
        text_layer=text_layer,
        text=text,
        draw_corners=draw_corners,
    )

die

die_frame

die_frame(
    size: Size = (11200.0, 5000.0),
    layer_floorplan: LayerSpec = "FLOORPLAN",
) -> gf.Component

Returns a rectangular die floorplan.

Parameters:

Name Type Description Default
size Size

die frame size (width, height), in um.

(11200.0, 5000.0)
layer_floorplan LayerSpec

layer for the floorplan rectangle.

'FLOORPLAN'
Source code in gdsfactory/components/dies/die_frame_with_pads.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@gf.cell(tags=["dies"])
def die_frame(
    size: Size = (11200.0, 5000.0),
    layer_floorplan: LayerSpec = "FLOORPLAN",
) -> gf.Component:
    """Returns a rectangular die floorplan.

    Args:
        size: die frame size (width, height), in um.
        layer_floorplan: layer for the floorplan rectangle.
    """
    return cf.die_frame(
        size=size,
        layer_floorplan=layer_floorplan,
    )

die_frame

die_frame_phix

die_frame_phix(
    die_frame: ComponentSpec = "die_frame",
    nfibers: int = 32,
    npads: int = 60,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: (
        ComponentSpec | None
    ) = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    edge_to_pad_distance_left: float | None = None,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    pad_port_name_rf: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    fiber_coupler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = True,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = "text_rectangular",
    pad_side_distance: float = 1160.0,
    xoffset_rf_pads: float = 50,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
    pad_rotation_rf: float = 0,
    with_loopback: bool = True,
) -> Component

A die_frame with grating couplers and pads.

Parameters:

Name Type Description Default
die_frame ComponentSpec

die_frame spec.

'die_frame'
nfibers int

the number of grating couplers.

32
npads int

the number of pads.

60
npads_rf int

the number of RF pads on the left side.

6
fiber_pitch float

the pitch of the grating couplers, in um.

127.0
pad_pitch float

the pitch of the pads, in um.

150.0
pad_pitch_gsg float

the pitch of the GSG pads, in um.

720.0
edge_coupler ComponentSpec | None

the grating coupler component.

'edge_coupler_silicon'
grating_coupler ComponentSpec | None

Optional grating coupler.

None
cross_section CrossSectionSpec

the cross section.

'strip'
pad ComponentSpec

the pad component.

'pad'
pad_gsg ComponentSpec

the GSG pad component.

'pad_gsg'
edge_to_pad_distance float

the distance from the edge to the pads, in um.

200.0
edge_to_pad_distance_left float | None

Optional distance from the left edge to the pads, in um. If None, uses edge_to_pad_distance for both sides.

None
pad_port_name_top str

name of the pad port name at the top facing south.

'e4'
pad_port_name_bot str

name of the pad port name at the bottom facing north.

'e2'
pad_port_name_rf str

name of the RF pad port name.

'e2'
layer_fiducial LayerSpec

layer for fiducials.

'M3'
fiducial_top_left ComponentSpec | None

optional top-left fiducial. Defaults to the legacy cross on layer_fiducial.

None
fiducial_top_right ComponentSpec | None

optional top-right fiducial. Defaults to the legacy circle on layer_fiducial.

None
fiducial_bottom_left ComponentSpec | None

optional bottom-left fiducial. Defaults to the legacy circle on layer_fiducial.

None
fiducial_bottom_right ComponentSpec | None

optional bottom-right fiducial. Defaults to the legacy circle on layer_fiducial.

None
layer_ruler LayerSpec

layer for ruler.

'WG'
ruler_bbox_layers tuple[LayerSpec, ...] | None

layers for bbox.

None
ruler_bbox_offset float

offset for bbox.

3.0
ruler_yoffset float

y-offset for ruler.

0
ruler_xoffset float

x-offset for ruler.

0
fiber_coupler_xoffset float

x-offset for fiber couplers.

0
with_right_fiber_coupler bool

if True, adds edge couplers on the right side.

True
with_left_fiber_coupler bool

if True, adds edge couplers on the left side.

True
text_offset Float2

offset for text.

(20, 10)
text ComponentSpec | None

text component spec.

'text_rectangular'
pad_side_distance float

distance from the die frame side to the first pad, in um.

1160.0
xoffset_rf_pads float

RF pads x-offset.

50
pad_rotation_dc_north float

rotation for DC pads.

0
pad_rotation_dc_south float

rotation for DC pads.

0
pad_rotation_rf float

rotation for RF pads.

0
with_loopback bool

if True, adds loopback structures.

True
Source code in gdsfactory/components/dies/die_frame_with_pads.py
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
def die_frame_phix(
    die_frame: ComponentSpec = "die_frame",
    nfibers: int = 32,
    npads: int = 60,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: ComponentSpec | None = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    edge_to_pad_distance_left: float | None = None,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    pad_port_name_rf: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    fiber_coupler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = True,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = "text_rectangular",
    pad_side_distance: float = 1160.0,
    xoffset_rf_pads: float = 50,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
    pad_rotation_rf: float = 0,
    with_loopback: bool = True,
) -> Component:
    """A die_frame with grating couplers and pads.

    Args:
        die_frame: die_frame spec.
        nfibers: the number of grating couplers.
        npads: the number of pads.
        npads_rf: the number of RF pads on the left side.
        fiber_pitch: the pitch of the grating couplers, in um.
        pad_pitch: the pitch of the pads, in um.
        pad_pitch_gsg: the pitch of the GSG pads, in um.
        edge_coupler: the grating coupler component.
        grating_coupler: Optional grating coupler.
        cross_section: the cross section.
        pad: the pad component.
        pad_gsg: the GSG pad component.
        edge_to_pad_distance: the distance from the edge to the pads, in um.
        edge_to_pad_distance_left: Optional distance from the left edge to the pads, in um. If None, uses edge_to_pad_distance for both sides.
        pad_port_name_top: name of the pad port name at the top facing south.
        pad_port_name_bot: name of the pad port name at the bottom facing north.
        pad_port_name_rf: name of the RF pad port name.
        layer_fiducial: layer for fiducials.
        fiducial_top_left: optional top-left fiducial. Defaults to the legacy
            cross on ``layer_fiducial``.
        fiducial_top_right: optional top-right fiducial. Defaults to the legacy
            circle on ``layer_fiducial``.
        fiducial_bottom_left: optional bottom-left fiducial. Defaults to the
            legacy circle on ``layer_fiducial``.
        fiducial_bottom_right: optional bottom-right fiducial. Defaults to the
            legacy circle on ``layer_fiducial``.
        layer_ruler: layer for ruler.
        ruler_bbox_layers: layers for bbox.
        ruler_bbox_offset: offset for bbox.
        ruler_yoffset: y-offset for ruler.
        ruler_xoffset: x-offset for ruler.
        fiber_coupler_xoffset: x-offset for fiber couplers.
        with_right_fiber_coupler: if True, adds edge couplers on the right side.
        with_left_fiber_coupler: if True, adds edge couplers on the left side.
        text_offset: offset for text.
        text: text component spec.
        pad_side_distance: distance from the die frame side to the first pad, in um.
        xoffset_rf_pads: RF pads x-offset.
        pad_rotation_dc_north: rotation for DC pads.
        pad_rotation_dc_south: rotation for DC pads.
        pad_rotation_rf: rotation for RF pads.
        with_loopback: if True, adds loopback structures.
    """
    return cf.die_frame_phix(
        die_frame=die_frame,
        nfibers=nfibers,
        npads=npads,
        npads_rf=npads_rf,
        fiber_pitch=fiber_pitch,
        pad_pitch=pad_pitch,
        pad_pitch_gsg=pad_pitch_gsg,
        edge_coupler=edge_coupler,
        grating_coupler=grating_coupler,
        cross_section=cross_section,
        pad=pad,
        pad_gsg=pad_gsg,
        edge_to_pad_distance=edge_to_pad_distance,
        edge_to_pad_distance_left=edge_to_pad_distance_left,
        pad_port_name_top=pad_port_name_top,
        pad_port_name_bot=pad_port_name_bot,
        pad_port_name_rf=pad_port_name_rf,
        layer_fiducial=layer_fiducial,
        fiducial_top_left=fiducial_top_left,
        fiducial_top_right=fiducial_top_right,
        fiducial_bottom_left=fiducial_bottom_left,
        fiducial_bottom_right=fiducial_bottom_right,
        layer_ruler=layer_ruler,
        ruler_bbox_layers=ruler_bbox_layers,
        ruler_bbox_offset=ruler_bbox_offset,
        ruler_yoffset=ruler_yoffset,
        ruler_xoffset=ruler_xoffset,
        fiber_coupler_xoffset=fiber_coupler_xoffset,
        with_right_fiber_coupler=with_right_fiber_coupler,
        with_left_fiber_coupler=with_left_fiber_coupler,
        text_offset=text_offset,
        text=text,
        pad_side_distance=pad_side_distance,
        xoffset_rf_pads=xoffset_rf_pads,
        pad_rotation_dc_north=pad_rotation_dc_north,
        pad_rotation_dc_south=pad_rotation_dc_south,
        pad_rotation_rf=pad_rotation_rf,
        with_loopback=with_loopback,
    )

die_frame_phix

die_frame_phix_dc

die_frame_phix_dc(
    die_frame: ComponentSpec = "die_frame",
    nfibers: int = 32,
    npads: int = 59,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: (
        ComponentSpec | None
    ) = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = True,
    fiber_coupler_xoffset: float = 0,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = None,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
    pad_side_distance: float = 1160.0,
) -> Component

A PHIX die frame with DC pads only.

Parameters:

Name Type Description Default
die_frame ComponentSpec

die_frame spec.

'die_frame'
nfibers int

the number of grating couplers.

32
npads int

the number of pads.

59
npads_rf int

the number of RF pads on the left side.

6
fiber_pitch float

the pitch of the grating couplers, in um.

127.0
pad_pitch float

the pitch of the pads, in um.

150.0
pad_pitch_gsg float

the pitch of the GSG pads, in um.

720.0
edge_coupler ComponentSpec | None

the edge coupler component.

'edge_coupler_silicon'
grating_coupler ComponentSpec | None

Optional grating coupler.

None
cross_section CrossSectionSpec

the cross section.

'strip'
pad ComponentSpec

the pad component.

'pad'
pad_gsg ComponentSpec

the GSG pad component.

'pad_gsg'
edge_to_pad_distance float

the distance from the edge to the pads, in um.

200.0
pad_port_name_top str

name of the pad port name at the top facing south.

'e4'
pad_port_name_bot str

name of the pad port name at the bottom facing north.

'e2'
layer_fiducial LayerSpec

layer for fiducials.

'M3'
fiducial_top_left ComponentSpec | None

optional top-left fiducial; defaults to a cross.

None
fiducial_top_right ComponentSpec | None

optional top-right fiducial; defaults to a circle.

None
fiducial_bottom_left ComponentSpec | None

optional bottom-left fiducial; defaults to a circle.

None
fiducial_bottom_right ComponentSpec | None

optional bottom-right fiducial; defaults to a circle.

None
layer_ruler LayerSpec

layer for ruler.

'WG'
ruler_bbox_layers tuple[LayerSpec, ...] | None

layers for bbox.

None
ruler_bbox_offset float

offset for bbox.

3.0
ruler_yoffset float

y-offset for ruler.

0
ruler_xoffset float

x-offset for ruler.

0
with_right_fiber_coupler bool

if True, adds edge couplers on the right side.

True
with_left_fiber_coupler bool

if True, adds edge couplers on the left side.

True
fiber_coupler_xoffset float

x-offset for fiber couplers.

0
text_offset Float2

offset for text.

(20, 10)
text ComponentSpec | None

text component spec.

None
pad_rotation_dc_north float

rotation for DC pads.

0
pad_rotation_dc_south float

rotation for DC pads.

0
pad_side_distance float

distance from the die frame side to the first pad, in um.

1160.0
Source code in gdsfactory/components/dies/die_frame_with_pads.py
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
@gf.cell_with_module_name(tags=["dies"])
def die_frame_phix_dc(
    die_frame: ComponentSpec = "die_frame",
    nfibers: int = 32,
    npads: int = 59,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: ComponentSpec | None = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = True,
    fiber_coupler_xoffset: float = 0,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = None,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
    pad_side_distance: float = 1160.0,
) -> Component:
    """A PHIX die frame with DC pads only.

    Args:
        die_frame: die_frame spec.
        nfibers: the number of grating couplers.
        npads: the number of pads.
        npads_rf: the number of RF pads on the left side.
        fiber_pitch: the pitch of the grating couplers, in um.
        pad_pitch: the pitch of the pads, in um.
        pad_pitch_gsg: the pitch of the GSG pads, in um.
        edge_coupler: the edge coupler component.
        grating_coupler: Optional grating coupler.
        cross_section: the cross section.
        pad: the pad component.
        pad_gsg: the GSG pad component.
        edge_to_pad_distance: the distance from the edge to the pads, in um.
        pad_port_name_top: name of the pad port name at the top facing south.
        pad_port_name_bot: name of the pad port name at the bottom facing north.
        layer_fiducial: layer for fiducials.
        fiducial_top_left: optional top-left fiducial; defaults to a cross.
        fiducial_top_right: optional top-right fiducial; defaults to a circle.
        fiducial_bottom_left: optional bottom-left fiducial; defaults to a circle.
        fiducial_bottom_right: optional bottom-right fiducial; defaults to a circle.
        layer_ruler: layer for ruler.
        ruler_bbox_layers: layers for bbox.
        ruler_bbox_offset: offset for bbox.
        ruler_yoffset: y-offset for ruler.
        ruler_xoffset: x-offset for ruler.
        with_right_fiber_coupler: if True, adds edge couplers on the right side.
        with_left_fiber_coupler: if True, adds edge couplers on the left side.
        fiber_coupler_xoffset: x-offset for fiber couplers.
        text_offset: offset for text.
        text: text component spec.
        pad_rotation_dc_north: rotation for DC pads.
        pad_rotation_dc_south: rotation for DC pads.
        pad_side_distance: distance from the die frame side to the first pad, in um.
    """
    return cf.die_frame_phix_dc(
        die_frame=die_frame,
        nfibers=nfibers,
        npads=npads,
        npads_rf=npads_rf,
        fiber_pitch=fiber_pitch,
        pad_pitch=pad_pitch,
        pad_pitch_gsg=pad_pitch_gsg,
        edge_coupler=edge_coupler,
        grating_coupler=grating_coupler,
        cross_section=cross_section,
        pad=pad,
        pad_gsg=pad_gsg,
        edge_to_pad_distance=edge_to_pad_distance,
        pad_port_name_top=pad_port_name_top,
        pad_port_name_bot=pad_port_name_bot,
        layer_fiducial=layer_fiducial,
        fiducial_top_left=fiducial_top_left,
        fiducial_top_right=fiducial_top_right,
        fiducial_bottom_left=fiducial_bottom_left,
        fiducial_bottom_right=fiducial_bottom_right,
        layer_ruler=layer_ruler,
        ruler_bbox_layers=ruler_bbox_layers,
        ruler_bbox_offset=ruler_bbox_offset,
        ruler_yoffset=ruler_yoffset,
        ruler_xoffset=ruler_xoffset,
        with_right_fiber_coupler=with_right_fiber_coupler,
        with_left_fiber_coupler=with_left_fiber_coupler,
        fiber_coupler_xoffset=fiber_coupler_xoffset,
        text_offset=text_offset,
        text=text,
        pad_rotation_dc_north=pad_rotation_dc_north,
        pad_rotation_dc_south=pad_rotation_dc_south,
        pad_side_distance=pad_side_distance,
    )

die_frame_phix_dc

die_frame_phix_rf

die_frame_phix_rf(
    die_frame: ComponentSpec = "die_frame_rf",
    nfibers: int = 32,
    npads: int = 59,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: (
        ComponentSpec | None
    ) = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    pad_port_name_rf: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = False,
    fiber_coupler_xoffset: float = 0,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = None,
    pad_side_distance: float = 350.0,
    xoffset_rf_pads: float = 50,
    pad_rotation_rf: float = 0,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
) -> Component

A PHIX die frame with DC and RF pads.

Parameters:

Name Type Description Default
die_frame ComponentSpec

die_frame spec.

'die_frame_rf'
nfibers int

the number of grating couplers.

32
npads int

the number of pads.

59
npads_rf int

the number of RF pads on the left side.

6
fiber_pitch float

the pitch of the grating couplers, in um.

127.0
pad_pitch float

the pitch of the pads, in um.

150.0
pad_pitch_gsg float

the pitch of the GSG pads, in um.

720.0
edge_coupler ComponentSpec | None

the edge coupler component.

'edge_coupler_silicon'
grating_coupler ComponentSpec | None

Optional grating coupler.

None
cross_section CrossSectionSpec

the cross section.

'strip'
pad ComponentSpec

the pad component.

'pad'
pad_gsg ComponentSpec

the GSG pad component.

'pad_gsg'
edge_to_pad_distance float

the distance from the edge to the pads, in um.

200.0
pad_port_name_top str

name of the pad port name at the top facing south.

'e4'
pad_port_name_bot str

name of the pad port name at the bottom facing north.

'e2'
pad_port_name_rf str

name of the RF pad port name.

'e2'
layer_fiducial LayerSpec

layer for fiducials.

'M3'
fiducial_top_left ComponentSpec | None

optional top-left fiducial; defaults to a cross.

None
fiducial_top_right ComponentSpec | None

optional top-right fiducial; defaults to a circle.

None
fiducial_bottom_left ComponentSpec | None

optional bottom-left fiducial; defaults to a circle.

None
fiducial_bottom_right ComponentSpec | None

optional bottom-right fiducial; defaults to a circle.

None
layer_ruler LayerSpec

layer for ruler.

'WG'
ruler_bbox_layers tuple[LayerSpec, ...] | None

layers for bbox.

None
ruler_bbox_offset float

offset for bbox.

3.0
ruler_yoffset float

y-offset for ruler.

0
ruler_xoffset float

x-offset for ruler.

0
with_right_fiber_coupler bool

if True, adds edge couplers on the right side.

True
with_left_fiber_coupler bool

if True, adds edge couplers on the left side.

False
fiber_coupler_xoffset float

x-offset for fiber couplers.

0
text_offset Float2

offset for text.

(20, 10)
text ComponentSpec | None

text component spec.

None
pad_side_distance float

distance from the die frame side to the first pad, in um.

350.0
xoffset_rf_pads float

RF pads x-offset.

50
pad_rotation_rf float

rotation for RF pads.

0
pad_rotation_dc_north float

rotation for DC pads.

0
pad_rotation_dc_south float

rotation for DC pads.

0
Source code in gdsfactory/components/dies/die_frame_with_pads.py
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
@gf.cell_with_module_name(tags=["dies"])
def die_frame_phix_rf(
    die_frame: ComponentSpec = "die_frame_rf",
    nfibers: int = 32,
    npads: int = 59,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: ComponentSpec | None = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    pad_port_name_rf: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = False,
    fiber_coupler_xoffset: float = 0,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = None,
    pad_side_distance: float = 350.0,
    xoffset_rf_pads: float = 50,
    pad_rotation_rf: float = 0,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
) -> Component:
    """A PHIX die frame with DC and RF pads.

    Args:
        die_frame: die_frame spec.
        nfibers: the number of grating couplers.
        npads: the number of pads.
        npads_rf: the number of RF pads on the left side.
        fiber_pitch: the pitch of the grating couplers, in um.
        pad_pitch: the pitch of the pads, in um.
        pad_pitch_gsg: the pitch of the GSG pads, in um.
        edge_coupler: the edge coupler component.
        grating_coupler: Optional grating coupler.
        cross_section: the cross section.
        pad: the pad component.
        pad_gsg: the GSG pad component.
        edge_to_pad_distance: the distance from the edge to the pads, in um.
        pad_port_name_top: name of the pad port name at the top facing south.
        pad_port_name_bot: name of the pad port name at the bottom facing north.
        pad_port_name_rf: name of the RF pad port name.
        layer_fiducial: layer for fiducials.
        fiducial_top_left: optional top-left fiducial; defaults to a cross.
        fiducial_top_right: optional top-right fiducial; defaults to a circle.
        fiducial_bottom_left: optional bottom-left fiducial; defaults to a circle.
        fiducial_bottom_right: optional bottom-right fiducial; defaults to a circle.
        layer_ruler: layer for ruler.
        ruler_bbox_layers: layers for bbox.
        ruler_bbox_offset: offset for bbox.
        ruler_yoffset: y-offset for ruler.
        ruler_xoffset: x-offset for ruler.
        with_right_fiber_coupler: if True, adds edge couplers on the right side.
        with_left_fiber_coupler: if True, adds edge couplers on the left side.
        fiber_coupler_xoffset: x-offset for fiber couplers.
        text_offset: offset for text.
        text: text component spec.
        pad_side_distance: distance from the die frame side to the first pad, in um.
        xoffset_rf_pads: RF pads x-offset.
        pad_rotation_rf: rotation for RF pads.
        pad_rotation_dc_north: rotation for DC pads.
        pad_rotation_dc_south: rotation for DC pads.
    """
    return cf.die_frame_phix_rf(
        die_frame=die_frame,
        nfibers=nfibers,
        npads=npads,
        npads_rf=npads_rf,
        fiber_pitch=fiber_pitch,
        pad_pitch=pad_pitch,
        pad_pitch_gsg=pad_pitch_gsg,
        edge_coupler=edge_coupler,
        grating_coupler=grating_coupler,
        cross_section=cross_section,
        pad=pad,
        pad_gsg=pad_gsg,
        edge_to_pad_distance=edge_to_pad_distance,
        pad_port_name_top=pad_port_name_top,
        pad_port_name_bot=pad_port_name_bot,
        pad_port_name_rf=pad_port_name_rf,
        layer_fiducial=layer_fiducial,
        fiducial_top_left=fiducial_top_left,
        fiducial_top_right=fiducial_top_right,
        fiducial_bottom_left=fiducial_bottom_left,
        fiducial_bottom_right=fiducial_bottom_right,
        layer_ruler=layer_ruler,
        ruler_bbox_layers=ruler_bbox_layers,
        ruler_bbox_offset=ruler_bbox_offset,
        ruler_yoffset=ruler_yoffset,
        ruler_xoffset=ruler_xoffset,
        with_right_fiber_coupler=with_right_fiber_coupler,
        with_left_fiber_coupler=with_left_fiber_coupler,
        fiber_coupler_xoffset=fiber_coupler_xoffset,
        text_offset=text_offset,
        text=text,
        pad_side_distance=pad_side_distance,
        xoffset_rf_pads=xoffset_rf_pads,
        pad_rotation_rf=pad_rotation_rf,
        pad_rotation_dc_north=pad_rotation_dc_north,
        pad_rotation_dc_south=pad_rotation_dc_south,
    )

die_frame_phix_rf

die_frame_rf

die_frame_rf(
    size: Size = (10400.0, 5000.0),
    layer_floorplan: LayerSpec = "FLOORPLAN",
) -> gf.Component

Returns a rectangular die floorplan sized for RF dies.

Parameters:

Name Type Description Default
size Size

die frame size (width, height), in um.

(10400.0, 5000.0)
layer_floorplan LayerSpec

layer for the floorplan rectangle.

'FLOORPLAN'
Source code in gdsfactory/components/dies/die_frame_with_pads.py
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@gf.cell(tags=["dies"])
def die_frame_rf(
    size: Size = (10400.0, 5000.0),
    layer_floorplan: LayerSpec = "FLOORPLAN",
) -> gf.Component:
    """Returns a rectangular die floorplan sized for RF dies.

    Args:
        size: die frame size (width, height), in um.
        layer_floorplan: layer for the floorplan rectangle.
    """
    return cf.die_frame_rf(
        size=size,
        layer_floorplan=layer_floorplan,
    )

die_frame_rf

die_frame_with_pads

die_frame

die_frame(
    size: Size = (11200.0, 5000.0),
    layer_floorplan: LayerSpec = "FLOORPLAN",
) -> gf.Component

Returns a rectangular die floorplan.

Parameters:

Name Type Description Default
size Size

die frame size (width, height), in um.

(11200.0, 5000.0)
layer_floorplan LayerSpec

layer for the floorplan rectangle.

'FLOORPLAN'
Source code in gdsfactory/components/dies/die_frame_with_pads.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@gf.cell(tags=["dies"])
def die_frame(
    size: Size = (11200.0, 5000.0),
    layer_floorplan: LayerSpec = "FLOORPLAN",
) -> gf.Component:
    """Returns a rectangular die floorplan.

    Args:
        size: die frame size (width, height), in um.
        layer_floorplan: layer for the floorplan rectangle.
    """
    return cf.die_frame(
        size=size,
        layer_floorplan=layer_floorplan,
    )

die_frame_phix

die_frame_phix(
    die_frame: ComponentSpec = "die_frame",
    nfibers: int = 32,
    npads: int = 60,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: (
        ComponentSpec | None
    ) = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    edge_to_pad_distance_left: float | None = None,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    pad_port_name_rf: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    fiber_coupler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = True,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = "text_rectangular",
    pad_side_distance: float = 1160.0,
    xoffset_rf_pads: float = 50,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
    pad_rotation_rf: float = 0,
    with_loopback: bool = True,
) -> Component

A die_frame with grating couplers and pads.

Parameters:

Name Type Description Default
die_frame ComponentSpec

die_frame spec.

'die_frame'
nfibers int

the number of grating couplers.

32
npads int

the number of pads.

60
npads_rf int

the number of RF pads on the left side.

6
fiber_pitch float

the pitch of the grating couplers, in um.

127.0
pad_pitch float

the pitch of the pads, in um.

150.0
pad_pitch_gsg float

the pitch of the GSG pads, in um.

720.0
edge_coupler ComponentSpec | None

the grating coupler component.

'edge_coupler_silicon'
grating_coupler ComponentSpec | None

Optional grating coupler.

None
cross_section CrossSectionSpec

the cross section.

'strip'
pad ComponentSpec

the pad component.

'pad'
pad_gsg ComponentSpec

the GSG pad component.

'pad_gsg'
edge_to_pad_distance float

the distance from the edge to the pads, in um.

200.0
edge_to_pad_distance_left float | None

Optional distance from the left edge to the pads, in um. If None, uses edge_to_pad_distance for both sides.

None
pad_port_name_top str

name of the pad port name at the top facing south.

'e4'
pad_port_name_bot str

name of the pad port name at the bottom facing north.

'e2'
pad_port_name_rf str

name of the RF pad port name.

'e2'
layer_fiducial LayerSpec

layer for fiducials.

'M3'
fiducial_top_left ComponentSpec | None

optional top-left fiducial. Defaults to the legacy cross on layer_fiducial.

None
fiducial_top_right ComponentSpec | None

optional top-right fiducial. Defaults to the legacy circle on layer_fiducial.

None
fiducial_bottom_left ComponentSpec | None

optional bottom-left fiducial. Defaults to the legacy circle on layer_fiducial.

None
fiducial_bottom_right ComponentSpec | None

optional bottom-right fiducial. Defaults to the legacy circle on layer_fiducial.

None
layer_ruler LayerSpec

layer for ruler.

'WG'
ruler_bbox_layers tuple[LayerSpec, ...] | None

layers for bbox.

None
ruler_bbox_offset float

offset for bbox.

3.0
ruler_yoffset float

y-offset for ruler.

0
ruler_xoffset float

x-offset for ruler.

0
fiber_coupler_xoffset float

x-offset for fiber couplers.

0
with_right_fiber_coupler bool

if True, adds edge couplers on the right side.

True
with_left_fiber_coupler bool

if True, adds edge couplers on the left side.

True
text_offset Float2

offset for text.

(20, 10)
text ComponentSpec | None

text component spec.

'text_rectangular'
pad_side_distance float

distance from the die frame side to the first pad, in um.

1160.0
xoffset_rf_pads float

RF pads x-offset.

50
pad_rotation_dc_north float

rotation for DC pads.

0
pad_rotation_dc_south float

rotation for DC pads.

0
pad_rotation_rf float

rotation for RF pads.

0
with_loopback bool

if True, adds loopback structures.

True
Source code in gdsfactory/components/dies/die_frame_with_pads.py
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
def die_frame_phix(
    die_frame: ComponentSpec = "die_frame",
    nfibers: int = 32,
    npads: int = 60,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: ComponentSpec | None = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    edge_to_pad_distance_left: float | None = None,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    pad_port_name_rf: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    fiber_coupler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = True,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = "text_rectangular",
    pad_side_distance: float = 1160.0,
    xoffset_rf_pads: float = 50,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
    pad_rotation_rf: float = 0,
    with_loopback: bool = True,
) -> Component:
    """A die_frame with grating couplers and pads.

    Args:
        die_frame: die_frame spec.
        nfibers: the number of grating couplers.
        npads: the number of pads.
        npads_rf: the number of RF pads on the left side.
        fiber_pitch: the pitch of the grating couplers, in um.
        pad_pitch: the pitch of the pads, in um.
        pad_pitch_gsg: the pitch of the GSG pads, in um.
        edge_coupler: the grating coupler component.
        grating_coupler: Optional grating coupler.
        cross_section: the cross section.
        pad: the pad component.
        pad_gsg: the GSG pad component.
        edge_to_pad_distance: the distance from the edge to the pads, in um.
        edge_to_pad_distance_left: Optional distance from the left edge to the pads, in um. If None, uses edge_to_pad_distance for both sides.
        pad_port_name_top: name of the pad port name at the top facing south.
        pad_port_name_bot: name of the pad port name at the bottom facing north.
        pad_port_name_rf: name of the RF pad port name.
        layer_fiducial: layer for fiducials.
        fiducial_top_left: optional top-left fiducial. Defaults to the legacy
            cross on ``layer_fiducial``.
        fiducial_top_right: optional top-right fiducial. Defaults to the legacy
            circle on ``layer_fiducial``.
        fiducial_bottom_left: optional bottom-left fiducial. Defaults to the
            legacy circle on ``layer_fiducial``.
        fiducial_bottom_right: optional bottom-right fiducial. Defaults to the
            legacy circle on ``layer_fiducial``.
        layer_ruler: layer for ruler.
        ruler_bbox_layers: layers for bbox.
        ruler_bbox_offset: offset for bbox.
        ruler_yoffset: y-offset for ruler.
        ruler_xoffset: x-offset for ruler.
        fiber_coupler_xoffset: x-offset for fiber couplers.
        with_right_fiber_coupler: if True, adds edge couplers on the right side.
        with_left_fiber_coupler: if True, adds edge couplers on the left side.
        text_offset: offset for text.
        text: text component spec.
        pad_side_distance: distance from the die frame side to the first pad, in um.
        xoffset_rf_pads: RF pads x-offset.
        pad_rotation_dc_north: rotation for DC pads.
        pad_rotation_dc_south: rotation for DC pads.
        pad_rotation_rf: rotation for RF pads.
        with_loopback: if True, adds loopback structures.
    """
    return cf.die_frame_phix(
        die_frame=die_frame,
        nfibers=nfibers,
        npads=npads,
        npads_rf=npads_rf,
        fiber_pitch=fiber_pitch,
        pad_pitch=pad_pitch,
        pad_pitch_gsg=pad_pitch_gsg,
        edge_coupler=edge_coupler,
        grating_coupler=grating_coupler,
        cross_section=cross_section,
        pad=pad,
        pad_gsg=pad_gsg,
        edge_to_pad_distance=edge_to_pad_distance,
        edge_to_pad_distance_left=edge_to_pad_distance_left,
        pad_port_name_top=pad_port_name_top,
        pad_port_name_bot=pad_port_name_bot,
        pad_port_name_rf=pad_port_name_rf,
        layer_fiducial=layer_fiducial,
        fiducial_top_left=fiducial_top_left,
        fiducial_top_right=fiducial_top_right,
        fiducial_bottom_left=fiducial_bottom_left,
        fiducial_bottom_right=fiducial_bottom_right,
        layer_ruler=layer_ruler,
        ruler_bbox_layers=ruler_bbox_layers,
        ruler_bbox_offset=ruler_bbox_offset,
        ruler_yoffset=ruler_yoffset,
        ruler_xoffset=ruler_xoffset,
        fiber_coupler_xoffset=fiber_coupler_xoffset,
        with_right_fiber_coupler=with_right_fiber_coupler,
        with_left_fiber_coupler=with_left_fiber_coupler,
        text_offset=text_offset,
        text=text,
        pad_side_distance=pad_side_distance,
        xoffset_rf_pads=xoffset_rf_pads,
        pad_rotation_dc_north=pad_rotation_dc_north,
        pad_rotation_dc_south=pad_rotation_dc_south,
        pad_rotation_rf=pad_rotation_rf,
        with_loopback=with_loopback,
    )

die_frame_phix_dc

die_frame_phix_dc(
    die_frame: ComponentSpec = "die_frame",
    nfibers: int = 32,
    npads: int = 59,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: (
        ComponentSpec | None
    ) = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = True,
    fiber_coupler_xoffset: float = 0,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = None,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
    pad_side_distance: float = 1160.0,
) -> Component

A PHIX die frame with DC pads only.

Parameters:

Name Type Description Default
die_frame ComponentSpec

die_frame spec.

'die_frame'
nfibers int

the number of grating couplers.

32
npads int

the number of pads.

59
npads_rf int

the number of RF pads on the left side.

6
fiber_pitch float

the pitch of the grating couplers, in um.

127.0
pad_pitch float

the pitch of the pads, in um.

150.0
pad_pitch_gsg float

the pitch of the GSG pads, in um.

720.0
edge_coupler ComponentSpec | None

the edge coupler component.

'edge_coupler_silicon'
grating_coupler ComponentSpec | None

Optional grating coupler.

None
cross_section CrossSectionSpec

the cross section.

'strip'
pad ComponentSpec

the pad component.

'pad'
pad_gsg ComponentSpec

the GSG pad component.

'pad_gsg'
edge_to_pad_distance float

the distance from the edge to the pads, in um.

200.0
pad_port_name_top str

name of the pad port name at the top facing south.

'e4'
pad_port_name_bot str

name of the pad port name at the bottom facing north.

'e2'
layer_fiducial LayerSpec

layer for fiducials.

'M3'
fiducial_top_left ComponentSpec | None

optional top-left fiducial; defaults to a cross.

None
fiducial_top_right ComponentSpec | None

optional top-right fiducial; defaults to a circle.

None
fiducial_bottom_left ComponentSpec | None

optional bottom-left fiducial; defaults to a circle.

None
fiducial_bottom_right ComponentSpec | None

optional bottom-right fiducial; defaults to a circle.

None
layer_ruler LayerSpec

layer for ruler.

'WG'
ruler_bbox_layers tuple[LayerSpec, ...] | None

layers for bbox.

None
ruler_bbox_offset float

offset for bbox.

3.0
ruler_yoffset float

y-offset for ruler.

0
ruler_xoffset float

x-offset for ruler.

0
with_right_fiber_coupler bool

if True, adds edge couplers on the right side.

True
with_left_fiber_coupler bool

if True, adds edge couplers on the left side.

True
fiber_coupler_xoffset float

x-offset for fiber couplers.

0
text_offset Float2

offset for text.

(20, 10)
text ComponentSpec | None

text component spec.

None
pad_rotation_dc_north float

rotation for DC pads.

0
pad_rotation_dc_south float

rotation for DC pads.

0
pad_side_distance float

distance from the die frame side to the first pad, in um.

1160.0
Source code in gdsfactory/components/dies/die_frame_with_pads.py
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
@gf.cell_with_module_name(tags=["dies"])
def die_frame_phix_dc(
    die_frame: ComponentSpec = "die_frame",
    nfibers: int = 32,
    npads: int = 59,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: ComponentSpec | None = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = True,
    fiber_coupler_xoffset: float = 0,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = None,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
    pad_side_distance: float = 1160.0,
) -> Component:
    """A PHIX die frame with DC pads only.

    Args:
        die_frame: die_frame spec.
        nfibers: the number of grating couplers.
        npads: the number of pads.
        npads_rf: the number of RF pads on the left side.
        fiber_pitch: the pitch of the grating couplers, in um.
        pad_pitch: the pitch of the pads, in um.
        pad_pitch_gsg: the pitch of the GSG pads, in um.
        edge_coupler: the edge coupler component.
        grating_coupler: Optional grating coupler.
        cross_section: the cross section.
        pad: the pad component.
        pad_gsg: the GSG pad component.
        edge_to_pad_distance: the distance from the edge to the pads, in um.
        pad_port_name_top: name of the pad port name at the top facing south.
        pad_port_name_bot: name of the pad port name at the bottom facing north.
        layer_fiducial: layer for fiducials.
        fiducial_top_left: optional top-left fiducial; defaults to a cross.
        fiducial_top_right: optional top-right fiducial; defaults to a circle.
        fiducial_bottom_left: optional bottom-left fiducial; defaults to a circle.
        fiducial_bottom_right: optional bottom-right fiducial; defaults to a circle.
        layer_ruler: layer for ruler.
        ruler_bbox_layers: layers for bbox.
        ruler_bbox_offset: offset for bbox.
        ruler_yoffset: y-offset for ruler.
        ruler_xoffset: x-offset for ruler.
        with_right_fiber_coupler: if True, adds edge couplers on the right side.
        with_left_fiber_coupler: if True, adds edge couplers on the left side.
        fiber_coupler_xoffset: x-offset for fiber couplers.
        text_offset: offset for text.
        text: text component spec.
        pad_rotation_dc_north: rotation for DC pads.
        pad_rotation_dc_south: rotation for DC pads.
        pad_side_distance: distance from the die frame side to the first pad, in um.
    """
    return cf.die_frame_phix_dc(
        die_frame=die_frame,
        nfibers=nfibers,
        npads=npads,
        npads_rf=npads_rf,
        fiber_pitch=fiber_pitch,
        pad_pitch=pad_pitch,
        pad_pitch_gsg=pad_pitch_gsg,
        edge_coupler=edge_coupler,
        grating_coupler=grating_coupler,
        cross_section=cross_section,
        pad=pad,
        pad_gsg=pad_gsg,
        edge_to_pad_distance=edge_to_pad_distance,
        pad_port_name_top=pad_port_name_top,
        pad_port_name_bot=pad_port_name_bot,
        layer_fiducial=layer_fiducial,
        fiducial_top_left=fiducial_top_left,
        fiducial_top_right=fiducial_top_right,
        fiducial_bottom_left=fiducial_bottom_left,
        fiducial_bottom_right=fiducial_bottom_right,
        layer_ruler=layer_ruler,
        ruler_bbox_layers=ruler_bbox_layers,
        ruler_bbox_offset=ruler_bbox_offset,
        ruler_yoffset=ruler_yoffset,
        ruler_xoffset=ruler_xoffset,
        with_right_fiber_coupler=with_right_fiber_coupler,
        with_left_fiber_coupler=with_left_fiber_coupler,
        fiber_coupler_xoffset=fiber_coupler_xoffset,
        text_offset=text_offset,
        text=text,
        pad_rotation_dc_north=pad_rotation_dc_north,
        pad_rotation_dc_south=pad_rotation_dc_south,
        pad_side_distance=pad_side_distance,
    )

die_frame_phix_rf

die_frame_phix_rf(
    die_frame: ComponentSpec = "die_frame_rf",
    nfibers: int = 32,
    npads: int = 59,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: (
        ComponentSpec | None
    ) = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    pad_port_name_rf: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = False,
    fiber_coupler_xoffset: float = 0,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = None,
    pad_side_distance: float = 350.0,
    xoffset_rf_pads: float = 50,
    pad_rotation_rf: float = 0,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
) -> Component

A PHIX die frame with DC and RF pads.

Parameters:

Name Type Description Default
die_frame ComponentSpec

die_frame spec.

'die_frame_rf'
nfibers int

the number of grating couplers.

32
npads int

the number of pads.

59
npads_rf int

the number of RF pads on the left side.

6
fiber_pitch float

the pitch of the grating couplers, in um.

127.0
pad_pitch float

the pitch of the pads, in um.

150.0
pad_pitch_gsg float

the pitch of the GSG pads, in um.

720.0
edge_coupler ComponentSpec | None

the edge coupler component.

'edge_coupler_silicon'
grating_coupler ComponentSpec | None

Optional grating coupler.

None
cross_section CrossSectionSpec

the cross section.

'strip'
pad ComponentSpec

the pad component.

'pad'
pad_gsg ComponentSpec

the GSG pad component.

'pad_gsg'
edge_to_pad_distance float

the distance from the edge to the pads, in um.

200.0
pad_port_name_top str

name of the pad port name at the top facing south.

'e4'
pad_port_name_bot str

name of the pad port name at the bottom facing north.

'e2'
pad_port_name_rf str

name of the RF pad port name.

'e2'
layer_fiducial LayerSpec

layer for fiducials.

'M3'
fiducial_top_left ComponentSpec | None

optional top-left fiducial; defaults to a cross.

None
fiducial_top_right ComponentSpec | None

optional top-right fiducial; defaults to a circle.

None
fiducial_bottom_left ComponentSpec | None

optional bottom-left fiducial; defaults to a circle.

None
fiducial_bottom_right ComponentSpec | None

optional bottom-right fiducial; defaults to a circle.

None
layer_ruler LayerSpec

layer for ruler.

'WG'
ruler_bbox_layers tuple[LayerSpec, ...] | None

layers for bbox.

None
ruler_bbox_offset float

offset for bbox.

3.0
ruler_yoffset float

y-offset for ruler.

0
ruler_xoffset float

x-offset for ruler.

0
with_right_fiber_coupler bool

if True, adds edge couplers on the right side.

True
with_left_fiber_coupler bool

if True, adds edge couplers on the left side.

False
fiber_coupler_xoffset float

x-offset for fiber couplers.

0
text_offset Float2

offset for text.

(20, 10)
text ComponentSpec | None

text component spec.

None
pad_side_distance float

distance from the die frame side to the first pad, in um.

350.0
xoffset_rf_pads float

RF pads x-offset.

50
pad_rotation_rf float

rotation for RF pads.

0
pad_rotation_dc_north float

rotation for DC pads.

0
pad_rotation_dc_south float

rotation for DC pads.

0
Source code in gdsfactory/components/dies/die_frame_with_pads.py
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
@gf.cell_with_module_name(tags=["dies"])
def die_frame_phix_rf(
    die_frame: ComponentSpec = "die_frame_rf",
    nfibers: int = 32,
    npads: int = 59,
    npads_rf: int = 6,
    fiber_pitch: float = 127.0,
    pad_pitch: float = 150.0,
    pad_pitch_gsg: float = 720.0,
    edge_coupler: ComponentSpec | None = "edge_coupler_silicon",
    grating_coupler: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    pad_gsg: ComponentSpec = "pad_gsg",
    edge_to_pad_distance: float = 200.0,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
    pad_port_name_rf: str = "e2",
    layer_fiducial: LayerSpec = "M3",
    fiducial_top_left: ComponentSpec | None = None,
    fiducial_top_right: ComponentSpec | None = None,
    fiducial_bottom_left: ComponentSpec | None = None,
    fiducial_bottom_right: ComponentSpec | None = None,
    layer_ruler: LayerSpec = "WG",
    ruler_bbox_layers: tuple[LayerSpec, ...] | None = None,
    ruler_bbox_offset: float = 3.0,
    ruler_yoffset: float = 0,
    ruler_xoffset: float = 0,
    with_right_fiber_coupler: bool = True,
    with_left_fiber_coupler: bool = False,
    fiber_coupler_xoffset: float = 0,
    text_offset: Float2 = (20, 10),
    text: ComponentSpec | None = None,
    pad_side_distance: float = 350.0,
    xoffset_rf_pads: float = 50,
    pad_rotation_rf: float = 0,
    pad_rotation_dc_north: float = 0,
    pad_rotation_dc_south: float = 0,
) -> Component:
    """A PHIX die frame with DC and RF pads.

    Args:
        die_frame: die_frame spec.
        nfibers: the number of grating couplers.
        npads: the number of pads.
        npads_rf: the number of RF pads on the left side.
        fiber_pitch: the pitch of the grating couplers, in um.
        pad_pitch: the pitch of the pads, in um.
        pad_pitch_gsg: the pitch of the GSG pads, in um.
        edge_coupler: the edge coupler component.
        grating_coupler: Optional grating coupler.
        cross_section: the cross section.
        pad: the pad component.
        pad_gsg: the GSG pad component.
        edge_to_pad_distance: the distance from the edge to the pads, in um.
        pad_port_name_top: name of the pad port name at the top facing south.
        pad_port_name_bot: name of the pad port name at the bottom facing north.
        pad_port_name_rf: name of the RF pad port name.
        layer_fiducial: layer for fiducials.
        fiducial_top_left: optional top-left fiducial; defaults to a cross.
        fiducial_top_right: optional top-right fiducial; defaults to a circle.
        fiducial_bottom_left: optional bottom-left fiducial; defaults to a circle.
        fiducial_bottom_right: optional bottom-right fiducial; defaults to a circle.
        layer_ruler: layer for ruler.
        ruler_bbox_layers: layers for bbox.
        ruler_bbox_offset: offset for bbox.
        ruler_yoffset: y-offset for ruler.
        ruler_xoffset: x-offset for ruler.
        with_right_fiber_coupler: if True, adds edge couplers on the right side.
        with_left_fiber_coupler: if True, adds edge couplers on the left side.
        fiber_coupler_xoffset: x-offset for fiber couplers.
        text_offset: offset for text.
        text: text component spec.
        pad_side_distance: distance from the die frame side to the first pad, in um.
        xoffset_rf_pads: RF pads x-offset.
        pad_rotation_rf: rotation for RF pads.
        pad_rotation_dc_north: rotation for DC pads.
        pad_rotation_dc_south: rotation for DC pads.
    """
    return cf.die_frame_phix_rf(
        die_frame=die_frame,
        nfibers=nfibers,
        npads=npads,
        npads_rf=npads_rf,
        fiber_pitch=fiber_pitch,
        pad_pitch=pad_pitch,
        pad_pitch_gsg=pad_pitch_gsg,
        edge_coupler=edge_coupler,
        grating_coupler=grating_coupler,
        cross_section=cross_section,
        pad=pad,
        pad_gsg=pad_gsg,
        edge_to_pad_distance=edge_to_pad_distance,
        pad_port_name_top=pad_port_name_top,
        pad_port_name_bot=pad_port_name_bot,
        pad_port_name_rf=pad_port_name_rf,
        layer_fiducial=layer_fiducial,
        fiducial_top_left=fiducial_top_left,
        fiducial_top_right=fiducial_top_right,
        fiducial_bottom_left=fiducial_bottom_left,
        fiducial_bottom_right=fiducial_bottom_right,
        layer_ruler=layer_ruler,
        ruler_bbox_layers=ruler_bbox_layers,
        ruler_bbox_offset=ruler_bbox_offset,
        ruler_yoffset=ruler_yoffset,
        ruler_xoffset=ruler_xoffset,
        with_right_fiber_coupler=with_right_fiber_coupler,
        with_left_fiber_coupler=with_left_fiber_coupler,
        fiber_coupler_xoffset=fiber_coupler_xoffset,
        text_offset=text_offset,
        text=text,
        pad_side_distance=pad_side_distance,
        xoffset_rf_pads=xoffset_rf_pads,
        pad_rotation_rf=pad_rotation_rf,
        pad_rotation_dc_north=pad_rotation_dc_north,
        pad_rotation_dc_south=pad_rotation_dc_south,
    )

die_frame_rf

die_frame_rf(
    size: Size = (10400.0, 5000.0),
    layer_floorplan: LayerSpec = "FLOORPLAN",
) -> gf.Component

Returns a rectangular die floorplan sized for RF dies.

Parameters:

Name Type Description Default
size Size

die frame size (width, height), in um.

(10400.0, 5000.0)
layer_floorplan LayerSpec

layer for the floorplan rectangle.

'FLOORPLAN'
Source code in gdsfactory/components/dies/die_frame_with_pads.py
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@gf.cell(tags=["dies"])
def die_frame_rf(
    size: Size = (10400.0, 5000.0),
    layer_floorplan: LayerSpec = "FLOORPLAN",
) -> gf.Component:
    """Returns a rectangular die floorplan sized for RF dies.

    Args:
        size: die frame size (width, height), in um.
        layer_floorplan: layer for the floorplan rectangle.
    """
    return cf.die_frame_rf(
        size=size,
        layer_floorplan=layer_floorplan,
    )

die_frame_with_pads

die_frame_with_pads(
    die_frame: ComponentSpec = "die_frame",
    ngratings: int = 14,
    npads: int = 31,
    grating_pitch: float = 250.0,
    pad_pitch: float = 300.0,
    grating_coupler: (
        ComponentSpec | None
    ) = "grating_coupler_te",
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    edge_to_pad_distance: float = 150.0,
    edge_to_grating_distance: float = 150.0,
    with_loopback: bool = True,
    loopback_radius: float | None = None,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
) -> Component

A die_frame with grating couplers and pads.

Parameters:

Name Type Description Default
die_frame ComponentSpec

die_frame spec.

'die_frame'
ngratings int

the number of grating couplers.

14
npads int

the number of pads.

31
grating_pitch float

the pitch of the grating couplers, in um.

250.0
pad_pitch float

the pitch of the pads, in um.

300.0
grating_coupler ComponentSpec | None

the grating coupler component.

'grating_coupler_te'
cross_section CrossSectionSpec

the cross section.

'strip'
pad ComponentSpec

the pad component.

'pad'
edge_to_pad_distance float

the distance from the edge to the pads, in um.

150.0
edge_to_grating_distance float

the distance from the edge to the grating couplers, in um.

150.0
with_loopback bool

if True, adds a loopback between edge GCs. Only works for rotation = 90 for now.

True
loopback_radius float | None

optional radius for loopback.

None
pad_port_name_top str

name of the pad port name at the btop facing south.

'e4'
pad_port_name_bot str

name of the pad port name at the bottom facing north.

'e2'
Source code in gdsfactory/components/dies/die_frame_with_pads.py
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@gf.cell_with_module_name(tags=["dies"])
def die_frame_with_pads(
    die_frame: ComponentSpec = "die_frame",
    ngratings: int = 14,
    npads: int = 31,
    grating_pitch: float = 250.0,
    pad_pitch: float = 300.0,
    grating_coupler: ComponentSpec | None = "grating_coupler_te",
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    edge_to_pad_distance: float = 150.0,
    edge_to_grating_distance: float = 150.0,
    with_loopback: bool = True,
    loopback_radius: float | None = None,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
) -> Component:
    """A die_frame with grating couplers and pads.

    Args:
        die_frame: die_frame spec.
        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.
        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.
        pad_port_name_top: name of the pad port name at the btop facing south.
        pad_port_name_bot: name of the pad port name at the bottom facing north.
    """
    return cf.die_frame_with_pads(
        die_frame=die_frame,
        ngratings=ngratings,
        npads=npads,
        grating_pitch=grating_pitch,
        pad_pitch=pad_pitch,
        grating_coupler=grating_coupler,
        cross_section=cross_section,
        pad=pad,
        edge_to_pad_distance=edge_to_pad_distance,
        edge_to_grating_distance=edge_to_grating_distance,
        with_loopback=with_loopback,
        loopback_radius=loopback_radius,
        pad_port_name_top=pad_port_name_top,
        pad_port_name_bot=pad_port_name_bot,
    )

die_frame_with_pads

die_with_pads

die_with_pads

die_with_pads(
    size: Size = (11470.0, 4900.0),
    ngratings: int = 14,
    npads: int = 31,
    grating_pitch: float = 250.0,
    pad_pitch: float = 300.0,
    grating_coupler: (
        ComponentSpec | None
    ) = "grating_coupler_te",
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    layer_floorplan: LayerSpec = "FLOORPLAN",
    edge_to_pad_distance: float = 150.0,
    edge_to_grating_distance: float = 150.0,
    with_loopback: bool = True,
    loopback_radius: float | None = None,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
) -> Component

A die with grating couplers and pads.

Parameters:

Name Type Description Default
size Size

the size of the die, in um.

(11470.0, 4900.0)
ngratings int

the number of grating couplers.

14
npads int

the number of pads.

31
grating_pitch float

the pitch of the grating couplers, in um.

250.0
pad_pitch float

the pitch of the pads, in um.

300.0
grating_coupler ComponentSpec | None

the grating coupler component.

'grating_coupler_te'
cross_section CrossSectionSpec

the cross section.

'strip'
pad ComponentSpec

the pad component.

'pad'
layer_floorplan LayerSpec

the layer of the floorplan.

'FLOORPLAN'
edge_to_pad_distance float

the distance from the edge to the pads, in um.

150.0
edge_to_grating_distance float

the distance from the edge to the grating couplers, in um.

150.0
with_loopback bool

if True, adds a loopback between edge GCs. Only works for rotation = 90 for now.

True
loopback_radius float | None

optional radius for loopback.

None
pad_port_name_top str

name of the pad port name at the btop facing south.

'e4'
pad_port_name_bot str

name of the pad port name at the bottom facing north.

'e2'
Source code in gdsfactory/components/dies/die_with_pads.py
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@gf.cell_with_module_name(tags=["dies"])
def die_with_pads(
    size: Size = (11470.0, 4900.0),
    ngratings: int = 14,
    npads: int = 31,
    grating_pitch: float = 250.0,
    pad_pitch: float = 300.0,
    grating_coupler: ComponentSpec | None = "grating_coupler_te",
    cross_section: CrossSectionSpec = "strip",
    pad: ComponentSpec = "pad",
    layer_floorplan: LayerSpec = "FLOORPLAN",
    edge_to_pad_distance: float = 150.0,
    edge_to_grating_distance: float = 150.0,
    with_loopback: bool = True,
    loopback_radius: float | None = None,
    pad_port_name_top: str = "e4",
    pad_port_name_bot: str = "e2",
) -> Component:
    """A die with grating couplers and pads.

    Args:
        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.
        pad_port_name_top: name of the pad port name at the btop facing south.
        pad_port_name_bot: name of the pad port name at the bottom facing north.
    """
    return cf.die_with_pads(
        size=size,
        ngratings=ngratings,
        npads=npads,
        grating_pitch=grating_pitch,
        pad_pitch=pad_pitch,
        grating_coupler=grating_coupler,
        cross_section=cross_section,
        pad=pad,
        layer_floorplan=layer_floorplan,
        edge_to_pad_distance=edge_to_pad_distance,
        edge_to_grating_distance=edge_to_grating_distance,
        with_loopback=with_loopback,
        loopback_radius=loopback_radius,
        pad_port_name_top=pad_port_name_top,
        pad_port_name_bot=pad_port_name_bot,
    )

die_with_pads

seal_ring

seal_ring

seal_ring(
    size: Float2 = (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,
) -> gf.Component

Returns a continuous seal ring boundary at the chip/die.

Prevents cracks from spreading and shields when connected to ground.

Parameters:

Name Type Description Default
size Float2

of the seal.

(500, 500)
seal ComponentSpec

function for the seal.

'via_stack'
width float

of the seal.

10
padding float

from component to seal.

10.0
with_north bool

includes seal.

True
with_south bool

includes seal.

True
with_east bool

includes seal.

True
with_west bool

includes seal.

True
Source code in gdsfactory/components/dies/seal_ring.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@gf.cell_with_module_name(tags=["dies"])
def seal_ring(
    size: Float2 = (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,
) -> gf.Component:
    """Returns a continuous seal ring boundary at the chip/die.

    Prevents cracks from spreading and shields when connected to ground.

    Args:
        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.
    """
    return cf.seal_ring(
        size=size,
        seal=seal,
        width=width,
        padding=padding,
        with_north=with_north,
        with_south=with_south,
        with_east=with_east,
        with_west=with_west,
    )

seal_ring_segmented

seal_ring_segmented(
    size: Float2 = (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,
) -> gf.Component

Segmented Seal ring.

Parameters:

Name Type Description Default
size Float2

of the seal ring.

(500, 500)
length_segment float

length of each segment.

10
width_segment float

width of each segment.

3
spacing_segment float

spacing between segments.

2
corner ComponentSpec

corner component.

'via_stack_corner45_extended'
via_stack ComponentSpec

via_stack component.

'via_stack_m1_mtop'
with_north bool

includes seal.

True
with_south bool

includes seal.

True
with_east bool

includes seal.

True
with_west bool

includes seal.

True
Source code in gdsfactory/components/dies/seal_ring.py
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
@gf.cell_with_module_name(tags=["dies"])
def seal_ring_segmented(
    size: Float2 = (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,
) -> gf.Component:
    """Segmented Seal ring.

    Args:
        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.
    """
    return cf.seal_ring_segmented(
        size=size,
        length_segment=length_segment,
        width_segment=width_segment,
        spacing_segment=spacing_segment,
        corner=corner,
        via_stack=via_stack,
        with_north=with_north,
        with_south=with_south,
        with_east=with_east,
        with_west=with_west,
    )

seal_ring

seal_ring_segmented

seal_ring_segmented(
    size: Float2 = (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,
) -> gf.Component

Segmented Seal ring.

Parameters:

Name Type Description Default
size Float2

of the seal ring.

(500, 500)
length_segment float

length of each segment.

10
width_segment float

width of each segment.

3
spacing_segment float

spacing between segments.

2
corner ComponentSpec

corner component.

'via_stack_corner45_extended'
via_stack ComponentSpec

via_stack component.

'via_stack_m1_mtop'
with_north bool

includes seal.

True
with_south bool

includes seal.

True
with_east bool

includes seal.

True
with_west bool

includes seal.

True
Source code in gdsfactory/components/dies/seal_ring.py
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
@gf.cell_with_module_name(tags=["dies"])
def seal_ring_segmented(
    size: Float2 = (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,
) -> gf.Component:
    """Segmented Seal ring.

    Args:
        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.
    """
    return cf.seal_ring_segmented(
        size=size,
        length_segment=length_segment,
        width_segment=width_segment,
        spacing_segment=spacing_segment,
        corner=corner,
        via_stack=via_stack,
        with_north=with_north,
        with_south=with_south,
        with_east=with_east,
        with_west=with_west,
    )

seal_ring_segmented

wafer

wafer

wafer(
    reticle: ComponentSpec = "die",
    cols: tuple[int, ...] = _cols_200mm_wafer,
    xspacing: float | None = None,
    yspacing: float | None = None,
    die_name_col_row: bool = False,
) -> Component

Returns complete wafer. Useful for mask aligner steps.

Parameters:

Name Type Description Default
reticle ComponentSpec

spec for each wafer reticle.

'die'
cols tuple[int, ...]

how many columns per row.

_cols_200mm_wafer
xspacing float | None

optional spacing, defaults to reticle.xsize.

None
yspacing float | None

optional spacing, defaults to reticle.ysize.

None
die_name_col_row bool

if True, die name is row_col, otherwise is a number

False
Source code in gdsfactory/components/dies/wafer.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@gf.cell_with_module_name(tags=["dies"])
def wafer(
    reticle: ComponentSpec = "die",
    cols: tuple[int, ...] = _cols_200mm_wafer,
    xspacing: float | None = None,
    yspacing: float | None = None,
    die_name_col_row: bool = False,
) -> Component:
    """Returns complete wafer. Useful for mask aligner steps.

    Args:
        reticle: spec for each wafer reticle.
        cols: how many columns per row.
        xspacing: optional spacing, defaults to reticle.xsize.
        yspacing: optional spacing, defaults to reticle.ysize.
        die_name_col_row: if True, die name is row_col, otherwise is a number
    """
    return cf.wafer(
        reticle=reticle,
        cols=cols,
        xspacing=xspacing,
        yspacing=yspacing,
        die_name_col_row=die_name_col_row,
    )

wafer

edge_couplers

edge_coupler_array

edge_coupler_array

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

Fiber array edge coupler based on an inverse taper.

Each edge coupler adds a ruler for polishing.

Parameters:

Name Type Description Default
edge_coupler ComponentSpec

edge coupler spec.

'edge_coupler_silicon'
n int

number of channels.

5
pitch float

Fiber pitch.

127.0
x_reflection bool

horizontal mirror.

False
text ComponentSpec | None

text spec.

'text_rectangular'
text_offset Float2

from edge coupler.

(10, 20)
text_rotation float

text rotation in degrees.

0
Source code in gdsfactory/components/edge_couplers/edge_coupler_array.py
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@gf.cell_with_module_name(tags=["edge_couplers"])
def 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:
    """Fiber array edge coupler based on an inverse taper.

    Each edge coupler adds a ruler for polishing.

    Args:
        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.
    """
    return cf.edge_coupler_array(
        edge_coupler=edge_coupler,
        n=n,
        pitch=pitch,
        x_reflection=x_reflection,
        text=text,
        text_offset=text_offset,
        text_rotation=text_rotation,
    )

edge_coupler_array_with_loopback

edge_coupler_array_with_loopback(
    edge_coupler: ComponentSpec = "edge_coupler_silicon",
    cross_section: CrossSectionSpec = "strip",
    radius: float | None = None,
    n: int = 8,
    pitch: float = 127.0,
    x_reflection: bool = False,
    text: ComponentSpec | None = "text_rectangular",
    text_offset: Float2 = (0, 10),
    text_rotation: float = 0,
) -> Component

Fiber array edge coupler.

Parameters:

Name Type Description Default
edge_coupler ComponentSpec

edge coupler.

'edge_coupler_silicon'
cross_section CrossSectionSpec

spec.

'strip'
radius float | None

bend radius loopback (um).

None
n int

number of channels.

8
pitch float

Fiber pitch (um).

127.0
x_reflection bool

horizontal mirror.

False
text ComponentSpec | None

Optional text spec.

'text_rectangular'
text_offset Float2

x, y.

(0, 10)
text_rotation float

text rotation in degrees.

0
Source code in gdsfactory/components/edge_couplers/edge_coupler_array.py
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@gf.cell_with_module_name(tags=["edge_couplers"])
def edge_coupler_array_with_loopback(
    edge_coupler: ComponentSpec = "edge_coupler_silicon",
    cross_section: CrossSectionSpec = "strip",
    radius: float | None = None,
    n: int = 8,
    pitch: float = 127.0,
    x_reflection: bool = False,
    text: ComponentSpec | None = "text_rectangular",
    text_offset: Float2 = (0, 10),
    text_rotation: float = 0,
) -> Component:
    """Fiber array edge coupler.

    Args:
        edge_coupler: edge coupler.
        cross_section: spec.
        radius: bend radius loopback (um).
        n: number of channels.
        pitch: Fiber pitch (um).
        x_reflection: horizontal mirror.
        text: Optional text spec.
        text_offset: x, y.
        text_rotation: text rotation in degrees.
    """
    return cf.edge_coupler_array_with_loopback(
        edge_coupler=edge_coupler,
        cross_section=cross_section,
        radius=radius,
        n=n,
        pitch=pitch,
        x_reflection=x_reflection,
        text=text,
        text_offset=text_offset,
        text_rotation=text_rotation,
    )

edge_coupler_silicon

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

Edge coupler for silicon photonics.

Parameters:

Name Type Description Default
length float

length of the taper.

100
width1 float

width1 of the taper.

0.5
width2 float

width2 of the taper.

0.2
with_two_ports bool

add two ports.

True
port_names tuple[str, str]

tuple with port names.

('o1', 'o2')
port_types tuple[str, str]

tuple with port types.

('optical', 'edge_coupler')
cross_section CrossSectionSpec

cross_section spec.

'strip'
Source code in gdsfactory/components/edge_couplers/edge_coupler_array.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@gf.cell_with_module_name(schematic_function=taper_schematic, tags=["edge_couplers"])
def 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:
    """Edge coupler for silicon photonics.

    Args:
        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.

    """
    return cf.edge_coupler_silicon(
        length=length,
        width1=width1,
        width2=width2,
        with_two_ports=with_two_ports,
        port_names=port_names,
        port_types=port_types,
        cross_section=cross_section,
    )

edge_coupler_array

edge_coupler_array_with_loopback

edge_coupler_array_with_loopback(
    edge_coupler: ComponentSpec = "edge_coupler_silicon",
    cross_section: CrossSectionSpec = "strip",
    radius: float | None = None,
    n: int = 8,
    pitch: float = 127.0,
    x_reflection: bool = False,
    text: ComponentSpec | None = "text_rectangular",
    text_offset: Float2 = (0, 10),
    text_rotation: float = 0,
) -> Component

Fiber array edge coupler.

Parameters:

Name Type Description Default
edge_coupler ComponentSpec

edge coupler.

'edge_coupler_silicon'
cross_section CrossSectionSpec

spec.

'strip'
radius float | None

bend radius loopback (um).

None
n int

number of channels.

8
pitch float

Fiber pitch (um).

127.0
x_reflection bool

horizontal mirror.

False
text ComponentSpec | None

Optional text spec.

'text_rectangular'
text_offset Float2

x, y.

(0, 10)
text_rotation float

text rotation in degrees.

0
Source code in gdsfactory/components/edge_couplers/edge_coupler_array.py
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@gf.cell_with_module_name(tags=["edge_couplers"])
def edge_coupler_array_with_loopback(
    edge_coupler: ComponentSpec = "edge_coupler_silicon",
    cross_section: CrossSectionSpec = "strip",
    radius: float | None = None,
    n: int = 8,
    pitch: float = 127.0,
    x_reflection: bool = False,
    text: ComponentSpec | None = "text_rectangular",
    text_offset: Float2 = (0, 10),
    text_rotation: float = 0,
) -> Component:
    """Fiber array edge coupler.

    Args:
        edge_coupler: edge coupler.
        cross_section: spec.
        radius: bend radius loopback (um).
        n: number of channels.
        pitch: Fiber pitch (um).
        x_reflection: horizontal mirror.
        text: Optional text spec.
        text_offset: x, y.
        text_rotation: text rotation in degrees.
    """
    return cf.edge_coupler_array_with_loopback(
        edge_coupler=edge_coupler,
        cross_section=cross_section,
        radius=radius,
        n=n,
        pitch=pitch,
        x_reflection=x_reflection,
        text=text,
        text_offset=text_offset,
        text_rotation=text_rotation,
    )

edge_coupler_array_with_loopback

edge_coupler_silicon

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

Edge coupler for silicon photonics.

Parameters:

Name Type Description Default
length float

length of the taper.

100
width1 float

width1 of the taper.

0.5
width2 float

width2 of the taper.

0.2
with_two_ports bool

add two ports.

True
port_names tuple[str, str]

tuple with port names.

('o1', 'o2')
port_types tuple[str, str]

tuple with port types.

('optical', 'edge_coupler')
cross_section CrossSectionSpec

cross_section spec.

'strip'
Source code in gdsfactory/components/edge_couplers/edge_coupler_array.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@gf.cell_with_module_name(schematic_function=taper_schematic, tags=["edge_couplers"])
def 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:
    """Edge coupler for silicon photonics.

    Args:
        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.

    """
    return cf.edge_coupler_silicon(
        length=length,
        width1=width1,
        width2=width2,
        with_two_ports=with_two_ports,
        port_names=port_names,
        port_types=port_types,
        cross_section=cross_section,
    )

edge_coupler_silicon

filters

awg

Sample AWG.

awg

awg(
    arms: int = 10,
    outputs: int = 3,
    free_propagation_region_input_function: ComponentSpec = "free_propagation_region_input",
    free_propagation_region_output_function: ComponentSpec = "free_propagation_region_output",
    fpr_spacing: float = 50.0,
    arm_spacing: float = 1.0,
    length_increment: float = 0.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Returns an Arrayed Waveguide grating.

To simulate you can use https://github.com/dnrobin/awg-python

Parameters:

Name Type Description Default
arms int

number of arms.

10
outputs int

number of outputs.

3
free_propagation_region_input_function ComponentSpec

for input.

'free_propagation_region_input'
free_propagation_region_output_function ComponentSpec

for output.

'free_propagation_region_output'
fpr_spacing float

x separation between input/output free propagation region.

50.0
arm_spacing float

y separation between arms (used when length_increment == 0).

1.0
length_increment float

constant length step dL (um); when > 0 the arms form a nested fan where arm i is exactly i*dL longer than arm 0 -- the property that makes an AWG disperse light by wavelength.

0.0
cross_section CrossSectionSpec

cross_section function.

'strip'
Source code in gdsfactory/components/filters/awg.py
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
@gf.cell_with_module_name(tags=["filters"])
def awg(
    arms: int = 10,
    outputs: int = 3,
    free_propagation_region_input_function: ComponentSpec = "free_propagation_region_input",
    free_propagation_region_output_function: ComponentSpec = "free_propagation_region_output",
    fpr_spacing: float = 50.0,
    arm_spacing: float = 1.0,
    length_increment: float = 0.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Returns an Arrayed Waveguide grating.

    To simulate you can use
    <https://github.com/dnrobin/awg-python>

    Args:
        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 (used when length_increment == 0).
        length_increment: constant length step dL (um); when > 0 the arms form a
            nested fan where arm i is exactly i*dL longer than arm 0 -- the property
            that makes an AWG disperse light by wavelength.
        cross_section: cross_section function.
    """
    return cf.awg(
        arms=arms,
        outputs=outputs,
        free_propagation_region_input_function=free_propagation_region_input_function,
        free_propagation_region_output_function=free_propagation_region_output_function,
        fpr_spacing=fpr_spacing,
        arm_spacing=arm_spacing,
        length_increment=length_increment,
        cross_section=cross_section,
    )

free_propagation_region

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

Free propagation region.

Parameters:

Name Type Description Default
width1 float

width of the input region.

2.0
width2 float

width of the output region.

20.0
length float

length of the free propagation region.

20.0
wg_width float

waveguide width.

0.5
inputs int

number of inputs.

1
outputs int

number of outputs.

10
cross_section CrossSectionSpec

cross_section function.

 length
 <-->
   /|
  / |

width1| | width2 \ | |

'strip'
Source code in gdsfactory/components/filters/awg.py
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@gf.cell_with_module_name(tags=["filters"])
def 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:
    r"""Free propagation region.

    Args:
        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
                  \ |
                   \|
    """
    return cf.free_propagation_region(
        width1=width1,
        width2=width2,
        length=length,
        wg_width=wg_width,
        inputs=inputs,
        outputs=outputs,
        cross_section=cross_section,
    )

awg

bend_s_mode_converter module-attribute

bend_s_mode_converter = CellAlias(bend_s, size=(25, 3))

bend_s_mode_converter

dbr

DBR gratings.

wavelength = 2periodneff period = wavelength/2/neff

dbr default parameters are from Stephen Lin thesis https://open.library.ubc.ca/cIRcle/collections/ubctheses/24/items/1.0388871

Period: 318nm, width: 500nm, dw: 20 ~ 120 nm.

dbr

dbr(
    w1: float = w1,
    w2: float = w2,
    l1: float = period / 2,
    l2: float = period / 2,
    n: int = 10,
    cross_section: CrossSectionSpec = "strip",
    straight_length: float = 0.01,
) -> Component

Distributed Bragg Reflector.

Parameters:

Name Type Description Default
w1 float

thin width in um.

w1
w2 float

thick width in um.

w2
l1 float

thin length in um.

period / 2
l2 float

thick length in um.

period / 2
n int

number of periods.

10
cross_section CrossSectionSpec

cross_section spec.

'strip'
straight_length float

length of the straight section between cutbacks.

0.01
       l1      l2
    <-----><-------->
            _________
    _______|
      w1       w2       ...  n times
    _______
           |_________
Source code in gdsfactory/components/filters/dbr.py
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@gf.cell_with_module_name(tags=["filters"])
def dbr(
    w1: float = w1,
    w2: float = w2,
    l1: float = period / 2,
    l2: float = period / 2,
    n: int = 10,
    cross_section: CrossSectionSpec = "strip",
    straight_length: float = 10e-3,
) -> Component:
    """Distributed Bragg Reflector.

    Args:
        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.

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

    ```text
          w1       w2       ...  n times
        _______
               |_________
    ```
    """
    return cf.dbr(
        w1=w1,
        w2=w2,
        l1=l1,
        l2=l2,
        n=n,
        cross_section=cross_section,
        straight_length=straight_length,
    )

dbr_cell

dbr_cell(
    w1: float = w1,
    w2: float = w2,
    l1: float = period / 2,
    l2: float = period / 2,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Distributed Bragg Reflector unit cell.

Parameters:

Name Type Description Default
w1 float

thin width in um.

w1
l1 float

thin length in um.

period / 2
w2 float

thick width in um.

w2
l2 float

thick length in um.

period / 2
cross_section CrossSectionSpec

cross_section spec.

'strip'
       l1      l2
    <-----><-------->
            _________
    _______|
      w1       w2
    _______
           |_________
Source code in gdsfactory/components/filters/dbr.py
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@gf.cell_with_module_name(tags=["filters"])
def dbr_cell(
    w1: float = w1,
    w2: float = w2,
    l1: float = period / 2,
    l2: float = period / 2,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Distributed Bragg Reflector unit cell.

    Args:
        w1: thin width in um.
        l1: thin length in um.
        w2: thick width in um.
        l2: thick length in um.
        cross_section: cross_section spec.

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

    ```text
          w1       w2
        _______
               |_________
    ```
    """
    return cf.dbr_cell(w1=w1, w2=w2, l1=l1, l2=l2, cross_section=cross_section)

dbr

dbr_cell

dbr_cell(
    w1: float = w1,
    w2: float = w2,
    l1: float = period / 2,
    l2: float = period / 2,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Distributed Bragg Reflector unit cell.

Parameters:

Name Type Description Default
w1 float

thin width in um.

w1
l1 float

thin length in um.

period / 2
w2 float

thick width in um.

w2
l2 float

thick length in um.

period / 2
cross_section CrossSectionSpec

cross_section spec.

'strip'
       l1      l2
    <-----><-------->
            _________
    _______|
      w1       w2
    _______
           |_________
Source code in gdsfactory/components/filters/dbr.py
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@gf.cell_with_module_name(tags=["filters"])
def dbr_cell(
    w1: float = w1,
    w2: float = w2,
    l1: float = period / 2,
    l2: float = period / 2,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Distributed Bragg Reflector unit cell.

    Args:
        w1: thin width in um.
        l1: thin length in um.
        w2: thick width in um.
        l2: thick length in um.
        cross_section: cross_section spec.

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

    ```text
          w1       w2
        _______
               |_________
    ```
    """
    return cf.dbr_cell(w1=w1, w2=w2, l1=l1, l2=l2, cross_section=cross_section)

dbr_cell

dbr_tapered

dbr_tapered

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: Size = (0.2, 0.05),
    cross_section: CrossSectionSpec = "strip",
) -> Component

Distributed Bragg Reflector Cell class.

Tapers the input straight to a periodic straight structure with varying width (1-D photonic crystal).

Parameters:

Name Type Description Default
length float

Length of the DBR region.

10.0
period float

Period of the repeated unit.

0.85
dc float

Duty cycle of the repeated unit (must be a float between 0 and 1.0).

0.5
w1 float

thin section width. w1 = 0 corresponds to disconnected periodic blocks.

0.4
w2 float

wide section width.

1.0
taper_length float

between the input/output straight and the DBR region.

20.0
fins bool

If True, adds fins to the input/output straights.

False
fin_size Size

Specifies the x- and y-size of the fins. Defaults to 200 nm x 50 nm

(0.2, 0.05)
cross_section CrossSectionSpec

cross_section spec.

'strip'
             period
    <-----><-------->
            _________
    _______|
      w1       w2       ...  n times
    _______
           |_________
Source code in gdsfactory/components/filters/dbr_tapered.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@gf.cell_with_module_name(tags=["filters"])
def 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: Size = (0.2, 0.05),
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Distributed Bragg Reflector Cell class.

    Tapers the input straight to a
    periodic straight structure with varying width (1-D photonic crystal).

    Args:
       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.

    ```text
                 period
        <-----><-------->
                _________
        _______|
    ```

    ```text
          w1       w2       ...  n times
        _______
               |_________
    ```
    """
    return cf.dbr_tapered(
        length=length,
        period=period,
        dc=dc,
        w1=w1,
        w2=w2,
        taper_length=taper_length,
        fins=fins,
        fin_size=fin_size,
        cross_section=cross_section,
    )

dbr_tapered

fiber

fiber

fiber(
    core_diameter: float = 10,
    cladding_diameter: float = 125,
    layer_core: LayerSpec = "WG",
    layer_cladding: LayerSpec = "WGCLAD",
) -> Component

Returns a fiber.

Parameters:

Name Type Description Default
core_diameter float

in um.

10
cladding_diameter float

in um.

125
layer_core LayerSpec

layer spec for fiber core.

'WG'
layer_cladding LayerSpec

layer spec for fiber cladding.

'WGCLAD'
Source code in gdsfactory/components/filters/fiber.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@gf.cell_with_module_name(tags=["filters"])
def fiber(
    core_diameter: float = 10,
    cladding_diameter: float = 125,
    layer_core: LayerSpec = "WG",
    layer_cladding: LayerSpec = "WGCLAD",
) -> Component:
    """Returns a fiber.

    Args:
        core_diameter: in um.
        cladding_diameter: in um.
        layer_core: layer spec for fiber core.
        layer_cladding: layer spec for fiber cladding.
    """
    return cf.fiber(
        core_diameter=core_diameter,
        cladding_diameter=cladding_diameter,
        layer_core=layer_core,
        layer_cladding=layer_cladding,
    )

fiber

fiber_array

fiber_array

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

Returns a fiber array.

Parameters:

Name Type Description Default
n int

number of fibers.

8
pitch float

spacing.

127.0
core_diameter float

10um.

10
cladding_diameter float

in um.

125
layer_core LayerSpec

layer spec for fiber core.

'WG'
layer_cladding LayerSpec

layer spec for fiber cladding.

'WGCLAD'
    pitch
     <->
    _________
   |         | lid
   | o o o o |
   |         | base
   |_________|
      length
Source code in gdsfactory/components/filters/fiber_array.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@gf.cell_with_module_name(tags=["filters"])
def 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:
    """Returns a fiber array.

    Args:
        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.

    ```text
        pitch
         <->
        _________
       |         | lid
       | o o o o |
       |         | base
       |_________|
          length
    ```
    """
    return cf.fiber_array(
        n=n,
        pitch=pitch,
        core_diameter=core_diameter,
        cladding_diameter=cladding_diameter,
        layer_core=layer_core,
        layer_cladding=layer_cladding,
    )

fiber_array

free_propagation_region

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

Free propagation region.

Parameters:

Name Type Description Default
width1 float

width of the input region.

2.0
width2 float

width of the output region.

20.0
length float

length of the free propagation region.

20.0
wg_width float

waveguide width.

0.5
inputs int

number of inputs.

1
outputs int

number of outputs.

10
cross_section CrossSectionSpec

cross_section function.

 length
 <-->
   /|
  / |

width1| | width2 \ | |

'strip'
Source code in gdsfactory/components/filters/awg.py
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@gf.cell_with_module_name(tags=["filters"])
def 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:
    r"""Free propagation region.

    Args:
        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
                  \ |
                   \|
    """
    return cf.free_propagation_region(
        width1=width1,
        width2=width2,
        length=length,
        wg_width=wg_width,
        inputs=inputs,
        outputs=outputs,
        cross_section=cross_section,
    )

free_propagation_region

free_propagation_region_input module-attribute

free_propagation_region_input = CellAlias(
    free_propagation_region, inputs=1
)

free_propagation_region_input

free_propagation_region_output module-attribute

free_propagation_region_output = CellAlias(
    free_propagation_region,
    inputs=10,
    width1=10,
    width2=20.0,
)

free_propagation_region_output

loop_mirror

Sagnac loop_mirror.

loop_mirror

loop_mirror(
    component: ComponentSpec = "mmi1x2",
    bend90: ComponentSpec = "bend_euler",
    cross_section: CrossSectionSpec = "strip",
) -> Component

Returns Sagnac loop_mirror.

Parameters:

Name Type Description Default
component ComponentSpec

1x2 splitter.

'mmi1x2'
bend90 ComponentSpec

90 deg bend.

'bend_euler'
cross_section CrossSectionSpec

cross_section settings.

'strip'
Source code in gdsfactory/components/filters/loop_mirror.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@gf.cell_with_module_name(tags=["filters"])
def loop_mirror(
    component: ComponentSpec = "mmi1x2",
    bend90: ComponentSpec = "bend_euler",
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Returns Sagnac loop_mirror.

    Args:
        component: 1x2 splitter.
        bend90: 90 deg bend.
        cross_section: cross_section settings.

    """
    return cf.loop_mirror(
        component=component, bend90=bend90, cross_section=cross_section
    )

loop_mirror

mode_converter

mode_converter

mode_converter(
    gap: float = 0.3,
    length: float = 10,
    coupler_straight_asymmetric: ComponentSpec = "coupler_straight_asymmetric",
    bend: ComponentSpec = "bend_s_mode_converter",
    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

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:

Name Type Description Default
gap float

directional coupler gap.

0.3
length float

coupler length interaction.

10
coupler_straight_asymmetric ComponentSpec

spec.

'coupler_straight_asymmetric'
bend ComponentSpec

spec.

'bend_s_mode_converter'
taper ComponentSpec

spec.

'taper'
mm_width float

input/output multimode waveguide width.

1.2
mc_mm_width float

mode converter multimode waveguide width

1
sm_width float

single mode waveguide width.

0.5
taper_length float

taper length.

25
cross_section CrossSectionSpec

cross_section spec.

'strip'
    o2 ---           --- o4
          \         /
           \       /
            -------
    o1 -----=======----- o3
            |-----|
            length
= : multimode width
- : singlemode width
Source code in gdsfactory/components/filters/mode_converter.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
@gf.cell_with_module_name(schematic_function=ckt_schematic, tags=["filters"])
def mode_converter(
    gap: float = 0.3,
    length: float = 10,
    coupler_straight_asymmetric: ComponentSpec = "coupler_straight_asymmetric",
    bend: ComponentSpec = "bend_s_mode_converter",
    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:
    r"""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>

    Args:
        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.

    ```text
        o2 ---           --- o4
              \         /
               \       /
                -------
        o1 -----=======----- o3
                |-----|
                length
    ```

        = : multimode width
        - : singlemode width
    """
    return cf.mode_converter(
        gap=gap,
        length=length,
        coupler_straight_asymmetric=coupler_straight_asymmetric,
        bend=bend,
        taper=taper,
        mm_width=mm_width,
        mc_mm_width=mc_mm_width,
        sm_width=sm_width,
        taper_length=taper_length,
        cross_section=cross_section,
    )

mode_converter

polarization_splitter_rotator

polarization_splitter_rotator

polarization_splitter_rotator(
    width_taper_in: Float3 = (0.54, 0.69, 0.83),
    length_taper_in: Float2 | Float3 = (4.0, 44.0),
    width_coupler: Float2 = (0.9, 0.404),
    length_coupler: float = 7.0,
    gap: float = 0.15,
    width_out: float = 0.54,
    length_out: float = 14.33,
    dy: Delta = 5.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component

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:

Name Type Description Default
width_taper_in Float3

Three west widths of the input tapers in um.

(0.54, 0.69, 0.83)
length_taper_in Float2 | Float3

Two or three length of the bend regions in um.

(4.0, 44.0)
width_coupler Float2

Top and bottom widths of the coupling region in um.

(0.9, 0.404)
length_coupler float

Length of the coupling region in um.

7.0
gap float

Distance between the coupler in um.

0.15
width_out float

Width of the splitter region in um.

0.54
length_out float

Length of the splitter region in um.

14.33
dy Delta

Port-to-port distance between the splitter region in um.

5.0
cross_section CrossSectionSpec

cross-section spec.

'strip'
Notes

The length of third input taper is automatically determined if only two lengths are in arguments.

Source code in gdsfactory/components/filters/polarization_splitter_rotator.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@gf.cell_with_module_name(tags=["filters"])
def polarization_splitter_rotator(
    width_taper_in: Float3 = (0.54, 0.69, 0.83),
    length_taper_in: Float2 | Float3 = (4.0, 44.0),
    width_coupler: Float2 = (0.9, 0.404),
    length_coupler: float = 7.0,
    gap: float = 0.15,
    width_out: float = 0.54,
    length_out: float = 14.33,
    dy: Delta = 5.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """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)).

    Args:
        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.
    """
    return cf.polarization_splitter_rotator(
        width_taper_in=width_taper_in,
        length_taper_in=length_taper_in,
        width_coupler=width_coupler,
        length_coupler=length_coupler,
        gap=gap,
        width_out=width_out,
        length_out=length_out,
        dy=dy,
        cross_section=cross_section,
    )

polarization_splitter_rotator

terminator

terminator

terminator(
    length: float | None = 50,
    cross_section_input: CrossSectionSpec = strip,
    cross_section_tip: CrossSectionSpec | None = None,
    tapered_width: float = 0.2,
    doping_layers: LayerSpecs = ("NPP",),
    doping_offset: float = 1.0,
) -> gf.Component

Returns doped taper to terminate waveguides.

Parameters:

Name Type Description Default
length float | None

distance between input and narrow tapered end.

50
cross_section_input CrossSectionSpec

input cross-section.

strip
cross_section_tip CrossSectionSpec | None

cross-section at the end of the termination.

None
tapered_width float

width of the default cross-section at the end of the termination. Only used if cross_section_tip is not None.

0.2
doping_layers LayerSpecs

doping layers to superimpose on the taper. Default N++.

('NPP',)
doping_offset float

offset of the doping layer beyond the bbox

1.0
Source code in gdsfactory/components/filters/terminator.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@gf.cell_with_module_name(schematic_function=terminator_schematic, tags=["filters"])
def terminator(
    length: float | None = 50,
    cross_section_input: CrossSectionSpec = strip,
    cross_section_tip: CrossSectionSpec | None = None,
    tapered_width: float = 0.2,
    doping_layers: LayerSpecs = ("NPP",),
    doping_offset: float = 1.0,
) -> gf.Component:
    """Returns doped taper to terminate waveguides.

    Args:
        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
    """
    return cf.terminator(
        length=length,
        cross_section_input=cross_section_input,
        cross_section_tip=cross_section_tip,
        tapered_width=tapered_width,
        doping_layers=doping_layers,
        doping_offset=doping_offset,
    )

terminator

terminator_spiral

terminator_spiral

terminator_spiral(
    separation: float = 3.0,
    width_tip: float = 0.2,
    number_of_loops: float = 1,
    npoints: int = 1000,
    min_bend_radius: float | None = None,
    cross_section: CrossSectionSpec = "strip",
) -> gf.Component

Returns doped taper to terminate waveguides.

Parameters:

Name Type Description Default
separation float

separation between the loops.

3.0
width_tip float

width of the default cross-section at the end of the termination. Only used if cross_section_tip is not None.

0.2
number_of_loops float

number of loops in the spiral.

1
npoints int

points for the spiral.

1000
min_bend_radius float | None

minimum bend radius for the spiral.

None
cross_section CrossSectionSpec

input cross-section.

'strip'
Source code in gdsfactory/components/filters/terminator_spiral.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@gf.cell_with_module_name(schematic_function=terminator_schematic, tags=["filters"])
def terminator_spiral(
    separation: float = 3.0,
    width_tip: float = 0.2,
    number_of_loops: float = 1,
    npoints: int = 1000,
    min_bend_radius: float | None = None,
    cross_section: CrossSectionSpec = "strip",
) -> gf.Component:
    """Returns doped taper to terminate waveguides.

    Args:
        separation: separation between the loops.
        width_tip: width of the default cross-section at the end of the termination.
            Only used if cross_section_tip is not None.
        number_of_loops: number of loops in the spiral.
        npoints: points for the spiral.
        min_bend_radius: minimum bend radius for the spiral.
        cross_section: input cross-section.
    """
    return cf.terminator_spiral(
        separation=separation,
        width_tip=width_tip,
        number_of_loops=number_of_loops,
        npoints=npoints,
        min_bend_radius=min_bend_radius,
        cross_section=cross_section,
    )

terminator_spiral

grating_couplers

grating_coupler_array

grating_coupler_array

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,
    bend: ComponentSpec = "bend_euler",
    mirror_grating_coupler: bool = False,
) -> Component

Array of grating couplers.

Parameters:

Name Type Description Default
grating_coupler ComponentSpec

ComponentSpec.

'grating_coupler_elliptical'
pitch float

x spacing.

127.0
n int

number of grating couplers.

6
port_name str

port name.

'o1'
rotation int

rotation angle for each reference.

-90
with_loopback bool

if True, adds a loopback between edge GCs. Only works for rotation = 90 for now.

False
cross_section CrossSectionSpec

cross_section for the routing.

'strip'
straight_to_grating_spacing float

spacing between the last grating coupler and the loopback.

10.0
centered bool

if True, centers the array around the origin.

True
radius float | None

optional radius for routing the loopback.

None
bend ComponentSpec

ComponentSpec for the bend used in the loopback.

'bend_euler'
mirror_grating_coupler bool

if True, mirrors the grating coupler.

False
Source code in gdsfactory/components/grating_couplers/grating_coupler_array.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
@gf.cell_with_module_name(tags=["grating_couplers"])
def 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,
    bend: ComponentSpec = "bend_euler",
    mirror_grating_coupler: bool = False,
) -> Component:
    """Array of grating couplers.

    Args:
        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.
        bend: ComponentSpec for the bend used in the loopback.
        mirror_grating_coupler: if True, mirrors the grating coupler.
    """
    return cf.grating_coupler_array(
        grating_coupler=grating_coupler,
        pitch=pitch,
        n=n,
        port_name=port_name,
        rotation=rotation,
        with_loopback=with_loopback,
        cross_section=cross_section,
        straight_to_grating_spacing=straight_to_grating_spacing,
        centered=centered,
        radius=radius,
        bend=bend,
        mirror_grating_coupler=mirror_grating_coupler,
    )

grating_coupler_array

grating_coupler_dual_pol

grating_coupler_dual_pol

grating_coupler_dual_pol(
    unit_cell: ComponentSpec = "grating_coupler_dual_pol_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

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:

Name Type Description Default
unit_cell ComponentSpec

component describing the unit cell of the photonic crystal.

'grating_coupler_dual_pol_unit_cell'
period_x float

spacing between unit cells in the x direction [um].

0.58
period_y float

spacing between unit cells in the y direction [um].

0.58
x_span float

full x span of the photonic crystal.

11
y_span float

full y span of the photonic crystal.

11
length_taper float

taper length [um].

150.0
width_taper float

width of the taper at the grating coupler side [um].

10.0
polarization str

polarization of the grating coupler.

'te'
wavelength float

operation wavelength [um]

1.55
taper ComponentSpec

function to generate the tapers.

'taper'
base_layer LayerSpec

layer to draw over the whole photonic crystal (necessary if the unit cells are etched into a base layer).

'WG'
cross_section CrossSectionSpec

for the routing waveguides.

'strip'
            _|-|_|-|_|-|___  --> unit_cells
               base_layer |
        o1  ______________|
top view
               -------------
           // | o   o   o  |
    o1 __ //  | o   o   o  |
          \\  | o   o   o  |
           \\ | o   o   o  |
               -------------
               \\         //
                \\       //
                     |
                     o2
Source code in gdsfactory/components/grating_couplers/grating_coupler_dual_pol.py
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@gf.cell_with_module_name(
    schematic_function=grating_coupler_schematic, tags=["grating_couplers"]
)
def grating_coupler_dual_pol(
    unit_cell: ComponentSpec = "grating_coupler_dual_pol_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:
    r"""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.

    Args:
        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

                   /  /  /  /
                  /  /  /  /

    ```text
                _|-|_|-|_|-|___  --> unit_cells
                   base_layer |
            o1  ______________|
    ```


        top view

    ```text
                   -------------
               // | o   o   o  |
        o1 __ //  | o   o   o  |
              \\  | o   o   o  |
               \\ | o   o   o  |
                   -------------
                   \\         //
                    \\       //
                         |
                         o2
    ```

    """
    return cf.grating_coupler_dual_pol(
        unit_cell=unit_cell,
        period_x=period_x,
        period_y=period_y,
        x_span=x_span,
        y_span=y_span,
        length_taper=length_taper,
        width_taper=width_taper,
        polarization=polarization,
        wavelength=wavelength,
        taper=taper,
        base_layer=base_layer,
        cross_section=cross_section,
    )

grating_coupler_dual_pol

grating_coupler_dual_pol_unit_cell module-attribute

grating_coupler_dual_pol_unit_cell = CellAlias(
    rectangle,
    size=(0.3, 0.3),
    layer="SLAB150",
    centered=True,
    port_type=None,
)

grating_coupler_dual_pol_unit_cell

grating_coupler_elliptical

grating_coupler_elliptical

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

Grating coupler with parametrization based on Lumerical FDTD simulation.

Parameters:

Name Type Description Default
polarization str

te or tm.

'te'
taper_length float

taper length from input.

16.6
taper_angle float

grating flare angle.

40.0
wavelength float

grating transmission central wavelength (um).

1.554
fiber_angle float

fibre angle in degrees determines ellipticity.

15.0
grating_line_width float

in um.

0.343
neff float

tooth effective index.

2.638
nclad float

cladding effective index.

1.443
n_periods int

number of periods.

30
big_last_tooth bool

adds a big_last_tooth.

False
layer_slab LayerSpec | None

layer that protects the slab under the grating.

'SLAB150'
slab_xmin float

where 0 is at the start of the taper.

-1.0
slab_offset float

in um.

2.0
spiked bool

grating teeth have sharp spikes to avoid non-manhattan drc errors.

True
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

      fiber

   /  /  /  /
  /  /  /  /
'strip'
            _|-|_|-|_|-|___ layer
               layer_slab |
        o1  ______________|
Source code in gdsfactory/components/grating_couplers/grating_coupler_elliptical.py
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
@gf.cell_with_module_name(
    schematic_function=grating_coupler_schematic, tags=["grating_couplers"]
)
def 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,  # tooth effective index
    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:
    r"""Grating coupler with parametrization based on Lumerical FDTD simulation.

    Args:
        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

                   /  /  /  /
                  /  /  /  /

    ```text
                _|-|_|-|_|-|___ layer
                   layer_slab |
            o1  ______________|
    ```

    """
    return cf.grating_coupler_elliptical(
        polarization=polarization,
        taper_length=taper_length,
        taper_angle=taper_angle,
        wavelength=wavelength,
        fiber_angle=fiber_angle,
        grating_line_width=grating_line_width,
        neff=neff,
        nclad=nclad,
        n_periods=n_periods,
        big_last_tooth=big_last_tooth,
        layer_slab=layer_slab,
        slab_xmin=slab_xmin,
        slab_offset=slab_offset,
        spiked=spiked,
        cross_section=cross_section,
    )

grating_coupler_elliptical

grating_coupler_elliptical_arbitrary

grating_coupler_elliptical_arbitrary

grating_coupler_elliptical_arbitrary(
    gaps: Floats = _gaps,
    widths: Floats = _widths,
    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

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:

Name Type Description Default
gaps Floats

list of gaps.

_gaps
widths Floats

list of widths.

_widths
taper_length float

taper length from input.

16.6
taper_angle float

grating flare angle.

60.0
wavelength float

grating transmission central wavelength (um).

1.554
fiber_angle float

fibre angle in degrees determines ellipticity.

15.0
nclad float

cladding effective index to compute ellipticity.

1.443
layer_slab LayerSpec | None

Optional slab.

'SLAB150'
layer_grating LayerSpec | None

Optional layer for grating. by default None uses cross_section.layer. if different from cross_section.layer expands taper.

None
taper_to_slab_offset float

0 is where taper ends.

-3.0
polarization str

te or tm.

'te'
spiked bool

grating teeth have spikes to avoid drc errors.

True
bias_gap float

etch gap (um). Positive bias increases gap and reduces width to keep period constant.

0
cross_section CrossSectionSpec

cross_section spec for waveguide port.

'strip'
Notes

Ellipse conventions, see https://en.wikipedia.org/wiki/Ellipse

c = (a1 ** 2 - b1 ** 2) ** 0.5 e = (1 - (b1 / a1) ** 2) ** 0.5

                  fiber

               /  /  /  /
              /  /  /  /

            _|-|_|-|_|-|___ layer
               layer_slab |
        o1  ______________|
Source code in gdsfactory/components/grating_couplers/grating_coupler_elliptical_arbitrary.py
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@gf.cell_with_module_name(
    schematic_function=grating_coupler_schematic, tags=["grating_couplers"]
)
def grating_coupler_elliptical_arbitrary(
    gaps: Floats = _gaps,
    widths: Floats = _widths,
    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:
    r"""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

    Args:
        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.

    Notes:
        Ellipse conventions, see <https://en.wikipedia.org/wiki/Ellipse>

        c = (a1 ** 2 - b1 ** 2) ** 0.5
        e = (1 - (b1 / a1) ** 2) ** 0.5

    ```text
                      fiber

                   /  /  /  /
                  /  /  /  /

                _|-|_|-|_|-|___ layer
                   layer_slab |
            o1  ______________|
    ```
    """
    return cf.grating_coupler_elliptical_arbitrary(
        gaps=gaps,
        widths=widths,
        taper_length=taper_length,
        taper_angle=taper_angle,
        wavelength=wavelength,
        fiber_angle=fiber_angle,
        nclad=nclad,
        layer_slab=layer_slab,
        layer_grating=layer_grating,
        taper_to_slab_offset=taper_to_slab_offset,
        polarization=polarization,
        spiked=spiked,
        bias_gap=bias_gap,
        cross_section=cross_section,
    )

grating_coupler_elliptical_uniform

grating_coupler_elliptical_uniform(
    n_periods: int = 20,
    period: float = 0.75,
    fill_factor: float = 0.5,
    **kwargs: Any
) -> Component

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:

Name Type Description Default
n_periods int

number of grating periods.

20
period float

grating pitch in um.

0.75
fill_factor float

ratio of grating width vs gap.

0.5

Other Parameters:

Name Type Description
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 Any

cross_section settings.

      fiber

   /  /  /  /
  /  /  /  /
            _|-|_|-|_|-|___ layer
               layer_slab |
        o1  ______________|
Source code in gdsfactory/components/grating_couplers/grating_coupler_elliptical_arbitrary.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
@gf.cell_with_module_name(
    schematic_function=grating_coupler_schematic, tags=["grating_couplers"]
)
def grating_coupler_elliptical_uniform(
    n_periods: int = 20,
    period: float = 0.75,
    fill_factor: float = 0.5,
    **kwargs: Any,
) -> Component:
    r"""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

    Args:
        n_periods: number of grating periods.
        period: grating pitch in um.
        fill_factor: ratio of grating width vs gap.

    Keyword Args:
        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

                   /  /  /  /
                  /  /  /  /

    ```text
                _|-|_|-|_|-|___ layer
                   layer_slab |
            o1  ______________|
    ```

    """
    return cf.grating_coupler_elliptical_uniform(
        n_periods=n_periods,
        period=period,
        fill_factor=fill_factor,
        **kwargs,
    )

grating_coupler_elliptical_arbitrary

grating_coupler_elliptical_lumerical

grating_coupler_elliptical_lumerical

grating_coupler_elliptical_lumerical(
    parameters: Floats = parameters,
    layer_slab: LayerSpec | None = "SLAB150",
    taper_angle: float = 55,
    taper_length: float = 12.24 + 0.36,
    fiber_angle: float = 5,
    info: dict[str, Any] | None = None,
    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:

Name Type Description Default
parameters Floats

xinput, gap1, width1, gap2, width2 ...

parameters
layer_slab LayerSpec | None

for slab.

'SLAB150'
taper_angle float

in deg.

55
taper_length float

in um.

12.24 + 0.36
fiber_angle float

used to compute ellipticity.

5
info dict[str, Any] | None

optional simulation settings.

None
bias_gap float

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

0

Other Parameters:

Name Type Description
taper_length float

taper length from input in um.

taper_angle float

grating flare angle in degrees.

wavelength

grating transmission central wavelength (um).

fiber_angle float

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 CrossSectionSpec

cross_section spec for waveguide port.

Source code in gdsfactory/components/grating_couplers/grating_coupler_elliptical_lumerical.py
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@gf.cell_with_module_name(
    schematic_function=grating_coupler_schematic, tags=["grating_couplers"]
)
def grating_coupler_elliptical_lumerical(
    parameters: Floats = parameters,
    layer_slab: LayerSpec | None = "SLAB150",
    taper_angle: float = 55,
    taper_length: float = 12.24 + 0.36,
    fiber_angle: float = 5,
    info: dict[str, Any] | None = None,
    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

    Args:
        parameters: xinput, gap1, width1, gap2, width2 ...
        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 Args:
        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.
    """
    return cf.grating_coupler_elliptical_lumerical(
        parameters=parameters,
        layer_slab=layer_slab,
        taper_angle=taper_angle,
        taper_length=taper_length,
        fiber_angle=fiber_angle,
        info=info,
        bias_gap=bias_gap,
        cross_section=cross_section,
    )

grating_coupler_elliptical_lumerical

grating_coupler_elliptical_lumerical_etch70 module-attribute

grating_coupler_elliptical_lumerical_etch70 = CellAlias(
    grating_coupler_elliptical_lumerical,
    info=dict(
        etch_depth=0.08,
        link="https://support.lumerical.com/hc/en-us/articles/1500000306621",
        fiber_angle=5,
        width_min=0.1,
        gap_min=0.1,
        efficiency=0.55,
    ),
)

grating_coupler_elliptical_lumerical_etch70

grating_coupler_elliptical_trenches

grating_coupler_elliptical_trenches

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

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:

Name Type Description Default
polarization str

'te' or 'tm'.

'te'
taper_length float

taper length from straight I/O.

16.6
taper_angle float

grating flare angle.

30.0
trenches_extra_angle float

extra angle for the trenches.

9.0
wavelength float

grating transmission central wavelength.

1.53
fiber_angle float

fibre polish angle in degrees.

15.0
grating_line_width float

of the 220 ridge.

0.343
neff float

tooth effective index.

2.638
ncladding float

cladding index.

1.443
layer_trench LayerSpec

for the trench.

'SHALLOW_ETCH'
p_start int

first tooth.

26
n_periods int

number of grating teeth.

30
end_straight_length float

at the end of straight.

0.2
taper ComponentSpec

taper function.

'taper'
cross_section CrossSectionSpec

cross_section spec.

      fiber
'strip'
               /  /  /  /
              /  /  /  /
            _|-|_|-|_|-|___
    WG  o1  ______________|
Source code in gdsfactory/components/grating_couplers/grating_coupler_elliptical_trenches.py
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@gf.cell_with_module_name(
    schematic_function=grating_coupler_schematic, tags=["grating_couplers"]
)
def 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,  # tooth effective index
    ncladding: float = 1.443,  # cladding index
    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:
    r"""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)

    Args:
        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

    ```text
                   /  /  /  /
                  /  /  /  /
                _|-|_|-|_|-|___
        WG  o1  ______________|
    ```

    """
    return cf.grating_coupler_elliptical_trenches(
        polarization=polarization,
        taper_length=taper_length,
        taper_angle=taper_angle,
        trenches_extra_angle=trenches_extra_angle,
        wavelength=wavelength,
        fiber_angle=fiber_angle,
        grating_line_width=grating_line_width,
        neff=neff,
        ncladding=ncladding,
        layer_trench=layer_trench,
        p_start=p_start,
        n_periods=n_periods,
        end_straight_length=end_straight_length,
        taper=taper,
        cross_section=cross_section,
    )

grating_coupler_elliptical_trenches

grating_coupler_elliptical_uniform

grating_coupler_elliptical_uniform(
    n_periods: int = 20,
    period: float = 0.75,
    fill_factor: float = 0.5,
    **kwargs: Any
) -> Component

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:

Name Type Description Default
n_periods int

number of grating periods.

20
period float

grating pitch in um.

0.75
fill_factor float

ratio of grating width vs gap.

0.5

Other Parameters:

Name Type Description
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 Any

cross_section settings.

      fiber

   /  /  /  /
  /  /  /  /
            _|-|_|-|_|-|___ layer
               layer_slab |
        o1  ______________|
Source code in gdsfactory/components/grating_couplers/grating_coupler_elliptical_arbitrary.py
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
@gf.cell_with_module_name(
    schematic_function=grating_coupler_schematic, tags=["grating_couplers"]
)
def grating_coupler_elliptical_uniform(
    n_periods: int = 20,
    period: float = 0.75,
    fill_factor: float = 0.5,
    **kwargs: Any,
) -> Component:
    r"""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

    Args:
        n_periods: number of grating periods.
        period: grating pitch in um.
        fill_factor: ratio of grating width vs gap.

    Keyword Args:
        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

                   /  /  /  /
                  /  /  /  /

    ```text
                _|-|_|-|_|-|___ layer
                   layer_slab |
            o1  ______________|
    ```

    """
    return cf.grating_coupler_elliptical_uniform(
        n_periods=n_periods,
        period=period,
        fill_factor=fill_factor,
        **kwargs,
    )

grating_coupler_elliptical_uniform

grating_coupler_loss

grating_coupler_loss

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,
    grating_coupler_spacing: float = 5.0,
) -> Component

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:

Name Type Description Default
pitch float

um.

127.0
grating_coupler ComponentSpec

spec.

'grating_coupler_elliptical_trenches'
cross_section CrossSectionSpec

spec.

'strip'
port_name str

for the grating_coupler port.

'o1'
rotation float

degrees.

-90
nfibers int

number of fibers to connect.

10
grating_coupler_spacing float

um.

5.0
Source code in gdsfactory/components/grating_couplers/grating_coupler_loss.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@gf.cell_with_module_name(tags=["grating_couplers"])
def 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,
    grating_coupler_spacing: float = 5.0,
) -> Component:
    """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.

    Args:
        pitch: um.
        grating_coupler: spec.
        cross_section: spec.
        port_name: for the grating_coupler port.
        rotation: degrees.
        nfibers: number of fibers to connect.
        grating_coupler_spacing: um.
    """
    return cf.grating_coupler_loss(
        pitch=pitch,
        grating_coupler=grating_coupler,
        cross_section=cross_section,
        port_name=port_name,
        rotation=rotation,
        nfibers=nfibers,
        grating_coupler_spacing=grating_coupler_spacing,
    )

grating_coupler_loss

grating_coupler_rectangular

grating_coupler_rectangular

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

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:

Name Type Description Default
n_periods int

number of grating teeth.

20
period float

grating pitch.

0.75
fill_factor float

ratio of grating width vs gap.

0.5
width_grating float

11.

11.0
length_taper float

150.

150.0
polarization str

'te' or 'tm'.

'te'
wavelength float

in um.

1.55
taper ComponentSpec

function.

'taper'
layer_slab LayerSpec | None

layer that protects the slab under the grating.

'SLAB150'
layer_grating LayerSpec | None

layer for the grating.

None
fiber_angle float

in degrees.

15
slab_xmin float

where 0 is at the start of the taper.

-1.0
slab_offset float

from edge of grating to edge of the slab.

1.0
cross_section CrossSectionSpec

for input waveguide port.

'strip'
            _|-|_|-|_|-|___ layer
               layer_slab |
        o1  ______________|
    top view     _________
                /| | | | |
               / | | | | |
              /taper_angle
             /_ _| | | | |
    wg_width |   | | | | |
             \   | | | | |
              \  | | | | |
               \ | | | | |
                \|_|_|_|_|
             <-->
            taper_length
Source code in gdsfactory/components/grating_couplers/grating_coupler_rectangular.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
@gf.cell_with_module_name(
    schematic_function=grating_coupler_schematic, tags=["grating_couplers"]
)
def 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:
    r"""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.

    Args:
        n_periods: number of grating teeth.
        period: grating pitch.
        fill_factor: ratio of grating width vs gap.
        width_grating: 11.
        length_taper: 150.
        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

                   /  /  /  /
                  /  /  /  /

    ```text
                _|-|_|-|_|-|___ layer
                   layer_slab |
            o1  ______________|
    ```


    ```text
        top view     _________
                    /| | | | |
                   / | | | | |
                  /taper_angle
                 /_ _| | | | |
        wg_width |   | | | | |
                 \   | | | | |
                  \  | | | | |
                   \ | | | | |
                    \|_|_|_|_|
                 <-->
                taper_length
    ```
    """
    return cf.grating_coupler_rectangular(
        n_periods=n_periods,
        period=period,
        fill_factor=fill_factor,
        width_grating=width_grating,
        length_taper=length_taper,
        polarization=polarization,
        wavelength=wavelength,
        taper=taper,
        layer_slab=layer_slab,
        layer_grating=layer_grating,
        fiber_angle=fiber_angle,
        slab_xmin=slab_xmin,
        slab_offset=slab_offset,
        cross_section=cross_section,
    )

grating_coupler_rectangular

grating_coupler_rectangular_arbitrary

grating_coupler_rectangular_arbitrary

grating_coupler_rectangular_arbitrary(
    gaps: Floats = _gaps,
    widths: Floats = _widths,
    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

Grating coupler uniform with rectangular shape (not elliptical).

Therefore it needs a longer taper. Grating teeth are straight instead of elliptical.

Parameters:

Name Type Description Default
gaps Floats

list of gaps between grating teeth.

_gaps
widths Floats

list of grating widths.

_widths
width_grating float

grating teeth width.

11.0
length_taper float

taper length (um).

150.0
polarization str

'te' or 'tm'.

'te'
wavelength float

in um.

1.55
layer_grating LayerSpec | None

Optional layer for grating. \ by default None uses cross_section.layer. \ if different from cross_section.layer expands taper.

None
layer_slab LayerSpec | None

layer that protects the slab under the grating.

None
slab_xmin float

where 0 is at the start of the taper.

-1.0
slab_offset float

from edge of grating to edge of the slab.

1.0
fiber_angle float

in degrees.

15
cross_section CrossSectionSpec

for input waveguide port.

      fiber

   /  /  /  /
  /  /  /  /
'strip'
            _|-|_|-|_|-|___ layer
               layer_slab |
        o1  ______________|
    top view     _________
                /| | | | |
               / | | | | |
              /taper_angle
             /_ _| | | | |
    wg_width |   | | | | |
             \   | | | | |
              \  | | | | |
               \ | | | | |
                \|_|_|_|_|
             <-->
            taper_length
Source code in gdsfactory/components/grating_couplers/grating_coupler_rectangular_arbitrary.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@gf.cell_with_module_name(
    schematic_function=grating_coupler_schematic, tags=["grating_couplers"]
)
def grating_coupler_rectangular_arbitrary(
    gaps: Floats = _gaps,
    widths: Floats = _widths,
    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:
    r"""Grating coupler uniform with rectangular shape (not elliptical).

    Therefore it needs a longer taper.
    Grating teeth are straight instead of elliptical.

    Args:
        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

                   /  /  /  /
                  /  /  /  /

    ```text
                _|-|_|-|_|-|___ layer
                   layer_slab |
            o1  ______________|
    ```



    ```text
        top view     _________
                    /| | | | |
                   / | | | | |
                  /taper_angle
                 /_ _| | | | |
        wg_width |   | | | | |
                 \   | | | | |
                  \  | | | | |
                   \ | | | | |
                    \|_|_|_|_|
                 <-->
                taper_length
    ```

    """
    return cf.grating_coupler_rectangular_arbitrary(
        gaps=gaps,
        widths=widths,
        width_grating=width_grating,
        length_taper=length_taper,
        polarization=polarization,
        wavelength=wavelength,
        layer_grating=layer_grating,
        layer_slab=layer_slab,
        slab_xmin=slab_xmin,
        slab_offset=slab_offset,
        fiber_angle=fiber_angle,
        cross_section=cross_section,
    )

grating_coupler_rectangular_arbitrary

grating_coupler_tree

grating_coupler_tree

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

Array of straights connected with grating couplers.

useful to align the 4 corners of the chip

Parameters:

Name Type Description Default
n int

number of gratings.

4
straight_spacing float

in um.

4.0
grating_coupler ComponentSpec

spec.

'grating_coupler_elliptical_te'
with_loopback bool

adds loopback.

False
bend ComponentSpec

bend spec.

'bend_euler'
fanout_length float

in um.

0.0
cross_section CrossSectionSpec

cross_section function.

'strip'
kwargs Any

additional arguments.

{}
Source code in gdsfactory/components/grating_couplers/grating_coupler_tree.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@gf.cell_with_module_name(tags=["grating_couplers"])
def 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:
    """Array of straights connected with grating couplers.

    useful to align the 4 corners of the chip

    Args:
        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.
    """
    return cf.grating_coupler_tree(
        n=n,
        straight_spacing=straight_spacing,
        grating_coupler=grating_coupler,
        with_loopback=with_loopback,
        bend=bend,
        fanout_length=fanout_length,
        cross_section=cross_section,
        **kwargs,
    )

grating_coupler_tree

mems

anchored_flexure

anchored_flexure

anchored_flexure(
    hinge_width: float = 0.3,
    hinge_length: float = 5.0,
    pad_width: float = 10.0,
    pad_length: float = 10.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component

Returns a flexure hinge between two pads.

Two rectangular pads connected by a thin hinge, all centered vertically.

Parameters:

Name Type Description Default
hinge_width float

width of the thin flexure hinge.

0.3
hinge_length float

length of the hinge connecting the two pads.

5.0
pad_width float

width (vertical) of each pad.

10.0
pad_length float

length (horizontal) of each pad.

10.0
layer LayerSpec

layer spec.

'WG'
port_type str

port type for electrical ports.

'electrical'
Source code in gdsfactory/components/mems/anchored_flexure.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@gf.cell_with_module_name(tags=["mems"])
def anchored_flexure(
    hinge_width: float = 0.3,
    hinge_length: float = 5.0,
    pad_width: float = 10.0,
    pad_length: float = 10.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component:
    """Returns a flexure hinge between two pads.

    Two rectangular pads connected by a thin hinge, all centered vertically.

    Args:
        hinge_width: width of the thin flexure hinge.
        hinge_length: length of the hinge connecting the two pads.
        pad_width: width (vertical) of each pad.
        pad_length: length (horizontal) of each pad.
        layer: layer spec.
        port_type: port type for electrical ports.
    """
    return cf.anchored_flexure(
        hinge_width=hinge_width,
        hinge_length=hinge_length,
        pad_width=pad_width,
        pad_length=pad_length,
        layer=layer,
        port_type=port_type,
    )

anchored_flexure

bent_beam

bent_beam

bent_beam(
    beam_width: float = 1.0,
    beam_length: float = 40.0,
    bend_angle: float = 170.0,
    anchor_width: float = 5.0,
    anchor_length: float = 5.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component

Returns a V-shaped bent beam thermal actuator.

Two straight beam segments meeting at an apex that points upward, with anchor pads at both ends.

Parameters:

Name Type Description Default
beam_width float

width of the beam.

1.0
beam_length float

length of each beam segment (center-line).

40.0
bend_angle float

angle between the two beam segments in degrees.

170.0
anchor_width float

width (vertical) of each anchor pad.

5.0
anchor_length float

length (horizontal) of each anchor pad.

5.0
layer LayerSpec

layer spec.

'WG'
port_type str

port type for electrical ports.

'electrical'
Source code in gdsfactory/components/mems/bent_beam.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@gf.cell_with_module_name(tags=["mems"])
def bent_beam(
    beam_width: float = 1.0,
    beam_length: float = 40.0,
    bend_angle: float = 170.0,
    anchor_width: float = 5.0,
    anchor_length: float = 5.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component:
    """Returns a V-shaped bent beam thermal actuator.

    Two straight beam segments meeting at an apex that points upward,
    with anchor pads at both ends.

    Args:
        beam_width: width of the beam.
        beam_length: length of each beam segment (center-line).
        bend_angle: angle between the two beam segments in degrees.
        anchor_width: width (vertical) of each anchor pad.
        anchor_length: length (horizontal) of each anchor pad.
        layer: layer spec.
        port_type: port type for electrical ports.
    """
    return cf.bent_beam(
        beam_width=beam_width,
        beam_length=beam_length,
        bend_angle=bend_angle,
        anchor_width=anchor_width,
        anchor_length=anchor_length,
        layer=layer,
        port_type=port_type,
    )

bent_beam

bolometer

bolometer

bolometer(
    absorber_width: float = 20.0,
    absorber_length: float = 20.0,
    leg_width: float = 0.5,
    leg_length: float = 15.0,
    n_legs: int = 4,
    pad_width: float = 5.0,
    pad_length: float = 5.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component

Returns a bolometer thermal detector.

A central absorber rectangle with thin L-shaped support legs extending outward to anchor pads distributed around the perimeter.

Parameters:

Name Type Description Default
absorber_width float

width of the central absorber.

20.0
absorber_length float

length of the central absorber.

20.0
leg_width float

width of each support leg.

0.5
leg_length float

length of each support leg.

15.0
n_legs int

number of support legs (distributed around perimeter).

4
pad_width float

width of each anchor pad.

5.0
pad_length float

length of each anchor pad.

5.0
layer LayerSpec

layer spec.

'WG'
port_type str

port type for electrical ports.

'electrical'
Source code in gdsfactory/components/mems/bolometer.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@gf.cell_with_module_name(tags=["mems"])
def bolometer(
    absorber_width: float = 20.0,
    absorber_length: float = 20.0,
    leg_width: float = 0.5,
    leg_length: float = 15.0,
    n_legs: int = 4,
    pad_width: float = 5.0,
    pad_length: float = 5.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component:
    """Returns a bolometer thermal detector.

    A central absorber rectangle with thin L-shaped support legs extending
    outward to anchor pads distributed around the perimeter.

    Args:
        absorber_width: width of the central absorber.
        absorber_length: length of the central absorber.
        leg_width: width of each support leg.
        leg_length: length of each support leg.
        n_legs: number of support legs (distributed around perimeter).
        pad_width: width of each anchor pad.
        pad_length: length of each anchor pad.
        layer: layer spec.
        port_type: port type for electrical ports.
    """
    return cf.bolometer(
        absorber_width=absorber_width,
        absorber_length=absorber_length,
        leg_width=leg_width,
        leg_length=leg_length,
        n_legs=n_legs,
        pad_width=pad_width,
        pad_length=pad_length,
        layer=layer,
        port_type=port_type,
    )

bolometer

cantilever

cantilever

cantilever(
    beam_width: float = 2.0,
    beam_length: float = 20.0,
    anchor_width: float = 5.0,
    anchor_length: float = 5.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component

Returns a simple cantilever beam with an anchor.

A rectangular anchor on the left with a thinner beam extending to the right.

Parameters:

Name Type Description Default
beam_width float

width of the cantilever beam.

2.0
beam_length float

length of the cantilever beam.

20.0
anchor_width float

width (vertical) of the anchor pad.

5.0
anchor_length float

length (horizontal) of the anchor pad.

5.0
layer LayerSpec

layer spec.

'WG'
port_type str

port type for electrical ports.

'electrical'
Source code in gdsfactory/components/mems/cantilever.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@gf.cell_with_module_name(tags=["mems"])
def cantilever(
    beam_width: float = 2.0,
    beam_length: float = 20.0,
    anchor_width: float = 5.0,
    anchor_length: float = 5.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component:
    """Returns a simple cantilever beam with an anchor.

    A rectangular anchor on the left with a thinner beam extending to the right.

    Args:
        beam_width: width of the cantilever beam.
        beam_length: length of the cantilever beam.
        anchor_width: width (vertical) of the anchor pad.
        anchor_length: length (horizontal) of the anchor pad.
        layer: layer spec.
        port_type: port type for electrical ports.
    """
    return cf.cantilever(
        beam_width=beam_width,
        beam_length=beam_length,
        anchor_width=anchor_width,
        anchor_length=anchor_length,
        layer=layer,
        port_type=port_type,
    )

cantilever

comb_drive

comb_drive

comb_drive(
    finger_width: float = 0.5,
    finger_length: float = 10.0,
    finger_gap: float = 0.5,
    n_fingers: int = 20,
    finger_overlap: float = 5.0,
    shuttle_width: float = 5.0,
    shuttle_length: float = 30.0,
    spring_width: float = 0.5,
    spring_length: float = 20.0,
    n_spring_folds: int = 4,
    anchor_size: float = 10.0,
    layer: LayerSpec = "WG",
) -> Component

Returns a comb drive actuator with interdigitated fingers and folded springs.

A central shuttle with comb fingers on both sides, fixed electrodes with interleaving fingers, and folded springs connecting the shuttle to corner anchor pads.

Parameters:

Name Type Description Default
finger_width float

width of each comb finger.

0.5
finger_length float

length of each comb finger.

10.0
finger_gap float

gap between adjacent moving and fixed fingers.

0.5
n_fingers int

number of moving fingers on each side.

20
finger_overlap float

overlap length between moving and fixed fingers in the actuation direction.

5.0
shuttle_width float

width (vertical) of the shuttle mass.

5.0
shuttle_length float

length (horizontal) of the shuttle mass.

30.0
spring_width float

width of spring beam segments.

0.5
spring_length float

length of each spring fold segment.

20.0
n_spring_folds int

number of folds in each folded spring.

4
anchor_size float

size of each square anchor pad.

10.0
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/mems/comb_drive.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@gf.cell_with_module_name(tags=["mems"])
def comb_drive(
    finger_width: float = 0.5,
    finger_length: float = 10.0,
    finger_gap: float = 0.5,
    n_fingers: int = 20,
    finger_overlap: float = 5.0,
    shuttle_width: float = 5.0,
    shuttle_length: float = 30.0,
    spring_width: float = 0.5,
    spring_length: float = 20.0,
    n_spring_folds: int = 4,
    anchor_size: float = 10.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a comb drive actuator with interdigitated fingers and folded springs.

    A central shuttle with comb fingers on both sides, fixed electrodes
    with interleaving fingers, and folded springs connecting the shuttle
    to corner anchor pads.

    Args:
        finger_width: width of each comb finger.
        finger_length: length of each comb finger.
        finger_gap: gap between adjacent moving and fixed fingers.
        n_fingers: number of moving fingers on each side.
        finger_overlap: overlap length between moving and fixed fingers in the actuation direction.
        shuttle_width: width (vertical) of the shuttle mass.
        shuttle_length: length (horizontal) of the shuttle mass.
        spring_width: width of spring beam segments.
        spring_length: length of each spring fold segment.
        n_spring_folds: number of folds in each folded spring.
        anchor_size: size of each square anchor pad.
        layer: layer spec.
    """
    return cf.comb_drive(
        finger_width=finger_width,
        finger_length=finger_length,
        finger_gap=finger_gap,
        n_fingers=n_fingers,
        finger_overlap=finger_overlap,
        shuttle_width=shuttle_width,
        shuttle_length=shuttle_length,
        spring_width=spring_width,
        spring_length=spring_length,
        n_spring_folds=n_spring_folds,
        anchor_size=anchor_size,
        layer=layer,
    )

comb_drive

doubly_clamped_beam

doubly_clamped_beam

doubly_clamped_beam(
    beam_width: float = 1.0,
    beam_length: float = 30.0,
    anchor_width: float = 5.0,
    anchor_length: float = 5.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component

Returns a doubly clamped beam fixed at both ends.

Two anchor pads connected by a thin beam, centered at the origin.

Parameters:

Name Type Description Default
beam_width float

width of the beam.

1.0
beam_length float

length of the beam between the two anchors.

30.0
anchor_width float

width (vertical) of each anchor pad.

5.0
anchor_length float

length (horizontal) of each anchor pad.

5.0
layer LayerSpec

layer spec.

'WG'
port_type str

port type for electrical ports.

'electrical'
Source code in gdsfactory/components/mems/doubly_clamped_beam.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@gf.cell_with_module_name(tags=["mems"])
def doubly_clamped_beam(
    beam_width: float = 1.0,
    beam_length: float = 30.0,
    anchor_width: float = 5.0,
    anchor_length: float = 5.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component:
    """Returns a doubly clamped beam fixed at both ends.

    Two anchor pads connected by a thin beam, centered at the origin.

    Args:
        beam_width: width of the beam.
        beam_length: length of the beam between the two anchors.
        anchor_width: width (vertical) of each anchor pad.
        anchor_length: length (horizontal) of each anchor pad.
        layer: layer spec.
        port_type: port type for electrical ports.
    """
    return cf.doubly_clamped_beam(
        beam_width=beam_width,
        beam_length=beam_length,
        anchor_width=anchor_width,
        anchor_length=anchor_length,
        layer=layer,
        port_type=port_type,
    )

doubly_clamped_beam

folded_spring

folded_spring

folded_spring(
    beam_width: float = 0.5,
    beam_length: float = 20.0,
    n_folds: int = 4,
    fold_gap: float = 1.0,
    anchor_width: float = 5.0,
    anchor_length: float = 3.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component

Returns a folded flexure spring (serpentine meander).

Alternating horizontal beams connected at their ends forming a serpentine pattern. Starts at a bottom anchor and ends at a top anchor.

Parameters:

Name Type Description Default
beam_width float

width of each beam segment.

0.5
beam_length float

length of each horizontal beam segment.

20.0
n_folds int

number of horizontal beam segments.

4
fold_gap float

vertical gap between adjacent beams.

1.0
anchor_width float

width (horizontal) of the anchor pads.

5.0
anchor_length float

length (vertical) of the anchor pads.

3.0
layer LayerSpec

layer spec.

'WG'
port_type str

port type for electrical ports.

'electrical'
Source code in gdsfactory/components/mems/folded_spring.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@gf.cell_with_module_name(tags=["mems"])
def folded_spring(
    beam_width: float = 0.5,
    beam_length: float = 20.0,
    n_folds: int = 4,
    fold_gap: float = 1.0,
    anchor_width: float = 5.0,
    anchor_length: float = 3.0,
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component:
    """Returns a folded flexure spring (serpentine meander).

    Alternating horizontal beams connected at their ends forming a
    serpentine pattern. Starts at a bottom anchor and ends at a top anchor.

    Args:
        beam_width: width of each beam segment.
        beam_length: length of each horizontal beam segment.
        n_folds: number of horizontal beam segments.
        fold_gap: vertical gap between adjacent beams.
        anchor_width: width (horizontal) of the anchor pads.
        anchor_length: length (vertical) of the anchor pads.
        layer: layer spec.
        port_type: port type for electrical ports.
    """
    return cf.folded_spring(
        beam_width=beam_width,
        beam_length=beam_length,
        n_folds=n_folds,
        fold_gap=fold_gap,
        anchor_width=anchor_width,
        anchor_length=anchor_length,
        layer=layer,
        port_type=port_type,
    )

folded_spring

gear

gear

gear(
    n_teeth: int = 20,
    module_size: float = 2.0,
    pressure_angle: float = 20.0,
    hub_radius: float | None = None,
    hub_hole_radius: float = 0.0,
    layer: LayerSpec = "WG",
) -> Component

Returns a gear with simplified trapezoidal teeth.

Parameters:

Name Type Description Default
n_teeth int

number of teeth.

20
module_size float

gear module (pitch diameter / number of teeth).

2.0
pressure_angle float

pressure angle in degrees.

20.0
hub_radius float | None

radius of the central hub disc. Defaults to root_radius * 0.6.

None
hub_hole_radius float

radius of a center hole (0 to disable).

0.0
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/mems/gear.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@gf.cell_with_module_name(tags=["mems"])
def gear(
    n_teeth: int = 20,
    module_size: float = 2.0,
    pressure_angle: float = 20.0,
    hub_radius: float | None = None,
    hub_hole_radius: float = 0.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a gear with simplified trapezoidal teeth.

    Args:
        n_teeth: number of teeth.
        module_size: gear module (pitch diameter / number of teeth).
        pressure_angle: pressure angle in degrees.
        hub_radius: radius of the central hub disc. Defaults to root_radius * 0.6.
        hub_hole_radius: radius of a center hole (0 to disable).
        layer: layer spec.
    """
    return cf.gear(
        n_teeth=n_teeth,
        module_size=module_size,
        pressure_angle=pressure_angle,
        hub_radius=hub_radius,
        hub_hole_radius=hub_hole_radius,
        layer=layer,
    )

gear

microfluidics

arrow_junction

arrow_junction

arrow_junction(
    main_width: float = 1.0,
    branch_width: float = 1.0,
    main_length: float = 20.0,
    branch_length: float = 10.0,
    branch_angle: float = 35.0,
    reservoir_radius: float = 0.0,
    n_reservoir_points: int = 64,
    layer: LayerSpec = "WG",
    port_type: str | None = "optical",
) -> Component

Returns a microfluidic arrow (Y) junction.

A main horizontal channel on the right side with two angled branches diverging to the left at +/- branch_angle from horizontal. The junction point is at the origin.

Parameters:

Name Type Description Default
main_width float

width of the main horizontal channel.

1.0
branch_width float

width of each angled branch channel.

1.0
main_length float

length of the main channel (extends to the right).

20.0
branch_length float

length of each angled branch.

10.0
branch_angle float

angle of each branch from horizontal (degrees).

35.0
reservoir_radius float

radius of circular reservoirs at endpoints (0 to disable).

0.0
n_reservoir_points int

number of polygon points for reservoir circles.

64
layer LayerSpec

layer spec.

'WG'
port_type str | None

None, optical, or electrical.

'optical'
Source code in gdsfactory/components/microfluidics/arrow_junction.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@gf.cell_with_module_name(tags=["microfluidics"])
def arrow_junction(
    main_width: float = 1.0,
    branch_width: float = 1.0,
    main_length: float = 20.0,
    branch_length: float = 10.0,
    branch_angle: float = 35.0,
    reservoir_radius: float = 0.0,
    n_reservoir_points: int = 64,
    layer: LayerSpec = "WG",
    port_type: str | None = "optical",
) -> Component:
    """Returns a microfluidic arrow (Y) junction.

    A main horizontal channel on the right side with two angled branches
    diverging to the left at +/- branch_angle from horizontal. The
    junction point is at the origin.

    Args:
        main_width: width of the main horizontal channel.
        branch_width: width of each angled branch channel.
        main_length: length of the main channel (extends to the right).
        branch_length: length of each angled branch.
        branch_angle: angle of each branch from horizontal (degrees).
        reservoir_radius: radius of circular reservoirs at endpoints (0 to disable).
        n_reservoir_points: number of polygon points for reservoir circles.
        layer: layer spec.
        port_type: None, optical, or electrical.
    """
    return cf.arrow_junction(
        main_width=main_width,
        branch_width=branch_width,
        main_length=main_length,
        branch_length=branch_length,
        branch_angle=branch_angle,
        reservoir_radius=reservoir_radius,
        n_reservoir_points=n_reservoir_points,
        layer=layer,
        port_type=port_type,
    )

arrow_junction

h_junction

h_junction

h_junction(
    main_width: float = 1.0,
    branch_width: float = 1.0,
    main_length: float = 20.0,
    branch_length: float = 10.0,
    reservoir_radius: float = 0.0,
    n_reservoir_points: int = 64,
    layer: LayerSpec = "WG",
    port_type: str | None = "optical",
) -> Component

Returns a microfluidic H-junction.

A horizontal main channel with two vertical branches extending up and down from the center. Optionally adds circular reservoirs at the four endpoints.

Parameters:

Name Type Description Default
main_width float

width of the main horizontal channel.

1.0
branch_width float

width of the vertical branch channels.

1.0
main_length float

total length of the main channel.

20.0
branch_length float

length of each vertical branch.

10.0
reservoir_radius float

radius of circular reservoirs at endpoints (0 to disable).

0.0
n_reservoir_points int

number of polygon points for reservoir circles.

64
layer LayerSpec

layer spec.

'WG'
port_type str | None

None, optical, or electrical.

'optical'
Source code in gdsfactory/components/microfluidics/h_junction.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@gf.cell_with_module_name(tags=["microfluidics"])
def h_junction(
    main_width: float = 1.0,
    branch_width: float = 1.0,
    main_length: float = 20.0,
    branch_length: float = 10.0,
    reservoir_radius: float = 0.0,
    n_reservoir_points: int = 64,
    layer: LayerSpec = "WG",
    port_type: str | None = "optical",
) -> Component:
    """Returns a microfluidic H-junction.

    A horizontal main channel with two vertical branches extending
    up and down from the center. Optionally adds circular reservoirs
    at the four endpoints.

    Args:
        main_width: width of the main horizontal channel.
        branch_width: width of the vertical branch channels.
        main_length: total length of the main channel.
        branch_length: length of each vertical branch.
        reservoir_radius: radius of circular reservoirs at endpoints (0 to disable).
        n_reservoir_points: number of polygon points for reservoir circles.
        layer: layer spec.
        port_type: None, optical, or electrical.
    """
    return cf.h_junction(
        main_width=main_width,
        branch_width=branch_width,
        main_length=main_length,
        branch_length=branch_length,
        reservoir_radius=reservoir_radius,
        n_reservoir_points=n_reservoir_points,
        layer=layer,
        port_type=port_type,
    )

h_junction

meander_channel

meander_channel

meander_channel(
    channel_width: float = 1.0,
    n_turns: int = 5,
    turn_spacing: float = 5.0,
    straight_length: float = 20.0,
    reservoir_length: float = 5.0,
    reservoir_height: float = 5.0,
    layer: LayerSpec = "WG",
    port_type: str | None = "optical",
) -> Component

Returns a microfluidic meander (serpentine) channel.

Builds a series of connected rectangles forming a serpentine path. Starts from the left, goes right for straight_length, turns up/down by turn_spacing, goes back left, and repeats for n_turns. Rectangular reservoirs are added at the inlet and outlet when reservoir_length > 0.

Parameters:

Name Type Description Default
channel_width float

width of the channel.

1.0
n_turns int

number of straight segments (horizontal passes).

5
turn_spacing float

center-to-center vertical spacing between passes.

5.0
straight_length float

length of each horizontal segment.

20.0
reservoir_length float

length of the reservoirs at inlet/outlet.

5.0
reservoir_height float

height of the reservoirs at inlet/outlet.

5.0
layer LayerSpec

layer spec.

'WG'
port_type str | None

None, optical, or electrical.

'optical'
Source code in gdsfactory/components/microfluidics/meander_channel.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@gf.cell_with_module_name(tags=["microfluidics"])
def meander_channel(
    channel_width: float = 1.0,
    n_turns: int = 5,
    turn_spacing: float = 5.0,
    straight_length: float = 20.0,
    reservoir_length: float = 5.0,
    reservoir_height: float = 5.0,
    layer: LayerSpec = "WG",
    port_type: str | None = "optical",
) -> Component:
    """Returns a microfluidic meander (serpentine) channel.

    Builds a series of connected rectangles forming a serpentine path.
    Starts from the left, goes right for straight_length, turns up/down
    by turn_spacing, goes back left, and repeats for n_turns.
    Rectangular reservoirs are added at the inlet and outlet when
    reservoir_length > 0.

    Args:
        channel_width: width of the channel.
        n_turns: number of straight segments (horizontal passes).
        turn_spacing: center-to-center vertical spacing between passes.
        straight_length: length of each horizontal segment.
        reservoir_length: length of the reservoirs at inlet/outlet.
        reservoir_height: height of the reservoirs at inlet/outlet.
        layer: layer spec.
        port_type: None, optical, or electrical.
    """
    return cf.meander_channel(
        channel_width=channel_width,
        n_turns=n_turns,
        turn_spacing=turn_spacing,
        straight_length=straight_length,
        reservoir_length=reservoir_length,
        reservoir_height=reservoir_height,
        layer=layer,
        port_type=port_type,
    )

meander_channel

t_junction

t_junction

t_junction(
    main_width: float = 1.0,
    branch_width: float = 1.0,
    main_length: float = 20.0,
    branch_length: float = 10.0,
    reservoir_radius: float = 0.0,
    n_reservoir_points: int = 64,
    layer: LayerSpec = "WG",
    port_type: str | None = "optical",
) -> Component

Returns a microfluidic T-junction.

A horizontal main channel with a vertical branch going up from the center. Optionally adds circular reservoirs at the three endpoints.

Parameters:

Name Type Description Default
main_width float

width of the main horizontal channel.

1.0
branch_width float

width of the vertical branch channel.

1.0
main_length float

total length of the main channel.

20.0
branch_length float

length of the vertical branch.

10.0
reservoir_radius float

radius of circular reservoirs at endpoints (0 to disable).

0.0
n_reservoir_points int

number of polygon points for reservoir circles.

64
layer LayerSpec

layer spec.

'WG'
port_type str | None

None, optical, or electrical.

'optical'
Source code in gdsfactory/components/microfluidics/t_junction.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@gf.cell_with_module_name(tags=["microfluidics"])
def t_junction(
    main_width: float = 1.0,
    branch_width: float = 1.0,
    main_length: float = 20.0,
    branch_length: float = 10.0,
    reservoir_radius: float = 0.0,
    n_reservoir_points: int = 64,
    layer: LayerSpec = "WG",
    port_type: str | None = "optical",
) -> Component:
    """Returns a microfluidic T-junction.

    A horizontal main channel with a vertical branch going up from
    the center. Optionally adds circular reservoirs at the three
    endpoints.

    Args:
        main_width: width of the main horizontal channel.
        branch_width: width of the vertical branch channel.
        main_length: total length of the main channel.
        branch_length: length of the vertical branch.
        reservoir_radius: radius of circular reservoirs at endpoints (0 to disable).
        n_reservoir_points: number of polygon points for reservoir circles.
        layer: layer spec.
        port_type: None, optical, or electrical.
    """
    return cf.t_junction(
        main_width=main_width,
        branch_width=branch_width,
        main_length=main_length,
        branch_length=branch_length,
        reservoir_radius=reservoir_radius,
        n_reservoir_points=n_reservoir_points,
        layer=layer,
        port_type=port_type,
    )

t_junction

mmis

mmi

mmi

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

Mxn MultiMode Interferometer (MMI).

Parameters:

Name Type Description Default
inputs int

number of inputs.

1
outputs int

number of outputs.

4
width float | None

input and output straight width. Defaults to cross_section.

None
width_taper float

interface between input straights and mmi region.

1.0
length_taper float

into the mmi region.

10.0
length_mmi float

in x direction.

5.5
width_mmi float

in y direction.

5
gap_input_tapers float

gap between input tapers from edge to edge.

0.25
gap_output_tapers float

gap between output tapers from edge to edge.

0.25
taper ComponentSpec

taper function.

'taper'
straight ComponentSpec

straight function.

'straight'
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
input_positions list[float] | None

optional positions of the inputs.

None
output_positions list[float] | None

optional positions of the outputs.

None
               length_mmi
                <------>
                ________
               |        |
            __/          \__
        o2  __            __  o3
              \          /_ _ _ _
              |         | _ _ _ _| gap_output_tapers
            __/          \__
        o1  __            __  o4
              \          /
               |________|
             | |
             <->
        length_taper
Source code in gdsfactory/components/mmis/mmi.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@gf.cell_with_module_name(schematic_function=ckt_schematic, tags=["mmis"])
def 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:
    r"""Mxn MultiMode Interferometer (MMI).

    Args:
        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.

    ```text
                   length_mmi
                    <------>
                    ________
                   |        |
                __/          \__
            o2  __            __  o3
                  \          /_ _ _ _
                  |         | _ _ _ _| gap_output_tapers
                __/          \__
            o1  __            __  o4
                  \          /
                   |________|
                 | |
                 <->
            length_taper
    ```
    """
    return cf.mmi(
        inputs=inputs,
        outputs=outputs,
        width=width,
        width_taper=width_taper,
        length_taper=length_taper,
        length_mmi=length_mmi,
        width_mmi=width_mmi,
        gap_input_tapers=gap_input_tapers,
        gap_output_tapers=gap_output_tapers,
        taper=taper,
        straight=straight,
        cross_section=cross_section,
        input_positions=input_positions,
        output_positions=output_positions,
    )

mmi

mmi1x2

mmi1x2

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 = "taper",
    straight: ComponentSpec = "straight",
    cross_section: CrossSectionSpec = "strip",
) -> Component

1x2 MultiMode Interferometer (MMI).

Parameters:

Name Type Description Default
width float | None

input and output straight width. Defaults to cross_section width.

None
width_taper float

interface between input straights and mmi region.

1.0
length_taper float

into the mmi region.

10.0
length_mmi float

in x direction.

5.5
width_mmi float

in y direction.

2.5
gap_mmi float

gap between tapered wg.

0.25
taper ComponentSpec

taper function.

'taper'
straight ComponentSpec

straight function.

'straight'
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
           length_mmi
            <------>
            ________
           |        |
           |         \__
           |          __  o2
        __/          /_ _ _ _
     o1 __          | _ _ _ _| gap_mmi
          \          \__
           |          __  o3
           |         /
           |________|
     <->
length_taper
Source code in gdsfactory/components/mmis/mmi1x2.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@gf.cell_with_module_name(schematic_function=mmi_1x2_schematic, tags=["mmis"])
def 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 = "taper",
    straight: ComponentSpec = "straight",
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    r"""1x2 MultiMode Interferometer (MMI).

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

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

             <->
        length_taper

    """
    return cf.mmi1x2(
        width=width,
        width_taper=width_taper,
        length_taper=length_taper,
        length_mmi=length_mmi,
        width_mmi=width_mmi,
        gap_mmi=gap_mmi,
        taper=taper,
        straight=straight,
        cross_section=cross_section,
    )

mmi1x2

mmi1x2_with_sbend

mmi1x2_with_sbend

mmi1x2_with_sbend(
    with_sbend: bool = True,
    s_bend: ComponentSpec = "bend_s",
    cross_section: CrossSectionSpec = "strip",
) -> Component

Returns 1x2 splitter for Cband.

https://opg.optica.org/oe/fulltext.cfm?uri=oe-21-1-1310&id=248418

Parameters:

Name Type Description Default
with_sbend bool

add sbend.

True
s_bend ComponentSpec

S-bend spec.

'bend_s'
cross_section CrossSectionSpec

spec.

'strip'
Source code in gdsfactory/components/mmis/mmi1x2_with_sbend.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@gf.cell_with_module_name(schematic_function=mmi_1x2_schematic, tags=["mmis"])
def mmi1x2_with_sbend(
    with_sbend: bool = True,
    s_bend: ComponentSpec = "bend_s",
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Returns 1x2 splitter for Cband.

    <https://opg.optica.org/oe/fulltext.cfm?uri=oe-21-1-1310&id=248418>

    Args:
        with_sbend: add sbend.
        s_bend: S-bend spec.
        cross_section: spec.
    """
    return cf.mmi1x2_with_sbend(
        with_sbend=with_sbend,
        s_bend=s_bend,
        cross_section=cross_section,
    )

mmi1x2_with_sbend

mmi2x2

mmi2x2

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 = "taper",
    straight: ComponentSpec = "straight",
    cross_section: CrossSectionSpec = "strip",
) -> Component

Mmi 2x2.

Parameters:

Name Type Description Default
width float | None

input and output straight width.

None
width_taper float

interface between input straights and mmi region.

1.0
length_taper float

into the mmi region.

10.0
length_mmi float

in x direction.

5.5
width_mmi float

in y direction.

2.5
gap_mmi float

(width_taper + gap between tapered wg)/2.

0.25
taper ComponentSpec

taper function.

'taper'
straight ComponentSpec

straight function.

'straight'
cross_section CrossSectionSpec

spec.

'strip'
               length_mmi
                <------>
                ________
               |        |
            __/          \__
        o2  __            __  o3
              \          /_ _ _ _
              |         | _ _ _ _| gap_mmi
            __/          \__
        o1  __            __  o4
              \          /
               |________|
         <->
    length_taper
Source code in gdsfactory/components/mmis/mmi2x2.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@gf.cell_with_module_name(schematic_function=mmi_2x2_schematic, tags=["mmis"])
def 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 = "taper",
    straight: ComponentSpec = "straight",
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    r"""Mmi 2x2.

    Args:
        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.

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

                 <->
            length_taper

    """
    return cf.mmi2x2(
        width=width,
        width_taper=width_taper,
        length_taper=length_taper,
        length_mmi=length_mmi,
        width_mmi=width_mmi,
        gap_mmi=gap_mmi,
        taper=taper,
        straight=straight,
        cross_section=cross_section,
    )

mmi2x2

mmi2x2_with_sbend

mmi2x2_with_sbend

mmi2x2_with_sbend(
    with_sbend: bool = True,
    s_bend: ComponentSpec = "bend_s",
    cross_section: CrossSectionSpec = "strip",
) -> Component

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:

Name Type Description Default
with_sbend bool

add sbend.

True
s_bend ComponentSpec

S-bend function.

'bend_s'
cross_section CrossSectionSpec

spec.

'strip'
Source code in gdsfactory/components/mmis/mmi2x2_with_sbend.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@gf.cell_with_module_name(schematic_function=mmi_2x2_schematic, tags=["mmis"])
def mmi2x2_with_sbend(
    with_sbend: bool = True,
    s_bend: ComponentSpec = "bend_s",
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """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>

    Args:
        with_sbend: add sbend.
        s_bend: S-bend function.
        cross_section: spec.
    """
    return cf.mmi2x2_with_sbend(
        with_sbend=with_sbend,
        s_bend=s_bend,
        cross_section=cross_section,
    )

mmi2x2_with_sbend

mmi_90degree_hybrid

mmi_90degree_hybrid

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

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:

Name Type Description Default
width float

input and output straight width.

0.5
width_taper float

interface between input straights and mmi region.

1.7
length_taper float

into the mmi region.

40.0
length_mmi float

in x direction.

175.0
width_mmi float

in y direction.

10.0
gap_mmi float

(width_taper + gap between tapered wg)/2.

0.8
straight ComponentSpec

straight function.

'straight'
cross_section CrossSectionSpec

spec.

'strip'
               length_mmi
                <------>
                ________
               |        |
            __/          \__
 signal_in  __            __  I_out1
              \          /_ _ _ _
              |         | _ _ _ _| gap_mmi
              |          \__
              |           __  Q_out1
              |          /
              |        |
              |
            __/          \__
    LO_in   __            __  Q_out2
              \          /_ _ _ _
              |         | _ _ _ _| gap_mmi
              |          \__
              |           __  I_out2
              |          /
              | ________|
         <->
    length_taper
Source code in gdsfactory/components/mmis/mmi_90degree_hybrid.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@gf.cell_with_module_name(schematic_function=ckt_schematic, tags=["mmis"])
def 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:
    r"""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

    Args:
        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.
        cross_section: spec.

    ```text
                   length_mmi
                    <------>
                    ________
                   |        |
                __/          \__
     signal_in  __            __  I_out1
                  \          /_ _ _ _
                  |         | _ _ _ _| gap_mmi
                  |          \__
                  |           __  Q_out1
                  |          /
                  |        |
                  |
                __/          \__
        LO_in   __            __  Q_out2
                  \          /_ _ _ _
                  |         | _ _ _ _| gap_mmi
                  |          \__
                  |           __  I_out2
                  |          /
                  | ________|
    ```


                 <->
            length_taper
    """
    return cf.mmi_90degree_hybrid(
        width=width,
        width_taper=width_taper,
        length_taper=length_taper,
        length_mmi=length_mmi,
        width_mmi=width_mmi,
        gap_mmi=gap_mmi,
        straight=straight,
        cross_section=cross_section,
    )

mmi_90degree_hybrid

mmi_tapered

mmi_tapered

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_taper_start: float | None = None,
    length_taper_end: float | None = None,
    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: ComponentSpec = "taper",
    cross_section: CrossSectionSpec = "strip",
    input_positions: list[float] | None = None,
    output_positions: list[float] | None = None,
) -> Component

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:

Name Type Description Default
inputs int

number of inputs.

1
outputs int

number of outputs.

2
width float | None

input and output straight width. Defaults to cross_section.

None
width_taper_in float

interface between input straights and mmi region.

2.0
length_taper_in float

into the mmi region.

1.0
width_taper_out float | None

interface between mmi region and output straights.

None
length_taper_out float | None

into the mmi region.

None
width_taper float

interface between mmi region and output straights.

1.0
length_taper float

into the mmi region.

10.0
length_taper_start float | None

length of the taper at the start. Defaults to length_taper.

None
length_taper_end float | None

length of the taper at the end. Defaults to length_taper.

None
length_mmi float

in x direction.

5.5
width_mmi float

in y direction.

5
width_mmi_inner float | None

allows adding a different width for the inner mmi region.

None
gap_input_tapers float

gap between input tapers from edge to edge.

0.25
gap_output_tapers float

gap between output tapers from edge to edge.

0.25
taper ComponentSpec

taper function.

'taper'
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
input_positions list[float] | None

optional positions of the inputs.

None
output_positions list[float] | None

optional positions of the outputs.

None
                                   ┌───────────┐
                                   │           ├───────────────┐
                                   │           │               ├────────────┐
           width_taper             │           │               │            │
                ▲ ┌────────────────┤           │               ├────────────┘
                │ │                │           ├───────────────┘
    ┌───────────┼─┤                │           │
    │           │ │                │           │
    ◄───────────┼─►                │           ├───────────────┐
    └───────────┼─┐                │           │               ├─────────────┐
                ▼ └────────────────┤           │               │             │
                  ◄───────────────►│           │               ├─────────────┘
    length_taper    length_taper_in│           ├───────────────┘ length_taper
    ◄────────────►                 └───────────┘◄────────────►  ◄────────────►
        start                                  length_taper_out      end
                                   ◄───────────►
                                    length_mmi
Source code in gdsfactory/components/mmis/mmi_tapered.py
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
@gf.cell_with_module_name(schematic_function=mmi_1x2_schematic, tags=["mmis"])
def 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_taper_start: float | None = None,
    length_taper_end: float | None = None,
    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: ComponentSpec = "taper",
    cross_section: CrossSectionSpec = "strip",
    input_positions: list[float] | None = None,
    output_positions: list[float] | None = None,
) -> Component:
    r"""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.

    Args:
        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_taper_start: length of the taper at the start. Defaults to length_taper.
        length_taper_end: length of the taper at the end. Defaults to length_taper.
        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.

    ```text
                                       ┌───────────┐
                                       │           ├───────────────┐
                                       │           │               ├────────────┐
               width_taper             │           │               │            │
                    ▲ ┌────────────────┤           │               ├────────────┘
                    │ │                │           ├───────────────┘
        ┌───────────┼─┤                │           │
        │           │ │                │           │
        ◄───────────┼─►                │           ├───────────────┐
        └───────────┼─┐                │           │               ├─────────────┐
                    ▼ └────────────────┤           │               │             │
                      ◄───────────────►│           │               ├─────────────┘
        length_taper    length_taper_in│           ├───────────────┘ length_taper
        ◄────────────►                 └───────────┘◄────────────►  ◄────────────►
            start                                  length_taper_out      end
                                       ◄───────────►
                                        length_mmi
    ```
    """
    return cf.mmi_tapered(
        inputs=inputs,
        outputs=outputs,
        width=width,
        width_taper_in=width_taper_in,
        length_taper_in=length_taper_in,
        width_taper_out=width_taper_out,
        length_taper_out=length_taper_out,
        width_taper=width_taper,
        length_taper=length_taper,
        length_taper_start=length_taper_start,
        length_taper_end=length_taper_end,
        length_mmi=length_mmi,
        width_mmi=width_mmi,
        width_mmi_inner=width_mmi_inner,
        gap_input_tapers=gap_input_tapers,
        gap_output_tapers=gap_output_tapers,
        taper=taper,
        cross_section=cross_section,
        input_positions=input_positions,
        output_positions=output_positions,
    )

mmi_tapered

mzis

mzi

mzi

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,
    auto_detect_port_names: bool = False,
) -> Component

Mzi.

Parameters:

Name Type Description Default
delta_length float

bottom arm vertical extra length.

10.0
length_y float

vertical length for both and top arms.

2.0
length_x float | None

horizontal length. None uses to the straight_x_bot/top defaults.

0.1
bend ComponentSpec

90 degrees bend library.

'bend_euler'
straight ComponentSpec

straight function.

'straight'
straight_y ComponentSpec | None

straight for length_y and delta_length.

None
straight_x_top ComponentSpec | None

top straight for length_x.

None
straight_x_bot ComponentSpec | None

bottom straight for length_x.

None
splitter ComponentSpec

splitter function.

'mmi1x2'
combiner ComponentSpec | None

combiner function.

None
with_splitter bool

if False removes splitter.

True
port_e1_splitter str

east top splitter port.

'o2'
port_e0_splitter str

east bot splitter port.

'o3'
port_e1_combiner str

east top combiner port.

'o2'
port_e0_combiner str

east bot combiner port.

'o3'
port1 str

input port name.

'o1'
port2 str

output port name.

'o2'
nbends int

from straight top/bot to combiner (at least 2).

2
cross_section CrossSectionSpec

for routing (sxtop/sxbot to combiner).

'strip'
cross_section_x_top CrossSectionSpec | None

optional top cross_section (defaults to cross_section).

None
cross_section_x_bot CrossSectionSpec | None

optional bottom cross_section (defaults to cross_section).

None
mirror_bot bool

if true, mirrors the bottom arm.

False
add_optical_ports_arms bool

add all other optical ports in the arms with top\ and bot\ prefix.

False
min_length float

minimum length for the straight.

0.01
auto_rename_ports bool

if True, renames ports.

True
auto_detect_port_names bool

whether to auto detect ports names. Ignores port_e* arguments if True.

False
                   b2______b3
                  |  sxtop  |
          straight_y        |
                  |         |
                  b1        b4
        splitter==|         |==combiner
                  b5        b8
                  |         |
          straight_y        |
                  |         |
    delta_length/2          |
                  |         |
                 b6__sxbot__b7
                      Lx
Source code in gdsfactory/components/mzis/mzi.py
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
@gf.cell_with_module_name(schematic_function=mzi_2x2_schematic, tags=["mzis"])
def 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 = 10e-3,
    auto_rename_ports: bool = True,
    auto_detect_port_names: bool = False,
) -> Component:
    r"""Mzi.

    Args:
        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.
        auto_detect_port_names: whether to auto detect ports names. Ignores port_e* arguments if True.

    ```text
                       b2______b3
                      |  sxtop  |
              straight_y        |
                      |         |
                      b1        b4
            splitter==|         |==combiner
                      b5        b8
                      |         |
              straight_y        |
                      |         |
        delta_length/2          |
                      |         |
                     b6__sxbot__b7
                          Lx
    ```
    """
    return cf.mzi(
        delta_length=delta_length,
        length_y=length_y,
        length_x=length_x,
        bend=bend,
        straight=straight,
        straight_y=straight_y,
        straight_x_top=straight_x_top,
        straight_x_bot=straight_x_bot,
        splitter=splitter,
        combiner=combiner,
        with_splitter=with_splitter,
        port_e1_splitter=port_e1_splitter,
        port_e0_splitter=port_e0_splitter,
        port_e1_combiner=port_e1_combiner,
        port_e0_combiner=port_e0_combiner,
        port1=port1,
        port2=port2,
        nbends=nbends,
        cross_section=cross_section,
        cross_section_x_top=cross_section_x_top,
        cross_section_x_bot=cross_section_x_bot,
        mirror_bot=mirror_bot,
        add_optical_ports_arms=add_optical_ports_arms,
        min_length=min_length,
        auto_rename_ports=auto_rename_ports,
        auto_detect_port_names=auto_detect_port_names,
    )

mzi

mzi1x2_2x2 module-attribute

mzi1x2_2x2 = CellAlias(
    mzi,
    combiner="mmi2x2",
    port_e1_combiner="o3",
    port_e0_combiner="o4",
)

mzi1x2_2x2

mzi2x2_2x2_phase_shifter module-attribute

mzi2x2_2x2_phase_shifter = CellAlias(
    mzi2x2_2x2,
    straight_x_top="straight_heater_metal",
    length_x=200,
)

mzi2x2_2x2_phase_shifter

mzi_lattice

mzi_lattice

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

Mzi lattice filter.

Parameters:

Name Type Description Default
coupler_lengths Sequence[float]

list of length for each coupler.

(10.0, 20.0)
coupler_gaps Sequence[float]

list of coupler gaps.

(0.2, 0.3)
delta_lengths Sequence[float]

list of length differences.

(10.0,)
mzi str

function for the mzi.

'mzi_coupler'
splitter str

splitter function.

'coupler'
kwargs Any

additional settings.

{}

Other Parameters:

Name Type Description
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     |
          |      |           |      |
          |______|           |      |
                             |______|
Source code in gdsfactory/components/mzis/mzi_lattice.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@gf.cell_with_module_name(schematic_function=mzi_2x2_schematic, tags=["mzis"])
def 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:
    r"""Mzi lattice filter.

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

    ```text
               ______             ______
              |      |           |      |
              |      |           |      |
         cp1==|      |===cp2=====|      |=== .... ===cp_last===
              |      |           |      |
              |      |           |      |
             DL1     |          DL2     |
              |      |           |      |
              |______|           |      |
                                 |______|
    ```

    """
    return cf.mzi_lattice(
        coupler_lengths=coupler_lengths,
        coupler_gaps=coupler_gaps,
        delta_lengths=delta_lengths,
        mzi=mzi,
        splitter=splitter,
        **kwargs,
    )

mzi_lattice_mmi

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

Mzi lattice filter, with MMI couplers.

Parameters:

Name Type Description Default
coupler_widths tuple[float | None, float | None]

(for each MMI coupler, list of) input and output straight width.

(None, None)
coupler_widths_tapers tuple[float, ...]

(for each MMI coupler, list of) interface between input straights and mmi region.

(1.0, 1.0)
coupler_lengths_tapers tuple[float, ...]

(for each MMI coupler, list of) into the mmi region.

(10.0, 10.0)
coupler_lengths_mmis tuple[float, ...]

(for each MMI coupler, list of) in x direction.

(5.5, 5.5)
coupler_widths_mmis tuple[float, ...]

(for each MMI coupler, list of) in y direction.

(2.5, 2.5)
coupler_gaps_mmis tuple[float, ...]

(for each MMI coupler, list of) (width_taper + gap between tapered wg)/2.

(0.25, 0.25)
taper_functions_mmis tuple[str, ...]

(for each MMI coupler, list of) taper function.

('taper', 'taper')
straight_functions_mmis tuple[str, ...]

(for each MMI coupler, list of) straight function.

('straight', 'straight')
cross_sections_mmis tuple[str, ...]

(for each MMI coupler, list of) spec.

('strip', 'strip')
delta_lengths tuple[float, ...]

list of length differences.

(10.0,)
mzi str

function for the mzi.

'mzi2x2_2x2'
splitter str

splitter function.

'mmi2x2'
kwargs Any

additional settings.

{}

Other Parameters:

Name Type Description
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     |
          |      |           |      |
          |______|           |      |
                             |______|
Source code in gdsfactory/components/mzis/mzi_lattice.py
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
@gf.cell_with_module_name(schematic_function=mzi_2x2_schematic, tags=["mzis"])
def 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:
    r"""Mzi lattice filter, with MMI couplers.

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

    ```text
               ______             ______
              |      |           |      |
              |      |           |      |
         cp1==|      |===cp2=====|      |=== .... ===cp_last===
              |      |           |      |
              |      |           |      |
             DL1     |          DL2     |
              |      |           |      |
              |______|           |      |
                                 |______|
    ```

    """
    return cf.mzi_lattice_mmi(
        coupler_widths=coupler_widths,
        coupler_widths_tapers=coupler_widths_tapers,
        coupler_lengths_tapers=coupler_lengths_tapers,
        coupler_lengths_mmis=coupler_lengths_mmis,
        coupler_widths_mmis=coupler_widths_mmis,
        coupler_gaps_mmis=coupler_gaps_mmis,
        taper_functions_mmis=taper_functions_mmis,
        straight_functions_mmis=straight_functions_mmis,
        cross_sections_mmis=cross_sections_mmis,
        delta_lengths=delta_lengths,
        mzi=mzi,
        splitter=splitter,
        **kwargs,
    )

mzi_lattice

mzi_lattice_mmi

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

Mzi lattice filter, with MMI couplers.

Parameters:

Name Type Description Default
coupler_widths tuple[float | None, float | None]

(for each MMI coupler, list of) input and output straight width.

(None, None)
coupler_widths_tapers tuple[float, ...]

(for each MMI coupler, list of) interface between input straights and mmi region.

(1.0, 1.0)
coupler_lengths_tapers tuple[float, ...]

(for each MMI coupler, list of) into the mmi region.

(10.0, 10.0)
coupler_lengths_mmis tuple[float, ...]

(for each MMI coupler, list of) in x direction.

(5.5, 5.5)
coupler_widths_mmis tuple[float, ...]

(for each MMI coupler, list of) in y direction.

(2.5, 2.5)
coupler_gaps_mmis tuple[float, ...]

(for each MMI coupler, list of) (width_taper + gap between tapered wg)/2.

(0.25, 0.25)
taper_functions_mmis tuple[str, ...]

(for each MMI coupler, list of) taper function.

('taper', 'taper')
straight_functions_mmis tuple[str, ...]

(for each MMI coupler, list of) straight function.

('straight', 'straight')
cross_sections_mmis tuple[str, ...]

(for each MMI coupler, list of) spec.

('strip', 'strip')
delta_lengths tuple[float, ...]

list of length differences.

(10.0,)
mzi str

function for the mzi.

'mzi2x2_2x2'
splitter str

splitter function.

'mmi2x2'
kwargs Any

additional settings.

{}

Other Parameters:

Name Type Description
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     |
          |      |           |      |
          |______|           |      |
                             |______|
Source code in gdsfactory/components/mzis/mzi_lattice.py
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
@gf.cell_with_module_name(schematic_function=mzi_2x2_schematic, tags=["mzis"])
def 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:
    r"""Mzi lattice filter, with MMI couplers.

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

    ```text
               ______             ______
              |      |           |      |
              |      |           |      |
         cp1==|      |===cp2=====|      |=== .... ===cp_last===
              |      |           |      |
              |      |           |      |
             DL1     |          DL2     |
              |      |           |      |
              |______|           |      |
                                 |______|
    ```

    """
    return cf.mzi_lattice_mmi(
        coupler_widths=coupler_widths,
        coupler_widths_tapers=coupler_widths_tapers,
        coupler_lengths_tapers=coupler_lengths_tapers,
        coupler_lengths_mmis=coupler_lengths_mmis,
        coupler_widths_mmis=coupler_widths_mmis,
        coupler_gaps_mmis=coupler_gaps_mmis,
        taper_functions_mmis=taper_functions_mmis,
        straight_functions_mmis=straight_functions_mmis,
        cross_sections_mmis=cross_sections_mmis,
        delta_lengths=delta_lengths,
        mzi=mzi,
        splitter=splitter,
        **kwargs,
    )

mzi_lattice_mmi

mzi_pads_center

mzi_pads_center

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",
    auto_taper: bool = False,
    **kwargs: Any
) -> gf.Component

Return Mzi phase shifter with pads in the middle.

GND is the middle pad and is shared between top and bottom phase shifters.

Parameters:

Name Type Description Default
ps_top ComponentSpec

phase shifter top.

'straight_heater_metal'
ps_bot ComponentSpec

phase shifter bottom.

'straight_heater_metal'
mzi ComponentSpec

interferometer.

'mzi'
pad ComponentSpec

pad function.

'pad_small'
length_x float

horizontal length.

500
length_y float

vertical length.

40
mzi_sig_top str | None

port name for top phase shifter signal. None if no connection.

'top_r_e2'
mzi_gnd_top str | None

port name for top phase shifter GND. None if no connection.

'top_l_e2'
mzi_sig_bot str | None

port name for top phase shifter signal. None if no connection.

'bot_l_e2'
mzi_gnd_bot str | None

port name for top phase shifter GND. None if no connection.

'bot_r_e2'
pad_sig_bot str

port name for top pad.

'e1_1_1'
pad_sig_top str

port name for top pad.

'e3_1_3'
pad_gnd_bot str

port name for top pad.

'e4_1_2'
pad_gnd_top str

port name for top pad.

'e2_1_2'
delta_length float

mzi length imbalance.

40.0
cross_section CrossSectionSpec

for the mzi.

'strip'
cross_section_metal CrossSectionSpec

for routing metal.

'metal_routing'
pad_pitch float | str

pad pitch in um.

'pad_pitch'
auto_taper bool

add taper if cross_section width is different between mzi and pad.

False
kwargs Any

routing settings.

{}
Source code in gdsfactory/components/mzis/mzi_pads_center.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@gf.cell_with_module_name(schematic_function=ckt_schematic, tags=["mzis"])
def 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",
    auto_taper: bool = False,
    **kwargs: Any,
) -> gf.Component:
    """Return Mzi phase shifter with pads in the middle.

    GND is the middle pad and is shared between top and bottom phase shifters.

    Args:
        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.
        auto_taper: add taper if cross_section width is different between mzi and pad.
        kwargs: routing settings.
    """
    return cf.mzi_pads_center(
        ps_top=ps_top,
        ps_bot=ps_bot,
        mzi=mzi,
        pad=pad,
        length_x=length_x,
        length_y=length_y,
        mzi_sig_top=mzi_sig_top,
        mzi_gnd_top=mzi_gnd_top,
        mzi_sig_bot=mzi_sig_bot,
        mzi_gnd_bot=mzi_gnd_bot,
        pad_sig_bot=pad_sig_bot,
        pad_sig_top=pad_sig_top,
        pad_gnd_bot=pad_gnd_bot,
        pad_gnd_top=pad_gnd_top,
        delta_length=delta_length,
        cross_section=cross_section,
        cross_section_metal=cross_section_metal,
        pad_pitch=pad_pitch,
        auto_taper=auto_taper,
        **kwargs,
    )

mzi_pads_center

mzi_phase_shifter module-attribute

mzi_phase_shifter = CellAlias(
    mzi,
    straight_x_top="straight_heater_metal",
    length_x=200,
)

mzi_phase_shifter

mzi_phase_shifter_top_heater_metal module-attribute

mzi_phase_shifter_top_heater_metal = CellAlias(
    mzi_phase_shifter,
    straight_x_top="straight_heater_metal",
)

mzi_phase_shifter_top_heater_metal

mzi_pin module-attribute

mzi_pin = CellAlias(
    mzi,
    straight_x_top="straight_pin",
    cross_section_x_top="pin",
    delta_length=0.0,
    length_x=100,
)

mzi_pin

mzit

mzit

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

Mzi tolerant to fabrication variations.

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

Parameters:

Name Type Description Default
w0 float

input waveguide width (um).

0.5
w1 float

narrow waveguide width (um).

0.45
w2 float

wide waveguide width (um).

0.55
dy Delta

port to port vertical spacing.

2.0
delta_length float

length difference between arms (um).

10.0
length float

shared length for w1 and w2.

1.0
coupler_length1 float

length of coupler1.

5.0
coupler_length2 float

length of coupler2.

10.0
coupler_gap1 float

coupler1.

0.2
coupler_gap2 float

coupler2.

0.3
taper ComponentSpec

taper spec.

'taper'
taper_length float

from w0 to w1.

5.0
bend90 ComponentSpec

bend spec.

'bend_euler'
straight ComponentSpec

spec.

'straight'
coupler1 ComponentSpec | None

coupler1 spec (optional).

'coupler'
coupler2 ComponentSpec

coupler2 spec.

'coupler'
cross_section str

cross_section spec.

'strip'
                       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
Source code in gdsfactory/components/mzis/mzit.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
@gf.cell_with_module_name(schematic_function=mzi_2x2_schematic, tags=["mzis"])
def 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:
    r"""Mzi tolerant to fabrication variations.

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

    Args:
        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.

    ```text
                           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
    ```


    """
    return cf.mzit(
        w0=w0,
        w1=w1,
        w2=w2,
        dy=dy,
        delta_length=delta_length,
        length=length,
        coupler_length1=coupler_length1,
        coupler_length2=coupler_length2,
        coupler_gap1=coupler_gap1,
        coupler_gap2=coupler_gap2,
        taper=taper,
        taper_length=taper_length,
        bend90=bend90,
        straight=straight,
        coupler1=coupler1,
        coupler2=coupler2,
        cross_section=cross_section,
    )

mzit_lattice

mzit_lattice(
    coupler_lengths: Sequence[float] = (10.0, 20.0),
    coupler_gaps: Sequence[float] = (0.2, 0.3),
    delta_lengths: Sequence[float] = (10.0,),
    mzi: ComponentSpec = "mzit",
) -> Component

Mzi fab tolerant lattice filter.

Parameters:

Name Type Description Default
coupler_lengths Sequence[float]

list of coupler lengths, in um. One per coupler.

(10.0, 20.0)
coupler_gaps Sequence[float]

list of coupler gaps, in um. One per coupler.

(0.2, 0.3)
delta_lengths Sequence[float]

list of length differences between the MZI arms, in um. One per MZI, so one less than the number of couplers.

(10.0,)
mzi ComponentSpec

MZI component spec.

'mzit'
                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
Source code in gdsfactory/components/mzis/mzit.py
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
@gf.cell_with_module_name(schematic_function=mzi_2x2_schematic, tags=["mzis"])
def mzit_lattice(
    coupler_lengths: Sequence[float] = (10.0, 20.0),
    coupler_gaps: Sequence[float] = (0.2, 0.3),
    delta_lengths: Sequence[float] = (10.0,),
    mzi: ComponentSpec = "mzit",
) -> Component:
    r"""Mzi fab tolerant lattice filter.

    Args:
        coupler_lengths: list of coupler lengths, in um. One per coupler.
        coupler_gaps: list of coupler gaps, in um. One per coupler.
        delta_lengths: list of length differences between the MZI arms, in um.
            One per MZI, so one less than the number of couplers.
        mzi: MZI component spec.

    ```text
                    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
    ```


    """
    return cf.mzit_lattice(
        coupler_lengths=coupler_lengths,
        coupler_gaps=coupler_gaps,
        delta_lengths=delta_lengths,
        mzi=mzi,
    )

mzit

mzit_lattice

mzit_lattice(
    coupler_lengths: Sequence[float] = (10.0, 20.0),
    coupler_gaps: Sequence[float] = (0.2, 0.3),
    delta_lengths: Sequence[float] = (10.0,),
    mzi: ComponentSpec = "mzit",
) -> Component

Mzi fab tolerant lattice filter.

Parameters:

Name Type Description Default
coupler_lengths Sequence[float]

list of coupler lengths, in um. One per coupler.

(10.0, 20.0)
coupler_gaps Sequence[float]

list of coupler gaps, in um. One per coupler.

(0.2, 0.3)
delta_lengths Sequence[float]

list of length differences between the MZI arms, in um. One per MZI, so one less than the number of couplers.

(10.0,)
mzi ComponentSpec

MZI component spec.

'mzit'
                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
Source code in gdsfactory/components/mzis/mzit.py
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
@gf.cell_with_module_name(schematic_function=mzi_2x2_schematic, tags=["mzis"])
def mzit_lattice(
    coupler_lengths: Sequence[float] = (10.0, 20.0),
    coupler_gaps: Sequence[float] = (0.2, 0.3),
    delta_lengths: Sequence[float] = (10.0,),
    mzi: ComponentSpec = "mzit",
) -> Component:
    r"""Mzi fab tolerant lattice filter.

    Args:
        coupler_lengths: list of coupler lengths, in um. One per coupler.
        coupler_gaps: list of coupler gaps, in um. One per coupler.
        delta_lengths: list of length differences between the MZI arms, in um.
            One per MZI, so one less than the number of couplers.
        mzi: MZI component spec.

    ```text
                    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
    ```


    """
    return cf.mzit_lattice(
        coupler_lengths=coupler_lengths,
        coupler_gaps=coupler_gaps,
        delta_lengths=delta_lengths,
        mzi=mzi,
    )

mzit_lattice

mzm module-attribute

mzm = CellAlias(
    mzi_phase_shifter,
    straight_x_top="straight_pin",
    straight_x_bot="straight_pin",
)

mzm

pads

bump_pad

bump_pad

bump_pad(
    size: float = 36.244,
    layer: LayerSpec = "MTOP",
    port_width: float = 10.0,
    port_layer: LayerSpec = "M2",
    port_type: str = "pad",
    add_via: bool = True,
) -> Component

Returns rectangular pad with ports.

Parameters:

Name Type Description Default
size float

octagon edge of octagon.

36.244
layer LayerSpec

bump pad layer.

'MTOP'
port_width float

width of the port for electrical routing.

10.0
port_layer LayerSpec

layer of the port for electrical routing.

'M2'
port_type str

port type for pad port.

'pad'
add_via bool

whether to add a via stack.

True
Source code in gdsfactory/components/pads/bump_pad.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@gf.cell_with_module_name(tags=["pads"])
def bump_pad(
    size: float = 36.244,
    layer: LayerSpec = "MTOP",
    port_width: float = 10.0,
    port_layer: LayerSpec = "M2",
    port_type: str = "pad",
    add_via: bool = True,
) -> Component:
    """Returns rectangular pad with ports.

    Args:
        size: octagon edge of octagon.
        layer: bump pad layer.
        port_width: width of the port for electrical routing.
        port_layer: layer of the port for electrical routing.
        port_type: port type for pad port.
        add_via: whether to add a via stack.
    """
    return cf.bump_pad(
        size=size,
        layer=layer,
        port_width=port_width,
        port_layer=port_layer,
        port_type=port_type,
        add_via=add_via,
    )

bump_pad_grid

bump_pad_grid(
    columns: int = 6,
    rows: int = 6,
    column_pitch: float = 121.89,
    row_pitch: float = 132.66,
    offset: float = 66.33,
    port_width: float = 10,
    port_layer: LayerSpec = "M2",
    size: float = 36.244,
    layer: LayerSpec = "MTOP",
    auto_rename_ports: bool = False,
    skip_pads: list[tuple[int, int]] | None = None,
    add_via: bool = True,
) -> Component

Returns 2D array of bump pads.

Parameters:

Name Type Description Default
columns int

number of columns.

6
rows int

number of rows.

6
column_pitch float

x pitch.

121.89
row_pitch float

y pitch.

132.66
offset float

offset for alternating columns.

66.33
port_width float

width of the port for electrical routing.

10
port_layer LayerSpec

layer of the port for electrical routing.

'M2'
size float

pad size.

36.244
layer LayerSpec

bump pad layer.

'MTOP'
auto_rename_ports bool

True to auto rename ports.

False
skip_pads list[tuple[int, int]] | None

list of (col, row) tuples to skip.

None
add_via bool

whether to add a via stack.

True
Source code in gdsfactory/components/pads/bump_pad.py
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
@gf.cell_with_module_name(tags=["pads"])
def bump_pad_grid(
    columns: int = 6,
    rows: int = 6,
    column_pitch: float = 121.89,
    row_pitch: float = 132.66,
    offset: float = 66.33,
    port_width: float = 10,
    port_layer: LayerSpec = "M2",
    size: float = 36.244,
    layer: LayerSpec = "MTOP",
    auto_rename_ports: bool = False,
    skip_pads: list[tuple[int, int]] | None = None,
    add_via: bool = True,
) -> Component:
    """Returns 2D array of bump pads.

    Args:
        columns: number of columns.
        rows: number of rows.
        column_pitch: x pitch.
        row_pitch: y pitch.
        offset: offset for alternating columns.
        port_width: width of the port for electrical routing.
        port_layer: layer of the port for electrical routing.
        size: pad size.
        layer: bump pad layer.
        auto_rename_ports: True to auto rename ports.
        skip_pads: list of (col, row) tuples to skip.
        add_via: whether to add a via stack.
    """
    return cf.bump_pad_grid(
        columns=columns,
        rows=rows,
        column_pitch=column_pitch,
        row_pitch=row_pitch,
        offset=offset,
        port_width=port_width,
        port_layer=port_layer,
        size=size,
        layer=layer,
        auto_rename_ports=auto_rename_ports,
        skip_pads=skip_pads,
        add_via=add_via,
    )

bump_pad

bump_pad_grid

bump_pad_grid(
    columns: int = 6,
    rows: int = 6,
    column_pitch: float = 121.89,
    row_pitch: float = 132.66,
    offset: float = 66.33,
    port_width: float = 10,
    port_layer: LayerSpec = "M2",
    size: float = 36.244,
    layer: LayerSpec = "MTOP",
    auto_rename_ports: bool = False,
    skip_pads: list[tuple[int, int]] | None = None,
    add_via: bool = True,
) -> Component

Returns 2D array of bump pads.

Parameters:

Name Type Description Default
columns int

number of columns.

6
rows int

number of rows.

6
column_pitch float

x pitch.

121.89
row_pitch float

y pitch.

132.66
offset float

offset for alternating columns.

66.33
port_width float

width of the port for electrical routing.

10
port_layer LayerSpec

layer of the port for electrical routing.

'M2'
size float

pad size.

36.244
layer LayerSpec

bump pad layer.

'MTOP'
auto_rename_ports bool

True to auto rename ports.

False
skip_pads list[tuple[int, int]] | None

list of (col, row) tuples to skip.

None
add_via bool

whether to add a via stack.

True
Source code in gdsfactory/components/pads/bump_pad.py
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
@gf.cell_with_module_name(tags=["pads"])
def bump_pad_grid(
    columns: int = 6,
    rows: int = 6,
    column_pitch: float = 121.89,
    row_pitch: float = 132.66,
    offset: float = 66.33,
    port_width: float = 10,
    port_layer: LayerSpec = "M2",
    size: float = 36.244,
    layer: LayerSpec = "MTOP",
    auto_rename_ports: bool = False,
    skip_pads: list[tuple[int, int]] | None = None,
    add_via: bool = True,
) -> Component:
    """Returns 2D array of bump pads.

    Args:
        columns: number of columns.
        rows: number of rows.
        column_pitch: x pitch.
        row_pitch: y pitch.
        offset: offset for alternating columns.
        port_width: width of the port for electrical routing.
        port_layer: layer of the port for electrical routing.
        size: pad size.
        layer: bump pad layer.
        auto_rename_ports: True to auto rename ports.
        skip_pads: list of (col, row) tuples to skip.
        add_via: whether to add a via stack.
    """
    return cf.bump_pad_grid(
        columns=columns,
        rows=rows,
        column_pitch=column_pitch,
        row_pitch=row_pitch,
        offset=offset,
        port_width=port_width,
        port_layer=port_layer,
        size=size,
        layer=layer,
        auto_rename_ports=auto_rename_ports,
        skip_pads=skip_pads,
        add_via=add_via,
    )

bump_pad_grid

pad

pad

pad(
    size: Size | str = (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: AngleInDegrees | None = 0,
    port_orientations: Ints | None = (180, 90, 0, -90),
    port_type: str = "pad",
) -> Component

Returns rectangular pad with ports.

Parameters:

Name Type Description Default
size Size | str

x, y size.

(100.0, 100.0)
layer LayerSpec

pad layer.

'MTOP'
bbox_layers tuple[LayerSpec, ...] | None

list of layers.

None
bbox_offsets tuple[float, ...] | None

Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.

None
port_inclusion float

from edge.

0
port_orientation AngleInDegrees | None

in degrees for the center port.

0
port_orientations Ints | None

list of port_orientations to add. None does not add ports.

(180, 90, 0, -90)
port_type str

port type for pad port.

'pad'
Source code in gdsfactory/components/pads/pad.py
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@gf.cell_with_module_name(schematic_function=pad_schematic, tags=["pads"])
def pad(
    size: Size | str = (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: AngleInDegrees | None = 0,
    port_orientations: Ints | None = (180, 90, 0, -90),
    port_type: str = "pad",
) -> Component:
    """Returns rectangular pad with ports.

    Args:
        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.
    """
    return cf.pad(
        size=size,
        layer=layer,
        bbox_layers=bbox_layers,
        bbox_offsets=bbox_offsets,
        port_inclusion=port_inclusion,
        port_orientation=port_orientation,
        port_orientations=port_orientations,
        port_type=port_type,
    )

pad_array

pad_array(
    pad: ComponentSpec = "pad",
    columns: int = 6,
    rows: int = 1,
    column_pitch: float = 150.0,
    row_pitch: float = 150.0,
    port_orientation: AngleInDegrees = 0,
    size: Float2 | None = None,
    layer: LayerSpec | None = "MTOP",
    centered_ports: bool = False,
    auto_rename_ports: bool = False,
) -> Component

Returns 2D array of pads.

Parameters:

Name Type Description Default
pad ComponentSpec

pad element.

'pad'
columns int

number of columns.

6
rows int

number of rows.

1
column_pitch float

x pitch.

150.0
row_pitch float

y pitch.

150.0
port_orientation AngleInDegrees

port orientation in deg. None for low speed DC ports.

0
size Float2 | None

pad size.

None
layer LayerSpec | None

pad layer.

'MTOP'
centered_ports bool

True add ports to center. False add ports to the edge.

False
auto_rename_ports bool

True to auto rename ports.

False
Source code in gdsfactory/components/pads/pad.py
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@gf.cell_with_module_name(schematic_function=pad_schematic, tags=["pads"])
def pad_array(
    pad: ComponentSpec = "pad",
    columns: int = 6,
    rows: int = 1,
    column_pitch: float = 150.0,
    row_pitch: float = 150.0,
    port_orientation: AngleInDegrees = 0,
    size: Float2 | None = None,
    layer: LayerSpec | None = "MTOP",
    centered_ports: bool = False,
    auto_rename_ports: bool = False,
) -> Component:
    """Returns 2D array of pads.

    Args:
        pad: pad element.
        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.
        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.
    """
    return cf.pad_array(
        pad=pad,
        columns=columns,
        rows=rows,
        column_pitch=column_pitch,
        row_pitch=row_pitch,
        port_orientation=port_orientation,
        size=size,
        layer=layer,
        centered_ports=centered_ports,
        auto_rename_ports=auto_rename_ports,
    )

pad

pad_array

pad_array(
    pad: ComponentSpec = "pad",
    columns: int = 6,
    rows: int = 1,
    column_pitch: float = 150.0,
    row_pitch: float = 150.0,
    port_orientation: AngleInDegrees = 0,
    size: Float2 | None = None,
    layer: LayerSpec | None = "MTOP",
    centered_ports: bool = False,
    auto_rename_ports: bool = False,
) -> Component

Returns 2D array of pads.

Parameters:

Name Type Description Default
pad ComponentSpec

pad element.

'pad'
columns int

number of columns.

6
rows int

number of rows.

1
column_pitch float

x pitch.

150.0
row_pitch float

y pitch.

150.0
port_orientation AngleInDegrees

port orientation in deg. None for low speed DC ports.

0
size Float2 | None

pad size.

None
layer LayerSpec | None

pad layer.

'MTOP'
centered_ports bool

True add ports to center. False add ports to the edge.

False
auto_rename_ports bool

True to auto rename ports.

False
Source code in gdsfactory/components/pads/pad.py
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
@gf.cell_with_module_name(schematic_function=pad_schematic, tags=["pads"])
def pad_array(
    pad: ComponentSpec = "pad",
    columns: int = 6,
    rows: int = 1,
    column_pitch: float = 150.0,
    row_pitch: float = 150.0,
    port_orientation: AngleInDegrees = 0,
    size: Float2 | None = None,
    layer: LayerSpec | None = "MTOP",
    centered_ports: bool = False,
    auto_rename_ports: bool = False,
) -> Component:
    """Returns 2D array of pads.

    Args:
        pad: pad element.
        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.
        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.
    """
    return cf.pad_array(
        pad=pad,
        columns=columns,
        rows=rows,
        column_pitch=column_pitch,
        row_pitch=row_pitch,
        port_orientation=port_orientation,
        size=size,
        layer=layer,
        centered_ports=centered_ports,
        auto_rename_ports=auto_rename_ports,
    )

pad_array

pad_array0 module-attribute

pad_array0 = CellAlias(
    pad_array, port_orientation=0, columns=1, rows=3
)

pad_array0

pad_array180 module-attribute

pad_array180 = CellAlias(
    pad_array, port_orientation=180, columns=1, rows=3
)

pad_array180

pad_array270 module-attribute

pad_array270 = CellAlias(pad_array, port_orientation=270)

pad_array270

pad_array90 module-attribute

pad_array90 = CellAlias(pad_array, port_orientation=90)

pad_array90

pad_gs

pad_gs(
    length: float = 100, cross_section: str = "gs"
) -> gf.Component

Returns a ground-signal pad.

Parameters:

Name Type Description Default
length float

length of the GS transmission line, in um.

100
cross_section str

GS cross_section spec.

'gs'
Source code in gdsfactory/components/pads/pad_gsg.py
65
66
67
68
69
70
71
72
73
74
75
76
@gf.cell_with_module_name(tags=["pads"])
def pad_gs(length: float = 100, cross_section: str = "gs") -> gf.Component:
    """Returns a ground-signal pad.

    Args:
        length: length of the GS transmission line, in um.
        cross_section: GS cross_section spec.
    """
    return cf.pad_gs(
        length=length,
        cross_section=cross_section,
    )

pad_gs

pad_gsg

High speed GSG pads.

pad_gs

pad_gs(
    length: float = 100, cross_section: str = "gs"
) -> gf.Component

Returns a ground-signal pad.

Parameters:

Name Type Description Default
length float

length of the GS transmission line, in um.

100
cross_section str

GS cross_section spec.

'gs'
Source code in gdsfactory/components/pads/pad_gsg.py
65
66
67
68
69
70
71
72
73
74
75
76
@gf.cell_with_module_name(tags=["pads"])
def pad_gs(length: float = 100, cross_section: str = "gs") -> gf.Component:
    """Returns a ground-signal pad.

    Args:
        length: length of the GS transmission line, in um.
        cross_section: GS cross_section spec.
    """
    return cf.pad_gs(
        length=length,
        cross_section=cross_section,
    )

pad_gsg

pad_gsg(
    length: float = 100, cross_section: str = "gsg"
) -> gf.Component

Returns a ground-signal-ground pad with electrical pins.

Parameters:

Name Type Description Default
length float

length of the GSG transmission line, in um.

100
cross_section str

GSG cross_section spec.

'gsg'
Source code in gdsfactory/components/pads/pad_gsg.py
51
52
53
54
55
56
57
58
59
60
61
62
@gf.cell_with_module_name(schematic_function=pad_schematic, tags=["pads"])
def pad_gsg(length: float = 100, cross_section: str = "gsg") -> gf.Component:
    """Returns a ground-signal-ground pad with electrical pins.

    Args:
        length: length of the GSG transmission line, in um.
        cross_section: GSG cross_section spec.
    """
    return cf.pad_gsg(
        length=length,
        cross_section=cross_section,
    )

pad_gsg_short

pad_gsg_short(
    size: Float2 = (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,
) -> gf.Component

Returns high speed GSG pads for calibrating the RF probes.

Parameters:

Name Type Description Default
size Float2

for the short.

(22, 7)
layer_metal LayerSpec

for the short.

'MTOP'
metal_spacing float

in um.

5.0
short bool

if False returns an open.

True
pad ComponentSpec

function for pad.

'pad'
pad_pitch float

in um.

150
route_xsize float

in um.

50
Source code in gdsfactory/components/pads/pad_gsg.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@gf.cell_with_module_name(tags=["pads"])
def pad_gsg_short(
    size: Float2 = (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,
) -> gf.Component:
    """Returns high speed GSG pads for calibrating the RF probes.

    Args:
        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.
    """
    return cf.pad_gsg_short(
        size=size,
        layer_metal=layer_metal,
        metal_spacing=metal_spacing,
        short=short,
        pad=pad,
        pad_pitch=pad_pitch,
        route_xsize=route_xsize,
    )

pad_gsg

pad_gsg_open module-attribute

pad_gsg_open = CellAlias(pad_gsg_short, short=False)

pad_gsg_open

pad_gsg_short

pad_gsg_short(
    size: Float2 = (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,
) -> gf.Component

Returns high speed GSG pads for calibrating the RF probes.

Parameters:

Name Type Description Default
size Float2

for the short.

(22, 7)
layer_metal LayerSpec

for the short.

'MTOP'
metal_spacing float

in um.

5.0
short bool

if False returns an open.

True
pad ComponentSpec

function for pad.

'pad'
pad_pitch float

in um.

150
route_xsize float

in um.

50
Source code in gdsfactory/components/pads/pad_gsg.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@gf.cell_with_module_name(tags=["pads"])
def pad_gsg_short(
    size: Float2 = (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,
) -> gf.Component:
    """Returns high speed GSG pads for calibrating the RF probes.

    Args:
        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.
    """
    return cf.pad_gsg_short(
        size=size,
        layer_metal=layer_metal,
        metal_spacing=metal_spacing,
        short=short,
        pad=pad,
        pad_pitch=pad_pitch,
        route_xsize=route_xsize,
    )

pad_gsg_short

pad_rectangular module-attribute

pad_rectangular = CellAlias(pad, size='pad_size')

pad_rectangular

pad_small module-attribute

pad_small = CellAlias(pad, size=(80, 80))

pad_small

pads_shorted

pads_shorted

pads_shorted(
    pad: ComponentSpec = "pad",
    columns: int = 8,
    pad_pitch: float = 150.0,
    layer_metal: LayerSpec = "MTOP",
    metal_width: float = 10,
) -> Component

Returns a 1D array of shorted_pads.

Parameters:

Name Type Description Default
pad ComponentSpec

pad spec.

'pad'
columns int

number of columns.

8
pad_pitch float

in um

150.0
layer_metal LayerSpec

for the short.

'MTOP'
metal_width float

for the short.

10
Source code in gdsfactory/components/pads/pads_shorted.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@gf.cell_with_module_name(tags=["pads"])
def pads_shorted(
    pad: ComponentSpec = "pad",
    columns: int = 8,
    pad_pitch: float = 150.0,
    layer_metal: LayerSpec = "MTOP",
    metal_width: float = 10,
) -> Component:
    """Returns a 1D array of shorted_pads.

    Args:
        pad: pad spec.
        columns: number of columns.
        pad_pitch: in um
        layer_metal: for the short.
        metal_width: for the short.
    """
    return cf.pads_shorted(
        pad=pad,
        columns=columns,
        pad_pitch=pad_pitch,
        layer_metal=layer_metal,
        metal_width=metal_width,
    )

pads_shorted

rectangle_with_slits

rectangle_with_slits

rectangle_with_slits(
    size: Size = (100.0, 200.0),
    layer: LayerSpec = "WG",
    layer_slit: LayerSpec | None = None,
    centered: bool = False,
    port_type: str | None = None,
    slit_size: Size = (1.0, 1.0),
    slit_column_pitch: float = 20,
    slit_row_pitch: float = 20,
    slit_enclosure: float = 10,
) -> Component

Returns a rectangle with slits.

Metal slits reduce stress.

Parameters:

Name Type Description Default
size Size

(tuple) Width and height of rectangle.

(100.0, 200.0)
layer LayerSpec

Specific layer to put polygon geometry on.

'WG'
layer_slit LayerSpec | None

does a boolean NOT when None.

None
centered bool

True sets center to (0, 0), False sets south-west to (0, 0)

False
port_type str | None

for the rectangle.

None
slit_size Size

x, y slit size.

(1.0, 1.0)
slit_column_pitch float

pitch for columns of slits.

20
slit_row_pitch float

pitch for rows of slits.

20
slit_enclosure float

from slit to rectangle edge.

10
    slit_enclosure
    _____________________________________
    |<--->                              |
    |                                   |
    |      ______________________       |
    |     |                      |      |
    |     |                      | slit_size[1]
    |  _  |______________________|      |
    |  |                                |
    |  | slit_row_pitch                 |
    |  |                                |  size[1]
    |  |   ______________________       |
    |  |  |                      |      |
    |  |  |                      |      |
    |  _  |______________________|      |
    |     <--------------------->       |
    |            slit_size[0]           |
    |___________________________________|
                    size[0]
Source code in gdsfactory/components/pads/rectangle_with_slits.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@gf.cell_with_module_name(tags=["pads"])
def rectangle_with_slits(
    size: Size = (100.0, 200.0),
    layer: LayerSpec = "WG",
    layer_slit: LayerSpec | None = None,
    centered: bool = False,
    port_type: str | None = None,
    slit_size: Size = (1.0, 1.0),
    slit_column_pitch: float = 20,
    slit_row_pitch: float = 20,
    slit_enclosure: float = 10,
) -> Component:
    """Returns a rectangle with slits.

    Metal slits reduce stress.

    Args:
        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_column_pitch: pitch for columns of slits.
        slit_row_pitch: pitch for rows of slits.
        slit_enclosure: from slit to rectangle edge.

    ```text
        slit_enclosure
        _____________________________________
        |<--->                              |
        |                                   |
        |      ______________________       |
        |     |                      |      |
        |     |                      | slit_size[1]
        |  _  |______________________|      |
        |  |                                |
        |  | slit_row_pitch                 |
        |  |                                |  size[1]
        |  |   ______________________       |
        |  |  |                      |      |
        |  |  |                      |      |
        |  _  |______________________|      |
        |     <--------------------->       |
        |            slit_size[0]           |
        |___________________________________|
                        size[0]
    ```
    """
    return cf.rectangle_with_slits(
        size=size,
        layer=layer,
        layer_slit=layer_slit,
        centered=centered,
        port_type=port_type,
        slit_size=slit_size,
        slit_column_pitch=slit_column_pitch,
        slit_row_pitch=slit_row_pitch,
        slit_enclosure=slit_enclosure,
    )

rectangle_with_slits

pcms

alignment_mark_cross

alignment_mark_cross

alignment_mark_cross(
    arm_width: float = 2.0,
    arm_length: float = 20.0,
    layer: LayerSpec = "WG",
    port_type: str | None = None,
) -> Component

Custom alignment cross mark for lithography alignment.

Creates a cross shape centered at the origin composed of two overlapping rectangles (horizontal and vertical arms).

Parameters:

Name Type Description Default
arm_width float

Width of each arm in um.

2.0
arm_length float

Length of each arm in um (full extent from tip to tip is 2 * arm_length).

20.0
layer LayerSpec

Layer specification for the cross geometry.

'WG'
port_type str | None

Optional port type. If provided, ports are added at the four arm tips.

None
Source code in gdsfactory/components/pcms/alignment_mark_cross.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@gf.cell_with_module_name(tags=["pcms"])
def alignment_mark_cross(
    arm_width: float = 2.0,
    arm_length: float = 20.0,
    layer: LayerSpec = "WG",
    port_type: str | None = None,
) -> Component:
    """Custom alignment cross mark for lithography alignment.

    Creates a cross shape centered at the origin composed of two
    overlapping rectangles (horizontal and vertical arms).

    Args:
        arm_width: Width of each arm in um.
        arm_length: Length of each arm in um (full extent from tip to tip
            is 2 * arm_length).
        layer: Layer specification for the cross geometry.
        port_type: Optional port type. If provided, ports are added at the
            four arm tips.
    """
    return cf.alignment_mark_cross(
        arm_width=arm_width,
        arm_length=arm_length,
        layer=layer,
        port_type=port_type,
    )

alignment_mark_cross

bendu_double

bendu_double(
    component: Component,
    cross_section: CrossSectionSpec = "strip",
    bend180: ComponentSpec = "bend_circular180",
    port1: str = "o1",
    port2: str = "o2",
) -> Component

Returns double bend.

Parameters:

Name Type Description Default
component Component

for cutback.

required
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
bend180 ComponentSpec

ubend.

'bend_circular180'
port1 str

name of first optical port.

'o1'
port2 str

name of second optical port.

'o2'
Source code in gdsfactory/components/pcms/cutback_2x2.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@gf.cell_with_module_name(tags=["pcms"])
def bendu_double(
    component: Component,
    cross_section: CrossSectionSpec = "strip",
    bend180: ComponentSpec = "bend_circular180",
    port1: str = "o1",
    port2: str = "o2",
) -> Component:
    """Returns double bend.

    Args:
        component: for cutback.
        cross_section: specification (CrossSection, string or dict).
        bend180: ubend.
        port1: name of first optical port.
        port2: name of second optical port.
    """
    return cf.bendu_double(
        component=component,
        cross_section=cross_section,
        bend180=bend180,
        port1=port1,
        port2=port2,
    )
import gdsfactory as gf

gf.gpdk.PDK.activate()

c = gf.components.bendu_double(cross_section='strip', bend180='bend_circular180', port1='o1', port2='o2').copy()
c.draw_ports()
c.plot()

cavity

cavity

cavity(
    component: ComponentSpec = "dbr",
    coupler: ComponentSpec = "coupler",
    length: float = 0.1,
    gap: float = 0.2,
    **kwargs: Any
) -> Component

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:

Name Type Description Default
component ComponentSpec

mirror.

'dbr'
coupler ComponentSpec

coupler library.

'coupler'
length float

coupler length.

0.1
gap float

coupler gap.

0.2
kwargs Any

coupler_settings.

{}
  ml (mirror left)              mr (mirror right)
   |                               |
   |o1 - o2__             __o3 - o1|
   |         \           /         |
              \         /
            ---=========---
     o1  o1    length      o4    o2
Source code in gdsfactory/components/pcms/cavity.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@gf.cell_with_module_name(tags=["pcms"])
def cavity(
    component: ComponentSpec = "dbr",
    coupler: ComponentSpec = "coupler",
    length: float = 0.1,
    gap: float = 0.2,
    **kwargs: Any,
) -> Component:
    r"""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

    Args:
        component: mirror.
        coupler: coupler library.
        length: coupler length.
        gap: coupler gap.
        kwargs: coupler_settings.

    ```text
      ml (mirror left)              mr (mirror right)
       |                               |
       |o1 - o2__             __o3 - o1|
       |         \           /         |
                  \         /
                ---=========---
         o1  o1    length      o4    o2
    ```

    """
    return cf.cavity(
        component=component,
        coupler=coupler,
        length=length,
        gap=gap,
        **kwargs,
    )

cavity

cdsem_all

CD SEM structures.

cdsem_all

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

Column with all optical PCMs.

Parameters:

Name Type Description Default
widths tuple[float, ...]

for straight lines.

(0.4, 0.45, 0.5, 0.6, 0.8, 1.0)
dense_lines_width float | None

in um.

0.3
dense_lines_width_difference float

in um.

0.02
dense_lines_gap float

in um.

0.3
dense_lines_labels tuple[str, ...]

strings.

('DL', 'DM', 'DH')
straight ComponentSpec

spec.

'straight'
bend90 ComponentSpec | None

spec.

'bend_circular'
cross_section CrossSectionSpec

spec.

'strip'
text ComponentSpec

spec.

'text_rectangular'
spacing float

from group to group.

5
cdsem_bend180 ComponentSpec

spec.

'cdsem_bend180'
text_size float

in um.

1
Source code in gdsfactory/components/pcms/cdsem_all.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@gf.cell_with_module_name(tags=["pcms"])
def 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 = 20e-3,
    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:
    """Column with all optical PCMs.

    Args:
        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.
    """
    return cf.cdsem_all(
        widths=widths,
        dense_lines_width=dense_lines_width,
        dense_lines_width_difference=dense_lines_width_difference,
        dense_lines_gap=dense_lines_gap,
        dense_lines_labels=dense_lines_labels,
        straight=straight,
        bend90=bend90,
        cross_section=cross_section,
        text=text,
        spacing=spacing,
        cdsem_bend180=cdsem_bend180,
        text_size=text_size,
    )

cdsem_all

cdsem_bend180

CD SEM structures.

cdsem_bend180

cdsem_bend180(
    width: float = 0.5,
    radius: float = 10.0,
    wg_length: float | None = LINE_LENGTH,
    straight: ComponentSpec = "straight",
    bend90: ComponentSpec = "bend_circular",
    cross_section: CrossSectionSpec = "strip",
    text: ComponentSpec = "text_rectangular",
    text_size: float = 1.0,
) -> Component

Returns CDSEM structures.

Parameters:

Name Type Description Default
width float

of the line.

0.5
radius float

um.

10.0
wg_length float | None

in um.

LINE_LENGTH
straight ComponentSpec

spec.

'straight'
bend90 ComponentSpec

spec.

'bend_circular'
cross_section CrossSectionSpec

spec.

'strip'
text ComponentSpec

spec.

'text_rectangular'
text_size float

um.

1.0
Source code in gdsfactory/components/pcms/cdsem_bend180.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@gf.cell_with_module_name(tags=["pcms"])
def cdsem_bend180(
    width: float = 0.5,
    radius: float = 10.0,
    wg_length: float | None = LINE_LENGTH,
    straight: ComponentSpec = "straight",
    bend90: ComponentSpec = "bend_circular",
    cross_section: CrossSectionSpec = "strip",
    text: ComponentSpec = "text_rectangular",
    text_size: float = 1.0,
) -> Component:
    """Returns CDSEM structures.

    Args:
        width: of the line.
        radius: um.
        wg_length: in um.
        straight: spec.
        bend90: spec.
        cross_section: spec.
        text: spec.
        text_size: um.
    """
    return cf.cdsem_bend180(
        width=width,
        radius=radius,
        wg_length=wg_length,
        straight=straight,
        bend90=bend90,
        cross_section=cross_section,
        text=text,
        text_size=text_size,
    )

cdsem_bend180

cdsem_coupler

CD SEM structures.

cdsem_coupler

cdsem_coupler(
    length: float = 420.0,
    gaps: Sequence[float] = (0.15, 0.2, 0.25),
    cross_section: CrossSectionSpec = "strip",
    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

Returns 2 coupled waveguides gap sweep.

Parameters:

Name Type Description Default
length float

for the line.

420.0
gaps Sequence[float]

list of gaps for the sweep.

(0.15, 0.2, 0.25)
cross_section CrossSectionSpec

for the lines.

'strip'
text ComponentSpec | None

optional text for labels.

'text_rectangular'
spacing float

Optional center to center spacing.

7.0
positions Sequence[float | None] | None

Optional positions for the text labels.

None
width float | None

width of the waveguide. If None, it will use the width of the cross_section.

None
text_size float

size of the text.

1.0
Source code in gdsfactory/components/pcms/cdsem_coupler.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@gf.cell_with_module_name(tags=["pcms"])
def cdsem_coupler(
    length: float = 420.0,
    gaps: Sequence[float] = (0.15, 0.2, 0.25),
    cross_section: CrossSectionSpec = "strip",
    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:
    """Returns 2 coupled waveguides gap sweep.

    Args:
        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.
    """
    return cf.cdsem_coupler(
        length=length,
        gaps=gaps,
        cross_section=cross_section,
        text=text,
        spacing=spacing,
        positions=positions,
        width=width,
        text_size=text_size,
    )

cdsem_coupler

cdsem_straight

CD SEM structures.

cdsem_straight

cdsem_straight(
    widths: Sequence[float] = (
        0.4,
        0.45,
        0.5,
        0.6,
        0.8,
        1.0,
    ),
    length: float = LINE_LENGTH,
    cross_section: CrossSectionSpec = "strip",
    text: ComponentSpec | None = "text_rectangular",
    spacing: float = 7.0,
    positions: Sequence[float | None] | None = None,
    text_size: float = 1,
) -> Component

Returns straight waveguide lines width sweep.

Parameters:

Name Type Description Default
widths Sequence[float]

for the sweep.

(0.4, 0.45, 0.5, 0.6, 0.8, 1.0)
length float

for the line.

LINE_LENGTH
cross_section CrossSectionSpec

for the lines.

'strip'
text ComponentSpec | None

optional text for labels.

'text_rectangular'
spacing float

Optional center to center spacing.

7.0
positions Sequence[float | None] | None

Optional positions for the text labels.

None
text_size float

in um.

1
Source code in gdsfactory/components/pcms/cdsem_straight.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@gf.cell_with_module_name(tags=["pcms"])
def cdsem_straight(
    widths: Sequence[float] = (0.4, 0.45, 0.5, 0.6, 0.8, 1.0),
    length: float = LINE_LENGTH,
    cross_section: CrossSectionSpec = "strip",
    text: ComponentSpec | None = "text_rectangular",
    spacing: float = 7.0,
    positions: Sequence[float | None] | None = None,
    text_size: float = 1,
) -> Component:
    """Returns straight waveguide lines width sweep.

    Args:
        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.
    """
    return cf.cdsem_straight(
        widths=widths,
        length=length,
        cross_section=cross_section,
        text=text,
        spacing=spacing,
        positions=positions,
        text_size=text_size,
    )

cdsem_straight

cdsem_straight_density

CD SEM structures.

cdsem_straight_density

cdsem_straight_density(
    widths: Floats = widths,
    gaps: Floats = gaps,
    length: float = 420.0,
    label: str = "",
    cross_section: CrossSectionSpec = "strip",
    text: ComponentSpec | None = "text_rectangular",
    text_size: float = 1.0,
) -> Component

Returns sweep of dense straight lines.

Parameters:

Name Type Description Default
widths Floats

list of widths.

widths
gaps Floats

list of gaps.

gaps
length float

of the lines.

420.0
label str

defaults to widths[0] gaps[0].

''
cross_section CrossSectionSpec

spec.

'strip'
text ComponentSpec | None

optional function for text.

'text_rectangular'
text_size float

size of the text.

1.0
Source code in gdsfactory/components/pcms/cdsem_straight_density.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@gf.cell_with_module_name(tags=["pcms"])
def cdsem_straight_density(
    widths: Floats = widths,
    gaps: Floats = gaps,
    length: float = 420.0,
    label: str = "",
    cross_section: CrossSectionSpec = "strip",
    text: ComponentSpec | None = "text_rectangular",
    text_size: float = 1.0,
) -> Component:
    """Returns sweep of dense straight lines.

    Args:
        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.
    """
    return cf.cdsem_straight_density(
        widths=widths,
        gaps=gaps,
        length=length,
        label=label,
        cross_section=cross_section,
        text=text,
        text_size=text_size,
    )

cdsem_straight_density

cutback_2x2

bendu_double

bendu_double(
    component: Component,
    cross_section: CrossSectionSpec = "strip",
    bend180: ComponentSpec = "bend_circular180",
    port1: str = "o1",
    port2: str = "o2",
) -> Component

Returns double bend.

Parameters:

Name Type Description Default
component Component

for cutback.

required
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
bend180 ComponentSpec

ubend.

'bend_circular180'
port1 str

name of first optical port.

'o1'
port2 str

name of second optical port.

'o2'
Source code in gdsfactory/components/pcms/cutback_2x2.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@gf.cell_with_module_name(tags=["pcms"])
def bendu_double(
    component: Component,
    cross_section: CrossSectionSpec = "strip",
    bend180: ComponentSpec = "bend_circular180",
    port1: str = "o1",
    port2: str = "o2",
) -> Component:
    """Returns double bend.

    Args:
        component: for cutback.
        cross_section: specification (CrossSection, string or dict).
        bend180: ubend.
        port1: name of first optical port.
        port2: name of second optical port.
    """
    return cf.bendu_double(
        component=component,
        cross_section=cross_section,
        bend180=bend180,
        port1=port1,
        port2=port2,
    )

cutback_2x2

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: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    straight: ComponentSpec = "straight",
) -> Component

Returns a daisy chain of splitters for measuring their loss.

Parameters:

Name Type Description Default
component ComponentSpec

for cutback.

'mmi2x2'
cols int

number of columns.

4
rows int

number of rows.

5
port1 str

name of first optical port.

'o1'
port2 str

name of second optical port.

'o2'
port3 str

name of third optical port.

'o3'
port4 str

name of fourth optical port.

'o4'
bend180 ComponentSpec

ubend.

'bend_circular180'
mirror bool

Flips component. Useful when 'o2' is the port that you want to route to.

False
straight_length float | None

length of the straight section between cutbacks.

None
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
straight ComponentSpec

straight spec.

'straight'
Source code in gdsfactory/components/pcms/cutback_2x2.py
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@gf.cell_with_module_name(tags=["pcms"])
def 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: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    straight: ComponentSpec = "straight",
) -> Component:
    """Returns a daisy chain of splitters for measuring their loss.

    Args:
        component: for cutback.
        cols: number of columns.
        rows: number of rows.
        port1: name of first optical port.
        port2: name of second optical port.
        port3: name of third optical port.
        port4: name of fourth optical port.
        bend180: ubend.
        mirror: Flips component. Useful when 'o2' is the port that you want to route to.
        straight_length: length of the straight section between cutbacks.
        cross_section: specification (CrossSection, string or dict).
        straight: straight spec.
    """
    return cf.cutback_2x2(
        component=component,
        cols=cols,
        rows=rows,
        port1=port1,
        port2=port2,
        port3=port3,
        port4=port4,
        bend180=bend180,
        mirror=mirror,
        straight_length=straight_length,
        cross_section=cross_section,
        straight=straight,
    )

straight_double

straight_double(
    component: Component,
    cross_section: CrossSectionSpec = "strip",
    port1: str = "o1",
    port2: str = "o2",
    straight_length: float | None = None,
    straight: ComponentSpec = "straight",
) -> Component

Returns double straight.

Parameters:

Name Type Description Default
component Component

for cutback.

required
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
port1 str

name of first optical port.

'o1'
port2 str

name of second optical port.

'o2'
straight_length float | None

length of straight.

None
straight ComponentSpec

straight spec.

'straight'
Source code in gdsfactory/components/pcms/cutback_2x2.py
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@gf.cell_with_module_name(tags=["pcms"])
def straight_double(
    component: Component,
    cross_section: CrossSectionSpec = "strip",
    port1: str = "o1",
    port2: str = "o2",
    straight_length: float | None = None,
    straight: ComponentSpec = "straight",
) -> Component:
    """Returns double straight.

    Args:
        component: for cutback.
        cross_section: specification (CrossSection, string or dict).
        port1: name of first optical port.
        port2: name of second optical port.
        straight_length: length of straight.
        straight: straight spec.
    """
    return cf.straight_double(
        component=component,
        cross_section=cross_section,
        port1=port1,
        port2=port2,
        straight_length=straight_length,
        straight=straight,
    )

cutback_2x2

cutback_bend

cutback_bend

cutback_bend(
    component: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    straight_length: float = 5.0,
    rows: int = 6,
    cols: int = 5,
    **kwargs: Any
) -> Component

We recommend using cutback_bend90 instead for a smaller footprint.

Parameters:

Name Type Description Default
component ComponentSpec

bend spec.

'bend_euler'
straight ComponentSpec

straight spec.

'straight'
straight_length float

in um.

5.0
rows int

number of rows.

6
cols int

number of cols.

5
kwargs Any

cross_section settings.

{}
Source code in gdsfactory/components/pcms/cutback_bend.py
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@gf.cell_with_module_name(tags=["pcms"])
def cutback_bend(
    component: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    straight_length: float = 5.0,
    rows: int = 6,
    cols: int = 5,
    **kwargs: Any,
) -> Component:
    """We recommend using cutback_bend90 instead for a smaller footprint.

    Args:
        component: bend spec.
        straight: straight spec.
        straight_length: in um.
        rows: number of rows.
        cols: number of cols.
        kwargs: cross_section settings.

        this is a column
            _
          _|
        _|

        _ this is a row
    """
    return cf.cutback_bend(
        component=component,
        straight=straight,
        straight_length=straight_length,
        rows=rows,
        cols=cols,
        **kwargs,
    )

cutback_bend180

cutback_bend180(
    component: ComponentSpec = "bend_euler180",
    straight: ComponentSpec = "straight",
    straight_length: float = 5.0,
    rows: int = 6,
    cols: int = 6,
    spacing: float = 3.0,
    **kwargs: Any
) -> Component

Returns cutback to measure u bend loss.

Parameters:

Name Type Description Default
component ComponentSpec

bend spec.

'bend_euler180'
straight ComponentSpec

straight spec.

'straight'
straight_length float

in um.

5.0
rows int

number of rows.

6
cols int

number of cols.

6
spacing float

in um.

3.0
kwargs Any

cross_section settings.

_

{}
Source code in gdsfactory/components/pcms/cutback_bend.py
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
@gf.cell_with_module_name(tags=["pcms"])
def cutback_bend180(
    component: ComponentSpec = "bend_euler180",
    straight: ComponentSpec = "straight",
    straight_length: float = 5.0,
    rows: int = 6,
    cols: int = 6,
    spacing: float = 3.0,
    **kwargs: Any,
) -> Component:
    """Returns cutback to measure u bend loss.

    Args:
        component: bend spec.
        straight: straight spec.
        straight_length: in um.
        rows: number of rows.
        cols: number of cols.
        spacing: in um.
        kwargs: cross_section settings.

          _
        _| |_  this is a row

        _ this is a column
    """
    return cf.cutback_bend180(
        component=component,
        straight=straight,
        straight_length=straight_length,
        rows=rows,
        cols=cols,
        spacing=spacing,
        **kwargs,
    )

cutback_bend90

cutback_bend90(
    component: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    straight_length: float = 5.0,
    rows: int = 6,
    cols: int = 6,
    spacing: int = 5,
    **kwargs: Any
) -> Component

Returns bend90 cutback.

Parameters:

Name Type Description Default
component ComponentSpec

bend spec.

'bend_euler'
straight ComponentSpec

straight spec.

'straight'
straight_length float

in um.

5.0
rows int

number of rows.

6
cols int

number of cols.

6
spacing int

in um.

5
kwargs Any

cross_section settings.

_

{}
Source code in gdsfactory/components/pcms/cutback_bend.py
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
@gf.cell_with_module_name(tags=["pcms"])
def cutback_bend90(
    component: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    straight_length: float = 5.0,
    rows: int = 6,
    cols: int = 6,
    spacing: int = 5,
    **kwargs: Any,
) -> Component:
    """Returns bend90 cutback.

    Args:
        component: bend spec.
        straight: straight spec.
        straight_length: in um.
        rows: number of rows.
        cols: number of cols.
        spacing: in um.
        kwargs: cross_section settings.

           _
        |_| |
    """
    return cf.cutback_bend90(
        component=component,
        straight=straight,
        straight_length=straight_length,
        rows=rows,
        cols=cols,
        spacing=spacing,
        **kwargs,
    )

staircase

staircase(
    component: ComponentSpec | Component = "bend_euler",
    straight: ComponentSpec = "straight",
    length_v: float = 5.0,
    length_h: float = 5.0,
    rows: int = 4,
    **kwargs: Any
) -> Component

Returns staircase.

Parameters:

Name Type Description Default
component ComponentSpec | Component

bend spec.

'bend_euler'
straight ComponentSpec

straight spec.

'straight'
length_v float

vertical length.

5.0
length_h float

vertical length.

5.0
rows int

number of rows.

4
cols

number of cols.

required
kwargs Any

cross_section settings.

{}
Source code in gdsfactory/components/pcms/cutback_bend.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@gf.cell_with_module_name(tags=["pcms"])
def staircase(
    component: ComponentSpec | Component = "bend_euler",
    straight: ComponentSpec = "straight",
    length_v: float = 5.0,
    length_h: float = 5.0,
    rows: int = 4,
    **kwargs: Any,
) -> Component:
    """Returns staircase.

    Args:
        component: bend spec.
        straight: straight spec.
        length_v: vertical length.
        length_h: vertical length.
        rows: number of rows.
        cols: number of cols.
        kwargs: cross_section settings.
    """
    return cf.staircase(
        component=component,
        straight=straight,
        length_v=length_v,
        length_h=length_h,
        rows=rows,
        **kwargs,
    )

cutback_bend

cutback_bend180

cutback_bend180(
    component: ComponentSpec = "bend_euler180",
    straight: ComponentSpec = "straight",
    straight_length: float = 5.0,
    rows: int = 6,
    cols: int = 6,
    spacing: float = 3.0,
    **kwargs: Any
) -> Component

Returns cutback to measure u bend loss.

Parameters:

Name Type Description Default
component ComponentSpec

bend spec.

'bend_euler180'
straight ComponentSpec

straight spec.

'straight'
straight_length float

in um.

5.0
rows int

number of rows.

6
cols int

number of cols.

6
spacing float

in um.

3.0
kwargs Any

cross_section settings.

_

{}
Source code in gdsfactory/components/pcms/cutback_bend.py
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
@gf.cell_with_module_name(tags=["pcms"])
def cutback_bend180(
    component: ComponentSpec = "bend_euler180",
    straight: ComponentSpec = "straight",
    straight_length: float = 5.0,
    rows: int = 6,
    cols: int = 6,
    spacing: float = 3.0,
    **kwargs: Any,
) -> Component:
    """Returns cutback to measure u bend loss.

    Args:
        component: bend spec.
        straight: straight spec.
        straight_length: in um.
        rows: number of rows.
        cols: number of cols.
        spacing: in um.
        kwargs: cross_section settings.

          _
        _| |_  this is a row

        _ this is a column
    """
    return cf.cutback_bend180(
        component=component,
        straight=straight,
        straight_length=straight_length,
        rows=rows,
        cols=cols,
        spacing=spacing,
        **kwargs,
    )

cutback_bend180

cutback_bend180circular module-attribute

cutback_bend180circular = CellAlias(
    cutback_bend180, component="bend_circular180"
)

cutback_bend180circular

cutback_bend90

cutback_bend90(
    component: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    straight_length: float = 5.0,
    rows: int = 6,
    cols: int = 6,
    spacing: int = 5,
    **kwargs: Any
) -> Component

Returns bend90 cutback.

Parameters:

Name Type Description Default
component ComponentSpec

bend spec.

'bend_euler'
straight ComponentSpec

straight spec.

'straight'
straight_length float

in um.

5.0
rows int

number of rows.

6
cols int

number of cols.

6
spacing int

in um.

5
kwargs Any

cross_section settings.

_

{}
Source code in gdsfactory/components/pcms/cutback_bend.py
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
@gf.cell_with_module_name(tags=["pcms"])
def cutback_bend90(
    component: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    straight_length: float = 5.0,
    rows: int = 6,
    cols: int = 6,
    spacing: int = 5,
    **kwargs: Any,
) -> Component:
    """Returns bend90 cutback.

    Args:
        component: bend spec.
        straight: straight spec.
        straight_length: in um.
        rows: number of rows.
        cols: number of cols.
        spacing: in um.
        kwargs: cross_section settings.

           _
        |_| |
    """
    return cf.cutback_bend90(
        component=component,
        straight=straight,
        straight_length=straight_length,
        rows=rows,
        cols=cols,
        spacing=spacing,
        **kwargs,
    )

cutback_bend90

cutback_bend90circular module-attribute

cutback_bend90circular = CellAlias(
    cutback_bend90, component="bend_circular"
)

cutback_bend90circular

cutback_component

cutback_component

cutback_component(
    component: ComponentSpec = "taper_0p5_to_3_l36",
    cols: int = 4,
    rows: int = 5,
    port1: str = "o1",
    port2: str = "o2",
    bend180: ComponentSpec = "bend_euler180",
    mirror: bool = False,
    mirror1: bool = False,
    mirror2: bool = False,
    straight_length: float | None = None,
    straight_length_pair: float | None = None,
    straight: ComponentSpec = "straight",
    cross_section: CrossSectionSpec = "strip",
    radius: float | None = None,
    **kwargs: Any
) -> Component

Returns a daisy chain of components for measuring their loss.

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

Parameters:

Name Type Description Default
component ComponentSpec

for cutback.

'taper_0p5_to_3_l36'
cols int

number of columns.

4
rows int

number of rows.

5
port1 str

name of first optical port.

'o1'
port2 str

name of second optical port.

'o2'
bend180 ComponentSpec

ubend.

'bend_euler180'
mirror bool

Flips component. Useful when 'o2' is the port that you want to route to.

False
mirror1 bool

mirrors first component.

False
mirror2 bool

mirrors second component.

False
straight_length float | None

length of the straight section between cutbacks.

None
straight_length_pair float | None

length of the straight section between each component pair.

None
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
straight ComponentSpec

straight spec.

'straight'
radius float | None

radius for the bends. Defaults to cross_section radius.

None
kwargs Any

component settings.

{}
Source code in gdsfactory/components/pcms/cutback_component.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@gf.cell_with_module_name(tags=["pcms"])
def cutback_component(
    component: ComponentSpec = "taper_0p5_to_3_l36",
    cols: int = 4,
    rows: int = 5,
    port1: str = "o1",
    port2: str = "o2",
    bend180: ComponentSpec = "bend_euler180",
    mirror: bool = False,
    mirror1: bool = False,
    mirror2: bool = False,
    straight_length: float | None = None,
    straight_length_pair: float | None = None,
    straight: ComponentSpec = "straight",
    cross_section: CrossSectionSpec = "strip",
    radius: float | None = None,
    **kwargs: Any,
) -> Component:
    """Returns a daisy chain of components for measuring their loss.

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

    Args:
        component: for cutback.
        cols: number of columns.
        rows: number of rows.
        port1: name of first optical port.
        port2: name of second optical port.
        bend180: ubend.
        mirror: Flips component. Useful when 'o2' is the port that you want to route to.
        mirror1: mirrors first component.
        mirror2: mirrors second component.
        straight_length: length of the straight section between cutbacks.
        straight_length_pair: length of the straight section between each component pair.
        cross_section: specification (CrossSection, string or dict).
        straight: straight spec.
        radius: radius for the bends. Defaults to cross_section radius.
        kwargs: component settings.
    """
    return cf.cutback_component(
        component=component,
        cols=cols,
        rows=rows,
        port1=port1,
        port2=port2,
        bend180=bend180,
        mirror=mirror,
        mirror1=mirror1,
        mirror2=mirror2,
        straight_length=straight_length,
        straight_length_pair=straight_length_pair,
        straight=straight,
        cross_section=cross_section,
        radius=radius,
        **kwargs,
    )

cutback_component

cutback_component_mirror module-attribute

cutback_component_mirror = CellAlias(
    cutback_component, mirror=True
)

cutback_component_mirror

cutback_splitter

cutback_splitter

cutback_splitter(
    component: ComponentSpec = "mmi1x2",
    cols: int = 4,
    rows: int = 5,
    port1: str = "o1",
    port2: str = "o2",
    port3: str = "o3",
    bend180: ComponentSpec = "bend_euler180",
    mirror: bool = False,
    straight: ComponentSpec = "straight",
    straight_length: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    **kwargs: Any
) -> Component

Returns a daisy chain of splitters for measuring their loss.

Parameters:

Name Type Description Default
component ComponentSpec

for cutback.

'mmi1x2'
cols int

number of columns.

4
rows int

number of rows.

5
port1 str

name of first optical port.

'o1'
port2 str

name of second optical port.

'o2'
port3 str

name of third optical port.

'o3'
bend180 ComponentSpec

ubend.

'bend_euler180'
mirror bool

Flips component. Useful when 'o2' is the port that you want to route to.

False
straight ComponentSpec

waveguide spec to connect both sides.

'straight'
straight_length float | None

length of the straight section between cutbacks.

None
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
kwargs Any

cross_section settings.

{}
Source code in gdsfactory/components/pcms/cutback_splitter.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@gf.cell_with_module_name(tags=["pcms"])
def cutback_splitter(
    component: ComponentSpec = "mmi1x2",
    cols: int = 4,
    rows: int = 5,
    port1: str = "o1",
    port2: str = "o2",
    port3: str = "o3",
    bend180: ComponentSpec = "bend_euler180",
    mirror: bool = False,
    straight: ComponentSpec = "straight",
    straight_length: float | None = None,
    cross_section: CrossSectionSpec = "strip",
    **kwargs: Any,
) -> Component:
    """Returns a daisy chain of splitters for measuring their loss.

    Args:
        component: for cutback.
        cols: number of columns.
        rows: number of rows.
        port1: name of first optical port.
        port2: name of second optical port.
        port3: name of third optical port.
        bend180: ubend.
        mirror: Flips component. Useful when 'o2' is the port that you want to route to.
        straight: waveguide spec to connect both sides.
        straight_length: length of the straight section between cutbacks.
        cross_section: specification (CrossSection, string or dict).
        kwargs: cross_section settings.
    """
    return cf.cutback_splitter(
        component=component,
        cols=cols,
        rows=rows,
        port1=port1,
        port2=port2,
        port3=port3,
        bend180=bend180,
        mirror=mirror,
        straight=straight,
        straight_length=straight_length,
        cross_section=cross_section,
        **kwargs,
    )

cutback_splitter

greek_cross

Greek cross test structure.

greek_cross

greek_cross(
    length: float = 30,
    layers: LayerSpecs = ("WG", "N"),
    widths: Floats = (2.0, 3.0),
    offsets: Floats | None = None,
    via_stack: ComponentSpec = "via_stack_npp_m1",
    layer_index: int = 0,
) -> gf.Component

Simple greek cross with via stacks at the endpoints.

Process control monitor for dopant sheet resistivity and linewidth variation.

Parameters:

Name Type Description Default
length float

length of cross arms.

30
layers LayerSpecs

list of layers.

('WG', 'N')
widths Floats

list of widths (same order as layers).

(2.0, 3.0)
offsets Floats | None

how much to extend each layer beyond the cross length negative shorter, positive longer.

None
via_stack ComponentSpec

via component to attach to the cross.

'via_stack_npp_m1'
layer_index int

index of the layer to connect the via_stack to.

0
        via_stack
        <------->
        _________       length          ________
        |       |<-------------------->|        |
    2x  |       |     |   ↓       |<-->|        |
        |       |======== width =======|        |
        |_______|<--> |   ↑       |<-->|________|
                offset            offset

References: - Walton, Anthony J.. “MICROELECTRONIC TEST STRUCTURES.” (1999). - W. Versnel, Analysis of the Greek cross, a Van der Pauw structure with finite contacts, Solid-State Electronics, Volume 22, Issue 11, 1979, Pages 911-914, ISSN 0038-1101, https://doi.org/10.1016/0038-1101(79)90061-3. - S. Enderling et al., "Sheet resistance measurement of non-standard cleanroom materials using suspended Greek cross test structures," IEEE Transactions on Semiconductor Manufacturing, vol. 19, no. 1, pp. 2-9, Feb. 2006, doi: 10.1109/TSM.2005.863248. - https://download.tek.com/document/S530_VanDerPauwSheetRstnce.pdf

Source code in gdsfactory/components/pcms/greek_cross.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@gf.cell_with_module_name(tags=["pcms"])
def greek_cross(
    length: float = 30,
    layers: LayerSpecs = ("WG", "N"),
    widths: Floats = (2.0, 3.0),
    offsets: Floats | None = None,
    via_stack: ComponentSpec = "via_stack_npp_m1",
    layer_index: int = 0,
) -> gf.Component:
    """Simple greek cross with via stacks at the endpoints.

    Process control monitor for dopant sheet resistivity and linewidth variation.

    Args:
        length: length of cross arms.
        layers: list of layers.
        widths: list of widths (same order as layers).
        offsets: how much to extend each layer beyond the cross length
            negative shorter, positive longer.
        via_stack: via component to attach to the cross.
        layer_index: index of the layer to connect the via_stack to.

    ```text
            via_stack
            <------->
            _________       length          ________
            |       |<-------------------->|        |
        2x  |       |     |   ↓       |<-->|        |
            |       |======== width =======|        |
            |_______|<--> |   ↑       |<-->|________|
                    offset            offset
    ```


    References:
    - Walton, Anthony J.. “MICROELECTRONIC TEST STRUCTURES.” (1999).
    - W. Versnel, Analysis of the Greek cross, a Van der Pauw structure with finite
      contacts, Solid-State Electronics, Volume 22, Issue 11, 1979, Pages 911-914,
      ISSN 0038-1101, <https://doi.org/10.1016/0038-1101>(79)90061-3.
    - S. Enderling et al., "Sheet resistance measurement of non-standard cleanroom
      materials using suspended Greek cross test structures," IEEE Transactions on
      Semiconductor Manufacturing, vol. 19, no. 1, pp. 2-9, Feb. 2006,
      doi: 10.1109/TSM.2005.863248.
    - <https://download.tek.com/document/S530_VanDerPauwSheetRstnce.pdf>

    """
    return cf.greek_cross(
        length=length,
        layers=layers,
        widths=widths,
        offsets=offsets,
        via_stack=via_stack,
        layer_index=layer_index,
    )

greek_cross_with_pads

greek_cross_with_pads(
    pad: ComponentSpec = "pad",
    pad_pitch: float = 150.0,
    greek_cross_component: ComponentSpec = "greek_cross",
    pad_via: ComponentSpec = "via_stack_m1_mtop",
    cross_section: CrossSectionSpec = metal1,
    pad_port_name: str = "e4",
) -> gf.Component

Greek cross under 4 DC pads, ready to test.

Parameters:

Name Type Description Default
pad ComponentSpec

component to use for probe pads.

'pad'
pad_pitch float

spacing between pads.

150.0
greek_cross_component ComponentSpec

component to use for greek cross.

'greek_cross'
pad_via ComponentSpec

via to add to the pad.

'via_stack_m1_mtop'
cross_section CrossSectionSpec

cross-section for cross via to pad via wiring.

metal1
pad_port_name str

name of the port to connect to the greek cross.

'e4'
Source code in gdsfactory/components/pcms/greek_cross.py
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@gf.cell_with_module_name(tags=["pcms"])
def greek_cross_with_pads(
    pad: ComponentSpec = "pad",
    pad_pitch: float = 150.0,
    greek_cross_component: ComponentSpec = "greek_cross",
    pad_via: ComponentSpec = "via_stack_m1_mtop",
    cross_section: CrossSectionSpec = metal1,
    pad_port_name: str = "e4",
) -> gf.Component:
    """Greek cross under 4 DC pads, ready to test.

    Arguments:
        pad: component to use for probe pads.
        pad_pitch: spacing between pads.
        greek_cross_component: component to use for greek cross.
        pad_via: via to add to the pad.
        cross_section: cross-section for cross via to pad via wiring.
        pad_port_name: name of the port to connect to the greek cross.
    """
    return cf.greek_cross_with_pads(
        pad=pad,
        pad_pitch=pad_pitch,
        greek_cross_component=greek_cross_component,
        pad_via=pad_via,
        cross_section=cross_section,
        pad_port_name=pad_port_name,
    )

greek_cross

greek_cross_with_pads

greek_cross_with_pads(
    pad: ComponentSpec = "pad",
    pad_pitch: float = 150.0,
    greek_cross_component: ComponentSpec = "greek_cross",
    pad_via: ComponentSpec = "via_stack_m1_mtop",
    cross_section: CrossSectionSpec = metal1,
    pad_port_name: str = "e4",
) -> gf.Component

Greek cross under 4 DC pads, ready to test.

Parameters:

Name Type Description Default
pad ComponentSpec

component to use for probe pads.

'pad'
pad_pitch float

spacing between pads.

150.0
greek_cross_component ComponentSpec

component to use for greek cross.

'greek_cross'
pad_via ComponentSpec

via to add to the pad.

'via_stack_m1_mtop'
cross_section CrossSectionSpec

cross-section for cross via to pad via wiring.

metal1
pad_port_name str

name of the port to connect to the greek cross.

'e4'
Source code in gdsfactory/components/pcms/greek_cross.py
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@gf.cell_with_module_name(tags=["pcms"])
def greek_cross_with_pads(
    pad: ComponentSpec = "pad",
    pad_pitch: float = 150.0,
    greek_cross_component: ComponentSpec = "greek_cross",
    pad_via: ComponentSpec = "via_stack_m1_mtop",
    cross_section: CrossSectionSpec = metal1,
    pad_port_name: str = "e4",
) -> gf.Component:
    """Greek cross under 4 DC pads, ready to test.

    Arguments:
        pad: component to use for probe pads.
        pad_pitch: spacing between pads.
        greek_cross_component: component to use for greek cross.
        pad_via: via to add to the pad.
        cross_section: cross-section for cross via to pad via wiring.
        pad_port_name: name of the port to connect to the greek cross.
    """
    return cf.greek_cross_with_pads(
        pad=pad,
        pad_pitch=pad_pitch,
        greek_cross_component=greek_cross_component,
        pad_via=pad_via,
        cross_section=cross_section,
        pad_port_name=pad_port_name,
    )

greek_cross_with_pads

litho_calipers

litho_calipers

litho_calipers(
    notch_size: Size = (2.0, 5.0),
    notch_spacing: float = 2.0,
    num_notches: int = 11,
    offset_per_notch: float = 0.1,
    row_spacing: float = 0.0,
    layer1: LayerSpec = "WG",
    layer2: LayerSpec = "SLAB150",
) -> Component

Vernier caliper structure to test lithography alignment.

Only the middle finger is aligned and the rest are offset. adapted from phidl

Parameters:

Name Type Description Default
notch_size Size

[xwidth, yheight].

(2.0, 5.0)
notch_spacing float

in um.

2.0
num_notches int

number of notches.

11
offset_per_notch float

in um.

0.1
row_spacing float

0

0.0
layer1 LayerSpec

layer.

'WG'
layer2 LayerSpec

layer.

'SLAB150'
Source code in gdsfactory/components/pcms/litho_calipers.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@gf.cell_with_module_name(tags=["pcms"])
def litho_calipers(
    notch_size: Size = (2.0, 5.0),
    notch_spacing: float = 2.0,
    num_notches: int = 11,
    offset_per_notch: float = 0.1,
    row_spacing: float = 0.0,
    layer1: LayerSpec = "WG",
    layer2: LayerSpec = "SLAB150",
) -> Component:
    """Vernier caliper structure to test lithography alignment.

    Only the middle finger is aligned and the rest are offset.
    adapted from phidl

    Args:
        notch_size: [xwidth, yheight].
        notch_spacing: in um.
        num_notches: number of notches.
        offset_per_notch: in um.
        row_spacing: 0
        layer1: layer.
        layer2: layer.
    """
    return cf.litho_calipers(
        notch_size=notch_size,
        notch_spacing=notch_spacing,
        num_notches=num_notches,
        offset_per_notch=offset_per_notch,
        row_spacing=row_spacing,
        layer1=layer1,
        layer2=layer2,
    )

litho_calipers

litho_ruler

litho_ruler

litho_ruler(
    height: float = 2,
    width: float = 0.5,
    spacing: float = 2.0,
    scale: tuple[float, ...] = (
        3,
        1,
        1,
        1,
        1,
        2,
        1,
        1,
        1,
        1,
    ),
    num_marks: int = 21,
    layer: LayerSpec = "WG",
) -> gf.Component

Ruler structure for lithographic measurement.

Includes marks of varying scales to allow for easy reading by eye.

based on phidl.geometry

Parameters:

Name Type Description Default
height float

Height of the ruling marks in um.

2
width float

Width of the ruling marks in um.

0.5
spacing float

Center-to-center spacing of the ruling marks in um.

2.0
scale tuple[float, ...]

Height scale pattern of marks.

(3, 1, 1, 1, 1, 2, 1, 1, 1, 1)
num_marks int

Total number of marks to generate.

21
layer LayerSpec

Specific layer to put the ruler geometry on.

'WG'
Source code in gdsfactory/components/pcms/litho_ruler.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
@gf.cell_with_module_name(tags=["pcms"])
def litho_ruler(
    height: float = 2,
    width: float = 0.5,
    spacing: float = 2.0,
    scale: tuple[float, ...] = (3, 1, 1, 1, 1, 2, 1, 1, 1, 1),
    num_marks: int = 21,
    layer: LayerSpec = "WG",
) -> gf.Component:
    """Ruler structure for lithographic measurement.

    Includes marks of varying scales to allow for easy reading by eye.

    based on phidl.geometry

    Args:
        height: Height of the ruling marks in um.
        width: Width of the ruling marks in um.
        spacing: Center-to-center spacing of the ruling marks in um.
        scale: Height scale pattern of marks.
        num_marks: Total number of marks to generate.
        layer: Specific layer to put the ruler geometry on.
    """
    return cf.litho_ruler(
        height=height,
        width=width,
        spacing=spacing,
        scale=scale,
        num_marks=num_marks,
        layer=layer,
    )

litho_ruler

litho_steps

litho_steps

litho_steps(
    line_widths: tuple[float, ...] = (
        1.0,
        2.0,
        4.0,
        8.0,
        16.0,
    ),
    line_spacing: float = 10.0,
    height: float = 100.0,
    layer: LayerSpec = "WG",
) -> Component

Positive + negative tone linewidth test.

used for lithography resolution test patterning based on phidl

Parameters:

Name Type Description Default
line_widths tuple[float, ...]

in um.

(1.0, 2.0, 4.0, 8.0, 16.0)
line_spacing float

in um.

10.0
height float

in um.

100.0
layer LayerSpec

Specific layer to put the ruler geometry on.

'WG'
Source code in gdsfactory/components/pcms/litho_steps.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@gf.cell_with_module_name(tags=["pcms"])
def litho_steps(
    line_widths: tuple[float, ...] = (1.0, 2.0, 4.0, 8.0, 16.0),
    line_spacing: float = 10.0,
    height: float = 100.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Positive + negative tone linewidth test.

    used for lithography resolution test patterning
    based on phidl

    Args:
        line_widths: in um.
        line_spacing: in um.
        height: in um.
        layer: Specific layer to put the ruler geometry on.
    """
    return cf.litho_steps(
        line_widths=line_widths,
        line_spacing=line_spacing,
        height=height,
        layer=layer,
    )

litho_steps

pixel

pixel(size: int = 1, layer: LayerSpec = 'WG') -> Component

Returns a square pixel, the building block of the QR code.

Parameters:

Name Type Description Default
size int

side length of the square, in um.

1
layer LayerSpec

layer to use.

'WG'
Source code in gdsfactory/components/pcms/version_stamp.py
12
13
14
15
16
17
18
19
20
21
22
23
@gf.cell_with_module_name(tags=["pcms"])
def pixel(size: int = 1, layer: LayerSpec = "WG") -> Component:
    """Returns a square pixel, the building block of the QR code.

    Args:
        size: side length of the square, in um.
        layer: layer to use.
    """
    return cf.pixel(
        size=size,
        layer=layer,
    )

pixel

qrcode

qrcode(
    data: str = "mask01",
    psize: int = 1,
    layer: LayerSpec = "WG",
) -> Component

Returns QRCode.

Parameters:

Name Type Description Default
data str

string to encode.

'mask01'
psize int

pixel size.

1
layer LayerSpec

layer to use.

'WG'
Source code in gdsfactory/components/pcms/version_stamp.py
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@gf.cell_with_module_name(tags=["pcms"])
def qrcode(data: str = "mask01", psize: int = 1, layer: LayerSpec = "WG") -> Component:
    """Returns QRCode.

    Args:
        data: string to encode.
        psize: pixel size.
        layer: layer to use.
    """
    return cf.qrcode(
        data=data,
        psize=psize,
        layer=layer,
    )

qrcode

resistance_meander

resistance_meander

resistance_meander(
    pad_size: Size = (50.0, 50.0),
    num_squares: int = 1000,
    width: float = 1.0,
    res_layer: LayerSpec = "MTOP",
    pad_layer: LayerSpec = "MTOP",
) -> Component

Return meander to test resistance.

based on phidl.geometry

Parameters:

Name Type Description Default
pad_size Size

Size of the two matched impedance pads (microns).

(50.0, 50.0)
num_squares int

Number of squares comprising the resonator wire.

1000
width float

The width of the squares (microns).

1.0
res_layer LayerSpec

resistance layer.

'MTOP'
pad_layer LayerSpec

pad layer.

'MTOP'
Source code in gdsfactory/components/pcms/resistance_meander.py
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@gf.cell_with_module_name(tags=["pcms"])
def resistance_meander(
    pad_size: Size = (50.0, 50.0),
    num_squares: int = 1000,
    width: float = 1.0,
    res_layer: LayerSpec = "MTOP",
    pad_layer: LayerSpec = "MTOP",
) -> Component:
    """Return meander to test resistance.

    based on phidl.geometry

    Args:
        pad_size: Size of the two matched impedance pads (microns).
        num_squares: Number of squares comprising the resonator wire.
        width: The width of the squares (microns).
        res_layer: resistance layer.
        pad_layer: pad layer.
    """
    return cf.resistance_meander(
        pad_size=pad_size,
        num_squares=num_squares,
        width=width,
        res_layer=res_layer,
        pad_layer=pad_layer,
    )

resistance_meander_net

resistance_meander_net(
    num_rows: int,
    length_row: float,
    width: float,
    res_layer: LayerSpec,
) -> Component

Returns the meander wire, without the pads.

Parameters:

Name Type Description Default
num_rows int

number of rows in the meander.

required
length_row float

length of each row (microns).

required
width float

width of the squares (microns).

required
res_layer LayerSpec

resistance layer.

required
Source code in gdsfactory/components/pcms/resistance_meander.py
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@gf.cell
def resistance_meander_net(
    num_rows: int, length_row: float, width: float, res_layer: LayerSpec
) -> Component:
    """Returns the meander wire, without the pads.

    Args:
        num_rows: number of rows in the meander.
        length_row: length of each row (microns).
        width: width of the squares (microns).
        res_layer: resistance layer.
    """
    return cf.resistance_meander_net(
        num_rows=num_rows,
        length_row=length_row,
        width=width,
        res_layer=res_layer,
    )

resistance_meander_row

resistance_meander_row(
    length_row: float, width: float, res_layer: LayerSpec
) -> Component

Returns a meander row with the corner square that joins it to the next row.

Parameters:

Name Type Description Default
length_row float

length of the row (microns).

required
width float

width of the squares (microns).

required
res_layer LayerSpec

resistance layer.

required
Source code in gdsfactory/components/pcms/resistance_meander.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@gf.cell
def resistance_meander_row(
    length_row: float, width: float, res_layer: LayerSpec
) -> Component:
    """Returns a meander row with the corner square that joins it to the next row.

    Args:
        length_row: length of the row (microns).
        width: width of the squares (microns).
        res_layer: resistance layer.
    """
    return cf.resistance_meander_row(
        length_row=length_row,
        width=width,
        res_layer=res_layer,
    )

resistance_meander

resistance_meander_net

resistance_meander_net(
    num_rows: int,
    length_row: float,
    width: float,
    res_layer: LayerSpec,
) -> Component

Returns the meander wire, without the pads.

Parameters:

Name Type Description Default
num_rows int

number of rows in the meander.

required
length_row float

length of each row (microns).

required
width float

width of the squares (microns).

required
res_layer LayerSpec

resistance layer.

required
Source code in gdsfactory/components/pcms/resistance_meander.py
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@gf.cell
def resistance_meander_net(
    num_rows: int, length_row: float, width: float, res_layer: LayerSpec
) -> Component:
    """Returns the meander wire, without the pads.

    Args:
        num_rows: number of rows in the meander.
        length_row: length of each row (microns).
        width: width of the squares (microns).
        res_layer: resistance layer.
    """
    return cf.resistance_meander_net(
        num_rows=num_rows,
        length_row=length_row,
        width=width,
        res_layer=res_layer,
    )
import gdsfactory as gf

gf.gpdk.PDK.activate()

c = gf.components.resistance_meander_net().copy()
c.draw_ports()
c.plot()

resistance_meander_row

resistance_meander_row(
    length_row: float, width: float, res_layer: LayerSpec
) -> Component

Returns a meander row with the corner square that joins it to the next row.

Parameters:

Name Type Description Default
length_row float

length of the row (microns).

required
width float

width of the squares (microns).

required
res_layer LayerSpec

resistance layer.

required
Source code in gdsfactory/components/pcms/resistance_meander.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@gf.cell
def resistance_meander_row(
    length_row: float, width: float, res_layer: LayerSpec
) -> Component:
    """Returns a meander row with the corner square that joins it to the next row.

    Args:
        length_row: length of the row (microns).
        width: width of the squares (microns).
        res_layer: resistance layer.
    """
    return cf.resistance_meander_row(
        length_row=length_row,
        width=width,
        res_layer=res_layer,
    )
import gdsfactory as gf

gf.gpdk.PDK.activate()

c = gf.components.resistance_meander_row().copy()
c.draw_ports()
c.plot()

resistance_sheet

resistance_sheet

resistance_sheet(
    width: float = 10.0,
    layers: LayerSpecs = ("HEATER",),
    layer_offsets: Floats = (0, 0.2),
    pad: ComponentSpec = "via_stack_heater_mtop",
    pad_size: Size = (50.0, 50.0),
    pad_pitch: float = 100.0,
    ohms_per_square: float | None = None,
    pad_port_name: str = "e4",
) -> Component

Returns Sheet resistance.

keeps connectivity for pads and first layer in layers

Parameters:

Name Type Description Default
width float

in um.

10.0
layers LayerSpecs

for the middle part.

('HEATER',)
layer_offsets Floats

from edge, positive: over, negative: inclusion.

(0, 0.2)
pad ComponentSpec

function to create a pad.

'via_stack_heater_mtop'
pad_size Size

in um.

(50.0, 50.0)
pad_pitch float

in um.

100.0
ohms_per_square float | None

optional sheet resistance to compute info.resistance.

None
pad_port_name str

port name for the pad.

'e4'
Source code in gdsfactory/components/pcms/resistance_sheet.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@gf.cell_with_module_name(tags=["pcms"])
def resistance_sheet(
    width: float = 10.0,
    layers: LayerSpecs = ("HEATER",),
    layer_offsets: Floats = (0, 0.2),
    pad: ComponentSpec = "via_stack_heater_mtop",
    pad_size: Size = (50.0, 50.0),
    pad_pitch: float = 100.0,
    ohms_per_square: float | None = None,
    pad_port_name: str = "e4",
) -> Component:
    """Returns Sheet resistance.

    keeps connectivity for pads and first layer in layers

    Args:
        width: in um.
        layers: for the middle part.
        layer_offsets: from edge, positive: over, negative: inclusion.
        pad: function to create a pad.
        pad_size: in um.
        pad_pitch: in um.
        ohms_per_square: optional sheet resistance to compute info.resistance.
        pad_port_name: port name for the pad.
    """
    return cf.resistance_sheet(
        width=width,
        layers=layers,
        layer_offsets=layer_offsets,
        pad=pad,
        pad_size=pad_size,
        pad_pitch=pad_pitch,
        ohms_per_square=ohms_per_square,
        pad_port_name=pad_port_name,
    )

resistance_sheet

resolution_test_pattern

resolution_test_pattern

resolution_test_pattern(
    radius: float = 50.0,
    n_spokes: int = 36,
    width: float = 1.0,
    layer: LayerSpec = "WG",
) -> Component

Radial Siemens star resolution test pattern.

Creates a circle of alternating filled/empty pie-shaped wedges. The pattern is useful for evaluating lithographic resolution, as the feature size decreases toward the center.

Parameters:

Name Type Description Default
radius float

Outer radius of the star pattern in um.

50.0
n_spokes int

Total number of spokes (filled + empty). Must be even.

36
width float

Target outer edge width of each spoke in um (informational; actual angular width is 360/n_spokes degrees).

1.0
layer LayerSpec

Layer specification for the filled wedges.

'WG'
Source code in gdsfactory/components/pcms/resolution_test_pattern.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@gf.cell_with_module_name(tags=["pcms"])
def resolution_test_pattern(
    radius: float = 50.0,
    n_spokes: int = 36,
    width: float = 1.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Radial Siemens star resolution test pattern.

    Creates a circle of alternating filled/empty pie-shaped wedges.
    The pattern is useful for evaluating lithographic resolution,
    as the feature size decreases toward the center.

    Args:
        radius: Outer radius of the star pattern in um.
        n_spokes: Total number of spokes (filled + empty). Must be even.
        width: Target outer edge width of each spoke in um (informational;
            actual angular width is 360/n_spokes degrees).
        layer: Layer specification for the filled wedges.
    """
    return cf.resolution_test_pattern(
        radius=radius,
        n_spokes=n_spokes,
        width=width,
        layer=layer,
    )

resolution_test_pattern

ruler

ruler

ruler(
    height_long: float = 55,
    height_short: float = 5,
    height_numbered: float = 10,
    width: float = 2,
    spacing: float = 5.0,
    marks: tuple[float | None, ...] = (
        -100,
        None,
        -90,
        None,
        -80,
        None,
        -70,
        None,
        -60,
        None,
        -50,
        None,
        -40,
        None,
        -30,
        None,
        -20,
        None,
        -10,
        None,
        0,
    ),
    layer: LayerSpec = "WG",
    bbox_layers: tuple[LayerSpec, ...] | None = None,
    bbox_offset: float = 3.0,
    long_marks: tuple[float, ...] = (-50, 0),
    text_size: float = 3.5,
) -> gf.Component

Ruler structure for lithographic measurement.

Includes marks of varying scales to allow for easy reading by eye.

Parameters:

Name Type Description Default
height_long float

Height of the long ruling marks in um.

55
height_short float

Height of the short ruling marks in um.

5
height_numbered float

Height of the numbered ruling marks in um.

10
width float

Width of the ruling marks in um.

2
spacing float

Center-to-center spacing of the ruling marks in um.

5.0
marks tuple[float | None, ...]

Height scale pattern of marks.

(-100, None, -90, None, -80, None, -70, None, -60, None, -50, None, -40, None, -30, None, -20, None, -10, None, 0)
layer LayerSpec

Specific layer to put the ruler geometry on.

'WG'
bbox_layers tuple[LayerSpec, ...] | None

Layers to include in the bounding box.

None
bbox_offset float

Offsets for each bounding box layer.

3.0
long_marks tuple[float, ...]

Marks that are long.

(-50, 0)
text_size float

Size of the text in um.

3.5
Source code in gdsfactory/components/pcms/ruler.py
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@gf.cell_with_module_name(tags=["pcms"])
def ruler(
    height_long: float = 55,
    height_short: float = 5,
    height_numbered: float = 10,
    width: float = 2,
    spacing: float = 5.0,
    marks: tuple[float | None, ...] = (
        -100,
        None,
        -90,
        None,
        -80,
        None,
        -70,
        None,
        -60,
        None,
        -50,
        None,
        -40,
        None,
        -30,
        None,
        -20,
        None,
        -10,
        None,
        0,
    ),
    layer: LayerSpec = "WG",
    bbox_layers: tuple[LayerSpec, ...] | None = None,
    bbox_offset: float = 3.0,
    long_marks: tuple[float, ...] = (-50, 0),
    text_size: float = 3.5,
) -> gf.Component:
    """Ruler structure for lithographic measurement.

    Includes marks of varying scales to allow for easy reading by eye.

    Args:
        height_long: Height of the long ruling marks in um.
        height_short: Height of the short ruling marks in um.
        height_numbered: Height of the numbered ruling marks in um.
        width: Width of the ruling marks in um.
        spacing: Center-to-center spacing of the ruling marks in um.
        marks: Height scale pattern of marks.
        layer: Specific layer to put the ruler geometry on.
        bbox_layers: Layers to include in the bounding box.
        bbox_offset: Offsets for each bounding box layer.
        long_marks: Marks that are long.
        text_size: Size of the text in um.
    """
    return cf.ruler(
        height_long=height_long,
        height_short=height_short,
        height_numbered=height_numbered,
        width=width,
        spacing=spacing,
        marks=marks,
        layer=layer,
        bbox_layers=bbox_layers,
        bbox_offset=bbox_offset,
        long_marks=long_marks,
        text_size=text_size,
    )

ruler

staircase

staircase(
    component: ComponentSpec | Component = "bend_euler",
    straight: ComponentSpec = "straight",
    length_v: float = 5.0,
    length_h: float = 5.0,
    rows: int = 4,
    **kwargs: Any
) -> Component

Returns staircase.

Parameters:

Name Type Description Default
component ComponentSpec | Component

bend spec.

'bend_euler'
straight ComponentSpec

straight spec.

'straight'
length_v float

vertical length.

5.0
length_h float

vertical length.

5.0
rows int

number of rows.

4
cols

number of cols.

required
kwargs Any

cross_section settings.

{}
Source code in gdsfactory/components/pcms/cutback_bend.py
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@gf.cell_with_module_name(tags=["pcms"])
def staircase(
    component: ComponentSpec | Component = "bend_euler",
    straight: ComponentSpec = "straight",
    length_v: float = 5.0,
    length_h: float = 5.0,
    rows: int = 4,
    **kwargs: Any,
) -> Component:
    """Returns staircase.

    Args:
        component: bend spec.
        straight: straight spec.
        length_v: vertical length.
        length_h: vertical length.
        rows: number of rows.
        cols: number of cols.
        kwargs: cross_section settings.
    """
    return cf.staircase(
        component=component,
        straight=straight,
        length_v=length_v,
        length_h=length_h,
        rows=rows,
        **kwargs,
    )

staircase

straight_double

straight_double(
    component: Component,
    cross_section: CrossSectionSpec = "strip",
    port1: str = "o1",
    port2: str = "o2",
    straight_length: float | None = None,
    straight: ComponentSpec = "straight",
) -> Component

Returns double straight.

Parameters:

Name Type Description Default
component Component

for cutback.

required
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
port1 str

name of first optical port.

'o1'
port2 str

name of second optical port.

'o2'
straight_length float | None

length of straight.

None
straight ComponentSpec

straight spec.

'straight'
Source code in gdsfactory/components/pcms/cutback_2x2.py
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@gf.cell_with_module_name(tags=["pcms"])
def straight_double(
    component: Component,
    cross_section: CrossSectionSpec = "strip",
    port1: str = "o1",
    port2: str = "o2",
    straight_length: float | None = None,
    straight: ComponentSpec = "straight",
) -> Component:
    """Returns double straight.

    Args:
        component: for cutback.
        cross_section: specification (CrossSection, string or dict).
        port1: name of first optical port.
        port2: name of second optical port.
        straight_length: length of straight.
        straight: straight spec.
    """
    return cf.straight_double(
        component=component,
        cross_section=cross_section,
        port1=port1,
        port2=port2,
        straight_length=straight_length,
        straight=straight,
    )
import gdsfactory as gf

gf.gpdk.PDK.activate()

c = gf.components.straight_double(cross_section='strip', port1='o1', port2='o2', straight='straight').copy()
c.draw_ports()
c.plot()

vernier_scale

vernier_scale

vernier_scale(
    n_divisions: int = 10,
    pitch_main: float = 10.0,
    pitch_vernier: float = 9.8,
    mark_width: float = 1.0,
    mark_height_main: float = 20.0,
    mark_height_vernier: float = 15.0,
    layer_main: LayerSpec = "WG",
    layer_vernier: LayerSpec = (2, 0),
) -> Component

Vernier scale for overlay measurement.

Creates two rows of rectangular marks: a main scale and a vernier scale. The slight pitch difference between the two scales allows sub-pitch overlay measurement. The zero marks of both scales are centered at the origin.

Parameters:

Name Type Description Default
n_divisions int

Number of marks on each side of the center mark (total marks per scale = 2 * n_divisions + 1).

10
pitch_main float

Center-to-center spacing of main scale marks in um.

10.0
pitch_vernier float

Center-to-center spacing of vernier scale marks in um.

9.8
mark_width float

Width of each rectangular mark in um.

1.0
mark_height_main float

Height of each main scale mark in um.

20.0
mark_height_vernier float

Height of each vernier scale mark in um.

15.0
layer_main LayerSpec

Layer specification for the main scale marks.

'WG'
layer_vernier LayerSpec

Layer specification for the vernier scale marks.

(2, 0)
Source code in gdsfactory/components/pcms/vernier_scale.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@gf.cell_with_module_name(tags=["pcms"])
def vernier_scale(
    n_divisions: int = 10,
    pitch_main: float = 10.0,
    pitch_vernier: float = 9.8,
    mark_width: float = 1.0,
    mark_height_main: float = 20.0,
    mark_height_vernier: float = 15.0,
    layer_main: LayerSpec = "WG",
    layer_vernier: LayerSpec = (2, 0),
) -> Component:
    """Vernier scale for overlay measurement.

    Creates two rows of rectangular marks: a main scale and a vernier scale.
    The slight pitch difference between the two scales allows sub-pitch
    overlay measurement. The zero marks of both scales are centered at the
    origin.

    Args:
        n_divisions: Number of marks on each side of the center mark
            (total marks per scale = 2 * n_divisions + 1).
        pitch_main: Center-to-center spacing of main scale marks in um.
        pitch_vernier: Center-to-center spacing of vernier scale marks in um.
        mark_width: Width of each rectangular mark in um.
        mark_height_main: Height of each main scale mark in um.
        mark_height_vernier: Height of each vernier scale mark in um.
        layer_main: Layer specification for the main scale marks.
        layer_vernier: Layer specification for the vernier scale marks.
    """
    return cf.vernier_scale(
        n_divisions=n_divisions,
        pitch_main=pitch_main,
        pitch_vernier=pitch_vernier,
        mark_width=mark_width,
        mark_height_main=mark_height_main,
        mark_height_vernier=mark_height_vernier,
        layer_main=layer_main,
        layer_vernier=layer_vernier,
    )

vernier_scale

verniers

verniers

verniers(
    widths: Floats = (0.1, 0.2, 0.3, 0.4, 0.5),
    gap: float = 0.1,
    xsize: float = 100.0,
    layer_label: LayerSpec = "TEXT",
    straight: ComponentSpec = "straight",
    cross_section: CrossSectionSpec = "strip",
    **kwargs: Any
) -> Component

Returns a component with verniers.

Parameters:

Name Type Description Default
widths Floats

list of widths.

(0.1, 0.2, 0.3, 0.4, 0.5)
gap float

gap between verniers.

0.1
xsize float

size of the component.

100.0
layer_label LayerSpec

layer for the labels.

'TEXT'
straight ComponentSpec

straight function.

'straight'
cross_section CrossSectionSpec

cross_section spec.

'strip'
kwargs Any

straight settings.

{}
Source code in gdsfactory/components/pcms/verniers.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@gf.cell_with_module_name(tags=["pcms"])
def verniers(
    widths: Floats = (0.1, 0.2, 0.3, 0.4, 0.5),
    gap: float = 0.1,
    xsize: float = 100.0,
    layer_label: LayerSpec = "TEXT",
    straight: ComponentSpec = "straight",
    cross_section: CrossSectionSpec = "strip",
    **kwargs: Any,
) -> Component:
    """Returns a component with verniers.

    Args:
        widths: list of widths.
        gap: gap between verniers.
        xsize: size of the component.
        layer_label: layer for the labels.
        straight: straight function.
        cross_section: cross_section spec.
        kwargs: straight settings.
    """
    return cf.verniers(
        widths=widths,
        gap=gap,
        xsize=xsize,
        layer_label=layer_label,
        straight=straight,
        cross_section=cross_section,
        **kwargs,
    )

verniers

version_stamp

pixel

pixel(size: int = 1, layer: LayerSpec = 'WG') -> Component

Returns a square pixel, the building block of the QR code.

Parameters:

Name Type Description Default
size int

side length of the square, in um.

1
layer LayerSpec

layer to use.

'WG'
Source code in gdsfactory/components/pcms/version_stamp.py
12
13
14
15
16
17
18
19
20
21
22
23
@gf.cell_with_module_name(tags=["pcms"])
def pixel(size: int = 1, layer: LayerSpec = "WG") -> Component:
    """Returns a square pixel, the building block of the QR code.

    Args:
        size: side length of the square, in um.
        layer: layer to use.
    """
    return cf.pixel(
        size=size,
        layer=layer,
    )

qrcode

qrcode(
    data: str = "mask01",
    psize: int = 1,
    layer: LayerSpec = "WG",
) -> Component

Returns QRCode.

Parameters:

Name Type Description Default
data str

string to encode.

'mask01'
psize int

pixel size.

1
layer LayerSpec

layer to use.

'WG'
Source code in gdsfactory/components/pcms/version_stamp.py
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@gf.cell_with_module_name(tags=["pcms"])
def qrcode(data: str = "mask01", psize: int = 1, layer: LayerSpec = "WG") -> Component:
    """Returns QRCode.

    Args:
        data: string to encode.
        psize: pixel size.
        layer: layer to use.
    """
    return cf.qrcode(
        data=data,
        psize=psize,
        layer=layer,
    )

version_stamp

version_stamp(
    labels: tuple[str, ...] = ("demo_label",),
    with_qr_code: bool = False,
    layer: LayerSpec = "WG",
    pixel_size: int = 1,
    version: str | None = None,
    text_size: int = 10,
) -> Component

Component with module version and date.

Parameters:

Name Type Description Default
labels tuple[str, ...]

Iterable of labels.

('demo_label',)
with_qr_code bool

Whether to add a QR code with the date.

False
layer LayerSpec

Layer to use.

'WG'
pixel_size int

Pixel size.

1
version str | None

Version string.

None
text_size int

Text size.

10
Source code in gdsfactory/components/pcms/version_stamp.py
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@gf.cell_with_module_name(tags=["pcms"])
def version_stamp(
    labels: tuple[str, ...] = ("demo_label",),
    with_qr_code: bool = False,
    layer: LayerSpec = "WG",
    pixel_size: int = 1,
    version: str | None = None,
    text_size: int = 10,
) -> Component:
    """Component with module version and date.

    Args:
        labels: Iterable of labels.
        with_qr_code: Whether to add a QR code with the date.
        layer: Layer to use.
        pixel_size: Pixel size.
        version: Version string.
        text_size: Text size.

    """
    return cf.version_stamp(
        labels=labels,
        with_qr_code=with_qr_code,
        layer=layer,
        pixel_size=pixel_size,
        version=version,
        text_size=text_size,
    )

version_stamp

quantum

coupler_capacitive

coupler_capacitive

coupler_capacitive(
    pad_width: float = 20.0,
    pad_height: float = 50.0,
    gap: float = 2.0,
    feed_width: float = 10.0,
    feed_length: float = 30.0,
    layer_metal: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component

Creates a capacitive coupler for quantum circuits.

A capacitive coupler consists of two metal pads separated by a small gap, providing capacitive coupling between circuit elements like qubits and resonators.

                ______               ______
      _______  |      |             |      | _______
     |       | |      |             |      ||       |
     | feed1 | | pad1 | ====gap==== | pad2 || feed2 |
     |       | |      |             |      ||       |
     |_______| |      |             |      ||_______|
               |______|             |______|

Parameters:

Name Type Description Default
pad_width float

Width of each coupling pad in μm.

20.0
pad_height float

Height of each coupling pad in μm.

50.0
gap float

Gap between the coupling pads in μm.

2.0
feed_width float

Width of the feed lines in μm.

10.0
feed_length float

Length of the feed lines in μm.

30.0
layer_metal LayerSpec

Layer for the metal structures.

(1, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the capacitive coupler geometry.

Source code in gdsfactory/components/quantum/coupler_capacitive.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
@gf.cell_with_module_name(tags=["quantum"])
def coupler_capacitive(
    pad_width: float = 20.0,
    pad_height: float = 50.0,
    gap: float = 2.0,
    feed_width: float = 10.0,
    feed_length: float = 30.0,
    layer_metal: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates a capacitive coupler for quantum circuits.

    A capacitive coupler consists of two metal pads separated by a small gap,
    providing capacitive coupling between circuit elements like qubits and resonators.

    ```text
                    ______               ______
          _______  |      |             |      | _______
         |       | |      |             |      ||       |
         | feed1 | | pad1 | ====gap==== | pad2 || feed2 |
         |       | |      |             |      ||       |
         |_______| |      |             |      ||_______|
                   |______|             |______|
    ```

    Args:
        pad_width: Width of each coupling pad in μm.
        pad_height: Height of each coupling pad in μm.
        gap: Gap between the coupling pads in μm.
        feed_width: Width of the feed lines in μm.
        feed_length: Length of the feed lines in μm.
        layer_metal: Layer for the metal structures.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the capacitive coupler geometry.
    """
    return cf.coupler_capacitive(
        pad_width=pad_width,
        pad_height=pad_height,
        gap=gap,
        feed_width=feed_width,
        feed_length=feed_length,
        layer_metal=layer_metal,
        port_type=port_type,
    )

coupler_interdigital

coupler_interdigital(
    fingers: int = 6,
    finger_length: float = 30.0,
    finger_width: float = 2.0,
    finger_gap_vertical: float = 2.0,
    finger_gap_horizontal: float = 3.0,
    feed_width: float = 10.0,
    feed_length: float = 30.0,
    layer_metal: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component

Creates an interdigital capacitive coupler.

Each side includes a base column (a vertical metal block) to which the fingers are attached.

  • The width of the base column is equal to the height of the fingers.
  • The finger_length parameter refers only to the length of the fingers extending from the base, and does NOT include the base column width

Parameters:

Name Type Description Default
fingers int

Number of fingers per side.

6
finger_length float

Length of each finger in μm (see note above).

30.0
finger_width float

Width of each finger in μm.

2.0
finger_gap_vertical float

Vertical gap between fingers in μm (g1).

2.0
finger_gap_horizontal float

Horizontal gap between fingers in μm (g2).

3.0
feed_width float

Width of the feed lines in μm.

10.0
feed_length float

Length of the feed lines in μm.

30.0
layer_metal LayerSpec

Layer for the metal structures.

(1, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the interdigital coupler geometry.

                ┌────────┐
               base columns
               ↓                    ↓
     ┌────────┐                      ┌────────┐
     │        │█████████████        █│        │
     │        │█        g1          █│        │
     │        │█ <─g2─> █████████████│        │
     │        │█                    █│        │
     │ feed1  │█████████████        █│ feed2  │
     │        │█                    █│        │
     │        │█        █████████████│        │
     │        │█                    █│        │
     │        │█████████████        █│        │
     └────────┘█                    █└────────┘
Source code in gdsfactory/components/quantum/coupler_capacitive.py
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
@gf.cell_with_module_name(tags=["quantum"])
def coupler_interdigital(
    fingers: int = 6,
    finger_length: float = 30.0,
    finger_width: float = 2.0,
    finger_gap_vertical: float = 2.0,
    finger_gap_horizontal: float = 3.0,
    feed_width: float = 10.0,
    feed_length: float = 30.0,
    layer_metal: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates an interdigital capacitive coupler.

    Each side includes a base column (a vertical metal block) to which the fingers are attached.

    - The width of the base column is equal to the height of the fingers.
    - The finger_length parameter refers only to the length of the fingers *extending from the base*,
      and does NOT include the base column width

    Args:
        fingers: Number of fingers per side.
        finger_length: Length of each finger in μm (see note above).
        finger_width: Width of each finger in μm.
        finger_gap_vertical: Vertical gap between fingers in μm (g1).
        finger_gap_horizontal: Horizontal gap between fingers in μm (g2).
        feed_width: Width of the feed lines in μm.
        feed_length: Length of the feed lines in μm.
        layer_metal: Layer for the metal structures.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the interdigital coupler geometry.

    ```text
                    ┌────────┐
                   base columns
                   ↓                    ↓
         ┌────────┐                      ┌────────┐
         │        │█████████████        █│        │
         │        │█        g1          █│        │
         │        │█ <─g2─> █████████████│        │
         │        │█                    █│        │
         │ feed1  │█████████████        █│ feed2  │
         │        │█                    █│        │
         │        │█        █████████████│        │
         │        │█                    █│        │
         │        │█████████████        █│        │
         └────────┘█                    █└────────┘
    ```

    """
    return cf.coupler_interdigital(
        fingers=fingers,
        finger_length=finger_length,
        finger_width=finger_width,
        finger_gap_vertical=finger_gap_vertical,
        finger_gap_horizontal=finger_gap_horizontal,
        feed_width=feed_width,
        feed_length=feed_length,
        layer_metal=layer_metal,
        port_type=port_type,
    )

coupler_tunable

coupler_tunable(
    pad_width: float = 30.0,
    pad_height: float = 40.0,
    gap: float = 3.0,
    tuning_pad_width: float = 15.0,
    tuning_pad_height: float = 20.0,
    tuning_gap: float = 1.0,
    feed_width: float = 10.0,
    feed_length: float = 30.0,
    layer_metal: LayerSpec = (1, 0),
    layer_tuning: LayerSpec = (3, 0),
    port_type: str = "electrical",
) -> Component

Creates a tunable capacitive coupler with voltage control.

A tunable coupler includes additional electrodes that can be voltage-biased to change the coupling strength dynamically.

Parameters:

Name Type Description Default
pad_width float

Width of main coupling pads in μm.

30.0
pad_height float

Height of main coupling pads in μm.

40.0
gap float

Gap between main coupling pads in μm.

3.0
tuning_pad_width float

Width of tuning pads in μm.

15.0
tuning_pad_height float

Height of tuning pads in μm.

20.0
tuning_gap float

Gap to tuning pads in μm.

1.0
feed_width float

Width of feed lines in μm.

10.0
feed_length float

Length of feed lines in μm.

30.0
layer_metal LayerSpec

Layer for main metal structures.

(1, 0)
layer_tuning LayerSpec

Layer for tuning electrodes.

(3, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the tunable coupler geometry.

                (connected to feed)
                     _______
                    |       |
                    | tpad1 |
                    |       |
                    |_______|
                    tuning gap
               ______        ______
     _______  |      |      |      | _______
    |       | |      |      |      ||       |
    | feed1 | | pad1 | gap  | pad2 || feed2 |
    |       | |      |      |      ||       |
    |_______| |      |      |      ||_______|
              |______|      |______|
                    tuning gap
                     _______
                    |       |
                    | tpad2 |
                    |       |
                    |_______|
                (connected to feed)
Source code in gdsfactory/components/quantum/coupler_capacitive.py
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
@gf.cell_with_module_name(tags=["quantum"])
def coupler_tunable(
    pad_width: float = 30.0,
    pad_height: float = 40.0,
    gap: float = 3.0,
    tuning_pad_width: float = 15.0,
    tuning_pad_height: float = 20.0,
    tuning_gap: float = 1.0,
    feed_width: float = 10.0,
    feed_length: float = 30.0,
    layer_metal: LayerSpec = (1, 0),
    layer_tuning: LayerSpec = (3, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates a tunable capacitive coupler with voltage control.

    A tunable coupler includes additional electrodes that can be voltage-biased
    to change the coupling strength dynamically.


    Args:
        pad_width: Width of main coupling pads in μm.
        pad_height: Height of main coupling pads in μm.
        gap: Gap between main coupling pads in μm.
        tuning_pad_width: Width of tuning pads in μm.
        tuning_pad_height: Height of tuning pads in μm.
        tuning_gap: Gap to tuning pads in μm.
        feed_width: Width of feed lines in μm.
        feed_length: Length of feed lines in μm.
        layer_metal: Layer for main metal structures.
        layer_tuning: Layer for tuning electrodes.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the tunable coupler geometry.

    ```text
                    (connected to feed)
                         _______
                        |       |
                        | tpad1 |
                        |       |
                        |_______|
                        tuning gap
                   ______        ______
         _______  |      |      |      | _______
        |       | |      |      |      ||       |
        | feed1 | | pad1 | gap  | pad2 || feed2 |
        |       | |      |      |      ||       |
        |_______| |      |      |      ||_______|
                  |______|      |______|
                        tuning gap
                         _______
                        |       |
                        | tpad2 |
                        |       |
                        |_______|
                    (connected to feed)
    ```
    """
    return cf.coupler_tunable(
        pad_width=pad_width,
        pad_height=pad_height,
        gap=gap,
        tuning_pad_width=tuning_pad_width,
        tuning_pad_height=tuning_pad_height,
        tuning_gap=tuning_gap,
        feed_width=feed_width,
        feed_length=feed_length,
        layer_metal=layer_metal,
        layer_tuning=layer_tuning,
        port_type=port_type,
    )

coupler_capacitive

coupler_interdigital

coupler_interdigital(
    fingers: int = 6,
    finger_length: float = 30.0,
    finger_width: float = 2.0,
    finger_gap_vertical: float = 2.0,
    finger_gap_horizontal: float = 3.0,
    feed_width: float = 10.0,
    feed_length: float = 30.0,
    layer_metal: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component

Creates an interdigital capacitive coupler.

Each side includes a base column (a vertical metal block) to which the fingers are attached.

  • The width of the base column is equal to the height of the fingers.
  • The finger_length parameter refers only to the length of the fingers extending from the base, and does NOT include the base column width

Parameters:

Name Type Description Default
fingers int

Number of fingers per side.

6
finger_length float

Length of each finger in μm (see note above).

30.0
finger_width float

Width of each finger in μm.

2.0
finger_gap_vertical float

Vertical gap between fingers in μm (g1).

2.0
finger_gap_horizontal float

Horizontal gap between fingers in μm (g2).

3.0
feed_width float

Width of the feed lines in μm.

10.0
feed_length float

Length of the feed lines in μm.

30.0
layer_metal LayerSpec

Layer for the metal structures.

(1, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the interdigital coupler geometry.

                ┌────────┐
               base columns
               ↓                    ↓
     ┌────────┐                      ┌────────┐
     │        │█████████████        █│        │
     │        │█        g1          █│        │
     │        │█ <─g2─> █████████████│        │
     │        │█                    █│        │
     │ feed1  │█████████████        █│ feed2  │
     │        │█                    █│        │
     │        │█        █████████████│        │
     │        │█                    █│        │
     │        │█████████████        █│        │
     └────────┘█                    █└────────┘
Source code in gdsfactory/components/quantum/coupler_capacitive.py
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
@gf.cell_with_module_name(tags=["quantum"])
def coupler_interdigital(
    fingers: int = 6,
    finger_length: float = 30.0,
    finger_width: float = 2.0,
    finger_gap_vertical: float = 2.0,
    finger_gap_horizontal: float = 3.0,
    feed_width: float = 10.0,
    feed_length: float = 30.0,
    layer_metal: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates an interdigital capacitive coupler.

    Each side includes a base column (a vertical metal block) to which the fingers are attached.

    - The width of the base column is equal to the height of the fingers.
    - The finger_length parameter refers only to the length of the fingers *extending from the base*,
      and does NOT include the base column width

    Args:
        fingers: Number of fingers per side.
        finger_length: Length of each finger in μm (see note above).
        finger_width: Width of each finger in μm.
        finger_gap_vertical: Vertical gap between fingers in μm (g1).
        finger_gap_horizontal: Horizontal gap between fingers in μm (g2).
        feed_width: Width of the feed lines in μm.
        feed_length: Length of the feed lines in μm.
        layer_metal: Layer for the metal structures.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the interdigital coupler geometry.

    ```text
                    ┌────────┐
                   base columns
                   ↓                    ↓
         ┌────────┐                      ┌────────┐
         │        │█████████████        █│        │
         │        │█        g1          █│        │
         │        │█ <─g2─> █████████████│        │
         │        │█                    █│        │
         │ feed1  │█████████████        █│ feed2  │
         │        │█                    █│        │
         │        │█        █████████████│        │
         │        │█                    █│        │
         │        │█████████████        █│        │
         └────────┘█                    █└────────┘
    ```

    """
    return cf.coupler_interdigital(
        fingers=fingers,
        finger_length=finger_length,
        finger_width=finger_width,
        finger_gap_vertical=finger_gap_vertical,
        finger_gap_horizontal=finger_gap_horizontal,
        feed_width=feed_width,
        feed_length=feed_length,
        layer_metal=layer_metal,
        port_type=port_type,
    )

coupler_interdigital

coupler_tunable

coupler_tunable(
    pad_width: float = 30.0,
    pad_height: float = 40.0,
    gap: float = 3.0,
    tuning_pad_width: float = 15.0,
    tuning_pad_height: float = 20.0,
    tuning_gap: float = 1.0,
    feed_width: float = 10.0,
    feed_length: float = 30.0,
    layer_metal: LayerSpec = (1, 0),
    layer_tuning: LayerSpec = (3, 0),
    port_type: str = "electrical",
) -> Component

Creates a tunable capacitive coupler with voltage control.

A tunable coupler includes additional electrodes that can be voltage-biased to change the coupling strength dynamically.

Parameters:

Name Type Description Default
pad_width float

Width of main coupling pads in μm.

30.0
pad_height float

Height of main coupling pads in μm.

40.0
gap float

Gap between main coupling pads in μm.

3.0
tuning_pad_width float

Width of tuning pads in μm.

15.0
tuning_pad_height float

Height of tuning pads in μm.

20.0
tuning_gap float

Gap to tuning pads in μm.

1.0
feed_width float

Width of feed lines in μm.

10.0
feed_length float

Length of feed lines in μm.

30.0
layer_metal LayerSpec

Layer for main metal structures.

(1, 0)
layer_tuning LayerSpec

Layer for tuning electrodes.

(3, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the tunable coupler geometry.

                (connected to feed)
                     _______
                    |       |
                    | tpad1 |
                    |       |
                    |_______|
                    tuning gap
               ______        ______
     _______  |      |      |      | _______
    |       | |      |      |      ||       |
    | feed1 | | pad1 | gap  | pad2 || feed2 |
    |       | |      |      |      ||       |
    |_______| |      |      |      ||_______|
              |______|      |______|
                    tuning gap
                     _______
                    |       |
                    | tpad2 |
                    |       |
                    |_______|
                (connected to feed)
Source code in gdsfactory/components/quantum/coupler_capacitive.py
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
@gf.cell_with_module_name(tags=["quantum"])
def coupler_tunable(
    pad_width: float = 30.0,
    pad_height: float = 40.0,
    gap: float = 3.0,
    tuning_pad_width: float = 15.0,
    tuning_pad_height: float = 20.0,
    tuning_gap: float = 1.0,
    feed_width: float = 10.0,
    feed_length: float = 30.0,
    layer_metal: LayerSpec = (1, 0),
    layer_tuning: LayerSpec = (3, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates a tunable capacitive coupler with voltage control.

    A tunable coupler includes additional electrodes that can be voltage-biased
    to change the coupling strength dynamically.


    Args:
        pad_width: Width of main coupling pads in μm.
        pad_height: Height of main coupling pads in μm.
        gap: Gap between main coupling pads in μm.
        tuning_pad_width: Width of tuning pads in μm.
        tuning_pad_height: Height of tuning pads in μm.
        tuning_gap: Gap to tuning pads in μm.
        feed_width: Width of feed lines in μm.
        feed_length: Length of feed lines in μm.
        layer_metal: Layer for main metal structures.
        layer_tuning: Layer for tuning electrodes.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the tunable coupler geometry.

    ```text
                    (connected to feed)
                         _______
                        |       |
                        | tpad1 |
                        |       |
                        |_______|
                        tuning gap
                   ______        ______
         _______  |      |      |      | _______
        |       | |      |      |      ||       |
        | feed1 | | pad1 | gap  | pad2 || feed2 |
        |       | |      |      |      ||       |
        |_______| |      |      |      ||_______|
                  |______|      |______|
                        tuning gap
                         _______
                        |       |
                        | tpad2 |
                        |       |
                        |_______|
                    (connected to feed)
    ```
    """
    return cf.coupler_tunable(
        pad_width=pad_width,
        pad_height=pad_height,
        gap=gap,
        tuning_pad_width=tuning_pad_width,
        tuning_pad_height=tuning_pad_height,
        tuning_gap=tuning_gap,
        feed_width=feed_width,
        feed_length=feed_length,
        layer_metal=layer_metal,
        layer_tuning=layer_tuning,
        port_type=port_type,
    )

coupler_tunable

flux_qubit

flux_qubit

flux_qubit(
    loop_width: float = 50.0,
    loop_height: float = 50.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    alpha_junction_width: float = 0.12,
    alpha_junction_height: float = 0.25,
    wire_width: float = 2.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_alpha_junction: LayerSpec = (3, 0),
    port_type: str = "electrical",
) -> Component

Creates a flux qubit (persistent current qubit).

A flux qubit consists of a superconducting loop interrupted by three Josephson junctions. Two junctions are identical (beta junctions) while the third is smaller (alpha junction) with roughly 0.5-0.8 times the critical current.

Parameters:

Name Type Description Default
loop_width float

Width of the superconducting loop in μm.

50.0
loop_height float

Height of the superconducting loop in μm.

50.0
junction_width float

Width of the beta Josephson junctions in μm.

0.15
junction_height float

Height of the beta Josephson junctions in μm.

0.3
alpha_junction_width float

Width of the alpha Josephson junction in μm.

0.12
alpha_junction_height float

Height of the alpha Josephson junction in μm.

0.25
wire_width float

Width of the superconducting wires in μm.

2.0
layer_metal LayerSpec

Layer for the metal wires.

(1, 0)
layer_junction LayerSpec

Layer for the beta Josephson junctions.

(2, 0)
layer_alpha_junction LayerSpec

Layer for the alpha Josephson junction.

(3, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the flux qubit geometry.

Source code in gdsfactory/components/quantum/flux_qubit.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@gf.cell_with_module_name(tags=["quantum"])
def flux_qubit(
    loop_width: float = 50.0,
    loop_height: float = 50.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    alpha_junction_width: float = 0.12,
    alpha_junction_height: float = 0.25,
    wire_width: float = 2.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_alpha_junction: LayerSpec = (3, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates a flux qubit (persistent current qubit).

    A flux qubit consists of a superconducting loop interrupted by three Josephson junctions.
    Two junctions are identical (beta junctions) while the third is smaller (alpha junction)
    with roughly 0.5-0.8 times the critical current.

    Args:
        loop_width: Width of the superconducting loop in μm.
        loop_height: Height of the superconducting loop in μm.
        junction_width: Width of the beta Josephson junctions in μm.
        junction_height: Height of the beta Josephson junctions in μm.
        alpha_junction_width: Width of the alpha Josephson junction in μm.
        alpha_junction_height: Height of the alpha Josephson junction in μm.
        wire_width: Width of the superconducting wires in μm.
        layer_metal: Layer for the metal wires.
        layer_junction: Layer for the beta Josephson junctions.
        layer_alpha_junction: Layer for the alpha Josephson junction.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the flux qubit geometry.
    """
    return cf.flux_qubit(
        loop_width=loop_width,
        loop_height=loop_height,
        junction_width=junction_width,
        junction_height=junction_height,
        alpha_junction_width=alpha_junction_width,
        alpha_junction_height=alpha_junction_height,
        wire_width=wire_width,
        layer_metal=layer_metal,
        layer_junction=layer_junction,
        layer_alpha_junction=layer_alpha_junction,
        port_type=port_type,
    )

flux_qubit_asymmetric

flux_qubit_asymmetric(
    loop_width: float = 60.0,
    loop_height: float = 40.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    alpha_junction_width: float = 0.12,
    alpha_junction_height: float = 0.25,
    wire_width: float = 2.0,
    asymmetry_angle: float = 15.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_alpha_junction: LayerSpec = (3, 0),
    port_type: str = "electrical",
) -> Component

Creates an asymmetric flux qubit for reduced flux noise sensitivity.

An asymmetric flux qubit has a loop geometry that is not perfectly symmetric, which can help reduce sensitivity to flux noise while maintaining controllability.

Parameters:

Name Type Description Default
loop_width float

Width of the superconducting loop in μm.

60.0
loop_height float

Height of the superconducting loop in μm.

40.0
junction_width float

Width of the beta Josephson junctions in μm.

0.15
junction_height float

Height of the beta Josephson junctions in μm.

0.3
alpha_junction_width float

Width of the alpha Josephson junction in μm.

0.12
alpha_junction_height float

Height of the alpha Josephson junction in μm.

0.25
wire_width float

Width of the superconducting wires in μm.

2.0
asymmetry_angle float

Angle of asymmetry in degrees.

15.0
layer_metal LayerSpec

Layer for the metal wires.

(1, 0)
layer_junction LayerSpec

Layer for the beta Josephson junctions.

(2, 0)
layer_alpha_junction LayerSpec

Layer for the alpha Josephson junction.

(3, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the asymmetric flux qubit geometry.

Source code in gdsfactory/components/quantum/flux_qubit.py
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@gf.cell_with_module_name(tags=["quantum"])
def flux_qubit_asymmetric(
    loop_width: float = 60.0,
    loop_height: float = 40.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    alpha_junction_width: float = 0.12,
    alpha_junction_height: float = 0.25,
    wire_width: float = 2.0,
    asymmetry_angle: float = 15.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_alpha_junction: LayerSpec = (3, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates an asymmetric flux qubit for reduced flux noise sensitivity.

    An asymmetric flux qubit has a loop geometry that is not perfectly symmetric,
    which can help reduce sensitivity to flux noise while maintaining controllability.

    Args:
        loop_width: Width of the superconducting loop in μm.
        loop_height: Height of the superconducting loop in μm.
        junction_width: Width of the beta Josephson junctions in μm.
        junction_height: Height of the beta Josephson junctions in μm.
        alpha_junction_width: Width of the alpha Josephson junction in μm.
        alpha_junction_height: Height of the alpha Josephson junction in μm.
        wire_width: Width of the superconducting wires in μm.
        asymmetry_angle: Angle of asymmetry in degrees.
        layer_metal: Layer for the metal wires.
        layer_junction: Layer for the beta Josephson junctions.
        layer_alpha_junction: Layer for the alpha Josephson junction.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the asymmetric flux qubit geometry.
    """
    return cf.flux_qubit_asymmetric(
        loop_width=loop_width,
        loop_height=loop_height,
        junction_width=junction_width,
        junction_height=junction_height,
        alpha_junction_width=alpha_junction_width,
        alpha_junction_height=alpha_junction_height,
        wire_width=wire_width,
        asymmetry_angle=asymmetry_angle,
        layer_metal=layer_metal,
        layer_junction=layer_junction,
        layer_alpha_junction=layer_alpha_junction,
        port_type=port_type,
    )

flux_qubit

flux_qubit_asymmetric

flux_qubit_asymmetric(
    loop_width: float = 60.0,
    loop_height: float = 40.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    alpha_junction_width: float = 0.12,
    alpha_junction_height: float = 0.25,
    wire_width: float = 2.0,
    asymmetry_angle: float = 15.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_alpha_junction: LayerSpec = (3, 0),
    port_type: str = "electrical",
) -> Component

Creates an asymmetric flux qubit for reduced flux noise sensitivity.

An asymmetric flux qubit has a loop geometry that is not perfectly symmetric, which can help reduce sensitivity to flux noise while maintaining controllability.

Parameters:

Name Type Description Default
loop_width float

Width of the superconducting loop in μm.

60.0
loop_height float

Height of the superconducting loop in μm.

40.0
junction_width float

Width of the beta Josephson junctions in μm.

0.15
junction_height float

Height of the beta Josephson junctions in μm.

0.3
alpha_junction_width float

Width of the alpha Josephson junction in μm.

0.12
alpha_junction_height float

Height of the alpha Josephson junction in μm.

0.25
wire_width float

Width of the superconducting wires in μm.

2.0
asymmetry_angle float

Angle of asymmetry in degrees.

15.0
layer_metal LayerSpec

Layer for the metal wires.

(1, 0)
layer_junction LayerSpec

Layer for the beta Josephson junctions.

(2, 0)
layer_alpha_junction LayerSpec

Layer for the alpha Josephson junction.

(3, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the asymmetric flux qubit geometry.

Source code in gdsfactory/components/quantum/flux_qubit.py
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
@gf.cell_with_module_name(tags=["quantum"])
def flux_qubit_asymmetric(
    loop_width: float = 60.0,
    loop_height: float = 40.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    alpha_junction_width: float = 0.12,
    alpha_junction_height: float = 0.25,
    wire_width: float = 2.0,
    asymmetry_angle: float = 15.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_alpha_junction: LayerSpec = (3, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates an asymmetric flux qubit for reduced flux noise sensitivity.

    An asymmetric flux qubit has a loop geometry that is not perfectly symmetric,
    which can help reduce sensitivity to flux noise while maintaining controllability.

    Args:
        loop_width: Width of the superconducting loop in μm.
        loop_height: Height of the superconducting loop in μm.
        junction_width: Width of the beta Josephson junctions in μm.
        junction_height: Height of the beta Josephson junctions in μm.
        alpha_junction_width: Width of the alpha Josephson junction in μm.
        alpha_junction_height: Height of the alpha Josephson junction in μm.
        wire_width: Width of the superconducting wires in μm.
        asymmetry_angle: Angle of asymmetry in degrees.
        layer_metal: Layer for the metal wires.
        layer_junction: Layer for the beta Josephson junctions.
        layer_alpha_junction: Layer for the alpha Josephson junction.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the asymmetric flux qubit geometry.
    """
    return cf.flux_qubit_asymmetric(
        loop_width=loop_width,
        loop_height=loop_height,
        junction_width=junction_width,
        junction_height=junction_height,
        alpha_junction_width=alpha_junction_width,
        alpha_junction_height=alpha_junction_height,
        wire_width=wire_width,
        asymmetry_angle=asymmetry_angle,
        layer_metal=layer_metal,
        layer_junction=layer_junction,
        layer_alpha_junction=layer_alpha_junction,
        port_type=port_type,
    )

flux_qubit_asymmetric

resonator_cpw

resonator_cpw(
    length: float = 1000.0,
    width: float = 10.0,
    gap: float = 6.0,
    meander_pitch: float = 50.0,
    meander_width: float = 200.0,
    coupling_gap: float = 5.0,
    coupling_length: float = 100.0,
    layer_metal: LayerSpec = (1, 0),
    layer_gap: LayerSpec = (2, 0),
    port_type: str = "electrical",
) -> Component

Creates a half-wave coplanar waveguide (CPW) resonator.

The resonator is a meandered coplanar waveguide: a center conductor on layer_metal flanked by two slots on layer_gap which are etched out of the surrounding ground plane. Both ends are straight coupling arms whose slots are widened (or narrowed) to coupling_gap so the coupling to a feedline or qubit can be tuned independently of the resonator impedance.

Parameters:

Name Type Description Default
length float

Target length of the meandered section in μm. The number of meander turns is rounded to fit; the length actually drawn is reported in component.info["length"].

1000.0
width float

Width of the center conductor in μm.

10.0
gap float

Slot width on each side of the center conductor in μm.

6.0
meander_pitch float

Pitch between meander runs in μm. Sets the bend radius to meander_pitch / 2.

50.0
meander_width float

Span of each meander run in μm. Must exceed meander_pitch.

200.0
coupling_gap float

Slot width in the coupling arms in μm.

5.0
coupling_length float

Length of each coupling arm in μm.

100.0
layer_metal LayerSpec

Layer for the metal center conductor.

(1, 0)
layer_gap LayerSpec

Layer for the slots etched out of the ground plane.

(2, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the CPW resonator geometry.

Source code in gdsfactory/components/quantum/resonator.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@gf.cell_with_module_name(tags=["quantum"])
def resonator_cpw(
    length: float = 1000.0,
    width: float = 10.0,
    gap: float = 6.0,
    meander_pitch: float = 50.0,
    meander_width: float = 200.0,
    coupling_gap: float = 5.0,
    coupling_length: float = 100.0,
    layer_metal: LayerSpec = (1, 0),
    layer_gap: LayerSpec = (2, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates a half-wave coplanar waveguide (CPW) resonator.

    The resonator is a meandered coplanar waveguide: a center conductor on
    ``layer_metal`` flanked by two slots on ``layer_gap`` which are etched out of
    the surrounding ground plane. Both ends are straight coupling arms whose
    slots are widened (or narrowed) to ``coupling_gap`` so the coupling to a
    feedline or qubit can be tuned independently of the resonator impedance.

    Args:
        length: Target length of the meandered section in μm. The number of
            meander turns is rounded to fit; the length actually drawn is
            reported in ``component.info["length"]``.
        width: Width of the center conductor in μm.
        gap: Slot width on each side of the center conductor in μm.
        meander_pitch: Pitch between meander runs in μm. Sets the bend radius to
            ``meander_pitch / 2``.
        meander_width: Span of each meander run in μm. Must exceed
            ``meander_pitch``.
        coupling_gap: Slot width in the coupling arms in μm.
        coupling_length: Length of each coupling arm in μm.
        layer_metal: Layer for the metal center conductor.
        layer_gap: Layer for the slots etched out of the ground plane.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the CPW resonator geometry.
    """
    return cf.resonator_cpw(
        length=length,
        width=width,
        gap=gap,
        meander_pitch=meander_pitch,
        meander_width=meander_width,
        coupling_gap=coupling_gap,
        coupling_length=coupling_length,
        layer_metal=layer_metal,
        layer_gap=layer_gap,
        port_type=port_type,
    )

resonator_cpw

resonator_lumped

resonator_lumped(
    capacitor_fingers: int = 4,
    capacitor_finger_length: float = 20.0,
    capacitor_finger_gap: float = 2.0,
    capacitor_thickness: float = 5.0,
    inductor_width: float = 2.0,
    inductor_turns: int = 3,
    inductor_radius: float = 20.0,
    inductor_run: float = 60.0,
    coupling_gap: float = 5.0,
    layer_metal: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component

Creates a lumped element resonator: an interdigital capacitor in series with a meander inductor.

The interdigital capacitor and the meander inductor are galvanically connected by a straight interconnect, so the component is a two terminal series LC with ports on the outer terminal of each element.

Parameters:

Name Type Description Default
capacitor_fingers int

Number of fingers in the interdigital capacitor.

4
capacitor_finger_length float

Length of each capacitor finger in μm.

20.0
capacitor_finger_gap float

Gap between capacitor fingers in μm.

2.0
capacitor_thickness float

Thickness of capacitor fingers in μm.

5.0
inductor_width float

Width of the inductor wire in μm.

2.0
inductor_turns int

Number of 180 degree turns in the meander inductor.

3
inductor_radius float

Bend radius of the meander inductor in μm.

20.0
inductor_run float

Length of each straight run of the meander inductor in μm.

60.0
coupling_gap float

Length of the interconnect between capacitor and inductor in μm.

5.0
layer_metal LayerSpec

Layer for the metal structures.

(1, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the lumped resonator geometry.

Source code in gdsfactory/components/quantum/resonator.py
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@gf.cell_with_module_name(tags=["quantum"])
def resonator_lumped(
    capacitor_fingers: int = 4,
    capacitor_finger_length: float = 20.0,
    capacitor_finger_gap: float = 2.0,
    capacitor_thickness: float = 5.0,
    inductor_width: float = 2.0,
    inductor_turns: int = 3,
    inductor_radius: float = 20.0,
    inductor_run: float = 60.0,
    coupling_gap: float = 5.0,
    layer_metal: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates a lumped element resonator: an interdigital capacitor in series with a meander inductor.

    The interdigital capacitor and the meander inductor are galvanically
    connected by a straight interconnect, so the component is a two terminal
    series LC with ports on the outer terminal of each element.

    Args:
        capacitor_fingers: Number of fingers in the interdigital capacitor.
        capacitor_finger_length: Length of each capacitor finger in μm.
        capacitor_finger_gap: Gap between capacitor fingers in μm.
        capacitor_thickness: Thickness of capacitor fingers in μm.
        inductor_width: Width of the inductor wire in μm.
        inductor_turns: Number of 180 degree turns in the meander inductor.
        inductor_radius: Bend radius of the meander inductor in μm.
        inductor_run: Length of each straight run of the meander inductor in μm.
        coupling_gap: Length of the interconnect between capacitor and inductor in μm.
        layer_metal: Layer for the metal structures.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the lumped resonator geometry.
    """
    return cf.resonator_lumped(
        capacitor_fingers=capacitor_fingers,
        capacitor_finger_length=capacitor_finger_length,
        capacitor_finger_gap=capacitor_finger_gap,
        capacitor_thickness=capacitor_thickness,
        inductor_width=inductor_width,
        inductor_turns=inductor_turns,
        inductor_radius=inductor_radius,
        inductor_run=inductor_run,
        coupling_gap=coupling_gap,
        layer_metal=layer_metal,
        port_type=port_type,
    )

resonator_lumped

resonator_quarter_wave

resonator_quarter_wave(
    length: float = 2500.0,
    width: float = 10.0,
    gap: float = 6.0,
    short_stub_length: float = 50.0,
    coupling_gap: float = 5.0,
    coupling_length: float = 100.0,
    layer_metal: LayerSpec = (1, 0),
    layer_gap: LayerSpec = (2, 0),
    port_type: str = "electrical",
) -> Component

Creates a quarter-wave coplanar waveguide resonator.

A quarter-wave resonator is shorted at one end and has maximum electric field at the open end, making it suitable for capacitive coupling.

Parameters:

Name Type Description Default
length float

Length of the quarter-wave resonator in μm.

2500.0
width float

Width of the center conductor in μm.

10.0
gap float

Gap width on each side of the center conductor in μm.

6.0
short_stub_length float

Length of the shorting stub in μm.

50.0
coupling_gap float

Gap for capacitive coupling in μm.

5.0
coupling_length float

Length of the coupling region in μm.

100.0
layer_metal LayerSpec

Layer for the metal conductor.

(1, 0)
layer_gap LayerSpec

Layer for the gaps.

(2, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the quarter-wave resonator geometry.

Source code in gdsfactory/components/quantum/resonator.py
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
@gf.cell_with_module_name(tags=["quantum"])
def resonator_quarter_wave(
    length: float = 2500.0,
    width: float = 10.0,
    gap: float = 6.0,
    short_stub_length: float = 50.0,
    coupling_gap: float = 5.0,
    coupling_length: float = 100.0,
    layer_metal: LayerSpec = (1, 0),
    layer_gap: LayerSpec = (2, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates a quarter-wave coplanar waveguide resonator.

    A quarter-wave resonator is shorted at one end and has maximum electric field
    at the open end, making it suitable for capacitive coupling.

    Args:
        length: Length of the quarter-wave resonator in μm.
        width: Width of the center conductor in μm.
        gap: Gap width on each side of the center conductor in μm.
        short_stub_length: Length of the shorting stub in μm.
        coupling_gap: Gap for capacitive coupling in μm.
        coupling_length: Length of the coupling region in μm.
        layer_metal: Layer for the metal conductor.
        layer_gap: Layer for the gaps.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the quarter-wave resonator geometry.
    """
    return cf.resonator_quarter_wave(
        length=length,
        width=width,
        gap=gap,
        short_stub_length=short_stub_length,
        coupling_gap=coupling_gap,
        coupling_length=coupling_length,
        layer_metal=layer_metal,
        layer_gap=layer_gap,
        port_type=port_type,
    )

resonator_quarter_wave

transmon

transmon

transmon(
    pad_width: float = 200.0,
    pad_height: float = 100.0,
    pad_gap: float = 6.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    island_width: float = 10.0,
    island_height: float = 4.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_island: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component

Creates a transmon qubit with Josephson junction.

A transmon qubit consists of two capacitor pads connected by a Josephson junction. The junction creates an anharmonic oscillator that can be used as a qubit.

Parameters:

Name Type Description Default
pad_width float

Width of each capacitor pad in μm.

200.0
pad_height float

Height of each capacitor pad in μm.

100.0
pad_gap float

Gap between the two pads in μm.

6.0
junction_width float

Width of the Josephson junction in μm.

0.15
junction_height float

Height of the Josephson junction in μm.

0.3
island_width float

Width of the central island in μm.

10.0
island_height float

Height of the central island in μm.

4.0
layer_metal LayerSpec

Layer for the metal pads.

(1, 0)
layer_junction LayerSpec

Layer for the Josephson junction.

(2, 0)
layer_island LayerSpec

Layer for the central island.

(1, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the transmon geometry.

Source code in gdsfactory/components/quantum/transmon.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@gf.cell_with_module_name(tags=["quantum"])
def transmon(
    pad_width: float = 200.0,
    pad_height: float = 100.0,
    pad_gap: float = 6.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    island_width: float = 10.0,
    island_height: float = 4.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_island: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates a transmon qubit with Josephson junction.

    A transmon qubit consists of two capacitor pads connected by a Josephson junction.
    The junction creates an anharmonic oscillator that can be used as a qubit.

    Args:
        pad_width: Width of each capacitor pad in μm.
        pad_height: Height of each capacitor pad in μm.
        pad_gap: Gap between the two pads in μm.
        junction_width: Width of the Josephson junction in μm.
        junction_height: Height of the Josephson junction in μm.
        island_width: Width of the central island in μm.
        island_height: Height of the central island in μm.
        layer_metal: Layer for the metal pads.
        layer_junction: Layer for the Josephson junction.
        layer_island: Layer for the central island.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the transmon geometry.
    """
    return cf.transmon(
        pad_width=pad_width,
        pad_height=pad_height,
        pad_gap=pad_gap,
        junction_width=junction_width,
        junction_height=junction_height,
        island_width=island_width,
        island_height=island_height,
        layer_metal=layer_metal,
        layer_junction=layer_junction,
        layer_island=layer_island,
        port_type=port_type,
    )

transmon_circular

transmon_circular(
    pad_radius: float = 100.0,
    pad_gap: float = 6.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    island_radius: float = 5.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_island: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component

Creates a circular transmon qubit with Josephson junction.

A circular variant of the transmon qubit with circular capacitor pads.

Parameters:

Name Type Description Default
pad_radius float

Radius of each circular capacitor pad in μm.

100.0
pad_gap float

Gap between the two pads in μm.

6.0
junction_width float

Width of the Josephson junction in μm.

0.15
junction_height float

Height of the Josephson junction in μm.

0.3
island_radius float

Radius of the central circular island in μm.

5.0
layer_metal LayerSpec

Layer for the metal pads.

(1, 0)
layer_junction LayerSpec

Layer for the Josephson junction.

(2, 0)
layer_island LayerSpec

Layer for the central island.

(1, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the circular transmon geometry.

Source code in gdsfactory/components/quantum/transmon.py
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@gf.cell_with_module_name(tags=["quantum"])
def transmon_circular(
    pad_radius: float = 100.0,
    pad_gap: float = 6.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    island_radius: float = 5.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_island: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates a circular transmon qubit with Josephson junction.

    A circular variant of the transmon qubit with circular capacitor pads.

    Args:
        pad_radius: Radius of each circular capacitor pad in μm.
        pad_gap: Gap between the two pads in μm.
        junction_width: Width of the Josephson junction in μm.
        junction_height: Height of the Josephson junction in μm.
        island_radius: Radius of the central circular island in μm.
        layer_metal: Layer for the metal pads.
        layer_junction: Layer for the Josephson junction.
        layer_island: Layer for the central island.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the circular transmon geometry.
    """
    return cf.transmon_circular(
        pad_radius=pad_radius,
        pad_gap=pad_gap,
        junction_width=junction_width,
        junction_height=junction_height,
        island_radius=island_radius,
        layer_metal=layer_metal,
        layer_junction=layer_junction,
        layer_island=layer_island,
        port_type=port_type,
    )

transmon

transmon_circular

transmon_circular(
    pad_radius: float = 100.0,
    pad_gap: float = 6.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    island_radius: float = 5.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_island: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component

Creates a circular transmon qubit with Josephson junction.

A circular variant of the transmon qubit with circular capacitor pads.

Parameters:

Name Type Description Default
pad_radius float

Radius of each circular capacitor pad in μm.

100.0
pad_gap float

Gap between the two pads in μm.

6.0
junction_width float

Width of the Josephson junction in μm.

0.15
junction_height float

Height of the Josephson junction in μm.

0.3
island_radius float

Radius of the central circular island in μm.

5.0
layer_metal LayerSpec

Layer for the metal pads.

(1, 0)
layer_junction LayerSpec

Layer for the Josephson junction.

(2, 0)
layer_island LayerSpec

Layer for the central island.

(1, 0)
port_type str

Type of port to add to the component.

'electrical'

Returns:

Name Type Description
Component Component

A gdsfactory component with the circular transmon geometry.

Source code in gdsfactory/components/quantum/transmon.py
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@gf.cell_with_module_name(tags=["quantum"])
def transmon_circular(
    pad_radius: float = 100.0,
    pad_gap: float = 6.0,
    junction_width: float = 0.15,
    junction_height: float = 0.3,
    island_radius: float = 5.0,
    layer_metal: LayerSpec = (1, 0),
    layer_junction: LayerSpec = (2, 0),
    layer_island: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates a circular transmon qubit with Josephson junction.

    A circular variant of the transmon qubit with circular capacitor pads.

    Args:
        pad_radius: Radius of each circular capacitor pad in μm.
        pad_gap: Gap between the two pads in μm.
        junction_width: Width of the Josephson junction in μm.
        junction_height: Height of the Josephson junction in μm.
        island_radius: Radius of the central circular island in μm.
        layer_metal: Layer for the metal pads.
        layer_junction: Layer for the Josephson junction.
        layer_island: Layer for the central island.
        port_type: Type of port to add to the component.

    Returns:
        Component: A gdsfactory component with the circular transmon geometry.
    """
    return cf.transmon_circular(
        pad_radius=pad_radius,
        pad_gap=pad_gap,
        junction_width=junction_width,
        junction_height=junction_height,
        island_radius=island_radius,
        layer_metal=layer_metal,
        layer_junction=layer_junction,
        layer_island=layer_island,
        port_type=port_type,
    )

transmon_circular

rings

coupler_bend

coupler_bend(
    radius: float | None = None,
    coupler_gap: float = 0.2,
    coupling_angle_coverage: float = 120.0,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
    bend: (
        str | AnyComponentFactory
    ) = "bend_circular_all_angle",
    bend_output: ComponentSpec = "bend_euler",
) -> Component

Compact curved coupler with bezier escape.

TODO: fix for euler bends.

Parameters:

Name Type Description Default
radius float | None

um.

None
coupler_gap float

um.

0.2
coupling_angle_coverage float

degrees.

120.0
cross_section_inner CrossSectionSpec

spec inner bend.

'strip'
cross_section_outer CrossSectionSpec

spec outer bend.

'strip'
bend str | AnyComponentFactory

for bend.

'bend_circular_all_angle'
bend_output ComponentSpec

for bend.

'bend_euler'
        r   4
        |   |
        |  / ___3
        | / /
    2____/ /
    1_____/
Source code in gdsfactory/components/rings/ring_single_bend_coupler.py
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["rings"])
def coupler_bend(
    radius: float | None = None,
    coupler_gap: float = 0.2,
    coupling_angle_coverage: float = 120.0,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
    bend: str | AnyComponentFactory = "bend_circular_all_angle",
    bend_output: ComponentSpec = "bend_euler",
) -> Component:
    r"""Compact curved coupler with bezier escape.

    TODO: fix for euler bends.

    Args:
        radius: um.
        coupler_gap: um.
        coupling_angle_coverage: degrees.
        cross_section_inner: spec inner bend.
        cross_section_outer: spec outer bend.
        bend: for bend.
        bend_output: for bend.

    ```text
            r   4
            |   |
            |  / ___3
            | / /
        2____/ /
        1_____/
    ```
    """
    return cf.coupler_bend(
        radius=radius,
        coupler_gap=coupler_gap,
        coupling_angle_coverage=coupling_angle_coverage,
        cross_section_inner=cross_section_inner,
        cross_section_outer=cross_section_outer,
        bend=bend,
        bend_output=bend_output,
    )

coupler_bend

coupler_ring_bend

coupler_ring_bend(
    radius: float | None = None,
    coupler_gap: float = 0.2,
    coupling_angle_coverage: float = 90.0,
    length_x: float = 0.0,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
    bend: (
        str | AnyComponentFactory
    ) = "bend_circular_all_angle",
    bend_output: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
) -> Component

Two back-to-back coupler_bend.

Parameters:

Name Type Description Default
radius float | None

um. Default is None, which uses the default radius of the cross_section.

None
coupler_gap float

um.

0.2
coupling_angle_coverage float

degrees.

90.0
length_x float

horizontal straight length.

0.0
cross_section_inner CrossSectionSpec

spec inner bend.

'strip'
cross_section_outer CrossSectionSpec

spec outer bend.

'strip'
bend str | AnyComponentFactory

for bend.

'bend_circular_all_angle'
bend_output ComponentSpec

for bend.

'bend_euler'
straight ComponentSpec

for straight.

'straight'
Source code in gdsfactory/components/rings/ring_single_bend_coupler.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@gf.cell_with_module_name(schematic_function=coupler_ring_schematic, tags=["rings"])
def coupler_ring_bend(
    radius: float | None = None,
    coupler_gap: float = 0.2,
    coupling_angle_coverage: float = 90.0,
    length_x: float = 0.0,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
    bend: str | AnyComponentFactory = "bend_circular_all_angle",
    bend_output: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
) -> Component:
    r"""Two back-to-back coupler_bend.

    Args:
        radius: um. Default is None, which uses the default radius of the cross_section.
        coupler_gap: um.
        coupling_angle_coverage: degrees.
        length_x: horizontal straight length.
        cross_section_inner: spec inner bend.
        cross_section_outer: spec outer bend.
        bend: for bend.
        bend_output: for bend.
        straight: for straight.
    """
    return cf.coupler_ring_bend(
        radius=radius,
        coupler_gap=coupler_gap,
        coupling_angle_coverage=coupling_angle_coverage,
        length_x=length_x,
        cross_section_inner=cross_section_inner,
        cross_section_outer=cross_section_outer,
        bend=bend,
        bend_output=bend_output,
        straight=straight,
    )

coupler_ring_bend

disk

disk

disk(
    radius: float = 10.0,
    gap: float = 0.2,
    wrap_angle_deg: float = 180.0,
    parity: int = 1,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Disk Resonator.

Parameters:

Name Type Description Default
radius float

disk resonator radius.

10.0
gap float

Distance between the bus straight and resonator.

0.2
wrap_angle_deg float

Angle in degrees between 0 and 180. determines how much the bus straight wraps along the resonator. 0 corresponds to a straight bus straight. 180 corresponds to a bus straight wrapped around half of the resonator.

180.0
parity int

1 or -1. 1 places the resonator left from the bus straight, -1 places it to the right.

1
cross_section CrossSectionSpec

cross_section spec.

'strip'
Source code in gdsfactory/components/rings/disk.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@gf.cell_with_module_name(schematic_function=ring_single_schematic, tags=["rings"])
def disk(
    radius: float = 10.0,
    gap: float = 0.2,
    wrap_angle_deg: float = 180.0,
    parity: int = 1,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Disk Resonator.

    Args:
        radius: disk resonator radius.
        gap: Distance between the bus straight and resonator.
        wrap_angle_deg: Angle in degrees between 0 and 180.
            determines how much the bus straight wraps along the resonator.
            0 corresponds to a straight bus straight.
            180 corresponds to a bus straight wrapped around half of the resonator.
        parity: 1 or -1. 1 places the resonator left from the bus straight,
            -1 places it to the right.
        cross_section: cross_section spec.
    """
    return cf.disk(
        radius=radius,
        gap=gap,
        wrap_angle_deg=wrap_angle_deg,
        parity=parity,
        cross_section=cross_section,
    )

disk_heater

disk_heater(
    radius: float = 10.0,
    gap: float = 0.2,
    wrap_angle_deg: float = 180.0,
    parity: int = 1,
    cross_section: CrossSectionSpec = "strip",
    heater_layer: LayerSpec = "HEATER",
    via_stack: ComponentSpec = "via_stack_heater_mtop",
    heater_width: float = 5.0,
    heater_extent: float = 2.0,
    via_width: float = 10.0,
    port_orientation: AngleInDegrees | None = 90,
) -> Component

Disk Resonator with top metal heater.

Parameters:

Name Type Description Default
radius float

disk resonator radius.

10.0
gap float

Distance between the bus straight and resonator.

0.2
wrap_angle_deg float

Angle in degrees between 0 and 180. determines how much the bus straight wraps along the resonator. 0 corresponds to a straight bus straight. 180 corresponds to a bus straight wrapped around half of the resonator.

180.0
parity int

1 or -1. 1 places the resonator left from the bus straight, -1 places it to the right.

1
cross_section CrossSectionSpec

cross_section spec.

'strip'
heater_layer LayerSpec

layer of the heater.

'HEATER'
via_stack ComponentSpec

via stack component.

'via_stack_heater_mtop'
heater_width float

width of the heater.

5.0
heater_extent float

length of heater beyond disk.

2.0
via_width float

size of the square via at the end of the heater.

10.0
port_orientation AngleInDegrees | None

in degrees.

90
Source code in gdsfactory/components/rings/disk.py
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@gf.cell_with_module_name(schematic_function=ring_single_schematic, tags=["rings"])
def disk_heater(
    radius: float = 10.0,
    gap: float = 0.2,
    wrap_angle_deg: float = 180.0,
    parity: int = 1,
    cross_section: CrossSectionSpec = "strip",
    heater_layer: LayerSpec = "HEATER",
    via_stack: ComponentSpec = "via_stack_heater_mtop",
    heater_width: float = 5.0,
    heater_extent: float = 2.0,
    via_width: float = 10.0,
    port_orientation: AngleInDegrees | None = 90,
) -> Component:
    """Disk Resonator with top metal heater.

    Args:
        radius: disk resonator radius.
        gap: Distance between the bus straight and resonator.
        wrap_angle_deg: Angle in degrees between 0 and 180.
            determines how much the bus straight wraps along the resonator.
            0 corresponds to a straight bus straight.
            180 corresponds to a bus straight wrapped around half of the resonator.
        parity: 1 or -1. 1 places the resonator left from the bus straight,
            -1 places it to the right.
        cross_section: cross_section spec.
        heater_layer: layer of the heater.
        via_stack: via stack component.
        heater_width: width of the heater.
        heater_extent: length of heater beyond disk.
        via_width: size of the square via at the end of the heater.
        port_orientation: in degrees.
    """
    return cf.disk_heater(
        radius=radius,
        gap=gap,
        wrap_angle_deg=wrap_angle_deg,
        parity=parity,
        cross_section=cross_section,
        heater_layer=heater_layer,
        via_stack=via_stack,
        heater_width=heater_width,
        heater_extent=heater_extent,
        via_width=via_width,
        port_orientation=port_orientation,
    )

disk

disk_heater

disk_heater(
    radius: float = 10.0,
    gap: float = 0.2,
    wrap_angle_deg: float = 180.0,
    parity: int = 1,
    cross_section: CrossSectionSpec = "strip",
    heater_layer: LayerSpec = "HEATER",
    via_stack: ComponentSpec = "via_stack_heater_mtop",
    heater_width: float = 5.0,
    heater_extent: float = 2.0,
    via_width: float = 10.0,
    port_orientation: AngleInDegrees | None = 90,
) -> Component

Disk Resonator with top metal heater.

Parameters:

Name Type Description Default
radius float

disk resonator radius.

10.0
gap float

Distance between the bus straight and resonator.

0.2
wrap_angle_deg float

Angle in degrees between 0 and 180. determines how much the bus straight wraps along the resonator. 0 corresponds to a straight bus straight. 180 corresponds to a bus straight wrapped around half of the resonator.

180.0
parity int

1 or -1. 1 places the resonator left from the bus straight, -1 places it to the right.

1
cross_section CrossSectionSpec

cross_section spec.

'strip'
heater_layer LayerSpec

layer of the heater.

'HEATER'
via_stack ComponentSpec

via stack component.

'via_stack_heater_mtop'
heater_width float

width of the heater.

5.0
heater_extent float

length of heater beyond disk.

2.0
via_width float

size of the square via at the end of the heater.

10.0
port_orientation AngleInDegrees | None

in degrees.

90
Source code in gdsfactory/components/rings/disk.py
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@gf.cell_with_module_name(schematic_function=ring_single_schematic, tags=["rings"])
def disk_heater(
    radius: float = 10.0,
    gap: float = 0.2,
    wrap_angle_deg: float = 180.0,
    parity: int = 1,
    cross_section: CrossSectionSpec = "strip",
    heater_layer: LayerSpec = "HEATER",
    via_stack: ComponentSpec = "via_stack_heater_mtop",
    heater_width: float = 5.0,
    heater_extent: float = 2.0,
    via_width: float = 10.0,
    port_orientation: AngleInDegrees | None = 90,
) -> Component:
    """Disk Resonator with top metal heater.

    Args:
        radius: disk resonator radius.
        gap: Distance between the bus straight and resonator.
        wrap_angle_deg: Angle in degrees between 0 and 180.
            determines how much the bus straight wraps along the resonator.
            0 corresponds to a straight bus straight.
            180 corresponds to a bus straight wrapped around half of the resonator.
        parity: 1 or -1. 1 places the resonator left from the bus straight,
            -1 places it to the right.
        cross_section: cross_section spec.
        heater_layer: layer of the heater.
        via_stack: via stack component.
        heater_width: width of the heater.
        heater_extent: length of heater beyond disk.
        via_width: size of the square via at the end of the heater.
        port_orientation: in degrees.
    """
    return cf.disk_heater(
        radius=radius,
        gap=gap,
        wrap_angle_deg=wrap_angle_deg,
        parity=parity,
        cross_section=cross_section,
        heater_layer=heater_layer,
        via_stack=via_stack,
        heater_width=heater_width,
        heater_extent=heater_extent,
        via_width=via_width,
        port_orientation=port_orientation,
    )

disk_heater

ring

ring

ring(
    radius: float = 10.0,
    width: float = 0.5,
    angle_resolution: float = 2.5,
    layer: LayerSpec = "WG",
    angle: float = 360,
    distance_resolution: float | None = None,
) -> Component

Returns a ring.

Parameters:

Name Type Description Default
radius float

ring radius.

10.0
width float

of the ring.

0.5
angle_resolution float

max number of degrees per point.

2.5
layer LayerSpec

layer.

'WG'
angle float

angular coverage of the ring

360
distance_resolution float | None

max distance between points. This is an alternate way to describe the resolution besides setting angle_resolution. If distance_resolution and angle_resolution are both set, distance_resolution determines the resolution.

None
Source code in gdsfactory/components/rings/ring.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@gf.cell_with_module_name(tags=["rings"])
def ring(
    radius: float = 10.0,
    width: float = 0.5,
    angle_resolution: float = 2.5,
    layer: LayerSpec = "WG",
    angle: float = 360,
    distance_resolution: float | None = None,
) -> Component:
    """Returns a ring.

    Args:
        radius: ring radius.
        width: of the ring.
        angle_resolution: max number of degrees per point.
        layer: layer.
        angle: angular coverage of the ring
        distance_resolution: max distance between points. This is an alternate way to describe the resolution besides setting angle_resolution. If distance_resolution and angle_resolution are both set, distance_resolution determines the resolution.
    """
    return cf.ring(
        radius=radius,
        width=width,
        angle_resolution=angle_resolution,
        layer=layer,
        angle=angle,
        distance_resolution=distance_resolution,
    )

ring

ring_asymmetric

ring_asymmetric(
    radius: float = 10.0,
    length_x: float = 2.0,
    length_y: float = 4.0,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_circular",
    cross_section: CrossSectionSpec = "strip",
) -> Component

An asymmetric ring with straight waveguides between the bends.

Parameters:

Name Type Description Default
radius float

of the ring.

10.0
length_x float

horizontal straight length.

2.0
length_y float

vertical straight length.

4.0
straight ComponentSpec

straight component spec.

'straight'
bend ComponentSpec

bend component spec.

'bend_circular'
cross_section CrossSectionSpec

cross_section spec.

'strip'
Source code in gdsfactory/components/rings/ring_crow.py
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@gf.cell_with_module_name(tags=["rings"])
def ring_asymmetric(
    radius: float = 10.0,
    length_x: float = 2.0,
    length_y: float = 4.0,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_circular",
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """An asymmetric ring with straight waveguides between the bends.

    Args:
        radius: of the ring.
        length_x: horizontal straight length.
        length_y: vertical straight length.
        straight: straight component spec.
        bend: bend component spec.
        cross_section: cross_section spec.
    """
    return cf.ring_asymmetric(
        radius=radius,
        length_x=length_x,
        length_y=length_y,
        straight=straight,
        bend=bend,
        cross_section=cross_section,
    )

ring_asymmetric

ring_crow

ring_asymmetric

ring_asymmetric(
    radius: float = 10.0,
    length_x: float = 2.0,
    length_y: float = 4.0,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_circular",
    cross_section: CrossSectionSpec = "strip",
) -> Component

An asymmetric ring with straight waveguides between the bends.

Parameters:

Name Type Description Default
radius float

of the ring.

10.0
length_x float

horizontal straight length.

2.0
length_y float

vertical straight length.

4.0
straight ComponentSpec

straight component spec.

'straight'
bend ComponentSpec

bend component spec.

'bend_circular'
cross_section CrossSectionSpec

cross_section spec.

'strip'
Source code in gdsfactory/components/rings/ring_crow.py
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
@gf.cell_with_module_name(tags=["rings"])
def ring_asymmetric(
    radius: float = 10.0,
    length_x: float = 2.0,
    length_y: float = 4.0,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_circular",
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """An asymmetric ring with straight waveguides between the bends.

    Args:
        radius: of the ring.
        length_x: horizontal straight length.
        length_y: vertical straight length.
        straight: straight component spec.
        bend: bend component spec.
        cross_section: cross_section spec.
    """
    return cf.ring_asymmetric(
        radius=radius,
        length_x=length_x,
        length_y=length_y,
        straight=straight,
        bend=bend,
        cross_section=cross_section,
    )

ring_crow

ring_crow(
    gaps: tuple[float, ...] = (0.2, 0.2, 0.2, 0.2),
    radius: tuple[float, ...] = (10.0, 10.0, 10.0),
    bends: tuple[ComponentSpec, ...] | None = None,
    ring_cross_sections: tuple[CrossSectionSpec, ...] = (
        "strip",
        "strip",
        "strip",
    ),
    length_x: float = 0,
    lengths_y: tuple[float, ...] = (0, 0, 0),
    input_straight_cross_section: (
        CrossSectionSpec | None
    ) = None,
    output_straight_cross_section: (
        CrossSectionSpec | None
    ) = None,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Coupled ring resonators.

Parameters:

Name Type Description Default
gaps tuple[float, ...]

gap between rings.

(0.2, 0.2, 0.2, 0.2)
radius tuple[float, ...]

for each ring.

(10.0, 10.0, 10.0)
bends tuple[ComponentSpec, ...] | None

bend spec for each ring.

None
ring_cross_sections tuple[CrossSectionSpec, ...]

cross_section spec for each ring.

('strip', 'strip', 'strip')
length_x float

ring coupler length.

0
lengths_y tuple[float, ...]

vertical straight length.

(0, 0, 0)
input_straight_cross_section CrossSectionSpec | None

cross_section spec for input and output straight. Defaults to cross_section.

None
output_straight_cross_section CrossSectionSpec | None

cross_section spec for input and output straight. Defaults to cross_section.

None
cross_section CrossSectionSpec

cross_section spec for input and output straight.

--==ct==-- gap[N-1] | | sl sr ring[N-1] | | --==cb==-- gap[N-2]

. . .

--==ct==-- | | sl sr lengths_y[1], ring[1] | | --==cb==-- gap[1]

--==ct==-- | | sl sr lengths_y[0], ring[0] | | --==cb==-- gap[0]

length_x

'strip'
Source code in gdsfactory/components/rings/ring_crow.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
@gf.cell_with_module_name(schematic_function=ring_double_schematic, tags=["rings"])
def ring_crow(
    gaps: tuple[float, ...] = (0.2, 0.2, 0.2, 0.2),
    radius: tuple[float, ...] = (10.0, 10.0, 10.0),
    bends: tuple[ComponentSpec, ...] | None = None,
    ring_cross_sections: tuple[CrossSectionSpec, ...] = ("strip", "strip", "strip"),
    length_x: float = 0,
    lengths_y: tuple[float, ...] = (0, 0, 0),
    input_straight_cross_section: CrossSectionSpec | None = None,
    output_straight_cross_section: CrossSectionSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Coupled ring resonators.

    Args:
        gaps: gap between rings.
        radius: for each ring.
        bends: bend spec for each ring.
        ring_cross_sections: cross_section spec for each ring.
        length_x: ring coupler length.
        lengths_y: vertical straight length.
        input_straight_cross_section: cross_section spec for input and output straight. Defaults to cross_section.
        output_straight_cross_section: cross_section spec for input and output straight. Defaults to cross_section.
        cross_section: cross_section spec for input and output straight.

         --==ct==-- gap[N-1]
          |      |
          sl     sr ring[N-1]
          |      |
         --==cb==-- gap[N-2]

             .
             .
             .

         --==ct==--
          |      |
          sl     sr lengths_y[1], ring[1]
          |      |
         --==cb==-- gap[1]

         --==ct==--
          |      |
          sl     sr lengths_y[0], ring[0]
          |      |
         --==cb==-- gap[0]

          length_x
    """
    return cf.ring_crow(
        gaps=gaps,
        radius=radius,
        bends=bends,
        ring_cross_sections=ring_cross_sections,
        length_x=length_x,
        lengths_y=lengths_y,
        input_straight_cross_section=input_straight_cross_section,
        output_straight_cross_section=output_straight_cross_section,
        cross_section=cross_section,
    )

ring_crow

ring_crow_couplers

ring_crow_couplers

ring_crow_couplers(
    radius: Sequence[float] = (10.0,) * 3,
    bends: Sequence[ComponentSpec] = ("bend_circular",) * 3,
    ring_cross_sections: Sequence[CrossSectionSpec] = (
        "strip",
    )
    * 3,
    couplers: Sequence[ComponentSpec] = ("coupler",) * 4,
) -> Component

Coupled ring resonators with coupler components between gaps.

Parameters:

Name Type Description Default
radius Sequence[float]

for the bend and coupler.

(10.0,) * 3
bends Sequence[ComponentSpec]

bend specs.

('bend_circular',) * 3
ring_cross_sections Sequence[CrossSectionSpec]

cross_section for the ring.

('strip',) * 3
couplers Sequence[ComponentSpec]

coupling component between rings and bus.

('coupler',) * 4
     --==ct==-- gap[N-1]   <------- couplers[N-1]
      |      |
      sl     sr ring[N-1]
      |      |
     --==cb==-- gap[N-2]   <------- couplers[N-2]
     .
     .
     .
     --==ct==--
      |      |
      sl     sr lengths_y[1], ring[1]
      |      |
     --==cb==-- gap[1]
                            <------- couplers[1]
     --==ct==--
      |      |
      sl     sr lengths_y[0], ring[0]
      |      |
     --==cb==-- gap[0]      <------- couplers[0]
  length_x
Source code in gdsfactory/components/rings/ring_crow_couplers.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@gf.cell_with_module_name(schematic_function=ring_double_schematic, tags=["rings"])
def ring_crow_couplers(
    radius: Sequence[float] = (10.0,) * 3,
    bends: Sequence[ComponentSpec] = ("bend_circular",) * 3,
    ring_cross_sections: Sequence[CrossSectionSpec] = ("strip",) * 3,
    couplers: Sequence[ComponentSpec] = ("coupler",) * 4,
) -> Component:
    """Coupled ring resonators with coupler components between gaps.

    Args:
        radius: for the bend and coupler.
        bends: bend specs.
        ring_cross_sections: cross_section for the ring.
        couplers: coupling component between rings and bus.

    ```text
         --==ct==-- gap[N-1]   <------- couplers[N-1]
          |      |
          sl     sr ring[N-1]
          |      |
         --==cb==-- gap[N-2]   <------- couplers[N-2]
    ```

             .
             .
             .

    ```text
         --==ct==--
          |      |
          sl     sr lengths_y[1], ring[1]
          |      |
         --==cb==-- gap[1]
                                <------- couplers[1]
         --==ct==--
          |      |
          sl     sr lengths_y[0], ring[0]
          |      |
         --==cb==-- gap[0]      <------- couplers[0]
    ```

          length_x
    """
    return cf.ring_crow_couplers(
        radius=radius,
        bends=bends,
        ring_cross_sections=ring_cross_sections,
        couplers=couplers,
    )

ring_crow_couplers

ring_double

ring_double

ring_double(
    gap: float = 0.2,
    gap_top: float | None = None,
    gap_bot: float | None = None,
    radius: float | None = None,
    length_x: float = 0.01,
    length_y: float = 0.01,
    bend: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    coupler_ring: ComponentSpec = "coupler_ring",
    coupler_ring_top: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    length_extension: float | None = None,
) -> Component

Returns a double bus ring.

two couplers (ct: top, cb: bottom) connected with two vertical straights (sl: left, sr: right)

Parameters:

Name Type Description Default
gap float

gap between for coupler.

0.2
gap_top float | None

gap for the top coupler. Defaults to gap.

None
gap_bot float | None

gap for the bottom coupler. Defaults to gap.

None
radius float | None

for the bend and coupler.

None
length_x float

ring coupler length.

0.01
length_y float

vertical straight length.

0.01
bend ComponentSpec

90 degrees bend spec.

'bend_euler'
straight ComponentSpec

straight spec.

'straight'
coupler_ring ComponentSpec

ring coupler spec.

'coupler_ring'
coupler_ring_top ComponentSpec | None

top ring coupler spec. Defaults to coupler_ring.

None
cross_section CrossSectionSpec

cross_section spec.

'strip'
length_extension float | None

straight length extension at the end of the coupler bottom ports.

None
       o2──────▲─────────o3
               │gap_top
       xx──────▼─────────xxx
      xxx                   xxx
    xxx                       xxx
   xx                           xxx
   x                             xxx
  xx                              xx▲
  xx                              xx│length_y
  xx                              xx▼
  xx                             xx
   xx          length_x          x
    xx     ◄───────────────►    x
     xx                       xxx
       xx                   xxx
        xxx──────▲─────────xxx
                 │gap
         o1──────▼─────────◄──────────────► o4
                            length_extension
Source code in gdsfactory/components/rings/ring_double.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
@gf.cell_with_module_name(schematic_function=ring_double_schematic, tags=["rings"])
def ring_double(
    gap: float = 0.2,
    gap_top: float | None = None,
    gap_bot: float | None = None,
    radius: float | None = None,
    length_x: float = 0.01,
    length_y: float = 0.01,
    bend: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    coupler_ring: ComponentSpec = "coupler_ring",
    coupler_ring_top: ComponentSpec | None = None,
    cross_section: CrossSectionSpec = "strip",
    length_extension: float | None = None,
) -> Component:
    """Returns a double bus ring.

    two couplers (ct: top, cb: bottom)
    connected with two vertical straights (sl: left, sr: right)

    Args:
        gap: gap between for coupler.
        gap_top: gap for the top coupler. Defaults to gap.
        gap_bot: gap for the bottom coupler. Defaults to gap.
        radius: for the bend and coupler.
        length_x: ring coupler length.
        length_y: vertical straight length.
        bend: 90 degrees bend spec.
        straight: straight spec.
        coupler_ring: ring coupler spec.
        coupler_ring_top: top ring coupler spec. Defaults to coupler_ring.
        cross_section: cross_section spec.
        length_extension: straight length extension at the end of the coupler bottom ports.

    ```text
           o2──────▲─────────o3
                   │gap_top
           xx──────▼─────────xxx
          xxx                   xxx
        xxx                       xxx
       xx                           xxx
       x                             xxx
      xx                              xx▲
      xx                              xx│length_y
      xx                              xx▼
      xx                             xx
       xx          length_x          x
        xx     ◄───────────────►    x
         xx                       xxx
           xx                   xxx
            xxx──────▲─────────xxx
                     │gap
             o1──────▼─────────◄──────────────► o4
                                length_extension
    ```
    """
    return cf.ring_double(
        gap=gap,
        gap_top=gap_top,
        gap_bot=gap_bot,
        radius=radius,
        length_x=length_x,
        length_y=length_y,
        bend=bend,
        straight=straight,
        coupler_ring=coupler_ring,
        coupler_ring_top=coupler_ring_top,
        cross_section=cross_section,
        length_extension=length_extension,
    )

ring_double

ring_double_bend_coupler

ring_double_bend_coupler

ring_double_bend_coupler(
    radius: float = 5.0,
    gap: float = 0.2,
    coupling_angle_coverage: float = 70.0,
    bend: ComponentAllAngleSpec = "bend_circular_all_angle",
    length_x: float = 0.6,
    length_y: float = 0.6,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
) -> Component

Returns ring with double curved couplers.

Parameters:

Name Type Description Default
radius float

um.

5.0
gap float

um.

0.2
coupling_angle_coverage float

degrees.

70.0
bend ComponentAllAngleSpec

for bend.

'bend_circular_all_angle'
length_x float

horizontal straight length.

0.6
length_y float

vertical straight length.

0.6
cross_section_inner CrossSectionSpec

spec inner bend.

'strip'
cross_section_outer CrossSectionSpec

spec outer bend.

'strip'
Source code in gdsfactory/components/rings/ring_double_bend_coupler.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@gf.cell_with_module_name(schematic_function=ring_double_schematic, tags=["rings"])
def ring_double_bend_coupler(
    radius: float = 5.0,
    gap: float = 0.2,
    coupling_angle_coverage: float = 70.0,
    bend: ComponentAllAngleSpec = "bend_circular_all_angle",
    length_x: float = 0.6,
    length_y: float = 0.6,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
) -> Component:
    r"""Returns ring with double curved couplers.

    Args:
        radius: um.
        gap: um.
        coupling_angle_coverage: degrees.
        bend: for bend.
        length_x: horizontal straight length.
        length_y: vertical straight length.
        cross_section_inner: spec inner bend.
        cross_section_outer: spec outer bend.
    """
    return cf.ring_double_bend_coupler(
        radius=radius,
        gap=gap,
        coupling_angle_coverage=coupling_angle_coverage,
        bend=bend,
        length_x=length_x,
        length_y=length_y,
        cross_section_inner=cross_section_inner,
        cross_section_outer=cross_section_outer,
    )

ring_double_bend_coupler

ring_double_heater

ring_double_heater(
    gap: float = 0.2,
    gap_top: float | None = None,
    gap_bot: float | None = None,
    radius: float | None = None,
    length_x: float = 1.0,
    length_y: float = 0.01,
    coupler_ring: ComponentSpec = "coupler_ring",
    coupler_ring_top: ComponentSpec | None = None,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_euler",
    cross_section_heater: CrossSectionSpec = "heater_metal",
    cross_section_waveguide_heater: CrossSectionSpec = "strip_heater_metal",
    cross_section: CrossSectionSpec = "strip",
    via_stack: ComponentSpec = "via_stack_heater_mtop_mini",
    port_orientation: AngleInDegrees | None = None,
    via_stack_offset: Float2 = (1, 0),
    via_stack_size: Float2 | None = None,
    with_drop: bool = True,
    length_extension: float | None = None,
    length_extension_top: float | None = None,
    length_extension_bot: float | None = None,
) -> Component

Returns a double bus ring with heater on top.

two couplers (ct: top, cb: bottom) connected with two vertical straights (sl: left, sr: right)

Parameters:

Name Type Description Default
gap float

gap between for coupler.

0.2
gap_top float | None

gap for the top coupler. Defaults to gap.

None
gap_bot float | None

gap for the bottom coupler. Defaults to gap.

None
radius float | None

for the bend and coupler.

None
length_x float

ring coupler length.

1.0
length_y float

vertical straight length.

0.01
coupler_ring ComponentSpec

ring coupler spec.

'coupler_ring'
coupler_ring_top ComponentSpec | None

ring coupler spec for coupler away from vias (defaults to coupler_ring)

None
straight ComponentSpec

straight spec.

'straight'
bend ComponentSpec

bend spec.

'bend_euler'
cross_section_heater CrossSectionSpec

for heater.

'heater_metal'
cross_section_waveguide_heater CrossSectionSpec

for waveguide with heater.

'strip_heater_metal'
cross_section CrossSectionSpec

for regular waveguide.

'strip'
via_stack ComponentSpec

for heater to routing metal.

'via_stack_heater_mtop_mini'
port_orientation AngleInDegrees | None

for electrical ports to promote from via_stack.

None
via_stack_size Float2 | None

size of via_stack.

None
via_stack_offset Float2

x,y offset for via_stack.

(1, 0)
with_drop bool

adds drop ports.

True
length_extension float | None

straight length extension at the end of the coupler bottom ports.

None
length_extension_top float | None

straight length extension at the end of the coupler top ports.

None
length_extension_bot float | None

straight length extension at the end of the coupler bottom ports.

None
       o2──────▲─────────o3
               │gap_top
       xx──────▼─────────xxx
      xxx                   xxx
    xxx                       xxx
   xx                           xxx
   x                             xxx
  xx                              xx▲
  xx                              xx│length_y
  xx                              xx▼
  xx                             xx
   xx          length_x          x
    xx     ◄───────────────►    x
     xx                       xxx
       xx                   xxx
        xxx──────▲─────────xxx
                 │gap
         o1──────▼─────────o4
Source code in gdsfactory/components/rings/ring_heater.py
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@gf.cell_with_module_name(schematic_function=ring_double_schematic, tags=["rings"])
def ring_double_heater(
    gap: float = 0.2,
    gap_top: float | None = None,
    gap_bot: float | None = None,
    radius: float | None = None,
    length_x: float = 1.0,
    length_y: float = 0.01,
    coupler_ring: ComponentSpec = "coupler_ring",
    coupler_ring_top: ComponentSpec | None = None,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_euler",
    cross_section_heater: CrossSectionSpec = "heater_metal",
    cross_section_waveguide_heater: CrossSectionSpec = "strip_heater_metal",
    cross_section: CrossSectionSpec = "strip",
    via_stack: ComponentSpec = "via_stack_heater_mtop_mini",
    port_orientation: AngleInDegrees | None = None,
    via_stack_offset: Float2 = (1, 0),
    via_stack_size: Float2 | None = None,
    with_drop: bool = True,
    length_extension: float | None = None,
    length_extension_top: float | None = None,
    length_extension_bot: float | None = None,
) -> Component:
    """Returns a double bus ring with heater on top.

    two couplers (ct: top, cb: bottom)
    connected with two vertical straights (sl: left, sr: right)

    Args:
        gap: gap between for coupler.
        gap_top: gap for the top coupler. Defaults to gap.
        gap_bot: gap for the bottom coupler. Defaults to gap.
        radius: for the bend and coupler.
        length_x: ring coupler length.
        length_y: vertical straight length.
        coupler_ring: ring coupler spec.
        coupler_ring_top: ring coupler spec for coupler away from vias (defaults to coupler_ring)
        straight: straight spec.
        bend: bend spec.
        cross_section_heater: for heater.
        cross_section_waveguide_heater: for waveguide with heater.
        cross_section: for regular waveguide.
        via_stack: for heater to routing metal.
        port_orientation: for electrical ports to promote from via_stack.
        via_stack_size: size of via_stack.
        via_stack_offset: x,y offset for via_stack.
        with_drop: adds drop ports.
        length_extension: straight length extension at the end of the coupler bottom ports.
        length_extension_top: straight length extension at the end of the coupler top ports.
        length_extension_bot: straight length extension at the end of the coupler bottom ports.

    ```text
           o2──────▲─────────o3
                   │gap_top
           xx──────▼─────────xxx
          xxx                   xxx
        xxx                       xxx
       xx                           xxx
       x                             xxx
      xx                              xx▲
      xx                              xx│length_y
      xx                              xx▼
      xx                             xx
       xx          length_x          x
        xx     ◄───────────────►    x
         xx                       xxx
           xx                   xxx
            xxx──────▲─────────xxx
                     │gap
             o1──────▼─────────o4
    ```
    """
    return cf.ring_double_heater(
        gap=gap,
        gap_top=gap_top,
        gap_bot=gap_bot,
        radius=radius,
        length_x=length_x,
        length_y=length_y,
        coupler_ring=coupler_ring,
        coupler_ring_top=coupler_ring_top,
        straight=straight,
        bend=bend,
        cross_section_heater=cross_section_heater,
        cross_section_waveguide_heater=cross_section_waveguide_heater,
        cross_section=cross_section,
        via_stack=via_stack,
        port_orientation=port_orientation,
        via_stack_offset=via_stack_offset,
        via_stack_size=via_stack_size,
        with_drop=with_drop,
        length_extension=length_extension,
        length_extension_top=length_extension_top,
        length_extension_bot=length_extension_bot,
    )

ring_double_heater

ring_double_pn

ring_double_pn(
    add_gap: float = 0.3,
    drop_gap: float = 0.3,
    radius: float = 5.0,
    doping_angle: float = 85,
    cross_section: CrossSectionFactory = rib,
    pn_cross_section: CrossSectionFactory = cross_section_pn,
    doped_heater: bool = True,
    doped_heater_angle_buffer: float = 10,
    doped_heater_layer: LayerSpec = "NPP",
    doped_heater_width: float = 0.5,
    doped_heater_waveguide_offset: float = 2.175,
    heater_vias: ComponentSpec = "via_stack_heater_ring_pn",
    with_drop: bool = True,
    **kwargs: Any
) -> gf.Component

Returns add-drop pn ring with optional doped heater.

Parameters:

Name Type Description Default
add_gap float

gap to add waveguide. Bottom gap.

0.3
drop_gap float

gap to drop waveguide. Top gap.

0.3
radius float

for the bend and coupler.

5.0
doping_angle float

angle in degrees representing portion of ring that is doped.

85
cross_section CrossSectionFactory

cross_section spec for non-PN doped rib waveguide sections.

rib
pn_cross_section CrossSectionFactory

cross section of pn junction.

cross_section_pn
doped_heater bool

boolean for if we include doped heater or not.

True
doped_heater_angle_buffer float

angle in degrees buffering heater from pn junction.

10
doped_heater_layer LayerSpec

doping layer for heater.

'NPP'
doped_heater_width float

width of doped heater.

0.5
doped_heater_waveguide_offset float

distance from the center of the ring waveguide to the center of the doped heater.

2.175
heater_vias ComponentSpec

components specifications for heater vias

'via_stack_heater_ring_pn'
with_drop bool

boolean for if we include drop waveguide or not.

True
kwargs Any

cross_section settings.

{}
Source code in gdsfactory/components/rings/ring_pn.py
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
@gf.cell_with_module_name(schematic_function=ring_double_schematic, tags=["rings"])
def ring_double_pn(
    add_gap: float = 0.3,
    drop_gap: float = 0.3,
    radius: float = 5.0,
    doping_angle: float = 85,
    cross_section: CrossSectionFactory = rib,
    pn_cross_section: CrossSectionFactory = cross_section_pn,
    doped_heater: bool = True,
    doped_heater_angle_buffer: float = 10,
    doped_heater_layer: LayerSpec = "NPP",
    doped_heater_width: float = 0.5,
    doped_heater_waveguide_offset: float = 2.175,
    heater_vias: ComponentSpec = "via_stack_heater_ring_pn",
    with_drop: bool = True,
    **kwargs: Any,
) -> gf.Component:
    """Returns add-drop pn ring with optional doped heater.

    Args:
        add_gap: gap to add waveguide. Bottom gap.
        drop_gap: gap to drop waveguide. Top gap.
        radius: for the bend and coupler.
        doping_angle: angle in degrees representing portion of ring that is doped.
        cross_section: cross_section spec for non-PN doped rib waveguide sections.
        pn_cross_section: cross section of pn junction.
        doped_heater: boolean for if we include doped heater or not.
        doped_heater_angle_buffer: angle in degrees buffering heater from pn junction.
        doped_heater_layer: doping layer for heater.
        doped_heater_width: width of doped heater.
        doped_heater_waveguide_offset: distance from the center of the ring waveguide to the center of the doped heater.
        heater_vias: components specifications for heater vias
        with_drop: boolean for if we include drop waveguide or not.
        kwargs: cross_section settings.

    """
    return cf.ring_double_pn(
        add_gap=add_gap,
        drop_gap=drop_gap,
        radius=radius,
        doping_angle=doping_angle,
        cross_section=cross_section,
        pn_cross_section=pn_cross_section,
        doped_heater=doped_heater,
        doped_heater_angle_buffer=doped_heater_angle_buffer,
        doped_heater_layer=doped_heater_layer,
        doped_heater_width=doped_heater_width,
        doped_heater_waveguide_offset=doped_heater_waveguide_offset,
        heater_vias=heater_vias,
        with_drop=with_drop,
        **kwargs,
    )

ring_double_pn

ring_single

ring_single

ring_single(
    gap: float = 0.2,
    radius: float | None = None,
    length_x: float = 4.0,
    length_y: float = 0.6,
    bend: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    coupler_ring: ComponentSpec = "coupler_ring",
    cross_section: CrossSectionSpec = "strip",
    length_extension: float | None = None,
) -> gf.Component

Returns a single ring resonator with a directional coupler.

This component creates a ring resonator that consists of: - A directional coupler (cb) at the bottom - Two vertical straights (sl, sr) on the left and right sides - Two bends (bl, br) connecting the vertical straights - A horizontal straight (st) at the top

The ring resonator is commonly used in photonic integrated circuits for: - Wavelength filtering - Optical modulation - Sensing applications - Optical switching

Parameters:

Name Type Description Default
gap float

Gap between the ring and the straight waveguide in the coupler (μm).

0.2
radius float | None

Radius of the ring bends (μm). If None, it will use the radius from the cross section.

None
length_x float

Length of the horizontal straight section (μm).

4.0
length_y float

Length of the vertical straight sections (μm).

0.6
bend ComponentSpec

Component spec for the 90-degree bends. Default is "bend_euler".

'bend_euler'
straight ComponentSpec

Component spec for the straight waveguides. Default is "straight".

'straight'
coupler_ring ComponentSpec

Component spec for the ring coupler. Default is "coupler_ring".

'coupler_ring'
cross_section CrossSectionSpec

Cross section spec for all waveguides. Default is "strip".

'strip'
length_extension float | None

straight length extension at the end of the coupler bottom ports.

None

Returns:

Name Type Description
Component Component

A gdsfactory Component containing the ring resonator with: - Two ports: "o1" (input) and "o2" (through) - All waveguide sections properly connected - Cross section applied to all waveguides

Raises:

Type Description
ValueError

If length_x or length_y is negative.

                xxxxxxxxxxxxx
            xxxxx           xxxx
          xxx                   xxx
        xxx                       xxx
       xx                           xxx
       x                             xxx
      xx                              xx▲
      xx                              xx│length_y
      xx                              xx▼
      xx                             xx
       xx          length_x          x
        xx     ◄───────────────►    x
         xx                       xxx
           xx                   xxx
            xxx──────▲─────────xxx
                     │gap
             o1──────▼─────────o2◄──────────────►
                                 length_extension
Source code in gdsfactory/components/rings/ring_single.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
@gf.cell_with_module_name(schematic_function=ring_single_schematic, tags=["rings"])
def ring_single(
    gap: float = 0.2,
    radius: float | None = None,
    length_x: float = 4.0,
    length_y: float = 0.6,
    bend: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    coupler_ring: ComponentSpec = "coupler_ring",
    cross_section: CrossSectionSpec = "strip",
    length_extension: float | None = None,
) -> gf.Component:
    """Returns a single ring resonator with a directional coupler.

    This component creates a ring resonator that consists of:
    - A directional coupler (cb) at the bottom
    - Two vertical straights (sl, sr) on the left and right sides
    - Two bends (bl, br) connecting the vertical straights
    - A horizontal straight (st) at the top

    The ring resonator is commonly used in photonic integrated circuits for:
    - Wavelength filtering
    - Optical modulation
    - Sensing applications
    - Optical switching

    Args:
        gap: Gap between the ring and the straight waveguide in the coupler (μm).
        radius: Radius of the ring bends (μm). If None, it will use the radius from the cross section.
        length_x: Length of the horizontal straight section (μm).
        length_y: Length of the vertical straight sections (μm).
        bend: Component spec for the 90-degree bends. Default is "bend_euler".
        straight: Component spec for the straight waveguides. Default is "straight".
        coupler_ring: Component spec for the ring coupler. Default is "coupler_ring".
        cross_section: Cross section spec for all waveguides. Default is "strip".
        length_extension: straight length extension at the end of the coupler bottom ports.

    Returns:
        Component: A gdsfactory Component containing the ring resonator with:
            - Two ports: "o1" (input) and "o2" (through)
            - All waveguide sections properly connected
            - Cross section applied to all waveguides

    Raises:
        ValueError: If length_x or length_y is negative.

    ```text
                    xxxxxxxxxxxxx
                xxxxx           xxxx
              xxx                   xxx
            xxx                       xxx
           xx                           xxx
           x                             xxx
          xx                              xx▲
          xx                              xx│length_y
          xx                              xx▼
          xx                             xx
           xx          length_x          x
            xx     ◄───────────────►    x
             xx                       xxx
               xx                   xxx
                xxx──────▲─────────xxx
                         │gap
                 o1──────▼─────────o2◄──────────────►
                                     length_extension
    ```
    """
    return cf.ring_single(
        gap=gap,
        radius=radius,
        length_x=length_x,
        length_y=length_y,
        bend=bend,
        straight=straight,
        coupler_ring=coupler_ring,
        cross_section=cross_section,
        length_extension=length_extension,
    )

ring_single

ring_single_array

ring_single_array

ring_single_array(
    ring: ComponentSpec = "ring_single",
    spacing: float = 15.0,
    list_of_dicts: tuple[dict[str, Any], ...] | None = None,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Ring of single bus connected with straights.

Parameters:

Name Type Description Default
ring ComponentSpec

ring spec.

'ring_single'
spacing float

between rings.

15.0
list_of_dicts tuple[dict[str, Any], ...] | None

settings for each ring.

None
cross_section CrossSectionSpec

spec.

'strip'
       ______               ______
      |      |             |      |
      |      |  length_y   |      |
      |      |             |      |
     --======-- spacing ----==gap==--
  length_x
Source code in gdsfactory/components/rings/ring_single_array.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@gf.cell_with_module_name(tags=["rings"])
def ring_single_array(
    ring: ComponentSpec = "ring_single",
    spacing: float = 15.0,
    list_of_dicts: tuple[dict[str, Any], ...] | None = None,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Ring of single bus connected with straights.

    Args:
        ring: ring spec.
        spacing: between rings.
        list_of_dicts: settings for each ring.
        cross_section: spec.

    ```text
           ______               ______
          |      |             |      |
          |      |  length_y   |      |
          |      |             |      |
         --======-- spacing ----==gap==--
    ```

          length_x
    """
    return cf.ring_single_array(
        ring=ring,
        spacing=spacing,
        list_of_dicts=list_of_dicts,
        cross_section=cross_section,
    )

ring_single_array

ring_single_bend_coupler

coupler_bend

coupler_bend(
    radius: float | None = None,
    coupler_gap: float = 0.2,
    coupling_angle_coverage: float = 120.0,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
    bend: (
        str | AnyComponentFactory
    ) = "bend_circular_all_angle",
    bend_output: ComponentSpec = "bend_euler",
) -> Component

Compact curved coupler with bezier escape.

TODO: fix for euler bends.

Parameters:

Name Type Description Default
radius float | None

um.

None
coupler_gap float

um.

0.2
coupling_angle_coverage float

degrees.

120.0
cross_section_inner CrossSectionSpec

spec inner bend.

'strip'
cross_section_outer CrossSectionSpec

spec outer bend.

'strip'
bend str | AnyComponentFactory

for bend.

'bend_circular_all_angle'
bend_output ComponentSpec

for bend.

'bend_euler'
        r   4
        |   |
        |  / ___3
        | / /
    2____/ /
    1_____/
Source code in gdsfactory/components/rings/ring_single_bend_coupler.py
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
@gf.cell_with_module_name(schematic_function=coupler_schematic, tags=["rings"])
def coupler_bend(
    radius: float | None = None,
    coupler_gap: float = 0.2,
    coupling_angle_coverage: float = 120.0,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
    bend: str | AnyComponentFactory = "bend_circular_all_angle",
    bend_output: ComponentSpec = "bend_euler",
) -> Component:
    r"""Compact curved coupler with bezier escape.

    TODO: fix for euler bends.

    Args:
        radius: um.
        coupler_gap: um.
        coupling_angle_coverage: degrees.
        cross_section_inner: spec inner bend.
        cross_section_outer: spec outer bend.
        bend: for bend.
        bend_output: for bend.

    ```text
            r   4
            |   |
            |  / ___3
            | / /
        2____/ /
        1_____/
    ```
    """
    return cf.coupler_bend(
        radius=radius,
        coupler_gap=coupler_gap,
        coupling_angle_coverage=coupling_angle_coverage,
        cross_section_inner=cross_section_inner,
        cross_section_outer=cross_section_outer,
        bend=bend,
        bend_output=bend_output,
    )

coupler_ring_bend

coupler_ring_bend(
    radius: float | None = None,
    coupler_gap: float = 0.2,
    coupling_angle_coverage: float = 90.0,
    length_x: float = 0.0,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
    bend: (
        str | AnyComponentFactory
    ) = "bend_circular_all_angle",
    bend_output: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
) -> Component

Two back-to-back coupler_bend.

Parameters:

Name Type Description Default
radius float | None

um. Default is None, which uses the default radius of the cross_section.

None
coupler_gap float

um.

0.2
coupling_angle_coverage float

degrees.

90.0
length_x float

horizontal straight length.

0.0
cross_section_inner CrossSectionSpec

spec inner bend.

'strip'
cross_section_outer CrossSectionSpec

spec outer bend.

'strip'
bend str | AnyComponentFactory

for bend.

'bend_circular_all_angle'
bend_output ComponentSpec

for bend.

'bend_euler'
straight ComponentSpec

for straight.

'straight'
Source code in gdsfactory/components/rings/ring_single_bend_coupler.py
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
@gf.cell_with_module_name(schematic_function=coupler_ring_schematic, tags=["rings"])
def coupler_ring_bend(
    radius: float | None = None,
    coupler_gap: float = 0.2,
    coupling_angle_coverage: float = 90.0,
    length_x: float = 0.0,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
    bend: str | AnyComponentFactory = "bend_circular_all_angle",
    bend_output: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
) -> Component:
    r"""Two back-to-back coupler_bend.

    Args:
        radius: um. Default is None, which uses the default radius of the cross_section.
        coupler_gap: um.
        coupling_angle_coverage: degrees.
        length_x: horizontal straight length.
        cross_section_inner: spec inner bend.
        cross_section_outer: spec outer bend.
        bend: for bend.
        bend_output: for bend.
        straight: for straight.
    """
    return cf.coupler_ring_bend(
        radius=radius,
        coupler_gap=coupler_gap,
        coupling_angle_coverage=coupling_angle_coverage,
        length_x=length_x,
        cross_section_inner=cross_section_inner,
        cross_section_outer=cross_section_outer,
        bend=bend,
        bend_output=bend_output,
        straight=straight,
    )

ring_single_bend_coupler

ring_single_bend_coupler(
    radius: float = 5.0,
    gap: float = 0.2,
    coupling_angle_coverage: float = 180.0,
    bend_all_angle: (
        str | AnyComponentFactory
    ) = "bend_circular_all_angle",
    bend: ComponentSpec = "bend_circular",
    bend_output: ComponentSpec = "bend_euler",
    length_x: float = 0.6,
    length_y: float = 0.6,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
    **kwargs: Any
) -> Component

Returns ring with curved coupler.

TODO: enable euler bends.

Parameters:

Name Type Description Default
radius float

um.

5.0
gap float

um.

0.2
coupling_angle_coverage float

degrees.

180.0
bend_all_angle str | AnyComponentFactory

for bend.

'bend_circular_all_angle'
bend ComponentSpec

for bend.

'bend_circular'
bend_output ComponentSpec

for bend.

'bend_euler'
length_x float

horizontal straight length.

0.6
length_y float

vertical straight length.

0.6
cross_section_inner CrossSectionSpec

spec inner bend.

'strip'
cross_section_outer CrossSectionSpec

spec outer bend.

'strip'
kwargs Any

cross_section settings.

{}
Source code in gdsfactory/components/rings/ring_single_bend_coupler.py
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
@gf.cell_with_module_name(schematic_function=ring_single_schematic, tags=["rings"])
def ring_single_bend_coupler(
    radius: float = 5.0,
    gap: float = 0.2,
    coupling_angle_coverage: float = 180.0,
    bend_all_angle: str | AnyComponentFactory = "bend_circular_all_angle",
    bend: ComponentSpec = "bend_circular",
    bend_output: ComponentSpec = "bend_euler",
    length_x: float = 0.6,
    length_y: float = 0.6,
    cross_section_inner: CrossSectionSpec = "strip",
    cross_section_outer: CrossSectionSpec = "strip",
    **kwargs: Any,
) -> Component:
    r"""Returns ring with curved coupler.

    TODO: enable euler bends.

    Args:
        radius: um.
        gap: um.
        coupling_angle_coverage: degrees.
        bend_all_angle: for bend.
        bend: for bend.
        bend_output: for bend.
        length_x: horizontal straight length.
        length_y: vertical straight length.
        cross_section_inner: spec inner bend.
        cross_section_outer: spec outer bend.
        kwargs: cross_section settings.
    """
    return cf.ring_single_bend_coupler(
        radius=radius,
        gap=gap,
        coupling_angle_coverage=coupling_angle_coverage,
        bend_all_angle=bend_all_angle,
        bend=bend,
        bend_output=bend_output,
        length_x=length_x,
        length_y=length_y,
        cross_section_inner=cross_section_inner,
        cross_section_outer=cross_section_outer,
        **kwargs,
    )

ring_single_bend_coupler

ring_single_dut

ring_single_dut

ring_single_dut(
    component: ComponentSpec = "straight",
    gap: float = 0.2,
    length_x: float = 4,
    length_y: float = 0,
    radius: float | None = None,
    coupler: ComponentSpec = "coupler_ring",
    bend: ComponentSpec = "bend_euler",
    with_component: bool = True,
    port_name: str = "o1",
    length_extension: float | None = None,
    **kwargs: Any
) -> Component

Single bus ring made of two couplers (ct: top, cb: bottom) connected.

with two vertical straights (wyl: left, wyr: right) (Component Under Test) in the middle to extract loss from quality factor.

Parameters:

Name Type Description Default
component ComponentSpec

device under test.

'straight'
gap float

in um.

0.2
length_x float

in um.

4
length_y float

in um.

0
radius float | None

in um. Default is None, which uses the default radius of the cross_section.

None
coupler ComponentSpec

coupler function.

'coupler_ring'
bend ComponentSpec

bend function.

'bend_euler'
with_component bool

True adds component. False adds waveguide.

True
port_name str

for component input.

'o1'
length_extension float | None

optional length extension for the coupler bottom ports.

None
kwargs Any

cross_section settings.

{}

Parameters:

Name Type Description Default
with_component bool

if False changes component for just a straight.

bl-wt-br | | length_y wl component | | --==cb==-- gap

length_x

True
Source code in gdsfactory/components/rings/ring_single_dut.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@gf.cell_with_module_name(schematic_function=ring_single_schematic, tags=["rings"])
def ring_single_dut(
    component: ComponentSpec = "straight",
    gap: float = 0.2,
    length_x: float = 4,
    length_y: float = 0,
    radius: float | None = None,
    coupler: ComponentSpec = "coupler_ring",
    bend: ComponentSpec = "bend_euler",
    with_component: bool = True,
    port_name: str = "o1",
    length_extension: float | None = None,
    **kwargs: Any,
) -> Component:
    """Single bus ring made of two couplers (ct: top, cb: bottom) connected.

    with two vertical straights (wyl: left, wyr: right) (Component Under Test) in
    the middle to extract loss from quality factor.

    Args:
        component: device under test.
        gap: in um.
        length_x: in um.
        length_y: in um.
        radius: in um. Default is None, which uses the default radius of the cross_section.
        coupler: coupler function.
        bend: bend function.
        with_component: True adds component. False adds waveguide.
        port_name: for component input.
        length_extension: optional length extension for the coupler bottom ports.
        kwargs: cross_section settings.

    Args:
        with_component: if False changes component for just a straight.

          bl-wt-br
          |      | length_y
          wl     component
          |      |
         --==cb==-- gap

          length_x
    """
    return cf.ring_single_dut(
        component=component,
        gap=gap,
        length_x=length_x,
        length_y=length_y,
        radius=radius,
        coupler=coupler,
        bend=bend,
        with_component=with_component,
        port_name=port_name,
        length_extension=length_extension,
        **kwargs,
    )

ring_single_dut

ring_single_heater module-attribute

ring_single_heater = CellAlias(
    ring_double_heater, with_drop=False
)

ring_single_heater

ring_single_pn

ring_single_pn(
    gap: float = 0.3,
    radius: float = 5.0,
    doping_angle: float = 250,
    cross_section: CrossSectionSpec = rib,
    pn_cross_section: CrossSectionSpec = cross_section_pn,
    doped_heater: bool = True,
    doped_heater_angle_buffer: float = 10,
    doped_heater_layer: LayerSpec = "NPP",
    doped_heater_width: float = 0.5,
    doped_heater_waveguide_offset: float = 1.175,
    heater_vias: ComponentSpec = "via_stack_heater_ring_pn",
    pn_vias: ComponentSpec = "via_stack_slab_m3",
    pn_vias_width: float = 3,
    slab_simplify: float = 0.05,
) -> gf.Component

Returns single pn ring with optional doped heater.

Parameters:

Name Type Description Default
gap float

gap between for coupler.

0.3
radius float

for the bend and coupler.

5.0
doping_angle float

angle in degrees representing portion of ring that is doped.

250
cross_section CrossSectionSpec

cross_section spec for non-PN doped rib waveguide sections.

rib
pn_cross_section CrossSectionSpec

cross section of pn junction.

cross_section_pn
doped_heater bool

boolean for if we include doped heater or not.

True
doped_heater_angle_buffer float

angle in degrees buffering heater from pn junction.

10
doped_heater_layer LayerSpec

doping layer for heater.

'NPP'
doped_heater_width float

width of doped heater.

0.5
doped_heater_waveguide_offset float

distance from the center of the ring waveguide to the center of the doped heater.

1.175
heater_vias ComponentSpec

components specifications for heater vias.

'via_stack_heater_ring_pn'
pn_vias ComponentSpec

components specifications for pn vias.

'via_stack_slab_m3'
pn_vias_width float

width of pn vias.

3
slab_simplify float

polygon simplification tolerance for the undoped slab (um).

0.05
Source code in gdsfactory/components/rings/ring_pn.py
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
@gf.cell_with_module_name(schematic_function=ring_single_schematic, tags=["rings"])
def ring_single_pn(
    gap: float = 0.3,
    radius: float = 5.0,
    doping_angle: float = 250,
    cross_section: CrossSectionSpec = rib,
    pn_cross_section: CrossSectionSpec = cross_section_pn,
    doped_heater: bool = True,
    doped_heater_angle_buffer: float = 10,
    doped_heater_layer: LayerSpec = "NPP",
    doped_heater_width: float = 0.5,
    doped_heater_waveguide_offset: float = 1.175,
    heater_vias: ComponentSpec = "via_stack_heater_ring_pn",
    pn_vias: ComponentSpec = "via_stack_slab_m3",
    pn_vias_width: float = 3,
    slab_simplify: float = 0.05,
) -> gf.Component:
    """Returns single pn ring with optional doped heater.

    Args:
        gap: gap between for coupler.
        radius: for the bend and coupler.
        doping_angle: angle in degrees representing portion of ring that is doped.
        cross_section: cross_section spec for non-PN doped rib waveguide sections.
        pn_cross_section: cross section of pn junction.
        doped_heater: boolean for if we include doped heater or not.
        doped_heater_angle_buffer: angle in degrees buffering heater from pn junction.
        doped_heater_layer: doping layer for heater.
        doped_heater_width: width of doped heater.
        doped_heater_waveguide_offset: distance from the center of the ring waveguide to the center of the doped heater.
        heater_vias: components specifications for heater vias.
        pn_vias: components specifications for pn vias.
        pn_vias_width: width of pn vias.
        slab_simplify: polygon simplification tolerance for the undoped slab (um).
    """
    return cf.ring_single_pn(
        gap=gap,
        radius=radius,
        doping_angle=doping_angle,
        cross_section=cross_section,
        pn_cross_section=pn_cross_section,
        doped_heater=doped_heater,
        doped_heater_angle_buffer=doped_heater_angle_buffer,
        doped_heater_layer=doped_heater_layer,
        doped_heater_width=doped_heater_width,
        doped_heater_waveguide_offset=doped_heater_waveguide_offset,
        heater_vias=heater_vias,
        pn_vias=pn_vias,
        pn_vias_width=pn_vias_width,
        slab_simplify=slab_simplify,
    )

ring_single_pn

via_stack_heater_ring_pn module-attribute

via_stack_heater_ring_pn = CellAlias(
    via_stack,
    size=(0.5, 0.5),
    layers=("M1", "M2", "M3"),
    vias=(
        CellAlias(
            via,
            layer="VIAC",
            size=(0.1, 0.1),
            enclosure=0.01,
            pitch=0.2,
        ),
        CellAlias(
            via,
            layer="VIA1",
            size=(0.1, 0.1),
            enclosure=0.01,
            pitch=0.2,
        ),
        None,
    ),
    correct_size=True,
)

via_stack_heater_ring_pn

shapes

C

C

C(
    width: float = 1.0,
    size: Size = (10.0, 20.0),
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component

C geometry with ports on both ends.

based on phidl.

Parameters:

Name Type Description Default
width float

of the line.

1.0
size Size

length and height of the base.

(10.0, 20.0)
layer LayerSpec

layer spec.

'WG'
port_type str

optical or electrical.

'electrical'
     ______
    |       o1
    |   ___
    |  |
    |  |___
    ||<---> size[0]
    |______ o2
Source code in gdsfactory/components/shapes/C.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@gf.cell_with_module_name(tags=["shapes"])
def C(
    width: float = 1.0,
    size: Size = (10.0, 20.0),
    layer: LayerSpec = "WG",
    port_type: str = "electrical",
) -> Component:
    """C geometry with ports on both ends.

    based on phidl.

    Args:
        width: of the line.
        size: length and height of the base.
        layer: layer spec.
        port_type: optical or electrical.

    ```text
         ______
        |       o1
        |   ___
        |  |
        |  |___
        ||<---> size[0]
        |______ o2
    ```
    """
    return cf.C(width=width, size=size, layer=layer, port_type=port_type)

C

L

L

L(
    width: int | float = 1,
    size: tuple[int, int] = (10, 20),
    layer: LayerSpec = "MTOP",
    port_type: str = "electrical",
) -> Component

Generates an 'L' geometry with ports on both ends.

Based on phidl.

Parameters:

Name Type Description Default
width int | float

of the line.

1
size tuple[int, int]

length and height of the base.

(10, 20)
layer LayerSpec

spec.

'MTOP'
port_type str

for port.

'electrical'
Source code in gdsfactory/components/shapes/L.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@gf.cell_with_module_name(tags=["shapes"])
def L(
    width: int | float = 1,
    size: tuple[int, int] = (10, 20),
    layer: LayerSpec = "MTOP",
    port_type: str = "electrical",
) -> Component:
    """Generates an 'L' geometry with ports on both ends.

    Based on phidl.

    Args:
        width: of the line.
        size: length and height of the base.
        layer: spec.
        port_type: for port.
    """
    return cf.L(width=width, size=size, layer=layer, port_type=port_type)

L

circle

circle

circle(
    radius: float = 10.0,
    angle_resolution: float = 2.5,
    layer: LayerSpec = "WG",
) -> Component

Generate a circle geometry.

Parameters:

Name Type Description Default
radius float

of the circle.

10.0
angle_resolution float

number of degrees per point.

2.5
layer LayerSpec

layer.

'WG'
Source code in gdsfactory/components/shapes/circle.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
@gf.cell_with_module_name(tags=["shapes"])
def circle(
    radius: float = 10.0,
    angle_resolution: float = 2.5,
    layer: LayerSpec = "WG",
) -> Component:
    """Generate a circle geometry.

    Args:
        radius: of the circle.
        angle_resolution: number of degrees per point.
        layer: layer.
    """
    return cf.circle(radius=radius, angle_resolution=angle_resolution, layer=layer)

circle

circle_wave

circle_wave

circle_wave(
    radius: float = 10.0,
    amplitude: float = 1.0,
    n_oscillations: int = 8,
    angle_resolution: float = 1.0,
    layer: LayerSpec = "WG",
) -> Component

Returns a circle with a sinusoidal boundary variation.

The boundary radius varies as r(theta) = radius + amplitude * sin(n * theta).

Parameters:

Name Type Description Default
radius float

mean radius.

10.0
amplitude float

amplitude of sinusoidal modulation.

1.0
n_oscillations int

number of oscillations around the boundary.

8
angle_resolution float

degrees per point.

1.0
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/shapes/circle_wave.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@gf.cell_with_module_name(tags=["shapes"])
def circle_wave(
    radius: float = 10.0,
    amplitude: float = 1.0,
    n_oscillations: int = 8,
    angle_resolution: float = 1.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a circle with a sinusoidal boundary variation.

    The boundary radius varies as r(theta) = radius + amplitude * sin(n * theta).

    Args:
        radius: mean radius.
        amplitude: amplitude of sinusoidal modulation.
        n_oscillations: number of oscillations around the boundary.
        angle_resolution: degrees per point.
        layer: layer spec.
    """
    return cf.circle_wave(
        radius=radius,
        amplitude=amplitude,
        n_oscillations=n_oscillations,
        angle_resolution=angle_resolution,
        layer=layer,
    )

circle_wave

compass

compass

compass(
    size: Size = (4.0, 2.0),
    layer: LayerSpec = "WG",
    port_type: str | None = "electrical",
    port_inclusion: float = 0.0,
    port_orientations: Ints | None = (180, 90, 0, -90),
    auto_rename_ports: bool = True,
) -> Component

Rectangle with ports on each edge (north, south, east, and west).

Parameters:

Name Type Description Default
size Size

rectangle size.

(4.0, 2.0)
layer LayerSpec

tuple (int, int).

'WG'
port_type str | None

optical, electrical.

'electrical'
port_inclusion float

from edge.

0.0
port_orientations Ints | None

list of port_orientations to add. None does not add ports.

(180, 90, 0, -90)
auto_rename_ports bool

auto rename ports.

True
Source code in gdsfactory/components/shapes/compass.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@gf.cell_with_module_name(tags=["shapes"])
def compass(
    size: Size = (4.0, 2.0),
    layer: LayerSpec = "WG",
    port_type: str | None = "electrical",
    port_inclusion: float = 0.0,
    port_orientations: Ints | None = (180, 90, 0, -90),
    auto_rename_ports: bool = True,
) -> Component:
    """Rectangle with ports on each edge (north, south, east, and west).

    Args:
        size: rectangle size.
        layer: tuple (int, int).
        port_type: optical, electrical.
        port_inclusion: from edge.
        port_orientations: list of port_orientations to add. None does not add ports.
        auto_rename_ports: auto rename ports.
    """
    return cf.compass(
        size=size,
        layer=layer,
        port_type=port_type,
        port_inclusion=port_inclusion,
        port_orientations=port_orientations,
        auto_rename_ports=auto_rename_ports,
    )

compass

cross

cross

cross(
    length: float = 10.0,
    width: float = 3.0,
    layer: LayerSpec = "WG",
    port_type: str | None = None,
) -> Component

Returns a cross from two rectangles of length and width.

Parameters:

Name Type Description Default
length float

float Length of the cross from one end to the other.

10.0
width float

float Width of the arms of the cross.

3.0
layer LayerSpec

layer for geometry.

'WG'
port_type str | None

None, optical, electrical.

None
Source code in gdsfactory/components/shapes/cross.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
@gf.cell_with_module_name(tags=["shapes"])
def cross(
    length: float = 10.0,
    width: float = 3.0,
    layer: LayerSpec = "WG",
    port_type: str | None = None,
) -> Component:
    """Returns a cross from two rectangles of length and width.

    Args:
        length: float Length of the cross from one end to the other.
        width: float Width of the arms of the cross.
        layer: layer for geometry.
        port_type: None, optical, electrical.
    """
    return cf.cross(length=length, width=width, layer=layer, port_type=port_type)

cross

dash

dash

dash(
    width: float = 10.0,
    width_end: float = 1.0,
    length: float = 20.0,
    taper_length: float = 5.0,
    tip_length: float = 2.0,
    n_bezier_points: int = 30,
    layer: LayerSpec = "WG",
) -> Component

Returns a dash shape with Bezier-curved tapered tips.

An elongated shape wider in the middle (width) that tapers via Bezier curves to a narrower tip (width_end) at each end. Based on the pyNISTtoolbox Dash pattern.

Parameters:

Name Type Description Default
width float

width at the center/body of the dash.

10.0
width_end float

width at the tips.

1.0
length float

total length of the straight body section.

20.0
taper_length float

length of each tapered transition.

5.0
tip_length float

length of each rounded tip beyond the taper.

2.0
n_bezier_points int

points per Bezier curve segment.

30
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/shapes/dash.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@gf.cell_with_module_name(tags=["shapes"])
def dash(
    width: float = 10.0,
    width_end: float = 1.0,
    length: float = 20.0,
    taper_length: float = 5.0,
    tip_length: float = 2.0,
    n_bezier_points: int = 30,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a dash shape with Bezier-curved tapered tips.

    An elongated shape wider in the middle (width) that tapers via
    Bezier curves to a narrower tip (width_end) at each end. Based on
    the pyNISTtoolbox Dash pattern.

    Args:
        width: width at the center/body of the dash.
        width_end: width at the tips.
        length: total length of the straight body section.
        taper_length: length of each tapered transition.
        tip_length: length of each rounded tip beyond the taper.
        n_bezier_points: points per Bezier curve segment.
        layer: layer spec.
    """
    return cf.dash(
        width=width,
        width_end=width_end,
        length=length,
        taper_length=taper_length,
        tip_length=tip_length,
        n_bezier_points=n_bezier_points,
        layer=layer,
    )

dash

ellipse

ellipse

ellipse(
    radii: tuple[float, float] = (10.0, 5.0),
    angle_resolution: float = 2.5,
    layer: LayerSpec = "WG",
) -> Component

Returns ellipse component.

Parameters:

Name Type Description Default
radii tuple[float, float]

Semimajor and semiminor axis lengths of the ellipse.

(10.0, 5.0)
angle_resolution float

number of degrees per point.

2.5
layer LayerSpec

Specific layer(s) to put polygon geometry on.

'WG'

The orientation of the ellipse is determined by the order of the radii variables; if the first element is larger, the ellipse will be horizontal and if the second element is larger, the ellipse will be vertical.

Source code in gdsfactory/components/shapes/ellipse.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
@gf.cell_with_module_name(tags=["shapes"])
def ellipse(
    radii: tuple[float, float] = (10.0, 5.0),
    angle_resolution: float = 2.5,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns ellipse component.

    Args:
        radii: Semimajor and semiminor axis lengths of the ellipse.
        angle_resolution: number of degrees per point.
        layer: Specific layer(s) to put polygon geometry on.

    The orientation of the ellipse is determined by the order of the radii variables;
    if the first element is larger, the ellipse will be horizontal and if the second
    element is larger, the ellipse will be vertical.
    """
    return cf.ellipse(radii=radii, angle_resolution=angle_resolution, layer=layer)

ellipse

fiducial_squares

fiducial_squares

fiducial_squares(
    layers: LayerSpecs = ("WG",),
    size: Float2 = (5, 5),
    offset: float = 0.14,
) -> gf.Component

Returns fiducials with two squares.

Parameters:

Name Type Description Default
layers LayerSpecs

list of layers to draw the squares.

('WG',)
size Float2

size of each square in um.

(5, 5)
offset float

space between squares in x and y.

0.14
Source code in gdsfactory/components/shapes/fiducial_squares.py
11
12
13
14
15
16
17
18
19
20
21
22
@gf.cell_with_module_name(tags=["shapes"])
def fiducial_squares(
    layers: LayerSpecs = ("WG",), size: Float2 = (5, 5), offset: float = 0.14
) -> gf.Component:
    """Returns fiducials with two squares.

    Args:
        layers: list of layers to draw the squares.
        size: size of each square in um.
        offset: space between squares in x and y.
    """
    return cf.fiducial_squares(layers=layers, size=size, offset=offset)

fiducial_squares

fractal

fractal

fractal(
    fractal_type: Literal[
        "sierpinski_triangle",
        "sierpinski_carpet",
        "vicsek_cross",
        "vicsek_saltire",
    ] = "sierpinski_triangle",
    depth: int = 4,
    size: float = 100.0,
    layer: LayerSpec = "WG",
) -> Component

Returns a fractal pattern.

Parameters:

Name Type Description Default
fractal_type Literal['sierpinski_triangle', 'sierpinski_carpet', 'vicsek_cross', 'vicsek_saltire']

type of fractal.

'sierpinski_triangle'
depth int

recursion depth (max recommended: 6).

4
size float

overall size of the fractal.

100.0
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/shapes/fractal.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@gf.cell_with_module_name(tags=["shapes"])
def fractal(
    fractal_type: Literal[
        "sierpinski_triangle",
        "sierpinski_carpet",
        "vicsek_cross",
        "vicsek_saltire",
    ] = "sierpinski_triangle",
    depth: int = 4,
    size: float = 100.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a fractal pattern.

    Args:
        fractal_type: type of fractal.
        depth: recursion depth (max recommended: 6).
        size: overall size of the fractal.
        layer: layer spec.
    """
    return cf.fractal(fractal_type=fractal_type, depth=depth, size=size, layer=layer)

fractal

hexagon module-attribute

hexagon = CellAlias(regular_polygon, sides=6)

hexagon

marker_te module-attribute

marker_te = CellAlias(
    rectangle,
    size=(fiber_size, fiber_size),
    layer="TE",
    centered=True,
)

marker_te

marker_tm module-attribute

marker_tm = CellAlias(
    rectangle,
    size=(fiber_size, fiber_size),
    layer="TM",
    centered=True,
)

marker_tm

nxn

nxn

nxn(
    west: int = 1,
    east: int = 4,
    north: int = 0,
    south: int = 0,
    xsize: float = 8.0,
    ysize: float = 8.0,
    wg_width: float = 0.5,
    layer: LayerSpec = "WG",
    wg_margin: float = 1.0,
    **kwargs: Any
) -> Component

Returns a nxn component with nxn ports (west, east, north, south).

Parameters:

Name Type Description Default
west int

number of west ports.

1
east int

number of east ports.

4
north int

number of north ports.

0
south int

number of south ports.

0
xsize float

size in X.

8.0
ysize float

size in Y.

8.0
wg_width float

width of the straight ports.

0.5
layer LayerSpec

layer.

'WG'
wg_margin float

margin from straight to component edge.

1.0
kwargs Any

port_settings.

{}
        3   4
        |___|_
    2 -|      |- 5
       |      |
    1 -|______|- 6
        |   |
        8   7
Source code in gdsfactory/components/shapes/nxn.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@gf.cell_with_module_name(tags=["shapes"])
def nxn(
    west: int = 1,
    east: int = 4,
    north: int = 0,
    south: int = 0,
    xsize: float = 8.0,
    ysize: float = 8.0,
    wg_width: float = 0.5,
    layer: LayerSpec = "WG",
    wg_margin: float = 1.0,
    **kwargs: Any,
) -> Component:
    """Returns a nxn component with nxn ports (west, east, north, south).

    Args:
        west: number of west ports.
        east: number of east ports.
        north: number of north ports.
        south: number of south ports.
        xsize: size in X.
        ysize: size in Y.
        wg_width: width of the straight ports.
        layer: layer.
        wg_margin: margin from straight to component edge.
        kwargs: port_settings.

    ```text
            3   4
            |___|_
        2 -|      |- 5
           |      |
        1 -|______|- 6
            |   |
            8   7
    ```
    """
    return cf.nxn(
        west=west,
        east=east,
        north=north,
        south=south,
        xsize=xsize,
        ysize=ysize,
        wg_width=wg_width,
        layer=layer,
        wg_margin=wg_margin,
        **kwargs,
    )

nxn

octagon module-attribute

octagon = CellAlias(regular_polygon, sides=8)

octagon

pie_arc

pie_arc

pie_arc(
    radius: float = 10.0,
    radius_y: float | None = None,
    start_angle: float = 0.0,
    end_angle: float = 90.0,
    angle_resolution: float = 2.5,
    layer: LayerSpec = "WG",
) -> Component

Returns a pie-shaped arc (sector/wedge), centered at origin.

The shape is a closed polygon from the origin along two radial lines connected by an elliptical arc.

Parameters:

Name Type Description Default
radius float

x-radius (or uniform radius if radius_y is None).

10.0
radius_y float | None

y-radius for elliptical arc. Defaults to radius.

None
start_angle float

start angle in degrees.

0.0
end_angle float

end angle in degrees.

90.0
angle_resolution float

degrees per arc point.

2.5
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/shapes/pie_arc.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@gf.cell_with_module_name(tags=["shapes"])
def pie_arc(
    radius: float = 10.0,
    radius_y: float | None = None,
    start_angle: float = 0.0,
    end_angle: float = 90.0,
    angle_resolution: float = 2.5,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a pie-shaped arc (sector/wedge), centered at origin.

    The shape is a closed polygon from the origin along two radial lines
    connected by an elliptical arc.

    Args:
        radius: x-radius (or uniform radius if radius_y is None).
        radius_y: y-radius for elliptical arc. Defaults to radius.
        start_angle: start angle in degrees.
        end_angle: end angle in degrees.
        angle_resolution: degrees per arc point.
        layer: layer spec.
    """
    return cf.pie_arc(
        radius=radius,
        radius_y=radius_y,
        start_angle=start_angle,
        end_angle=end_angle,
        angle_resolution=angle_resolution,
        layer=layer,
    )

pie_arc

rect_su_shape

rect_su_shape

rect_su_shape(
    L1: float = 10.0,
    L2: float = 10.0,
    L3: float = 20.0,
    width: float = 1.0,
    layer: LayerSpec = "WG",
    port_type: str | None = "electrical",
) -> Component

Returns a rectangular S- or U-shaped routing structure.

The shape consists of three connected rectangular segments forming an S or U pattern. Positive and negative values of L1, L2, L3 produce different orientations (S-shape, U-shape, etc.).

Parameters:

Name Type Description Default
L1 float

length of first vertical segment.

10.0
L2 float

length of horizontal segment.

10.0
L3 float

length of second vertical segment.

20.0
width float

width of all segments.

1.0
layer LayerSpec

layer spec.

'WG'
port_type str | None

None, optical, or electrical.

'electrical'
Source code in gdsfactory/components/shapes/rect_su_shape.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@gf.cell_with_module_name(tags=["shapes"])
def rect_su_shape(
    L1: float = 10.0,
    L2: float = 10.0,
    L3: float = 20.0,
    width: float = 1.0,
    layer: LayerSpec = "WG",
    port_type: str | None = "electrical",
) -> Component:
    """Returns a rectangular S- or U-shaped routing structure.

    The shape consists of three connected rectangular segments forming
    an S or U pattern. Positive and negative values of L1, L2, L3
    produce different orientations (S-shape, U-shape, etc.).

    Args:
        L1: length of first vertical segment.
        L2: length of horizontal segment.
        L3: length of second vertical segment.
        width: width of all segments.
        layer: layer spec.
        port_type: None, optical, or electrical.
    """
    return cf.rect_su_shape(
        L1=L1, L2=L2, L3=L3, width=width, layer=layer, port_type=port_type
    )

rect_su_shape

rect_taper

rect_taper

rect_taper(
    rect_width: float = 1.0,
    rect_length: float = 10.0,
    taper_length: float = 5.0,
    taper_width: float = 4.0,
    layer: LayerSpec = "WG",
    port_type: str | None = "optical",
) -> Component

Returns a rectangle connected to a linear taper.

The rectangle of width rect_width and length rect_length is connected on the right to a taper that linearly expands from rect_width to taper_width over taper_length.

Parameters:

Name Type Description Default
rect_width float

width of the rectangular section.

1.0
rect_length float

length of the rectangular section.

10.0
taper_length float

length of the taper section.

5.0
taper_width float

end width of the taper.

4.0
layer LayerSpec

layer spec.

'WG'
port_type str | None

None, optical, or electrical.

'optical'
Source code in gdsfactory/components/shapes/rect_taper.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@gf.cell_with_module_name(tags=["shapes"])
def rect_taper(
    rect_width: float = 1.0,
    rect_length: float = 10.0,
    taper_length: float = 5.0,
    taper_width: float = 4.0,
    layer: LayerSpec = "WG",
    port_type: str | None = "optical",
) -> Component:
    """Returns a rectangle connected to a linear taper.

    The rectangle of width rect_width and length rect_length is connected
    on the right to a taper that linearly expands from rect_width to
    taper_width over taper_length.

    Args:
        rect_width: width of the rectangular section.
        rect_length: length of the rectangular section.
        taper_length: length of the taper section.
        taper_width: end width of the taper.
        layer: layer spec.
        port_type: None, optical, or electrical.
    """
    return cf.rect_taper(
        rect_width=rect_width,
        rect_length=rect_length,
        taper_length=taper_length,
        taper_width=taper_width,
        layer=layer,
        port_type=port_type,
    )

rect_taper

rectangle

rectangle

rectangle(
    size: Size = (4.0, 2.0),
    layer: LayerSpec = "WG",
    centered: bool = False,
    port_type: str | None = "electrical",
    port_orientations: Ints | None = (180, 90, 0, -90),
) -> Component

Returns a rectangle.

Parameters:

Name Type Description Default
size Size

(tuple) Width and height of rectangle.

(4.0, 2.0)
layer LayerSpec

Specific layer to put polygon geometry on.

'WG'
centered bool

True sets center to (0, 0), False sets south-west to (0, 0).

False
port_type str | None

optical, electrical.

'electrical'
port_orientations Ints | None

list of port_orientations to add. None adds no ports.

(180, 90, 0, -90)
Source code in gdsfactory/components/shapes/rectangle.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@gf.cell_with_module_name(tags=["shapes"])
def rectangle(
    size: Size = (4.0, 2.0),
    layer: LayerSpec = "WG",
    centered: bool = False,
    port_type: str | None = "electrical",
    port_orientations: Ints | None = (180, 90, 0, -90),
) -> Component:
    """Returns a rectangle.

    Args:
        size: (tuple) Width and height of rectangle.
        layer: Specific layer to put polygon geometry on.
        centered: True sets center to (0, 0), False sets south-west to (0, 0).
        port_type: optical, electrical.
        port_orientations: list of port_orientations to add. None adds no ports.
    """
    return cf.rectangle(
        size=size,
        layer=layer,
        centered=centered,
        port_type=port_type,
        port_orientations=port_orientations,
    )

rectangles

rectangles(
    size: Size = (4.0, 2.0),
    offsets: Sequence[float] | None = None,
    layers: LayerSpecs = ("WG", "SLAB150"),
    centered: bool = True,
    **kwargs: Any
) -> Component

Returns overimposed rectangles.

Parameters:

Name Type Description Default
size Size

(tuple) Width and height of rectangle.

(4.0, 2.0)
layers LayerSpecs

Specific layer to put polygon geometry on.

('WG', 'SLAB150')
offsets Sequence[float] | None

list of offsets. If None, all rectangles have a zero offset.

None
centered bool

True sets center to (0, 0), False sets south-west of first rectangle to (0, 0).

True
kwargs Any

additional arguments to pass to rectangle.

{}

Other Parameters:

Name Type Description
port_type

optical, electrical.

port_orientations

list of port_orientations to add.

        ┌──────────────┐
        │              │
        │   ┌──────┐   │
        │   │      │   │
        │   │      ├───►
        │   │      │offset
        │   └──────┘   │
        │              │
        └──────────────┘
Source code in gdsfactory/components/shapes/rectangle.py
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
@gf.cell_with_module_name(tags=["shapes"])
def rectangles(
    size: Size = (4.0, 2.0),
    offsets: Sequence[float] | None = None,
    layers: LayerSpecs = ("WG", "SLAB150"),
    centered: bool = True,
    **kwargs: Any,
) -> Component:
    """Returns overimposed rectangles.

    Args:
        size: (tuple) Width and height of rectangle.
        layers: Specific layer to put polygon geometry on.
        offsets: list of offsets. If None, all rectangles have a zero offset.
        centered: True sets center to (0, 0), False sets south-west of first rectangle to (0, 0).
        kwargs: additional arguments to pass to rectangle.

    Keyword Args:
        port_type: optical, electrical.
        port_orientations: list of port_orientations to add.

    ```text
            ┌──────────────┐
            │              │
            │   ┌──────┐   │
            │   │      │   │
            │   │      ├───►
            │   │      │offset
            │   └──────┘   │
            │              │
            └──────────────┘
    ```

    """
    return cf.rectangles(
        size=size, offsets=offsets, layers=layers, centered=centered, **kwargs
    )

rectangle

rectangles

rectangles(
    size: Size = (4.0, 2.0),
    offsets: Sequence[float] | None = None,
    layers: LayerSpecs = ("WG", "SLAB150"),
    centered: bool = True,
    **kwargs: Any
) -> Component

Returns overimposed rectangles.

Parameters:

Name Type Description Default
size Size

(tuple) Width and height of rectangle.

(4.0, 2.0)
layers LayerSpecs

Specific layer to put polygon geometry on.

('WG', 'SLAB150')
offsets Sequence[float] | None

list of offsets. If None, all rectangles have a zero offset.

None
centered bool

True sets center to (0, 0), False sets south-west of first rectangle to (0, 0).

True
kwargs Any

additional arguments to pass to rectangle.

{}

Other Parameters:

Name Type Description
port_type

optical, electrical.

port_orientations

list of port_orientations to add.

        ┌──────────────┐
        │              │
        │   ┌──────┐   │
        │   │      │   │
        │   │      ├───►
        │   │      │offset
        │   └──────┘   │
        │              │
        └──────────────┘
Source code in gdsfactory/components/shapes/rectangle.py
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
@gf.cell_with_module_name(tags=["shapes"])
def rectangles(
    size: Size = (4.0, 2.0),
    offsets: Sequence[float] | None = None,
    layers: LayerSpecs = ("WG", "SLAB150"),
    centered: bool = True,
    **kwargs: Any,
) -> Component:
    """Returns overimposed rectangles.

    Args:
        size: (tuple) Width and height of rectangle.
        layers: Specific layer to put polygon geometry on.
        offsets: list of offsets. If None, all rectangles have a zero offset.
        centered: True sets center to (0, 0), False sets south-west of first rectangle to (0, 0).
        kwargs: additional arguments to pass to rectangle.

    Keyword Args:
        port_type: optical, electrical.
        port_orientations: list of port_orientations to add.

    ```text
            ┌──────────────┐
            │              │
            │   ┌──────┐   │
            │   │      │   │
            │   │      ├───►
            │   │      │offset
            │   └──────┘   │
            │              │
            └──────────────┘
    ```

    """
    return cf.rectangles(
        size=size, offsets=offsets, layers=layers, centered=centered, **kwargs
    )

rectangles

regular_polygon

regular_polygon

regular_polygon(
    sides: int = 6,
    side_length: float = 10,
    layer: LayerSpec = "WG",
    port_width: float | None = None,
    port_type: str | None = "placement",
) -> Component

Returns a regular N-sided polygon, with ports on each edge.

Parameters:

Name Type Description Default
sides int

number of sides for the polygon.

6
side_length float

of the edges.

10
layer LayerSpec

Specific layer to put polygon geometry on.

'WG'
port_width float | None

the width of port of the polygon (in electrical pads, the port width may not equal to the side length).

None
port_type str | None

optical, electrical.

'placement'
Source code in gdsfactory/components/shapes/regular_polygon.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@gf.cell_with_module_name(tags=["shapes"])
def regular_polygon(
    sides: int = 6,
    side_length: float = 10,
    layer: LayerSpec = "WG",
    port_width: float
    | None = None,  # port width doesn't need to be side length all the time
    port_type: str | None = "placement",
) -> Component:
    """Returns a regular N-sided polygon, with ports on each edge.

    Args:
        sides: number of sides for the polygon.
        side_length: of the edges.
        layer: Specific layer to put polygon geometry on.
        port_width: the width of port of the polygon (in electrical pads, the port width may not equal to the side length).
        port_type: optical, electrical.
    """
    return cf.regular_polygon(
        sides=sides,
        side_length=side_length,
        layer=layer,
        port_width=port_width,
        port_type=port_type,
    )

regular_polygon

rounded_rectangle

rounded_rectangle

rounded_rectangle(
    width: float = 20.0,
    height: float = 10.0,
    corner_radius_x: float = 3.0,
    corner_radius_y: float | None = None,
    n_corner_points: int = 20,
    layer: LayerSpec = "WG",
    port_type: str | None = None,
) -> Component

Returns a rectangle with rounded corners, centered at origin.

Parameters:

Name Type Description Default
width float

total width of the rectangle.

20.0
height float

total height of the rectangle.

10.0
corner_radius_x float

x-radius of the corner arcs.

3.0
corner_radius_y float | None

y-radius of the corner arcs. Defaults to corner_radius_x.

None
n_corner_points int

number of points per corner arc.

20
layer LayerSpec

layer spec.

'WG'
port_type str | None

None, optical, or electrical.

None
Source code in gdsfactory/components/shapes/rounded_rectangle.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@gf.cell_with_module_name(tags=["shapes"])
def rounded_rectangle(
    width: float = 20.0,
    height: float = 10.0,
    corner_radius_x: float = 3.0,
    corner_radius_y: float | None = None,
    n_corner_points: int = 20,
    layer: LayerSpec = "WG",
    port_type: str | None = None,
) -> Component:
    """Returns a rectangle with rounded corners, centered at origin.

    Args:
        width: total width of the rectangle.
        height: total height of the rectangle.
        corner_radius_x: x-radius of the corner arcs.
        corner_radius_y: y-radius of the corner arcs. Defaults to corner_radius_x.
        n_corner_points: number of points per corner arc.
        layer: layer spec.
        port_type: None, optical, or electrical.
    """
    return cf.rounded_rectangle(
        width=width,
        height=height,
        corner_radius_x=corner_radius_x,
        corner_radius_y=corner_radius_y,
        n_corner_points=n_corner_points,
        layer=layer,
        port_type=port_type,
    )

rounded_rectangle

star

star

star(
    inner_radius: float = 5.0,
    outer_radius: float = 10.0,
    n_points: int = 5,
    layer: LayerSpec = "WG",
) -> Component

Returns a star shape with alternating inner and outer radii.

Parameters:

Name Type Description Default
inner_radius float

radius of inner vertices.

5.0
outer_radius float

radius of outer vertices.

10.0
n_points int

number of star points.

5
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/shapes/star.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@gf.cell_with_module_name(tags=["shapes"])
def star(
    inner_radius: float = 5.0,
    outer_radius: float = 10.0,
    n_points: int = 5,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a star shape with alternating inner and outer radii.

    Args:
        inner_radius: radius of inner vertices.
        outer_radius: radius of outer vertices.
        n_points: number of star points.
        layer: layer spec.
    """
    return cf.star(
        inner_radius=inner_radius,
        outer_radius=outer_radius,
        n_points=n_points,
        layer=layer,
    )

star

torus

torus

torus(
    inner_radius: float = 5.0,
    outer_radius: float = 10.0,
    start_angle: float = 0.0,
    end_angle: float = 360.0,
    angle_resolution: float = 2.5,
    layer: LayerSpec = "WG",
    port_type: str | None = None,
) -> Component

Returns a torus (annular sector / ring sector) centered at origin.

Parameters:

Name Type Description Default
inner_radius float

inner radius.

5.0
outer_radius float

outer radius.

10.0
start_angle float

start angle in degrees.

0.0
end_angle float

end angle in degrees.

360.0
angle_resolution float

degrees per arc point.

2.5
layer LayerSpec

layer spec.

'WG'
port_type str | None

None, optical, or electrical.

None
Source code in gdsfactory/components/shapes/torus.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@gf.cell_with_module_name(tags=["shapes"])
def torus(
    inner_radius: float = 5.0,
    outer_radius: float = 10.0,
    start_angle: float = 0.0,
    end_angle: float = 360.0,
    angle_resolution: float = 2.5,
    layer: LayerSpec = "WG",
    port_type: str | None = None,
) -> Component:
    """Returns a torus (annular sector / ring sector) centered at origin.

    Args:
        inner_radius: inner radius.
        outer_radius: outer radius.
        start_angle: start angle in degrees.
        end_angle: end angle in degrees.
        angle_resolution: degrees per arc point.
        layer: layer spec.
        port_type: None, optical, or electrical.
    """
    return cf.torus(
        inner_radius=inner_radius,
        outer_radius=outer_radius,
        start_angle=start_angle,
        end_angle=end_angle,
        angle_resolution=angle_resolution,
        layer=layer,
        port_type=port_type,
    )

torus

torus_wave

torus_wave

torus_wave(
    inner_radius: float = 5.0,
    outer_radius: float = 10.0,
    amplitude: float = 0.5,
    n_oscillations: int = 8,
    in_phase: bool = True,
    angle_resolution: float = 1.0,
    layer: LayerSpec = "WG",
) -> Component

Returns a torus (full ring) with sinusoidal boundary modulation.

Inner and outer boundaries oscillate sinusoidally. When in_phase=True, both boundaries are modulated in phase; when False, they are pi/2 out of phase.

Parameters:

Name Type Description Default
inner_radius float

mean inner radius.

5.0
outer_radius float

mean outer radius.

10.0
amplitude float

amplitude of boundary oscillation.

0.5
n_oscillations int

number of oscillations around the boundary.

8
in_phase bool

if True, inner and outer modulations are in phase.

True
angle_resolution float

degrees per point.

1.0
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/shapes/torus_wave.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
@gf.cell_with_module_name(tags=["shapes"])
def torus_wave(
    inner_radius: float = 5.0,
    outer_radius: float = 10.0,
    amplitude: float = 0.5,
    n_oscillations: int = 8,
    in_phase: bool = True,
    angle_resolution: float = 1.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a torus (full ring) with sinusoidal boundary modulation.

    Inner and outer boundaries oscillate sinusoidally. When in_phase=True,
    both boundaries are modulated in phase; when False, they are pi/2 out
    of phase.

    Args:
        inner_radius: mean inner radius.
        outer_radius: mean outer radius.
        amplitude: amplitude of boundary oscillation.
        n_oscillations: number of oscillations around the boundary.
        in_phase: if True, inner and outer modulations are in phase.
        angle_resolution: degrees per point.
        layer: layer spec.
    """
    return cf.torus_wave(
        inner_radius=inner_radius,
        outer_radius=outer_radius,
        amplitude=amplitude,
        n_oscillations=n_oscillations,
        in_phase=in_phase,
        angle_resolution=angle_resolution,
        layer=layer,
    )

torus_wave

triangle

triangle(
    x: float = 10,
    xtop: float = 0,
    y: float = 20,
    ybot: float = 0,
    layer: LayerSpec = "WG",
) -> Component

Return triangle.

Parameters:

Name Type Description Default
x float

base xsize.

10
xtop float

top xsize.

0
y float

ysize.

20
ybot float

bottom ysize.

0
layer LayerSpec

layer.

'WG'
    xtop
       _
      | \
      |  \
      |   \
     y|    \
      |     \
      |      \
      |______|ybot
          x
Source code in gdsfactory/components/shapes/triangles.py
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
@gf.cell_with_module_name(tags=["shapes"])
def triangle(
    x: float = 10,
    xtop: float = 0,
    y: float = 20,
    ybot: float = 0,
    layer: LayerSpec = "WG",
) -> Component:
    r"""Return triangle.

    Args:
        x: base xsize.
        xtop: top xsize.
        y: ysize.
        ybot: bottom ysize.
        layer: layer.

    ```text
        xtop
           _
          | \
          |  \
          |   \
         y|    \
          |     \
          |      \
          |______|ybot
              x
    ```
    """
    return cf.triangle(x=x, xtop=xtop, y=y, ybot=ybot, layer=layer)

triangle

triangle2

triangle2(spacing: float = 3, **kwargs: Any) -> Component

Return 2 triangles (bot, top).

Parameters:

Name Type Description Default
spacing float

between top and bottom.

3
kwargs Any

triangle arguments.

{}

Other Parameters:

Name Type Description
x

base xsize.

xtop

top xsize.

y

ysize.

ybot

bottom ysize.

layer

layer.

_ | \ | \ | \ | \ | \ | \ | \ | | spacing | / | / | / | / | / |_/

Source code in gdsfactory/components/shapes/triangles.py
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
@gf.cell_with_module_name(tags=["shapes"])
def triangle2(spacing: float = 3, **kwargs: Any) -> Component:
    r"""Return 2 triangles (bot, top).

    Args:
        spacing: between top and bottom.
        kwargs: triangle arguments.

    Keyword Args:
        x: base xsize.
        xtop: top xsize.
        y: ysize.
        ybot: bottom ysize.
        layer: layer.

          _
         | \
         |  \
         |   \
         |    \
         |     \
         |      \
         |       \
         |       |  spacing
         |      /
         |     /
         |    /
         |   /
         |  /
         |_/

    """
    return cf.triangle2(spacing=spacing, **kwargs)

triangle2

triangle2_thin module-attribute

triangle2_thin = CellAlias(triangle2, xtop=0.2, x=2, y=5)

triangle2_thin

triangle4

triangle4(**kwargs: Any) -> Component

Return 4 triangles.

Parameters:

Name Type Description Default
kwargs Any

triangle arguments.

{}

Other Parameters:

Name Type Description
x

base xsize.

xtop

top xsize.

y

ysize.

ybot

bottom ysize.

layer

layer.

  / | \
 /  |  \
/   |   \

/ | \ / | \ / | \ / | \ | | | \ | / \ | / \ | / \ | / \ | / \ |_/

Source code in gdsfactory/components/shapes/triangles.py
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
@gf.cell_with_module_name(tags=["shapes"])
def triangle4(**kwargs: Any) -> Component:
    r"""Return 4 triangles.

    Args:
        kwargs: triangle arguments.

    Keyword Args:
        x: base xsize.
        xtop: top xsize.
        y: ysize.
        ybot: bottom ysize.
        layer: layer.

                  / | \
                 /  |  \
                /   |   \
               /    |    \
              /     |     \
             /      |      \
            /       |       \
            |       |       |
            \       |      /
             \      |     /
              \     |    /
               \    |   /
                \   |  /
                 \  |_/

    """
    return cf.triangle4(**kwargs)

triangle4

triangle4_thin module-attribute

triangle4_thin = CellAlias(triangle4, xtop=0.2, x=2, y=5)

triangle4_thin

triangle_thin module-attribute

triangle_thin = CellAlias(triangle, xtop=0.2, x=2, y=5)

triangle_thin

spirals

delay_snake

delay_snake

delay_snake(
    length: float = 1600.0,
    length0: float = 0.0,
    length2: float = 0.0,
    n: int = 2,
    bend180: ComponentSpec = "bend_euler180",
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
) -> Component

Returns Snake with a starting bend and 180 bends.

Parameters:

Name Type Description Default
length float

total length.

1600.0
length0 float

start length.

0.0
length2 float

end length.

0.0
n int

number of loops.

2
bend180 ComponentSpec

ubend spec.

'bend_euler180'
cross_section CrossSectionSpec

cross_section spec.

'strip'
width float | None

width of the waveguide. If None, it will use the width of the cross_section.

 | length0   |
None
             >---------\
                        \bend180.info['length']
                        /
   |-------------------/
   |
   |------------------->------->|
                        length2
   |   delta_length    |        |
Source code in gdsfactory/components/spirals/delay_snake.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@gf.cell_with_module_name(schematic_function=spiral_schematic, tags=["spirals"])
def delay_snake(
    length: float = 1600.0,
    length0: float = 0.0,
    length2: float = 0.0,
    n: int = 2,
    bend180: ComponentSpec = "bend_euler180",
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
) -> Component:
    r"""Returns Snake with a starting bend and 180 bends.

    Args:
        length: total length.
        length0: start length.
        length2: end length.
        n: number of loops.
        bend180: ubend spec.
        cross_section: cross_section spec.
        width: width of the waveguide. If None, it will use the width of the cross_section.

                 | length0   |

    ```text
                 >---------\
                            \bend180.info['length']
                            /
       |-------------------/
       |
       |------------------->------->|
                            length2
       |   delta_length    |        |
    ```


    """
    return cf.delay_snake(
        length=length,
        length0=length0,
        length2=length2,
        n=n,
        bend180=bend180,
        cross_section=cross_section,
        width=width,
    )

delay_snake

delay_snake2

delay_snake2

delay_snake2(
    length: float = 1600.0,
    length0: float = 0.0,
    length2: float = 0.0,
    n: int = 2,
    bend180: ComponentSpec = "bend_euler180",
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
) -> Component

Returns Snake with a starting straight and 180 bends.

Input faces west output faces east.

Parameters:

Name Type Description Default
length float

total length.

1600.0
length0 float

start length.

0.0
length2 float

end length.

0.0
n int

number of loops.

2
bend180 ComponentSpec

ubend spec.

'bend_euler180'
cross_section CrossSectionSpec

cross_section spec.

'strip'
width float | None

width of the waveguide. If None, it will use the width of the cross_section.

None

| length0 | length1 |

             >---------|
                       | bend180.length
   |-------------------|
   |
   |------------------->------- |
                        length2
   |   delta_length    |        |
Source code in gdsfactory/components/spirals/delay_snake2.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
@gf.cell_with_module_name(schematic_function=spiral_schematic, tags=["spirals"])
def delay_snake2(
    length: float = 1600.0,
    length0: float = 0.0,
    length2: float = 0.0,
    n: int = 2,
    bend180: ComponentSpec = "bend_euler180",
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
) -> Component:
    """Returns Snake with a starting straight and 180 bends.

    Input faces west output faces east.

    Args:
        length: total length.
        length0: start length.
        length2: end length.
        n: number of loops.
        bend180: ubend spec.
        cross_section: cross_section spec.
        width: width of the waveguide. If None, it will use the width of the cross_section.

       | length0 | length1 |

    ```text
                 >---------|
                           | bend180.length
       |-------------------|
       |
       |------------------->------- |
                            length2
       |   delta_length    |        |
    ```
    """
    return cf.delay_snake2(
        length=length,
        length0=length0,
        length2=length2,
        n=n,
        bend180=bend180,
        cross_section=cross_section,
        width=width,
    )

delay_snake2

delay_snake_sbend

delay_snake_sbend

delay_snake_sbend(
    length: float = 100.0,
    length1: float = 0.0,
    length4: float = 0.0,
    radius: float = 5.0,
    waveguide_spacing: float = 5.0,
    bend: ComponentSpec = "bend_euler",
    sbend: ComponentSpec = "bend_s",
    sbend_xsize: float = 100.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Returns compact Snake with sbend in the middle.

Input port faces west and output port faces east.

Parameters:

Name Type Description Default
length float

total length.

100.0
length1 float

first straight section length in um.

0.0
length4 float

fourth straight section length in um.

0.0
radius float

u bend radius in um.

5.0
waveguide_spacing float

waveguide pitch in um.

5.0
bend ComponentSpec

bend spec.

'bend_euler'
sbend ComponentSpec

sbend spec.

'bend_s'
sbend_xsize float

sbend size.

100.0
cross_section CrossSectionSpec

cross_section spec.

'strip'
                     length1
     <----------------------------
           length2    spacing    |
            _______              |
           |        \            |
           |          \          | bend1 radius
           |            \sbend   |
      bend2|              \      |
           |                \    |
           |                  \__|
           |
           ---------------------->----------->
               length3              length4
We adjust length2 and length3
Source code in gdsfactory/components/spirals/delay_snake_sbend.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
@gf.cell_with_module_name(schematic_function=spiral_schematic, tags=["spirals"])
def delay_snake_sbend(
    length: float = 100.0,
    length1: float = 0.0,
    length4: float = 0.0,
    radius: float = 5.0,
    waveguide_spacing: float = 5.0,
    bend: ComponentSpec = "bend_euler",
    sbend: ComponentSpec = "bend_s",
    sbend_xsize: float = 100.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    r"""Returns compact Snake with sbend in the middle.

    Input port faces west and output port faces east.

    Args:
        length: total length.
        length1: first straight section length in um.
        length4: fourth straight section length in um.
        radius: u bend radius in um.
        waveguide_spacing: waveguide pitch in um.
        bend: bend spec.
        sbend: sbend spec.
        sbend_xsize: sbend size.
        cross_section: cross_section spec.

    ```text
                         length1
         <----------------------------
               length2    spacing    |
                _______              |
               |        \            |
               |          \          | bend1 radius
               |            \sbend   |
          bend2|              \      |
               |                \    |
               |                  \__|
               |
               ---------------------->----------->
                   length3              length4
    ```

        We adjust length2 and length3
    """
    return cf.delay_snake_sbend(
        length=length,
        length1=length1,
        length4=length4,
        radius=radius,
        waveguide_spacing=waveguide_spacing,
        bend=bend,
        sbend=sbend,
        sbend_xsize=sbend_xsize,
        cross_section=cross_section,
    )

delay_snake_sbend

spiral

spiral

spiral(
    length: float = 100,
    bend: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    cross_section: CrossSectionSpec = "strip",
    spacing: float = 3.0,
    n_loops: int = 6,
) -> gf.Component

Returns a spiral double (spiral in, and then out).

Parameters:

Name Type Description Default
length float

length of the spiral straight section.

100
bend ComponentSpec

bend component.

'bend_euler'
straight ComponentSpec

straight component.

'straight'
cross_section CrossSectionSpec

cross_section component.

'strip'
spacing float

spacing between the spiral loops.

3.0
n_loops int

number of loops.

6
Source code in gdsfactory/components/spirals/spiral.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@gf.cell_with_module_name(schematic_function=spiral_schematic, tags=["spirals"])
def spiral(
    length: float = 100,
    bend: ComponentSpec = "bend_euler",
    straight: ComponentSpec = "straight",
    cross_section: CrossSectionSpec = "strip",
    spacing: float = 3.0,
    n_loops: int = 6,
) -> gf.Component:
    """Returns a spiral double (spiral in, and then out).

    Args:
        length: length of the spiral straight section.
        bend: bend component.
        straight: straight component.
        cross_section: cross_section component.
        spacing: spacing between the spiral loops.
        n_loops: number of loops.
    """
    return cf.spiral(
        length=length,
        bend=bend,
        straight=straight,
        cross_section=cross_section,
        spacing=spacing,
        n_loops=n_loops,
    )

spiral

spiral_archimedes

spiral_archimedes

spiral_archimedes(
    width: float = 1.0,
    n_turns: int = 5,
    separation: float = 2.0,
    angle_resolution: float = 2.0,
    layer: LayerSpec = "WG",
) -> Component

Returns an Archimedes spiral: r = (separation + width) / (2 * pi) * theta.

Parameters:

Name Type Description Default
width float

width of the spiral trace.

1.0
n_turns int

number of turns.

5
separation float

gap between adjacent traces.

2.0
angle_resolution float

degrees per point.

2.0
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/spirals/spiral_archimedes.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@gf.cell_with_module_name(tags=["spirals"])
def spiral_archimedes(
    width: float = 1.0,
    n_turns: int = 5,
    separation: float = 2.0,
    angle_resolution: float = 2.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns an Archimedes spiral: r = (separation + width) / (2 * pi) * theta.

    Args:
        width: width of the spiral trace.
        n_turns: number of turns.
        separation: gap between adjacent traces.
        angle_resolution: degrees per point.
        layer: layer spec.
    """
    return cf.spiral_archimedes(
        width=width,
        n_turns=n_turns,
        separation=separation,
        angle_resolution=angle_resolution,
        layer=layer,
    )

spiral_archimedes

spiral_double

spiral_double

spiral_double(
    min_bend_radius: float = 10.0,
    separation: float = 2.0,
    number_of_loops: float = 3,
    npoints: int = 1000,
    cross_section: CrossSectionSpec = "strip",
    bend: ComponentSpec = "bend_circular",
) -> gf.Component

Returns a spiral double (spiral in, and then out).

Parameters:

Name Type Description Default
min_bend_radius float

inner radius of the spiral.

10.0
separation float

separation between the loops.

2.0
number_of_loops float

number of loops per spiral.

3
npoints int

points for the spiral.

1000
cross_section CrossSectionSpec

cross-section to extrude the structure with.

'strip'
bend ComponentSpec

factory for the bends in the middle of the double spiral.

'bend_circular'
Source code in gdsfactory/components/spirals/spiral_double.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@gf.cell_with_module_name(schematic_function=spiral_schematic, tags=["spirals"])
def spiral_double(
    min_bend_radius: float = 10.0,
    separation: float = 2.0,
    number_of_loops: float = 3,
    npoints: int = 1000,
    cross_section: CrossSectionSpec = "strip",
    bend: ComponentSpec = "bend_circular",
) -> gf.Component:
    """Returns a spiral double (spiral in, and then out).

    Args:
        min_bend_radius: inner radius of the spiral.
        separation: separation between the loops.
        number_of_loops: number of loops per spiral.
        npoints: points for the spiral.
        cross_section: cross-section to extrude the structure with.
        bend: factory for the bends in the middle of the double spiral.
    """
    return cf.spiral_double(
        min_bend_radius=min_bend_radius,
        separation=separation,
        number_of_loops=number_of_loops,
        npoints=npoints,
        cross_section=cross_section,
        bend=bend,
    )

spiral_double

spiral_fermat

spiral_fermat

spiral_fermat(
    width: float = 1.0,
    n_turns: int = 5,
    a: float = 5.0,
    angle_resolution: float = 2.0,
    layer: LayerSpec = "WG",
) -> Component

Returns a Fermat spiral: r = a * sqrt(theta).

Parameters:

Name Type Description Default
width float

width of the spiral trace.

1.0
n_turns int

number of turns.

5
a float

scaling factor.

5.0
angle_resolution float

degrees per point.

2.0
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/spirals/spiral_fermat.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
@gf.cell_with_module_name(tags=["spirals"])
def spiral_fermat(
    width: float = 1.0,
    n_turns: int = 5,
    a: float = 5.0,
    angle_resolution: float = 2.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a Fermat spiral: r = a * sqrt(theta).

    Args:
        width: width of the spiral trace.
        n_turns: number of turns.
        a: scaling factor.
        angle_resolution: degrees per point.
        layer: layer spec.
    """
    return cf.spiral_fermat(
        width=width,
        n_turns=n_turns,
        a=a,
        angle_resolution=angle_resolution,
        layer=layer,
    )

spiral_fermat

spiral_inductor

spiral_inductor

spiral_inductor(
    width: float = 3.0,
    pitch: float = 3.0,
    turns: int = 16,
    outer_diameter: float = 800,
    tail: float = 50.0,
    layer: LayerSpec = "M1",
) -> Component

Generates a spiral inductor for superconducting resonator applications, particularly in qubit readout circuits.

This component creates a spiral inductor pattern commonly used in superconducting quantum circuits. The inductor is designed with a square spiral geometry, featuring inner and outer connection tails.

See J. M. Hornibrook, J. I. Colless, A. C. Mahoney, X. G. Croot, S. Blanvillain, H. Lu, A. C. Gossard, D. J. Reilly; Frequency multiplexing for readout of spin qubits. Appl. Phys. Lett. 10 March 2014; 104 (10): 103108. https://doi.org/10.1063/1.4868107

Parameters:

Name Type Description Default
width float

Width of the inductor track in microns. Determines the cross-sectional area of the inductor.

3.0
pitch float

Distance between adjacent inductor tracks in microns. Affects the coupling between turns.

3.0
turns int

Number of complete spiral turns. Higher values increase inductance but require more space.

16
outer_diameter float

Overall size of the inductor in microns. Defines the maximum extent of the spiral.

800
tail float

Length of the inner and outer connection tails in microns. Used for connecting to other circuit elements.

50.0
layer LayerSpec

Metal layer for the inductor geometry and ports.

'M1'

Returns:

Name Type Description
Component Component

A GDSFactory component containing the spiral inductor pattern.

Source code in gdsfactory/components/spirals/spiral_inductor.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@gf.cell_with_module_name(schematic_function=spiral_schematic, tags=["spirals"])
def spiral_inductor(
    width: float = 3.0,
    pitch: float = 3.0,
    turns: int = 16,
    outer_diameter: float = 800,
    tail: float = 50.0,
    layer: LayerSpec = "M1",
) -> Component:
    """Generates a spiral inductor for superconducting resonator applications, particularly in qubit readout circuits.

    This component creates a spiral inductor pattern commonly used in superconducting quantum circuits.
    The inductor is designed with a square spiral geometry, featuring inner and outer connection tails.

    See J. M. Hornibrook, J. I. Colless, A. C. Mahoney, X. G. Croot, S. Blanvillain, H. Lu, A. C. Gossard, D. J. Reilly;
    Frequency multiplexing for readout of spin qubits. Appl. Phys. Lett. 10 March 2014; 104 (10): 103108. <https://doi.org/10.1063/1.4868107>

    Args:
        width: Width of the inductor track in microns. Determines the cross-sectional area of the inductor.
        pitch: Distance between adjacent inductor tracks in microns. Affects the coupling between turns.
        turns: Number of complete spiral turns. Higher values increase inductance but require more space.
        outer_diameter: Overall size of the inductor in microns. Defines the maximum extent of the spiral.
        tail: Length of the inner and outer connection tails in microns. Used for connecting to other circuit elements.
        layer: Metal layer for the inductor geometry and ports.

    Returns:
        Component: A GDSFactory component containing the spiral inductor pattern.
    """
    return cf.spiral_inductor(
        width=width,
        pitch=pitch,
        turns=turns,
        outer_diameter=outer_diameter,
        tail=tail,
        layer=layer,
    )

spiral_inductor

spiral_logarithmic

spiral_logarithmic

spiral_logarithmic(
    width: float = 0.5,
    n_turns: int = 4,
    a: float = 1.0,
    b: float = 0.1,
    angle_resolution: float = 2.0,
    layer: LayerSpec = "WG",
) -> Component

Returns a logarithmic spiral: r = a * exp(b * theta).

Parameters:

Name Type Description Default
width float

width of the spiral trace.

0.5
n_turns int

number of turns.

4
a float

initial radius scaling factor.

1.0
b float

growth rate.

0.1
angle_resolution float

degrees per point.

2.0
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/spirals/spiral_logarithmic.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@gf.cell_with_module_name(tags=["spirals"])
def spiral_logarithmic(
    width: float = 0.5,
    n_turns: int = 4,
    a: float = 1.0,
    b: float = 0.1,
    angle_resolution: float = 2.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a logarithmic spiral: r = a * exp(b * theta).

    Args:
        width: width of the spiral trace.
        n_turns: number of turns.
        a: initial radius scaling factor.
        b: growth rate.
        angle_resolution: degrees per point.
        layer: layer spec.
    """
    return cf.spiral_logarithmic(
        width=width,
        n_turns=n_turns,
        a=a,
        b=b,
        angle_resolution=angle_resolution,
        layer=layer,
    )

spiral_logarithmic

spiral_racetrack

spiral_racetrack(
    min_radius: float | None = None,
    straight_length: float = 20.0,
    spacings: Floats = (2, 2, 3, 3, 2, 2),
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_euler",
    bend_s: ComponentSpec = "bend_s",
    cross_section: CrossSectionSpec = "strip",
    cross_section_s: CrossSectionSpec | None = None,
    extra_90_deg_bend: bool = False,
    allow_min_radius_violation: bool = False,
) -> Component

Returns Racetrack-Spiral.

Parameters:

Name Type Description Default
min_radius float | None

smallest radius in um.

None
straight_length float

length of the straight segments in um.

20.0
spacings Floats

space between the center of neighboring waveguides in um.

(2, 2, 3, 3, 2, 2)
straight ComponentSpec

factory to generate the straight segments.

'straight'
bend ComponentSpec

factory to generate the bend segments.

'bend_euler'
bend_s ComponentSpec

factory to generate the s-bend segments.

'bend_s'
cross_section CrossSectionSpec

cross-section of the waveguides.

'strip'
cross_section_s CrossSectionSpec | None

cross-section of the s bend waveguide (optional).

None
extra_90_deg_bend bool

if True, we add an additional straight + 90 degree bent at the output, so the output port is looking down.

False
allow_min_radius_violation bool

if True, will allow the s-bend to have a smaller radius than the minimum radius.

False
Source code in gdsfactory/components/spirals/spiral_heater.py
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@gf.cell_with_module_name(schematic_function=spiral_schematic, tags=["spirals"])
def spiral_racetrack(
    min_radius: float | None = None,
    straight_length: float = 20.0,
    spacings: Floats = (2, 2, 3, 3, 2, 2),
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_euler",
    bend_s: ComponentSpec = "bend_s",
    cross_section: CrossSectionSpec = "strip",
    cross_section_s: CrossSectionSpec | None = None,
    extra_90_deg_bend: bool = False,
    allow_min_radius_violation: bool = False,
) -> Component:
    """Returns Racetrack-Spiral.

    Args:
        min_radius: smallest radius in um.
        straight_length: length of the straight segments in um.
        spacings: space between the center of neighboring waveguides in um.
        straight: factory to generate the straight segments.
        bend: factory to generate the bend segments.
        bend_s: factory to generate the s-bend segments.
        cross_section: cross-section of the waveguides.
        cross_section_s: cross-section of the s bend waveguide (optional).
        extra_90_deg_bend: if True, we add an additional straight + 90 degree bent at the output, so the output port is looking down.
        allow_min_radius_violation: if True, will allow the s-bend to have a smaller radius than the minimum radius.
    """
    return cf.spiral_racetrack(
        min_radius=min_radius,
        straight_length=straight_length,
        spacings=spacings,
        straight=straight,
        bend=bend,
        bend_s=bend_s,
        cross_section=cross_section,
        cross_section_s=cross_section_s,
        extra_90_deg_bend=extra_90_deg_bend,
        allow_min_radius_violation=allow_min_radius_violation,
    )

spiral_racetrack

spiral_racetrack_fixed_length

spiral_racetrack_fixed_length(
    length: float = 1000,
    in_out_port_spacing: float = 150,
    n_straight_sections: int = 8,
    min_radius: float | None = None,
    min_spacing: float = 5.0,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_circular",
    bend_s: ComponentSpec = "bend_s",
    cross_section: CrossSectionSpec = "strip",
    cross_section_s: CrossSectionSpec | None = None,
) -> Component

Returns Racetrack-Spiral with a specified total length.

The input and output ports are aligned in y. This class is meant to be used for generating interferometers with long waveguide lengths, where the most important parameter is the length difference between the arms.

Parameters:

Name Type Description Default
length float

total length of the spiral from input to output ports in um.

1000
in_out_port_spacing float

spacing between input and output ports of the spiral in um.

150
n_straight_sections int

total number of straight sections for the racetrack spiral. Has to be even.

8
min_radius float | None

smallest radius in um.

None
min_spacing float

minimum center-center spacing between adjacent waveguides.

5.0
straight ComponentSpec

factory to generate the straight segments.

'straight'
bend ComponentSpec

factory to generate the bend segments.

'bend_circular'
bend_s ComponentSpec

factory to generate the s-bend segments.

'bend_s'
cross_section CrossSectionSpec

cross-section of the waveguides.

'strip'
cross_section_s CrossSectionSpec | None

cross-section of the s bend waveguide (optional).

None
Source code in gdsfactory/components/spirals/spiral_heater.py
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@gf.cell_with_module_name(schematic_function=spiral_schematic, tags=["spirals"])
def spiral_racetrack_fixed_length(
    length: float = 1000,
    in_out_port_spacing: float = 150,
    n_straight_sections: int = 8,
    min_radius: float | None = None,
    min_spacing: float = 5.0,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_circular",
    bend_s: ComponentSpec = "bend_s",
    cross_section: CrossSectionSpec = "strip",
    cross_section_s: CrossSectionSpec | None = None,
) -> Component:
    """Returns Racetrack-Spiral with a specified total length.

    The input and output ports are aligned in y. This class is meant to
    be used for generating interferometers with long waveguide lengths, where
    the most important parameter is the length difference between the arms.

    Args:
        length: total length of the spiral from input to output ports in um.
        in_out_port_spacing: spacing between input and output ports of the spiral in um.
        n_straight_sections: total number of straight sections for the racetrack spiral. Has to be even.
        min_radius: smallest radius in um.
        min_spacing: minimum center-center spacing between adjacent waveguides.
        straight: factory to generate the straight segments.
        bend: factory to generate the bend segments.
        bend_s: factory to generate the s-bend segments.
        cross_section: cross-section of the waveguides.
        cross_section_s: cross-section of the s bend waveguide (optional).
    """
    return cf.spiral_racetrack_fixed_length(
        length=length,
        in_out_port_spacing=in_out_port_spacing,
        n_straight_sections=n_straight_sections,
        min_radius=min_radius,
        min_spacing=min_spacing,
        straight=straight,
        bend=bend,
        bend_s=bend_s,
        cross_section=cross_section,
        cross_section_s=cross_section_s,
    )

spiral_racetrack_fixed_length

spiral_racetrack_heater_doped

spiral_racetrack_heater_doped(
    min_radius: float | None = None,
    straight_length: float = 30,
    spacing: float = 2,
    num: int = 8,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_euler",
    bend_s: ComponentSpec = "bend_s",
    waveguide_cross_section: CrossSectionSpec = "strip",
    heater_cross_section: CrossSectionSpec = "npp",
) -> Component

Returns spiral racetrack with a heater between the loops.

based on https://doi.org/10.1364/OL.400230 but with the heater between the loops.

Parameters:

Name Type Description Default
min_radius float | None

smallest radius in um. Defaults to the radius of the cross-section.

None
straight_length float

length of the straight segments in um.

30
spacing float

space between the center of neighboring waveguides in um.

2
num int

number.

8
straight ComponentSpec

factory to generate the straight segments.

'straight'
bend ComponentSpec

factory to generate the bend segments.

'bend_euler'
bend_s ComponentSpec

factory to generate the s-bend segments.

'bend_s'
waveguide_cross_section CrossSectionSpec

cross-section of the waveguides.

'strip'
heater_cross_section CrossSectionSpec

cross-section of the heater.

'npp'
Source code in gdsfactory/components/spirals/spiral_heater.py
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
@gf.cell_with_module_name(schematic_function=spiral_schematic, tags=["spirals"])
def spiral_racetrack_heater_doped(
    min_radius: float | None = None,
    straight_length: float = 30,
    spacing: float = 2,
    num: int = 8,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_euler",
    bend_s: ComponentSpec = "bend_s",
    waveguide_cross_section: CrossSectionSpec = "strip",
    heater_cross_section: CrossSectionSpec = "npp",
) -> Component:
    """Returns spiral racetrack with a heater between the loops.

    based on <https://doi.org/10.1364/OL.400230> but with the heater between the loops.

    Args:
        min_radius: smallest radius in um. Defaults to the radius of the cross-section.
        straight_length: length of the straight segments in um.
        spacing: space between the center of neighboring waveguides in um.
        num: number.
        straight: factory to generate the straight segments.
        bend: factory to generate the bend segments.
        bend_s: factory to generate the s-bend segments.
        waveguide_cross_section: cross-section of the waveguides.
        heater_cross_section: cross-section of the heater.
    """
    return cf.spiral_racetrack_heater_doped(
        min_radius=min_radius,
        straight_length=straight_length,
        spacing=spacing,
        num=num,
        straight=straight,
        bend=bend,
        bend_s=bend_s,
        waveguide_cross_section=waveguide_cross_section,
        heater_cross_section=heater_cross_section,
    )

spiral_racetrack_heater_doped

spiral_racetrack_heater_metal

spiral_racetrack_heater_metal(
    min_radius: float | None = None,
    straight_length: float = 30,
    spacing: float = 2,
    num: int = 8,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_euler",
    bend_s: ComponentSpec = "bend_s",
    waveguide_cross_section: CrossSectionSpec = "strip",
    heater_cross_section: CrossSectionSpec = "heater_metal",
    via_stack: (
        ComponentSpec | None
    ) = "via_stack_heater_mtop",
) -> Component

Returns spiral racetrack with a heater above.

based on https://doi.org/10.1364/OL.400230 .

Parameters:

Name Type Description Default
min_radius float | None

smallest radius. Defaults to the radius of the cross-section.

None
straight_length float

length of the straight segments.

30
spacing float

space between the center of neighboring waveguides.

2
num int

number of loops.

8
straight ComponentSpec

factory to generate the straight segments.

'straight'
bend ComponentSpec

factory to generate the bend segments.

'bend_euler'
bend_s ComponentSpec

factory to generate the s-bend segments.

'bend_s'
waveguide_cross_section CrossSectionSpec

cross-section of the waveguides.

'strip'
heater_cross_section CrossSectionSpec

cross-section of the heater.

'heater_metal'
via_stack ComponentSpec | None

via stack to connect the heater to the metal layer.

'via_stack_heater_mtop'
Source code in gdsfactory/components/spirals/spiral_heater.py
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
@gf.cell_with_module_name(schematic_function=spiral_schematic, tags=["spirals"])
def spiral_racetrack_heater_metal(
    min_radius: float | None = None,
    straight_length: float = 30,
    spacing: float = 2,
    num: int = 8,
    straight: ComponentSpec = "straight",
    bend: ComponentSpec = "bend_euler",
    bend_s: ComponentSpec = "bend_s",
    waveguide_cross_section: CrossSectionSpec = "strip",
    heater_cross_section: CrossSectionSpec = "heater_metal",
    via_stack: ComponentSpec | None = "via_stack_heater_mtop",
) -> Component:
    """Returns spiral racetrack with a heater above.

    based on <https://doi.org/10.1364/OL.400230> .

    Args:
        min_radius: smallest radius. Defaults to the radius of the cross-section.
        straight_length: length of the straight segments.
        spacing: space between the center of neighboring waveguides.
        num: number of loops.
        straight: factory to generate the straight segments.
        bend: factory to generate the bend segments.
        bend_s: factory to generate the s-bend segments.
        waveguide_cross_section: cross-section of the waveguides.
        heater_cross_section: cross-section of the heater.
        via_stack: via stack to connect the heater to the metal layer.
    """
    return cf.spiral_racetrack_heater_metal(
        min_radius=min_radius,
        straight_length=straight_length,
        spacing=spacing,
        num=num,
        straight=straight,
        bend=bend,
        bend_s=bend_s,
        waveguide_cross_section=waveguide_cross_section,
        heater_cross_section=heater_cross_section,
        via_stack=via_stack,
    )

spiral_racetrack_heater_metal

spiral_rectangular

spiral_rectangular

spiral_rectangular(
    n_turns: int = 4,
    width: float = 1.0,
    start_length: float = 10.0,
    pitch: float = 3.0,
    layer: LayerSpec = "WG",
) -> Component

Returns a rectangular/Manhattan spiral as a polygon.

Each segment grows by pitch per half-turn, building an expanding rectangular spiral. The outline is created with the given width offset.

Parameters:

Name Type Description Default
n_turns int

number of full turns.

4
width float

width of the spiral trace.

1.0
start_length float

initial segment length.

10.0
pitch float

spacing between adjacent turns (center-to-center).

3.0
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/spirals/spiral_rectangular.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@gf.cell_with_module_name(tags=["spirals"])
def spiral_rectangular(
    n_turns: int = 4,
    width: float = 1.0,
    start_length: float = 10.0,
    pitch: float = 3.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a rectangular/Manhattan spiral as a polygon.

    Each segment grows by pitch per half-turn, building an expanding
    rectangular spiral. The outline is created with the given width offset.

    Args:
        n_turns: number of full turns.
        width: width of the spiral trace.
        start_length: initial segment length.
        pitch: spacing between adjacent turns (center-to-center).
        layer: layer spec.
    """
    return cf.spiral_rectangular(
        n_turns=n_turns,
        width=width,
        start_length=start_length,
        pitch=pitch,
        layer=layer,
    )

spiral_rectangular

superconductors

hline

hline

hline(
    length: float = 10.0,
    width: float = 0.5,
    layer: LayerSpec = "WG",
    port_type: str = "optical",
) -> Component

Creates a horizontal straight line component with ports on east and west sides.

This component is commonly used in photonic and superconducting circuits as a basic waveguide or transmission line element. It creates a rectangular polygon with ports at both ends for easy connection to other components.

Parameters:

Name Type Description Default
length float

Length of the line in microns. Must be positive.

10.0
width float

Width of the line in microns. Must be positive.

0.5
layer LayerSpec

Layer specification for the line (default: "WG"). Can be a string or a tuple of (layer, datatype).

'WG'
port_type str

Type of port to create (default: "optical"). Common values are "optical" for photonic circuits or "electrical" for superconducting circuits.

'optical'

Returns:

Name Type Description
Component Component

A gdsfactory Component object containing: - A rectangular polygon representing the line - Two ports named "o1" (west) and "o2" (east) - Component info with width and length values

Note
  • The line is centered vertically at y=0
  • Port "o1" is at x=0 with orientation 180° (west)
  • Port "o2" is at x=length with orientation 0° (east)
  • If length or width is 0 or negative, no polygon is created but ports are still added
Source code in gdsfactory/components/superconductors/hline.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@gf.cell_with_module_name(tags=["superconductors"])
def hline(
    length: float = 10.0,
    width: float = 0.5,
    layer: LayerSpec = "WG",
    port_type: str = "optical",
) -> Component:
    """Creates a horizontal straight line component with ports on east and west sides.

    This component is commonly used in photonic and superconducting circuits as a basic
    waveguide or transmission line element. It creates a rectangular polygon with ports
    at both ends for easy connection to other components.

    Args:
        length: Length of the line in microns. Must be positive.
        width: Width of the line in microns. Must be positive.
        layer: Layer specification for the line (default: "WG"). Can be a string or a tuple of (layer, datatype).
        port_type: Type of port to create (default: "optical"). Common values are "optical" for photonic circuits
            or "electrical" for superconducting circuits.

    Returns:
        Component: A gdsfactory Component object containing:
            - A rectangular polygon representing the line
            - Two ports named "o1" (west) and "o2" (east)
            - Component info with width and length values

    Note:
        - The line is centered vertically at y=0
        - Port "o1" is at x=0 with orientation 180° (west)
        - Port "o2" is at x=length with orientation 0° (east)
        - If length or width is 0 or negative, no polygon is created but ports are still added
    """
    return cf.hline(
        length=length,
        width=width,
        layer=layer,
        port_type=port_type,
    )

hline

optimal_90deg

optimal_90deg

optimal_90deg(
    width: float = 100,
    num_pts: int = 15,
    length_adjust: float = 1,
    layer: LayerSpec = (1, 0),
) -> Component

Returns optimally-rounded 90 degree bend that is sharp on the outer corner.

Parameters:

Name Type Description Default
width float

Width of the ports on either side of the bend.

100
num_pts int

The number of points comprising the curved section of the bend.

15
length_adjust float

Adjusts the length of the non-curved portion of the bend.

1
layer LayerSpec

Specific layer(s) to put polygon geometry on.

(1, 0)
Notes

Optimal structure from https://doi.org/10.1103/PhysRevB.84.174510 Clem, J., & Berggren, K. (2011). Geometry-dependent critical currents in superconducting nanocircuits. Physical Review B, 84(17), 1-27.

Source code in gdsfactory/components/superconductors/optimal_90deg.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
@gf.cell_with_module_name(tags=["superconductors"])
def optimal_90deg(
    width: float = 100,
    num_pts: int = 15,
    length_adjust: float = 1,
    layer: LayerSpec = (1, 0),
) -> Component:
    """Returns optimally-rounded 90 degree bend that is sharp on the outer corner.

    Args:
        width: Width of the ports on either side of the bend.
        num_pts: The number of points comprising the curved section of the bend.
        length_adjust: Adjusts the length of the non-curved portion of the bend.
        layer: Specific layer(s) to put polygon geometry on.

    Notes:
        Optimal structure from <https://doi.org/10.1103/PhysRevB.84.174510>
        Clem, J., & Berggren, K. (2011). Geometry-dependent critical currents in
        superconducting nanocircuits. Physical Review B, 84(17), 1-27.
    """
    return cf.optimal_90deg(
        width=width,
        num_pts=num_pts,
        length_adjust=length_adjust,
        layer=layer,
    )

optimal_90deg

optimal_hairpin

optimal_hairpin

optimal_hairpin(
    width: float = 0.2,
    pitch: float = 0.6,
    length: float = 10,
    turn_ratio: float = 4,
    num_pts: int = 50,
    layer: LayerSpec = (1, 0),
) -> Component

Returns an optimally-rounded hairpin geometry, with a 180 degree turn.

based on phidl.geometry

Parameters:

Name Type Description Default
width float

Width of the hairpin leads.

0.2
pitch float

Distance between the two hairpin leads. Must be greater than width.

0.6
length float

Length of the hairpin from the connectors to the opposite end of the curve.

10
turn_ratio float

int or float Specifies how much of the hairpin is dedicated to the 180 degree turn. A turn_ratio of 10 will result in 20% of the hairpin being comprised of the turn.

4
num_pts int

Number of points constituting the 180 degree turn.

50
layer LayerSpec

Specific layer(s) to put polygon geometry on.

(1, 0)
Notes

Hairpin pitch must be greater than width.

Optimal structure from https://doi.org/10.1103/PhysRevB.84.174510 Clem, J., & Berggren, K. (2011). Geometry-dependent critical currents in superconducting nanocircuits. Physical Review B, 84(17), 1-27.

Source code in gdsfactory/components/superconductors/optimal_hairpin.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
@gf.cell_with_module_name(tags=["superconductors"])
def optimal_hairpin(
    width: float = 0.2,
    pitch: float = 0.6,
    length: float = 10,
    turn_ratio: float = 4,
    num_pts: int = 50,
    layer: LayerSpec = (1, 0),
) -> Component:
    """Returns an optimally-rounded hairpin geometry, with a 180 degree turn.

    based on phidl.geometry

    Args:
        width: Width of the hairpin leads.
        pitch: Distance between the two hairpin leads. Must be greater than width.
        length: Length of the hairpin from the connectors to the opposite end of the curve.
        turn_ratio: int or float
            Specifies how much of the hairpin is dedicated to the 180 degree turn.
            A turn_ratio of 10 will result in 20% of the hairpin being comprised of the turn.
        num_pts: Number of points constituting the 180 degree turn.
        layer: Specific layer(s) to put polygon geometry on.

    Notes:
        Hairpin pitch must be greater than width.

        Optimal structure from <https://doi.org/10.1103/PhysRevB.84.174510>
        Clem, J., & Berggren, K. (2011). Geometry-dependent critical currents in
        superconducting nanocircuits. Physical Review B, 84(17), 1-27.
    """
    return cf.optimal_hairpin(
        width=width,
        pitch=pitch,
        length=length,
        turn_ratio=turn_ratio,
        num_pts=num_pts,
        layer=layer,
    )

optimal_hairpin

optimal_step

optimal_step

optimal_step(
    start_width: float = 10,
    end_width: float = 22,
    num_pts: int = 50,
    width_tol: float = 0.001,
    anticrowding_factor: float = 1.2,
    symmetric: bool = False,
    layer: LayerSpec = (1, 0),
) -> Component

Returns an optimally-rounded step geometry.

Parameters:

Name Type Description Default
start_width float

Width of the connector on the left end of the step.

10
end_width float

Width of the connector on the right end of the step.

22
num_pts int

number of points comprising the entire step geometry.

50
width_tol float

Point at which to terminate the calculation of the optimal step

0.001
anticrowding_factor float

Factor to reduce current crowding by elongating the structure and reducing the curvature

1.2
symmetric bool

If True, adds a mirrored copy of the step across the x-axis to the geometry and adjusts the width of the ports.

False
layer LayerSpec

layer spec to put polygon geometry on.

(1, 0)

based on phidl.geometry Optimal structure from https://doi.org/10.1103/PhysRevB.84.174510 Clem, J., & Berggren, K. (2011). Geometry-dependent critical currents in superconducting nanocircuits. Physical Review B, 84(17), 1-27.

Source code in gdsfactory/components/superconductors/optimal_step.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@gf.cell_with_module_name(tags=["superconductors"])
def optimal_step(
    start_width: float = 10,
    end_width: float = 22,
    num_pts: int = 50,
    width_tol: float = 1e-3,
    anticrowding_factor: float = 1.2,
    symmetric: bool = False,
    layer: LayerSpec = (1, 0),
) -> Component:
    """Returns an optimally-rounded step geometry.

    Args:
        start_width: Width of the connector on the left end of the step.
        end_width: Width of the connector on the right end of the step.
        num_pts: number of points comprising the entire step geometry.
        width_tol: Point at which to terminate the calculation of the optimal step
        anticrowding_factor: Factor to reduce current crowding by elongating
            the structure and reducing the curvature
        symmetric: If True, adds a mirrored copy of the step across the x-axis to the
            geometry and adjusts the width of the ports.
        layer: layer spec to put polygon geometry on.

    based on phidl.geometry
    Optimal structure from <https://doi.org/10.1103/PhysRevB.84.174510>
    Clem, J., & Berggren, K. (2011). Geometry-dependent critical currents in
    superconducting nanocircuits. Physical Review B, 84(17), 1-27.
    """
    return cf.optimal_step(
        start_width=start_width,
        end_width=end_width,
        num_pts=num_pts,
        width_tol=width_tol,
        anticrowding_factor=anticrowding_factor,
        symmetric=symmetric,
        layer=layer,
    )

optimal_step

snspd

snspd

snspd(
    wire_width: float = 0.2,
    wire_pitch: float = 0.6,
    size: Size = (10, 8),
    num_squares: int | None = None,
    turn_ratio: float = 4,
    terminals_same_side: bool = False,
    layer: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component

Creates an optimally-rounded SNSPD.

Parameters:

Name Type Description Default
wire_width float

Width of the wire.

0.2
wire_pitch float

Distance between two adjacent wires. Must be greater than width.

0.6
size Size

Float2 (width, height) of the rectangle formed by the outer boundary of the SNSPD.

(10, 8)
num_squares int | None

int | None = None Total number of squares inside the SNSPD length.

None
turn_ratio float

float Specifies how much of the SNSPD width is dedicated to the 180 degree turn. A turn_ratio of 10 will result in 20% of the width being comprised of the turn.

4
terminals_same_side bool

If True, both ports will be located on the same side of the SNSPD.

False
layer LayerSpec

layer spec to put polygon geometry on.

(1, 0)
port_type str

type of port to add to the component.

'electrical'
Source code in gdsfactory/components/superconductors/snspd.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@gf.cell_with_module_name(tags=["superconductors"])
def snspd(
    wire_width: float = 0.2,
    wire_pitch: float = 0.6,
    size: Size = (10, 8),
    num_squares: int | None = None,
    turn_ratio: float = 4,
    terminals_same_side: bool = False,
    layer: LayerSpec = (1, 0),
    port_type: str = "electrical",
) -> Component:
    """Creates an optimally-rounded SNSPD.

    Args:
        wire_width: Width of the wire.
        wire_pitch: Distance between two adjacent wires. Must be greater than `width`.
        size: Float2
            (width, height) of the rectangle formed by the outer boundary of the
            SNSPD.
        num_squares: int | None = None
            Total number of squares inside the SNSPD length.
        turn_ratio: float
            Specifies how much of the SNSPD width is dedicated to the 180 degree
            turn. A `turn_ratio` of 10 will result in 20% of the width being
            comprised of the turn.
        terminals_same_side: If True, both ports will be located on the same side of the SNSPD.
        layer: layer spec to put polygon geometry on.
        port_type: type of port to add to the component.

    """
    return cf.snspd(
        wire_width=wire_width,
        wire_pitch=wire_pitch,
        size=size,
        num_squares=num_squares,
        turn_ratio=turn_ratio,
        terminals_same_side=terminals_same_side,
        layer=layer,
        port_type=port_type,
    )

snspd

ytron_round

ytron_round(
    rho: float = 1,
    arm_lengths: tuple[float, float] = (500, 300),
    source_length: float = 500,
    arm_widths: tuple[float, float] = (200, 200),
    theta: float = 2.5,
    theta_resolution: float = 10,
    layer: LayerSpec = "WG",
) -> Component

Ytron structure for superconducting nanowires.

McCaughan, A. N., Abebe, N. S., Zhao, Q.-Y. & Berggren, K. K. Using Geometry To Sense Current. Nano Lett. 16, 7626-7631 (2016). http://dx.doi.org/10.1021/acs.nanolett.6b03593

Parameters:

Name Type Description Default
rho float

Radius of curvature of ytron intersection point.

1
arm_lengths tuple[float, float]

Lengths of the left and right arms of the yTron, respectively.

(500, 300)
source_length float

Length of the source of the yTron.

500
arm_widths tuple[float, float]

Widths of the left and right arms of the yTron, respectively.

(200, 200)
theta float

Angle between the two yTron arms.

2.5
theta_resolution float

Angle resolution for curvature of ytron intersection point.

10
layer LayerSpec

Specific layer(s) to put polygon geometry on.

'WG'

Returns:

Type Description
Component

Component containing a yTron geometry.

Source code in gdsfactory/components/superconductors/ytron.py
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
@gf.cell_with_module_name(tags=["superconductors"])
def ytron_round(
    rho: float = 1,
    arm_lengths: tuple[float, float] = (500, 300),
    source_length: float = 500,
    arm_widths: tuple[float, float] = (200, 200),
    theta: float = 2.5,
    theta_resolution: float = 10,
    layer: LayerSpec = "WG",
) -> Component:
    """Ytron structure for superconducting nanowires.

    McCaughan, A. N., Abebe, N. S., Zhao, Q.-Y. & Berggren, K. K.
    Using Geometry To Sense Current. Nano Lett. 16, 7626-7631 (2016).
    <http://dx.doi.org/10.1021/acs.nanolett.6b03593>

    Args:
        rho: Radius of curvature of ytron intersection point.
        arm_lengths: Lengths of the left and right arms of the yTron, respectively.
        source_length: Length of the source of the yTron.
        arm_widths: Widths of the left and right arms of the yTron, respectively.
        theta: Angle between the two yTron arms.
        theta_resolution: Angle resolution for curvature of ytron intersection point.
        layer: Specific layer(s) to put polygon geometry on.

    Returns:
        Component containing a yTron geometry.
    """
    return cf.ytron_round(
        rho=rho,
        arm_lengths=arm_lengths,
        source_length=source_length,
        arm_widths=arm_widths,
        theta=theta,
        theta_resolution=theta_resolution,
        layer=layer,
    )

ytron_round

tapers

ramp

ramp

ramp(
    length: float = 10.0,
    width1: float = 5.0,
    width2: float | None = 8.0,
    layer: LayerSpec = "WG",
) -> Component

Return a ramp component.

Based on phidl.

Parameters:

Name Type Description Default
length float

Length of the ramp section.

10.0
width1 float

Width of the start of the ramp section.

5.0
width2 float | None

Width of the end of the ramp section (defaults to width1).

8.0
layer LayerSpec

Specific layer to put polygon geometry on.

'WG'
Source code in gdsfactory/components/tapers/ramp.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@gf.cell_with_module_name(schematic_function=taper_schematic, tags=["tapers"])
def ramp(
    length: float = 10.0,
    width1: float = 5.0,
    width2: float | None = 8.0,
    layer: LayerSpec = "WG",
) -> Component:
    """Return a ramp component.

    Based on phidl.

    Args:
        length: Length of the ramp section.
        width1: Width of the start of the ramp section.
        width2: Width of the end of the ramp section (defaults to width1).
        layer: Specific layer to put polygon geometry on.
    """
    return cf.ramp(length=length, width1=width1, width2=width2, layer=layer)

ramp

taper

taper

taper(
    length: float = 10.0,
    width1: float = 0.5,
    width2: float | None = None,
    layer: LayerSpec | None = None,
    port: Port | None = None,
    with_two_ports: bool = True,
    cross_section: CrossSectionSpec = "strip",
    port_names: tuple[str, str] = ("o1", "o2"),
    port_types: tuple[str, str] = ("optical", "optical"),
    with_bbox: bool = True,
) -> Component

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

Parameters:

Name Type Description Default
length float

taper length.

10.0
width1 float

width of the west/left port.

0.5
width2 float | None

width of the east/right port. Defaults to width1.

None
layer LayerSpec | None

layer for the taper.

None
port Port | None

can taper from a port instead of defining width1.

None
with_two_ports bool

includes a second port. False for terminator and edge coupler fiber interface.

True
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
port_names tuple[str, str]

input and output port names. Second name only used if with_two_ports.

('o1', 'o2')
port_types tuple[str, str]

input and output port types. Second type only used if with_two_ports.

('optical', 'optical')
with_bbox bool

box in bbox_layers and bbox_offsets to avoid DRC sharp edges.

True
Source code in gdsfactory/components/tapers/taper.py
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@gf.cell_with_module_name(schematic_function=taper_schematic, tags=["tapers"])
def taper(
    length: float = 10.0,
    width1: float = 0.5,
    width2: float | None = None,
    layer: LayerSpec | None = None,
    port: Port | None = None,
    with_two_ports: bool = True,
    cross_section: CrossSectionSpec = "strip",
    port_names: tuple[str, str] = ("o1", "o2"),
    port_types: tuple[str, str] = ("optical", "optical"),
    with_bbox: bool = True,
) -> Component:
    """Linear taper, which tapers only the main cross section section.

    Args:
        length: taper length.
        width1: width of the west/left port.
        width2: width of the east/right port. Defaults to width1.
        layer: layer for the taper.
        port: can taper from a port instead of defining width1.
        with_two_ports: includes a second port.
            False for terminator and edge coupler fiber interface.
        cross_section: specification (CrossSection, string, CrossSectionFactory dict).
        port_names: input and output port names. Second name only used if with_two_ports.
        port_types: input and output port types. Second type only used if with_two_ports.
        with_bbox: box in bbox_layers and bbox_offsets to avoid DRC sharp edges.
    """
    return cf.taper(
        length=length,
        width1=width1,
        width2=width2,
        layer=layer,
        port=port,
        with_two_ports=with_two_ports,
        cross_section=cross_section,
        port_names=port_names,
        port_types=port_types,
        with_bbox=with_bbox,
    )

taper_nc_sc

taper_nc_sc(
    width1: float = 1,
    width2: float = 0.5,
    length: float = 20,
    layer_wg: LayerSpec = "WG",
    layer_nitride: LayerSpec = "WGN",
    width_tip_nitride: float = 0.15,
    width_tip_silicon: float = 0.15,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Taper from nitride to strip.

Parameters:

Name Type Description Default
width1 float

nitride width.

1
width2 float

silicon width.

0.5
length float

taper length.

20
layer_wg LayerSpec

nitride layer.

'WG'
layer_nitride LayerSpec

strip layer.

'WGN'
width_tip_nitride float

tip width for nitride.

0.15
width_tip_silicon float

tip width for strip.

0.15
cross_section CrossSectionSpec

cross_section specification.

'strip'
Source code in gdsfactory/components/tapers/taper.py
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
@gf.cell_with_module_name(schematic_function=transition_schematic, tags=["tapers"])
def taper_nc_sc(
    width1: float = 1,
    width2: float = 0.5,
    length: float = 20,
    layer_wg: LayerSpec = "WG",
    layer_nitride: LayerSpec = "WGN",
    width_tip_nitride: float = 0.15,
    width_tip_silicon: float = 0.15,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Taper from nitride to strip.

    Args:
        width1: nitride width.
        width2: silicon width.
        length: taper length.
        layer_wg: nitride layer.
        layer_nitride: strip layer.
        width_tip_nitride: tip width for nitride.
        width_tip_silicon: tip width for strip.
        cross_section: cross_section specification.
    """
    return cf.taper_nc_sc(
        width1=width1,
        width2=width2,
        length=length,
        layer_wg=layer_wg,
        layer_nitride=layer_nitride,
        width_tip_nitride=width_tip_nitride,
        width_tip_silicon=width_tip_silicon,
        cross_section=cross_section,
    )

taper_sc_nc

taper_sc_nc(
    width1: float = 0.5,
    width2: float = 1,
    length: float = 20,
    layer_wg: LayerSpec = "WG",
    layer_nitride: LayerSpec = "WGN",
    width_tip_nitride: float = 0.15,
    width_tip_silicon: float = 0.15,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Taper from strip to nitride.

Parameters:

Name Type Description Default
width1 float

strip width.

0.5
width2 float

nitride width.

1
length float

taper length.

20
layer_wg LayerSpec

strip layer.

'WG'
layer_nitride LayerSpec

nitride layer.

'WGN'
width_tip_nitride float

tip width for nitride.

0.15
width_tip_silicon float

tip width for strip.

0.15
cross_section CrossSectionSpec

cross_section specification.

'strip'
Source code in gdsfactory/components/tapers/taper.py
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
@gf.cell_with_module_name(schematic_function=transition_schematic, tags=["tapers"])
def taper_sc_nc(
    width1: float = 0.5,
    width2: float = 1,
    length: float = 20,
    layer_wg: LayerSpec = "WG",
    layer_nitride: LayerSpec = "WGN",
    width_tip_nitride: float = 0.15,
    width_tip_silicon: float = 0.15,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Taper from strip to nitride.

    Args:
        width1: strip width.
        width2: nitride width.
        length: taper length.
        layer_wg: strip layer.
        layer_nitride: nitride layer.
        width_tip_nitride: tip width for nitride.
        width_tip_silicon: tip width for strip.
        cross_section: cross_section specification.
    """
    return cf.taper_sc_nc(
        width1=width1,
        width2=width2,
        length=length,
        layer_wg=layer_wg,
        layer_nitride=layer_nitride,
        width_tip_nitride=width_tip_nitride,
        width_tip_silicon=width_tip_silicon,
        cross_section=cross_section,
    )

taper_strip_to_ridge

taper_strip_to_ridge(
    length: float = 10.0,
    width1: float = 0.5,
    width2: float = 0.5,
    w_slab1: float = 0.15,
    w_slab2: float = 6.0,
    layer_wg: LayerSpec = "WG",
    layer_slab: LayerSpec = "SLAB90",
    cross_section: CrossSectionSpec = "strip",
    use_slab_port: bool = False,
    slab_port_layer: LayerSpec | None = None,
) -> Component

Linear taper from strip to rib.

Ports carry both waveguide and slab sections for geometry-matched extensions.

Parameters:

Name Type Description Default
length float

taper length (um).

10.0
width1 float

in um.

0.5
width2 float

in um.

0.5
w_slab1 float

slab width in um.

0.15
w_slab2 float

slab width in um.

6.0
layer_wg LayerSpec

for input waveguide.

'WG'
layer_slab LayerSpec

for output waveguide with slab.

'SLAB90'
cross_section CrossSectionSpec

for input waveguide.

'strip'
use_slab_port bool

if True adds a second port for the slab.

False
slab_port_layer LayerSpec | None

if specified, overrides the layer for the slab port.

None
                  __________________________
                 /           |
         _______/____________|______________
               /             |
   width1     |w_slab1       | w_slab2  width2
         ______\_____________|______________
                \            |
                 \__________________________
Source code in gdsfactory/components/tapers/taper.py
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@gf.cell_with_module_name(schematic_function=transition_schematic, tags=["tapers"])
def taper_strip_to_ridge(
    length: float = 10.0,
    width1: float = 0.5,
    width2: float = 0.5,
    w_slab1: float = 0.15,
    w_slab2: float = 6.0,
    layer_wg: LayerSpec = "WG",
    layer_slab: LayerSpec = "SLAB90",
    cross_section: CrossSectionSpec = "strip",
    use_slab_port: bool = False,
    slab_port_layer: LayerSpec | None = None,
) -> Component:
    r"""Linear taper from strip to rib.

    Ports carry both waveguide and slab sections for geometry-matched extensions.

    Args:
        length: taper length (um).
        width1: in um.
        width2: in um.
        w_slab1: slab width in um.
        w_slab2: slab width in um.
        layer_wg: for input waveguide.
        layer_slab: for output waveguide with slab.
        cross_section: for input waveguide.
        use_slab_port: if True adds a second port for the slab.
        slab_port_layer: if specified, overrides the layer for the slab port.

    ```text
                      __________________________
                     /           |
             _______/____________|______________
                   /             |
       width1     |w_slab1       | w_slab2  width2
             ______\_____________|______________
                    \            |
                     \__________________________
    ```

    """
    return cf.taper_strip_to_ridge(
        length=length,
        width1=width1,
        width2=width2,
        w_slab1=w_slab1,
        w_slab2=w_slab2,
        layer_wg=layer_wg,
        layer_slab=layer_slab,
        cross_section=cross_section,
        use_slab_port=use_slab_port,
        slab_port_layer=slab_port_layer,
    )

taper_strip_to_ridge_trenches

taper_strip_to_ridge_trenches(
    length: float = 10.0,
    width: float = 0.5,
    slab_offset: float = 3.0,
    trench_width: float = 2.0,
    trench_layer: LayerSpec = "DEEP_ETCH",
    layer_wg: LayerSpec = "WG",
    trench_offset: float = 0.1,
) -> gf.Component

Defines taper using trenches to define the etch.

Ports carry the core, surrounding waveguide, and both trench sections.

Parameters:

Name Type Description Default
length float

in um.

10.0
width float

in um.

0.5
slab_offset float

in um.

3.0
trench_width float

in um.

2.0
trench_layer LayerSpec

trench layer.

'DEEP_ETCH'
layer_wg LayerSpec

waveguide layer.

'WG'
trench_offset float

after waveguide in um.

0.1
Source code in gdsfactory/components/tapers/taper.py
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
@gf.cell_with_module_name(schematic_function=transition_schematic, tags=["tapers"])
def taper_strip_to_ridge_trenches(
    length: float = 10.0,
    width: float = 0.5,
    slab_offset: float = 3.0,
    trench_width: float = 2.0,
    trench_layer: LayerSpec = "DEEP_ETCH",
    layer_wg: LayerSpec = "WG",
    trench_offset: float = 0.1,
) -> gf.Component:
    """Defines taper using trenches to define the etch.

    Ports carry the core, surrounding waveguide, and both trench sections.

    Args:
        length: in um.
        width: in um.
        slab_offset: in um.
        trench_width: in um.
        trench_layer: trench layer.
        layer_wg: waveguide layer.
        trench_offset: after waveguide in um.
    """
    return cf.taper_strip_to_ridge_trenches(
        length=length,
        width=width,
        slab_offset=slab_offset,
        trench_width=trench_width,
        trench_layer=trench_layer,
        layer_wg=layer_wg,
        trench_offset=trench_offset,
    )

taper

taper_0p5_to_3_l36 module-attribute

taper_0p5_to_3_l36 = CellAlias(
    taper_from_csv,
    filepath=data / "taper_strip_0p5_3_36.csv",
)

taper_0p5_to_3_l36

taper_adiabatic

taper_adiabatic

taper_adiabatic(
    width1: float = 0.5,
    width2: float = 5.0,
    length: float = 0,
    neff_w: Callable[[float], float] = neff_TE1550SOI_220nm,
    alpha: float = 1,
    wavelength: float = 1.55,
    npoints: int = 200,
    cross_section: CrossSectionSpec = "strip",
    max_length: float = 200,
) -> gf.Component

Returns a straight adiabatic_taper from an effective index callable.

Parameters:

Name Type Description Default
width1 float

initial width.

0.5
width2 float

final width.

5.0
length float

0 uses the optimized length, and otherwise the optimal shape is compressed/stretched to the specified length.

0
neff_w Callable[[float], float]

a callable that returns the effective index as a function of width - By default, will use a compact model of neff(y) for fundamental 1550 nm TE mode of 220nm-thick core with 3.45 index, fully clad with 1.44 index. Many coefficients are needed to capture the behaviour.

neff_TE1550SOI_220nm
alpha float

parameter that scales the rate of width change. - closer to 0 means longer and more adiabatic; - 1 is the intuitive limit beyond which higher order modes are excited; - [2] reports good performance up to 1.4 for fundamental TE in SOI (for multiple core thicknesses)

1
wavelength float

wavelength in um.

1.55
npoints int

number of points for sampling.

200
cross_section CrossSectionSpec

cross_section specification.

'strip'
max_length float

maximum length for the taper.

200
References

[1] Burns, W. K., et al. "Optical waveguide parabolic coupling horns." Appl. Phys. Lett., vol. 30, no. 1, 1 Jan. 1977, pp. 28-30, doi:10.1063/1.89199. [2] Fu, Yunfei, et al. "Efficient adiabatic silicon-on-insulator waveguide taper." Photonics Res., vol. 2, no. 3, 1 June 2014, pp. A41-A44, doi:10.1364/PRJ.2.000A41. npoints: number of points for sampling

Source code in gdsfactory/components/tapers/taper_adiabatic.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@gf.cell_with_module_name(schematic_function=taper_schematic, tags=["tapers"])
def taper_adiabatic(
    width1: float = 0.5,
    width2: float = 5.0,
    length: float = 0,
    neff_w: Callable[[float], float] = neff_TE1550SOI_220nm,
    alpha: float = 1,
    wavelength: float = 1.55,
    npoints: int = 200,
    cross_section: CrossSectionSpec = "strip",
    max_length: float = 200,
) -> gf.Component:
    """Returns a straight adiabatic_taper from an effective index callable.

    Args:
        width1: initial width.
        width2: final width.
        length: 0 uses the optimized length, and otherwise the optimal shape is compressed/stretched to the specified length.
        neff_w: a callable that returns the effective index as a function of width
                - By default, will use a compact model of neff(y) for fundamental 1550 nm TE mode of 220nm-thick core with 3.45 index, fully clad with 1.44 index. Many coefficients are needed to capture the behaviour.
        alpha: parameter that scales the rate of width change.
                - closer to 0 means longer and more adiabatic;
                - 1 is the intuitive limit beyond which higher order modes are excited;
                - [2] reports good performance up to 1.4 for fundamental TE in SOI (for multiple core thicknesses)
        wavelength: wavelength in um.
        npoints: number of points for sampling.
        cross_section: cross_section specification.
        max_length: maximum length for the taper.

    References:
        [1] Burns, W. K., et al. "Optical waveguide parabolic coupling horns." Appl. Phys. Lett., vol. 30, no. 1, 1 Jan. 1977, pp. 28-30, doi:10.1063/1.89199.
        [2] Fu, Yunfei, et al. "Efficient adiabatic silicon-on-insulator waveguide taper." Photonics Res., vol. 2, no. 3, 1 June 2014, pp. A41-A44, doi:10.1364/PRJ.2.000A41.
        npoints: number of points for sampling
    """
    return cf.taper_adiabatic(
        width1=width1,
        width2=width2,
        length=length,
        neff_w=neff_w,
        alpha=alpha,
        wavelength=wavelength,
        npoints=npoints,
        cross_section=cross_section,
        max_length=max_length,
    )

taper_adiabatic

taper_cross_section

taper_cross_section

taper_cross_section(
    cross_section1: CrossSectionSpec = "strip_rib_tip",
    cross_section2: CrossSectionSpec = "rib2",
    length: float = 10,
    npoints: int = 100,
    linear: bool = False,
    width_type: WidthTypes = "sine",
    exclude_layers: LayerSpecs | None = None,
) -> Component

Returns taper transition between cross_section1 and cross_section2.

Parameters:

Name Type Description Default
cross_section1 CrossSectionSpec

start cross_section factory.

'strip_rib_tip'
cross_section2 CrossSectionSpec

end cross_section factory.

'rib2'
length float

transition length.

10
npoints int

number of points.

100
linear bool

shape of the transition, sine when False.

False
width_type WidthTypes

shape of the transition ONLY IF linear is False

'sine'
exclude_layers LayerSpecs | None

layers to exclude from the transition. Sections on these layers will be omitted from the component.

None
                       _____________________
                      /
              _______/______________________
                    /
   cross_section1  |        cross_section2
              ______\_______________________
                     \
                      \_____________________
Source code in gdsfactory/components/tapers/taper_cross_section.py
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
@gf.cell_with_module_name(schematic_function=transition_schematic, tags=["tapers"])
def taper_cross_section(
    cross_section1: CrossSectionSpec = "strip_rib_tip",
    cross_section2: CrossSectionSpec = "rib2",
    length: float = 10,
    npoints: int = 100,
    linear: bool = False,
    width_type: WidthTypes = "sine",
    exclude_layers: LayerSpecs | None = None,
) -> Component:
    r"""Returns taper transition between cross_section1 and cross_section2.

    Args:
        cross_section1: start cross_section factory.
        cross_section2: end cross_section factory.
        length: transition length.
        npoints: number of points.
        linear: shape of the transition, sine when False.
        width_type: shape of the transition ONLY IF linear is False
        exclude_layers: layers to exclude from the transition.
            Sections on these layers will be omitted from the component.

    ```text
                           _____________________
                          /
                  _______/______________________
                        /
       cross_section1  |        cross_section2
                  ______\_______________________
                         \
                          \_____________________
    ```


    """
    return cf.taper_cross_section(
        cross_section1=cross_section1,
        cross_section2=cross_section2,
        length=length,
        npoints=npoints,
        linear=linear,
        width_type=width_type,
        exclude_layers=exclude_layers,
    )

taper_cross_section

taper_cross_section_linear module-attribute

taper_cross_section_linear = CellAlias(
    taper_cross_section, linear=True, npoints=2
)

taper_cross_section_linear

taper_cross_section_parabolic module-attribute

taper_cross_section_parabolic = CellAlias(
    taper_cross_section,
    linear=False,
    width_type="parabolic",
    npoints=101,
)

taper_cross_section_parabolic

taper_cross_section_sine module-attribute

taper_cross_section_sine = CellAlias(
    taper_cross_section, linear=False, npoints=101
)

taper_cross_section_sine

taper_electrical module-attribute

taper_electrical = CellAlias(
    taper,
    port_types=("electrical", "electrical"),
    port_names=("e1", "e2"),
    cross_section="metal_routing",
)

taper_electrical

taper_from_csv

Adiabatic tapers from CSV files.

taper_from_csv

taper_from_csv(
    filepath: Path = data / "taper_strip_0p5_3_36.csv",
    cross_section: CrossSectionSpec = "strip",
) -> Component

Returns taper from CSV file.

Parameters:

Name Type Description Default
filepath Path

for CSV file.

data / 'taper_strip_0p5_3_36.csv'
cross_section CrossSectionSpec

specification (CrossSection, string, CrossSectionFactory dict).

'strip'
Source code in gdsfactory/components/tapers/taper_from_csv.py
29
30
31
32
33
34
35
36
37
38
39
40
@gf.cell_with_module_name(schematic_function=taper_schematic, tags=["tapers"])
def taper_from_csv(
    filepath: Path = data / "taper_strip_0p5_3_36.csv",
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Returns taper from CSV file.

    Args:
        filepath: for CSV file.
        cross_section: specification (CrossSection, string, CrossSectionFactory dict).
    """
    return cf.taper_from_csv(filepath=filepath, cross_section=cross_section)

taper_from_csv

taper_hecken

Hecken taper for microstrip impedance matching.

Adapted from PHIDL https://github.com/amccaugh/phidl/ by Adam McCaughan

taper_hecken

taper_hecken(
    length: float = 200,
    B: float = 4.0091,
    dielectric_thickness: float = 0.25,
    eps_r: float = 2,
    Lk_per_sq: float = 2.5e-10,
    Z1: float | None = 50,
    Z2: float | None = 100,
    width1: float | None = None,
    width2: float | None = None,
    num_pts: int = 100,
    layer: LayerSpec = "WG",
) -> Component

Creates a Hecken-tapered microstrip.

Parameters:

Name Type Description Default
length float

Length of the microstrip.

200
B float

Controls the intensity of the taper.

4.0091
dielectric_thickness float

Thickness of the substrate.

0.25
eps_r float

Dielectric constant of the substrate.

2
Lk_per_sq float

Kinetic inductance per square of the microstrip.

2.5e-10
Z1 float | None

Impedance of the left side region of the microstrip.

50
Z2 float | None

Impedance of the right side region of the microstrip.

100
width1 float | None

Width of the left side of the microstrip.

None
width2 float | None

Width of the right side of the microstrip.

None
num_pts int

Number of points comprising the curve of the entire microstrip.

100
layer LayerSpec

Specific layer(s) to put polygon geometry on.

'WG'

Returns:

Type Description
Component

Component containing a Hecken-tapered microstrip.

Source code in gdsfactory/components/tapers/taper_hecken.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
@gf.cell_with_module_name(schematic_function=taper_schematic, tags=["tapers"])
def taper_hecken(
    length: float = 200,
    B: float = 4.0091,
    dielectric_thickness: float = 0.25,
    eps_r: float = 2,
    Lk_per_sq: float = 250e-12,
    Z1: float | None = 50,
    Z2: float | None = 100,
    width1: float | None = None,
    width2: float | None = None,
    num_pts: int = 100,
    layer: LayerSpec = "WG",
) -> Component:
    """Creates a Hecken-tapered microstrip.

    Args:
        length: Length of the microstrip.
        B: Controls the intensity of the taper.
        dielectric_thickness: Thickness of the substrate.
        eps_r: Dielectric constant of the substrate.
        Lk_per_sq: Kinetic inductance per square of the microstrip.
        Z1: Impedance of the left side region of the microstrip.
        Z2: Impedance of the right side region of the microstrip.
        width1: Width of the left side of the microstrip.
        width2: Width of the right side of the microstrip.
        num_pts: Number of points comprising the curve of the entire microstrip.
        layer: Specific layer(s) to put polygon geometry on.

    Returns:
        Component containing a Hecken-tapered microstrip.
    """
    return cf.taper_hecken(
        length=length,
        B=B,
        dielectric_thickness=dielectric_thickness,
        eps_r=eps_r,
        Lk_per_sq=Lk_per_sq,
        Z1=Z1,
        Z2=Z2,
        width1=width1,
        width2=width2,
        num_pts=num_pts,
        layer=layer,
    )

taper_hecken

taper_meander

Meander taper for superconducting nanowires.

Adapted from PHIDL https://github.com/amccaugh/phidl/ by Adam McCaughan

taper_meander

taper_meander(
    x_taper: tuple[float, ...] | None = None,
    w_taper: tuple[float, ...] | None = None,
    meander_length: float = 1000,
    spacing_factor: float = 3,
    min_spacing: float = 0.5,
    layer: LayerSpec = "WG",
) -> Component

Create a meander from arrays of x-positions and widths.

Typically used for creating meandered tapers.

Parameters:

Name Type Description Default
x_taper tuple[float, ...] | None

The x-coordinates of the data points, must be increasing.

None
w_taper tuple[float, ...] | None

The widths at each x-coordinate, same length as x_taper.

None
meander_length float

Length of each section of the meander.

1000
spacing_factor float

Multiplicative spacing factor between adjacent meanders.

3
min_spacing float

Minimum spacing between adjacent meanders.

0.5
layer LayerSpec

Specific layer(s) to put polygon geometry on.

'WG'

Returns:

Type Description
Component

Component containing the meandered taper.

Source code in gdsfactory/components/tapers/taper_meander.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
@gf.cell_with_module_name(schematic_function=taper_schematic, tags=["tapers"])
def taper_meander(
    x_taper: tuple[float, ...] | None = None,
    w_taper: tuple[float, ...] | None = None,
    meander_length: float = 1000,
    spacing_factor: float = 3,
    min_spacing: float = 0.5,
    layer: LayerSpec = "WG",
) -> Component:
    """Create a meander from arrays of x-positions and widths.

    Typically used for creating meandered tapers.

    Args:
        x_taper: The x-coordinates of the data points, must be increasing.
        w_taper: The widths at each x-coordinate, same length as x_taper.
        meander_length: Length of each section of the meander.
        spacing_factor: Multiplicative spacing factor between adjacent meanders.
        min_spacing: Minimum spacing between adjacent meanders.
        layer: Specific layer(s) to put polygon geometry on.

    Returns:
        Component containing the meandered taper.
    """
    return cf.taper_meander(
        x_taper=x_taper,
        w_taper=w_taper,
        meander_length=meander_length,
        spacing_factor=spacing_factor,
        min_spacing=min_spacing,
        layer=layer,
    )

taper_meander

taper_nc_sc

taper_nc_sc(
    width1: float = 1,
    width2: float = 0.5,
    length: float = 20,
    layer_wg: LayerSpec = "WG",
    layer_nitride: LayerSpec = "WGN",
    width_tip_nitride: float = 0.15,
    width_tip_silicon: float = 0.15,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Taper from nitride to strip.

Parameters:

Name Type Description Default
width1 float

nitride width.

1
width2 float

silicon width.

0.5
length float

taper length.

20
layer_wg LayerSpec

nitride layer.

'WG'
layer_nitride LayerSpec

strip layer.

'WGN'
width_tip_nitride float

tip width for nitride.

0.15
width_tip_silicon float

tip width for strip.

0.15
cross_section CrossSectionSpec

cross_section specification.

'strip'
Source code in gdsfactory/components/tapers/taper.py
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
@gf.cell_with_module_name(schematic_function=transition_schematic, tags=["tapers"])
def taper_nc_sc(
    width1: float = 1,
    width2: float = 0.5,
    length: float = 20,
    layer_wg: LayerSpec = "WG",
    layer_nitride: LayerSpec = "WGN",
    width_tip_nitride: float = 0.15,
    width_tip_silicon: float = 0.15,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Taper from nitride to strip.

    Args:
        width1: nitride width.
        width2: silicon width.
        length: taper length.
        layer_wg: nitride layer.
        layer_nitride: strip layer.
        width_tip_nitride: tip width for nitride.
        width_tip_silicon: tip width for strip.
        cross_section: cross_section specification.
    """
    return cf.taper_nc_sc(
        width1=width1,
        width2=width2,
        length=length,
        layer_wg=layer_wg,
        layer_nitride=layer_nitride,
        width_tip_nitride=width_tip_nitride,
        width_tip_silicon=width_tip_silicon,
        cross_section=cross_section,
    )

taper_nc_sc

taper_parabolic

taper_parabolic

taper_parabolic(
    length: float = 20,
    width1: float = 0.5,
    width2: float = 5.0,
    exp: float = 0.5,
    npoints: int = 100,
    layer: LayerSpec = "WG",
) -> gf.Component

Returns a parabolic_taper.

Parameters:

Name Type Description Default
length float

in um.

20
width1 float

in um.

0.5
width2 float

in um.

5.0
exp float

exponent.

0.5
npoints int

number of points.

100
layer LayerSpec

layer spec.

'WG'
Source code in gdsfactory/components/tapers/taper_parabolic.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@gf.cell_with_module_name(schematic_function=taper_schematic, tags=["tapers"])
def taper_parabolic(
    length: float = 20,
    width1: float = 0.5,
    width2: float = 5.0,
    exp: float = 0.5,
    npoints: int = 100,
    layer: LayerSpec = "WG",
) -> gf.Component:
    """Returns a parabolic_taper.

    Args:
        length: in um.
        width1: in um.
        width2: in um.
        exp: exponent.
        npoints: number of points.
        layer: layer spec.
    """
    return cf.taper_parabolic(
        length=length,
        width1=width1,
        width2=width2,
        exp=exp,
        npoints=npoints,
        layer=layer,
    )

taper_parabolic

taper_sc_nc

taper_sc_nc(
    width1: float = 0.5,
    width2: float = 1,
    length: float = 20,
    layer_wg: LayerSpec = "WG",
    layer_nitride: LayerSpec = "WGN",
    width_tip_nitride: float = 0.15,
    width_tip_silicon: float = 0.15,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Taper from strip to nitride.

Parameters:

Name Type Description Default
width1 float

strip width.

0.5
width2 float

nitride width.

1
length float

taper length.

20
layer_wg LayerSpec

strip layer.

'WG'
layer_nitride LayerSpec

nitride layer.

'WGN'
width_tip_nitride float

tip width for nitride.

0.15
width_tip_silicon float

tip width for strip.

0.15
cross_section CrossSectionSpec

cross_section specification.

'strip'
Source code in gdsfactory/components/tapers/taper.py
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
@gf.cell_with_module_name(schematic_function=transition_schematic, tags=["tapers"])
def taper_sc_nc(
    width1: float = 0.5,
    width2: float = 1,
    length: float = 20,
    layer_wg: LayerSpec = "WG",
    layer_nitride: LayerSpec = "WGN",
    width_tip_nitride: float = 0.15,
    width_tip_silicon: float = 0.15,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Taper from strip to nitride.

    Args:
        width1: strip width.
        width2: nitride width.
        length: taper length.
        layer_wg: strip layer.
        layer_nitride: nitride layer.
        width_tip_nitride: tip width for nitride.
        width_tip_silicon: tip width for strip.
        cross_section: cross_section specification.
    """
    return cf.taper_sc_nc(
        width1=width1,
        width2=width2,
        length=length,
        layer_wg=layer_wg,
        layer_nitride=layer_nitride,
        width_tip_nitride=width_tip_nitride,
        width_tip_silicon=width_tip_silicon,
        cross_section=cross_section,
    )

taper_sc_nc

taper_strip_to_ridge

taper_strip_to_ridge(
    length: float = 10.0,
    width1: float = 0.5,
    width2: float = 0.5,
    w_slab1: float = 0.15,
    w_slab2: float = 6.0,
    layer_wg: LayerSpec = "WG",
    layer_slab: LayerSpec = "SLAB90",
    cross_section: CrossSectionSpec = "strip",
    use_slab_port: bool = False,
    slab_port_layer: LayerSpec | None = None,
) -> Component

Linear taper from strip to rib.

Ports carry both waveguide and slab sections for geometry-matched extensions.

Parameters:

Name Type Description Default
length float

taper length (um).

10.0
width1 float

in um.

0.5
width2 float

in um.

0.5
w_slab1 float

slab width in um.

0.15
w_slab2 float

slab width in um.

6.0
layer_wg LayerSpec

for input waveguide.

'WG'
layer_slab LayerSpec

for output waveguide with slab.

'SLAB90'
cross_section CrossSectionSpec

for input waveguide.

'strip'
use_slab_port bool

if True adds a second port for the slab.

False
slab_port_layer LayerSpec | None

if specified, overrides the layer for the slab port.

None
                  __________________________
                 /           |
         _______/____________|______________
               /             |
   width1     |w_slab1       | w_slab2  width2
         ______\_____________|______________
                \            |
                 \__________________________
Source code in gdsfactory/components/tapers/taper.py
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@gf.cell_with_module_name(schematic_function=transition_schematic, tags=["tapers"])
def taper_strip_to_ridge(
    length: float = 10.0,
    width1: float = 0.5,
    width2: float = 0.5,
    w_slab1: float = 0.15,
    w_slab2: float = 6.0,
    layer_wg: LayerSpec = "WG",
    layer_slab: LayerSpec = "SLAB90",
    cross_section: CrossSectionSpec = "strip",
    use_slab_port: bool = False,
    slab_port_layer: LayerSpec | None = None,
) -> Component:
    r"""Linear taper from strip to rib.

    Ports carry both waveguide and slab sections for geometry-matched extensions.

    Args:
        length: taper length (um).
        width1: in um.
        width2: in um.
        w_slab1: slab width in um.
        w_slab2: slab width in um.
        layer_wg: for input waveguide.
        layer_slab: for output waveguide with slab.
        cross_section: for input waveguide.
        use_slab_port: if True adds a second port for the slab.
        slab_port_layer: if specified, overrides the layer for the slab port.

    ```text
                      __________________________
                     /           |
             _______/____________|______________
                   /             |
       width1     |w_slab1       | w_slab2  width2
             ______\_____________|______________
                    \            |
                     \__________________________
    ```

    """
    return cf.taper_strip_to_ridge(
        length=length,
        width1=width1,
        width2=width2,
        w_slab1=w_slab1,
        w_slab2=w_slab2,
        layer_wg=layer_wg,
        layer_slab=layer_slab,
        cross_section=cross_section,
        use_slab_port=use_slab_port,
        slab_port_layer=slab_port_layer,
    )

taper_strip_to_ridge

taper_strip_to_ridge_trenches

taper_strip_to_ridge_trenches(
    length: float = 10.0,
    width: float = 0.5,
    slab_offset: float = 3.0,
    trench_width: float = 2.0,
    trench_layer: LayerSpec = "DEEP_ETCH",
    layer_wg: LayerSpec = "WG",
    trench_offset: float = 0.1,
) -> gf.Component

Defines taper using trenches to define the etch.

Ports carry the core, surrounding waveguide, and both trench sections.

Parameters:

Name Type Description Default
length float

in um.

10.0
width float

in um.

0.5
slab_offset float

in um.

3.0
trench_width float

in um.

2.0
trench_layer LayerSpec

trench layer.

'DEEP_ETCH'
layer_wg LayerSpec

waveguide layer.

'WG'
trench_offset float

after waveguide in um.

0.1
Source code in gdsfactory/components/tapers/taper.py
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
@gf.cell_with_module_name(schematic_function=transition_schematic, tags=["tapers"])
def taper_strip_to_ridge_trenches(
    length: float = 10.0,
    width: float = 0.5,
    slab_offset: float = 3.0,
    trench_width: float = 2.0,
    trench_layer: LayerSpec = "DEEP_ETCH",
    layer_wg: LayerSpec = "WG",
    trench_offset: float = 0.1,
) -> gf.Component:
    """Defines taper using trenches to define the etch.

    Ports carry the core, surrounding waveguide, and both trench sections.

    Args:
        length: in um.
        width: in um.
        slab_offset: in um.
        trench_width: in um.
        trench_layer: trench layer.
        layer_wg: waveguide layer.
        trench_offset: after waveguide in um.
    """
    return cf.taper_strip_to_ridge_trenches(
        length=length,
        width=width,
        slab_offset=slab_offset,
        trench_width=trench_width,
        trench_layer=trench_layer,
        layer_wg=layer_wg,
        trench_offset=trench_offset,
    )

taper_strip_to_ridge_trenches

taper_strip_to_slab150 module-attribute

taper_strip_to_slab150 = CellAlias(
    taper_strip_to_ridge, layer_slab="SLAB150"
)

taper_strip_to_slab150

taper_w10_l100 module-attribute

taper_w10_l100 = CellAlias(
    taper_from_csv,
    filepath=data / "taper_strip_0p5_10_100.csv",
)

taper_w10_l100

taper_w10_l150 module-attribute

taper_w10_l150 = CellAlias(
    taper_from_csv,
    filepath=data / "taper_strip_0p5_10_150.csv",
)

taper_w10_l150

taper_w10_l200 module-attribute

taper_w10_l200 = CellAlias(
    taper_from_csv,
    filepath=data / "taper_strip_0p5_10_200.csv",
)

taper_w10_l200

taper_w11_l200 module-attribute

taper_w11_l200 = CellAlias(
    taper_from_csv,
    filepath=data / "taper_strip_0p5_11_200.csv",
)

taper_w11_l200

taper_w12_l200 module-attribute

taper_w12_l200 = CellAlias(
    taper_from_csv,
    filepath=data / "taper_strip_0p5_12_200.csv",
)

taper_w12_l200

texts

pixel_array

pixel_array(
    pixels: str = character_a,
    pixel_size: float = 10.0,
    layer: LayerSpec = "M1",
) -> Component

Returns a pixel component from a string representing the pixels.

Parameters:

Name Type Description Default
pixels str

string representing the pixels

character_a
pixel_size float

width/height for each pixel

10.0
layer LayerSpec

layer for each pixel

'M1'
Source code in gdsfactory/components/texts/text_rectangular_font.py
15
16
17
18
19
20
21
22
23
24
25
26
27
28
@gf.cell_with_module_name(tags=["texts"])
def pixel_array(
    pixels: str = character_a,
    pixel_size: float = 10.0,
    layer: LayerSpec = "M1",
) -> Component:
    """Returns a pixel component from a string representing the pixels.

    Args:
        pixels: string representing the pixels
        pixel_size: width/height for each pixel
        layer: layer for each pixel
    """
    return cf.pixel_array(pixels=pixels, pixel_size=pixel_size, layer=layer)

pixel_array

text

text

text(
    text: str = "abcd",
    size: float = 10.0,
    position: Coordinate = (0, 0),
    justify: str = "left",
    layer: LayerSpec = "WG",
) -> Component

Text shapes.

Parameters:

Name Type Description Default
text str

string.

'abcd'
size float

in um of each character.

10.0
position Coordinate

x, y position.

(0, 0)
justify str

left, right, center.

'left'
layer LayerSpec

for the text.

'WG'
Source code in gdsfactory/components/texts/text.py
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@gf.cell_with_module_name(tags=["texts"])
def text(
    text: str = "abcd",
    size: float = 10.0,
    position: Coordinate = (0, 0),
    justify: str = "left",
    layer: LayerSpec = "WG",
) -> Component:
    """Text shapes.

    Args:
        text: string.
        size: in um of each character.
        position: x, y position.
        justify: left, right, center.
        layer: for the text.
    """
    return cf.text(
        text=text,
        size=size,
        position=position,
        justify=justify,
        layer=layer,
    )

text_klayout

text_klayout(
    text: str = "a",
    layer: LayerSpec = "WG",
    layers: LayerSpecs | None = None,
    bbox_layers: LayerSpecs | None = None,
) -> Component

Returns a text component.

Parameters:

Name Type Description Default
text str

string.

'a'
layer LayerSpec

text layer.

'WG'
layers LayerSpecs | None

layers for the text.

None
bbox_layers LayerSpecs | None

layers for the text bounding box.

None
Source code in gdsfactory/components/texts/text.py
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
@gf.cell_with_module_name(tags=["texts"])
def text_klayout(
    text: str = "a",
    layer: LayerSpec = "WG",
    layers: LayerSpecs | None = None,
    bbox_layers: LayerSpecs | None = None,
) -> Component:
    """Returns a text component.

    Args:
        text: string.
        layer: text layer.
        layers: layers for the text.
        bbox_layers: layers for the text bounding box.
    """
    return cf.text_klayout(
        text=text,
        layer=layer,
        layers=layers,
        bbox_layers=bbox_layers,
    )

text_lines

text_lines(
    text: tuple[str, ...] = ("Chip", "01"),
    size: float = 0.4,
    layer: LayerSpec = "WG",
) -> Component

Returns a Component from a text lines.

Parameters:

Name Type Description Default
text tuple[str, ...]

list of strings.

('Chip', '01')
size float

text size.

0.4
layer LayerSpec

text layer.

'WG'
Source code in gdsfactory/components/texts/text.py
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@gf.cell_with_module_name(tags=["texts"])
def text_lines(
    text: tuple[str, ...] = ("Chip", "01"),
    size: float = 0.4,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a Component from a text lines.

    Args:
        text: list of strings.
        size: text size.
        layer: text layer.
    """
    return cf.text_lines(text=text, size=size, layer=layer)

text

text_freetype

text_freetype

text_freetype(
    text: str = "a",
    size: int = 10,
    justify: str = "left",
    font: PathType = PATH.font_ocr,
    layer: LayerSpec = "WG",
    layers: LayerSpecs | None = None,
) -> Component

Returns text Component.

Parameters:

Name Type Description Default
text str

string.

'a'
size int

in um.

10
justify str

left, right, center.

'left'
font PathType

Font face to use. Default DEPLOF does not require additional libraries, otherwise freetype load fonts. You can choose font by name (e.g. "Times New Roman"), or by file OTF or TTF filepath.

font_ocr
layer LayerSpec

list of layers to use for the text.

'WG'
layers LayerSpecs | None

list of layers to use for the text.

None
Source code in gdsfactory/components/texts/text_freetype.py
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@gf.cell_with_module_name(tags=["texts"])
def text_freetype(
    text: str = "a",
    size: int = 10,
    justify: str = "left",
    font: PathType = PATH.font_ocr,
    layer: LayerSpec = "WG",
    layers: LayerSpecs | None = None,
) -> Component:
    """Returns text Component.

    Args:
        text: string.
        size: in um.
        justify: left, right, center.
        font: Font face to use. Default DEPLOF does not require additional libraries,
            otherwise freetype load fonts. You can choose font by name
            (e.g. "Times New Roman"), or by file OTF or TTF filepath.
        layer: list of layers to use for the text.
        layers: list of layers to use for the text.

    """
    return cf.text_freetype(
        text=text,
        size=size,
        justify=justify,
        font=font,
        layer=layer,
        layers=layers,
    )

text_freetype

text_klayout

text_klayout(
    text: str = "a",
    layer: LayerSpec = "WG",
    layers: LayerSpecs | None = None,
    bbox_layers: LayerSpecs | None = None,
) -> Component

Returns a text component.

Parameters:

Name Type Description Default
text str

string.

'a'
layer LayerSpec

text layer.

'WG'
layers LayerSpecs | None

layers for the text.

None
bbox_layers LayerSpecs | None

layers for the text bounding box.

None
Source code in gdsfactory/components/texts/text.py
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
@gf.cell_with_module_name(tags=["texts"])
def text_klayout(
    text: str = "a",
    layer: LayerSpec = "WG",
    layers: LayerSpecs | None = None,
    bbox_layers: LayerSpecs | None = None,
) -> Component:
    """Returns a text component.

    Args:
        text: string.
        layer: text layer.
        layers: layers for the text.
        bbox_layers: layers for the text bounding box.
    """
    return cf.text_klayout(
        text=text,
        layer=layer,
        layers=layers,
        bbox_layers=bbox_layers,
    )

text_klayout

text_lines

text_lines(
    text: tuple[str, ...] = ("Chip", "01"),
    size: float = 0.4,
    layer: LayerSpec = "WG",
) -> Component

Returns a Component from a text lines.

Parameters:

Name Type Description Default
text tuple[str, ...]

list of strings.

('Chip', '01')
size float

text size.

0.4
layer LayerSpec

text layer.

'WG'
Source code in gdsfactory/components/texts/text.py
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@gf.cell_with_module_name(tags=["texts"])
def text_lines(
    text: tuple[str, ...] = ("Chip", "01"),
    size: float = 0.4,
    layer: LayerSpec = "WG",
) -> Component:
    """Returns a Component from a text lines.

    Args:
        text: list of strings.
        size: text size.
        layer: text layer.
    """
    return cf.text_lines(text=text, size=size, layer=layer)

text_lines

text_rectangular

text_rectangular

text_rectangular(
    text: str = "abcd",
    size: float = 10.0,
    position: tuple[float, float] = (0.0, 0.0),
    justify: str = "left",
    layer: LayerSpec | None = "WG",
    layers: LayerSpecs | None = None,
    font: Callable[..., dict[str, str]] = rectangular_font,
) -> Component

Pixel based font, guaranteed to be manhattan, without acute angles.

Parameters:

Name Type Description Default
text str

string.

'abcd'
size float

pixel size in um.

10.0
position tuple[float, float]

coordinate.

(0.0, 0.0)
justify str

left, right or center.

'left'
layer LayerSpec | None

for text.

'WG'
layers LayerSpecs | None

optional for duplicating the text.

None
font Callable[..., dict[str, str]]

function that returns dictionary of characters.

rectangular_font
Source code in gdsfactory/components/texts/text_rectangular.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
@gf.cell_with_module_name(tags=["texts"])
def text_rectangular(
    text: str = "abcd",
    size: float = 10.0,
    position: tuple[float, float] = (0.0, 0.0),
    justify: str = "left",
    layer: LayerSpec | None = "WG",
    layers: LayerSpecs | None = None,
    font: Callable[..., dict[str, str]] = rectangular_font,
) -> Component:
    """Pixel based font, guaranteed to be manhattan, without acute angles.

    Args:
        text: string.
        size: pixel size in um.
        position: coordinate.
        justify: left, right or center.
        layer: for text.
        layers: optional for duplicating the text.
        font: function that returns dictionary of characters.
    """
    return cf.text_rectangular(
        text=text,
        size=size,
        position=position,
        justify=justify,
        layer=layer,
        layers=layers,
        font=font,
    )

text_rectangular_multi_layer

text_rectangular_multi_layer(
    text: str = "abcd",
    layers: LayerSpecs = ("WG", "M1", "M2", "MTOP"),
    text_factory: ComponentSpec = "text_rectangular",
    **kwargs: Any
) -> Component

Returns rectangular text in different layers.

Parameters:

Name Type Description Default
text str

string of text.

'abcd'
layers LayerSpecs

list of layers to replicate the text.

('WG', 'M1', 'M2', 'MTOP')
text_factory ComponentSpec

function to create the text Components.

'text_rectangular'
kwargs Any

keyword arguments for text_factory.

{}

Other Parameters:

Name Type Description
size

pixel size.

position

coordinate.

justify

left, right or center.

font

function that returns dictionary of characters.

Source code in gdsfactory/components/texts/text_rectangular.py
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
@gf.cell_with_module_name(tags=["texts"])
def text_rectangular_multi_layer(
    text: str = "abcd",
    layers: LayerSpecs = ("WG", "M1", "M2", "MTOP"),
    text_factory: ComponentSpec = "text_rectangular",
    **kwargs: Any,
) -> Component:
    """Returns rectangular text in different layers.

    Args:
        text: string of text.
        layers: list of layers to replicate the text.
        text_factory: function to create the text Components.
        kwargs: keyword arguments for text_factory.

    Keyword Args:
        size: pixel size.
        position: coordinate.
        justify: left, right or center.
        font: function that returns dictionary of characters.
    """
    return cf.text_rectangular_multi_layer(
        text=text, layers=layers, text_factory=text_factory, **kwargs
    )

text_rectangular

text_rectangular_multi_layer

text_rectangular_multi_layer(
    text: str = "abcd",
    layers: LayerSpecs = ("WG", "M1", "M2", "MTOP"),
    text_factory: ComponentSpec = "text_rectangular",
    **kwargs: Any
) -> Component

Returns rectangular text in different layers.

Parameters:

Name Type Description Default
text str

string of text.

'abcd'
layers LayerSpecs

list of layers to replicate the text.

('WG', 'M1', 'M2', 'MTOP')
text_factory ComponentSpec

function to create the text Components.

'text_rectangular'
kwargs Any

keyword arguments for text_factory.

{}

Other Parameters:

Name Type Description
size

pixel size.

position

coordinate.

justify

left, right or center.

font

function that returns dictionary of characters.

Source code in gdsfactory/components/texts/text_rectangular.py
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
@gf.cell_with_module_name(tags=["texts"])
def text_rectangular_multi_layer(
    text: str = "abcd",
    layers: LayerSpecs = ("WG", "M1", "M2", "MTOP"),
    text_factory: ComponentSpec = "text_rectangular",
    **kwargs: Any,
) -> Component:
    """Returns rectangular text in different layers.

    Args:
        text: string of text.
        layers: list of layers to replicate the text.
        text_factory: function to create the text Components.
        kwargs: keyword arguments for text_factory.

    Keyword Args:
        size: pixel size.
        position: coordinate.
        justify: left, right or center.
        font: function that returns dictionary of characters.
    """
    return cf.text_rectangular_multi_layer(
        text=text, layers=layers, text_factory=text_factory, **kwargs
    )

text_rectangular_multi_layer

vias

via

via

via(
    size: Size = (0.7, 0.7),
    enclosure: float = 1.0,
    layer: LayerSpec = "VIAC",
    bbox_layers: Sequence[LayerSpec] | None = None,
    bbox_offset: float = 0,
    bbox_offsets: Sequence[float] | None = None,
    pitch: float = 2,
    column_pitch: float | None = None,
    row_pitch: float | None = None,
) -> Component

Rectangular via.

Parameters:

Name Type Description Default
size Size

in x and y direction.

(0.7, 0.7)
enclosure float

inclusion of via.

1.0
layer LayerSpec

via layer.

'VIAC'
bbox_layers Sequence[LayerSpec] | None

layers for the bounding box.

None
bbox_offset float

in um.

0
bbox_offsets Sequence[float] | None

List of offsets for each bbox_layer.

None
pitch float

pitch between vias.

2
column_pitch float | None

Optional pitch between columns of vias. Default is pitch.

None
row_pitch float | None

Optional pitch between rows of vias. Default is pitch.

None
    enclosure
    _________________________________________
    |<--->                                  |
    |             gap[0]    size[0]         |
    |             <------> <----->          |
    |      ______          ______           |
    |     |      |        |      |          |
    |     |      |        |      |  size[1] |
    |     |______|        |______|          |
    |      <------------->                  |
    |           pitch                       |
    |_______________________________________|
Source code in gdsfactory/components/vias/via.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@gf.cell_with_module_name(tags=["vias"])
def via(
    size: Size = (0.7, 0.7),
    enclosure: float = 1.0,
    layer: LayerSpec = "VIAC",
    bbox_layers: Sequence[LayerSpec] | None = None,
    bbox_offset: float = 0,
    bbox_offsets: Sequence[float] | None = None,
    pitch: float = 2,
    column_pitch: float | None = None,
    row_pitch: float | None = None,
) -> Component:
    """Rectangular via.

    Args:
        size: in x and y direction.
        enclosure: inclusion of via.
        layer: via layer.
        bbox_layers: layers for the bounding box.
        bbox_offset: in um.
        bbox_offsets: List of offsets for each bbox_layer.
        pitch: pitch between vias.
        column_pitch: Optional pitch between columns of vias. Default is pitch.
        row_pitch: Optional pitch between rows of vias. Default is pitch.

    ```text
        enclosure
        _________________________________________
        |<--->                                  |
        |             gap[0]    size[0]         |
        |             <------> <----->          |
        |      ______          ______           |
        |     |      |        |      |          |
        |     |      |        |      |  size[1] |
        |     |______|        |______|          |
        |      <------------->                  |
        |           pitch                       |
        |_______________________________________|
    ```
    """
    return cf.via(
        size=size,
        enclosure=enclosure,
        layer=layer,
        bbox_layers=bbox_layers,
        bbox_offset=bbox_offset,
        bbox_offsets=bbox_offsets,
        pitch=pitch,
        column_pitch=column_pitch,
        row_pitch=row_pitch,
    )

via_circular

via_circular(
    radius: float = 0.35,
    enclosure: float = 1.0,
    layer: LayerSpec = "VIAC",
    pitch: float | None = 2,
    column_pitch: float | None = None,
    row_pitch: float | None = None,
    angle_resolution: float = 2.5,
) -> Component

Circular via.

Parameters:

Name Type Description Default
radius float

in um.

0.35
enclosure float

inclusion of via in um for the layer above.

1.0
layer LayerSpec

via layer.

'VIAC'
pitch float | None

pitch between vias.

2
column_pitch float | None

Optional pitch between columns of vias. Default is pitch.

None
row_pitch float | None

Optional pitch between rows of vias. Default is pitch.

None
angle_resolution float

number of degrees per point.

2.5
Source code in gdsfactory/components/vias/via.py
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@gf.cell_with_module_name(tags=["vias"])
def via_circular(
    radius: float = 0.35,
    enclosure: float = 1.0,
    layer: LayerSpec = "VIAC",
    pitch: float | None = 2,
    column_pitch: float | None = None,
    row_pitch: float | None = None,
    angle_resolution: float = 2.5,
) -> Component:
    """Circular via.

    Args:
        radius: in um.
        enclosure: inclusion of via in um for the layer above.
        layer: via layer.
        pitch: pitch between vias.
        column_pitch: Optional pitch between columns of vias. Default is pitch.
        row_pitch: Optional pitch between rows of vias. Default is pitch.
        angle_resolution: number of degrees per point.
    """
    return cf.via_circular(
        radius=radius,
        enclosure=enclosure,
        layer=layer,
        pitch=pitch,
        column_pitch=column_pitch,
        row_pitch=row_pitch,
        angle_resolution=angle_resolution,
    )

via

via_chain

Via chain.

via_chain

via_chain(
    num_vias: int = 100,
    cols: int = 10,
    via: ComponentSpec = "via1",
    contact: ComponentSpec = "via_stack_m2_m3",
    layers_bot: LayerSpecs = ("M1",),
    layers_top: LayerSpecs = ("M2",),
    offsets_top: tuple[float, ...] = (0,),
    offsets_bot: tuple[float, ...] = (0,),
    via_min_enclosure: float = 1.0,
    min_metal_spacing: float = 1.0,
    contact_offset: float = 0.0,
) -> Component

Via chain to extract via resistance.

Parameters:

Name Type Description Default
num_vias int

number of vias.

100
cols int

number of column pairs.

10
via ComponentSpec

via component.

'via1'
contact ComponentSpec

contact component.

'via_stack_m2_m3'
layers_bot LayerSpecs

list of bottom layers.

('M1',)
layers_top LayerSpecs

list of top layers.

('M2',)
offsets_top tuple[float, ...]

list of top layer offsets.

(0,)
offsets_bot tuple[float, ...]

list of bottom layer offsets.

(0,)
via_min_enclosure float

via_min_enclosure.

1.0
min_metal_spacing float

min_metal_spacing.

1.0
contact_offset float

contact offset.

0.0
    side view:
                                          min_metal_spacing
       ┌────────────────────────────────────┐              ┌────────────────────────────────────┐
       │  layers_top                        │              │                                    │
       │                                    │◄───────────► │                                    │
       └─────────────┬─────┬────────────────┘              └───────────────┬─────┬──────────────┘
                     │     │         via_enclosure                         │     │
                     │     │◄───────────────►                              │     │
                     │     │                                               │     │
                     │     │                                               │     │
                     │width│                                               │     │
                     ◄─────►                                               │     │
                     │     │                                               │     │
       ┌─────────────┴─────┴───────────────────────────────────────────────┴─────┴───────────────┐
       │ layers_bot                                                                              │
       │                                                                                         │
       └─────────────────────────────────────────────────────────────────────────────────────────┘
       ◄─────────────────────────────────────────────────────────────────────────────────────────►
                                     2*e + w + min_metal_spacing + 2*e + w
Source code in gdsfactory/components/vias/via_chain.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
@gf.cell_with_module_name(tags=["vias"])
def via_chain(
    num_vias: int = 100,
    cols: int = 10,
    via: ComponentSpec = "via1",
    contact: ComponentSpec = "via_stack_m2_m3",
    layers_bot: LayerSpecs = ("M1",),
    layers_top: LayerSpecs = ("M2",),
    offsets_top: tuple[float, ...] = (0,),
    offsets_bot: tuple[float, ...] = (0,),
    via_min_enclosure: float = 1.0,
    min_metal_spacing: float = 1.0,
    contact_offset: float = 0.0,
) -> Component:
    """Via chain to extract via resistance.

    Args:
        num_vias: number of vias.
        cols: number of column pairs.
        via: via component.
        contact: contact component.
        layers_bot: list of bottom layers.
        layers_top: list of top layers.
        offsets_top: list of top layer offsets.
        offsets_bot: list of bottom layer offsets.
        via_min_enclosure: via_min_enclosure.
        min_metal_spacing: min_metal_spacing.
        contact_offset: contact offset.

    ```text
        side view:
                                              min_metal_spacing
           ┌────────────────────────────────────┐              ┌────────────────────────────────────┐
           │  layers_top                        │              │                                    │
           │                                    │◄───────────► │                                    │
           └─────────────┬─────┬────────────────┘              └───────────────┬─────┬──────────────┘
                         │     │         via_enclosure                         │     │
                         │     │◄───────────────►                              │     │
                         │     │                                               │     │
                         │     │                                               │     │
                         │width│                                               │     │
                         ◄─────►                                               │     │
                         │     │                                               │     │
           ┌─────────────┴─────┴───────────────────────────────────────────────┴─────┴───────────────┐
           │ layers_bot                                                                              │
           │                                                                                         │
           └─────────────────────────────────────────────────────────────────────────────────────────┘
    ```

    ```text
           ◄─────────────────────────────────────────────────────────────────────────────────────────►
                                         2*e + w + min_metal_spacing + 2*e + w
    ```

    """
    return cf.via_chain(
        num_vias=num_vias,
        cols=cols,
        via=via,
        contact=contact,
        layers_bot=layers_bot,
        layers_top=layers_top,
        offsets_top=offsets_top,
        offsets_bot=offsets_bot,
        via_min_enclosure=via_min_enclosure,
        min_metal_spacing=min_metal_spacing,
        contact_offset=contact_offset,
    )

via_chain

via_circular

via_circular(
    radius: float = 0.35,
    enclosure: float = 1.0,
    layer: LayerSpec = "VIAC",
    pitch: float | None = 2,
    column_pitch: float | None = None,
    row_pitch: float | None = None,
    angle_resolution: float = 2.5,
) -> Component

Circular via.

Parameters:

Name Type Description Default
radius float

in um.

0.35
enclosure float

inclusion of via in um for the layer above.

1.0
layer LayerSpec

via layer.

'VIAC'
pitch float | None

pitch between vias.

2
column_pitch float | None

Optional pitch between columns of vias. Default is pitch.

None
row_pitch float | None

Optional pitch between rows of vias. Default is pitch.

None
angle_resolution float

number of degrees per point.

2.5
Source code in gdsfactory/components/vias/via.py
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
@gf.cell_with_module_name(tags=["vias"])
def via_circular(
    radius: float = 0.35,
    enclosure: float = 1.0,
    layer: LayerSpec = "VIAC",
    pitch: float | None = 2,
    column_pitch: float | None = None,
    row_pitch: float | None = None,
    angle_resolution: float = 2.5,
) -> Component:
    """Circular via.

    Args:
        radius: in um.
        enclosure: inclusion of via in um for the layer above.
        layer: via layer.
        pitch: pitch between vias.
        column_pitch: Optional pitch between columns of vias. Default is pitch.
        row_pitch: Optional pitch between rows of vias. Default is pitch.
        angle_resolution: number of degrees per point.
    """
    return cf.via_circular(
        radius=radius,
        enclosure=enclosure,
        layer=layer,
        pitch=pitch,
        column_pitch=column_pitch,
        row_pitch=row_pitch,
        angle_resolution=angle_resolution,
    )

via_circular

via_corner

via_corner

via_corner(
    cross_section: MultiCrossSectionAngleSpec = (
        (metal2, (0, 180)),
        (metal3, (90, 270)),
    ),
    vias: tuple[ComponentSpec] = ("via1",),
    layers_labels: tuple[str, ...] = ("m2", "m3"),
    **kwargs: Any
) -> gf.Component

Returns Corner via.

Use in place of wire_corner to route between two layers.

Parameters:

Name Type Description Default
cross_section MultiCrossSectionAngleSpec

list of cross_section, orientation pairs.

((metal2, (0, 180)), (metal3, (90, 270)))
vias tuple[ComponentSpec]

vias to use to fill the rectangles.

('via1',)
layers_labels tuple[str, ...]

Labels to use for each layer.

('m2', 'm3')
kwargs Any

cross_section settings.

{}
Source code in gdsfactory/components/vias/via_corner.py
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
@gf.cell_with_module_name(tags=["vias"])
def via_corner(
    cross_section: MultiCrossSectionAngleSpec = (
        (metal2, (0, 180)),
        (metal3, (90, 270)),
    ),
    vias: tuple[ComponentSpec] = ("via1",),
    layers_labels: tuple[str, ...] = ("m2", "m3"),
    **kwargs: Any,
) -> gf.Component:
    """Returns Corner via.

    Use in place of wire_corner to route between two layers.

    Args:
        cross_section: list of cross_section, orientation pairs.
        vias: vias to use to fill the rectangles.
        layers_labels: Labels to use for each layer.
        kwargs: cross_section settings.
    """
    return cf.via_corner(
        cross_section=cross_section,
        vias=vias,
        layers_labels=layers_labels,
        **kwargs,
    )

via_corner

via_stack

via_stack

via_stack(
    size: Size = (11.0, 11.0),
    layers: LayerSpecs = ("M1", "M2", "MTOP"),
    layer_offsets: (
        Floats
        | tuple[float | tuple[float, float], ...]
        | None
    ) = None,
    vias: Sequence[ComponentSpec | None] = (
        "via1",
        "via2",
        None,
    ),
    layer_to_port_orientations: (
        dict[LayerSpec, list[int]] | None
    ) = None,
    correct_size: bool = False,
    slot_horizontal: bool = False,
    slot_vertical: bool = False,
    port_orientations: Ints | None = (180, 90, 0, -90),
) -> Component

Rectangular via array stack.

You can use it to connect different metal layers or metals to silicon. You can use the naming convention via_stack_layerSource_layerDestination contains 4 ports (e1, e2, e3, e4)

also know as Via array http://www.vlsi-expert.com/2017/12/vias.html

Parameters:

Name Type Description Default
size Size

of the layers.

(11.0, 11.0)
layers LayerSpecs

layers on which to draw rectangles.

('M1', 'M2', 'MTOP')
layer_offsets Floats | tuple[float | tuple[float, float], ...] | None

Optional offsets for each layer with respect to size. positive grows, negative shrinks the size. If a tuple, it is the offset in x and y.

None
vias Sequence[ComponentSpec | None]

vias to use to fill the rectangles.

('via1', 'via2', None)
layer_to_port_orientations dict[LayerSpec, list[int]] | None

dictionary of layer to port_orientations.

None
correct_size bool

if True, if the specified dimensions are too small it increases them to the minimum possible to fit a via.

False
slot_horizontal bool

if True, then vias are horizontal.

False
slot_vertical bool

if True, then vias are vertical.

False
port_orientations Ints | None

list of port_orientations to add. None does not add ports.

(180, 90, 0, -90)
Source code in gdsfactory/components/vias/via_stack.py
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@gf.cell_with_module_name(tags=["vias"])
def via_stack(
    size: Size = (11.0, 11.0),
    layers: LayerSpecs = ("M1", "M2", "MTOP"),
    layer_offsets: Floats | tuple[float | tuple[float, float], ...] | None = None,
    vias: Sequence[ComponentSpec | None] = ("via1", "via2", None),
    layer_to_port_orientations: dict[LayerSpec, list[int]] | None = None,
    correct_size: bool = False,
    slot_horizontal: bool = False,
    slot_vertical: bool = False,
    port_orientations: Ints | None = (180, 90, 0, -90),
) -> Component:
    """Rectangular via array stack.

    You can use it to connect different metal layers or metals to silicon.
    You can use the naming convention via_stack_layerSource_layerDestination
    contains 4 ports (e1, e2, e3, e4)

    also know as Via array
    <http://www.vlsi-expert.com/2017/12/vias.html>

    Args:
        size: of the layers.
        layers: layers on which to draw rectangles.
        layer_offsets: Optional offsets for each layer with respect to size.
            positive grows, negative shrinks the size. If a tuple, it is the offset in x and y.
        vias: vias to use to fill the rectangles.
        layer_to_port_orientations: dictionary of layer to port_orientations.
        correct_size: if True, if the specified dimensions are too small it increases
            them to the minimum possible to fit a via.
        slot_horizontal: if True, then vias are horizontal.
        slot_vertical: if True, then vias are vertical.
        port_orientations: list of port_orientations to add. None does not add ports.
    """
    return cf.via_stack(
        size=size,
        layers=layers,
        layer_offsets=layer_offsets,
        vias=vias,
        layer_to_port_orientations=layer_to_port_orientations,
        correct_size=correct_size,
        slot_horizontal=slot_horizontal,
        slot_vertical=slot_vertical,
        port_orientations=port_orientations,
    )

via_stack_corner45

via_stack_corner45(
    width: float = 10,
    layers: Sequence[LayerSpec | None] = (
        "M1",
        "M2",
        "MTOP",
    ),
    layer_offsets: Floats | None = None,
    vias: Sequence[ComponentSpec | None] = (
        "via1",
        "via2",
        None,
    ),
    layer_port: LayerSpec | None = None,
    correct_size: bool = False,
) -> Component

Rectangular via array stack at a 45 degree angle.

Parameters:

Name Type Description Default
width float

of the corner45.

10
layers Sequence[LayerSpec | None]

layers on which to draw rectangles.

('M1', 'M2', 'MTOP')
layer_offsets Floats | None

Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.

None
vias Sequence[ComponentSpec | None]

vias to use to fill the rectangles.

('via1', 'via2', None)
layer_port LayerSpec | None

if None assumes port is on the last layer.

None
correct_size bool

if True, if the specified dimensions are too small it increases them to the minimum possible to fit a via.

False
Source code in gdsfactory/components/vias/via_stack.py
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@gf.cell_with_module_name(tags=["vias"])
def via_stack_corner45(
    width: float = 10,
    layers: Sequence[LayerSpec | None] = ("M1", "M2", "MTOP"),
    layer_offsets: Floats | None = None,
    vias: Sequence[ComponentSpec | None] = ("via1", "via2", None),
    layer_port: LayerSpec | None = None,
    correct_size: bool = False,
) -> Component:
    """Rectangular via array stack at a 45 degree angle.

    Args:
        width: of the corner45.
        layers: layers on which to draw rectangles.
        layer_offsets: Optional offsets for each layer with respect to size.
            positive grows, negative shrinks the size.
        vias: vias to use to fill the rectangles.
        layer_port: if None assumes port is on the last layer.
        correct_size: if True, if the specified dimensions are too small it increases
            them to the minimum possible to fit a via.
    """
    return cf.via_stack_corner45(
        width=width,
        layers=layers,
        layer_offsets=layer_offsets,
        vias=vias,
        layer_port=layer_port,
        correct_size=correct_size,
    )

via_stack_corner45_extended

via_stack_corner45_extended(
    corner: ComponentSpec = "via_stack_corner45",
    via_stack: ComponentSpec = "via_stack",
    width: float = 3,
    length: float = 10,
) -> Component

Rectangular via array stack at a 45 degree angle.

Parameters:

Name Type Description Default
corner ComponentSpec

corner component.

'via_stack_corner45'
via_stack ComponentSpec

for the via stack.

'via_stack'
width float

of the corner45.

3
length float

of the straight.

10
Source code in gdsfactory/components/vias/via_stack.py
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
@gf.cell_with_module_name(tags=["vias"])
def via_stack_corner45_extended(
    corner: ComponentSpec = "via_stack_corner45",
    via_stack: ComponentSpec = "via_stack",
    width: float = 3,
    length: float = 10,
) -> Component:
    """Rectangular via array stack at a 45 degree angle.

    Args:
        corner: corner component.
        via_stack: for the via stack.
        width: of the corner45.
        length: of the straight.
    """
    return cf.via_stack_corner45_extended(
        corner=corner,
        via_stack=via_stack,
        width=width,
        length=length,
    )

via_stack

via_stack_corner45

via_stack_corner45(
    width: float = 10,
    layers: Sequence[LayerSpec | None] = (
        "M1",
        "M2",
        "MTOP",
    ),
    layer_offsets: Floats | None = None,
    vias: Sequence[ComponentSpec | None] = (
        "via1",
        "via2",
        None,
    ),
    layer_port: LayerSpec | None = None,
    correct_size: bool = False,
) -> Component

Rectangular via array stack at a 45 degree angle.

Parameters:

Name Type Description Default
width float

of the corner45.

10
layers Sequence[LayerSpec | None]

layers on which to draw rectangles.

('M1', 'M2', 'MTOP')
layer_offsets Floats | None

Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.

None
vias Sequence[ComponentSpec | None]

vias to use to fill the rectangles.

('via1', 'via2', None)
layer_port LayerSpec | None

if None assumes port is on the last layer.

None
correct_size bool

if True, if the specified dimensions are too small it increases them to the minimum possible to fit a via.

False
Source code in gdsfactory/components/vias/via_stack.py
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
@gf.cell_with_module_name(tags=["vias"])
def via_stack_corner45(
    width: float = 10,
    layers: Sequence[LayerSpec | None] = ("M1", "M2", "MTOP"),
    layer_offsets: Floats | None = None,
    vias: Sequence[ComponentSpec | None] = ("via1", "via2", None),
    layer_port: LayerSpec | None = None,
    correct_size: bool = False,
) -> Component:
    """Rectangular via array stack at a 45 degree angle.

    Args:
        width: of the corner45.
        layers: layers on which to draw rectangles.
        layer_offsets: Optional offsets for each layer with respect to size.
            positive grows, negative shrinks the size.
        vias: vias to use to fill the rectangles.
        layer_port: if None assumes port is on the last layer.
        correct_size: if True, if the specified dimensions are too small it increases
            them to the minimum possible to fit a via.
    """
    return cf.via_stack_corner45(
        width=width,
        layers=layers,
        layer_offsets=layer_offsets,
        vias=vias,
        layer_port=layer_port,
        correct_size=correct_size,
    )

via_stack_corner45

via_stack_corner45_extended

via_stack_corner45_extended(
    corner: ComponentSpec = "via_stack_corner45",
    via_stack: ComponentSpec = "via_stack",
    width: float = 3,
    length: float = 10,
) -> Component

Rectangular via array stack at a 45 degree angle.

Parameters:

Name Type Description Default
corner ComponentSpec

corner component.

'via_stack_corner45'
via_stack ComponentSpec

for the via stack.

'via_stack'
width float

of the corner45.

3
length float

of the straight.

10
Source code in gdsfactory/components/vias/via_stack.py
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
@gf.cell_with_module_name(tags=["vias"])
def via_stack_corner45_extended(
    corner: ComponentSpec = "via_stack_corner45",
    via_stack: ComponentSpec = "via_stack",
    width: float = 3,
    length: float = 10,
) -> Component:
    """Rectangular via array stack at a 45 degree angle.

    Args:
        corner: corner component.
        via_stack: for the via stack.
        width: of the corner45.
        length: of the straight.
    """
    return cf.via_stack_corner45_extended(
        corner=corner,
        via_stack=via_stack,
        width=width,
        length=length,
    )

via_stack_corner45_extended

via_stack_heater_mtop_mini module-attribute

via_stack_heater_mtop_mini = CellAlias(
    via_stack_heater_mtop, size=(4, 4)
)

via_stack_heater_mtop_mini

via_stack_m1_m3 module-attribute

via_stack_m1_m3 = CellAlias(
    via_stack,
    layers=("M1", "M2", "MTOP"),
    vias=("via1", "via2", None),
)

via_stack_m1_m3

via_stack_m1_mtop module-attribute

via_stack_m1_mtop = CellAlias(
    via_stack,
    layers=("M1", "M2", "MTOP"),
    vias=("via1", "via2", None),
)

via_stack_m1_mtop

via_stack_m2_m3 module-attribute

via_stack_m2_m3 = CellAlias(
    via_stack, layers=("M2", "MTOP"), vias=("via2", None)
)

via_stack_m2_m3

via_stack_npp_m1 module-attribute

via_stack_npp_m1 = CellAlias(
    via_stack,
    layers=("WG", "NPP", "M1"),
    vias=(None, None, "viac"),
)

via_stack_npp_m1

via_stack_slab_m1 module-attribute

via_stack_slab_m1 = CellAlias(
    via_stack,
    layers=("SLAB90", "M1"),
    vias=("viac", "via1"),
)

via_stack_slab_m1

via_stack_slab_m1_horizontal module-attribute

via_stack_slab_m1_horizontal = CellAlias(
    via_stack_slab_m1, slot_horizontal=True
)

via_stack_slab_m1_horizontal

via_stack_slab_m2 module-attribute

via_stack_slab_m2 = CellAlias(
    via_stack,
    layers=("SLAB90", "M1", "M2"),
    vias=("viac", "via1", None),
)

via_stack_slab_m2

via_stack_slab_npp_m3 module-attribute

via_stack_slab_npp_m3 = CellAlias(
    via_stack,
    layers=("SLAB90", "NPP", "M1"),
    vias=(None, None, "viac"),
)

via_stack_slab_npp_m3

via_stack_with_offset

via_stack_with_offset

via_stack_with_offset(
    layers: LayerSpecs = ("PPP", "M1"),
    size: Size | None = (10, 10),
    sizes: Sequence[Size] | None = None,
    layer_offsets: Sequence[float] | None = None,
    vias: Sequence[ComponentSpec | None] = (None, "viac"),
    offsets: Sequence[float] | None = None,
    layer_to_port_orientations: (
        dict[LayerSpec, list[int]] | None
    ) = None,
) -> Component

Rectangular layer transition with offset between layers.

Parameters:

Name Type Description Default
layers LayerSpecs

layer specs between vias.

('PPP', 'M1')
size Size | None

for all vias array.

(10, 10)
sizes Sequence[Size] | None

Optional size for each via array. Overrides size.

None
layer_offsets Sequence[float] | None

Optional offsets for each layer with respect to size. positive grows, negative shrinks the size.

None
vias Sequence[ComponentSpec | None]

via spec for previous layer. None for no via.

(None, 'viac')
offsets Sequence[float] | None

optional offset for each layer relatively to the previous one. By default it only offsets by size[1] if there is a via.

None
layer_to_port_orientations dict[LayerSpec, list[int]] | None

Optional dictionary with layer to port orientations.

None
     __________________________
    |                          |
    |                          | layers[2]
    |__________________________|           vias[2] = None
    |                          |
    | layer_offsets[1]+size    | layers[1]
    |__________________________|
        |     |
        vias[1]
     ___|_____|__
    |            |
    |  sizes[0]  |  layers[0]
    |____________|
    vias[0] = None
Source code in gdsfactory/components/vias/via_stack_with_offset.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
@gf.cell_with_module_name(tags=["vias"])
def via_stack_with_offset(
    layers: LayerSpecs = ("PPP", "M1"),
    size: Size | None = (10, 10),
    sizes: Sequence[Size] | None = None,
    layer_offsets: Sequence[float] | None = None,
    vias: Sequence[ComponentSpec | None] = (None, "viac"),
    offsets: Sequence[float] | None = None,
    layer_to_port_orientations: dict[LayerSpec, list[int]] | None = None,
) -> Component:
    """Rectangular layer transition with offset between layers.

    Args:
        layers: layer specs between vias.
        size: for all vias array.
        sizes: Optional size for each via array. Overrides size.
        layer_offsets: Optional offsets for each layer with respect to size.
            positive grows, negative shrinks the size.
        vias: via spec for previous layer. None for no via.
        offsets: optional offset for each layer relatively to the previous one.
            By default it only offsets by size[1] if there is a via.
        layer_to_port_orientations: Optional dictionary with layer to port orientations.

        side view

    ```text
         __________________________
        |                          |
        |                          | layers[2]
        |__________________________|           vias[2] = None
        |                          |
        | layer_offsets[1]+size    | layers[1]
        |__________________________|
            |     |
            vias[1]
         ___|_____|__
        |            |
        |  sizes[0]  |  layers[0]
        |____________|
    ```

            vias[0] = None

    """
    return cf.via_stack_with_offset(
        layers=layers,
        size=size,
        sizes=sizes,
        layer_offsets=layer_offsets,
        vias=vias,
        offsets=offsets,
        layer_to_port_orientations=layer_to_port_orientations,
    )

via_stack_with_offset

via_stack_with_offset_m1_m3 module-attribute

via_stack_with_offset_m1_m3 = CellAlias(
    via_stack_with_offset,
    layers=("M1", "M2", "MTOP"),
    vias=(None, "via1", "via2"),
)

via_stack_with_offset_m1_m3

via_stack_with_offset_ppp_m1 module-attribute

via_stack_with_offset_ppp_m1 = CellAlias(
    via_stack_with_offset,
    layers=("PPP", "M1"),
    vias=(None, "viac"),
)

via_stack_with_offset_ppp_m1

waveguides

crossing

crossing(
    arm: ComponentSpec = "crossing_arm",
) -> gf.Component

Waveguide crossing.

Parameters:

Name Type Description Default
arm ComponentSpec

arm spec.

'crossing_arm'
Source code in gdsfactory/components/waveguides/crossing_waveguide.py
47
48
49
50
51
52
53
54
55
56
@gf.cell_with_module_name(schematic_function=crossing_schematic, tags=["waveguides"])
def crossing(
    arm: ComponentSpec = "crossing_arm",
) -> gf.Component:
    """Waveguide crossing.

    Args:
        arm: arm spec.
    """
    return cf.crossing(arm=arm)

crossing

crossing45

crossing45(
    crossing: ComponentSpec = "crossing",
    port_spacing: float = 40.0,
    dx: Delta | None = None,
    alpha: float = 0.08,
    npoints: int = 101,
    cross_section: CrossSectionSpec = "strip",
    cross_section_bends: CrossSectionSpec = "strip",
) -> Component

Returns 45deg crossing with bends.

Parameters:

Name Type Description Default
crossing ComponentSpec

crossing function.

'crossing'
port_spacing float

target I/O port spacing.

40.0
dx Delta | None

target length.

None
alpha float

optimization parameter. diminish it for tight bends, increase it if raises assertion angle errors

0.08
npoints int

number of points.

101
cross_section CrossSectionSpec

cross_section spec.

'strip'
cross_section_bends CrossSectionSpec

cross_section spec.

'strip'

The 45 Degree crossing CANNOT be kept as an SRef since we only allow for multiples of 90Deg rotations in SRef.

    ----   ----
        \ /
         X
        / \
    ---    ----
Source code in gdsfactory/components/waveguides/crossing_waveguide.py
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
@gf.cell(
    check_instances=CheckInstances.IGNORE,
    with_module_name=True,
    schematic_function=crossing_schematic,
    tags=["waveguides"],
)
def crossing45(
    crossing: ComponentSpec = "crossing",
    port_spacing: float = 40.0,
    dx: Delta | None = None,
    alpha: float = 0.08,
    npoints: int = 101,
    cross_section: CrossSectionSpec = "strip",
    cross_section_bends: CrossSectionSpec = "strip",
) -> Component:
    r"""Returns 45deg crossing with bends.

    Args:
        crossing: crossing function.
        port_spacing: target I/O port spacing.
        dx: target length.
        alpha: optimization parameter. diminish it for tight bends,
          increase it if raises assertion angle errors
        npoints: number of points.
        cross_section: cross_section spec.
        cross_section_bends: cross_section spec.


    The 45 Degree crossing CANNOT be kept as an SRef since
    we only allow for multiples of 90Deg rotations in SRef.

    ```text
        ----   ----
            \ /
             X
            / \
        ---    ----
    ```

    """
    return cf.crossing45(
        crossing=crossing,
        port_spacing=port_spacing,
        dx=dx,
        alpha=alpha,
        npoints=npoints,
        cross_section=cross_section,
        cross_section_bends=cross_section_bends,
    )

crossing45

crossing_arm

crossing_arm(
    r1: float = 3.0,
    r2: float = 1.1,
    w: float = 1.2,
    L: float = 3.4,
    layer_slab: LayerSpec = "SLAB150",
    cross_section: CrossSectionSpec = "strip",
) -> Component

Returns crossing arm.

Parameters:

Name Type Description Default
r1 float

ellipse radius1.

3.0
r2 float

ellipse radius2.

1.1
w float

width in um.

1.2
L float

length in um.

3.4
layer_slab LayerSpec

for the shallow etch.

'SLAB150'
cross_section CrossSectionSpec

spec.

'strip'
Source code in gdsfactory/components/waveguides/crossing_waveguide.py
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@gf.cell_with_module_name(tags=["waveguides"])
def crossing_arm(
    r1: float = 3.0,
    r2: float = 1.1,
    w: float = 1.2,
    L: float = 3.4,
    layer_slab: LayerSpec = "SLAB150",
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Returns crossing arm.

    Args:
        r1: ellipse radius1.
        r2: ellipse radius2.
        w: width in um.
        L: length in um.
        layer_slab: for the shallow etch.
        cross_section: spec.
    """
    return cf.crossing_arm(
        r1=r1, r2=r2, w=w, L=L, layer_slab=layer_slab, cross_section=cross_section
    )

crossing_arm

crossing_etched

crossing_etched(
    width: float = 0.5,
    r1: float = 3.0,
    r2: float = 1.1,
    w: float = 1.2,
    L: float = 3.4,
    layer_wg: LayerSpec = "WG",
    layer_slab: LayerSpec = "SLAB150",
) -> Component

Waveguide crossing.

Full crossing has to be on WG layer (to start with a 220nm slab). Then we etch the ellipses down to 150nm slabs and we keep linear taper at 220nm.

Parameters:

Name Type Description Default
width float

input waveguides width.

0.5
r1 float

radii.

3.0
r2 float

radii.

1.1
w float

wide width.

1.2
L float

length.

3.4
layer_wg LayerSpec

waveguide layer.

'WG'
layer_slab LayerSpec

shallow etch layer.

'SLAB150'
Source code in gdsfactory/components/waveguides/crossing_waveguide.py
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@gf.cell_with_module_name(schematic_function=crossing_schematic, tags=["waveguides"])
def crossing_etched(
    width: float = 0.5,
    r1: float = 3.0,
    r2: float = 1.1,
    w: float = 1.2,
    L: float = 3.4,
    layer_wg: LayerSpec = "WG",
    layer_slab: LayerSpec = "SLAB150",
) -> Component:
    """Waveguide crossing.

    Full crossing has to be on WG layer (to start with a 220nm slab).
    Then we etch the ellipses down to 150nm slabs and we keep linear taper at 220nm.

    Args:
        width: input waveguides width.
        r1: radii.
        r2: radii.
        w: wide width.
        L: length.
        layer_wg: waveguide layer.
        layer_slab: shallow etch layer.
    """
    return cf.crossing_etched(
        width=width, r1=r1, r2=r2, w=w, L=L, layer_wg=layer_wg, layer_slab=layer_slab
    )

crossing_etched

crossing_linear_taper

crossing_linear_taper(
    width1: float = 2.5,
    width2: float = 0.5,
    length: float = 3,
    cross_section: CrossSectionSpec = "strip",
    taper: ComponentSpec = "taper",
) -> Component

Returns Crossing based on a taper.

The default is a dummy taper.

Parameters:

Name Type Description Default
width1 float

input width.

2.5
width2 float

output width.

0.5
length float

taper length.

3
cross_section CrossSectionSpec

cross_section spec.

'strip'
taper ComponentSpec

taper spec.

'taper'
Source code in gdsfactory/components/waveguides/crossing_waveguide.py
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
@gf.cell_with_module_name(schematic_function=crossing_schematic, tags=["waveguides"])
def crossing_linear_taper(
    width1: float = 2.5,
    width2: float = 0.5,
    length: float = 3,
    cross_section: CrossSectionSpec = "strip",
    taper: ComponentSpec = "taper",
) -> Component:
    """Returns Crossing based on a taper.

    The default is a dummy taper.

    Args:
        width1: input width.
        width2: output width.
        length: taper length.
        cross_section: cross_section spec.
        taper: taper spec.
    """
    return cf.crossing_linear_taper(
        width1=width1,
        width2=width2,
        length=length,
        cross_section=cross_section,
        taper=taper,
    )

crossing_linear_taper

straight

Straight waveguide.

straight

straight(
    length: float = 10.0,
    npoints: int = 2,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
    **kwargs: Unpack[ExtrusionPorts]
) -> Component

Returns a Straight waveguide.

Parameters:

Name Type Description Default
length float

straight length (um).

10.0
npoints int

number of points.

2
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
width float | None

width of the waveguide. If None, it will use the width of the cross_section.

None
kwargs Unpack[ExtrusionPorts]

optional port_type override for ports o1/o2. Defaults to the PDK's port policy.

{}
    o1  ──────────────── o2
            length
Source code in gdsfactory/components/waveguides/straight.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
@gf.cell_with_module_name(schematic_function=straight_schematic, tags=["waveguides"])
def straight(
    length: float = 10.0,
    npoints: int = 2,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
    **kwargs: Unpack[ExtrusionPorts],
) -> Component:
    """Returns a Straight waveguide.

    Args:
        length: straight length (um).
        npoints: number of points.
        cross_section: specification (CrossSection, string or dict).
        width: width of the waveguide. If None, it will use the width of the cross_section.
        kwargs: optional ``port_type`` override for ports o1/o2.
            Defaults to the PDK's port policy.

    ```text
        o1  ──────────────── o2
                length
    ```
    """
    return cf.straight(
        length=length,
        npoints=npoints,
        cross_section=cross_section,
        width=width,
        **kwargs,
    )

straight_all_angle

straight_all_angle(
    length: float = 10.0,
    npoints: int = 2,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
) -> ComponentAllAngle

Returns a Straight waveguide with offgrid ports.

Parameters:

Name Type Description Default
length float

straight length (um).

10.0
npoints int

number of points.

2
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
width float | None

width of the waveguide. If None, it will use the width of the cross_section.

None
    o1  ──────────────── o2
            length
Source code in gdsfactory/components/waveguides/straight.py
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@gf.vcell
def straight_all_angle(
    length: float = 10.0,
    npoints: int = 2,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
) -> ComponentAllAngle:
    """Returns a Straight waveguide with offgrid ports.

    Args:
        length: straight length (um).
        npoints: number of points.
        cross_section: specification (CrossSection, string or dict).
        width: width of the waveguide. If None, it will use the width of the cross_section.

    ```text
        o1  ──────────────── o2
                length
    ```
    """
    return cf.straight_all_angle(
        length=length, npoints=npoints, cross_section=cross_section, width=width
    )

straight_array

straight_array(
    n: int = 4,
    spacing: float = 4.0,
    length: float = 10.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Array of straights connected with grating couplers.

useful to align the 4 corners of the chip

Parameters:

Name Type Description Default
n int

number of straights.

4
spacing float

edge to edge straight spacing.

4.0
length float

straight length (um).

10.0
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
Source code in gdsfactory/components/waveguides/straight.py
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@gf.cell_with_module_name(tags=["waveguides"])
def straight_array(
    n: int = 4,
    spacing: float = 4.0,
    length: float = 10.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Array of straights connected with grating couplers.

    useful to align the 4 corners of the chip

    Args:
        n: number of straights.
        spacing: edge to edge straight spacing.
        length: straight length (um).
        cross_section: specification (CrossSection, string or dict).
    """
    return cf.straight_array(
        n=n, spacing=spacing, length=length, cross_section=cross_section
    )

wire_straight

wire_straight(
    length: float = 10.0,
    npoints: int = 2,
    cross_section: CrossSectionSpec = "metal_routing",
    width: float | None = None,
) -> Component

Returns a Straight waveguide.

Parameters:

Name Type Description Default
length float

straight length (um).

10.0
npoints int

number of points.

2
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'metal_routing'
width float | None

width of the waveguide. If None, it will use the width of the cross_section.

None
    o1  ──────────────── o2
            length
Source code in gdsfactory/components/waveguides/straight.py
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@gf.cell_with_module_name(schematic_function=wire_schematic, tags=["waveguides"])
def wire_straight(
    length: float = 10.0,
    npoints: int = 2,
    cross_section: CrossSectionSpec = "metal_routing",
    width: float | None = None,
) -> Component:
    """Returns a Straight waveguide.

    Args:
        length: straight length (um).
        npoints: number of points.
        cross_section: specification (CrossSection, string or dict).
        width: width of the waveguide. If None, it will use the width of the cross_section.

    ```text
        o1  ──────────────── o2
                length
    ```
    """
    return cf.wire_straight(
        length=length, npoints=npoints, cross_section=cross_section, width=width
    )

straight

straight_all_angle

straight_all_angle(
    length: float = 10.0,
    npoints: int = 2,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
) -> ComponentAllAngle

Returns a Straight waveguide with offgrid ports.

Parameters:

Name Type Description Default
length float

straight length (um).

10.0
npoints int

number of points.

2
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
width float | None

width of the waveguide. If None, it will use the width of the cross_section.

None
    o1  ──────────────── o2
            length
Source code in gdsfactory/components/waveguides/straight.py
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
@gf.vcell
def straight_all_angle(
    length: float = 10.0,
    npoints: int = 2,
    cross_section: CrossSectionSpec = "strip",
    width: float | None = None,
) -> ComponentAllAngle:
    """Returns a Straight waveguide with offgrid ports.

    Args:
        length: straight length (um).
        npoints: number of points.
        cross_section: specification (CrossSection, string or dict).
        width: width of the waveguide. If None, it will use the width of the cross_section.

    ```text
        o1  ──────────────── o2
                length
    ```
    """
    return cf.straight_all_angle(
        length=length, npoints=npoints, cross_section=cross_section, width=width
    )
import gdsfactory as gf

gf.gpdk.PDK.activate()

c = gf.components.straight_all_angle(length=10, npoints=2, cross_section='strip').copy()
c.draw_ports()
c.plot()

straight_array

straight_array(
    n: int = 4,
    spacing: float = 4.0,
    length: float = 10.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component

Array of straights connected with grating couplers.

useful to align the 4 corners of the chip

Parameters:

Name Type Description Default
n int

number of straights.

4
spacing float

edge to edge straight spacing.

4.0
length float

straight length (um).

10.0
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'strip'
Source code in gdsfactory/components/waveguides/straight.py
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
@gf.cell_with_module_name(tags=["waveguides"])
def straight_array(
    n: int = 4,
    spacing: float = 4.0,
    length: float = 10.0,
    cross_section: CrossSectionSpec = "strip",
) -> Component:
    """Array of straights connected with grating couplers.

    useful to align the 4 corners of the chip

    Args:
        n: number of straights.
        spacing: edge to edge straight spacing.
        length: straight length (um).
        cross_section: specification (CrossSection, string or dict).
    """
    return cf.straight_array(
        n=n, spacing=spacing, length=length, cross_section=cross_section
    )

straight_array

straight_heater_doped_rib

straight_heater_doped_rib(
    length: float = 320.0,
    nsections: int = 3,
    cross_section: CrossSectionSpec = "strip_rib_tip",
    cross_section_heater: CrossSectionSpec = "rib_heater_doped",
    via_stack: (
        ComponentSpec | None
    ) = "via_stack_slab_npp_m3",
    via_stack_metal: (
        ComponentSpec | None
    ) = "via_stack_m1_mtop",
    via_stack_metal_size: Size = (10.0, 10.0),
    via_stack_size: Size = (10.0, 10.0),
    taper: ComponentSpec | None = "taper_cross_section",
    heater_width: float = 2.0,
    heater_gap: float = 0.8,
    via_stack_gap: float = 0.0,
    width: float = 0.5,
    xoffset_tip1: float = 0.2,
    xoffset_tip2: float = 0.4,
) -> Component

Returns a doped thermal phase shifter.

dimensions from https://doi.org/10.1364/OE.27.010456

Parameters:

Name Type Description Default
length float

of the waveguide in um.

320.0
nsections int

between via_stacks.

3
cross_section CrossSectionSpec

for the input/output ports.

'strip_rib_tip'
cross_section_heater CrossSectionSpec

for the heater.

'rib_heater_doped'
via_stack ComponentSpec | None

optional function to connect the heater strip.

'via_stack_slab_npp_m3'
via_stack_metal ComponentSpec | None

function to connect the metal area.

'via_stack_m1_mtop'
via_stack_metal_size Size

x, y size in um.

(10.0, 10.0)
via_stack_size Size

x, y size in um.

(10.0, 10.0)
taper ComponentSpec | None

optional taper spec.

'taper_cross_section'
heater_width float

in um.

2.0
heater_gap float

in um.

0.8
via_stack_gap float

from edge of via_stack to waveguide.

0.0
width float

waveguide width on the ridge.

0.5
xoffset_tip1 float

distance in um from input taper to via_stack.

0.2
xoffset_tip2 float

distance in um from output taper to via_stack.

0.4
                          length
    |<--------------------------------------------->|
    |              length_section                   |
    |    <--------------------------->              |
    |  length_via_stack                             |
    |    <------->                             taper|
    |    __________                   _________     |
    |   |          |                  |        |    |
    |   | via_stack|__________________|        |    |
    |   |  size    |  heater width    |        |    |
    |  /|__________|__________________|________|\   |
    | / |             heater_gap               | \  |
    |/  |______________________________________|  \ |
     \  |_______________width__________________|  /
      \ |                                      | /
       \|_____________heater_gap______________ |/
        |        |                    |        |
        |        |____heater_width____|        |
        |        |                    |        |
        |________|                    |________|
taper         cross_section_heater
                               |<------width------>|
                                ____________________ heater_gap             slab_gap
         top_via_stack         |                   |<---------->| bot_via_stack   <-->
     ___ ______________________|                   |___________________________|___
    |   |            |               undoped Si                 |              |   |
    |   |layer_heater|               intrinsic region           |layer_heater  |   |
    |___|____________|__________________________________________|______________|___|
                                                                 <------------>
                                                                  heater_width
    <------------------------------------------------------------------------------>
                                   slab_width
Source code in gdsfactory/components/waveguides/straight_heater_doped.py
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
@gf.cell_with_module_name(schematic_function=straight_schematic, tags=["waveguides"])
def straight_heater_doped_rib(
    length: float = 320.0,
    nsections: int = 3,
    cross_section: CrossSectionSpec = "strip_rib_tip",
    cross_section_heater: CrossSectionSpec = "rib_heater_doped",
    via_stack: ComponentSpec | None = "via_stack_slab_npp_m3",
    via_stack_metal: ComponentSpec | None = "via_stack_m1_mtop",
    via_stack_metal_size: Size = (10.0, 10.0),
    via_stack_size: Size = (10.0, 10.0),
    taper: ComponentSpec | None = "taper_cross_section",
    heater_width: float = 2.0,
    heater_gap: float = 0.8,
    via_stack_gap: float = 0.0,
    width: float = 0.5,
    xoffset_tip1: float = 0.2,
    xoffset_tip2: float = 0.4,
) -> Component:
    r"""Returns a doped thermal phase shifter.

    dimensions from <https://doi.org/10.1364/OE.27.010456>

    Args:
        length: of the waveguide in um.
        nsections: between via_stacks.
        cross_section: for the input/output ports.
        cross_section_heater: for the heater.
        via_stack: optional function to connect the heater strip.
        via_stack_metal: function to connect the metal area.
        via_stack_metal_size: x, y size in um.
        via_stack_size: x, y size in um.
        taper: optional taper spec.
        heater_width: in um.
        heater_gap: in um.
        via_stack_gap: from edge of via_stack to waveguide.
        width: waveguide width on the ridge.
        xoffset_tip1: distance in um from input taper to via_stack.
        xoffset_tip2: distance in um from output taper to via_stack.


    ```text
                              length
        |<--------------------------------------------->|
        |              length_section                   |
        |    <--------------------------->              |
        |  length_via_stack                             |
        |    <------->                             taper|
        |    __________                   _________     |
        |   |          |                  |        |    |
        |   | via_stack|__________________|        |    |
        |   |  size    |  heater width    |        |    |
        |  /|__________|__________________|________|\   |
        | / |             heater_gap               | \  |
        |/  |______________________________________|  \ |
         \  |_______________width__________________|  /
          \ |                                      | /
           \|_____________heater_gap______________ |/
            |        |                    |        |
            |        |____heater_width____|        |
            |        |                    |        |
            |________|                    |________|
    ```

        taper         cross_section_heater



    ```text
                                   |<------width------>|
                                    ____________________ heater_gap             slab_gap
             top_via_stack         |                   |<---------->| bot_via_stack   <-->
         ___ ______________________|                   |___________________________|___
        |   |            |               undoped Si                 |              |   |
        |   |layer_heater|               intrinsic region           |layer_heater  |   |
        |___|____________|__________________________________________|______________|___|
                                                                     <------------>
                                                                      heater_width
        <------------------------------------------------------------------------------>
                                       slab_width
    ```
    """
    return cf.straight_heater_doped_rib(
        length=length,
        nsections=nsections,
        cross_section=cross_section,
        cross_section_heater=cross_section_heater,
        via_stack=via_stack,
        via_stack_metal=via_stack_metal,
        via_stack_metal_size=via_stack_metal_size,
        via_stack_size=via_stack_size,
        taper=taper,
        heater_width=heater_width,
        heater_gap=heater_gap,
        via_stack_gap=via_stack_gap,
        width=width,
        xoffset_tip1=xoffset_tip1,
        xoffset_tip2=xoffset_tip2,
    )

straight_heater_doped_rib

straight_heater_doped_strip

straight_heater_doped_strip(
    length: float = 320.0,
    nsections: int = 3,
    cross_section: CrossSectionSpec = "strip_heater_doped",
    cross_section_heater: CrossSectionSpec = "rib_heater_doped",
    via_stack: ComponentSpec | None = "via_stack_npp_m1",
    via_stack_metal: (
        ComponentSpec | None
    ) = "via_stack_m1_mtop",
    via_stack_metal_size: Size = (10.0, 10.0),
    via_stack_size: Size = (10.0, 10.0),
    taper: ComponentSpec | None = "taper_cross_section",
    heater_width: float = 2.0,
    heater_gap: float = 0.8,
    via_stack_gap: float = 0.0,
    width: float = 0.5,
    xoffset_tip1: float = 0.2,
    xoffset_tip2: float = 0.4,
) -> Component

Top view.

Parameters:

Name Type Description Default
length float

of the waveguide in um.

320.0
nsections int

between via_stacks.

3
cross_section CrossSectionSpec

for the input/output ports.

'strip_heater_doped'
cross_section_heater CrossSectionSpec

for the heater.

'rib_heater_doped'
via_stack ComponentSpec | None

optional function to connect the heater strip.

'via_stack_npp_m1'
via_stack_metal ComponentSpec | None

function to connect the metal area.

'via_stack_m1_mtop'
via_stack_metal_size Size

x, y size in um.

(10.0, 10.0)
via_stack_size Size

x, y size in um.

(10.0, 10.0)
taper ComponentSpec | None

optional taper spec.

'taper_cross_section'
heater_width float

in um.

2.0
heater_gap float

in um.

0.8
via_stack_gap float

from edge of via_stack to waveguide.

0.0
width float

waveguide width on the ridge.

0.5
xoffset_tip1 float

distance in um from input taper to via_stack.

0.2
xoffset_tip2 float

distance in um from output taper to via_stack.

0.4
                          length
      <-|--------|--------------------------------->
        |        | length_section
        |<--------------------------->
       length_via_stack
        |<------>|
        |________|_______________________________
       /|        |____________________|          |
      / |viastack|                    |via_stack |
      \ | size   |____________________|          |
       \|________|____________________|__________|
                                      |          |
                  cross_section_heater|          |
                                      |          |
                                      |          |
                                      |__________|

cross_section

                              |<------width------>|
      ____________             ___________________               ______________
     |            |           |     undoped Si    |             |              |
     |layer_heater|           |  intrinsic region |<----------->| layer_heater |
     |____________|           |___________________|             |______________|
                                                                 <------------>
                                                    heater_gap     heater_width
Source code in gdsfactory/components/waveguides/straight_heater_doped.py
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
@gf.cell_with_module_name(schematic_function=straight_schematic, tags=["waveguides"])
def straight_heater_doped_strip(
    length: float = 320.0,
    nsections: int = 3,
    cross_section: CrossSectionSpec = "strip_heater_doped",
    cross_section_heater: CrossSectionSpec = "rib_heater_doped",
    via_stack: ComponentSpec | None = "via_stack_npp_m1",
    via_stack_metal: ComponentSpec | None = "via_stack_m1_mtop",
    via_stack_metal_size: Size = (10.0, 10.0),
    via_stack_size: Size = (10.0, 10.0),
    taper: ComponentSpec | None = "taper_cross_section",
    heater_width: float = 2.0,
    heater_gap: float = 0.8,
    via_stack_gap: float = 0.0,
    width: float = 0.5,
    xoffset_tip1: float = 0.2,
    xoffset_tip2: float = 0.4,
) -> Component:
    r"""Top view.

    Args:
        length: of the waveguide in um.
        nsections: between via_stacks.
        cross_section: for the input/output ports.
        cross_section_heater: for the heater.
        via_stack: optional function to connect the heater strip.
        via_stack_metal: function to connect the metal area.
        via_stack_metal_size: x, y size in um.
        via_stack_size: x, y size in um.
        taper: optional taper spec.
        heater_width: in um.
        heater_gap: in um.
        via_stack_gap: from edge of via_stack to waveguide.
        width: waveguide width on the ridge.
        xoffset_tip1: distance in um from input taper to via_stack.
        xoffset_tip2: distance in um from output taper to via_stack.

    ```text
                              length
          <-|--------|--------------------------------->
            |        | length_section
            |<--------------------------->
           length_via_stack
            |<------>|
            |________|_______________________________
           /|        |____________________|          |
          / |viastack|                    |via_stack |
          \ | size   |____________________|          |
           \|________|____________________|__________|
                                          |          |
                      cross_section_heater|          |
                                          |          |
                                          |          |
                                          |__________|
    ```

    cross_section

    ```text
                                  |<------width------>|
          ____________             ___________________               ______________
         |            |           |     undoped Si    |             |              |
         |layer_heater|           |  intrinsic region |<----------->| layer_heater |
         |____________|           |___________________|             |______________|
                                                                     <------------>
                                                        heater_gap     heater_width
    ```
    """
    return cf.straight_heater_doped_strip(
        length=length,
        nsections=nsections,
        cross_section=cross_section,
        cross_section_heater=cross_section_heater,
        via_stack=via_stack,
        via_stack_metal=via_stack_metal,
        via_stack_metal_size=via_stack_metal_size,
        via_stack_size=via_stack_size,
        taper=taper,
        heater_width=heater_width,
        heater_gap=heater_gap,
        via_stack_gap=via_stack_gap,
        width=width,
        xoffset_tip1=xoffset_tip1,
        xoffset_tip2=xoffset_tip2,
    )

straight_heater_doped_strip

straight_heater_meander

straight_heater_meander

straight_heater_meander(
    length: float = 300.0,
    spacing: float = 2.0,
    cross_section: CrossSectionSpec = "strip",
    heater_width: float = 2.5,
    extension_length: float = 15.0,
    layer_heater: LayerSpec = "HEATER",
    radius: float | None = None,
    via_stack: (
        ComponentSpec | None
    ) = "via_stack_heater_mtop",
    port_orientation1: float | None = None,
    port_orientation2: float | None = None,
    heater_taper_length: float = 10.0,
    straight_widths: Floats | None = None,
    taper_length: float = 10.0,
    n: int | None = 3,
) -> Component

Returns a meander based heater.

based on SungWon Chung, Makoto Nakai, and Hossein Hashemi, Low-power thermo-optic silicon modulator for large-scale photonic integrated systems Opt. Express 27, 13430-13459 (2019) https://www.osapublishing.org/oe/abstract.cfm?URI=oe-27-9-13430

Parameters:

Name Type Description Default
length float

total length of the optical path.

300.0
spacing float

waveguide spacing (center to center).

2.0
cross_section CrossSectionSpec

for waveguide.

'strip'
heater_width float

for heater.

2.5
extension_length float

of input and output optical ports.

15.0
layer_heater LayerSpec

for top heater, if None, it does not add a heater.

'HEATER'
radius float | None

for the meander bends. Defaults to cross_section radius.

None
via_stack ComponentSpec | None

for the heater to via_stack metal.

'via_stack_heater_mtop'
port_orientation1 float | None

in degrees. None adds all orientations.

None
port_orientation2 float | None

in degrees. None adds all orientations.

None
heater_taper_length float

minimizes current concentrations from heater to via_stack.

10.0
straight_widths Floats | None

widths of the straight sections.

None
taper_length float

from the cross_section.

10.0
n int | None

number of straight sections.

3
Source code in gdsfactory/components/waveguides/straight_heater_meander.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@gf.cell_with_module_name(schematic_function=straight_schematic, tags=["waveguides"])
def straight_heater_meander(
    length: float = 300.0,
    spacing: float = 2.0,
    cross_section: CrossSectionSpec = "strip",
    heater_width: float = 2.5,
    extension_length: float = 15.0,
    layer_heater: LayerSpec = "HEATER",
    radius: float | None = None,
    via_stack: ComponentSpec | None = "via_stack_heater_mtop",
    port_orientation1: float | None = None,
    port_orientation2: float | None = None,
    heater_taper_length: float = 10.0,
    straight_widths: Floats | None = None,
    taper_length: float = 10.0,
    n: int | None = 3,
) -> Component:
    """Returns a meander based heater.

    based on SungWon Chung, Makoto Nakai, and Hossein Hashemi,
    Low-power thermo-optic silicon modulator for large-scale photonic integrated systems
    Opt. Express 27, 13430-13459 (2019)
    <https://www.osapublishing.org/oe/abstract.cfm?URI=oe-27-9-13430>

    Args:
        length: total length of the optical path.
        spacing: waveguide spacing (center to center).
        cross_section: for waveguide.
        heater_width: for heater.
        extension_length: of input and output optical ports.
        layer_heater: for top heater, if None, it does not add a heater.
        radius: for the meander bends. Defaults to cross_section radius.
        via_stack: for the heater to via_stack metal.
        port_orientation1: in degrees. None adds all orientations.
        port_orientation2: in degrees. None adds all orientations.
        heater_taper_length: minimizes current concentrations from heater to via_stack.
        straight_widths: widths of the straight sections.
        taper_length: from the cross_section.
        n: number of straight sections.
    """
    return cf.straight_heater_meander(
        length=length,
        spacing=spacing,
        cross_section=cross_section,
        heater_width=heater_width,
        extension_length=extension_length,
        layer_heater=layer_heater,
        radius=radius,
        via_stack=via_stack,
        port_orientation1=port_orientation1,
        port_orientation2=port_orientation2,
        heater_taper_length=heater_taper_length,
        straight_widths=straight_widths,
        taper_length=taper_length,
        n=n,
    )

straight_heater_meander

straight_heater_meander_doped

Straight heater meander doped.

straight_heater_meander_doped

straight_heater_meander_doped(
    length: float = 300.0,
    spacing: float = 2.0,
    cross_section: CrossSectionSpec = "strip",
    heater_width: float = 1.5,
    extension_length: float = 15.0,
    layers_doping: LayerSpecs = ("P", "PP", "PPP"),
    radius: float = 5.0,
    via_stack: (
        ComponentSpec | None
    ) = "via_stack_heater_meander_doped",
    port_orientation1: float | None = None,
    port_orientation2: float | None = None,
    straight_widths: Floats = (0.8, 0.9, 0.8),
    taper_length: float = 10,
) -> Component

Returns a meander based heater.

based on SungWon Chung, Makoto Nakai, and Hossein Hashemi, Low-power thermo-optic silicon modulator for large-scale photonic integrated systems Opt. Express 27, 13430-13459 (2019) https://www.osapublishing.org/oe/abstract.cfm?URI=oe-27-9-13430

Parameters:

Name Type Description Default
length float

total length of the optical path.

300.0
spacing float

waveguide spacing (center to center).

2.0
cross_section CrossSectionSpec

for waveguide.

'strip'
heater_width float

for heater.

1.5
extension_length float

of input and output optical ports.

15.0
layers_doping LayerSpecs

doping layers to be used for heater.

('P', 'PP', 'PPP')
radius float

for the meander bends.

5.0
via_stack ComponentSpec | None

for the heater to via_stack metal.

'via_stack_heater_meander_doped'
port_orientation1 float | None

in degrees. None adds all orientations.

None
port_orientation2 float | None

in degrees. None adds all orientations.

None
straight_widths Floats

width of the straight sections.

(0.8, 0.9, 0.8)
taper_length float

from the cross_section.

10
Source code in gdsfactory/components/waveguides/straight_heater_meander_doped.py
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
@gf.cell_with_module_name(schematic_function=straight_schematic, tags=["waveguides"])
def straight_heater_meander_doped(
    length: float = 300.0,
    spacing: float = 2.0,
    cross_section: CrossSectionSpec = "strip",
    heater_width: float = 1.5,
    extension_length: float = 15.0,
    layers_doping: LayerSpecs = ("P", "PP", "PPP"),
    radius: float = 5.0,
    via_stack: ComponentSpec | None = "via_stack_heater_meander_doped",
    port_orientation1: float | None = None,
    port_orientation2: float | None = None,
    straight_widths: Floats = (0.8, 0.9, 0.8),
    taper_length: float = 10,
) -> Component:
    """Returns a meander based heater.

    based on SungWon Chung, Makoto Nakai, and Hossein Hashemi,
    Low-power thermo-optic silicon modulator for large-scale photonic integrated systems
    Opt. Express 27, 13430-13459 (2019)
    <https://www.osapublishing.org/oe/abstract.cfm?URI=oe-27-9-13430>

    Args:
        length: total length of the optical path.
        spacing: waveguide spacing (center to center).
        cross_section: for waveguide.
        heater_width: for heater.
        extension_length: of input and output optical ports.
        layers_doping: doping layers to be used for heater.
        radius: for the meander bends.
        via_stack: for the heater to via_stack metal.
        port_orientation1: in degrees. None adds all orientations.
        port_orientation2: in degrees. None adds all orientations.
        straight_widths: width of the straight sections.
        taper_length: from the cross_section.
    """
    return cf.straight_heater_meander_doped(
        length=length,
        spacing=spacing,
        cross_section=cross_section,
        heater_width=heater_width,
        extension_length=extension_length,
        layers_doping=layers_doping,
        radius=radius,
        via_stack=via_stack,
        port_orientation1=port_orientation1,
        port_orientation2=port_orientation2,
        straight_widths=straight_widths,
        taper_length=taper_length,
    )

straight_heater_meander_doped

straight_heater_metal

straight_heater_metal_simple

straight_heater_metal_simple(
    length: float = 320.0,
    cross_section_heater: CrossSectionSpec = "heater_metal",
    cross_section_waveguide_heater: CrossSectionSpec = "strip_heater_metal",
    via_stack: (
        ComponentSpec | None
    ) = "via_stack_heater_mtop",
    port_orientation1: int | None = None,
    port_orientation2: int | None = None,
    heater_taper_length: float = 5.0,
    ohms_per_square: float | None = None,
) -> Component

Returns a thermal phase shifter that has properly fixed electrical connectivity to extract a suitable electrical netlist and models.

dimensions from https://doi.org/10.1364/OE.27.010456.

Parameters:

Name Type Description Default
length float

of the waveguide.

320.0
cross_section_heater CrossSectionSpec

for heated sections. heater metal only.

'heater_metal'
cross_section_waveguide_heater CrossSectionSpec

for heated sections.

'strip_heater_metal'
via_stack ComponentSpec | None

via stack.

'via_stack_heater_mtop'
port_orientation1 int | None

left via stack port orientation. None adds all orientations.

None
port_orientation2 int | None

right via stack port orientation. None adds all orientations.

None
heater_taper_length float

minimizes current concentrations from heater to via_stack.

5.0
ohms_per_square float | None

to calculate resistance.

None
Source code in gdsfactory/components/waveguides/straight_heater_metal.py
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@gf.cell_with_module_name(schematic_function=straight_schematic, tags=["waveguides"])
def straight_heater_metal_simple(
    length: float = 320.0,
    cross_section_heater: CrossSectionSpec = "heater_metal",
    cross_section_waveguide_heater: CrossSectionSpec = "strip_heater_metal",
    via_stack: ComponentSpec | None = "via_stack_heater_mtop",
    port_orientation1: int | None = None,
    port_orientation2: int | None = None,
    heater_taper_length: float = 5.0,
    ohms_per_square: float | None = None,
) -> Component:
    """Returns a thermal phase shifter that has properly fixed electrical connectivity to extract a suitable electrical netlist and models.

    dimensions from <https://doi.org/10.1364/OE.27.010456>.

    Args:
        length: of the waveguide.
        cross_section_heater: for heated sections. heater metal only.
        cross_section_waveguide_heater: for heated sections.
        via_stack: via stack.
        port_orientation1: left via stack port orientation. None adds all orientations.
        port_orientation2: right via stack port orientation. None adds all orientations.
        heater_taper_length: minimizes current concentrations from heater to via_stack.
        ohms_per_square: to calculate resistance.
    """
    return cf.straight_heater_metal_simple(
        length=length,
        cross_section_heater=cross_section_heater,
        cross_section_waveguide_heater=cross_section_waveguide_heater,
        via_stack=via_stack,
        port_orientation1=port_orientation1,
        port_orientation2=port_orientation2,
        heater_taper_length=heater_taper_length,
        ohms_per_square=ohms_per_square,
    )

straight_heater_metal_undercut

straight_heater_metal_undercut(
    length: float = 320.0,
    length_undercut_spacing: float = 6.0,
    length_undercut: float = 30.0,
    length_straight: float = 0.1,
    length_straight_input: float = 15.0,
    cross_section: CrossSectionSpec = "strip",
    cross_section_heater: CrossSectionSpec = "heater_metal",
    cross_section_waveguide_heater: CrossSectionSpec = "strip_heater_metal",
    cross_section_heater_undercut: CrossSectionSpec = "strip_heater_metal_undercut",
    with_undercut: bool = True,
    via_stack: (
        ComponentSpec | None
    ) = "via_stack_heater_mtop",
    port_orientation1: int | None = None,
    port_orientation2: int | None = None,
    heater_taper_length: float = 5.0,
    ohms_per_square: float | None = None,
) -> Component

Returns a thermal phase shifter.

dimensions from https://doi.org/10.1364/OE.27.010456

Parameters:

Name Type Description Default
length float

of the waveguide.

320.0
length_undercut_spacing float

from undercut regions.

6.0
length_undercut float

length of each undercut section.

30.0
length_straight float

length of the straight waveguide.

0.1
length_straight_input float

from input port to where trenches start.

15.0
cross_section CrossSectionSpec

for waveguide ports.

'strip'
cross_section_heater CrossSectionSpec

for heated sections. heater metal only.

'heater_metal'
cross_section_waveguide_heater CrossSectionSpec

for heated sections.

'strip_heater_metal'
cross_section_heater_undercut CrossSectionSpec

for heated sections with undercut.

'strip_heater_metal_undercut'
with_undercut bool

isolation trenches for higher efficiency.

True
via_stack ComponentSpec | None

via stack.

'via_stack_heater_mtop'
port_orientation1 int | None

left via stack port orientation. None adds all orientations.

None
port_orientation2 int | None

right via stack port orientation. None adds all orientations.

None
heater_taper_length float

minimizes current concentrations from heater to via_stack.

5.0
ohms_per_square float | None

to calculate resistance.

None
Source code in gdsfactory/components/waveguides/straight_heater_metal.py
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@gf.cell_with_module_name(schematic_function=straight_schematic, tags=["waveguides"])
def straight_heater_metal_undercut(
    length: float = 320.0,
    length_undercut_spacing: float = 6.0,
    length_undercut: float = 30.0,
    length_straight: float = 0.1,
    length_straight_input: float = 15.0,
    cross_section: CrossSectionSpec = "strip",
    cross_section_heater: CrossSectionSpec = "heater_metal",
    cross_section_waveguide_heater: CrossSectionSpec = "strip_heater_metal",
    cross_section_heater_undercut: CrossSectionSpec = "strip_heater_metal_undercut",
    with_undercut: bool = True,
    via_stack: ComponentSpec | None = "via_stack_heater_mtop",
    port_orientation1: int | None = None,
    port_orientation2: int | None = None,
    heater_taper_length: float = 5.0,
    ohms_per_square: float | None = None,
) -> Component:
    """Returns a thermal phase shifter.

    dimensions from <https://doi.org/10.1364/OE.27.010456>

    Args:
        length: of the waveguide.
        length_undercut_spacing: from undercut regions.
        length_undercut: length of each undercut section.
        length_straight: length of the straight waveguide.
        length_straight_input: from input port to where trenches start.
        cross_section: for waveguide ports.
        cross_section_heater: for heated sections. heater metal only.
        cross_section_waveguide_heater: for heated sections.
        cross_section_heater_undercut: for heated sections with undercut.
        with_undercut: isolation trenches for higher efficiency.
        via_stack: via stack.
        port_orientation1: left via stack port orientation. None adds all orientations.
        port_orientation2: right via stack port orientation. None adds all orientations.
        heater_taper_length: minimizes current concentrations from heater to via_stack.
        ohms_per_square: to calculate resistance.
    """
    return cf.straight_heater_metal_undercut(
        length=length,
        length_undercut_spacing=length_undercut_spacing,
        length_undercut=length_undercut,
        length_straight=length_straight,
        length_straight_input=length_straight_input,
        cross_section=cross_section,
        cross_section_heater=cross_section_heater,
        cross_section_waveguide_heater=cross_section_waveguide_heater,
        cross_section_heater_undercut=cross_section_heater_undercut,
        with_undercut=with_undercut,
        via_stack=via_stack,
        port_orientation1=port_orientation1,
        port_orientation2=port_orientation2,
        heater_taper_length=heater_taper_length,
        ohms_per_square=ohms_per_square,
    )

straight_heater_metal

straight_heater_metal_90_90 module-attribute

straight_heater_metal_90_90 = CellAlias(
    straight_heater_metal,
    port_orientation1=90,
    port_orientation2=90,
)

straight_heater_metal_90_90

straight_heater_metal_simple

straight_heater_metal_simple(
    length: float = 320.0,
    cross_section_heater: CrossSectionSpec = "heater_metal",
    cross_section_waveguide_heater: CrossSectionSpec = "strip_heater_metal",
    via_stack: (
        ComponentSpec | None
    ) = "via_stack_heater_mtop",
    port_orientation1: int | None = None,
    port_orientation2: int | None = None,
    heater_taper_length: float = 5.0,
    ohms_per_square: float | None = None,
) -> Component

Returns a thermal phase shifter that has properly fixed electrical connectivity to extract a suitable electrical netlist and models.

dimensions from https://doi.org/10.1364/OE.27.010456.

Parameters:

Name Type Description Default
length float

of the waveguide.

320.0
cross_section_heater CrossSectionSpec

for heated sections. heater metal only.

'heater_metal'
cross_section_waveguide_heater CrossSectionSpec

for heated sections.

'strip_heater_metal'
via_stack ComponentSpec | None

via stack.

'via_stack_heater_mtop'
port_orientation1 int | None

left via stack port orientation. None adds all orientations.

None
port_orientation2 int | None

right via stack port orientation. None adds all orientations.

None
heater_taper_length float

minimizes current concentrations from heater to via_stack.

5.0
ohms_per_square float | None

to calculate resistance.

None
Source code in gdsfactory/components/waveguides/straight_heater_metal.py
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
@gf.cell_with_module_name(schematic_function=straight_schematic, tags=["waveguides"])
def straight_heater_metal_simple(
    length: float = 320.0,
    cross_section_heater: CrossSectionSpec = "heater_metal",
    cross_section_waveguide_heater: CrossSectionSpec = "strip_heater_metal",
    via_stack: ComponentSpec | None = "via_stack_heater_mtop",
    port_orientation1: int | None = None,
    port_orientation2: int | None = None,
    heater_taper_length: float = 5.0,
    ohms_per_square: float | None = None,
) -> Component:
    """Returns a thermal phase shifter that has properly fixed electrical connectivity to extract a suitable electrical netlist and models.

    dimensions from <https://doi.org/10.1364/OE.27.010456>.

    Args:
        length: of the waveguide.
        cross_section_heater: for heated sections. heater metal only.
        cross_section_waveguide_heater: for heated sections.
        via_stack: via stack.
        port_orientation1: left via stack port orientation. None adds all orientations.
        port_orientation2: right via stack port orientation. None adds all orientations.
        heater_taper_length: minimizes current concentrations from heater to via_stack.
        ohms_per_square: to calculate resistance.
    """
    return cf.straight_heater_metal_simple(
        length=length,
        cross_section_heater=cross_section_heater,
        cross_section_waveguide_heater=cross_section_waveguide_heater,
        via_stack=via_stack,
        port_orientation1=port_orientation1,
        port_orientation2=port_orientation2,
        heater_taper_length=heater_taper_length,
        ohms_per_square=ohms_per_square,
    )

straight_heater_metal_simple

straight_heater_metal_undercut

straight_heater_metal_undercut(
    length: float = 320.0,
    length_undercut_spacing: float = 6.0,
    length_undercut: float = 30.0,
    length_straight: float = 0.1,
    length_straight_input: float = 15.0,
    cross_section: CrossSectionSpec = "strip",
    cross_section_heater: CrossSectionSpec = "heater_metal",
    cross_section_waveguide_heater: CrossSectionSpec = "strip_heater_metal",
    cross_section_heater_undercut: CrossSectionSpec = "strip_heater_metal_undercut",
    with_undercut: bool = True,
    via_stack: (
        ComponentSpec | None
    ) = "via_stack_heater_mtop",
    port_orientation1: int | None = None,
    port_orientation2: int | None = None,
    heater_taper_length: float = 5.0,
    ohms_per_square: float | None = None,
) -> Component

Returns a thermal phase shifter.

dimensions from https://doi.org/10.1364/OE.27.010456

Parameters:

Name Type Description Default
length float

of the waveguide.

320.0
length_undercut_spacing float

from undercut regions.

6.0
length_undercut float

length of each undercut section.

30.0
length_straight float

length of the straight waveguide.

0.1
length_straight_input float

from input port to where trenches start.

15.0
cross_section CrossSectionSpec

for waveguide ports.

'strip'
cross_section_heater CrossSectionSpec

for heated sections. heater metal only.

'heater_metal'
cross_section_waveguide_heater CrossSectionSpec

for heated sections.

'strip_heater_metal'
cross_section_heater_undercut CrossSectionSpec

for heated sections with undercut.

'strip_heater_metal_undercut'
with_undercut bool

isolation trenches for higher efficiency.

True
via_stack ComponentSpec | None

via stack.

'via_stack_heater_mtop'
port_orientation1 int | None

left via stack port orientation. None adds all orientations.

None
port_orientation2 int | None

right via stack port orientation. None adds all orientations.

None
heater_taper_length float

minimizes current concentrations from heater to via_stack.

5.0
ohms_per_square float | None

to calculate resistance.

None
Source code in gdsfactory/components/waveguides/straight_heater_metal.py
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
@gf.cell_with_module_name(schematic_function=straight_schematic, tags=["waveguides"])
def straight_heater_metal_undercut(
    length: float = 320.0,
    length_undercut_spacing: float = 6.0,
    length_undercut: float = 30.0,
    length_straight: float = 0.1,
    length_straight_input: float = 15.0,
    cross_section: CrossSectionSpec = "strip",
    cross_section_heater: CrossSectionSpec = "heater_metal",
    cross_section_waveguide_heater: CrossSectionSpec = "strip_heater_metal",
    cross_section_heater_undercut: CrossSectionSpec = "strip_heater_metal_undercut",
    with_undercut: bool = True,
    via_stack: ComponentSpec | None = "via_stack_heater_mtop",
    port_orientation1: int | None = None,
    port_orientation2: int | None = None,
    heater_taper_length: float = 5.0,
    ohms_per_square: float | None = None,
) -> Component:
    """Returns a thermal phase shifter.

    dimensions from <https://doi.org/10.1364/OE.27.010456>

    Args:
        length: of the waveguide.
        length_undercut_spacing: from undercut regions.
        length_undercut: length of each undercut section.
        length_straight: length of the straight waveguide.
        length_straight_input: from input port to where trenches start.
        cross_section: for waveguide ports.
        cross_section_heater: for heated sections. heater metal only.
        cross_section_waveguide_heater: for heated sections.
        cross_section_heater_undercut: for heated sections with undercut.
        with_undercut: isolation trenches for higher efficiency.
        via_stack: via stack.
        port_orientation1: left via stack port orientation. None adds all orientations.
        port_orientation2: right via stack port orientation. None adds all orientations.
        heater_taper_length: minimizes current concentrations from heater to via_stack.
        ohms_per_square: to calculate resistance.
    """
    return cf.straight_heater_metal_undercut(
        length=length,
        length_undercut_spacing=length_undercut_spacing,
        length_undercut=length_undercut,
        length_straight=length_straight,
        length_straight_input=length_straight_input,
        cross_section=cross_section,
        cross_section_heater=cross_section_heater,
        cross_section_waveguide_heater=cross_section_waveguide_heater,
        cross_section_heater_undercut=cross_section_heater_undercut,
        with_undercut=with_undercut,
        via_stack=via_stack,
        port_orientation1=port_orientation1,
        port_orientation2=port_orientation2,
        heater_taper_length=heater_taper_length,
        ohms_per_square=ohms_per_square,
    )

straight_heater_metal_undercut

straight_heater_metal_undercut_90_90 module-attribute

straight_heater_metal_undercut_90_90 = CellAlias(
    straight_heater_metal_undercut,
    port_orientation1=90,
    port_orientation2=90,
)

straight_heater_metal_undercut_90_90

straight_piecewise

straight_piecewise

straight_piecewise(
    x: Sequence[float] | Path,
    widths: Sequence[float],
    layer: LayerSpec,
    sections: Sequence[SectionSpec] | None = None,
    port_names: tuple[str | None, str | None] = (
        "o1",
        "o2",
    ),
    name: str = "core",
    **kwargs: Any
) -> Component

Create a component with a piecewise-defined straight waveguide.

Parameters:

Name Type Description Default
x Sequence[float] | Path

X coordinates or a custom Path object.

required
widths Sequence[float]

Waveguide widths at each corresponding x.

required
layer LayerSpec

Layer to extrude.

required
sections Sequence[SectionSpec] | None

Additional cross-section sections to extrude.

None
port_names tuple[str | None, str | None]

Port names for the waveguide.

('o1', 'o2')
name str

Name for the core (main) SectionSpec.

'core'
**kwargs Any

Additional keyword arguments for the SectionSpec.

{}
Source code in gdsfactory/components/waveguides/straight_piecewise.py
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@gf.cell_with_module_name(tags=["waveguides"])
def straight_piecewise(
    x: Sequence[float] | Path,
    widths: Sequence[float],
    layer: LayerSpec,
    sections: Sequence[SectionSpec] | None = None,
    port_names: tuple[str | None, str | None] = ("o1", "o2"),
    name: str = "core",
    **kwargs: Any,
) -> Component:
    """Create a component with a piecewise-defined straight waveguide.

    Args:
        x: X coordinates or a custom Path object.
        widths: Waveguide widths at each corresponding x.
        layer: Layer to extrude.
        sections: Additional cross-section sections to extrude.
        port_names: Port names for the waveguide.
        name: Name for the core (main) SectionSpec.
        **kwargs: Additional keyword arguments for the SectionSpec.
    """
    return cf.straight_piecewise(
        x=x,
        widths=widths,
        layer=layer,
        sections=sections,
        port_names=port_names,
        name=name,
        **kwargs,
    )
import gdsfactory as gf

gf.gpdk.PDK.activate()

c = gf.components.straight_piecewise(port_names=('o1', 'o2'), name='core').copy()
c.draw_ports()
c.plot()

straight_pin

Straight Doped PIN waveguide.

straight_pin

straight_pin(
    length: float = 500.0,
    cross_section: CrossSectionSpec = pin,
    via_stack: ComponentSpec = "via_stack_slab_m3",
    via_stack_width: float = 10.0,
    via_stack_spacing: float = 2,
    taper: ComponentSpec | None = "taper_strip_to_ridge",
) -> Component

Returns rib waveguide with doping and via_stacks used for PN and PIN modulators.

For PIN: https://doi.org/10.1364/OE.26.029983

500um length for PI phase shift https://ieeexplore.ieee.org/document/8268112

to go beyond 2PI, you will need at least 1mm https://ieeexplore.ieee.org/document/8853396/

For PN: Typical lengths in practice are 2-5mm depending on doping,engineering and application: https://opg.optica.org/oe/fulltext.cfm?uri=oe-21-25-30350&id=275107 https://opg.optica.org/oe/fulltext.cfm?uri=oe-20-11-12014&id=233271

Parameters:

Name Type Description Default
length float

of the waveguide.

500.0
cross_section CrossSectionSpec

for the waveguide.

pin
via_stack ComponentSpec

for the via_stacks.

'via_stack_slab_m3'
via_stack_width float

width of the via_stack.

10.0
via_stack_spacing float

spacing between via_stacks.

2
taper ComponentSpec | None

optional taper.

'taper_strip_to_ridge'
Source code in gdsfactory/components/waveguides/straight_pin.py
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
@gf.cell_with_module_name(schematic_function=modulator_schematic, tags=["waveguides"])
def straight_pin(
    length: float = 500.0,
    cross_section: CrossSectionSpec = pin,
    via_stack: ComponentSpec = "via_stack_slab_m3",
    via_stack_width: float = 10.0,
    via_stack_spacing: float = 2,
    taper: ComponentSpec | None = "taper_strip_to_ridge",
) -> Component:
    """Returns rib waveguide with doping and via_stacks used for PN and PIN modulators.

    For PIN:
    <https://doi.org/10.1364/OE.26.029983>

    500um length for PI phase shift
    <https://ieeexplore.ieee.org/document/8268112>

    to go beyond 2PI, you will need at least 1mm
    <https://ieeexplore.ieee.org/document/8853396/>

    For PN:
    Typical lengths in practice are 2-5mm depending on doping,engineering and application:
    <https://opg.optica.org/oe/fulltext.cfm?uri=oe-21-25-30350&id=275107>
    <https://opg.optica.org/oe/fulltext.cfm?uri=oe-20-11-12014&id=233271>

    Args:
        length: of the waveguide.
        cross_section: for the waveguide.
        via_stack: for the via_stacks.
        via_stack_width: width of the via_stack.
        via_stack_spacing: spacing between via_stacks.
        taper: optional taper.
    """
    return cf.straight_pin(
        length=length,
        cross_section=cross_section,
        via_stack=via_stack,
        via_stack_width=via_stack_width,
        via_stack_spacing=via_stack_spacing,
        taper=taper,
    )

straight_pin

straight_pin_slot

Straight Doped PIN waveguide.

straight_pin_slot

straight_pin_slot(
    length: float = 500.0,
    cross_section: CrossSectionSpec = "pin",
    via_stack: ComponentSpec | None = "via_stack_m1_mtop",
    via_stack_width: float = 10.0,
    via_stack_slab: (
        ComponentSpec | None
    ) = "via_stack_slab_m1_horizontal",
    via_stack_slab_top: ComponentSpec | None = None,
    via_stack_slab_bot: ComponentSpec | None = None,
    via_stack_slab_width: float | None = None,
    via_stack_spacing: float = 3.0,
    via_stack_slab_spacing: float = 2.0,
    taper: ComponentSpec | None = "taper_strip_to_ridge",
    width: float | None = None,
) -> Component

Returns a PIN straight waveguide with slotted via.

https://doi.org/10.1364/OE.26.029983

500um length for PI phase shift https://ieeexplore.ieee.org/document/8268112

to go beyond 2PI, you will need at least 1mm https://ieeexplore.ieee.org/document/8853396/

Parameters:

Name Type Description Default
length float

of the waveguide.

500.0
cross_section CrossSectionSpec

for the waveguide.

'pin'
via_stack ComponentSpec | None

for via_stacking the metal.

'via_stack_m1_mtop'
via_stack_width float

in um.

10.0
via_stack_slab ComponentSpec | None

function for the component via_stacking the slab.

'via_stack_slab_m1_horizontal'
via_stack_slab_top ComponentSpec | None

Optional, defaults to via_stack_slab.

None
via_stack_slab_bot ComponentSpec | None

Optional, defaults to via_stack_slab.

None
via_stack_slab_width float | None

defaults to via_stack_width.

None
via_stack_spacing float

spacing between via_stacks.

3.0
via_stack_slab_spacing float

spacing between via_stacks slabs.

2.0
taper ComponentSpec | None

optional taper.

'taper_strip_to_ridge'
width float | None

width of the waveguide. If None, it will use the width of the cross_section.

None
Source code in gdsfactory/components/waveguides/straight_pin_slot.py
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@gf.cell_with_module_name(schematic_function=modulator_schematic, tags=["waveguides"])
def straight_pin_slot(
    length: float = 500.0,
    cross_section: CrossSectionSpec = "pin",
    via_stack: ComponentSpec | None = "via_stack_m1_mtop",
    via_stack_width: float = 10.0,
    via_stack_slab: ComponentSpec | None = "via_stack_slab_m1_horizontal",
    via_stack_slab_top: ComponentSpec | None = None,
    via_stack_slab_bot: ComponentSpec | None = None,
    via_stack_slab_width: float | None = None,
    via_stack_spacing: float = 3.0,
    via_stack_slab_spacing: float = 2.0,
    taper: ComponentSpec | None = "taper_strip_to_ridge",
    width: float | None = None,
) -> Component:
    """Returns a PIN straight waveguide with slotted via.

    <https://doi.org/10.1364/OE.26.029983>

    500um length for PI phase shift
    <https://ieeexplore.ieee.org/document/8268112>

    to go beyond 2PI, you will need at least 1mm
    <https://ieeexplore.ieee.org/document/8853396/>

    Args:
        length: of the waveguide.
        cross_section: for the waveguide.
        via_stack: for via_stacking the metal.
        via_stack_width: in um.
        via_stack_slab: function for the component via_stacking the slab.
        via_stack_slab_top: Optional, defaults to via_stack_slab.
        via_stack_slab_bot: Optional, defaults to via_stack_slab.
        via_stack_slab_width: defaults to via_stack_width.
        via_stack_spacing: spacing between via_stacks.
        via_stack_slab_spacing: spacing between via_stacks slabs.
        taper: optional taper.
        width: width of the waveguide. If None, it will use the width of the cross_section.
    """
    return cf.straight_pin_slot(
        length=length,
        cross_section=cross_section,
        via_stack=via_stack,
        via_stack_width=via_stack_width,
        via_stack_slab=via_stack_slab,
        via_stack_slab_top=via_stack_slab_top,
        via_stack_slab_bot=via_stack_slab_bot,
        via_stack_slab_width=via_stack_slab_width,
        via_stack_spacing=via_stack_spacing,
        via_stack_slab_spacing=via_stack_slab_spacing,
        taper=taper,
        width=width,
    )

straight_pin_slot

straight_pn module-attribute

straight_pn = CellAlias(
    straight_pin, cross_section="pn", length=2000
)

straight_pn

straight_pn_slot module-attribute

straight_pn_slot = CellAlias(
    straight_pin_slot, cross_section="pn"
)

straight_pn_slot

via_stack_heater_meander_doped module-attribute

via_stack_heater_meander_doped = CellAlias(
    via_stack,
    size=(1.5, 1.5),
    layers=("M1", "M2"),
    vias=(
        CellAlias(
            via,
            layer="VIAC",
            size=(0.1, 0.1),
            pitch=0.2,
            enclosure=0.1,
        ),
        CellAlias(
            via,
            layer="VIA1",
            size=(0.1, 0.1),
            pitch=0.2,
            enclosure=0.1,
        ),
    ),
)

via_stack_heater_meander_doped

wire_corner

wire_corner(
    cross_section: CrossSectionSpec = "metal_routing",
    port_names: PortNames = ("e1", "e2"),
    port_types: PortTypes = ("electrical", "electrical"),
    width: float | None = None,
    radius: float | None = None,
) -> Component

Returns 45 degrees electrical corner wire.

Parameters:

Name Type Description Default
cross_section CrossSectionSpec

spec.

'metal_routing'
port_names PortNames

port names.

('e1', 'e2')
port_types PortTypes

port types.

('electrical', 'electrical')
width float | None

optional width. Defaults to cross_section width.

None
radius float | None

ignored.

None
Source code in gdsfactory/components/waveguides/wire.py
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
@gf.cell_with_module_name(tags=["waveguides"])
def wire_corner(
    cross_section: CrossSectionSpec = "metal_routing",
    port_names: PortNames = ("e1", "e2"),
    port_types: PortTypes = ("electrical", "electrical"),
    width: float | None = None,
    radius: float | None = None,
) -> Component:
    """Returns 45 degrees electrical corner wire.

    Args:
        cross_section: spec.
        port_names: port names.
        port_types: port types.
        width: optional width. Defaults to cross_section width.
        radius: ignored.
    """
    return cf.wire_corner(
        cross_section=cross_section,
        port_names=port_names,
        port_types=port_types,
        width=width,
        radius=radius,
    )

wire_corner

wire_corner45

wire_corner45(
    cross_section: CrossSectionSpec = "metal_routing",
    radius: float = 10,
    width: float | None = None,
    layer: LayerSpec | None = None,
    with_corner90_ports: bool = True,
) -> Component

Returns 90 degrees electrical corner wire.

Parameters:

Name Type Description Default
cross_section CrossSectionSpec

spec.

'metal_routing'
radius float

in um.

10
width float | None

optional width.

None
layer LayerSpec | None

optional layer.

None
with_corner90_ports bool

if True adds ports at 90 degrees.

True
Source code in gdsfactory/components/waveguides/wire.py
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
@gf.cell_with_module_name(tags=["waveguides"])
def wire_corner45(
    cross_section: CrossSectionSpec = "metal_routing",
    radius: float = 10,
    width: float | None = None,
    layer: LayerSpec | None = None,
    with_corner90_ports: bool = True,
) -> Component:
    """Returns 90 degrees electrical corner wire.

    Args:
        cross_section: spec.
        radius: in um.
        width: optional width.
        layer: optional layer.
        with_corner90_ports: if True adds ports at 90 degrees.
    """
    return cf.wire_corner45(
        cross_section=cross_section,
        radius=radius,
        width=width,
        layer=layer,
        with_corner90_ports=with_corner90_ports,
    )

wire_corner45

wire_corner45_straight

wire_corner45_straight(
    width: float | None = None,
    radius: float | None = None,
    cross_section: CrossSectionSpec = "metal_routing",
) -> gf.Component

Returns 45 degrees wire straight ends.

Parameters:

Name Type Description Default
width float | None

of the wire.

None
radius float | None

of the corner. Defaults to width.

None
cross_section CrossSectionSpec

metal_routing.

'metal_routing'
Source code in gdsfactory/components/waveguides/wire.py
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@gf.cell(tags=["waveguides"])
def wire_corner45_straight(
    width: float | None = None,
    radius: float | None = None,
    cross_section: CrossSectionSpec = "metal_routing",
) -> gf.Component:
    """Returns 45 degrees wire straight ends.

    Args:
        width: of the wire.
        radius: of the corner. Defaults to width.
        cross_section: metal_routing.
    """
    return cf.wire_corner45_straight(
        width=width, radius=radius, cross_section=cross_section
    )

wire_corner45_straight

wire_corner_sections

wire_corner_sections(
    cross_section: CrossSectionSpec = "metal_routing",
    port_type: str = "electrical",
    **kwargs: Any
) -> Component

Returns 90 degrees electrical corner wire, where all cross_section sections properly represented.

Works well with symmetric cross_sections, not quite ready for asymmetric.

Parameters:

Name Type Description Default
cross_section CrossSectionSpec

spec.

'metal_routing'
port_type str

"electrical" or "optical".

'electrical'
kwargs Any

cross_section settings, ignored (such as radius, width, layer).

{}
Source code in gdsfactory/components/waveguides/wire.py
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@gf.cell_with_module_name(tags=["waveguides"])
def wire_corner_sections(
    cross_section: CrossSectionSpec = "metal_routing",
    port_type: str = "electrical",
    **kwargs: Any,
) -> Component:
    """Returns 90 degrees electrical corner wire, where all cross_section sections properly represented.

    Works well with symmetric cross_sections, not quite ready for asymmetric.

    Args:
        cross_section: spec.
        port_type: "electrical" or "optical".
        kwargs: cross_section settings, ignored (such as radius, width, layer).
    """
    return cf.wire_corner_sections(
        cross_section=cross_section, port_type=port_type, **kwargs
    )

wire_corner_sections

wire_straight

wire_straight(
    length: float = 10.0,
    npoints: int = 2,
    cross_section: CrossSectionSpec = "metal_routing",
    width: float | None = None,
) -> Component

Returns a Straight waveguide.

Parameters:

Name Type Description Default
length float

straight length (um).

10.0
npoints int

number of points.

2
cross_section CrossSectionSpec

specification (CrossSection, string or dict).

'metal_routing'
width float | None

width of the waveguide. If None, it will use the width of the cross_section.

None
    o1  ──────────────── o2
            length
Source code in gdsfactory/components/waveguides/straight.py
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@gf.cell_with_module_name(schematic_function=wire_schematic, tags=["waveguides"])
def wire_straight(
    length: float = 10.0,
    npoints: int = 2,
    cross_section: CrossSectionSpec = "metal_routing",
    width: float | None = None,
) -> Component:
    """Returns a Straight waveguide.

    Args:
        length: straight length (um).
        npoints: number of points.
        cross_section: specification (CrossSection, string or dict).
        width: width of the waveguide. If None, it will use the width of the cross_section.

    ```text
        o1  ──────────────── o2
                length
    ```
    """
    return cf.wire_straight(
        length=length, npoints=npoints, cross_section=cross_section, width=width
    )

wire_straight