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.
Files changed (272) hide show
  1. quantcore_circuits/__init__.py +57 -0
  2. quantcore_circuits/analysis/__init__.py +12 -0
  3. quantcore_circuits/analysis/_metal.py +70 -0
  4. quantcore_circuits/analysis/amplifiers.py +263 -0
  5. quantcore_circuits/analysis/circuits.py +117 -0
  6. quantcore_circuits/analysis/epr.py +231 -0
  7. quantcore_circuits/analysis/epr_lumped.py +372 -0
  8. quantcore_circuits/analysis/extract.py +119 -0
  9. quantcore_circuits/analysis/lom.py +80 -0
  10. quantcore_circuits/analysis/results.py +549 -0
  11. quantcore_circuits/analysis/store.py +81 -0
  12. quantcore_circuits/analysis/synthesis.py +118 -0
  13. quantcore_circuits/analysis/transmon.py +126 -0
  14. quantcore_circuits/assembly/__init__.py +17 -0
  15. quantcore_circuits/assembly/builder.py +127 -0
  16. quantcore_circuits/assembly/drc.py +683 -0
  17. quantcore_circuits/assembly/last_good.py +137 -0
  18. quantcore_circuits/assembly/netlist.py +174 -0
  19. quantcore_circuits/assembly/plan.py +605 -0
  20. quantcore_circuits/assembly/sidecar.py +270 -0
  21. quantcore_circuits/autotrack.py +605 -0
  22. quantcore_circuits/cards.py +878 -0
  23. quantcore_circuits/circuit/__init__.py +14 -0
  24. quantcore_circuits/circuit/adapters.py +305 -0
  25. quantcore_circuits/circuit/bridges.py +353 -0
  26. quantcore_circuits/circuit/consensus.py +158 -0
  27. quantcore_circuits/circuit/derive.py +28 -0
  28. quantcore_circuits/circuit/draw.py +198 -0
  29. quantcore_circuits/circuit/fill.py +828 -0
  30. quantcore_circuits/circuit/hamiltonian.py +193 -0
  31. quantcore_circuits/circuit/kinetic.py +102 -0
  32. quantcore_circuits/circuit/schema.py +139 -0
  33. quantcore_circuits/cli.py +1085 -0
  34. quantcore_circuits/codesign.py +1038 -0
  35. quantcore_circuits/data/selftest_q1_r1.json +44 -0
  36. quantcore_circuits/design/__init__.py +44 -0
  37. quantcore_circuits/design/io.py +98 -0
  38. quantcore_circuits/design/pyscript.py +395 -0
  39. quantcore_circuits/design/schema.py +398 -0
  40. quantcore_circuits/designer.py +625 -0
  41. quantcore_circuits/guiflow.py +991 -0
  42. quantcore_circuits/kqc_files.py +208 -0
  43. quantcore_circuits/layouts/__init__.py +118 -0
  44. quantcore_circuits/layouts/catalog.py +520 -0
  45. quantcore_circuits/layouts/chips/__init__.py +0 -0
  46. quantcore_circuits/layouts/chips/design_chip.py +325 -0
  47. quantcore_circuits/layouts/chips/frame.py +235 -0
  48. quantcore_circuits/layouts/junctions/__init__.py +0 -0
  49. quantcore_circuits/layouts/junctions/jj_fingers.py +99 -0
  50. quantcore_circuits/layouts/junctions/legacy_junctions.py +237 -0
  51. quantcore_circuits/layouts/junctions/sim_gap.py +48 -0
  52. quantcore_circuits/layouts/junctions/trilayer.py +541 -0
  53. quantcore_circuits/layouts/metal/__init__.py +105 -0
  54. quantcore_circuits/layouts/metal/component.py +332 -0
  55. quantcore_circuits/layouts/metal/geometry.py +462 -0
  56. quantcore_circuits/layouts/others/__init__.py +0 -0
  57. quantcore_circuits/layouts/others/amplifiers.py +1139 -0
  58. quantcore_circuits/layouts/others/bond_pad.py +119 -0
  59. quantcore_circuits/layouts/others/connector_pads.py +190 -0
  60. quantcore_circuits/layouts/others/couplers.py +21 -0
  61. quantcore_circuits/layouts/others/cpw_segment.py +131 -0
  62. quantcore_circuits/layouts/others/cpwe.py +661 -0
  63. quantcore_circuits/layouts/others/keepout.py +66 -0
  64. quantcore_circuits/layouts/others/legacy_resonators.py +645 -0
  65. quantcore_circuits/layouts/others/markers.py +201 -0
  66. quantcore_circuits/layouts/others/qpdk_cells.py +263 -0
  67. quantcore_circuits/layouts/others/shapes.py +114 -0
  68. quantcore_circuits/layouts/others/spirals.py +140 -0
  69. quantcore_circuits/layouts/others/sqdmetal_cells.py +90 -0
  70. quantcore_circuits/layouts/others/test_pads.py +461 -0
  71. quantcore_circuits/layouts/ports.py +119 -0
  72. quantcore_circuits/layouts/qubits/__init__.py +0 -0
  73. quantcore_circuits/layouts/qubits/legacy_transmon.py +124 -0
  74. quantcore_circuits/layouts/qubits/qpdk_cells.py +374 -0
  75. quantcore_circuits/layouts/qubits/sqdmetal_cells.py +376 -0
  76. quantcore_circuits/layouts/qubits/trilayer_concentric.py +65 -0
  77. quantcore_circuits/layouts/qubits/xmon.py +375 -0
  78. quantcore_circuits/layouts/registry.py +418 -0
  79. quantcore_circuits/layouts/wafers/__init__.py +0 -0
  80. quantcore_circuits/layouts/wafers/fab_export.py +454 -0
  81. quantcore_circuits/layouts/wafers/legacy_wafer.py +111 -0
  82. quantcore_circuits/layouts/wafers/wafer.py +469 -0
  83. quantcore_circuits/live/__init__.py +6 -0
  84. quantcore_circuits/live/klayout.py +225 -0
  85. quantcore_circuits/live/klive.py +61 -0
  86. quantcore_circuits/live/snapshot.py +185 -0
  87. quantcore_circuits/live/watch.py +93 -0
  88. quantcore_circuits/lom/__init__.py +15 -0
  89. quantcore_circuits/lom/builder.py +932 -0
  90. quantcore_circuits/lom/calibration.py +82 -0
  91. quantcore_circuits/lom/estimates.py +235 -0
  92. quantcore_circuits/lom/fragment.py +421 -0
  93. quantcore_circuits/lom/kqc_models.py +734 -0
  94. quantcore_circuits/lom/metal_models.py +917 -0
  95. quantcore_circuits/lom/quantcore_models.py +784 -0
  96. quantcore_circuits/lom/simulate.py +636 -0
  97. quantcore_circuits/lom/synthesize.py +189 -0
  98. quantcore_circuits/loop.py +610 -0
  99. quantcore_circuits/optimise.py +423 -0
  100. quantcore_circuits/pdk/__init__.py +451 -0
  101. quantcore_circuits/plots.py +876 -0
  102. quantcore_circuits/plugins.py +69 -0
  103. quantcore_circuits/review/__init__.py +57 -0
  104. quantcore_circuits/review/server.py +251 -0
  105. quantcore_circuits/review/static/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  106. quantcore_circuits/review/static/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  107. quantcore_circuits/review/static/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  108. quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  109. quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  110. quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  111. quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  112. quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  113. quantcore_circuits/review/static/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  114. quantcore_circuits/review/static/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  115. quantcore_circuits/review/static/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  116. quantcore_circuits/review/static/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  117. quantcore_circuits/review/static/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  118. quantcore_circuits/review/static/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  119. quantcore_circuits/review/static/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  120. quantcore_circuits/review/static/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  121. quantcore_circuits/review/static/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  122. quantcore_circuits/review/static/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  123. quantcore_circuits/review/static/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  124. quantcore_circuits/review/static/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  125. quantcore_circuits/review/static/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  126. quantcore_circuits/review/static/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  127. quantcore_circuits/review/static/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  128. quantcore_circuits/review/static/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  129. quantcore_circuits/review/static/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  130. quantcore_circuits/review/static/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  131. quantcore_circuits/review/static/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  132. quantcore_circuits/review/static/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  133. quantcore_circuits/review/static/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  134. quantcore_circuits/review/static/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  135. quantcore_circuits/review/static/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  136. quantcore_circuits/review/static/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  137. quantcore_circuits/review/static/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  138. quantcore_circuits/review/static/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  139. quantcore_circuits/review/static/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  140. quantcore_circuits/review/static/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  141. quantcore_circuits/review/static/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  142. quantcore_circuits/review/static/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  143. quantcore_circuits/review/static/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  144. quantcore_circuits/review/static/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  145. quantcore_circuits/review/static/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  146. quantcore_circuits/review/static/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  147. quantcore_circuits/review/static/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  148. quantcore_circuits/review/static/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  149. quantcore_circuits/review/static/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  150. quantcore_circuits/review/static/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  151. quantcore_circuits/review/static/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  152. quantcore_circuits/review/static/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  153. quantcore_circuits/review/static/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  154. quantcore_circuits/review/static/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  155. quantcore_circuits/review/static/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  156. quantcore_circuits/review/static/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  157. quantcore_circuits/review/static/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  158. quantcore_circuits/review/static/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  159. quantcore_circuits/review/static/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  160. quantcore_circuits/review/static/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  161. quantcore_circuits/review/static/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  162. quantcore_circuits/review/static/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  163. quantcore_circuits/review/static/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  164. quantcore_circuits/review/static/assets/index-CDHdrFyA.css +1 -0
  165. quantcore_circuits/review/static/assets/index-CSx05Og4.js +409 -0
  166. quantcore_circuits/review/static/assets/inter-cyrillic-400-normal-HOLc17fK.woff +0 -0
  167. quantcore_circuits/review/static/assets/inter-cyrillic-400-normal-obahsSVq.woff2 +0 -0
  168. quantcore_circuits/review/static/assets/inter-cyrillic-500-normal-BasfLYem.woff2 +0 -0
  169. quantcore_circuits/review/static/assets/inter-cyrillic-500-normal-CxZf_p3X.woff +0 -0
  170. quantcore_circuits/review/static/assets/inter-cyrillic-600-normal-4D_pXhcN.woff +0 -0
  171. quantcore_circuits/review/static/assets/inter-cyrillic-600-normal-CWCymEST.woff2 +0 -0
  172. quantcore_circuits/review/static/assets/inter-cyrillic-700-normal-CjBOestx.woff2 +0 -0
  173. quantcore_circuits/review/static/assets/inter-cyrillic-700-normal-DrXBdSj3.woff +0 -0
  174. quantcore_circuits/review/static/assets/inter-cyrillic-ext-400-normal-BQZuk6qB.woff2 +0 -0
  175. quantcore_circuits/review/static/assets/inter-cyrillic-ext-400-normal-DQukG94-.woff +0 -0
  176. quantcore_circuits/review/static/assets/inter-cyrillic-ext-500-normal-B0yAr1jD.woff2 +0 -0
  177. quantcore_circuits/review/static/assets/inter-cyrillic-ext-500-normal-BmqWE9Dz.woff +0 -0
  178. quantcore_circuits/review/static/assets/inter-cyrillic-ext-600-normal-Bcila6Z-.woff +0 -0
  179. quantcore_circuits/review/static/assets/inter-cyrillic-ext-600-normal-Dfes3d0z.woff2 +0 -0
  180. quantcore_circuits/review/static/assets/inter-cyrillic-ext-700-normal-BjwYoWNd.woff2 +0 -0
  181. quantcore_circuits/review/static/assets/inter-cyrillic-ext-700-normal-LO58E6JB.woff +0 -0
  182. quantcore_circuits/review/static/assets/inter-greek-400-normal-B4URO6DV.woff2 +0 -0
  183. quantcore_circuits/review/static/assets/inter-greek-400-normal-q2sYcFCs.woff +0 -0
  184. quantcore_circuits/review/static/assets/inter-greek-500-normal-BIZE56-Y.woff2 +0 -0
  185. quantcore_circuits/review/static/assets/inter-greek-500-normal-Xzm54t5V.woff +0 -0
  186. quantcore_circuits/review/static/assets/inter-greek-600-normal-BZpKdvQh.woff +0 -0
  187. quantcore_circuits/review/static/assets/inter-greek-600-normal-plRanbMR.woff2 +0 -0
  188. quantcore_circuits/review/static/assets/inter-greek-700-normal-BUv2fZ6O.woff +0 -0
  189. quantcore_circuits/review/static/assets/inter-greek-700-normal-C3JjAnD8.woff2 +0 -0
  190. quantcore_circuits/review/static/assets/inter-greek-ext-400-normal-DGGRlc-M.woff2 +0 -0
  191. quantcore_circuits/review/static/assets/inter-greek-ext-400-normal-KugGGMne.woff +0 -0
  192. quantcore_circuits/review/static/assets/inter-greek-ext-500-normal-2j5mBUwD.woff +0 -0
  193. quantcore_circuits/review/static/assets/inter-greek-ext-500-normal-C4iEst2y.woff2 +0 -0
  194. quantcore_circuits/review/static/assets/inter-greek-ext-600-normal-B8X0CLgF.woff +0 -0
  195. quantcore_circuits/review/static/assets/inter-greek-ext-600-normal-DRtmH8MT.woff2 +0 -0
  196. quantcore_circuits/review/static/assets/inter-greek-ext-700-normal-BoQ6DsYi.woff +0 -0
  197. quantcore_circuits/review/static/assets/inter-greek-ext-700-normal-qfdV9bQt.woff2 +0 -0
  198. quantcore_circuits/review/static/assets/inter-latin-400-normal-C38fXH4l.woff2 +0 -0
  199. quantcore_circuits/review/static/assets/inter-latin-400-normal-CyCys3Eg.woff +0 -0
  200. quantcore_circuits/review/static/assets/inter-latin-500-normal-BL9OpVg8.woff +0 -0
  201. quantcore_circuits/review/static/assets/inter-latin-500-normal-Cerq10X2.woff2 +0 -0
  202. quantcore_circuits/review/static/assets/inter-latin-600-normal-CiBQ2DWP.woff +0 -0
  203. quantcore_circuits/review/static/assets/inter-latin-600-normal-LgqL8muc.woff2 +0 -0
  204. quantcore_circuits/review/static/assets/inter-latin-700-normal-BLAVimhd.woff +0 -0
  205. quantcore_circuits/review/static/assets/inter-latin-700-normal-Yt3aPRUw.woff2 +0 -0
  206. quantcore_circuits/review/static/assets/inter-latin-ext-400-normal-77YHD8bZ.woff +0 -0
  207. quantcore_circuits/review/static/assets/inter-latin-ext-400-normal-C1nco2VV.woff2 +0 -0
  208. quantcore_circuits/review/static/assets/inter-latin-ext-500-normal-BxGbmqWO.woff +0 -0
  209. quantcore_circuits/review/static/assets/inter-latin-ext-500-normal-CV4jyFjo.woff2 +0 -0
  210. quantcore_circuits/review/static/assets/inter-latin-ext-600-normal-CIVaiw4L.woff +0 -0
  211. quantcore_circuits/review/static/assets/inter-latin-ext-600-normal-D2bJ5OIk.woff2 +0 -0
  212. quantcore_circuits/review/static/assets/inter-latin-ext-700-normal-Ca8adRJv.woff2 +0 -0
  213. quantcore_circuits/review/static/assets/inter-latin-ext-700-normal-TidjK2hL.woff +0 -0
  214. quantcore_circuits/review/static/assets/inter-vietnamese-400-normal-Bbgyi5SW.woff +0 -0
  215. quantcore_circuits/review/static/assets/inter-vietnamese-400-normal-DMkecbls.woff2 +0 -0
  216. quantcore_circuits/review/static/assets/inter-vietnamese-500-normal-DOriooB6.woff2 +0 -0
  217. quantcore_circuits/review/static/assets/inter-vietnamese-500-normal-mJboJaSs.woff +0 -0
  218. quantcore_circuits/review/static/assets/inter-vietnamese-600-normal-BuLX-rYi.woff +0 -0
  219. quantcore_circuits/review/static/assets/inter-vietnamese-600-normal-Cc8MFFhd.woff2 +0 -0
  220. quantcore_circuits/review/static/assets/inter-vietnamese-700-normal-BZaoP0fm.woff +0 -0
  221. quantcore_circuits/review/static/assets/inter-vietnamese-700-normal-DlLaEgI2.woff2 +0 -0
  222. quantcore_circuits/review/static/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
  223. quantcore_circuits/review/static/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
  224. quantcore_circuits/review/static/assets/jetbrains-mono-cyrillic-500-normal-DJqRU3vO.woff +0 -0
  225. quantcore_circuits/review/static/assets/jetbrains-mono-cyrillic-500-normal-DmUKJPL_.woff2 +0 -0
  226. quantcore_circuits/review/static/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
  227. quantcore_circuits/review/static/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
  228. quantcore_circuits/review/static/assets/jetbrains-mono-greek-500-normal-D7SFKleX.woff +0 -0
  229. quantcore_circuits/review/static/assets/jetbrains-mono-greek-500-normal-JpySY46c.woff2 +0 -0
  230. quantcore_circuits/review/static/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
  231. quantcore_circuits/review/static/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
  232. quantcore_circuits/review/static/assets/jetbrains-mono-latin-500-normal-BWZEU5yA.woff2 +0 -0
  233. quantcore_circuits/review/static/assets/jetbrains-mono-latin-500-normal-CJOVTJB7.woff +0 -0
  234. quantcore_circuits/review/static/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
  235. quantcore_circuits/review/static/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
  236. quantcore_circuits/review/static/assets/jetbrains-mono-latin-ext-500-normal-Cut-4mMH.woff2 +0 -0
  237. quantcore_circuits/review/static/assets/jetbrains-mono-latin-ext-500-normal-ckzbgY84.woff +0 -0
  238. quantcore_circuits/review/static/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
  239. quantcore_circuits/review/static/assets/jetbrains-mono-vietnamese-500-normal-DNRqzVM1.woff +0 -0
  240. quantcore_circuits/review/static/index.html +14 -0
  241. quantcore_circuits/review/static/logo-quantcore-black.png +0 -0
  242. quantcore_circuits/review/static/logo-quantcore-white.png +0 -0
  243. quantcore_circuits/review/static/sample/chip.png +0 -0
  244. quantcore_circuits/review/static/sample/chip_rev1.png +0 -0
  245. quantcore_circuits/review/static/sample/q1.png +0 -0
  246. quantcore_circuits/review/static/sample/q2.png +0 -0
  247. quantcore_circuits/review/static/sample-state.json +3747 -0
  248. quantcore_circuits/route/__init__.py +5 -0
  249. quantcore_circuits/route/router.py +694 -0
  250. quantcore_circuits/route/waveguide.py +187 -0
  251. quantcore_circuits/selftest.py +224 -0
  252. quantcore_circuits/sim_tools/__init__.py +6 -0
  253. quantcore_circuits/sim_tools/aedt_attach.py +66 -0
  254. quantcore_circuits/sim_tools/aedt_progress.py +224 -0
  255. quantcore_circuits/sim_tools/aedt_project.py +302 -0
  256. quantcore_circuits/sim_tools/aedt_scripts.py +397 -0
  257. quantcore_circuits/sim_tools/aedt_session.py +275 -0
  258. quantcore_circuits/sim_tools/ansys.py +90 -0
  259. quantcore_circuits/sim_tools/builder.py +1690 -0
  260. quantcore_circuits/sim_tools/export.py +470 -0
  261. quantcore_circuits/sim_tools/geometry_check.py +342 -0
  262. quantcore_circuits/sim_tools/hfss.py +583 -0
  263. quantcore_circuits/sim_tools/palace.py +197 -0
  264. quantcore_circuits/sim_tools/runner.py +179 -0
  265. quantcore_circuits/sim_tools/subset.py +364 -0
  266. quantcore_circuits/track.py +671 -0
  267. quantcore_circuits-0.0.1.dist-info/METADATA +204 -0
  268. quantcore_circuits-0.0.1.dist-info/RECORD +272 -0
  269. quantcore_circuits-0.0.1.dist-info/WHEEL +5 -0
  270. quantcore_circuits-0.0.1.dist-info/entry_points.txt +2 -0
  271. quantcore_circuits-0.0.1.dist-info/licenses/LICENSE +674 -0
  272. quantcore_circuits-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,421 @@
