Layout#

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

import gdsfactory as gf

import ubcpdk.components as uc

Fixed Component cells#

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

c = uc.ebeam_crossing4()
c.plot()
../_images/11ac720485e135894c0d6564531f21e5798582bce902796b0ffedeccca804404.png
c = uc.ebeam_swg_edgecoupler()
c.plot()
../_images/7d63727f83aee3fd22a9cabb7dfed51f889d466f0f0238017b9752da90cd592b.png
c = uc.ebeam_bdc_te1550()
c.plot()
../_images/b2dea1bb9d8bc2dd94baa69933e994105d6a737ee50c6064d4ea444a59220455.png
c = uc.ebeam_adiabatic_te1550()
c.plot()
../_images/53430ef33c303fad86290bcaa36945ddbb20029d3b42ea70645bde817e7981a0.png
c = uc.ebeam_y_adiabatic()
c.plot()
../_images/4336d924b18fdf96115919c4583570e006c5d7c7905ae7a96b4e369450ed8bc5.png
c = uc.ebeam_y_1550()
c.plot()
../_images/9a8bcb278df47b479658862aa2c0bcb4db9b365e42bcf2e4c93dd3343a3d4c27.png

Parametric Component PCells#

You can also define cells adapted from gdsfactory generic pdk.

c = uc.straight(length=2)
c.plot()
../_images/2ddb41eb6b54072a4f680d03be07c4e3bd28dc52d5561e942b60bb67d76d893c.png
c = uc.bend(radius=5)
c.plot()
../_images/032ecc34153e55645dc8940961b5bb6d56eefdbe37c0b8985fbb198ed698954b.png
c = uc.ring_with_crossing()
c.plot()
../_images/fb3f08a1d3e1d55546524f5bb85451872bdac2136f374e720072f74cca2ae320.png
c = uc.dbr()
c.plot()
/usr/local/lib/python3.11/site-packages/gdsfactory/pdk.py:447: UserWarning: {'width': 0.45} are ignored for cross_section 'xs_c8b8e980'
  warnings.warn(
/usr/local/lib/python3.11/site-packages/gdsfactory/pdk.py:447: UserWarning: {'width': 0.55} are ignored for cross_section 'xs_c8b8e980'
  warnings.warn(
../_images/5627b707f738a14b344f47a02bb0b83b825f42dfb48fbf9248de12f744b255f6.png
c = uc.spiral()
c.plot()
../_images/17307c543564b628a283dd88ecdfbda48d8eed3eef90db206a75a118301db450.png
c = uc.mzi_heater()
c.plot()
../_images/ff2db69b66f93652bee834bb4fffe94d9e309bd0345a528641e20ed9c02bb3a1.png
c = uc.ring_single_heater()
c.plot()
../_images/17ce50bf0c49b3b8afa8509fec71a6cbdc198b486c14c3081c9b17731231d4e0.png

Components with grating couplers#

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

splitter = uc.ebeam_y_1550()
mzi = gf.components.mzi(splitter=splitter)
mzi.plot()
../_images/80c7a540b94669422699c2110925412643087fd563389f8e737ec8b02bbaec92.png
component_fiber_array = uc.add_fiber_array(component=mzi, fanout_length=5)
component_fiber_array.plot()
../_images/a81a05e278aab382bbaa4c2490ac18ba238be3114958b5d238cf0d22a85cc5d4.png
c = uc.ring_single_heater()
c = uc.add_fiber_array_pads_rf(c)
c.plot()
../_images/4f0c51934ebade3b943f9ccd3e16120b7230d8b3515528cfd6fa8e155120deea.png
c = uc.mzi_heater()
c = uc.add_fiber_array_pads_rf(c)
c.plot()
../_images/2089f138532cf46042b185b57613943821abf4e61ae4c138f7b58df0c58345a3.png

3D rendering#

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

Die assembly#

from functools import partial

import gdsfactory as gf

import ubcpdk.components as uc
from ubcpdk.tech import LAYER

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


@gf.cell
def EBeam_JoaquinMatres_1() -> gf.Component:
    """Add DBR cavities."""
    e = [add_gc(uc.straight())]
    e += [add_gc(uc.mzi(delta_length=dl)) for dl in [9.32, 93.19]]
    e += [
        add_gc(uc.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]
    ]

    e += [
        uc.dbr_cavity_te(w0=w0, dw=dw)
        for w0 in [0.5]
        for dw in [50e-3, 100e-3, 150e-3, 200e-3]
    ]
    e += [add_gc(uc.ring_with_crossing())]
    e += [add_gc(uc.ring_with_crossing(port_name="o2", with_component=False))]

    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
/usr/local/lib/python3.11/site-packages/gdsfactory/pdk.py:447: UserWarning: {'width': 0.476} are ignored for cross_section 'xs_c8b8e980'
  warnings.warn(
/usr/local/lib/python3.11/site-packages/gdsfactory/pdk.py:447: UserWarning: {'width': 0.524} are ignored for cross_section 'xs_c8b8e980'
  warnings.warn(
/usr/local/lib/python3.11/site-packages/gdsfactory/pdk.py:447: UserWarning: {'width': 0.424} are ignored for cross_section 'xs_c8b8e980'
  warnings.warn(
/usr/local/lib/python3.11/site-packages/gdsfactory/pdk.py:447: UserWarning: {'width': 0.576} are ignored for cross_section 'xs_c8b8e980'
  warnings.warn(
/usr/local/lib/python3.11/site-packages/gdsfactory/pdk.py:447: UserWarning: {'width': 0.4} are ignored for cross_section 'xs_c8b8e980'
  warnings.warn(
/usr/local/lib/python3.11/site-packages/gdsfactory/pdk.py:447: UserWarning: {'width': 0.6} are ignored for cross_section 'xs_c8b8e980'
  warnings.warn(
../_images/726fbb8278c0effd70ec26428cb20eaaeb67d2125e64b1e41995637e4964675b.png
def EBeam_JoaquinMatres_2() -> gf.Component:
    """spirals for extracting straight waveguide loss"""

    e = [
        uc.add_fiber_array(component=uc.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/3c62b41413b04600c97af47b39464eeb490a68b293326ce515cb363d8b4707d2.png
def EBeam_JoaquinMatres_3() -> gf.Component:
    """Contains mirror cavities and structures inside a resonator."""
    e = []
    e += [add_gc(uc.ebeam_crossing4())]
    e += [add_gc(uc.ebeam_adiabatic_te1550())]
    e += [add_gc(uc.ebeam_bdc_te1550())]
    e += [add_gc(uc.ebeam_y_1550())]
    e += [add_gc(uc.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/9f4eb3e3dc07b901ac2999567398901563cd60cf6058f11fb5e163ff40eabc22.png
def EBeam_JoaquinMatres_4() -> gf.Component:
    """MZI interferometers."""
    mzi = partial(gf.components.mzi, splitter=uc.ebeam_y_1550)
    mzis = [mzi(delta_length=delta_length) for delta_length in [10, 40]]
    mzis_gc = [uc.add_fiber_array(mzi, fanout_length=5) for mzi in mzis]

    mzis = [uc.mzi_heater(delta_length=delta_length) for delta_length in [40]]
    mzis_heater_gc = [uc.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/278f072240c0b524977330ffe19cbbd658f04cfe754380be5368a16dbf22876e.png
def EBeam_JoaquinMatres_5() -> gf.Component:
    """Ring resonators."""

    rings = []
    for length_x in [4, 6]:
        ring = uc.ring_single_heater(length_x=length_x)
        ring_gc = uc.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/91379379ba4ff4d670bf0a2c99a9fe4514c93bbe72b1e468fc78deb67cb16d1b.png