Layout#

All UBC ubcpdk.cells are conveniently combined into the ubcpdk.components module.

import gdsfactory as gf

from ubcpdk import PDK, cells

PDK.activate()

Fixed Component cells#

Most ubcpdk components are imported from GDS files as fixed cells.

c = cells.ebeam_crossing4()
c.plot()
../_images/6c2d7d7cac32ad8a059cd8f8b0172e63edb50fd102109668a435efa7034912ae.png
c = cells.ebeam_swg_edgecoupler()
c.plot()
../_images/3e280bdb8ca27dde4fd22ab56f23021919d64622c78d3cab1f9f84c051f694a2.png
c = cells.ebeam_bdc_te1550()
c.plot()
../_images/213e0910c181f55d1396e15aad4f007d29960119dbf8d901ec98c5dd45f9eac1.png
c = cells.ebeam_adiabatic_te1550()
c.plot()
../_images/fa6da483c84c9a8636d5b5aca46eb54d32c19da8112a0e6023440d3e3d5d9ba6.png
c = cells.ebeam_y_adiabatic()
c.plot()
../_images/73685942be9676a530d5356a4a2d0c29856d4e2dfc60ace3c32f7afef996ed51.png
c = cells.ebeam_y_1550()
c.plot()
../_images/8931bf34795d9c58619daf1bdec3d7889b61be0527459f96f684dc3bc5b2d183.png

Parametric Component PCells#

You can also define cells adapted from gdsfactory generic pdk.

c = cells.straight(length=2)
c.plot()
../_images/866808f720a06416d85df88cf5df8df78de9629581301812c729bb4f8d814b61.png
c = cells.bend_euler(radius=5)
c.plot()
../_images/0a60a981687535ce06b30c5043b59fac2e66ccfed2acf70c7dc57f18dba8adbc.png
c = cells.spiral()
c.plot()
../_images/485d37ad5cd3259a95996026e429a7f0e43d63d538fd683ac46bed2dbae10275.png
c = cells.ring_single_heater()
c.plot()
../_images/9fa8f905f87596e7057fb6183de8a0bbe11e07cecf38e4d3160d3eeabb181189.png

Components with grating couplers#

To test your devices you can add grating couplers. Both for single fibers and for fiber arrays.

splitter = cells.ebeam_y_1550()
mzi = gf.components.mzi(splitter=splitter)
mzi.plot()
../_images/c19534eee12b49e0718d2dddfe785cb007279e7cffc7fa06560d32c81655dcf9.png
component_fiber_array = cells.add_fiber_array(component=mzi, fanout_length=5)
component_fiber_array.plot()
../_images/de0394a59b45839b156711cc18b3c63094f2425bcce6f37858e29be28f336031.png
c = cells.ring_single_heater()
c = cells.add_fiber_array_pads_rf(c)
c.plot()
../_images/577dd89651e6539875df2bbeabf43d6e86173736226616ecf173c07795c24fdc.png
c = cells.mzi_heater()
c = cells.add_fiber_array_pads_rf(c)
c.plot()
../_images/c48a14b3605931b57d4f97f197e6d202dfd49742f115922e93c826d11a3b2e0c.png

3D rendering#

scene = c.to_3d()
scene.show()

Die assembly#

from functools import partial

import gdsfactory as gf

from ubcpdk.tech import LAYER

size = (440, 470)
add_gc = cells.add_fiber_array


@gf.cell
def EBeam_JoaquinMatres_1() -> gf.Component:
    """Add DBR cavities."""
    e = [add_gc(cells.straight())]
    e += [add_gc(cells.mzi(delta_length=dl)) for dl in [9.32, 93.19]]
    e += [
        add_gc(cells.ring_single(radius=12, gap=gap, length_x=coupling_length))
        for gap in [0.2]
        for coupling_length in [2.5, 4.5, 6.5]
    ]

    c = gf.Component()
    _ = c << gf.pack(e, max_size=size, spacing=2)[0]
    _ = c << gf.components.rectangle(size=size, layer=LAYER.FLOORPLAN)
    return c


