Skip to content

Commit

Permalink
Deploying to gh-pages from @ b011b3c 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
iqmtestd committed Nov 13, 2023
1 parent d470345 commit 09a040c
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 50 deletions.
29 changes: 10 additions & 19 deletions _modules/kqcircuits/masks/mask_export.html

Large diffs are not rendered by default.

40 changes: 19 additions & 21 deletions _modules/kqcircuits/masks/mask_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,6 @@ <h1>Source code for kqcircuits.masks.mask_layout</h1><div class="highlight"><pre
<span class="sd"> dice_width: Dicing width for this mask layout</span>
<span class="sd"> text_margin: Text margin for this mask layout</span>
<span class="sd"> chip_size: side width of the chips (for square chips), or tuple (width, height) for rectangular chips</span>
<span class="sd"> chip_array_to_export: List of lists where for each chip in the array we have the following record - (row,</span>
<span class="sd"> column, Active/inactive, chip ID, chip type). Gets exported as an external csv file</span>
<span class="sd"> edge_clearance: minimum clearance of outer chips from the edge of the mask</span>
<span class="sd"> remove_chips: if True (default), chips that violate edge_clearance or conflict with markers are removed from</span>
<span class="sd"> chip maps. Note that ``extra_chips`` are never removed.</span>
Expand All @@ -607,6 +605,8 @@ <h1>Source code for kqcircuits.masks.mask_layout</h1><div class="highlight"><pre
<span class="sd"> top_cell: Top cell of this mask layout</span>
<span class="sd"> added_chips: List of (chip name, chip position, chip bounding box, chip dtrans, position_label)</span>
<span class="sd"> populated by chips added during build()</span>
<span class="sd"> chip_copies: Dictionary of ``{name_copy: properties}`` where ``properties`` contains the name and location data</span>
<span class="sd"> for each chip that was actually added to the mask.</span>
<span class="sd"> mirror_labels: Boolean, if True mask and chip copy labels are mirrored. Default False.</span>
<span class="sd"> bbox_face_ids: List of face_ids to consider when calcualting the bounding box of chips. Defaults to [face_id]</span>
<span class="sd"> &quot;&quot;&quot;</span>
Expand Down Expand Up @@ -665,6 +665,7 @@ <h1>Source code for kqcircuits.masks.mask_layout</h1><div class="highlight"><pre
<span class="bp">self</span><span class="o">.</span><span class="n">chip_counts</span> <span class="o">=</span> <span class="p">{}</span>
<span class="bp">self</span><span class="o">.</span><span class="n">extra_chips_maps</span> <span class="o">=</span> <span class="p">[]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">chip_array_to_export</span> <span class="o">=</span> <span class="p">[]</span>
<span class="bp">self</span><span class="o">.</span><span class="n">chip_copies</span> <span class="o">=</span> <span class="p">{}</span>
<span class="c1"># For mask name the letter I stats at x=750</span>
<span class="bp">self</span><span class="o">.</span><span class="n">_mask_name_letter_I_offset</span> <span class="o">=</span> <span class="mi">750</span>

