quantcore-circuits 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quantcore_circuits/__init__.py +57 -0
- quantcore_circuits/analysis/__init__.py +12 -0
- quantcore_circuits/analysis/_metal.py +70 -0
- quantcore_circuits/analysis/amplifiers.py +263 -0
- quantcore_circuits/analysis/circuits.py +117 -0
- quantcore_circuits/analysis/epr.py +231 -0
- quantcore_circuits/analysis/epr_lumped.py +372 -0
- quantcore_circuits/analysis/extract.py +119 -0
- quantcore_circuits/analysis/lom.py +80 -0
- quantcore_circuits/analysis/results.py +549 -0
- quantcore_circuits/analysis/store.py +81 -0
- quantcore_circuits/analysis/synthesis.py +118 -0
- quantcore_circuits/analysis/transmon.py +126 -0
- quantcore_circuits/assembly/__init__.py +17 -0
- quantcore_circuits/assembly/builder.py +127 -0
- quantcore_circuits/assembly/drc.py +683 -0
- quantcore_circuits/assembly/last_good.py +137 -0
- quantcore_circuits/assembly/netlist.py +174 -0
- quantcore_circuits/assembly/plan.py +605 -0
- quantcore_circuits/assembly/sidecar.py +270 -0
- quantcore_circuits/autotrack.py +605 -0
- quantcore_circuits/cards.py +878 -0
- quantcore_circuits/circuit/__init__.py +14 -0
- quantcore_circuits/circuit/adapters.py +305 -0
- quantcore_circuits/circuit/bridges.py +353 -0
- quantcore_circuits/circuit/consensus.py +158 -0
- quantcore_circuits/circuit/derive.py +28 -0
- quantcore_circuits/circuit/draw.py +198 -0
- quantcore_circuits/circuit/fill.py +828 -0
- quantcore_circuits/circuit/hamiltonian.py +193 -0
- quantcore_circuits/circuit/kinetic.py +102 -0
- quantcore_circuits/circuit/schema.py +139 -0
- quantcore_circuits/cli.py +1085 -0
- quantcore_circuits/codesign.py +1038 -0
- quantcore_circuits/data/selftest_q1_r1.json +44 -0
- quantcore_circuits/design/__init__.py +44 -0
- quantcore_circuits/design/io.py +98 -0
- quantcore_circuits/design/pyscript.py +395 -0
- quantcore_circuits/design/schema.py +398 -0
- quantcore_circuits/designer.py +625 -0
- quantcore_circuits/guiflow.py +991 -0
- quantcore_circuits/kqc_files.py +208 -0
- quantcore_circuits/layouts/__init__.py +118 -0
- quantcore_circuits/layouts/catalog.py +520 -0
- quantcore_circuits/layouts/chips/__init__.py +0 -0
- quantcore_circuits/layouts/chips/design_chip.py +325 -0
- quantcore_circuits/layouts/chips/frame.py +235 -0
- quantcore_circuits/layouts/junctions/__init__.py +0 -0
- quantcore_circuits/layouts/junctions/jj_fingers.py +99 -0
- quantcore_circuits/layouts/junctions/legacy_junctions.py +237 -0
- quantcore_circuits/layouts/junctions/sim_gap.py +48 -0
- quantcore_circuits/layouts/junctions/trilayer.py +541 -0
- quantcore_circuits/layouts/metal/__init__.py +105 -0
- quantcore_circuits/layouts/metal/component.py +332 -0
- quantcore_circuits/layouts/metal/geometry.py +462 -0
- quantcore_circuits/layouts/others/__init__.py +0 -0
- quantcore_circuits/layouts/others/amplifiers.py +1139 -0
- quantcore_circuits/layouts/others/bond_pad.py +119 -0
- quantcore_circuits/layouts/others/connector_pads.py +190 -0
- quantcore_circuits/layouts/others/couplers.py +21 -0
- quantcore_circuits/layouts/others/cpw_segment.py +131 -0
- quantcore_circuits/layouts/others/cpwe.py +661 -0
- quantcore_circuits/layouts/others/keepout.py +66 -0
- quantcore_circuits/layouts/others/legacy_resonators.py +645 -0
- quantcore_circuits/layouts/others/markers.py +201 -0
- quantcore_circuits/layouts/others/qpdk_cells.py +263 -0
- quantcore_circuits/layouts/others/shapes.py +114 -0
- quantcore_circuits/layouts/others/spirals.py +140 -0
- quantcore_circuits/layouts/others/sqdmetal_cells.py +90 -0
- quantcore_circuits/layouts/others/test_pads.py +461 -0
- quantcore_circuits/layouts/ports.py +119 -0
- quantcore_circuits/layouts/qubits/__init__.py +0 -0
- quantcore_circuits/layouts/qubits/legacy_transmon.py +124 -0
- quantcore_circuits/layouts/qubits/qpdk_cells.py +374 -0
- quantcore_circuits/layouts/qubits/sqdmetal_cells.py +376 -0
- quantcore_circuits/layouts/qubits/trilayer_concentric.py +65 -0
- quantcore_circuits/layouts/qubits/xmon.py +375 -0
- quantcore_circuits/layouts/registry.py +418 -0
- quantcore_circuits/layouts/wafers/__init__.py +0 -0
- quantcore_circuits/layouts/wafers/fab_export.py +454 -0
- quantcore_circuits/layouts/wafers/legacy_wafer.py +111 -0
- quantcore_circuits/layouts/wafers/wafer.py +469 -0
- quantcore_circuits/live/__init__.py +6 -0
- quantcore_circuits/live/klayout.py +225 -0
- quantcore_circuits/live/klive.py +61 -0
- quantcore_circuits/live/snapshot.py +185 -0
- quantcore_circuits/live/watch.py +93 -0
- quantcore_circuits/lom/__init__.py +15 -0
- quantcore_circuits/lom/builder.py +932 -0
- quantcore_circuits/lom/calibration.py +82 -0
- quantcore_circuits/lom/estimates.py +235 -0
- quantcore_circuits/lom/fragment.py +421 -0
- quantcore_circuits/lom/kqc_models.py +734 -0
- quantcore_circuits/lom/metal_models.py +917 -0
- quantcore_circuits/lom/quantcore_models.py +784 -0
- quantcore_circuits/lom/simulate.py +636 -0
- quantcore_circuits/lom/synthesize.py +189 -0
- quantcore_circuits/loop.py +610 -0
- quantcore_circuits/optimise.py +423 -0
- quantcore_circuits/pdk/__init__.py +451 -0
- quantcore_circuits/plots.py +876 -0
- quantcore_circuits/plugins.py +69 -0
- quantcore_circuits/review/__init__.py +57 -0
- quantcore_circuits/review/server.py +251 -0
- quantcore_circuits/review/static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- quantcore_circuits/review/static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- quantcore_circuits/review/static/assets/index-CDHdrFyA.css +1 -0
- quantcore_circuits/review/static/assets/index-CSx05Og4.js +409 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-700-normal-CjBOestx.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-700-normal-DrXBdSj3.woff +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-ext-700-normal-BjwYoWNd.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-cyrillic-ext-700-normal-LO58E6JB.woff +0 -0
- quantcore_circuits/review/static/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
- quantcore_circuits/review/static/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
- quantcore_circuits/review/static/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
- quantcore_circuits/review/static/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-greek-700-normal-BUv2fZ6O.woff +0 -0
- quantcore_circuits/review/static/assets/inter-greek-700-normal-C3JjAnD8.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
- quantcore_circuits/review/static/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
- quantcore_circuits/review/static/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
- quantcore_circuits/review/static/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-greek-ext-700-normal-BoQ6DsYi.woff +0 -0
- quantcore_circuits/review/static/assets/inter-greek-ext-700-normal-qfdV9bQt.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
- quantcore_circuits/review/static/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
- quantcore_circuits/review/static/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
- quantcore_circuits/review/static/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-latin-700-normal-BLAVimhd.woff +0 -0
- quantcore_circuits/review/static/assets/inter-latin-700-normal-Yt3aPRUw.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
- quantcore_circuits/review/static/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
- quantcore_circuits/review/static/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
- quantcore_circuits/review/static/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-latin-ext-700-normal-Ca8adRJv.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-latin-ext-700-normal-TidjK2hL.woff +0 -0
- quantcore_circuits/review/static/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
- quantcore_circuits/review/static/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
- quantcore_circuits/review/static/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
- quantcore_circuits/review/static/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
- quantcore_circuits/review/static/assets/inter-vietnamese-700-normal-BZaoP0fm.woff +0 -0
- quantcore_circuits/review/static/assets/inter-vietnamese-700-normal-DlLaEgI2.woff2 +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- quantcore_circuits/review/static/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
- quantcore_circuits/review/static/index.html +14 -0
- quantcore_circuits/review/static/logo-quantcore-black.png +0 -0
- quantcore_circuits/review/static/logo-quantcore-white.png +0 -0
- quantcore_circuits/review/static/sample/chip.png +0 -0
- quantcore_circuits/review/static/sample/chip_rev1.png +0 -0
- quantcore_circuits/review/static/sample/q1.png +0 -0
- quantcore_circuits/review/static/sample/q2.png +0 -0
- quantcore_circuits/review/static/sample-state.json +3747 -0
- quantcore_circuits/route/__init__.py +5 -0
- quantcore_circuits/route/router.py +694 -0
- quantcore_circuits/route/waveguide.py +187 -0
- quantcore_circuits/selftest.py +224 -0
- quantcore_circuits/sim_tools/__init__.py +6 -0
- quantcore_circuits/sim_tools/aedt_attach.py +66 -0
- quantcore_circuits/sim_tools/aedt_progress.py +224 -0
- quantcore_circuits/sim_tools/aedt_project.py +302 -0
- quantcore_circuits/sim_tools/aedt_scripts.py +397 -0
- quantcore_circuits/sim_tools/aedt_session.py +275 -0
- quantcore_circuits/sim_tools/ansys.py +90 -0
- quantcore_circuits/sim_tools/builder.py +1690 -0
- quantcore_circuits/sim_tools/export.py +470 -0
- quantcore_circuits/sim_tools/geometry_check.py +342 -0
- quantcore_circuits/sim_tools/hfss.py +583 -0
- quantcore_circuits/sim_tools/palace.py +197 -0
- quantcore_circuits/sim_tools/runner.py +179 -0
- quantcore_circuits/sim_tools/subset.py +364 -0
- quantcore_circuits/track.py +671 -0
- quantcore_circuits-0.0.1.dist-info/METADATA +204 -0
- quantcore_circuits-0.0.1.dist-info/RECORD +272 -0
- quantcore_circuits-0.0.1.dist-info/WHEEL +5 -0
- quantcore_circuits-0.0.1.dist-info/entry_points.txt +2 -0
- quantcore_circuits-0.0.1.dist-info/licenses/LICENSE +674 -0
- quantcore_circuits-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,784 @@
|
|
|
1
|
+
"""LOM models for Quantcore cells ported from the legacy QWri library and the CPW-E drawing library.
|
|
2
|
+
|
|
3
|
+
Same conventions as :mod:`.kqc_models` (estimates labelled ``analytic`` / ``rough``, see :mod:`.estimates`; FEM
|
|
4
|
+
replaces capacitances by island name ``<inst>.<node>``).
|
|
5
|
+
|
|
6
|
+
============================================= ====================================================================
|
|
7
|
+
cell lumped model
|
|
8
|
+
============================================= ====================================================================
|
|
9
|
+
TwoPadTransmon (legacy ``Transmon``) floating: island1 (``left`` pad + lead), island2 (``right``), C to
|
|
10
|
+
ground each, C between, JJ between (``squid_a``/``squid_b`` = the
|
|
11
|
+
junction ends)
|
|
12
|
+
PadCoupler (legacy ``Coupler``) series gap capacitor: π network between ``left`` and ``right``
|
|
13
|
+
ConnectorPad, CpweBondPad 50 Ω port (like BondPad)
|
|
14
|
+
TaperedPad probe pad: C to ground (DC test structure)
|
|
15
|
+
CpwSegment a line between ``a`` and ``b`` (wire when both are connected)
|
|
16
|
+
CoupledResonator, QubitResonator λ/4 line: shorted start (refpoint ``short_end``) → port ``end``;
|
|
17
|
+
its coupler section next to a separate feedline is a ``hanger``
|
|
18
|
+
(declare ``d.couple("K_R1", "R1", "<feedline instance>")``)
|
|
19
|
+
CpwResonator resonator line between ``start`` and ``end`` (both grounded when free)
|
|
20
|
+
CoupledConnector line ``start`` (shorted) → ``end``: λ/4 when ``end`` meets a capacitor
|
|
21
|
+
CpweQuarterWaveResonator λ/4 line, no ports: open coupler arm → shorted end; the arm next to
|
|
22
|
+
a feedline is a ``hanger`` at the open end (declared coupling)
|
|
23
|
+
CpweFingerCapacitor, CpweGapCapacitor π network between ``a`` and ``b``
|
|
24
|
+
CpweFingerLine a wire with the fingers' shunt C to ground
|
|
25
|
+
CpweTaper a pass-through section of the line it joins (``Line.through``)
|
|
26
|
+
CpweOpenEnd zero-length open end: a route into it is an open-ended resonator
|
|
27
|
+
NeckTermination (QPDK) shorted end via taper + neck: the routed line's last section, at its
|
|
28
|
+
inductive equivalent length (``Line.through``, rough)
|
|
29
|
+
CpweMeanderLine resonator line between ``a`` and ``b`` (like KQC ``Meander``)
|
|
30
|
+
SpiralLine (legacy ``draw.spiral``) resonator line ``a`` → ``b`` of the drawn length (open ends when free;
|
|
31
|
+
gap = mean turn spacing, rough; kinetic inductance as a CPW)
|
|
32
|
+
FluxHoleArray, FluxHoles ground perforation: no circuit elements
|
|
33
|
+
WaveguideCoplanarStraight (KQC) bare CPW segment without ports: no circuit elements
|
|
34
|
+
============================================= ====================================================================
|
|
35
|
+
|
|
36
|
+
Line lengths are the drawn centre lines (the cells' own point functions), so they include tails and necks.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
from __future__ import annotations
|
|
40
|
+
|
|
41
|
+
import math
|
|
42
|
+
from types import SimpleNamespace
|
|
43
|
+
|
|
44
|
+
from quantcore_circuits.lom import estimates as est
|
|
45
|
+
from quantcore_circuits.lom.fragment import (
|
|
46
|
+
Element,
|
|
47
|
+
Fragment,
|
|
48
|
+
Line,
|
|
49
|
+
cell_params,
|
|
50
|
+
junction_element,
|
|
51
|
+
junction_kind,
|
|
52
|
+
port_resistor,
|
|
53
|
+
register_lom,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _f(x, default=0.0) -> float:
|
|
58
|
+
try:
|
|
59
|
+
return float(x)
|
|
60
|
+
except (TypeError, ValueError):
|
|
61
|
+
return float(default)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _C(frag: Fragment, name: str, a: str, b: str, value: dict, knob: str | None = None) -> None:
|
|
65
|
+
frag.elements.append(Element(name, "C", (a, b), value, {"param": knob} if knob else None))
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _knob(frag: Fragment, param: str, value: float) -> None:
|
|
69
|
+
frag.knobs[param] = (round(value * 0.8, 1), round(value * 1.25, 1))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
# ---- qubits and couplers ------------------------------------------------------------------------------------------
|
|
73
|
+
def _two_pad_caps(p: dict, eps: float) -> tuple[float, float, str]:
|
|
74
|
+
"""(C pad → ground, C pad ↔ pad, formula) of the legacy two-pad drawing: the pads face each other across ``gap``
|
|
75
|
+
along their ``pad_height`` edges; ``pad_thickness`` is their extent along the axis, the lead length the clearance
|
|
76
|
+
behind them and ``pocket_margin`` the clearance above/below (no pocket: the surrounding gap is unknown, 50 µm)."""
|
|
77
|
+
h, t = _f(p.get("pad_height"), 30), _f(p.get("pad_thickness"), 20)
|
|
78
|
+
gap = _f(p.get("gap"), 10)
|
|
79
|
+
gap = 1.0 if gap <= 0 else gap
|
|
80
|
+
margin = _f(p.get("pocket_margin"), 20)
|
|
81
|
+
side = margin if margin > 0 else 50.0
|
|
82
|
+
back = max(_f(p.get("lead_length"), 10), 1.0)
|
|
83
|
+
cg, cm = est.two_pads(h, t, gap, side, back, eps)
|
|
84
|
+
return cg, cm, f"two {t:g}×{h:g} µm pads across {gap:g} µm in a {side:g} µm pocket (coupled strips + CPW)"
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
@register_lom("TwoPadTransmon")
|
|
88
|
+
def two_pad_transmon_lom(name: str, inst, pdk) -> Fragment:
|
|
89
|
+
"""Legacy two-pad transmon: floating, island1 = ``left`` pad, island2 = ``right`` pad, JJ across the gap.
|
|
90
|
+
|
|
91
|
+
The pads alone are small (a few fF): the qubit's C_Σ comes from whatever the leads connect to, so run a C-matrix
|
|
92
|
+
of the assembled qubit to replace these values.
|
|
93
|
+
"""
|
|
94
|
+
p = cell_params(inst)
|
|
95
|
+
eps = est.substrate_eps(pdk)
|
|
96
|
+
cg, cm, formula = _two_pad_caps(p, eps)
|
|
97
|
+
frag = Fragment(
|
|
98
|
+
nodes={"island1": {"island": f"{name}.island1"}, "island2": {"island": f"{name}.island2"}},
|
|
99
|
+
port_nodes={"left": "island1", "right": "island2", "squid_a": "island1", "squid_b": "island2"},
|
|
100
|
+
)
|
|
101
|
+
_C(frag, f"C_{name}_1", "island1", "gnd", est.cap(cg, "analytic", formula), f"{name}.pad_height")
|
|
102
|
+
_C(frag, f"C_{name}_2", "island2", "gnd", est.cap(cg, "analytic", formula), f"{name}.pad_height")
|
|
103
|
+
_C(frag, f"C_{name}_12", "island1", "island2", est.cap(cm, "analytic", formula), f"{name}.gap")
|
|
104
|
+
jtype = str(p.get("junction_type") or "No Squid")
|
|
105
|
+
kind = "SQUID" if junction_kind(jtype) == "SQUID" else "JJ" # "No Squid" (legacy): a JJ is assumed
|
|
106
|
+
frag.elements.append(junction_element(name, "island1", "island2", inst, kind, drawn_params=p))
|
|
107
|
+
if jtype in ("No Squid", "Sim"):
|
|
108
|
+
frag.notes.append(f"{name}: no junction drawn (junction_type {jtype!r}); a JJ across the gap is assumed")
|
|
109
|
+
lj = frag.elements[-1].value.get("Lj_nH")
|
|
110
|
+
if lj:
|
|
111
|
+
frag.knobs[f"{name}.junction.Lj_nH"] = (round(lj * 0.5, 3), round(lj * 1.5, 3))
|
|
112
|
+
else:
|
|
113
|
+
frag.notes.append(f"{name}: no junction.Lj_nH in the design; the qubit mode needs one to simulate")
|
|
114
|
+
frag.notes.append(f"{name}: two-pad transmon pads only ({cg + cm:.2g} fF); the leads' loads set C_Σ")
|
|
115
|
+
return frag
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
@register_lom("PadCoupler")
|
|
119
|
+
def pad_coupler_lom(name: str, inst, pdk) -> Fragment:
|
|
120
|
+
"""Legacy gap coupler (two facing pads): series C between ``left`` and ``right``, C to ground at each."""
|
|
121
|
+
p = cell_params(inst)
|
|
122
|
+
eps = est.substrate_eps(pdk)
|
|
123
|
+
cg, cm, formula = _two_pad_caps(p, eps)
|
|
124
|
+
frag = Fragment(
|
|
125
|
+
nodes={"left": {"island": f"{name}.left"}, "right": {"island": f"{name}.right"}},
|
|
126
|
+
port_nodes={"left": "left", "right": "right"},
|
|
127
|
+
)
|
|
128
|
+
_C(frag, f"C_{name}", "left", "right", est.cap(cm, "analytic", formula), f"{name}.gap")
|
|
129
|
+
_C(frag, f"C_{name}_left", "left", "gnd", est.cap(cg, "analytic", formula))
|
|
130
|
+
_C(frag, f"C_{name}_right", "right", "gnd", est.cap(cg, "analytic", formula))
|
|
131
|
+
return frag
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
# ---- QPDK / SQDMetal re-implementations (layouts/*/qpdk_cells.py, sqdmetal_cells.py) -----------------------------
|
|
135
|
+
EPS0_FF_PER_UM = 8.8541878128e-3 # ε0 in fF/µm
|
|
136
|
+
FLIP_CHIP_GAP_UM = 8.0 # KQC's default chip_distance; PDK v2 has no second face
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
def _qubit_junction(frag: Fragment, name: str, inst, p: dict, a: str, b: str, note: str = "", kind=None) -> None:
|
|
140
|
+
"""J_<name> from ``junction_type`` (``"No Squid"``: none, a note), or of ``kind``, with Lj/Cj from the design's
|
|
141
|
+
``junction``."""
|
|
142
|
+
kind = kind or junction_kind(p.get("junction_type", "Manhattan"))
|
|
143
|
+
if kind is None:
|
|
144
|
+
frag.notes.append(f"{name}: no junction ({p.get('junction_type')!r}); the islands are not shunted")
|
|
145
|
+
return
|
|
146
|
+
frag.elements.append(junction_element(name, a, b, inst, kind, note, drawn_params=p))
|
|
147
|
+
lj = frag.elements[-1].value.get("Lj_nH")
|
|
148
|
+
if lj:
|
|
149
|
+
frag.knobs[f"{name}.junction.Lj_nH"] = (round(lj * 0.5, 3), round(lj * 1.5, 3))
|
|
150
|
+
else:
|
|
151
|
+
frag.notes.append(f"{name}: no junction.Lj_nH in the design; the qubit mode needs one to simulate")
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
@register_lom("Flipmon")
|
|
155
|
+
def flipmon_lom(name: str, inst, pdk) -> Fragment:
|
|
156
|
+
"""QPDK flipmon: floating; island1 = M1 ring (the coupler plate faces it), island2 = M1 disc + the M2 top disc
|
|
157
|
+
(face 2b1, joined by the indium bump), junction across the disc–ring gap, plate coupler ``cplr`` at ``coupler``.
|
|
158
|
+
|
|
159
|
+
The M2 disc is part of island2: its overlap with the M1 ring across an assumed 8 µm flip-chip vacuum gap (KQC's
|
|
160
|
+
default ``chip_distance``; PDK v2 has no second face and drops 2b1) is a parallel plate C to island1, and its
|
|
161
|
+
edge facing the top-face ground (``m2_etch_extension_gap``) a disc-in-a-gap C to ground (rough, both)."""
|
|
162
|
+
p = cell_params(inst)
|
|
163
|
+
eps = est.substrate_eps(pdk)
|
|
164
|
+
r_d, r_c, w = (
|
|
165
|
+
_f(p.get("inner_circle_radius"), 60),
|
|
166
|
+
_f(p.get("outer_ring_radius"), 110),
|
|
167
|
+
_f(p.get("outer_ring_width"), 60),
|
|
168
|
+
)
|
|
169
|
+
ring_in, ring_out = r_c - w / 2, r_c + w / 2
|
|
170
|
+
g1 = _f(p.get("m1_etch_extension_gap"), 30)
|
|
171
|
+
r_t, g2 = _f(p.get("top_circle_radius"), 110), _f(p.get("m2_etch_extension_gap"), 40)
|
|
172
|
+
frag = Fragment(
|
|
173
|
+
nodes={"island1": {"island": f"{name}.island1"}, "island2": {"island": f"{name}.island2"}},
|
|
174
|
+
port_nodes={"squid_a": "island2", "squid_b": "island1"}, # disc edge / ring edge
|
|
175
|
+
)
|
|
176
|
+
_C(
|
|
177
|
+
frag,
|
|
178
|
+
f"C_{name}_1",
|
|
179
|
+
"island1",
|
|
180
|
+
"gnd",
|
|
181
|
+
est.cap(
|
|
182
|
+
est.ring_to_ground(ring_out, w, g1, eps),
|
|
183
|
+
"analytic",
|
|
184
|
+
f"ring {ring_in:g}–{ring_out:g} µm, outer edge as half CPW ({g1:g} µm gap)",
|
|
185
|
+
),
|
|
186
|
+
f"{name}.outer_ring_radius",
|
|
187
|
+
)
|
|
188
|
+
_C(
|
|
189
|
+
frag,
|
|
190
|
+
f"C_{name}_12",
|
|
191
|
+
"island1",
|
|
192
|
+
"island2",
|
|
193
|
+
est.cap(
|
|
194
|
+
est.concentric_rings(r_d, ring_in, eps),
|
|
195
|
+
"rough",
|
|
196
|
+
"disc–ring facing edges as coplanar strips along the mean circumference",
|
|
197
|
+
),
|
|
198
|
+
f"{name}.inner_circle_radius",
|
|
199
|
+
)
|
|
200
|
+
span = ring_out + g1 - r_d
|
|
201
|
+
c2 = est.disk_to_ground(r_d, span, eps) * ((span - w) / span) ** 2
|
|
202
|
+
_C(frag, f"C_{name}_2", "island2", "gnd", est.cap(c2, "rough", "M1 disc to ground screened by the ring"))
|
|
203
|
+
overlap = math.pi * (min(r_t, ring_out) ** 2 - ring_in**2) if r_t > ring_in else 0.0
|
|
204
|
+
if overlap > 0:
|
|
205
|
+
c_flip = EPS0_FF_PER_UM * overlap / FLIP_CHIP_GAP_UM
|
|
206
|
+
_C(
|
|
207
|
+
frag,
|
|
208
|
+
f"C_{name}_12_flip",
|
|
209
|
+
"island1",
|
|
210
|
+
"island2",
|
|
211
|
+
est.cap(
|
|
212
|
+
c_flip,
|
|
213
|
+
"rough",
|
|
214
|
+
f"M2 disc r {r_t:g} over the M1 ring: parallel plate, {overlap:.0f} µm² across an assumed "
|
|
215
|
+
f"{FLIP_CHIP_GAP_UM:g} µm vacuum gap",
|
|
216
|
+
),
|
|
217
|
+
f"{name}.top_circle_radius",
|
|
218
|
+
)
|
|
219
|
+
_C(
|
|
220
|
+
frag,
|
|
221
|
+
f"C_{name}_2_top",
|
|
222
|
+
"island2",
|
|
223
|
+
"gnd",
|
|
224
|
+
est.cap(
|
|
225
|
+
est.disk_to_ground(r_t, g2, eps),
|
|
226
|
+
"rough",
|
|
227
|
+
f"M2 disc r {r_t:g} in its {g2:g} µm top-face gap (single-face formula)",
|
|
228
|
+
),
|
|
229
|
+
)
|
|
230
|
+
_qubit_junction(frag, name, inst, p, "island1", "island2")
|
|
231
|
+
if str(p.get("with_coupler", True)).lower() not in ("false", "0"):
|
|
232
|
+
cw, cl = _f(p.get("coupler_width"), 10), _f(p.get("coupler_length"), 58)
|
|
233
|
+
s_in = max(_f(p.get("coupler_offset"), 10) - cw / 2, 0.5)
|
|
234
|
+
s_out = max(ring_out + g1 - (ring_out + s_in + cw), _f(p.get("coupler_etch_margin"), 2))
|
|
235
|
+
frag.nodes["cplr"] = {"island": f"{name}.cplr"}
|
|
236
|
+
frag.port_nodes["coupler"] = "cplr"
|
|
237
|
+
_C(
|
|
238
|
+
frag,
|
|
239
|
+
f"Cg_{name}_cplr",
|
|
240
|
+
"island1",
|
|
241
|
+
"cplr",
|
|
242
|
+
est.cap(
|
|
243
|
+
est.coplanar_coupling(cl, cw, w, s_in, eps),
|
|
244
|
+
"analytic",
|
|
245
|
+
f"plate {cl:g}×{cw:g} µm facing the ring across {s_in:g} µm (CPS)",
|
|
246
|
+
),
|
|
247
|
+
f"{name}.coupler_length",
|
|
248
|
+
)
|
|
249
|
+
cc = est.pad_to_ground(cl, cw, s_out, s_out, eps, open_edges=1) + est.cpw_line(s_out, 10, 6, eps)
|
|
250
|
+
_C(frag, f"Cc_{name}_cplr", "cplr", "gnd", est.cap(cc, "rough", "plate in the M1 etch + its lead"))
|
|
251
|
+
frag.notes.append(
|
|
252
|
+
f"{name}: M2 top disc (face 2b1) counted in island2 across an assumed {FLIP_CHIP_GAP_UM:g} µm flip-chip gap "
|
|
253
|
+
"(rough; PDK v2 does not fabricate face 2b1); coupler ↔ disc C neglected (screened by the ring)"
|
|
254
|
+
)
|
|
255
|
+
return frag
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
@register_lom("Gatemon")
|
|
259
|
+
def gatemon_lom(name: str, inst, pdk) -> Fragment:
|
|
260
|
+
"""QPDK gatemon: grounded island (``island_size``) in a pocket; the carbon-nanotube weak link to ground is not
|
|
261
|
+
drawn and is modelled as a JJ with the design's ``junction`` values (gate-tunable Lj); ``readout`` is the island
|
|
262
|
+
edge (the island node), ``gate`` a DC gate line with a small C to the island (rough)."""
|
|
263
|
+
p = cell_params(inst)
|
|
264
|
+
eps = est.substrate_eps(pdk)
|
|
265
|
+
size = p.get("island_size") or [150, 150]
|
|
266
|
+
iw, ih = _f(size[0], 150), _f(size[-1], 150)
|
|
267
|
+
side, top = _f(p.get("pocket_gap"), 60), _f(p.get("pocket_gap_top"), 40)
|
|
268
|
+
frag = Fragment(
|
|
269
|
+
nodes={"island": {"island": f"{name}.island"}, "gate": {"island": f"{name}.gate"}},
|
|
270
|
+
port_nodes={"readout": "island", "gate": "gate", "squid_a": "island", "squid_b": "gnd"},
|
|
271
|
+
)
|
|
272
|
+
c_is = est.pad_to_ground(iw, ih, side, (side + top) / 2, eps)
|
|
273
|
+
_C(
|
|
274
|
+
frag,
|
|
275
|
+
f"C_{name}",
|
|
276
|
+
"island",
|
|
277
|
+
"gnd",
|
|
278
|
+
est.cap(
|
|
279
|
+
c_is, "analytic", f"{iw:g}×{ih:g} µm island in its pocket ({side:g} µm sides, {top:g} µm readout side)"
|
|
280
|
+
),
|
|
281
|
+
f"{name}.island_size",
|
|
282
|
+
)
|
|
283
|
+
_qubit_junction(frag, name, inst, p, "island", "gnd", note="carbon-nanotube weak link (not drawn): a JJ", kind="JJ")
|
|
284
|
+
frag.notes.append(f"{name}: the CNT junction is not drawn; modelled as a JJ with the design's junction values")
|
|
285
|
+
_C(
|
|
286
|
+
frag,
|
|
287
|
+
f"Cgate_{name}",
|
|
288
|
+
"island",
|
|
289
|
+
"gate",
|
|
290
|
+
est.cap(0.2, "rough", "M1 gate tip beside the junction, below the island (rough, ±100 %)"),
|
|
291
|
+
)
|
|
292
|
+
gl = _f(p.get("gate_length"), 50)
|
|
293
|
+
_C(frag, f"C_{name}_gate", "gate", "gnd", est.cap(est.cpw_line(gl + side, 10, 6, eps), "rough", "gate feed CPW"))
|
|
294
|
+
return frag
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
@register_lom("GatemonCoupler")
|
|
298
|
+
def gatemon_coupler_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
299
|
+
"""QPDK gatemon coupler: a straight CPW ``o1`` → ``o2`` (a line) and the cell's nominal ``coupling_capacitance``
|
|
300
|
+
from the line to the node at ``qubit`` (the gatemon island it is snapped to; the snap merges ``qubit`` with
|
|
301
|
+
that island, so the C links line and island, not a galvanic join)."""
|
|
302
|
+
p = cell_params(inst)
|
|
303
|
+
length = _f(p.get("length"), 600)
|
|
304
|
+
frag = Fragment(
|
|
305
|
+
nodes={"line": {"island": f"{name}.line"}, "qubit": {"island": f"{name}.qubit"}},
|
|
306
|
+
port_nodes={"o1": "line", "o2": "line", "qubit": "qubit"},
|
|
307
|
+
)
|
|
308
|
+
frag.lines.append(
|
|
309
|
+
Line(name, "line", ("o1", "o2"), length, _f(p.get("a"), 10), _f(p.get("b"), 6), ("short", "short"))
|
|
310
|
+
)
|
|
311
|
+
ck = _f(p.get("coupling_capacitance"), 5.4)
|
|
312
|
+
_C(
|
|
313
|
+
frag,
|
|
314
|
+
f"Cg_{name}",
|
|
315
|
+
"line",
|
|
316
|
+
"qubit",
|
|
317
|
+
est.cap(ck, "rough", "QPDK nominal coupling_capacitance (cell parameter)"),
|
|
318
|
+
f"{name}.coupling_capacitance",
|
|
319
|
+
)
|
|
320
|
+
return frag
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
@register_lom("HyperbolicVertexCoupler")
|
|
324
|
+
def hyperbolic_vertex_coupler_lom(name: str, inst, pdk) -> Fragment:
|
|
325
|
+
"""QPDK hyperbolic-lattice vertex coupler: ``q`` pie-slice pins of a disk, port ``o<k+1>`` on pin k; C between
|
|
326
|
+
neighbouring pins across the radial ``pin_gap`` and from each pin's arc to ground across ``ground_gap``
|
|
327
|
+
(non-neighbour pins neglected; rough)."""
|
|
328
|
+
p = cell_params(inst)
|
|
329
|
+
eps = est.substrate_eps(pdk)
|
|
330
|
+
q = max(int(_f(p.get("q"), 3)), 1)
|
|
331
|
+
r, gap, gg = _f(p.get("pin_radius"), 40), _f(p.get("pin_gap"), 4), _f(p.get("ground_gap"), 6)
|
|
332
|
+
lead = _f(p.get("lead_length"), 20)
|
|
333
|
+
frag = Fragment()
|
|
334
|
+
for k in range(q):
|
|
335
|
+
node = f"o{k + 1}"
|
|
336
|
+
frag.nodes[node] = {"island": f"{name}.{node}"}
|
|
337
|
+
frag.port_nodes[node] = node
|
|
338
|
+
cg = est.ring_to_ground(r, r, gg, eps) / q + est.cpw_line(lead, 10, 6, eps)
|
|
339
|
+
_C(
|
|
340
|
+
frag,
|
|
341
|
+
f"C_{name}_{node}",
|
|
342
|
+
node,
|
|
343
|
+
"gnd",
|
|
344
|
+
est.cap(cg, "rough", f"pin arc (1/{q} of a r {r:g} disk edge) + lead"),
|
|
345
|
+
)
|
|
346
|
+
slice_w = math.pi * r / q # mean width of a pie slice
|
|
347
|
+
pairs = [(k, (k + 1) % q) for k in range(q)] if q > 2 else ([(0, 1)] if q == 2 else [])
|
|
348
|
+
for i, j in pairs:
|
|
349
|
+
cm = est.coplanar_coupling(r, slice_w, slice_w, gap, eps)
|
|
350
|
+
_C(
|
|
351
|
+
frag,
|
|
352
|
+
f"C_{name}_o{i + 1}_o{j + 1}",
|
|
353
|
+
f"o{i + 1}",
|
|
354
|
+
f"o{j + 1}",
|
|
355
|
+
est.cap(cm, "rough", f"radial edges ({r:g} µm) across the {gap:g} µm pin gap (CPS)"),
|
|
356
|
+
f"{name}.pin_gap",
|
|
357
|
+
)
|
|
358
|
+
return frag
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
@register_lom("TransmonTaperedInsets")
|
|
362
|
+
def transmon_tapered_insets_lom(name: str, inst, pdk) -> Fragment:
|
|
363
|
+
"""SQDMetal TransmonTaperedInsets: floating; island1 = top pad (``port_squid_a``), island2 = bottom pad; each
|
|
364
|
+
connection pad is its own conductor (port ``<name>``) with a C to the qubit pad on its side (``loc_H``). Corner
|
|
365
|
+
pins are placement marks: ``top_*`` → island1, ``bottom_*`` → island2 (a capacitor snapped there couples to that
|
|
366
|
+
pad), pocket pins → ground. Pads as coupled strips in the pocket (round ends counted in the width; tapers,
|
|
367
|
+
insets and teeth neglected: analytic)."""
|
|
368
|
+
from quantcore_circuits.layouts.qubits.sqdmetal_cells import connection_pad_options # pylint: disable=C0415
|
|
369
|
+
from quantcore_circuits.layouts.qubits.xmon import _junction_params # pylint: disable=C0415
|
|
370
|
+
|
|
371
|
+
p = cell_params(inst)
|
|
372
|
+
eps = est.substrate_eps(pdk)
|
|
373
|
+
pw, ph, pg = _f(p.get("pad_width"), 800), _f(p.get("pad_height"), 110), _f(p.get("pad_gap"), 100)
|
|
374
|
+
kw, kh = _f(p.get("pocket_width"), 1000), _f(p.get("pocket_height"), 800)
|
|
375
|
+
lower = _f(p.get("pocket_lower_tighten"), 120)
|
|
376
|
+
width = pw + ph # with the round ends
|
|
377
|
+
side = max((kw - width) / 2, 1.0)
|
|
378
|
+
back_top = max(kh / 2 - pg / 2 - ph, 1.0)
|
|
379
|
+
back_bot = max(kh / 2 - lower - pg / 2 - ph, 1.0)
|
|
380
|
+
c1, c12 = est.two_pads(width, ph, pg, side, back_top, eps)
|
|
381
|
+
c2, _ = est.two_pads(width, ph, pg, side, back_bot, eps)
|
|
382
|
+
frag = Fragment(nodes={"island1": {"island": f"{name}.island1"}, "island2": {"island": f"{name}.island2"}})
|
|
383
|
+
frag.port_nodes |= {
|
|
384
|
+
"squid_a": "island1",
|
|
385
|
+
"squid_b": "island2",
|
|
386
|
+
"top_right_pin": "island1",
|
|
387
|
+
"top_left_pin": "island1",
|
|
388
|
+
"bottom_right_pin": "island2",
|
|
389
|
+
"bottom_left_pin": "island2",
|
|
390
|
+
"top_pocket_pin": "gnd",
|
|
391
|
+
"bottom_pocket_pin": "gnd",
|
|
392
|
+
}
|
|
393
|
+
f = f"{width:g}×{ph:g} µm pads across {pg:g} µm in a {kw:g}×{kh:g} µm pocket (coupled strips + CPW)"
|
|
394
|
+
_C(frag, f"C_{name}_1", "island1", "gnd", est.cap(c1, "analytic", f), f"{name}.pad_width")
|
|
395
|
+
_C(frag, f"C_{name}_2", "island2", "gnd", est.cap(c2, "analytic", f), f"{name}.pad_width")
|
|
396
|
+
_C(frag, f"C_{name}_12", "island1", "island2", est.cap(c12, "analytic", f), f"{name}.pad_gap")
|
|
397
|
+
_qubit_junction(frag, name, inst, p, "island1", "island2")
|
|
398
|
+
for pname, opts in _junction_params(p.get("connection_pads") or "{}").items():
|
|
399
|
+
o = connection_pad_options(pname, opts)
|
|
400
|
+
node = f"cp_{pname}"
|
|
401
|
+
frag.nodes[node] = {"island": f"{name}.{pname}"}
|
|
402
|
+
frag.port_nodes[pname] = node
|
|
403
|
+
qpad = "island1" if float(o["loc_H"]) > 0 else "island2"
|
|
404
|
+
cpw_, cph, gap = float(o["pad_width"]), float(o["pad_height"]), max(float(o["pad_gap"]), 0.5)
|
|
405
|
+
cg = est.coplanar_coupling(cpw_, cph, ph, gap, eps)
|
|
406
|
+
wire = max(kh / 2 - ph - pg / 2 - gap - cph, 0.0) + float(o["cpw_extend"])
|
|
407
|
+
cc = est.pad_to_ground(cpw_, cph, side, max(float(o["pocket_extent"]), 1.0), eps, open_edges=1) + est.cpw_line(
|
|
408
|
+
wire, float(o["cpw_width"]), float(o["cpw_gap"]), eps
|
|
409
|
+
)
|
|
410
|
+
_C(
|
|
411
|
+
frag,
|
|
412
|
+
f"Cg_{name}_{pname}",
|
|
413
|
+
qpad,
|
|
414
|
+
node,
|
|
415
|
+
est.cap(cg, "analytic", f"{cpw_:g}×{cph:g} µm connection pad facing the qubit pad across {gap:g} µm (CPS)"),
|
|
416
|
+
)
|
|
417
|
+
_C(frag, f"Cc_{name}_{pname}", node, "gnd", est.cap(cc, "rough", "connection pad + its CPW wire"))
|
|
418
|
+
return frag
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
@register_lom("SmoothCapacitorSemicircle")
|
|
422
|
+
def smooth_capacitor_semicircle_lom(name: str, inst, pdk) -> Fragment:
|
|
423
|
+
"""SQDMetal semicircle capacitor: one pad (port ``a``) whose semicircular bite wraps the qubit pad at ``target``
|
|
424
|
+
(a placement reference: snapped to a qubit pin, its node becomes that pad, so the C links pad and qubit pad).
|
|
425
|
+
C_target: the bite's arc facing the qubit pad's round end across an assumed 5 µm gap (the concentric SQDMetal
|
|
426
|
+
2_transmons geometry; rough); pad to ground across its clearances (rough)."""
|
|
427
|
+
p = cell_params(inst)
|
|
428
|
+
eps = est.substrate_eps(pdk)
|
|
429
|
+
w, length = _f(p.get("rect_width"), 190), _f(p.get("rect_length"), 170)
|
|
430
|
+
r = _f(p.get("semi_radius"), 61)
|
|
431
|
+
gs, gb = _f(p.get("gap_side"), 25), _f(p.get("gap_back"), 25)
|
|
432
|
+
tw, lead = _f(p.get("trace_width"), 10), _f(p.get("lead_length"), 0)
|
|
433
|
+
frag = Fragment(
|
|
434
|
+
nodes={"pad": {"island": f"{name}.pad"}, "target": {"island": f"{name}.target"}},
|
|
435
|
+
port_nodes={"a": "pad", "target": "target"},
|
|
436
|
+
)
|
|
437
|
+
ct = est.coplanar_coupling(math.pi * r, max(w / 2 - r, tw), 2 * r, 5.0, eps)
|
|
438
|
+
_C(
|
|
439
|
+
frag,
|
|
440
|
+
f"C_{name}",
|
|
441
|
+
"pad",
|
|
442
|
+
"target",
|
|
443
|
+
est.cap(ct, "rough", f"semicircle arc {math.pi * r:.0f} µm around the qubit pad end, assumed 5 µm gap (CPS)"),
|
|
444
|
+
f"{name}.semi_radius",
|
|
445
|
+
)
|
|
446
|
+
cg = est.pad_to_ground(w, length, gs, gb, eps, open_edges=1) + est.cpw_line(lead, tw, 6, eps)
|
|
447
|
+
_C(frag, f"C_{name}_pad", "pad", "gnd", est.cap(cg, "rough", f"{w:g}×{length:g} µm pad in its clearance + lead"))
|
|
448
|
+
return frag
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
# ---- pads ---------------------------------------------------------------------------------------------------------
|
|
452
|
+
@register_lom("ConnectorPad")
|
|
453
|
+
def connector_pad_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
454
|
+
"""Legacy wire-bond pad (v1): a 50 Ω port on the conductor its ``a`` port connects to."""
|
|
455
|
+
return Fragment(nodes={"pad": {"island": f"{name}.pad"}}, elements=[port_resistor(name)], port_nodes={"a": "pad"})
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
@register_lom("CpweBondPad")
|
|
459
|
+
def cpwe_bond_pad_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
460
|
+
"""CPW-E bond pad: a 50 Ω port at ``a``."""
|
|
461
|
+
return Fragment(nodes={"pad": {"island": f"{name}.pad"}}, elements=[port_resistor(name)], port_nodes={"a": "pad"})
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
@register_lom("TaperedPad")
|
|
465
|
+
def tapered_pad_lom(name: str, inst, pdk) -> Fragment:
|
|
466
|
+
"""Legacy probe pad tapering to a junction finger: the pad's C to ground (DC test pad, not an RF port)."""
|
|
467
|
+
p = cell_params(inst)
|
|
468
|
+
eps = est.substrate_eps(pdk)
|
|
469
|
+
w, h = _f(p.get("pad_width"), 275), _f(p.get("pad_height"), 300)
|
|
470
|
+
side = max((_f(p.get("window_width"), 300) - w) / 2, 1.0) if p.get("negative", True) else 50.0
|
|
471
|
+
c = est.pad_to_ground(w, h, side, side, eps)
|
|
472
|
+
frag = Fragment(nodes={"pad": {"island": f"{name}.pad"}}, port_nodes={"finger": "pad"})
|
|
473
|
+
_C(frag, f"C_{name}", "pad", "gnd", est.cap(c, "rough", f"{w:g}×{h:g} µm pad in a {side:g} µm clearance"))
|
|
474
|
+
return frag
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
# ---- lines and resonators -----------------------------------------------------------------------------------------
|
|
478
|
+
def _drawn_length(cls_name: str, p: dict, fallback: float) -> float:
|
|
479
|
+
"""Centre-line length (µm) from the legacy cell's own point function; ``fallback`` if it cannot run."""
|
|
480
|
+
from quantcore_circuits.layouts.others import legacy_resonators as lr # pylint: disable=import-outside-toplevel
|
|
481
|
+
|
|
482
|
+
try:
|
|
483
|
+
cls = getattr(lr, cls_name)
|
|
484
|
+
ns = SimpleNamespace(**p, layout=SimpleNamespace(dbu=0.001))
|
|
485
|
+
pts = [(q.x * 0.001, q.y * 0.001) for q in cls._points(ns)] # pylint: disable=protected-access
|
|
486
|
+
length = sum(math.dist(a, b) for a, b in zip(pts, pts[1:]))
|
|
487
|
+
return length if length > 0 else fallback
|
|
488
|
+
except Exception: # noqa: BLE001 pylint: disable=broad-except
|
|
489
|
+
return fallback
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
def _resonator_line(name, p, cls_name, ports, term, resonator=True, node="res") -> tuple[Fragment, float]:
|
|
493
|
+
length = _drawn_length(cls_name, p, _f(p.get("cpw_len"), 4000))
|
|
494
|
+
frag = Fragment(nodes={node: {"island": f"{name}.{node}"}}, port_nodes={q: node for q in ports if q})
|
|
495
|
+
frag.lines.append(
|
|
496
|
+
Line(name, node, ports, length, _f(p.get("a"), 10), _f(p.get("b"), 6), term, resonator, knob=f"{name}.cpw_len")
|
|
497
|
+
)
|
|
498
|
+
_knob(frag, f"{name}.cpw_len", _f(p.get("cpw_len"), 4000))
|
|
499
|
+
return frag, length
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
def _coupled_meander(name: str, inst, cls_name: str) -> Fragment:
|
|
503
|
+
p = cell_params(inst)
|
|
504
|
+
# ``ground`` draws the gap cap (open end); without it the trace runs into the ground plane unless connected
|
|
505
|
+
end = "open" if p.get("ground", True) else "short"
|
|
506
|
+
frag, _ = _resonator_line(name, p, cls_name, (None, "end"), ("short", end))
|
|
507
|
+
frag.hangers.append(
|
|
508
|
+
{
|
|
509
|
+
"line": name,
|
|
510
|
+
"coupling_length_um": _f(p.get("clength"), 500),
|
|
511
|
+
"ground_gap_um": max(_f(p.get("cgap"), 6), 0.5),
|
|
512
|
+
"end": "short",
|
|
513
|
+
"source": "coupler section next to a separate feedline (legacy placement)",
|
|
514
|
+
}
|
|
515
|
+
)
|
|
516
|
+
return frag
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
@register_lom("CoupledResonator")
|
|
520
|
+
def coupled_resonator_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
521
|
+
"""Legacy coupled resonator: λ/4 meander from the shorted start next to the coupler section to port ``end``."""
|
|
522
|
+
return _coupled_meander(name, inst, "CoupledResonator")
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
@register_lom("QubitResonator")
|
|
526
|
+
def qubit_resonator_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
527
|
+
"""Legacy qubit resonator: as CoupledResonator, the tail (port ``end``) runs to the qubit."""
|
|
528
|
+
return _coupled_meander(name, inst, "QubitResonator")
|
|
529
|
+
|
|
530
|
+
|
|
531
|
+
@register_lom("CpwResonator")
|
|
532
|
+
def cpw_resonator_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
533
|
+
"""Legacy CPW resonator: a resonator line between ``start`` and ``end`` (both run into ground when free: λ/2)."""
|
|
534
|
+
p = cell_params(inst)
|
|
535
|
+
frag, _ = _resonator_line(name, p, "CpwResonator", ("start", "end"), ("short", "short"))
|
|
536
|
+
frag.notes.append(f"{name}: coupling to a feedline is not in the cell; declare it with d.couple(...)")
|
|
537
|
+
return frag
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
@register_lom("CoupledConnector")
|
|
541
|
+
def coupled_connector_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
542
|
+
"""Legacy coupled connector: a line from the shorted ``start`` to ``end`` (λ/4 when ``end`` meets a capacitor,
|
|
543
|
+
a wire when both ends are connected)."""
|
|
544
|
+
p = cell_params(inst)
|
|
545
|
+
end = "short" if p.get("ground", False) else "open"
|
|
546
|
+
frag, _ = _resonator_line(
|
|
547
|
+
name, p, "CoupledConnector", ("start", "end"), ("short", end), resonator=False, node="line"
|
|
548
|
+
)
|
|
549
|
+
return frag
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
@register_lom("CpwSegment")
|
|
553
|
+
def cpw_segment_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
554
|
+
"""Legacy straight CPW (feedline): one conductor from ``a`` to ``b`` (a stub resonator only with a free end)."""
|
|
555
|
+
p = cell_params(inst)
|
|
556
|
+
length = _f(p.get("length"), 200)
|
|
557
|
+
frag = Fragment(nodes={"line": {"island": f"{name}.line"}}, port_nodes={"a": "line", "b": "line"})
|
|
558
|
+
frag.lines.append(Line(name, "line", ("a", "b"), length, _f(p.get("a"), 10), _f(p.get("b"), 6), ("short", "short")))
|
|
559
|
+
return frag
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
@register_lom("CpweQuarterWaveResonator")
|
|
563
|
+
def cpwe_quarter_wave_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
564
|
+
"""CPW-E λ/4: open coupler arm (no port) → bend → taper → meander → shorted end, as one λ/4 line.
|
|
565
|
+
|
|
566
|
+
The coupler arm runs next to a feedline the cell does not contain: declare ``d.couple("K_<R>", "<R>",
|
|
567
|
+
"<feedline instance>")`` for the hanger (coupled section at the open end; the ground strip is set by the
|
|
568
|
+
placement, 6 µm assumed).
|
|
569
|
+
"""
|
|
570
|
+
from quantcore_circuits.layouts.others.cpwe import CpweQuarterWaveResonator # pylint: disable=C0415
|
|
571
|
+
|
|
572
|
+
p = cell_params(inst)
|
|
573
|
+
length = CpweQuarterWaveResonator.qcc_resonator_length(p)
|
|
574
|
+
frag = Fragment(nodes={"res": {"island": f"{name}.res"}})
|
|
575
|
+
frag.lines.append(
|
|
576
|
+
Line(name, "res", (None, None), length, _f(p.get("a"), 10), _f(p.get("b"), 6), ("open", "short"), True)
|
|
577
|
+
)
|
|
578
|
+
frag.hangers.append(
|
|
579
|
+
{
|
|
580
|
+
"line": name,
|
|
581
|
+
"coupling_length_um": _f(p.get("cap_length"), 200),
|
|
582
|
+
"ground_gap_um": 6.0,
|
|
583
|
+
"end": "open",
|
|
584
|
+
"source": "rough: CPW-E coupler arm at the open end; ground strip to the feedline assumed 6 µm",
|
|
585
|
+
}
|
|
586
|
+
)
|
|
587
|
+
frag.notes.append(f"{name}: λ/4 of {length:.0f} µm (drawn); coupler arm CPW differs from the line CPW")
|
|
588
|
+
return frag
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
@register_lom("CpweMeanderLine")
|
|
592
|
+
def cpwe_meander_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
593
|
+
"""CPW-E meander (+ leads): a resonator line between ``a`` and ``b`` (λ/2 bus between two couplers, a stub
|
|
594
|
+
resonator with a free end, a wire to a port/feedline)."""
|
|
595
|
+
p = cell_params(inst)
|
|
596
|
+
a, b = _f(p.get("a"), 10), _f(p.get("b"), 6)
|
|
597
|
+
r, m_len = _f(p.get("meander_radius"), 50), _f(p.get("meander_length"), 500)
|
|
598
|
+
n = int(_f(p.get("meanders"), 2))
|
|
599
|
+
try:
|
|
600
|
+
from quantcore_circuits.layouts.others.cpwe import CpwePen # pylint: disable=import-outside-toplevel
|
|
601
|
+
|
|
602
|
+
_, _, ltot = CpwePen(0.001).meander_line(
|
|
603
|
+
0,
|
|
604
|
+
0,
|
|
605
|
+
"h",
|
|
606
|
+
a * 1e3,
|
|
607
|
+
b * 1e3,
|
|
608
|
+
r * 1e3,
|
|
609
|
+
m_len * 1e3,
|
|
610
|
+
_f(p.get("bias"), 0.5),
|
|
611
|
+
n,
|
|
612
|
+
bool(p.get("flip")),
|
|
613
|
+
bool(p.get("term_early")),
|
|
614
|
+
)
|
|
615
|
+
length = ltot / 1e3
|
|
616
|
+
except Exception: # noqa: BLE001 pylint: disable=broad-except
|
|
617
|
+
length = (2 * n + 1) * m_len + (2 * n + 1) * math.pi * r # rough: straight runs + half turns
|
|
618
|
+
length += 2 * max(_f(p.get("lead"), 0), 0.0)
|
|
619
|
+
frag = Fragment(nodes={"line": {"island": f"{name}.line"}}, port_nodes={"a": "line", "b": "line"})
|
|
620
|
+
frag.lines.append(Line(name, "line", ("a", "b"), length, a, b, ("short", "short"), True, knob=f"{name}.meanders"))
|
|
621
|
+
return frag
|
|
622
|
+
|
|
623
|
+
|
|
624
|
+
@register_lom("SpiralLine")
|
|
625
|
+
def spiral_line_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
626
|
+
"""Spiral line (legacy ``draw.spiral``): one conductor ``a`` → ``b``, a line of the drawn centre-line length with
|
|
627
|
+
the mean turn spacing as its gap (rough: neighbouring turns are not a ground plane; mutual inductance between
|
|
628
|
+
turns is not modelled; the film kinetic inductance enters as for any CPW). Open ends when nothing connects (a
|
|
629
|
+
spiral λ/2 resonator); an etched spiral (``metal=False``) is a slot, not a conductor: no element."""
|
|
630
|
+
from quantcore_circuits.layouts.others.spirals import SpiralLine # pylint: disable=import-outside-toplevel
|
|
631
|
+
|
|
632
|
+
p = cell_params(inst)
|
|
633
|
+
if p.get("metal") is False:
|
|
634
|
+
return Fragment(notes=[f"{name}: etched spiral (a slot in the ground plane): no circuit element"])
|
|
635
|
+
length, gap = SpiralLine.qcc_length(p), SpiralLine.qcc_turn_gap(p)
|
|
636
|
+
frag = Fragment(nodes={"line": {"island": f"{name}.line"}}, port_nodes={"a": "line", "b": "line"})
|
|
637
|
+
frag.lines.append(Line(name, "line", ("a", "b"), length, _f(p.get("width"), 2), gap, ("open", "open"), True))
|
|
638
|
+
frag.notes.append(
|
|
639
|
+
f"{name}: spiral line {length:.0f} µm (gap = mean turn spacing {gap:.2g} µm; rough; kinetic L as a CPW)"
|
|
640
|
+
)
|
|
641
|
+
return frag
|
|
642
|
+
|
|
643
|
+
|
|
644
|
+
@register_lom("CpweTaper")
|
|
645
|
+
def cpwe_taper_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
646
|
+
"""CPW-E taper: a pass-through section of ``length`` between ``a`` and ``b`` (``Line.through``: inside a
|
|
647
|
+
resonator it extends the line; the width step is not modelled, mean a/b)."""
|
|
648
|
+
p = cell_params(inst)
|
|
649
|
+
a = (_f(p.get("a"), 10) + _f(p.get("a_end"), 20)) / 2
|
|
650
|
+
b = (_f(p.get("b"), 6) + _f(p.get("b_end"), 12)) / 2
|
|
651
|
+
frag = Fragment(nodes={"line": {"island": f"{name}.line"}}, port_nodes={"a": "line", "b": "line"})
|
|
652
|
+
frag.lines.append(Line(name, "line", ("a", "b"), _f(p.get("length"), 100), a, b, ("short", "short"), through=True))
|
|
653
|
+
return frag
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
@register_lom("NeckTermination")
|
|
657
|
+
def neck_termination_lom(name: str, inst, pdk) -> Fragment:
|
|
658
|
+
"""QPDK neck termination: the line routed to ``o1`` ends shorted after a taper (``a`` → ``neck_width``) and a
|
|
659
|
+
narrow neck, both a strip in an etched window. A pass-through end section (``Line.through``, shorted far end):
|
|
660
|
+
the route is the resonator. A short series section at a current antinode adds the electrical length
|
|
661
|
+
ℓ · L'_section / L'_cpw, so taper and neck count at their per-length inductance (strip in the window, gap =
|
|
662
|
+
(window − width)/2) relative to the a/b CPW (analytic CPW formulas; rough)."""
|
|
663
|
+
from quantcore_circuits.analysis.synthesis import cpw_properties # pylint: disable=import-outside-toplevel
|
|
664
|
+
|
|
665
|
+
p = cell_params(inst)
|
|
666
|
+
a, b = _f(p.get("a"), 10), _f(p.get("b"), 6)
|
|
667
|
+
w, win = _f(p.get("neck_width"), 2), _f(p.get("window_width"), 380)
|
|
668
|
+
lt, ln = _f(p.get("taper_length"), 100), _f(p.get("neck_length"), 325)
|
|
669
|
+
|
|
670
|
+
def l_per_um(width: float, gap: float) -> float: # H/m up to a constant: Z0 / v_p
|
|
671
|
+
q = cpw_properties(6.0, width, gap, pdk.name)
|
|
672
|
+
return q["Z0_ohm"] / q["vp_m_s"]
|
|
673
|
+
|
|
674
|
+
ref = l_per_um(a, b)
|
|
675
|
+
mid = (a + w) / 2
|
|
676
|
+
taper_eq = lt * l_per_um(mid, max((win - mid) / 2, b)) / ref
|
|
677
|
+
neck_eq = ln * l_per_um(w, max((win - w) / 2, b)) / ref
|
|
678
|
+
frag = Fragment(nodes={"line": {"island": f"{name}.line"}}, port_nodes={"o1": "line"})
|
|
679
|
+
frag.lines.append(Line(name, "line", ("o1", None), taper_eq + neck_eq, a, b, ("short", "short"), through=True))
|
|
680
|
+
frag.notes.append(
|
|
681
|
+
f"{name}: taper {lt:g} µm + neck {ln:g} µm counted as {taper_eq + neck_eq:.0f} µm of {a:g}/{b:g} µm CPW "
|
|
682
|
+
f"(L' ratio {neck_eq / ln:.2f} for the neck; rough: no neck L_k beyond the CPW formula, no C of the window)"
|
|
683
|
+
)
|
|
684
|
+
return frag
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
@register_lom("CpweOpenEnd")
|
|
688
|
+
def cpwe_open_end_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
689
|
+
"""CPW-E open termination: a zero-length open end; a route into it becomes an open-ended resonator."""
|
|
690
|
+
p = cell_params(inst)
|
|
691
|
+
frag = Fragment(nodes={"end": {"island": f"{name}.end"}}, port_nodes={"a": "end"})
|
|
692
|
+
frag.lines.append(Line(name, "end", ("a", None), 0.0, _f(p.get("a"), 10), _f(p.get("b"), 6), ("open", "open")))
|
|
693
|
+
return frag
|
|
694
|
+
|
|
695
|
+
|
|
696
|
+
# ---- CPW-E capacitors ---------------------------------------------------------------------------------------------
|
|
697
|
+
def _pi(name, cab, cg, kind_ab, formula_ab, formula_g, knob=None) -> Fragment:
|
|
698
|
+
frag = Fragment(nodes={"a": {"island": f"{name}.a"}, "b": {"island": f"{name}.b"}}, port_nodes={"a": "a", "b": "b"})
|
|
699
|
+
_C(frag, f"C_{name}", "a", "b", est.cap(cab, kind_ab, formula_ab), knob)
|
|
700
|
+
_C(frag, f"C_{name}_a", "a", "gnd", est.cap(cg, "rough", formula_g))
|
|
701
|
+
_C(frag, f"C_{name}_b", "b", "gnd", est.cap(cg, "rough", formula_g))
|
|
702
|
+
return frag
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
@register_lom("CpweFingerCapacitor")
|
|
706
|
+
def cpwe_finger_capacitor_lom(name: str, inst, pdk) -> Fragment:
|
|
707
|
+
"""CPW-E interdigital capacitor in the centre line: ``fingers`` fingers sharing the centre width, overlap
|
|
708
|
+
``finger_length − finger_gap`` (Igreja–Dias) + tip gaps; C to ground: half the section as CPW each side."""
|
|
709
|
+
p = cell_params(inst)
|
|
710
|
+
eps = est.substrate_eps(pdk)
|
|
711
|
+
a, b = _f(p.get("a"), 10), _f(p.get("b"), 6)
|
|
712
|
+
n, sep, flen = int(_f(p.get("fingers"), 4)), _f(p.get("finger_gap"), 2), _f(p.get("finger_length"), 50)
|
|
713
|
+
fw = max((a - (n - 1) * sep) / max(n, 1), 0.1)
|
|
714
|
+
cab = est.interdigital(n, fw, sep, max(flen - sep, 0.0), eps)
|
|
715
|
+
cab += est.coplanar_coupling(n * fw, max(fw, 10.0), max(fw, 10.0), max(sep, 0.5), eps)
|
|
716
|
+
cg = est.cpw_line((flen + sep) / 2, a, b, eps)
|
|
717
|
+
return _pi(
|
|
718
|
+
name,
|
|
719
|
+
cab,
|
|
720
|
+
cg,
|
|
721
|
+
"analytic",
|
|
722
|
+
f"{n} fingers {fw:.2g} µm / {sep:g} µm, overlap {flen - sep:g} µm (Igreja & Dias 2004) + tips",
|
|
723
|
+
"half the capacitor section as CPW",
|
|
724
|
+
f"{name}.finger_length",
|
|
725
|
+
)
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
@register_lom("CpweGapCapacitor")
|
|
729
|
+
def cpwe_gap_capacitor_lom(name: str, inst, pdk) -> Fragment:
|
|
730
|
+
"""CPW-E gap in the centre line: end-to-end C across ``cap_gap`` (rough); open-end fringe to ground each side."""
|
|
731
|
+
p = cell_params(inst)
|
|
732
|
+
eps = est.substrate_eps(pdk)
|
|
733
|
+
a, b, g = _f(p.get("a"), 10), _f(p.get("b"), 6), max(_f(p.get("cap_gap"), 5), 0.1)
|
|
734
|
+
cab = est.coplanar_coupling(a, max(a, 10.0), max(a, 10.0), g, eps)
|
|
735
|
+
cg = est.cpw_line(b, a, b, eps)
|
|
736
|
+
return _pi(
|
|
737
|
+
name,
|
|
738
|
+
cab,
|
|
739
|
+
cg,
|
|
740
|
+
"rough",
|
|
741
|
+
f"centre-line ends {a:g} µm wide across {g:g} µm (CPS)",
|
|
742
|
+
"open-end fringe ≈ a CPW stub one gap long",
|
|
743
|
+
f"{name}.cap_gap",
|
|
744
|
+
)
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
@register_lom("CpweFingerLine")
|
|
748
|
+
def cpwe_finger_line_lom(name: str, inst, pdk) -> Fragment:
|
|
749
|
+
"""CPW-E finger line: the centre conductor continues from ``a`` to ``b`` (a wire) with interleaved fingers from
|
|
750
|
+
the centre and the ground in both gaps: a shunt C to ground (interdigital per side + the section as CPW)."""
|
|
751
|
+
p = cell_params(inst)
|
|
752
|
+
eps = est.substrate_eps(pdk)
|
|
753
|
+
a, b = _f(p.get("a"), 10), _f(p.get("b"), 6)
|
|
754
|
+
n, sep = int(_f(p.get("fingers"), 10)), _f(p.get("finger_gap"), 2)
|
|
755
|
+
flen, fw = _f(p.get("finger_length"), 4), _f(p.get("finger_width"), 2)
|
|
756
|
+
overlap = max(2 * flen - b, 0.0)
|
|
757
|
+
total = n * fw + (n - 1) * sep
|
|
758
|
+
c = 2 * est.interdigital(n, fw, sep, overlap, eps) + est.cpw_line(total, a, max(b - flen, 0.5), eps)
|
|
759
|
+
frag = Fragment(nodes={"line": {"island": f"{name}.line"}}, port_nodes={"a": "line", "b": "line"})
|
|
760
|
+
_C(
|
|
761
|
+
frag,
|
|
762
|
+
f"C_{name}",
|
|
763
|
+
"line",
|
|
764
|
+
"gnd",
|
|
765
|
+
est.cap(c, "rough", f"{n} fingers per gap, overlap {overlap:g} µm (Igreja & Dias) + {total:g} µm of CPW"),
|
|
766
|
+
f"{name}.fingers",
|
|
767
|
+
)
|
|
768
|
+
return frag
|
|
769
|
+
|
|
770
|
+
|
|
771
|
+
# ---- no circuit elements ------------------------------------------------------------------------------------------
|
|
772
|
+
@register_lom("FluxHoleArray")
|
|
773
|
+
@register_lom("FluxHoles")
|
|
774
|
+
def flux_holes_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
775
|
+
"""Flux-trapping holes in the ground plane: no ports, no circuit elements."""
|
|
776
|
+
return Fragment()
|
|
777
|
+
|
|
778
|
+
|
|
779
|
+
@register_lom("WaveguideCoplanarStraight")
|
|
780
|
+
def kqc_cpw_segment_lom(name: str, inst, pdk) -> Fragment: # noqa: ARG001
|
|
781
|
+
"""KQC bare straight CPW segment (the piece routes are drawn with): no ports, so no circuit elements; connect
|
|
782
|
+
with a route or a ``WaveguideCoplanar``. (``WaveguideCoplanarCurved`` has ports and a line model since
|
|
783
|
+
2026-11-15: :mod:`.kqc_models`.)"""
|
|
784
|
+
return Fragment(notes=[f"{name}: bare KQC CPW segment without ports; no circuit elements"])
|