1
+ """LOM fragments: the lumped model of one layout component, and how its layout ports attach to it.
2
+
3
+ A component's LOM model is a :class:`Fragment` built from the instance (cell parameters, junction values, PDK):
4
+
5
+ * ``nodes`` — local node name → ``{"island": FEM net label}`` (e.g. ``"island"`` → ``"Q1.island"``). Local names
6
+ ``island`` / ``island1`` / ``island2`` are qubit islands (a floating transmon has two), ``pad`` a 50 Ω port
7
+ conductor; anything else is a coupler / line conductor,
8
+ * ``elements`` — lumped branches between local nodes or ``"gnd"`` with an *estimated* value (see
9
+ :mod:`.estimates` and :mod:`.calibration`), and the ``fem`` source that can replace the estimate (``"cmatrix"``),
10
+ * ``port_nodes`` — layout port → local node; ``"gnd"`` for galvanically grounded ports; ``"control:<kind>"`` for
11
+ ports that carry a control line (flux bias, drive) rather than a circuit connection,
12
+ * ``lines`` — distributed CPW sections inside the component (a resonator, a meander, a plain waveguide). The
13
+ builder decides what a line is once it knows what its ends connect to (wire, λ/4 or λ/2 resonator), and it adds
14
+ the length of routes that continue the line (see :class:`Line`).
15
+ * ``hangers`` — coupled-line sections of a line to a conductor *outside* the component that no port carries (a
16
+ legacy resonator whose coupler runs next to a separate feedline cell). A design coupling without a value between
17
+ the instance (or its line node) and that conductor (``d.couple("K_R1", "R1", "FL")``) becomes the ``HANGER``
18
+ element; each entry is ``{"line": <line name>, "coupling_length_um", "ground_gap_um", "end": "short"|"open"}``
19
+ (the line end the section is at), optionally ``"source"``.
20
+ * ``straps`` — local nodes that are ground straps when no port on them is joined (route, wire coupling or snap):
21
+ an airbridge over a waveguide lands on the ground plane on both sides, so its ports map to ``gnd`` (no element).
22
+
23
+ Cells declare their model with a ``qcc_lom(name, instance, pdk) -> Fragment`` classmethod, or are registered with
24
+ :func:`register_lom` (KQC cells: :mod:`.kqc_models`; Quantum Metal wrapper cells ``"metal:<Class>"``:
25
+ :mod:`.metal_models`; ported legacy cells: :mod:`.quantcore_models`). Cells without a model get one bare node per
26
+ port (and a note).
27
+ """
28
+
29
+ from __future__ import annotations
30
+
31
+ import math
32
+ import re
33
+ from collections.abc import Callable
34
+ from dataclasses import dataclass, field
35
+
36
+ QUBIT_NODES = ("island", "island1", "island2")
37
+
38
+
39
+ @dataclass
40
+ class Element:
41
+ name: str # global branch name, e.g. "C_Q1", "Cg_Q1_claw_n"
42
+ type: str # C | L | JJ | SQUID | R | TLres | HANGER
43
+ nodes: tuple[str, str] # local node names or "gnd"
44
+ value: dict # e.g. {"estimate": 64.1, "unit": "fF", "fem": "cmatrix"} or {"Lj_nH": 12, "Cj_fF": 2}
45
+ knob: dict | None = None # {"param": "Q1.cross_length"}
46
+ note: str = ""
47
+
48
+
49
+ @dataclass
50
+ class Line:
51
+ """A CPW section inside a component, on local node ``node`` (one conductor: both ends are that node).
52
+
53
+ ``ports`` are the layout ports at its two ends (``None`` for an end inside the component, e.g. the coupling
54
+ capacitor of a KQC ``QuarterWaveCpwResonator``). ``term`` is what each end is when nothing connects to it:
55
+ ``"short"`` (KQC waveguides with ``term = 0`` end in the ground plane), ``"open"`` (a termination gap or a
56
+ coupling capacitor). ``resonator=True`` makes it a resonator whatever its ends connect to (a meander between two
57
+ couplers is a λ/2 bus); otherwise a line between two connected conductors is a wire and only a line with a free
58
+ end is a (stub) resonator. ``couplings`` are coupled-line sections to other local nodes (a hanger:
59
+ ``{"node": "pl", "coupling_length_um": 500, "ground_gap_um": 10}``).
60
+
61
+ Lines joined end to end (a route between two line ports, a wire coupling or snap between them, a termination on
62
+ a line end) are one line for the builder. ``through=True`` marks a pass-through section (a taper, an airbridge
63
+ crossing): it only extends whatever line it joins, which is named after its main line or route, not after it
64
+ (``length_um`` 0: the builder takes the distance between its two ports).
65
+ """
66
+
67
+ name: str
68
+ node: str
69
+ ports: tuple[str | None, str | None]
70
+ length_um: float
71
+ a_um: float
72
+ b_um: float
73
+ term: tuple[str, str] = ("short", "short")
74
+ resonator: bool = False
75
+ couplings: list[dict] = field(default_factory=list)
76
+ knob: str | None = None # instance parameter for the line length, e.g. "Q1R.resonator_length"
77
+ through: bool = False # a pass-through section (taper): extends the line it joins, never names it
78
+
79
+
80
+ @dataclass
81
+ class Fragment:
82
+ nodes: dict[str, dict] = field(default_factory=dict)
83
+ elements: list[Element] = field(default_factory=list)
84
+ port_nodes: dict[str, str] = field(default_factory=dict)
85
+ knobs: dict[str, tuple[float, float]] = field(default_factory=dict)
86
+ notes: list[str] = field(default_factory=list)
87
+ lines: list[Line] = field(default_factory=list)
88
+ hangers: list[dict] = field(default_factory=list) # see the module docstring
89
+ straps: list[str] = field(default_factory=list) # local nodes grounded when no port on them is joined
90
+
91
+
92
+ LomFn = Callable[[str, object, object], Fragment]
93
+ _REGISTRY: dict[str, LomFn] = {}
94
+ METAL_PREFIX = "metal:"
95
+
96
+
97
+ def register_lom(cell_name: str):
98
+ """Decorator: ``@register_lom("Swissmon") def swissmon_lom(name, inst, pdk) -> Fragment``.
99
+
100
+ KQC/Quantcore cells are registered by class name (subclasses inherit the model); Quantum Metal wrapper cells by
101
+ ``"metal:<MetalClass>"``.
102
+ """
103
+
104
+ def deco(fn: LomFn) -> LomFn:
105
+ _REGISTRY[cell_name] = fn
106
+ return fn
107
+
108
+ return deco
109
+
110
+
111
+ def registered() -> dict[str, LomFn]:
112
+ """All registered LOM models (cell / ``metal:`` class name → model function)."""
113
+ _load_models()
114
+ return dict(_REGISTRY)
115
+
116
+
117
+ def _load_models() -> None:
118
+ # model modules register on import; they are imported lazily to keep lom.fragment import-light
119
+ from quantcore_circuits.lom import kqc_models, metal_models, quantcore_models # noqa: F401 pylint: disable=C0415
120
+
121
+
122
+ def metal_class(cell_ref: str) -> str | None:
123
+ """Metal class name of a wrapper cell reference (``"metal:TransmonPocket"`` → ``"TransmonPocket"``)."""
124
+ if cell_ref.startswith(METAL_PREFIX):
125
+ return cell_ref[len(METAL_PREFIX) :]
126
+ return None
127
+
128
+
129
+ def lom_model(cell_ref: str) -> LomFn | None:
130
+ """The LOM model of a cell reference, or None (static cells, unknown cells, cells without a model)."""
131
+ if cell_ref.startswith("static:"):
132
+ return None
133
+ _load_models()
134
+ mc = metal_class(cell_ref)
135
+ if mc is not None:
136
+ try: # spelling variants (case, module name) → the qlibrary class name
137
+ from quantcore_circuits.layouts.metal import canonical_class_name # pylint: disable=C0415
138
+
139
+ mc = canonical_class_name(mc)
140
+ except (ImportError, ValueError):
141
+ pass
142
+ return _REGISTRY.get(f"{METAL_PREFIX}{mc}") or _metal_by_mro(mc)
143
+ from quantcore_circuits.layouts.registry import resolve_cell # pylint: disable=import-outside-toplevel
144
+
145
+ try:
146
+ cls = resolve_cell(cell_ref)
147
+ except ValueError:
148
+ return None
149
+ fn = getattr(cls, "qcc_lom", None)
150
+ if fn is not None:
151
+ return fn
152
+ for klass in cls.__mro__:
153
+ if klass.__name__ in _REGISTRY:
154
+ return _REGISTRY[klass.__name__]
155
+ return None
156
+
157
+
158
+ def _metal_by_mro(metal_cls: str) -> LomFn | None:
159
+ """A Metal class without its own model inherits its base class's (e.g. a user subclass of TransmonPocket)."""
160
+ try:
161
+ from quantcore_circuits.lom.metal_models import metal_mro # pylint: disable=import-outside-toplevel
162
+
163
+ for base in metal_mro(metal_cls):
164
+ if f"{METAL_PREFIX}{base}" in _REGISTRY:
165
+ return _REGISTRY[f"{METAL_PREFIX}{base}"]
166
+ except ImportError:
167
+ return None
168
+ return None
169
+
170
+
171
+ def generic_fragment(name: str, inst, ports: list[str]) -> Fragment:
172
+ """No LOM model: every layout port becomes its own bare node (connectivity is kept, values are not)."""
173
+ frag = Fragment(nodes={p: {} for p in ports}, port_nodes={p: p for p in ports})
174
+ frag.notes.append(f"{name} ({inst.cell}) has no LOM model: its ports are bare nodes without elements")
175
+ return frag
176
+
177
+
178
+ # ---- helpers shared by the model modules ----------------------------------------------------------------------------
179
+ def cell_params(inst) -> dict:
180
+ """Cell parameter defaults merged with the instance's parameters (KQC / Quantcore cells), with the junction the
181
+ build draws: an unset KQC default ``junction_type`` (``"Manhattan"``, ...) is the PDK trilayer junction
182
+ (``assembly.plan.pdk_junction_type``), so the LOM and the simulations take the drawn junction's PDK value."""
183
+ from quantcore_circuits.assembly.plan import pdk_junction_type # pylint: disable=import-outside-toplevel
184
+ from quantcore_circuits.layouts.registry import resolve_cell # pylint: disable=import-outside-toplevel
185
+
186
+ cls = resolve_cell(inst.cell)
187
+ params = {k: v.default for k, v in cls.get_schema().items()} | dict(inst.params)
188
+ pdk_jt = pdk_junction_type(cls, dict(inst.params))
189
+ if pdk_jt is not None:
190
+ params["junction_type"] = pdk_jt
191
+ return params
192
+
193
+
194
+ def _first(v, default=None):
195
+ """The first entry of a per-junction list, or the value itself."""
196
+ if isinstance(v, (list, tuple)):
197
+ return v[0] if v else default
198
+ return default if v is None else v
199
+
200
+
201
+ def junction_values(inst) -> tuple[float | None, float]:
202
+ """(Lj nH or None, Cj fF) of an instance (first entry when the design gives a list per junction)."""
203
+ j = getattr(inst, "junction", None)
204
+ lj = _first(j.Lj_nH) if j else None
205
+ cj = _first(j.Cj_fF, 0.0) if j else 0.0
206
+ return (None if lj is None else lj), float(cj or 0.0)
207
+
208
+
209
+ def squid_l_eff(lj0_nH: float, flux_phi0: float = 0.0, asym: float = 0.0) -> float:
210
+ """L of a DC SQUID (no loop inductance) at flux Φ/Φ0 with asymmetry d:
211
+ L_J0 / (|cos πΦ| √(1 + d² tan² πΦ)) = L_J0 / √(cos² πΦ + d² sin² πΦ). Raises at Φ = ½ with d = 0 (no finite L)."""
212
+ from quantcore_circuits.analysis.amplifiers import squid_ls # pylint: disable=import-outside-toplevel
213
+
214
+ x = math.pi * float(flux_phi0)
215
+ if math.cos(x) ** 2 + float(asym) ** 2 * math.sin(x) ** 2 < 1e-24:
216
+ raise ValueError(
217
+ f"a symmetric SQUID (d = {asym:g}) at Φ = {flux_phi0:g} Φ0 has no finite L_J: move flux_phi0 off ½ or set "
218
+ "junction.asym"
219
+ )
220
+ return float(squid_ls(float(lj0_nH), float(flux_phi0), float(asym)))
221
+
222
+
223
+ @dataclass(frozen=True)
224
+ class EffectiveJunction:
225
+ """A component's junction as the LOM and every simulation take it (lumped, fixed at design time).
226
+
227
+ ``lj0_nH``: L_J at zero flux (a SQUID: both junctions in parallel); ``lj_eff_nH``: at ``flux_phi0`` with
228
+ asymmetry ``asym`` (a single JJ: ``lj0_nH``); None when nothing gives a value. ``kind``: ``"JJ"``, ``"SQUID"``
229
+ or None (no junction). ``source``: ``"design"``, ``"drawn <type> (PDK junction rule)"``, a model's own fallback
230
+ (e.g. a Metal option), or None.
231
+ """
232
+
233
+ lj0_nH: float | None
234
+ cj_fF: float = 0.0
235
+ flux_phi0: float = 0.0
236
+ asym: float = 0.0
237
+ kind: str | None = "JJ"
238
+ source: str | None = None
239
+
240
+ @property
241
+ def lj_eff_nH(self) -> float | None:
242
+ if self.lj0_nH is None or self.kind != "SQUID":
243
+ return self.lj0_nH
244
+ return squid_l_eff(self.lj0_nH, self.flux_phi0, self.asym)
245
+
246
+ def as_dict(self) -> dict:
247
+ """Plain JSON (the build sidecar's ``instances.<name>.junction``)."""
248
+ out = {"kind": self.kind, "Lj0_nH": self.lj0_nH, "Cj_fF": self.cj_fF, "flux_phi0": self.flux_phi0,
249
+ "asym": self.asym, "Lj_eff_nH": None, "source": self.source}
250
+ try:
251
+ out["Lj_eff_nH"] = self.lj_eff_nH
252
+ except ValueError as e:
253
+ out["error"] = str(e)
254
+ return out
255
+
256
+ def describe(self) -> str:
257
+ """``junction L 6.734 nH, C 15 fF (drawn Quantcore Squid, PDK junction rule; Φ = 0, d = 0)``."""
258
+ src = re.sub(r" \((.*)\)$", r", \1", self.source or "no value")
259
+ lj = self.lj_eff_nH
260
+ head = "junction L " + ("none" if lj is None else f"{lj:.4g} nH")
261
+ if self.kind == "SQUID" and lj is not None and abs(lj - self.lj0_nH) > 1e-9:
262
+ head += f" (L_J0 {self.lj0_nH:.4g} nH)"
263
+ tail = f"Φ = {self.flux_phi0:g}, d = {self.asym:g}" if self.kind == "SQUID" else "single junction"
264
+ return f"{head}, C {self.cj_fF:g} fF ({src}; {tail})"
265
+
266
+
267
+ def effective_junction(inst, params: dict | None = None, pdk=None, kind: str | None = None) -> EffectiveJunction:
268
+ """The junction values of an instance: the design's ``junction`` (L_J0, C_J, Φ, d; first entry of a list), else
269
+ the drawn trilayer junction on the PDK junction rule (:func:`drawn_junction` of ``params``), else no L.
270
+
271
+ ``params``: the cell parameters the drawn junction is read from (``junction_type``, ``junction_params``,
272
+ ``junction_width``); None: the cell defaults merged with the instance's. ``kind``: ``"JJ"`` / ``"SQUID"`` / None
273
+ as the model knows it; None derives it from ``junction_type``. ``pdk``: a junction process for the drawn values
274
+ (None: the default Quantcore process, which the layout cells draw with). Φ and d are design values whatever gives
275
+ L_J (they are simulation values, not fab values).
276
+ """
277
+ if params is None:
278
+ try:
279
+ params = cell_params(inst)
280
+ except Exception: # noqa: BLE001 (an unknown / wrapped cell: its own parameters)
281
+ params = dict(getattr(inst, "params", None) or {})
282
+ if kind is None:
283
+ kind = junction_kind(params.get("junction_type", ""))
284
+ j = getattr(inst, "junction", None)
285
+ flux = float(_first(j.flux_phi0, 0.0) or 0.0) if j else 0.0
286
+ asym = float(_first(j.asym, 0.0) or 0.0) if j else 0.0
287
+ if kind is None:
288
+ return EffectiveJunction(None, 0.0, flux, asym, None, None)
289
+ lj, cj = junction_values(inst)
290
+ source = "design" if lj is not None else None
291
+ if lj is None:
292
+ drawn = drawn_junction(params, getattr(pdk, "junction", pdk))
293
+ if drawn is not None:
294
+ lj, cj, source = drawn
295
+ return EffectiveJunction(None if lj is None else float(lj), float(cj or 0.0), flux, asym, kind, source)
296
+
297
+
298
+ def junction_from_element(el: Element) -> EffectiveJunction:
299
+ """The :class:`EffectiveJunction` of a model's ``JJ`` / ``SQUID`` element (``Lj_nH`` is L_J0; an amplifier that
300
+ applies its own static bias keeps L_J0 in ``Lj0_nH`` and the bias in ``bias_phi0``)."""
301
+ v = el.value or {}
302
+ lj0 = v.get("Lj0_nH", v.get("Lj_nH"))
303
+ flux = v.get("bias_phi0", v.get("flux_phi0", 0.0))
304
+ return EffectiveJunction(
305
+ None if lj0 is None else float(lj0),
306
+ float(v.get("Cj_fF") or 0.0),
307
+ float(flux or 0.0),
308
+ float(v.get("asym") or 0.0),
309
+ el.type,
310
+ v.get("source") if lj0 is not None else None,
311
+ )
312
+
313
+
314
+ def instance_junction(name: str, inst, pdk=None) -> EffectiveJunction | None:
315
+ """The junction of a placed component as its LOM model gives it (its ``JJ`` / ``SQUID`` element: the export uses
316
+ the same L_J0, C_J, Φ, d as the LOM). None: the component has no junction (its model has no such element, or a
317
+ cell without a model is a Metal wrapper or has no ``junction_type``); another cell without a model and with a
318
+ ``junction_type`` gets :func:`effective_junction`."""
319
+ fn = lom_model(inst.cell)
320
+ if fn is not None:
321
+ if pdk is None or isinstance(pdk, str):
322
+ from quantcore_circuits.pdk import get_pdk # pylint: disable=import-outside-toplevel
323
+
324
+ pdk = get_pdk(pdk) if pdk else get_pdk()
325
+ try:
326
+ frag = fn(name, inst, pdk)
327
+ except Exception: # noqa: BLE001 (a model that cannot evaluate: the design / drawn values below)
328
+ frag = None
329
+ if frag is not None:
330
+ el = next((e for e in frag.elements if e.type in ("JJ", "SQUID")), None)
331
+ return junction_from_element(el) if el is not None else None
332
+ if metal_class(inst.cell) is not None: # every Metal wrapper has a junction_type; only its model knows a junction
333
+ return None
334
+ try:
335
+ params = cell_params(inst)
336
+ except Exception: # noqa: BLE001
337
+ params = dict(getattr(inst, "params", None) or {})
338
+ if "junction_type" not in params:
339
+ return None
340
+ return effective_junction(inst, params)
341
+
342
+
343
+ def missing_junction_message(name: str, inst, ej: EffectiveJunction | None = None) -> str:
344
+ """Why ``name`` has no junction L_J and where to set it (KLayout component dialog or design.json)."""
345
+ try:
346
+ params = cell_params(inst)
347
+ except Exception: # noqa: BLE001
348
+ params = dict(getattr(inst, "params", None) or {})
349
+ err = ej.as_dict().get("error") if ej is not None and ej.lj0_nH is not None else None
350
+ if err: # a value without a finite L (Φ = ½, d = 0)
351
+ return f"{name}: {err} (instances.{name}.junction)"
352
+ jt = params.get("junction_type")
353
+ if jt:
354
+ try:
355
+ from kqcircuits.junctions import junction_type_choices # pylint: disable=import-outside-toplevel
356
+ except ImportError:
357
+ junction_type_choices = []
358
+ why = f"its {'KQC ' if jt in junction_type_choices else ''}{jt} junction has no PDK value"
359
+ else:
360
+ why = "no design value and no drawn trilayer junction"
361
+ return (f"{name}: no junction L_J ({why}): set it in KLayout (component dialog ▸ Junction) or "
362
+ f"instances.{name}.junction.Lj_nH")
363
+
364
+
365
+ def junction_kind(junction_type: str) -> str | None:
366
+ """``"SQUID"``, ``"JJ"`` or None (no junction) from a KQC/Quantcore ``junction_type`` name."""
367
+ jt = str(junction_type or "").lower()
368
+ if jt in ("no squid", "nosquid", "none"):
369
+ return None
370
+ if jt in ("manhattan", "sim squid") or ("squid" in jt and "single" not in jt):
371
+ return "SQUID"
372
+ return "JJ"
373
+
374
+
375
+ def drawn_junction(params: dict, process=None) -> tuple[float, float, str] | None:
376
+ """(L_J nH, C_J fF, source) of the trilayer junction a qubit draws — its ``junction_type`` is a trilayer cell
377
+ (``"Quantcore Junction"``, ``"Trilayer Squid"``, ...), sized by ``junction_params`` (Xmon, ``metal:``) or KQC
378
+ ``junction_width`` — on the PDK junction rule (``process``: a junction process; None the default); None for other
379
+ junction types."""
380
+ jt = (params or {}).get("junction_type")
381
+ if not jt:
382
+ return None
383
+ from quantcore_circuits.layouts.junctions.trilayer import trilayer_junction_values # pylint: disable=C0415
384
+
385
+ jp = params.get("junction_params") or {}
386
+ if isinstance(jp, str):
387
+ import ast # pylint: disable=import-outside-toplevel
388
+ import json # pylint: disable=import-outside-toplevel
389
+
390
+ try:
391
+ jp = json.loads(jp or "{}")
392
+ except ValueError:
393
+ jp = ast.literal_eval(jp)
394
+ if "junction_width" in params:
395
+ jp = {"junction_width": params["junction_width"], **jp}
396
+ values = trilayer_junction_values(str(jt), jp, process)
397
+ if values is None:
398
+ return None
399
+ return round(values.lj_nH, 4), round(values.cj_fF, 3), f"drawn {jt} (PDK junction rule)"
400
+
401
+
402
+ def junction_value(ej: EffectiveJunction) -> dict:
403
+ """A ``JJ`` / ``SQUID`` element value: ``Lj_nH`` (L_J0), ``Cj_fF``, ``source`` and, for a SQUID, ``asym`` and
404
+ ``flux_phi0`` (the LOM applies them when it fills the circuit: :func:`squid_l_eff`)."""
405
+ value = {"Lj_nH": ej.lj0_nH, "Cj_fF": ej.cj_fF, "source": ej.source or "design"}
406
+ if ej.kind == "SQUID":
407
+ value |= {"asym": ej.asym, "flux_phi0": ej.flux_phi0}
408
+ return value
409
+
410
+
411
+ def junction_element(
412
+ name: str, a: str, b: str, inst, kind: str = "JJ", note: str = "", drawn_params: dict | None = None
413
+ ) -> Element:
414
+ """The ``J_<name>`` element of a qubit between nodes a and b (:func:`effective_junction`: the design's
415
+ ``junction``, else the drawn trilayer junction of ``drawn_params`` — None: the cell's merged parameters)."""
416
+ ej = effective_junction(inst, drawn_params, kind=kind)
417
+ return Element(f"J_{name}", kind, (a, b), junction_value(ej), {"param": f"{name}.junction.Lj_nH"}, note)
418
+
419
+
420
+ def port_resistor(name: str, node: str = "pad", r_ohm: float = 50.0, note: str = "") -> Element:
421
+ return Element(f"Port_{name}", "R", (node, "gnd"), {"R_ohm": r_ohm, "source": "design"}, note=note)