Expand Down Expand Up @@ -826,11 +827,14 @@ <h1>Source code for kqcircuits.masks.mask_layout</h1><div class="highlight"><pre
<span class="n">used_position_labels</span> <span class="o">=</span> <span class="nb">set</span><span class="p">()</span>
<span class="k">for</span> <span class="p">(</span><span class="n">x</span><span class="p">,</span> <span class="n">y</span><span class="p">),</span> <span class="p">(</span><span class="n">chip_name</span><span class="p">,</span> <span class="n">_</span><span class="p">,</span> <span class="n">bbox</span><span class="p">,</span> <span class="n">dtrans</span><span class="p">,</span> <span class="n">position_label</span><span class="p">,</span> <span class="n">mask_layout</span><span class="p">)</span> <span class="ow">in</span> <span class="n">chips_dict</span><span class="o">.</span><span class="n">items</span><span class="p">():</span>
<span class="n">labels_cell_2</span> <span class="o">=</span> <span class="n">labels_cells</span><span class="p">[</span><span class="n">mask_layout</span><span class="p">]</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">position_label</span><span class="p">:</span>
<span class="k">if</span> <span class="n">x</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">xvals</span> <span class="ow">or</span> <span class="n">y</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">yvals</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;No position_label override yet label was not automatically generated&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">x</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">xvals</span> <span class="ow">or</span> <span class="n">y</span> <span class="ow">not</span> <span class="ow">in</span> <span class="n">yvals</span><span class="p">:</span>
<span class="n">i</span><span class="p">,</span> <span class="n">j</span> <span class="o">=</span> <span class="kc">None</span><span class="p">,</span> <span class="kc">None</span>
<span class="k">else</span><span class="p">:</span>
<span class="n">i</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">yvals</span><span class="p">,</span> <span class="n">reverse</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="n">y</span><span class="p">)</span>
<span class="n">j</span> <span class="o">=</span> <span class="nb">sorted</span><span class="p">(</span><span class="n">xvals</span><span class="p">)</span><span class="o">.</span><span class="n">index</span><span class="p">(</span><span class="n">x</span><span class="p">)</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">position_label</span><span class="p">:</span>
<span class="k">if</span> <span class="n">i</span> <span class="ow">is</span> <span class="kc">None</span> <span class="ow">or</span> <span class="n">j</span> <span class="ow">is</span> <span class="kc">None</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="s2">&quot;No position_label override yet label was not automatically generated&quot;</span><span class="p">)</span>
<span class="n">position_label</span> <span class="o">=</span> <span class="n">get_position_label</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">)</span>
<span class="k">if</span> <span class="n">position_label</span> <span class="ow">in</span> <span class="n">used_position_labels</span><span class="p">:</span>
<span class="k">raise</span> <span class="ne">ValueError</span><span class="p">(</span><span class="sa">f</span><span class="s2">&quot;Duplicate use of chip position label </span><span class="si">{</span><span class="n">position_label</span><span class="si">}</span><span class="s2">. &quot;</span>
Expand All @@ -845,22 +849,16 @@ <h1>Source code for kqcircuits.masks.mask_layout</h1><div class="highlight"><pre
<span class="n">mask_layout</span><span class="o">.</span><span class="n">_add_chip_graphical_representation_layer</span><span class="p">(</span><span class="n">chip_name</span><span class="p">,</span>
<span class="n">dtrans</span> <span class="o">*</span> <span class="p">(</span><span class="n">pya</span><span class="o">.</span><span class="n">DPoint</span><span class="p">(</span><span class="n">bbox_x2</span><span class="p">,</span> <span class="n">bbox</span><span class="o">.</span><span class="n">bottom</span><span class="p">)),</span>
<span class="n">position_label</span><span class="p">,</span> <span class="n">bbox</span><span class="o">.</span><span class="n">width</span><span class="p">(),</span> <span class="n">labels_cell_2</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">chip_array_to_export</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">,</span> <span class="s2">&quot;Active&quot;</span><span class="p">,</span> <span class="n">position_label</span><span class="p">,</span> <span class="n">chip_name</span><span class="p">])</span>

