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,208 @@
|
|
|
1
|
+
"""KQCircuits files that the ``kqcircuits`` wheel on PyPI does not ship, taken from KQCircuits itself.
|
|
2
|
+
|
|
3
|
+
* The simulation scripts: KQC's ``export_ansys`` / ``export_elmer`` copy the scripts in
|
|
4
|
+
``kqcircuits.defaults.ANSYS_SCRIPT_PATHS`` / ``ELMER_SCRIPT_PATHS`` (and ``SIM_SCRIPT_PATH / "elmer_modules"``) into
|
|
5
|
+
each job folder. They live in the KQCircuits repository (``klayout_package/python/scripts``), outside the package.
|
|
6
|
+
* ``kqcircuits/util/font_polygons.oas``: the font of KQC's polygon labels (``ChipFrame`` and the chips built on it).
|
|
7
|
+
|
|
8
|
+
A KQCircuits git checkout (editable install) or KQC's KLayout Salt package has them. quantcore-circuits copies none of
|
|
9
|
+
KQCircuits' code: it uses KQCircuits' own files, found in this order:
|
|
10
|
+
|
|
11
|
+
1. KQC's own location (a checkout, an editable install, ``KQC_ROOT_PATH``);
|
|
12
|
+
2. ``QCC_KQC_SCRIPTS``: the ``klayout_package/python/scripts`` folder of a KQCircuits checkout (the font is read from
|
|
13
|
+
the checkout's ``klayout_package/python/kqcircuits`` beside it);
|
|
14
|
+
3. the user cache that ``qcc kqc-files`` fills from the KQCircuits release of the installed version on GitHub
|
|
15
|
+
(``QCC_CACHE_DIR`` moves the cache).
|
|
16
|
+
|
|
17
|
+
:func:`ensure_kqc_scripts` (before an export) and :func:`ensure_kqc_data` (when the KQC libraries load) point KQC at
|
|
18
|
+
the first one found, and change nothing when KQC has its own.
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
import io
|
|
24
|
+
import os
|
|
25
|
+
import shutil
|
|
26
|
+
import sys
|
|
27
|
+
import tempfile
|
|
28
|
+
import urllib.request
|
|
29
|
+
import zipfile
|
|
30
|
+
from importlib import metadata
|
|
31
|
+
from pathlib import Path
|
|
32
|
+
|
|
33
|
+
ENV_SCRIPTS = "QCC_KQC_SCRIPTS"
|
|
34
|
+
ENV_CACHE = "QCC_CACHE_DIR"
|
|
35
|
+
REPO = "https://github.com/iqm-finland/KQCircuits"
|
|
36
|
+
PY_IN_REPO = "klayout_package/python"
|
|
37
|
+
NEEDED = ("simulations/ansys", "simulations/post_process") # what every AEDT export copies
|
|
38
|
+
FONT = "kqcircuits/util/font_polygons.oas" # relative to klayout_package/python
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def cache_root() -> Path:
|
|
42
|
+
"""The quantcore-circuits user cache (``QCC_CACHE_DIR``, else the platform's user cache folder)."""
|
|
43
|
+
if os.environ.get(ENV_CACHE):
|
|
44
|
+
return Path(os.environ[ENV_CACHE])
|
|
45
|
+
if sys.platform == "win32":
|
|
46
|
+
return Path(os.environ.get("LOCALAPPDATA", Path.home() / "AppData" / "Local")) / "quantcore-circuits" / "cache"
|
|
47
|
+
return Path(os.environ.get("XDG_CACHE_HOME", Path.home() / ".cache")) / "quantcore-circuits"
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def kqc_version() -> str:
|
|
51
|
+
"""The installed kqcircuits version (``0.0.1`` for a checkout without git tags)."""
|
|
52
|
+
return metadata.version("kqcircuits")
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def cached_root(version: str | None = None) -> Path:
|
|
56
|
+
"""The cache folder of one kqcircuits version: ``scripts/`` and ``kqcircuits/util/font_polygons.oas``, laid out
|
|
57
|
+
like ``klayout_package/python`` of a checkout."""
|
|
58
|
+
return cache_root() / f"kqcircuits-{version or kqc_version()}"
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _complete(scripts: Path) -> bool:
|
|
62
|
+
return all((scripts / n).is_dir() for n in NEEDED)
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def _candidates() -> list[tuple[Path, str]]:
|
|
66
|
+
"""``klayout_package/python``-like roots other than KQC's own: ``QCC_KQC_SCRIPTS``'s parent, then the cache."""
|
|
67
|
+
out = []
|
|
68
|
+
if os.environ.get(ENV_SCRIPTS):
|
|
69
|
+
out.append((Path(os.environ[ENV_SCRIPTS]).parent, ENV_SCRIPTS))
|
|
70
|
+
try:
|
|
71
|
+
out.append((cached_root(), "cache"))
|
|
72
|
+
except metadata.PackageNotFoundError:
|
|
73
|
+
pass
|
|
74
|
+
return out
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def find_kqc_scripts() -> tuple[Path | None, str]:
|
|
78
|
+
"""``(scripts folder, where)``: the first complete KQCircuits ``scripts`` folder, or ``(None, "")``."""
|
|
79
|
+
from kqcircuits import defaults # pylint: disable=import-outside-toplevel
|
|
80
|
+
|
|
81
|
+
own = Path(defaults.ANSYS_SCRIPT_PATHS[0]).parents[1]
|
|
82
|
+
if _complete(own):
|
|
83
|
+
return own, "kqcircuits"
|
|
84
|
+
if os.environ.get(ENV_SCRIPTS) and _complete(Path(os.environ[ENV_SCRIPTS])):
|
|
85
|
+
return Path(os.environ[ENV_SCRIPTS]), ENV_SCRIPTS
|
|
86
|
+
for root, where in _candidates():
|
|
87
|
+
if where == "cache" and _complete(root / "scripts"):
|
|
88
|
+
return root / "scripts", where
|
|
89
|
+
return None, ""
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
def missing_message() -> str:
|
|
93
|
+
try:
|
|
94
|
+
ver = kqc_version()
|
|
95
|
+
except metadata.PackageNotFoundError:
|
|
96
|
+
ver = "?"
|
|
97
|
+
return (
|
|
98
|
+
f"KQCircuits' simulation scripts are not installed (kqcircuits {ver} from PyPI has no scripts/ folder). "
|
|
99
|
+
f"Run `qcc kqc-files` once (it downloads them from {REPO} at tag v{ver}), or set {ENV_SCRIPTS} to "
|
|
100
|
+
f"<KQCircuits checkout>/{PY_IN_REPO}/scripts."
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
def ensure_kqc_scripts() -> Path:
|
|
105
|
+
"""Return the KQCircuits ``scripts`` folder the export uses; point KQC at it when it is not KQC's own.
|
|
106
|
+
|
|
107
|
+
The lists in ``kqcircuits.defaults`` are changed in place, so the names KQC's export modules imported from it see
|
|
108
|
+
the change; ``SIM_SCRIPT_PATH`` (a path imported by name) is also set in ``elmer_export``.
|
|
109
|
+
"""
|
|
110
|
+
from kqcircuits import defaults # pylint: disable=import-outside-toplevel
|
|
111
|
+
|
|
112
|
+
scripts, where = find_kqc_scripts()
|
|
113
|
+
if scripts is None:
|
|
114
|
+
raise FileNotFoundError(missing_message())
|
|
115
|
+
if where == "kqcircuits":
|
|
116
|
+
return scripts
|
|
117
|
+
sims = scripts / "simulations"
|
|
118
|
+
defaults.ANSYS_SCRIPT_PATHS[:] = [sims / "ansys", sims / "post_process"]
|
|
119
|
+
defaults.ELMER_SCRIPT_PATHS[:] = [sims / "elmer", sims / "post_process"]
|
|
120
|
+
defaults.SIM_SCRIPT_PATH = sims
|
|
121
|
+
try:
|
|
122
|
+
from kqcircuits.simulations.export.elmer import elmer_export # pylint: disable=import-outside-toplevel
|
|
123
|
+
except ImportError: # the Elmer export is optional
|
|
124
|
+
return scripts
|
|
125
|
+
elmer_export.SIM_SCRIPT_PATH = sims
|
|
126
|
+
return scripts
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
def ensure_kqc_data() -> Path | None:
|
|
130
|
+
"""Point KQC's polygon-label font at KQCircuits' own file from ``QCC_KQC_SCRIPTS`` or the cache when the installed
|
|
131
|
+
kqcircuits lacks it. Returns the font file in use (None when there is none; KQC then fails on a label)."""
|
|
132
|
+
try:
|
|
133
|
+
from kqcircuits.util import label_polygons # pylint: disable=import-outside-toplevel
|
|
134
|
+
except ImportError:
|
|
135
|
+
return None
|
|
136
|
+
if Path(label_polygons.OAS_PATH).is_file():
|
|
137
|
+
return Path(label_polygons.OAS_PATH)
|
|
138
|
+
for root, _where in _candidates():
|
|
139
|
+
if (root / FONT).is_file():
|
|
140
|
+
label_polygons.OAS_PATH = str(root / FONT)
|
|
141
|
+
return root / FONT
|
|
142
|
+
return None
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
def _extract(archive: zipfile.ZipFile, dest: Path) -> int:
|
|
146
|
+
"""Copy ``<top>/klayout_package/python/scripts/**`` and the font of a KQCircuits source archive into ``dest``
|
|
147
|
+
(laid out like ``klayout_package/python``)."""
|
|
148
|
+
n = 0
|
|
149
|
+
root = dest.resolve()
|
|
150
|
+
for info in archive.infolist():
|
|
151
|
+
parts = info.filename.split("/", 1)
|
|
152
|
+
if len(parts) < 2 or info.is_dir() or not parts[1].startswith(PY_IN_REPO + "/"):
|
|
153
|
+
continue
|
|
154
|
+
rel = parts[1][len(PY_IN_REPO) + 1 :]
|
|
155
|
+
if not (rel.startswith("scripts/") or rel == FONT):
|
|
156
|
+
continue
|
|
157
|
+
target = (dest / rel).resolve()
|
|
158
|
+
if root not in target.parents: # a member that would land outside the cache folder
|
|
159
|
+
raise ValueError(f"unsafe path in the archive: {info.filename}")
|
|
160
|
+
target.parent.mkdir(parents=True, exist_ok=True)
|
|
161
|
+
target.write_bytes(archive.read(info))
|
|
162
|
+
n += 1
|
|
163
|
+
return n
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
def fetch_kqc_files(version: str | None = None, source: str | Path | None = None, force: bool = False) -> Path:
|
|
167
|
+
"""Fill the cache with KQCircuits' ``scripts`` folder and label font for ``version`` (default: the installed one).
|
|
168
|
+
|
|
169
|
+
``source``: a KQCircuits checkout (or its ``klayout_package/python`` folder), or a source zip, instead of the
|
|
170
|
+
download of ``<REPO>/archive/refs/tags/v<version>.zip``. Returns the cache folder of that version.
|
|
171
|
+
"""
|
|
172
|
+
version = version or kqc_version()
|
|
173
|
+
dest = cached_root(version)
|
|
174
|
+
if _complete(dest / "scripts") and (dest / FONT).is_file() and not force:
|
|
175
|
+
return dest
|
|
176
|
+
cache_root().mkdir(parents=True, exist_ok=True)
|
|
177
|
+
tmp = Path(tempfile.mkdtemp(prefix=".kqc_files_", dir=cache_root())) # same disk as dest: the move is a rename
|
|
178
|
+
try:
|
|
179
|
+
work = tmp / "files"
|
|
180
|
+
if source is not None and Path(source).is_dir():
|
|
181
|
+
src = Path(source)
|
|
182
|
+
src = src / PY_IN_REPO if (src / PY_IN_REPO).is_dir() else src
|
|
183
|
+
if not _complete(src / "scripts"):
|
|
184
|
+
raise FileNotFoundError(f"{source} is not a KQCircuits checkout (no {PY_IN_REPO}/scripts)")
|
|
185
|
+
shutil.copytree(src / "scripts", work / "scripts", ignore=shutil.ignore_patterns("__pycache__"))
|
|
186
|
+
if (src / FONT).is_file():
|
|
187
|
+
(work / FONT).parent.mkdir(parents=True, exist_ok=True)
|
|
188
|
+
shutil.copy2(src / FONT, work / FONT)
|
|
189
|
+
else:
|
|
190
|
+
if source is not None:
|
|
191
|
+
data = Path(source).read_bytes()
|
|
192
|
+
else:
|
|
193
|
+
url = f"{REPO}/archive/refs/tags/v{version}.zip"
|
|
194
|
+
req = urllib.request.Request(url, headers={"User-Agent": "quantcore-circuits"})
|
|
195
|
+
with urllib.request.urlopen(req, timeout=120) as r: # noqa: S310 - fixed https URL
|
|
196
|
+
data = r.read()
|
|
197
|
+
with zipfile.ZipFile(io.BytesIO(data)) as z:
|
|
198
|
+
if not _extract(z, work):
|
|
199
|
+
raise FileNotFoundError(f"no {PY_IN_REPO}/scripts in the KQCircuits archive")
|
|
200
|
+
if not _complete(work / "scripts"):
|
|
201
|
+
raise FileNotFoundError(f"the KQCircuits scripts for {version} lack {', '.join(NEEDED)}")
|
|
202
|
+
if dest.exists():
|
|
203
|
+
shutil.rmtree(dest)
|
|
204
|
+
dest.parent.mkdir(parents=True, exist_ok=True)
|
|
205
|
+
shutil.move(str(work), str(dest))
|
|
206
|
+
finally:
|
|
207
|
+
shutil.rmtree(tmp, ignore_errors=True)
|
|
208
|
+
return dest
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"""Quantcore layout library: QWri cells re-implemented as KQCircuits Elements with ports.
|
|
2
|
+
|
|
3
|
+
Folders: ``chips/`` (chip-level cells, ``DesignChip``), ``wafers/`` (wafer/mask layouts and fab export),
|
|
4
|
+
``junctions/``, ``qubits/``, ``others/`` (pads, couplers, test structures, ...), ``metal/`` (any Quantum Metal
|
|
5
|
+
QComponent as ``cell: "metal:<Class>"``; Metal itself is imported only when such a cell is built).
|
|
6
|
+
:mod:`.catalog` lists every usable component (Quantcore, KQC, Metal) with its category.
|
|
7
|
+
|
|
8
|
+
Every PCell is registered into the KQC library of its base class ("Element Library", "Junction Library", "Qubit
|
|
9
|
+
Library", "Chip Library"), so Quantcore junctions are valid ``junction_type`` values for any KQC qubit and Quantcore
|
|
10
|
+
elements can be used as KQC ``Node`` elements. Registration does not depend on folder names (unlike KQC's
|
|
11
|
+
``SRC_PATHS`` user packages), and it works whether or not KQC libraries were loaded before.
|
|
12
|
+
|
|
13
|
+
Everything here depends only on KLayout + KQCircuits, so it also loads inside the KLayout GUI (see ``kplugin/``).
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
import importlib
|
|
17
|
+
import inspect
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
LAYOUTS_PATH = Path(__file__).parent
|
|
21
|
+
_FOLDERS = ("others", "junctions", "qubits", "metal", "chips", "wafers")
|
|
22
|
+
# KQC library folders, in KQC's library dependency order
|
|
23
|
+
_KQC_LIBRARY_PATHS = ("elements", "junctions", "test_structures", "qubits", "chips")
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def pcell_classes() -> list:
|
|
27
|
+
"""All concrete Quantcore PCell classes (imports every module in the layout folders)."""
|
|
28
|
+
from kqcircuits.elements.element import Element # pylint: disable=import-outside-toplevel
|
|
29
|
+
|
|
30
|
+
classes = []
|
|
31
|
+
for folder in _FOLDERS:
|
|
32
|
+
for path in sorted((LAYOUTS_PATH / folder).rglob("*.py")):
|
|
33
|
+
if path.stem.startswith("_"):
|
|
34
|
+
continue
|
|
35
|
+
rel = path.relative_to(LAYOUTS_PATH).with_suffix("")
|
|
36
|
+
module = importlib.import_module(".".join((__name__,) + rel.parts))
|
|
37
|
+
for name, obj in inspect.getmembers(module, inspect.isclass):
|
|
38
|
+
if (
|
|
39
|
+
obj.__module__ == module.__name__
|
|
40
|
+
and not name.startswith("_")
|
|
41
|
+
and issubclass(obj, Element)
|
|
42
|
+
and obj.build is not Element.build
|
|
43
|
+
):
|
|
44
|
+
classes.append(obj)
|
|
45
|
+
return classes
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def register_pcell_classes(classes) -> None:
|
|
49
|
+
"""Register PCell classes into their (already loaded) KQC libraries."""
|
|
50
|
+
from kqcircuits.pya_resolver import pya # pylint: disable=import-outside-toplevel
|
|
51
|
+
from kqcircuits.util.library_helper import to_library_name # pylint: disable=import-outside-toplevel
|
|
52
|
+
|
|
53
|
+
touched = set()
|
|
54
|
+
for cls in classes:
|
|
55
|
+
library = pya.Library.library_by_name(cls.LIBRARY_NAME)
|
|
56
|
+
if library is None:
|
|
57
|
+
raise RuntimeError(f"KQC library {cls.LIBRARY_NAME!r} is not loaded; call ensure_loaded() first")
|
|
58
|
+
name = to_library_name(cls.__name__)
|
|
59
|
+
if name not in library.layout().pcell_names():
|
|
60
|
+
library.layout().register_pcell(name, cls())
|
|
61
|
+
touched.add(cls.LIBRARY_NAME)
|
|
62
|
+
for library_name in touched:
|
|
63
|
+
pya.Library.library_by_name(library_name).refresh()
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
_loaded = False
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def ensure_loaded() -> None:
|
|
70
|
+
"""Load the KQC libraries and register all Quantcore cells into them (idempotent, cheap after the first call)."""
|
|
71
|
+
global _loaded # pylint: disable=global-statement
|
|
72
|
+
from kqcircuits.util.library_helper import load_libraries # pylint: disable=import-outside-toplevel
|
|
73
|
+
|
|
74
|
+
for path in _KQC_LIBRARY_PATHS:
|
|
75
|
+
load_libraries(path=path)
|
|
76
|
+
if not _loaded:
|
|
77
|
+
_loaded = True
|
|
78
|
+
from quantcore_circuits.kqc_files import ensure_kqc_data # pylint: disable=import-outside-toplevel
|
|
79
|
+
|
|
80
|
+
ensure_kqc_data() # KQC's label font: a pip-installed kqcircuits lacks it (qcc kqc-files)
|
|
81
|
+
register_pcell_classes(pcell_classes())
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
# Re-exports: Quantcore cells and commonly used KQC cells, usable by short name in design.json
|
|
85
|
+
from kqcircuits.elements.finger_capacitor_square import FingerCapacitorSquare # noqa: E402
|
|
86
|
+
from kqcircuits.elements.launcher import Launcher # noqa: E402
|
|
87
|
+
from kqcircuits.elements.meander import Meander # noqa: E402
|
|
88
|
+
from kqcircuits.elements.quarter_wave_cpw_resonator import QuarterWaveCpwResonator # noqa: E402
|
|
89
|
+
from kqcircuits.elements.waveguide_composite import WaveguideComposite # noqa: E402
|
|
90
|
+
from kqcircuits.elements.waveguide_coplanar import WaveguideCoplanar # noqa: E402
|
|
91
|
+
from kqcircuits.qubits.double_pads import DoublePads # noqa: E402
|
|
92
|
+
from kqcircuits.qubits.swissmon import Swissmon # noqa: E402
|
|
93
|
+
|
|
94
|
+
from quantcore_circuits.layouts.chips.design_chip import DesignChip # noqa: E402
|
|
95
|
+
from quantcore_circuits.layouts.junctions.trilayer import TrilayerJunction, TrilayerSquid # noqa: E402
|
|
96
|
+
from quantcore_circuits.layouts.others.bond_pad import BondPad # noqa: E402
|
|
97
|
+
from quantcore_circuits.layouts.qubits.xmon import Xmon # noqa: E402
|
|
98
|
+
|
|
99
|
+
ensure_loaded()
|
|
100
|
+
|
|
101
|
+
__all__ = [
|
|
102
|
+
"BondPad",
|
|
103
|
+
"DesignChip",
|
|
104
|
+
"DoublePads",
|
|
105
|
+
"FingerCapacitorSquare",
|
|
106
|
+
"Launcher",
|
|
107
|
+
"Meander",
|
|
108
|
+
"QuarterWaveCpwResonator",
|
|
109
|
+
"Swissmon",
|
|
110
|
+
"TrilayerJunction",
|
|
111
|
+
"TrilayerSquid",
|
|
112
|
+
"WaveguideComposite",
|
|
113
|
+
"WaveguideCoplanar",
|
|
114
|
+
"Xmon",
|
|
115
|
+
"ensure_loaded",
|
|
116
|
+
"pcell_classes",
|
|
117
|
+
"register_pcell_classes",
|
|
118
|
+
]
|