Skip to content

Commit

Permalink
add more designs
Browse files Browse the repository at this point in the history
  • Loading branch information
joamatab committed Oct 28, 2023
1 parent e8d660b commit dfae871
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 35 deletions.
3 changes: 3 additions & 0 deletions ubc2/test_masks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from ubcpdk.config import PATH

import ubc2.ubc_helge as m12
import ubc2.ubc_joaquin_mater_heaters as heaters
import ubc2.ubc_joaquin_matres1 as m11
import ubc2.ubc_simon as m13
import ubc2.ubc_simon_bends as bends
Expand Down Expand Up @@ -49,6 +50,8 @@ def test_masks_2023_v1():
dcs.test_mask_dcs_4,
dcs.test_mask_dcs_5,
dcs.test_mask_dcs_6,
heaters.test_mzi_heater,
heaters.test_ring_heater,
]:
mask()

Expand Down
69 changes: 34 additions & 35 deletions ubc2/ubc_joaquin_matres1.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
"""Sample mask for the edx course Q1 2023."""

from functools import partial
from pathlib import Path

import gdsfactory as gf
Expand All @@ -13,12 +12,12 @@
from ubc2.write_mask import (
add_gc,
pack,
pack_actives,
size,
size_actives,
write_mask_gds_with_metadata,
)

length_x = 0.1


def test_mask1() -> Path:
"""Add DBR cavities."""
Expand Down Expand Up @@ -108,46 +107,46 @@ def test_mask3() -> Path:


def test_mask4() -> Path:
"""Heated MZI interferometers."""
mzi = partial(gf.components.mzi, splitter=ubcpdk.components.ebeam_y_1550)
mzis = [mzi(delta_length=delta_length) for delta_length in [10, 40, 100]]
mzis_gc = [pdk.add_fiber_array(mzi) for mzi in mzis]

mzis = [pdk.mzi_heater(delta_length=delta_length) for delta_length in [40]]
mzis_heater_gc = [
pdk.add_fiber_array_pads_rf(mzi, orientation=90, optical_routing_type=2)
for mzi in mzis
"""Ring resonators Radius 10um."""
gaps = [50, 100, 150, 200]
radiuses = [10]

rings = [
pdk.ring_double(
radius=radius, length_x=length_x, gap=gap * 1e-3, decorator=add_gc
)
for radius in radiuses
for gap in gaps
]
gaps = [100, 150]
radiuses = [3]
rings += [
pdk.ring_double(
radius=radius, length_x=length_x, gap=gap * 1e-3, decorator=add_gc
)
for radius in radiuses
for gap in gaps
]

c = pack_actives(mzis_gc + mzis_heater_gc)
c = pack(rings)
m = c[0]
m.name = "EBeam_heaters_JoaquinMatres_14"
_ = m << gf.components.rectangle(size=size_actives, layer=LAYER.FLOORPLAN)
m.name = "EBeam_JoaquinMatres_14"
_ = m << gf.components.rectangle(size=size, layer=LAYER.FLOORPLAN)
return write_mask_gds_with_metadata(m)


def test_mask5() -> Path:
"""Heated Ring resonators."""
lengths_x = [0.2]
gaps = [0.2]

rings = [
pdk.ring_double_heater(radius=12, length_x=length_x, gap=gap)
for length_x in lengths_x
for gap in gaps
]
rings = [gf.functions.rotate180(ring) for ring in rings]
rings_gc = [pdk.add_fiber_array_pads_rf(ring) for ring in rings]
rings_gc += [
add_gc(pdk.ring_double(radius=12, gap=gap, length_x=length_x))
for gap in gaps
for length_x in lengths_x
"""Ring resonators."""
e = []
e += [
pdk.dbr_cavity_te(dw=dw * 1e-3, n=350)
for dw in [5, 10, 20, 40, 60, 80, 100, 150, 200]
]

c = pack_actives(rings_gc)
c = pack(e)
m = c[0]
m.name = "EBeam_heaters_JoaquinMatres_15"
_ = m << gf.components.rectangle(size=size_actives, layer=LAYER.FLOORPLAN)
m.name = "EBeam_JoaquinMatres_15"
_ = m << gf.components.rectangle(size=size, layer=LAYER.FLOORPLAN)
return write_mask_gds_with_metadata(m)


Expand Down Expand Up @@ -212,8 +211,8 @@ def test_mask7() -> Path:
# c = test_mask1() # dbr and mzi
# c = test_mask2() # spirals
# c = test_mask3() # coupler and crossing
c = test_mask4() # heated mzis
# c = test_mask5() # heated rings
# c = test_mask4() # rings
c = test_mask5() # dbr cavity
# c = test_mask6() # 1x2 mmis
# c = test_mask7() # 2x2mmis
gf.show(c)
Expand Down
65 changes: 65 additions & 0 deletions ubc2/ubc_joaquin_matres_heaters.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
"""Sample mask for the edx course Q1 2023."""

from functools import partial
from pathlib import Path

import gdsfactory as gf
import ubcpdk
import ubcpdk.components as pdk
from ubcpdk.tech import LAYER

from ubc2.write_mask import (
add_gc,
pack_actives,
size_actives,
write_mask_gds_with_metadata,
)


def test_mzi_heater() -> Path:
"""Heated MZI interferometers."""
mzi = partial(gf.components.mzi, splitter=ubcpdk.components.ebeam_y_1550)
mzis = [mzi(delta_length=delta_length) for delta_length in [10, 40, 100]]
mzis_gc = [pdk.add_fiber_array(mzi) for mzi in mzis]

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

c = pack_actives(mzis_gc + mzis_heater_gc)
m = c[0]
m.name = "EBeam_heaters_JoaquinMatres_14"
_ = m << gf.components.rectangle(size=size_actives, layer=LAYER.FLOORPLAN)
return write_mask_gds_with_metadata(m)


def test_ring_heater() -> Path:
"""Heated Ring resonators."""
lengths_x = [0.2]
gaps = [0.2]

rings = [
pdk.ring_double_heater(radius=12, length_x=length_x, gap=gap)
for length_x in lengths_x
for gap in gaps
]
rings = [gf.functions.rotate180(ring) for ring in rings]
rings_gc = [pdk.add_fiber_array_pads_rf(ring) for ring in rings]
rings_gc += [
add_gc(pdk.ring_double(radius=12, gap=gap, length_x=length_x))
for gap in gaps
for length_x in lengths_x
]

c = pack_actives(rings_gc)
m = c[0]
m.name = "EBeam_heaters_JoaquinMatres_15"
_ = m << gf.components.rectangle(size=size_actives, layer=LAYER.FLOORPLAN)
return write_mask_gds_with_metadata(m)


if __name__ == "__main__":
c = test_ring_heater()
gf.show(c)

0 comments on commit dfae871

Please sign in to comment.