Skip to content

Commit 4a89d9e

Browse files
committed
Week 4: ring resonators focus + HW04 problem set
1 parent a4ea47c commit 4a89d9e

7 files changed

Lines changed: 242 additions & 67 deletions

File tree

marimo_course.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def _(mo):
4141
- **Week 3 (Jan 19–23)** – MZI verification workflow
4242
Local DRC/verification in KLayout; DFT and CI checks for openEBL.
4343
44-
- **Week 4 (Jan 26–30)** – Ring resonators + adding extra structures
45-
Add rings and other useful test structures; keep a clean, probe-friendly floorplan.
44+
- **Week 4 (Jan 26–30)** – Ring resonators
45+
Ring resonator intuition, design knobs, and layout patterns.
4646
4747
- **Week 5 (Feb 2–6)** – GitHub and openEBL checks
4848
Forking `openEBL-2026-02`, CI checks, and artifact-based debugging.

marimo_course/assignments/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ Assignments in this repo:
99
- `marimo_course/assignments/hw02_mzi_modelling.py`
1010
- `marimo_course/assignments/hw02_mzi_layout.py`
1111
- `marimo_course/assignments/hw03_drc_debugging.py`
12+
- `marimo_course/assignments/hw04_ring_resonators.py`
Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
#!/usr/bin/env python3
2+
# /// script
3+
# requires-python = ">=3.11,<3.13"
4+
# dependencies = [
5+
# "marimo>=0.18.0",
6+
# "pyzmq",
7+
# "simphony==0.7.3",
8+
# "jax[cpu]",
9+
# "sax",
10+
# "matplotlib",
11+
# ]
12+
# ///
13+
14+
import marimo
15+
16+
__generated_with = "0.19.6"
17+
app = marimo.App()
18+
19+
20+
@app.cell(hide_code=True)
21+
def _():
22+
import marimo as mo
23+
from _assignment_template import _ensure_lessons_on_path, load_lesson_template
24+
25+
from textwrap import dedent as _dedent
26+
27+
_ensure_lessons_on_path()
28+
inject_css, _make_doc_helpers, _make_health_refresh_button, header = load_lesson_template()
29+
inject_css(mo)
30+
31+
header(
32+
mo,
33+
title="HW04 — Ring resonators (Simphony + design)",
34+
subtitle=(
35+
"Simulate ring resonators, measure FSR and Q, and design an add-drop ring."
36+
),
37+
badges=["Week 4", "Homework", "Rings", "Simphony"],
38+
toc=[
39+
("Overview", "overview"),
40+
("Part A — Simulate 3 radii + measure FSR", "part-a"),
41+
("Part B — Design for target FSR + estimate m", "part-b"),
42+
("Part C — Add-drop ring + critical coupling + Q", "part-c"),
43+
("Part D — Layout add-drop filter + DRC", "part-d"),
44+
("Submission", "submit"),
45+
],
46+
build="2026-01-28",
47+
)
48+
49+
mo.callout(mo.md("Problem set (no solutions)."), kind="info")
50+
51+
mo.md(
52+
_dedent(
53+
r"""
54+
<a id="overview"></a>
55+
## Overview
56+
57+
Four tasks:
58+
1. Simulate a ring resonator (3 radii) and measure the FSR.
59+
2. Design a ring for a target FSR and estimate the mode number near 1550 nm.
60+
3. Design an add-drop ring, attempt critical coupling, and estimate Q.
61+
4. Lay out an add-drop filter with grating couplers and pass DRC.
62+
"""
63+
).strip()
64+
)
65+
return mo
66+
67+
68+
@app.cell(hide_code=True)
69+
def _(mo):
70+
from textwrap import dedent as _dedent
71+
72+
mo.md(
73+
_dedent(
74+
r"""
75+
<a id="part-a"></a>
76+
## Part A — Simulate 3 radii, measure FSR
77+
78+
Simulate an ideal all-pass ring resonator in Simphony for three radii.
79+
From the plots, measure the FSR near 1550 nm and compare to the analytic result from class.
80+
"""
81+
).strip()
82+
)
83+
return
84+
85+
86+
@app.cell
87+
def _(mo):
88+
from textwrap import dedent as _dedent
89+
90+
mo.md(
91+
_dedent(
92+
r"""
93+
### Part A deliverables
94+
95+
- Plot transmission vs wavelength for 3 radii.
96+
- Report measured FSR for each radius.
97+
- Report analytic FSR for each radius and percent error.
98+
99+
Helpful imports:
100+
101+
```python
102+
from jax import config
103+
config.update("jax_enable_x64", True)
104+
105+
import jax.numpy as jnp
106+
import sax
107+
from simphony.libraries import ideal
108+
import matplotlib.pyplot as plt
109+
```
110+
"""
111+
).strip()
112+
)
113+
return
114+
115+
116+
@app.cell
117+
def _(mo):
118+
from textwrap import dedent as _dedent
119+
120+
mo.md(
121+
_dedent(
122+
r"""
123+
Record your results in a table (R, measured FSR, analytic FSR, percent error).
124+
"""
125+
).strip()
126+
)
127+
return
128+
129+
130+
@app.cell(hide_code=True)
131+
def _(mo):
132+
from textwrap import dedent as _dedent
133+
134+
mo.md(
135+
_dedent(
136+
r"""
137+
<a id="part-b"></a>
138+
## Part B — Design for target FSR
139+
140+
Pick a target FSR near 1550 nm. Choose a ring radius that meets it (first pass),
141+
then estimate the mode number near 1550 nm (m).
142+
"""
143+
).strip()
144+
)
145+
return
146+
147+
148+
@app.cell
149+
def _(mo):
150+
from textwrap import dedent as _dedent
151+
152+
mo.md(
153+
_dedent(
154+
r"""
155+
### Part B deliverables
156+
157+
- Target FSR and chosen radius.
158+
- Estimated m near 1550 nm (value + nearest integer).
159+
"""
160+
).strip()
161+
)
162+
return
163+
164+
165+
@app.cell(hide_code=True)
166+
def _(mo):
167+
from textwrap import dedent as _dedent
168+
169+
mo.md(
170+
_dedent(
171+
r"""
172+
<a id="part-c"></a>
173+
## Part C — Add-drop ring + critical coupling + Q
174+
175+
Design an **add-drop ring resonator** and simulate both **through** and **drop** ports.
176+
177+
Goals:
178+
- Adjust coupling to attempt **critical coupling** (largest on-resonance extinction in the through port).
179+
- Estimate the **loaded Q** from your simulated spectrum (from the linewidth).
180+
- Compare your measured Q to an analytic estimate from class.
181+
182+
### Part C deliverables
183+
184+
- Through + drop spectra for your add-drop ring (axes labeled).
185+
- A short note describing how you tuned coupling and whether you achieved near-critical coupling.
186+
- Q from the plot and your analytic Q estimate (with assumptions stated).
187+
"""
188+
).strip()
189+
)
190+
return
191+
192+
193+
@app.cell(hide_code=True)
194+
def _(mo):
195+
from textwrap import dedent as _dedent
196+
197+
mo.md(
198+
_dedent(
199+
r"""
200+
<a id="part-d"></a>
201+
## Part D — Layout add-drop filter + DRC
202+
203+
Lay out an **add-drop ring filter** with **grating couplers** (input, through, drop).
204+
Export a GDS and make sure it passes all DRC checks.
205+
206+
### Part D deliverables
207+
208+
- GDS of your add-drop filter with grating couplers.
209+
- A DRC report showing 0 items.
210+
- A screenshot of the layout.
211+
"""
212+
).strip()
213+
)
214+
return
215+
216+
217+
@app.cell(hide_code=True)
218+
def _(mo):
219+
from textwrap import dedent as _dedent
220+
221+
mo.md(
222+
_dedent(
223+
r"""
224+
<a id="submit"></a>
225+
## Submission
226+
227+
Submit your plots/calculations (Parts A, B, C) and your layout artifacts (Part D).
228+
"""
229+
).strip()
230+
)
231+
return
232+
233+
234+
if __name__ == "__main__":
235+
app.run()

