Mach-Zehnder Interferometer¶
This example shows the design of a simple Mach-Zehnder interferometer (MZI) to demonstrate the use of sub-components to simplify the process. It also shows the use of (semi-)analytical models to help with system-level design when coupled to circuit and FDTD models.
We will start by setting the default project technology with the basic_technology function. We choose a narrower strip core width so that the waveguide mode is less confined, which facilitates coupling to adjacent waveguides, allowing us to design a more compact directional coupler.
[1]:
import numpy as np
import photonforge as pf
from matplotlib import pyplot as plt
[2]:
tech = pf.basic_technology(strip_width=0.45)
pf.config.default_technology = tech
lda = np.linspace(1.5, 1.6, 51)
freqs = pf.C_0 / lda
Directional Coupler¶
The MZI will be composed by 2 directional couplers connected by waveguides with different lengths to produce an interference pattern. Ideally, the directional couplers should provide a power split ratio of 50% to each output.
Before starting, we get the core width from the selected port specification to use as parameters in our geometry. We ignore the offset in the path profile because we know that the strip port has no off-center paths.
[3]:
port_spec = pf.config.default_technology.ports["Strip"]
core_width, _ = port_spec.path_profile_for("WG_CORE")
The directional coupler is created from the dual_ring_coupler parametric component.
[4]:
# Set our default radius
pf.config.default_radius = 3
coupler = pf.parametric.dual_ring_coupler(
port_spec=port_spec,
euler_fraction=0.5,
coupling_distance=core_width + 0.1,
coupling_length=2.5,
tidy3d_model_kwargs={
# These symmetries are not correct for arbitrary ports.
# They can be used in this case for the fundamental mode.
"port_symmetries": [
("P0", "P1", {"P1": "P0", "P2": "P3", "P3": "P2"}),
("P0", "P2", {"P1": "P3", "P2": "P0", "P3": "P1"}),
("P0", "P3", {"P1": "P2", "P2": "P1", "P3": "P0"}),
],
},
name="COUPLER",
)
coupler
[4]:
We inspect the S parameters of the coupler we have just created using the plot utility. The dimensions of the directional coupler were selected to give 50% power split ratio around the central wavelength by simple parameter sweeping and interpolation. That process is quite straightforward once we have the component parameterized in a function as we did, so we will not cover it in this example.
[5]:
_ = pf.plot_s_matrix(coupler.s_matrix(freqs), input_ports=["P0"])
Starting...
Loading cached simulation from .tidy3d/pf_cache/N4H/fdtd_info-6NJZB64CYUZZPLZIO5VKWNBUCVY2ZSZ3643PAZOK22Q3FYCUFPGA.json.
Progress: 100%
Delay Arm¶
The next component we want to design is a single interferometer arm. The key MZI parameter controlled by the arms is their length difference. Because waveguide bends can have a different effective index from straight sections, we will design the arms to have a constant number of bends and include the path difference in straight sections. We are not too worried about creating a compact design, so we will target simplicity in this example.
The arm will use a parametric bend and straight waveguide sections based on the extra_length
argument. References to them will be included in the main component, so they will become sub-components of the delay arm.
Each sub-component reference is positioned by connecting one of its ports to another already-positioned reference. That way, there’s no need to keep track of the exact coordinates of each sub-component in the layout and the connections between waveguide terminations is guaranteed.
Because the arm is built from independent sub-components (straight and bent waveguide sections), we can use a circuit model for computation of its S parameters instead of a full FDTD simulation run.
[6]:
# We need a 180° bend component for the delay arm
bend = pf.parametric.bend(
port_spec=port_spec,
euler_fraction=0.5,
angle=180,
name="BEND",
)
def delay_arm(extra_length):
if extra_length < 0:
raise NotImplementedError("Argument 'extra_length' cannot be negative.")
# We will use 2 arms, so let's make sure they have different names
arm = pf.Component(f"DELAY_ARM_{extra_length}")
straight = pf.parametric.straight(
port_spec=port_spec,
length=extra_length / 2,
name=f"DELAY_STRAIGHT_{extra_length}",
)
ref1 = arm.add_reference(straight)
ref2 = arm.add_reference(bend).connect("P0", ref1["P1"])
ref3 = arm.add_reference(straight).connect("P0", ref2["P1"])
arm.add_port(ref1["P0"])
arm.add_port(ref3["P1"])
arm.add_model(pf.CircuitModel(), "Circuit")
# We don't need to keep 0-length straight sections
if extra_length == 0:
arm.remove(ref1, ref3)
return arm
arm = delay_arm(extra_length=5)
arm
[6]:
The interdependence between components and sub-components can be inspected through the references of a component, or, more directly, with the dependencies function. The former will only list the direct references placed in the component, whereas the former will collect all sub-components directly or indirectly used by the parent component.
[7]:
print(f'References in "{arm.name}"')
for reference in arm.references:
print(f"- {reference}")
print(f'\nDependencies of "{arm.name}"')
for sub_component in arm.dependencies():
print(f"- {sub_component}")
References in "DELAY_ARM_5"
- Reference to "DELAY_STRAIGHT_5" at (0, 0)
- Reference to "BEND" at (2.5, 0)
- Reference to "DELAY_STRAIGHT_5" at (2.5, 6)
Dependencies of "DELAY_ARM_5"
- Component "DELAY_STRAIGHT_5"
- Component "BEND"
Circuit Model Evaluation¶
We can verify that the circuit model is properly set in the delay arm by getting its netlist. If any internal or external ports are disconnected, a warning message will let us know so that we can go back and fix the problem. The information returned in the netlist can be useful to verify that all intended connections are in place for layout verification, but that is not the topic of this example.
[8]:
arm.get_netlist()
[8]:
{'instances': [Reference(component="DELAY_STRAIGHT_5", origin=(0, 0), rotation=0, scaling=1, x_reflection=False, repetition=Repetition(columns=1, rows=1, spacing=(0, 0))),
Reference(component="BEND", origin=(2.5, 0), rotation=0, scaling=1, x_reflection=False, repetition=Repetition(columns=1, rows=1, spacing=(0, 0))),
Reference(component="DELAY_STRAIGHT_5", origin=(2.5, 6), rotation=180, scaling=1, x_reflection=False, repetition=Repetition(columns=1, rows=1, spacing=(0, 0)))],
'ports': {(0, 'P0', 1): 'P0', (2, 'P1', 1): 'P1'},
'connections': [((0, 'P1', 1), (1, 'P0', 1)), ((1, 'P1', 1), (2, 'P0', 1))],
'virtual connections': []}
We can see the circuit simulation in action by plotting the S parameters of the delay arm. Note that only 2 mode solver simulations are required for the sub-components, because both the bend and straight sections use waveguide models. Connecting them through the circuit model requires a few mode solver runs to properly account for the phase and polarization of the mode profiles in rotated and flipped references.
[9]:
_ = pf.plot_s_matrix(arm.s_matrix(freqs), y="phase")
Starting...
Loading cached simulation from .tidy3d/pf_cache/F7S/ms_info-S7TVRWURCEQMXIAGXEDDTXJDUFDBNN6GFFVME4TDM7JA5XREMEQQ.json.
Loading cached simulation from .tidy3d/pf_cache/HE2/ms_info-D73O553WJYDAZBFPJYQEO3JFJOT7F23KO2JP4EDLSHDWETLF6KWQ.json.
Loading cached simulation from .tidy3d/pf_cache/DGC/ms_info-DEMSGU6JXV4KP55GBIFMHAKTE2M2IRIKUQRMGX54WH5QMO55TGAA.json.
Loading cached simulation from .tidy3d/pf_cache/VCB/ms_info-M6RSYEND4I46MW2AX454IQ2UYAZDEGLYE2SBHEDOMCJ7XU7QONHA.json.
Loading cached simulation from .tidy3d/pf_cache/7N3/ms_info-BOHDSYCDCYMPSYDPPOZQBWBQIZEA25H2EOAQVUQD7PMDZPQODCOQ.json.
Progress: 100%
Complete MZI¶
Now we can use the directional coupler and delay arms to create the complete MZI. Similarly to the arms, the complete MZI can be simulated with a circuit models, because it is composed exclusively by independent sub-components. That can save on computation time, especially if the S parameters for some or all of the sub-components are already cached, as is the case with the directional coupler that we have simulated before.
[10]:
def single_mzi(length_difference):
reference_arm = delay_arm(extra_length=0)
delay_arm_ = delay_arm(extra_length=abs(length_difference))
if length_difference == 0:
upper_arm = reference_arm
lower_arm = reference_arm
elif length_difference < 0:
upper_arm = reference_arm
lower_arm = delay_arm_
else:
upper_arm = delay_arm_
lower_arm = reference_arm
mzi = pf.Component("MZI")
ref1 = mzi.add_reference(coupler)
ref2 = mzi.add_reference(lower_arm).connect("P0", ref1["P2"])
ref3 = mzi.add_reference(upper_arm).connect("P1", ref1["P3"])
ref4 = mzi.add_reference(coupler).connect("P0", ref2["P1"])
mzi.add_port([ref1["P0"], ref1["P1"], ref4["P2"], ref4["P3"]])
mzi.add_model(pf.CircuitModel(), "Circuit")
return mzi
mzi = single_mzi(length_difference=5)
mzi
[10]:
Circuit Model Evaluation¶
Now we compute the S parameters through the circuit model and plot them for inspection. Note that no FDTD simulations are run, because all required simulations have already been cached.
[11]:
s_circuit = mzi.s_matrix(freqs)
_ = pf.plot_s_matrix(s_circuit, input_ports=["P0"])
Starting...
Loading cached simulation from .tidy3d/pf_cache/OMC/ms_info-VB4SEEZ2ZBSXS3I4WZFRLCFQ6V6Y2WKL36QZTLN2K3AWHES7K5HA.json.
Loading cached simulation from .tidy3d/pf_cache/IIE/ms_info-EHTTB6QPSQXU5NQDOABMFQHSENTIFYLH7YULAUDNRFPPP6BDS73Q.json.
Loading cached simulation from .tidy3d/pf_cache/7JU/ms_info-GJG7MHEPL2UFXD7VZ7E7A5WL5UW2DENMBEA3NCH7YNPMJ3ZUU2QA.json.
Loading cached simulation from .tidy3d/pf_cache/FQG/ms_info-OYV7WMNCV6H2JE3C7LXDOYANLOT4VH7XRMQOUVHCOQVQCAFCEVCQ.json.
Progress: 100%
Tidy3D Model Comparison¶
For the sake of comparison, we can add a Tidy3D model to the MZI and compare the responses.
[12]:
port_symmetries = [
("P0", "P2", {"P1": "P3", "P2": "P0", "P3": "P1"}),
("P1", "P3", {"P0": "P2", "P2": "P0", "P3": "P1"}),
]
mzi.add_model(pf.Tidy3DModel(port_symmetries=port_symmetries, verbose=True), "Tidy3D")
print("MZI models:", ", ".join(mzi.models))
MZI models: Tidy3D, Circuit
[13]:
s_tidy3d = mzi.s_matrix(freqs)
Starting...
Loading cached simulation from .tidy3d/pf_cache/QWB/fdtd_info-CRBVJNPWOI7JKSWLTP2NER7S5J66BORDRZX6I3D2X6LYX6WIZAIA.json.
Loading cached simulation from .tidy3d/pf_cache/QWB/fdtd_info-ZOK3KPJ75DYLXZ7PESD3E3Y3APNO5XEFWQGX7R5DH5Y2PEMJNWZQ.json.
Progress: 100%
We plot both responses together to see the level of agreement between them.
[14]:
fig, ax = plt.subplots(1, 2, figsize=(12, 4), tight_layout=True)
for i, in_port in enumerate(["P0", "P1"]):
for out_port in ["P2", "P3"]:
key = (f"{in_port}@0", f"{out_port}@0")
lines = ax[i].plot(lda, np.abs(s_tidy3d[key]) ** 2, "-")
ax[i].plot(
lda,
np.abs(s_circuit[key]) ** 2,
".",
mfc=lines[0].get_color(),
mec=lines[0].get_color(),
)
ax[i].set_xlabel("Wavelength (μm)")
ax[i].set_ylabel("|S|²")
ax[i].set_ylim(0, None)
ax[i].set_title(f"Input {in_port}")
_ = ax[0].legend(["Tidy3D", "Circuit"])
Semi-Analytical Design Exploration¶
We want to explore the effect of the path difference in our MZI period. The straightforward option is to try a few values of length_difference
and check the S parameters from the circuit model, which will require only the FDTD simulation of the new straight section, which is quite fast in Tidy3D.
However, there is an even faster approach. Instead of using a Tidy3D model for the section we are varying, we can use a semi-analytical waveguide model. It uses the effective index of the port modes to model the propagation in a straight waveguide. The effective index can be preset by us, or automatically calculated with Tidy3D’s mode solver.
The straight section already includes a waveguide model (inactive, by default), and it uses the physical section length to compute the propagation model. What we can do instead, is set the model length to any desired value without changing the layout. The model will no longer correspond to the physical layout, but it will give us the S parameters for an equivalent MZI with the specified path length difference for fast exploration.
We start by selecting the straight section we want to modify from the list of sub-components of the MZI:
[15]:
print("MZI sub-components:")
sub_components = mzi.dependencies()
for c in sub_components:
print(f"- {c.name}")
MZI sub-components:
- COUPLER
- BEND
- DELAY_ARM_5
- DELAY_ARM_0
- DELAY_STRAIGHT_5
We’re interested in the “DELAY_STRAIGHT_5”, which is the straight section of the 5 μm delay arm (the actual path length is half of that, because the extra straight section is used twice). We select the desired component and change its active model to the waveguide model.
Not that the model has both n_complex
and length
set to None
, which means they are automatically computed based on the component’s ports. We will override lenght
to the virtual value we want to test.
[16]:
for c in sub_components:
if c.name == "DELAY_STRAIGHT_5":
straight = c
break
straight.activate_model("Waveguide")
model = straight.active_model
model
[16]:
WaveguideModel(n_complex=None, length=None, mesh_refinement=None, verbose=True)
We can update the model in place with Model.update by passing it the new keyword arguments we want the model to use.
For example, if we set the path length difference to 0, we expect full transmission from P0 to P3, except from losses and reflections, as we see next.
[17]:
model.update(length=0)
mzi.activate_model("Circuit")
_ = pf.plot_s_matrix(mzi.s_matrix(freqs), input_ports=["P0"])
Starting...
Progress: 100%
By comparing this semi-analytical model with the full FDTD run, we see again a very good match.
[18]:
model.update(length=5.0 / 2)
s_analytical = mzi.s_matrix(freqs)
fig, ax = plt.subplots(1, 2, figsize=(12, 4), tight_layout=True)
for i, in_port in enumerate(["P0", "P1"]):
for out_port in ["P2", "P3"]:
key = (f"{in_port}@0", f"{out_port}@0")
lines = ax[i].plot(lda, np.abs(s_tidy3d[key]) ** 2, "-")
ax[i].plot(
lda,
np.abs(s_analytical[key]) ** 2,
".",
mfc=lines[0].get_color(),
mec=lines[0].get_color(),
)
ax[i].set_xlabel("Wavelength (μm)")
ax[i].set_ylabel("|S|²")
ax[i].set_ylim(0, None)
ax[i].set_title(f"Input {in_port}")
_ = ax[0].legend(["Tidy3D", "Semi-analytical"])
Starting...
Progress: 100%
Because the mode solver run required to calculate the effective index for the waveguide mode is cached, we can inspect the effects of the path difference extremely fast. In Jupyter, we can use an interactive control to see those change almost live (the widget is only visible in a live notebook session):
[19]:
from ipywidgets import FloatSlider, interactive
def update_and_plot(Δl):
model.update(length=Δl / 2)
pf.plot_s_matrix(mzi.s_matrix(freqs), input_ports=["P0"])
interactive(update_and_plot, Δl=FloatSlider(min=0, max=20, continuous_update=False))
[19]:
Once we’ve finished our exploration we can go back to the original model with the desired parameters so that we can, for example, export a GDSII layout of the final device. We can also store a PhotonForge project file that can be imported in the web UI or shared.
[20]:
final_mzi = single_mzi(length_difference=10)
# Export GDSII layout
final_mzi.write_gds()
# Save PhotonForge project file
pf.write_phf("MZI.phf", final_mzi)
Monte Carlo and Corner Case Analyses¶
Running Monte Carlo or corner case analyses can be done by simply defining the random variables we want to include and selecting the number of samples to compute using the s_matrix function in the monte_carlo
sub module.
We can test, for example, the corner cases of our final device with respect to variations in the core layer thickness and sidewall angle, which are 2 pre-defined variables for the basic technology.
[21]:
tech.random_variables
[21]:
[RandomVariable('core_thickness', **{'value': 0.22, 'stdev': 0.002}),
RandomVariable('slab_thickness', **{'value': 0.07, 'stdev': 0.005}),
RandomVariable('clad_thickness', **{'value': 1.0, 'stdev': 0.05}),
RandomVariable('box_thickness', **{'value': 1.0, 'stdev': 0.05}),
RandomVariable('mask_dilation', **{'value': 0.0, 'stdev': 0.005}),
RandomVariable('sidewall_angle', **{'value': 0.0, 'stdev': 2.0})]
[22]:
variables, results = pf.monte_carlo.s_matrix(
final_mzi,
freqs,
("core_thickness", tech),
("sidewall_angle", tech),
corner_samples=4,
random_seed=0,
)
Sample 1 of 4...Loading cached simulation from .tidy3d/pf_cache/N4H/fdtd_info-R5ZRYSGS6LMKBBU64FCISNUI7T42D3THG5TJVDXKELQ7B2RHDE7Q.json.
Loading cached simulation from .tidy3d/pf_cache/RIB/ms_info-OR5CILD7KJKCUPO2J42ZXFM7I4OVK5OPFIKELZES2MAIOSXEEKXQ.json.
Loading cached simulation from .tidy3d/pf_cache/IXW/ms_info-3DYIJK4OCBIONLLMSPRFNWKO3P3Y2I35LKH5ESJAJIPQT4EKQRLQ.json.
Loading cached simulation from .tidy3d/pf_cache/46Y/ms_info-TO4LXW4CH2UYF26F27B6BF54Y3BC66TDI3ZCA4AJTHJ3YKMIL6EA.json.
Loading cached simulation from .tidy3d/pf_cache/3VF/ms_info-JEWMCUM2SGGCBIC6URMCEMO6PHFA43JW7AVZUIBQXUYV26K7QUEA.json.
Loading cached simulation from .tidy3d/pf_cache/JTB/ms_info-G2ZW6CNIV4VEBGG74MVSUDDKE477CSR3GS2NWES4J3HDZFLARRSQ.json.
Loading cached simulation from .tidy3d/pf_cache/NDR/ms_info-TBAMGRNX5M3ECLBLX5Q3CSNHNB6HSACI7SA7RRLXDBK2W5ZR6AQQ.json.
Loading cached simulation from .tidy3d/pf_cache/ZEL/ms_info-HYDFLVNBH3OG3AY5RJMXNEJCADKPZ7VP27RNY3CORRO6ZUMOZXUA.json.
Loading cached simulation from .tidy3d/pf_cache/GH4/ms_info-OPIPGC2EHLI5YUMTZYVANLGQD7G7NAUSJUAXPITEVMC5CR7FIPZQ.json.
Loading cached simulation from .tidy3d/pf_cache/GRX/ms_info-PZVFKMXRUZXVMC3F6TC3KCJUSIMU7JAX66O6UIXD73VNVR2UG7IA.json.
Sample 2 of 4...Loading cached simulation from .tidy3d/pf_cache/N4H/fdtd_info-KAEA7SZVJ57ECARYD6RK4B5OUVSCDYZZEJF26XT3J4UEBCVDGE5A.json.
Loading cached simulation from .tidy3d/pf_cache/XFL/ms_info-JJGNFCVPB4ARJH4IPKESVZYMU7KJLNO4DANVSFUQL4HI7VJQZITA.json.
Loading cached simulation from .tidy3d/pf_cache/ZM5/ms_info-SSGWR6YWO4FB5VWJQ23P55SLHDKNZ2OGI2Y3BIA4XSJOJF3QXGUA.json.
Loading cached simulation from .tidy3d/pf_cache/O6Z/ms_info-PR3WU5URL4D6OZILWZYNIRDN22GULM4IZTE64KYC3G7D2WFRX24Q.json.
Loading cached simulation from .tidy3d/pf_cache/FEH/ms_info-PTRO5BJWGGOCTUE4CS23MJJ37YILSL64FBGACO47BMJY7RQUNMJQ.json.
Loading cached simulation from .tidy3d/pf_cache/MS7/ms_info-PO5PTTOMBF5ECCN2ICPG5NWXWZZL65266TOBNM3BH74QO3IMJ37A.json.
Loading cached simulation from .tidy3d/pf_cache/4SV/ms_info-DM2GWP32TMCDMX5CIZMD6OJW36XNEX7TR5BUMCWGLYVG54LD3JSA.json.
Loading cached simulation from .tidy3d/pf_cache/FSY/ms_info-P4GQW77XSG6OLHBRLZ7LQAL4V2GCLIUHMTQWRK4GJ6KQRLCQFTUQ.json.
Loading cached simulation from .tidy3d/pf_cache/TZI/ms_info-FCYK3D5NEP56TUYVW6WJQLLIC4TYQVK4EVNQXAM7NGG7U4X7PAHQ.json.
Loading cached simulation from .tidy3d/pf_cache/Y5L/ms_info-DTRNSPD34PYU5272HXQPVL3C66N4O7KRDWLOT6JKBTGY7IS7YVXA.json.
Sample 3 of 4...Loading cached simulation from .tidy3d/pf_cache/N4H/fdtd_info-7CCEY2GTQ3RTX2DVLHJBAOYVSTTZ4E25PF6M3XARCQX76MZFVLOQ.json.
Loading cached simulation from .tidy3d/pf_cache/GQM/ms_info-UGCAYAEG52XRY3TXU7MGZPUR3DOKJQQCCN774OQ376BG3AYISRQQ.json.
Loading cached simulation from .tidy3d/pf_cache/Q3E/ms_info-YCEHT4QKMB6K56GGTLNWHRJOY4ZBFMTPQAZGJE5JULPSWB7RDIMA.json.
Loading cached simulation from .tidy3d/pf_cache/YBX/ms_info-JUHN3SMB3A3LTCZPZX3PWLWZ77MKP7SON2MBEBTR467UHPJKHHPQ.json.
Loading cached simulation from .tidy3d/pf_cache/ZMP/ms_info-ZFP3VO5S4TQOEY5JMJO2HIOCYHMTPEJEQ4LKT3JU7VBYJW4RJ4SA.json.
Loading cached simulation from .tidy3d/pf_cache/I3H/ms_info-7M2ZADH6OGLEQONQFFPBLPFKHQ777IKMZTWF7ABT73XWATWUX5PA.json.
Loading cached simulation from .tidy3d/pf_cache/DN2/ms_info-GJMCYOQ2PUMM7N6Z6WFS2YJI2J2NHCPOE4SE7AJLUA2WAILCBYWQ.json.
Loading cached simulation from .tidy3d/pf_cache/Q6C/ms_info-5KTBANMWEUZPN7EWGAYK4ALAMZ6DBB7FSAYKE5GQA5ZDQ5H7Z23A.json.
Loading cached simulation from .tidy3d/pf_cache/VDM/ms_info-EO54IBCVHDAKUSNL7C4WVUG6BZNVC75HXCHQSEYDOR4P75MD252A.json.
Loading cached simulation from .tidy3d/pf_cache/3FT/ms_info-H7CCH4GX5MFNKUWQQFOKSBQSDTQZ4S6QXJNUZ6HIMGDA6CLLDVEA.json.
Sample 4 of 4...Loading cached simulation from .tidy3d/pf_cache/N4H/fdtd_info-ZGRSOUMTERJPTHSNAAGEFKBZVXFEVOQIAUX3RCBRIMIJOWO6AB5A.json.
Loading cached simulation from .tidy3d/pf_cache/DFW/ms_info-GZSNKYWO35QLNRWFFLMMKS4YICTYOJRDTHUGJTPWGGXDVF2V5PRQ.json.
Loading cached simulation from .tidy3d/pf_cache/E2H/ms_info-5QZK53J2QZ4J7ECV72UCJPC4VKFTYLY7KFNM2Z7XUFFY4CEI2RRA.json.
Loading cached simulation from .tidy3d/pf_cache/FCS/ms_info-4ZH57OMPD3ZFSQZYDFGRRQKAWBDS2GFQBS4UD33E2T4LEFMSS3TQ.json.
Loading cached simulation from .tidy3d/pf_cache/Y7S/ms_info-W47ECXG2L4WE562MN42A4M4Y64RRFGL7ITTZDJHUEHU5AGBQK2BA.json.
Loading cached simulation from .tidy3d/pf_cache/DK7/ms_info-FAEA575TXTU2UU6PC5EGJPJ5SA3H4BQXY4IL4FDPA2VMOICYCCKA.json.
Loading cached simulation from .tidy3d/pf_cache/4US/ms_info-IGDJGWBNVWERI2FKL6ZFJILQESRXCQOMMHL5JGXTLAVH6YUEGIJQ.json.
Loading cached simulation from .tidy3d/pf_cache/SI6/ms_info-WJ24F55XOCP66OYFELFGKSUALLJ7QQGTHOKS6FWLTUMIBWGGE3DA.json.
Loading cached simulation from .tidy3d/pf_cache/KS2/ms_info-T76MT5S5Z2IX2RHQVHJQKUZG4HPQL42O6RINWF4VBQOEQF7TUGRQ.json.
Loading cached simulation from .tidy3d/pf_cache/YXR/ms_info-XNOSHVSEEF53N5QU4SEVZ5SIRZLV46ZXP2EISHIZJTKJLS6YF76Q.json.
done!
[23]:
fig, ax = plt.subplots(1, 1, figsize=(5, 3.5), tight_layout=True)
for *_, s in results:
ax.plot(lda, np.abs(s[("P0@0", "P2@0")]) ** 2)
ax.set_xlabel("Wavelength (μm)")
_ = ax.set_ylabel("|S₂₀|²")