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,270 @@
|
|
|
1
|
+
"""``<name>.qcc.json`` next to every written layout: what the KLayout plugin needs to edit a design in the GUI.
|
|
2
|
+
|
|
3
|
+
The plugin runs in KLayout's own Python (pya + stdlib only), so instead of importing quantcore_circuits it reads this
|
|
4
|
+
file: the design path, every port (position, outward direction, CPW a/b), instance boxes and placements, and the
|
|
5
|
+
routes as built (sharp node polyline, user waypoints, bend radius, lengths). Coordinates are µm, chip frame.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
import json
|
|
11
|
+
import os
|
|
12
|
+
import tempfile
|
|
13
|
+
import warnings
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
from kqcircuits.pya_resolver import pya
|
|
17
|
+
|
|
18
|
+
from quantcore_circuits.route.router import RoutingError
|
|
19
|
+
|
|
20
|
+
SIDECAR_SCHEMA = "qcc-sidecar/0.1"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def sidecar_path(layout_path: str | Path) -> Path:
|
|
24
|
+
p = Path(layout_path)
|
|
25
|
+
return p.with_name(p.stem + ".qcc.json")
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _plain(v):
|
|
29
|
+
"""``v`` as plain JSON (dicts, lists, numbers, strings; anything else as its string)."""
|
|
30
|
+
if isinstance(v, dict):
|
|
31
|
+
return {str(k): _plain(x) for k, x in v.items()}
|
|
32
|
+
if isinstance(v, (list, tuple)):
|
|
33
|
+
return [_plain(x) for x in v]
|
|
34
|
+
if v is None or isinstance(v, (bool, int, str)):
|
|
35
|
+
return v
|
|
36
|
+
if isinstance(v, float):
|
|
37
|
+
return v if v == v and abs(v) != float("inf") else None
|
|
38
|
+
return str(v)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def _xy(p) -> list[float]:
|
|
42
|
+
return [round(p.x, 4), round(p.y, 4)]
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _end(end) -> object:
|
|
46
|
+
return end if isinstance(end, str) else end.model_dump(mode="json")
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def instance_results(design, run_root: str | Path = "build", layout_path: str | Path | None = None) -> dict:
|
|
50
|
+
"""Per-instance results for the plugin panel, from the design's run state (``<run_root>/<name>/state.json``).
|
|
51
|
+
|
|
52
|
+
One entry per dashboard element that is an instance or a route of ``design`` (qubits, resonators, feedline,
|
|
53
|
+
pads): ``{"kind", "status", "params": [{key, label, value, unit, status, target, source}], "updated",
|
|
54
|
+
"stale"}``. ``stale`` is true when the state was computed for another revision of the design (hash differs), so
|
|
55
|
+
the panel can grey it out. Empty when there is no run yet or the state cannot be read.
|
|
56
|
+
"""
|
|
57
|
+
from quantcore_circuits.design import design_hash # pylint: disable=import-outside-toplevel
|
|
58
|
+
from quantcore_circuits.track import run_dir_for # pylint: disable=import-outside-toplevel
|
|
59
|
+
|
|
60
|
+
candidates = [run_dir_for(design.name, run_root) / "state.json"]
|
|
61
|
+
if layout_path is not None: # the GUI runs the loop beside the layout (<design dir>/build/<name>/state.json)
|
|
62
|
+
candidates.append(Path(layout_path).resolve().parent / design.name / "state.json")
|
|
63
|
+
candidates = sorted((c for c in candidates if c.exists()), key=lambda c: c.stat().st_mtime, reverse=True)
|
|
64
|
+
try:
|
|
65
|
+
state = json.loads(candidates[0].read_text(encoding="utf-8"))
|
|
66
|
+
except (IndexError, OSError, ValueError):
|
|
67
|
+
return {}
|
|
68
|
+
stale = (state.get("design") or {}).get("hash") != design_hash(design)
|
|
69
|
+
keys = ("key", "label", "value", "unit", "status", "target", "source")
|
|
70
|
+
out = {}
|
|
71
|
+
for el in state.get("elements") or []:
|
|
72
|
+
name = el.get("id")
|
|
73
|
+
if name not in design.instances and name not in design.routes:
|
|
74
|
+
continue
|
|
75
|
+
out[name] = {
|
|
76
|
+
"kind": el.get("kind"),
|
|
77
|
+
"status": el.get("status"),
|
|
78
|
+
"params": [{k: p.get(k) for k in keys} for p in el.get("params") or []],
|
|
79
|
+
"updated": state.get("updated"),
|
|
80
|
+
"stale": stale,
|
|
81
|
+
}
|
|
82
|
+
return out
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
def _failed_entry(design, name: str, f, pdk) -> dict:
|
|
86
|
+
"""A route left out of the build: why, the path the design asks for (``polyline``: its ends and nodes, in the
|
|
87
|
+
shape of a built route so the plugin's route handles work on it) and the last good geometry, if any."""
|
|
88
|
+
route = design.routes[name]
|
|
89
|
+
waypoints = [tuple(n) if isinstance(n, tuple) else tuple(n.at) for n in route.nodes]
|
|
90
|
+
attempt = [_xy(p) for p in f.attempt if p is not None]
|
|
91
|
+
first = 1 if f.attempt and f.attempt[0] is not None else 0 # polyline index of the first node
|
|
92
|
+
return {
|
|
93
|
+
"error": f.error,
|
|
94
|
+
"from": _end(route.from_),
|
|
95
|
+
"to": _end(route.to),
|
|
96
|
+
"type": route.type,
|
|
97
|
+
"polyline": attempt,
|
|
98
|
+
"waypoints": [list(w) for w in waypoints],
|
|
99
|
+
"waypoint_r": [None if isinstance(n, tuple) else n.r for n in route.nodes],
|
|
100
|
+
"waypoint_index": [first + i for i in range(len(waypoints))],
|
|
101
|
+
"fixed_segments": [],
|
|
102
|
+
"r": route.r if route.r is not None else pdk.turn_radius,
|
|
103
|
+
"a": route.a if route.a is not None else pdk.cpw_a,
|
|
104
|
+
"b": route.b if route.b is not None else pdk.cpw_b,
|
|
105
|
+
"length": (f.last_good or {}).get("length"),
|
|
106
|
+
"target_length": route.length if route.type == "meander" else None,
|
|
107
|
+
"last_good": f.last_good,
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
def instance_junction_entry(name: str, inst, pdk) -> dict | None:
|
|
112
|
+
"""``instances.<name>.junction`` of the sidecar: the junction the LOM and the eigenmode / driven exports take
|
|
113
|
+
(:func:`~quantcore_circuits.lom.fragment.instance_junction`) — ``{"kind": "JJ" | "SQUID", "Lj0_nH", "Cj_fF",
|
|
114
|
+
"flux_phi0", "asym", "Lj_eff_nH", "source"}`` (``Lj0_nH`` / ``Lj_eff_nH`` / ``source`` None: no value; ``"error"``
|
|
115
|
+
when the flux leaves no finite L). None for a component without a junction."""
|
|
116
|
+
from quantcore_circuits.lom.fragment import instance_junction # pylint: disable=import-outside-toplevel
|
|
117
|
+
|
|
118
|
+
try:
|
|
119
|
+
with warnings.catch_warnings():
|
|
120
|
+
warnings.simplefilter("ignore")
|
|
121
|
+
ej = instance_junction(name, inst, pdk)
|
|
122
|
+
except Exception: # noqa: BLE001 (never block a build on the junction overlay)
|
|
123
|
+
return None
|
|
124
|
+
if ej is None or ej.kind is None:
|
|
125
|
+
return None
|
|
126
|
+
return _plain(ej.as_dict())
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def sidecar_dict(result, layout_path: str | Path | None = None, overlays: bool = True) -> dict:
|
|
130
|
+
"""Sidecar content; ``overlays`` adds the fast DRC, the LOM node map and per-instance results (for the plugin)."""
|
|
131
|
+
from quantcore_circuits.pdk import get_pdk # pylint: disable=import-outside-toplevel
|
|
132
|
+
|
|
133
|
+
design, plan = result.design, result.plan
|
|
134
|
+
pdk = get_pdk(design.pdk)
|
|
135
|
+
base = get_pdk(design.pdk.split("+substrate(", 1)[0])
|
|
136
|
+
ports = {
|
|
137
|
+
name: {
|
|
138
|
+
"pos": _xy(p.pos),
|
|
139
|
+
"dir": [round(p.dir.x, 6), round(p.dir.y, 6)] if p.dir is not None else None, # some ports have none
|
|
140
|
+
"a": p.a,
|
|
141
|
+
"b": p.b,
|
|
142
|
+
}
|
|
143
|
+
for name, p in plan.all_ports().items()
|
|
144
|
+
}
|
|
145
|
+
gap = result.layout.layer(pya.LayerInfo(130, 1)) # 1t1_base_metal_gap_wo_grid
|
|
146
|
+
boxes = {}
|
|
147
|
+
for inst in result.cell.each_inst():
|
|
148
|
+
name = inst.property("id")
|
|
149
|
+
if name in design.instances:
|
|
150
|
+
cell = result.layout.cell(inst.cell_index)
|
|
151
|
+
b = cell.dbbox_per_layer(gap)
|
|
152
|
+
b = (b if not b.empty() else cell.dbbox()).transformed(inst.dcplx_trans)
|
|
153
|
+
boxes[name] = [round(b.left, 3), round(b.bottom, 3), round(b.right, 3), round(b.top, 3)]
|
|
154
|
+
instances = {}
|
|
155
|
+
for name, inst in design.instances.items():
|
|
156
|
+
placed = plan.instances[name]
|
|
157
|
+
t = placed.trans
|
|
158
|
+
instances[name] = {
|
|
159
|
+
"cell": inst.cell,
|
|
160
|
+
"bbox": boxes.get(name),
|
|
161
|
+
"place": inst.place.model_dump(mode="json", exclude_defaults=True),
|
|
162
|
+
"trans": {"at": _xy(t.disp), "rot": round(t.angle, 6), "mirror": t.is_mirror()},
|
|
163
|
+
"ports": sorted(placed.local_ports),
|
|
164
|
+
}
|
|
165
|
+
junction = instance_junction_entry(name, inst, pdk)
|
|
166
|
+
if junction is not None: # additive: only components with a junction (JJ / SQUID) carry it
|
|
167
|
+
instances[name]["junction"] = junction
|
|
168
|
+
routes = {}
|
|
169
|
+
for name, route in design.routes.items():
|
|
170
|
+
rp = plan.routes.get(name)
|
|
171
|
+
if rp is None: # failed (keep-going build): listed under failed_routes
|
|
172
|
+
continue
|
|
173
|
+
poly = rp.polyline()
|
|
174
|
+
waypoints = [tuple(n) if isinstance(n, tuple) else tuple(n.at) for n in route.nodes]
|
|
175
|
+
routes[name] = {
|
|
176
|
+
"from": _end(route.from_),
|
|
177
|
+
"to": _end(route.to),
|
|
178
|
+
"type": route.type,
|
|
179
|
+
"polyline": [_xy(p) for p in poly],
|
|
180
|
+
"waypoints": [list(w) for w in waypoints],
|
|
181
|
+
# per-corner bend radius of each waypoint (None = the route radius): the plugin's curvature handles
|
|
182
|
+
"waypoint_r": [None if isinstance(n, tuple) else n.r for n in route.nodes],
|
|
183
|
+
"waypoint_index": [
|
|
184
|
+
min(range(len(poly)), key=lambda i, w=w: (poly[i] - pya.DPoint(*w)).length()) for w in waypoints
|
|
185
|
+
],
|
|
186
|
+
"fixed_segments": sorted(rp.fixed_segments),
|
|
187
|
+
"r": rp.params.get("r", pdk.turn_radius),
|
|
188
|
+
"a": rp.params.get("a", pdk.cpw_a),
|
|
189
|
+
"b": rp.params.get("b", pdk.cpw_b),
|
|
190
|
+
"length": rp.length,
|
|
191
|
+
"target_length": rp.target_length,
|
|
192
|
+
}
|
|
193
|
+
failed = {name: _failed_entry(design, name, f, pdk) for name, f in plan.failed.items()}
|
|
194
|
+
drc, lom = [], {}
|
|
195
|
+
try:
|
|
196
|
+
if not overlays:
|
|
197
|
+
raise LookupError("overlays off")
|
|
198
|
+
from quantcore_circuits.assembly.drc import check # pylint: disable=import-outside-toplevel
|
|
199
|
+
from quantcore_circuits.lom import lom_from_design # pylint: disable=import-outside-toplevel
|
|
200
|
+
|
|
201
|
+
drc = check(result, netlist=False).to_json()
|
|
202
|
+
from quantcore_circuits.assembly.last_good import resolve # pylint: disable=import-outside-toplevel
|
|
203
|
+
|
|
204
|
+
with warnings.catch_warnings(): # the failed route is already reported (failed_routes, route_failed)
|
|
205
|
+
warnings.simplefilter("ignore", RuntimeWarning)
|
|
206
|
+
lb = lom_from_design(design, plan=resolve(plan))
|
|
207
|
+
lom = {
|
|
208
|
+
"nodes": {n: s.layout for n, s in lb.model.nodes.items()},
|
|
209
|
+
"port_nodes": lb.port_map,
|
|
210
|
+
# values and knobs too: the plugin shows each component's circuit (C, L_J, the line, the hanger) in its
|
|
211
|
+
# dialog; plain JSON (numbers, strings, lists)
|
|
212
|
+
"branches": {n: {"type": b.type, "nodes": list(b.nodes), "value": _plain(b.value), "knob": _plain(b.knob)}
|
|
213
|
+
for n, b in lb.model.branches.items()},
|
|
214
|
+
"controls": lb.model.controls,
|
|
215
|
+
}
|
|
216
|
+
except LookupError:
|
|
217
|
+
pass
|
|
218
|
+
except RoutingError: # a failed route without a last good one: no LOM overlay (the DRC names the route)
|
|
219
|
+
lom = {}
|
|
220
|
+
except Exception as e: # noqa: BLE001 (never block a build on the overlays)
|
|
221
|
+
drc = [
|
|
222
|
+
{
|
|
223
|
+
"severity": "warning",
|
|
224
|
+
"rule": "drc_failed",
|
|
225
|
+
"message": f"{type(e).__name__}: {e}",
|
|
226
|
+
"where": [],
|
|
227
|
+
"objects": [],
|
|
228
|
+
}
|
|
229
|
+
]
|
|
230
|
+
return {
|
|
231
|
+
"schema": SIDECAR_SCHEMA,
|
|
232
|
+
"design": str(result.source.resolve()) if getattr(result, "source", None) else None,
|
|
233
|
+
"layout": str(Path(layout_path).resolve()) if layout_path else None,
|
|
234
|
+
"name": design.name,
|
|
235
|
+
"hash": result.hash,
|
|
236
|
+
"chip_box": list(design.chip.box),
|
|
237
|
+
"pdk": {
|
|
238
|
+
"name": pdk.name,
|
|
239
|
+
"cpw_a": pdk.cpw_a,
|
|
240
|
+
"cpw_b": pdk.cpw_b,
|
|
241
|
+
"turn_radius": pdk.turn_radius,
|
|
242
|
+
"grid_um": pdk.design_grid_um,
|
|
243
|
+
# the substrate (the design's own when its pdk name carries "+substrate(...)"): the plugin's estimates
|
|
244
|
+
"substrate_height_um": pdk.stack.substrate_height,
|
|
245
|
+
"substrate_eps_r": pdk.stack.substrate_permittivity,
|
|
246
|
+
"substrate_tan_d": pdk.stack.substrate_loss_tangent,
|
|
247
|
+
"substrate_material": pdk.stack.substrate_material,
|
|
248
|
+
"junction_gap_meV": pdk.junction.gap_meV, # I_c·R_n = πΔ/2e (the plugin's Junction values)
|
|
249
|
+
"base": base.name, # the PDK without the design's own substrate, and its substrate
|
|
250
|
+
"base_substrate": {"h": base.stack.substrate_height, "eps_r": base.stack.substrate_permittivity,
|
|
251
|
+
"tan_d": base.stack.substrate_loss_tangent},
|
|
252
|
+
},
|
|
253
|
+
"ports": ports,
|
|
254
|
+
"instances": instances,
|
|
255
|
+
"routes": routes,
|
|
256
|
+
**({"failed_routes": failed} if failed else {}), # keep-going builds only: routes left out of the layout
|
|
257
|
+
"drc": drc,
|
|
258
|
+
"lom": lom,
|
|
259
|
+
"results": instance_results(design, layout_path=layout_path) if overlays else {},
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
def write_sidecar(result, layout_path: str | Path) -> Path:
|
|
264
|
+
path = sidecar_path(layout_path)
|
|
265
|
+
data = json.dumps(sidecar_dict(result, layout_path), indent=1)
|
|
266
|
+
fd, tmp = tempfile.mkstemp(suffix=".json", dir=path.parent)
|
|
267
|
+
with os.fdopen(fd, "w", encoding="utf-8") as f:
|
|
268
|
+
f.write(data)
|
|
269
|
+
os.replace(tmp, path)
|
|
270
|
+
return path
|