marimo_course/lessons/_style.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,4 +232,5 @@ def header(
232232
</div>
233233
"""
234234

235-
return mo.vstack([mo.md(hero), mo.md(toc_html)])
235+
# Dedent to avoid markdown treating the HTML as a code block.
236+
return mo.vstack([mo.md(dedent(hero).strip()), mo.md(dedent(toc_html).strip())])

marimo_course/lessons/w01_orientation_tooling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def _(date, timedelta):
168168
1: "Orientation and tooling",
169169
2: "PDKs and basic MZI layout",
170170
3: "MZI verification workflow",
171-
4: "Routing and floorplanning",
171+
4: "Ring resonators",
172172
5: "Submission workflow and CI checks",
173173
6: "Submission buffer and bridge to theory",
174174
7: "Waveguide fundamentals",

marimo_course/lessons/w03_verification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2273,7 +2273,7 @@ def _(mo, show_klayout):
22732273
mo.md(r"""
22742274
### What's Next
22752275
2276-
- **Week 4**: Advanced layout techniques and routing discipline
2276+
- **Week 4**: Ring resonators
22772277
- **Homework**: Implement the verification workflow on your own MZI design
22782278
- **Resources**:
22792279
- [SiEPIC-EBeam PDK Documentation](https://github.com/SiEPIC/SiEPIC_EBeam_PDK)

marimo_course/lessons/w04_routing_and_floorplanning.py

Lines changed: 0 additions & 62 deletions
This file was deleted.

0 commit comments

Comments
 (0)