Skip to content

Commit

Permalink
Deploying to gh-pages from @ f47b880 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
parkeraa committed Jan 29, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent b8d037e commit cf2adf5
Showing 10 changed files with 134 additions and 27 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
98 changes: 85 additions & 13 deletions _sources/pages/mzi_layout.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pages/directional_couplers.html
Original file line number Diff line number Diff line change
@@ -565,8 +565,8 @@ <h3>Coupling length and the gap between waveguides<a class="headerlink" href="#c
\]</div>
<p>Because of this difference in propagation constants, the modes travel at different speeds down the waveguide and so the field intensity oscillates between the two waveguides. This is called beating. One beat is equivalent to the coupling length, or cross-over length, and it is the length it takes for all of the power from one waveguide to be coupled into the other. As the gap between the waveguides gets smaller, the beating gets faster since <span class="math notranslate nohighlight">\(\Delta n\)</span> gets larger, making the cross-over length shorter.</p>
<p>This cross-over length <span class="math notranslate nohighlight">\(L\)</span>, that gives 100% power transfer is found with:</p>
<div class="amsmath math notranslate nohighlight" id="equation-1e19506a-2b09-4203-90b4-a0d852d9b99d">
<span class="eqno">(2)<a class="headerlink" href="#equation-1e19506a-2b09-4203-90b4-a0d852d9b99d" title="Permalink to this equation">#</a></span>\[\begin{align}
<div class="amsmath math notranslate nohighlight" id="equation-e6f927c5-5175-4159-99ce-d74a91ea5de5">
<span class="eqno">(2)<a class="headerlink" href="#equation-e6f927c5-5175-4159-99ce-d74a91ea5de5" title="Permalink to this equation">#</a></span>\[\begin{align}
L_{\text{cross-over}} = \frac {\lambda}{2\Delta n} \nonumber
\end{align}\]</div>
<p>This is found from determining what length when multiplied by the propagation constants makes the phase difference <span class="math notranslate nohighlight">\(\pi\)</span>:</p>
57 changes: 46 additions & 11 deletions pages/mzi_layout.html
Original file line number Diff line number Diff line change
@@ -324,10 +324,10 @@ <h1>Laying out a Mach-Zehnder Interferometer<a class="headerlink" href="#laying-
</div>
</div>
<div class="cell_output docutils container">
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span><span class="-Color -Color-Green">2024-01-26 14:59:56.805</span> | <span class="-Color -Color-Bold">INFO </span> | <span class="-Color -Color-Cyan">gdsfactory.technology.layer_views</span>:<span class="-Color -Color-Cyan">__init__</span>:<span class="-Color -Color-Cyan">790</span> - <span class="-Color -Color-Bold">Importing LayerViews from YAML file: '/home/parkeraa/miniconda3/envs/mp/lib/python3.11/site-packages/ubcpdk/layers.yaml'.</span>
<span class="-Color -Color-Green">2024-01-26 14:59:57.403</span> | <span class="-Color -Color-Bold">INFO </span> | <span class="-Color -Color-Cyan">ubcpdk</span>:<span class="-Color -Color-Cyan">&lt;module&gt;</span>:<span class="-Color -Color-Cyan">30</span> - <span class="-Color -Color-Bold">Found UBCpdk '2.3.4' installed at PosixPath('/home/parkeraa/miniconda3/envs/mp/lib/python3.11/site-packages/ubcpdk')</span>
<span class="-Color -Color-Green">2024-01-26 14:59:57.478</span> | <span class="-Color -Color-Bold">INFO </span> | <span class="-Color -Color-Cyan">gdsfactory.technology.layer_views</span>:<span class="-Color -Color-Cyan">__init__</span>:<span class="-Color -Color-Cyan">790</span> - <span class="-Color -Color-Bold">Importing LayerViews from YAML file: '/home/parkeraa/miniconda3/envs/mp/lib/python3.11/site-packages/gdsfactory/generic_tech/layer_views.yaml'.</span>
<span class="-Color -Color-Green">2024-01-26 14:59:57.482</span> | <span class="-Color -Color-Bold">INFO </span> | <span class="-Color -Color-Cyan">gdsfactory.pdk</span>:<span class="-Color -Color-Cyan">activate</span>:<span class="-Color -Color-Cyan">307</span> - <span class="-Color -Color-Bold">'ubcpdk' PDK is now active</span>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span><span class="-Color -Color-Green">2024-01-29 08:27:51.562</span> | <span class="-Color -Color-Bold">INFO </span> | <span class="-Color -Color-Cyan">gdsfactory.technology.layer_views</span>:<span class="-Color -Color-Cyan">__init__</span>:<span class="-Color -Color-Cyan">790</span> - <span class="-Color -Color-Bold">Importing LayerViews from YAML file: '/home/parkeraa/miniconda3/envs/mp/lib/python3.11/site-packages/ubcpdk/layers.yaml'.</span>
<span class="-Color -Color-Green">2024-01-29 08:27:52.715</span> | <span class="-Color -Color-Bold">INFO </span> | <span class="-Color -Color-Cyan">ubcpdk</span>:<span class="-Color -Color-Cyan">&lt;module&gt;</span>:<span class="-Color -Color-Cyan">30</span> - <span class="-Color -Color-Bold">Found UBCpdk '2.3.4' installed at PosixPath('/home/parkeraa/miniconda3/envs/mp/lib/python3.11/site-packages/ubcpdk')</span>
<span class="-Color -Color-Green">2024-01-29 08:27:52.806</span> | <span class="-Color -Color-Bold">INFO </span> | <span class="-Color -Color-Cyan">gdsfactory.technology.layer_views</span>:<span class="-Color -Color-Cyan">__init__</span>:<span class="-Color -Color-Cyan">790</span> - <span class="-Color -Color-Bold">Importing LayerViews from YAML file: '/home/parkeraa/miniconda3/envs/mp/lib/python3.11/site-packages/gdsfactory/generic_tech/layer_views.yaml'.</span>
<span class="-Color -Color-Green">2024-01-29 08:27:52.813</span> | <span class="-Color -Color-Bold">INFO </span> | <span class="-Color -Color-Cyan">gdsfactory.pdk</span>:<span class="-Color -Color-Cyan">activate</span>:<span class="-Color -Color-Cyan">307</span> - <span class="-Color -Color-Bold">'ubcpdk' PDK is now active</span>
</pre></div>
</div>
</div>
@@ -371,13 +371,13 @@ <h1>Laying out a Mach-Zehnder Interferometer<a class="headerlink" href="#laying-
<p>Now we can play around a little bit. First, we can change various lengths. We find the parameters in the <a class="reference external" href="https://gdsfactory.github.io/ubc/components_plot.html#ubcpdk.components.mzi">docs</a>. There is an ASCII drawing there that is helpful to understand what the different length parameters do.</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">mzi</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">mzi</span><span class="p">(</span><span class="n">delta_length</span><span class="o">=</span><span class="mi">10</span><span class="p">,</span> <span class="n">length_x</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">length_y</span><span class="o">=</span><span class="mi">20</span><span class="p">)</span>
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">mzi</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">mzi</span><span class="p">(</span><span class="n">delta_length</span><span class="o">=</span><span class="mi">100</span><span class="p">,</span> <span class="n">length_x</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">length_y</span><span class="o">=</span><span class="mi">20</span><span class="p">)</span>
<span class="n">mzi</span><span class="o">.</span><span class="n">plot</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<img alt="../_images/5bd0fbe20a6b31b7cccb02b191c9e663f21cd22721364d0c126027609c24afcc.png" src="../_images/5bd0fbe20a6b31b7cccb02b191c9e663f21cd22721364d0c126027609c24afcc.png"/>
<img alt="../_images/62fa2a534bc712557bf1c70de7b7345c1a2db001d5ff2d61cfc69cd9dbccc0cf.png" src="../_images/62fa2a534bc712557bf1c70de7b7345c1a2db001d5ff2d61cfc69cd9dbccc0cf.png"/>
</div>
</div>
<p>Finally, we can easily add a grating array to any component. Note that the component we want to add gratings to will be rotated so that its ports are oriented vertically. Also, though we can’t see it in the plot, adding the grating couplers also adds a label to one of the gratings, marking it as the input.</p>
@@ -396,13 +396,46 @@ <h1>Laying out a Mach-Zehnder Interferometer<a class="headerlink" href="#laying-
</div>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">component_fiber_array</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">add_fiber_array</span><span class="p">(</span><span class="n">component</span><span class="o">=</span><span class="n">mzi</span><span class="p">,</span> <span class="n">component_name</span><span class="o">=</span><span class="s1">'MyCoolMZI1'</span><span class="p">)</span>
<span class="n">component_fiber_array</span><span class="o">.</span><span class="n">plot</span><span class="p">()</span>
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">TE_MZI</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">add_fiber_array</span><span class="p">(</span><span class="n">component</span><span class="o">=</span><span class="n">mzi</span><span class="p">,</span> <span class="n">component_name</span><span class="o">=</span><span class="s1">'MyCoolMZI1'</span><span class="p">)</span>
<span class="n">TE_MZI</span><span class="o">.</span><span class="n">plot</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<img alt="../_images/efbbb472dff7ad7c42e717dba2e137bbf0c821309c1986cea80ced3ebea94445.png" src="../_images/efbbb472dff7ad7c42e717dba2e137bbf0c821309c1986cea80ced3ebea94445.png"/>
<img alt="../_images/ceef6e8f28233ab9522122a4f4571bbb52466070e4f18e6cfca9bcd2fb1f9c1a.png" src="../_images/ceef6e8f28233ab9522122a4f4571bbb52466070e4f18e6cfca9bcd2fb1f9c1a.png"/>
</div>
</div>
<p>We can also change the grating coupler to a TM coupler by passing in a TM coupler. We also can flip the direction of the mzi. This isn’t really useful for the MZI but can help us make sure the right port is the input in other cases.</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">TM_MZI</span> <span class="o">=</span> <span class="n">uc</span><span class="o">.</span><span class="n">add_fiber_array</span><span class="p">(</span><span class="n">component</span><span class="o">=</span><span class="n">mzi</span><span class="o">.</span><span class="n">rotate</span><span class="p">(</span><span class="mi">180</span><span class="p">),</span> <span class="n">grating_coupler</span><span class="o">=</span><span class="n">uc</span><span class="o">.</span><span class="n">gc_tm1550</span><span class="p">,</span> <span class="n">component_name</span><span class="o">=</span><span class="s1">'MyCoolMZITM'</span><span class="p">)</span>
<span class="n">TM_MZI</span><span class="o">.</span><span class="n">plot</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<img alt="../_images/d1a7e1df664b1e3e5992fa8e01f6c15ac021cc6a21fcf72f064132afdadd001c.png" src="../_images/d1a7e1df664b1e3e5992fa8e01f6c15ac021cc6a21fcf72f064132afdadd001c.png"/>
</div>
</div>
<p>Now we should put them together to make our ‘final’ design. We can use the <a class="reference external" href="https://gdsfactory.github.io/gdsfactory/notebooks/04_components_pack.html#distribute">distribute</a> and <a class="reference external" href="https://gdsfactory.github.io/gdsfactory/notebooks/04_components_pack.html#align">align</a> functions.</p>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">mzi_together</span> <span class="o">=</span> <span class="n">gf</span><span class="o">.</span><span class="n">Component</span><span class="p">()</span>
<span class="n">mzi_together</span><span class="o">.</span><span class="n">add_ref</span><span class="p">(</span><span class="n">TE_MZI</span><span class="p">)</span>
<span class="n">mzi_together</span><span class="o">.</span><span class="n">add_ref</span><span class="p">(</span><span class="n">TM_MZI</span><span class="p">)</span>

<span class="n">mzi_together</span><span class="o">.</span><span class="n">distribute</span><span class="p">(</span><span class="n">direction</span><span class="o">=</span><span class="s1">'x'</span><span class="p">,</span> <span class="n">spacing</span><span class="o">=</span><span class="mi">10</span><span class="p">)</span>
<span class="n">mzu_together</span> <span class="o">=</span> <span class="n">mzi_together</span><span class="o">.</span><span class="n">align</span><span class="p">(</span><span class="n">alignment</span><span class="o">=</span><span class="s1">'ymax'</span><span class="p">)</span>
<span class="n">mzi_together</span><span class="o">.</span><span class="n">plot</span><span class="p">()</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/home/parkeraa/miniconda3/envs/mp/lib/python3.11/site-packages/gdsfactory/component.py:1569: UserWarning: Unnamed cells, 1 in 'Unnamed_b83043de'
gdspath = component.write_gds(logging=False)
</pre></div>
</div>
<img alt="../_images/53579cfbce97dff92e8655f428a25885f458eb7131ed783ee0c90c708a3e218d.png" src="../_images/53579cfbce97dff92e8655f428a25885f458eb7131ed783ee0c90c708a3e218d.png"/>
</div>
</div>
<p>We can export our design using the write_gds function. If you zoom in on where the lower coupler meets the waveguide, you can see the text label. It should say:</p>
@@ -411,12 +444,14 @@ <h1>Laying out a Mach-Zehnder Interferometer<a class="headerlink" href="#laying-
</div>
<div class="cell docutils container">
<div class="cell_input docutils container">
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">component_fiber_array</span><span class="o">.</span><span class="n">write_gds</span><span class="p">(</span><span class="s2">"mzi.gds"</span><span class="p">)</span>
<div class="highlight-ipython3 notranslate"><div class="highlight"><pre><span></span><span class="n">mzi_together</span><span class="o">.</span><span class="n">write_gds</span><span class="p">(</span><span class="s2">"mzi.gds"</span><span class="p">)</span>
</pre></div>
</div>
</div>
<div class="cell_output docutils container">
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span><span class="-Color -Color-Green">2024-01-26 16:12:00.066</span> | <span class="-Color -Color-Bold">INFO </span> | <span class="-Color -Color-Cyan">gdsfactory.component</span>:<span class="-Color -Color-Cyan">_write_library</span>:<span class="-Color -Color-Cyan">1913</span> - <span class="-Color -Color-Bold">Wrote to 'mzi.gds'</span>
<div class="output stderr highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>/tmp/ipykernel_305404/1677396279.py:1: UserWarning: Unnamed cells, 1 in 'Unnamed_b83043de'
mzi_together.write_gds("mzi.gds")
<span class="-Color -Color-Green">2024-01-29 08:37:46.359</span> | <span class="-Color -Color-Bold">INFO </span> | <span class="-Color -Color-Cyan">gdsfactory.component</span>:<span class="-Color -Color-Cyan">_write_library</span>:<span class="-Color -Color-Cyan">1913</span> - <span class="-Color -Color-Bold">Wrote to 'mzi.gds'</span>
</pre></div>
</div>
<div class="output text_plain highlight-myst-ansi notranslate"><div class="highlight"><pre><span></span>PosixPath('mzi.gds')
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit cf2adf5

Please sign in to comment.