<span class="c1"># Fill in gaps in the grid and mark them as inactive</span>
<span class="k">for</span> <span class="n">i</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">max</span><span class="p">([</span><span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">chip_array_to_export</span><span class="p">])</span> <span class="o">+</span> <span class="mi">1</span><span class="p">):</span>
<span class="k">for</span> <span class="n">j</span> <span class="ow">in</span> <span class="nb">range</span><span class="p">(</span><span class="nb">max</span><span class="p">([</span><span class="n">x</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">chip_array_to_export</span><span class="p">])</span> <span class="o">+</span> <span class="mi">1</span><span class="p">):</span>
<span class="n">entry_found</span> <span class="o">=</span> <span class="kc">False</span>
<span class="k">for</span> <span class="n">chip_info</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">chip_array_to_export</span><span class="p">:</span>
<span class="k">if</span> <span class="n">chip_info</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="n">i</span> <span class="ow">and</span> <span class="n">chip_info</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="n">j</span><span class="p">:</span>
<span class="n">entry_found</span> <span class="o">=</span> <span class="kc">True</span>
<span class="k">break</span>
<span class="k">if</span> <span class="ow">not</span> <span class="n">entry_found</span><span class="p">:</span>
<span class="bp">self</span><span class="o">.</span><span class="n">chip_array_to_export</span><span class="o">.</span><span class="n">append</span><span class="p">([</span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">,</span> <span class="s2">&quot;Inactive&quot;</span><span class="p">,</span> <span class="n">get_position_label</span><span class="p">(</span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">),</span> <span class="s2">&quot;---&quot;</span><span class="p">])</span>
<span class="c1"># Sort entries primarily by row and secondarily by column</span>
<span class="bp">self</span><span class="o">.</span><span class="n">chip_array_to_export</span><span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
<span class="bp">self</span><span class="o">.</span><span class="n">chip_array_to_export</span><span class="o">.</span><span class="n">sort</span><span class="p">(</span><span class="n">key</span><span class="o">=</span><span class="k">lambda</span> <span class="n">x</span><span class="p">:</span> <span class="n">x</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span></div>

<span class="n">chip_box</span> <span class="o">=</span> <span class="n">pya</span><span class="o">.</span><span class="n">DBox</span><span class="p">(</span><span class="n">dtrans</span> <span class="o">*</span> <span class="n">bbox</span><span class="p">)</span>
<span class="bp">self</span><span class="o">.</span><span class="n">chip_copies</span><span class="p">[</span><span class="n">position_label</span><span class="p">]</span> <span class="o">=</span> <span class="p">{</span>
<span class="s1">&#39;name_chip&#39;</span><span class="p">:</span> <span class="n">chip_name</span><span class="p">,</span>
<span class="s1">&#39;i&#39;</span><span class="p">:</span> <span class="n">i</span><span class="p">,</span>
<span class="s1">&#39;j&#39;</span><span class="p">:</span> <span class="n">j</span><span class="p">,</span>
<span class="s1">&#39;x&#39;</span><span class="p">:</span> <span class="n">chip_box</span><span class="o">.</span><span class="n">left</span><span class="p">,</span>
<span class="s1">&#39;y&#39;</span><span class="p">:</span> <span class="n">chip_box</span><span class="o">.</span><span class="n">bottom</span><span class="p">,</span>
<span class="s1">&#39;width&#39;</span><span class="p">:</span> <span class="n">chip_box</span><span class="o">.</span><span class="n">width</span><span class="p">(),</span>
<span class="s1">&#39;height&#39;</span><span class="p">:</span> <span class="n">chip_box</span><span class="o">.</span><span class="n">height</span><span class="p">(),</span>
<span class="p">}</span></div>

<div class="viewcode-block" id="MaskLayout.face"><a class="viewcode-back" href="../../../api/kqcircuits.masks.mask_layout.html#kqcircuits.masks.mask_layout.MaskLayout.face">[docs]</a> <span class="k">def</span> <span class="nf">face</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;Returns the face dictionary for this mask layout&quot;&quot;&quot;</span>
Expand Down
5 changes: 5 additions & 0 deletions api/kqcircuits.masks.mask_export.html
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,11 @@
<span class="sig-prename descclassname"><span class="pre">kqcircuits.masks.mask_export.</span></span><span class="sig-name descname"><span class="pre">export_drc_report</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">name</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">path</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/kqcircuits/masks/mask_export.html#export_drc_report"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#kqcircuits.masks.mask_export.export_drc_report" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="py function">
<dt class="sig sig-object py" id="kqcircuits.masks.mask_export.get_mask_layout_full_name">
<span class="sig-prename descclassname"><span class="pre">kqcircuits.masks.mask_export.</span></span><span class="sig-name descname"><span class="pre">get_mask_layout_full_name</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mask_set</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">mask_layout</span></span></em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/kqcircuits/masks/mask_export.html#get_mask_layout_full_name"><span class="viewcode-link"><span class="pre">[source]</span></span></a><a class="headerlink" href="#kqcircuits.masks.mask_export.get_mask_layout_full_name" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<img alt="../_images/kqcircuits.masks.mask_export.png" src="../_images/kqcircuits.masks.mask_export.png" />
</div>

Expand Down
14 changes: 7 additions & 7 deletions api/kqcircuits.masks.mask_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -651,13 +651,6 @@
<dd><p>side width of the chips (for square chips), or tuple (width, height) for rectangular chips</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="kqcircuits.masks.mask_layout.MaskLayout.chip_array_to_export">
<span class="sig-name descname"><span class="pre">chip_array_to_export</span></span><a class="headerlink" href="#kqcircuits.masks.mask_layout.MaskLayout.chip_array_to_export" title="Permalink to this definition"></a></dt>
<dd><p>List of lists where for each chip in the array we have the following record - (row,
column, Active/inactive, chip ID, chip type). Gets exported as an external csv file</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="kqcircuits.masks.mask_layout.MaskLayout.edge_clearance">
<span class="sig-name descname"><span class="pre">edge_clearance</span></span><a class="headerlink" href="#kqcircuits.masks.mask_layout.MaskLayout.edge_clearance" title="Permalink to this definition"></a></dt>
Expand Down Expand Up @@ -765,6 +758,13 @@
populated by chips added during build()</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="kqcircuits.masks.mask_layout.MaskLayout.chip_copies">
<span class="sig-name descname"><span class="pre">chip_copies</span></span><a class="headerlink" href="#kqcircuits.masks.mask_layout.MaskLayout.chip_copies" title="Permalink to this definition"></a></dt>
<dd><p>Dictionary of <code class="docutils literal notranslate"><span class="pre">{name_copy:</span> <span class="pre">properties}</span></code> where <code class="docutils literal notranslate"><span class="pre">properties</span></code> contains the name and location data
for each chip that was actually added to the mask.</p>
</dd></dl>

<dl class="py attribute">
<dt class="sig sig-object py" id="kqcircuits.masks.mask_layout.MaskLayout.mirror_labels">
<span class="sig-name descname"><span class="pre">mirror_labels</span></span><a class="headerlink" href="#kqcircuits.masks.mask_layout.MaskLayout.mirror_labels" title="Permalink to this definition"></a></dt>
Expand Down
6 changes: 4 additions & 2 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -839,10 +839,10 @@ <h2 id="C">C</h2>
<li><a href="api/kqcircuits.elements.waveguide_composite.html#kqcircuits.elements.waveguide_composite.WaveguideComposite.check_node_type">check_node_type() (kqcircuits.elements.waveguide_composite.WaveguideComposite method)</a>
</li>
<li><a href="api/kqcircuits.chips.chip.html#kqcircuits.chips.chip.Chip">Chip (class in kqcircuits.chips.chip)</a>
</li>
<li><a href="api/kqcircuits.masks.mask_layout.html#kqcircuits.masks.mask_layout.MaskLayout.chip_array_to_export">chip_array_to_export (kqcircuits.masks.mask_layout.MaskLayout attribute)</a>
</li>
<li><a href="api/kqcircuits.masks.mask_layout.html#kqcircuits.masks.mask_layout.MaskLayout.chip_box_offset">chip_box_offset (kqcircuits.masks.mask_layout.MaskLayout attribute)</a>
</li>
<li><a href="api/kqcircuits.masks.mask_layout.html#kqcircuits.masks.mask_layout.MaskLayout.chip_copies">chip_copies (kqcircuits.masks.mask_layout.MaskLayout attribute)</a>
</li>
<li><a href="api/kqcircuits.masks.mask_layout.html#kqcircuits.masks.mask_layout.MaskLayout.chip_size">chip_size (kqcircuits.masks.mask_layout.MaskLayout attribute)</a>
</li>
Expand Down Expand Up @@ -1276,6 +1276,8 @@ <h2 id="G">G</h2>
<li><a href="api/kqcircuits.elements.markers.mask_marker_fc.html#kqcircuits.elements.markers.mask_marker_fc.MaskMarkerFc.get_marker_region">(kqcircuits.elements.markers.mask_marker_fc.MaskMarkerFc class method)</a>
</li>
</ul></li>
<li><a href="api/kqcircuits.masks.mask_export.html#kqcircuits.masks.mask_export.get_mask_layout_full_name">get_mask_layout_full_name() (in module kqcircuits.masks.mask_export)</a>
</li>
<li><a href="api/kqcircuits.util.layout_to_code.html#kqcircuits.util.layout_to_code.get_node_params">get_node_params() (in module kqcircuits.util.layout_to_code)</a>
</li>
</ul></td>
Expand Down
Binary file modified objects.inv
Binary file not shown.
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

0 comments on commit 09a040c

Please sign in to comment.