c = EBeam_JoaquinMatres_1()
c.show()  # show in klayout
c.plot()  # plot in notebook
../_images/f0b66403f6a90fc4487a621164710c695631e5fce4092ee54012f9b288c8db2c.png
def EBeam_JoaquinMatres_2() -> gf.Component:
    """spirals for extracting straight waveguide loss"""

    e = [
        cells.add_fiber_array(component=cells.spiral(n_loops=8, length=length))
        for length in [0, 100, 200]
    ]

    c = gf.Component()
    _ = c << gf.pack(e, max_size=size, spacing=2)[0]
    _ = c << gf.components.rectangle(size=size, layer=LAYER.FLOORPLAN)
    return c


c = EBeam_JoaquinMatres_2()
c.show()  # show in klayout
c.plot()  # plot in notebook
../_images/44492cd0b4e93e182c417c8184d52388a746aa75a9da164948a3fa42e8704ef9.png
def EBeam_JoaquinMatres_3() -> gf.Component:
    """Contains mirror cavities and structures inside a resonator."""
    e = []
    e += [add_gc(cells.ebeam_crossing4())]
    e += [add_gc(cells.ebeam_adiabatic_te1550())]
    e += [add_gc(cells.ebeam_bdc_te1550())]
    e += [add_gc(cells.ebeam_y_1550())]
    e += [add_gc(cells.straight(), component_name=f"straight_{i}") for i in range(2)]
    c = gf.Component()
    _ = c << gf.pack(e, max_size=size, spacing=2)[0]
    _ = c << gf.components.rectangle(size=size, layer=LAYER.FLOORPLAN)
    return c


c = EBeam_JoaquinMatres_3()
c.show()  # show in klayout
c.plot()  # plot in notebook
../_images/e3fc141df400da5b6a21c5634e5640957b0fdb9592ab2b10d0e3882df37bb15c.png
def EBeam_JoaquinMatres_4() -> gf.Component:
    """MZI interferometers."""
    mzi = partial(gf.components.mzi, splitter=cells.ebeam_y_1550)
    mzis = [mzi(delta_length=delta_length) for delta_length in [10, 40]]
    mzis_gc = [cells.add_fiber_array(mzi, fanout_length=5) for mzi in mzis]

    mzis = [cells.mzi_heater(delta_length=delta_length) for delta_length in [40]]
    mzis_heater_gc = [
        cells.add_fiber_array_pads_rf(mzi, orientation=90) for mzi in mzis
    ]

    e = mzis_gc + mzis_heater_gc
    c = gf.Component()
    _ = c << gf.pack(e, max_size=size, spacing=2)[0]
    _ = c << gf.components.rectangle(size=size, layer=LAYER.FLOORPLAN)
    return c


c = EBeam_JoaquinMatres_4()
c.show()  # show in klayout
c.plot()  # plot in notebook
../_images/719afc2d23eeafcf1ccec20d7c11da0525077f4c17356cafc2db446642d5355f.png
def EBeam_JoaquinMatres_5() -> gf.Component:
    """Ring resonators."""

    rings = []
    for length_x in [4, 6]:
        ring = cells.ring_single_heater(length_x=length_x)
        ring_gc = cells.add_fiber_array_pads_rf(ring, pad_yspacing=10)
        rings.append(ring_gc)

    c = gf.Component()
    _ = c << gf.pack(rings, max_size=size, spacing=2)[0]
    _ = c << gf.components.rectangle(size=size, layer=LAYER.FLOORPLAN)
    return c


c = EBeam_JoaquinMatres_5()
c.show()  # show in klayout
c.plot()  # plot in notebook
../_images/cb8eab349a0f5363eb1b0318fa5e6e2a3d126c239565aadae5aa42104af244f3.png