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,82 @@
1
+ """Component LOM calibration: knob → element value, per component and PDK (no FEM needed to get a first LOM).
2
+
3
+ Each entry is a power law ``v = v0 (k/k0)^p`` anchored at a reference simulation of the component geometry, the
4
+ same form the co-design surrogate refines (:mod:`quantcore_circuits.codesign`). Values are fF. The reference
5
+ geometry is the example Xmon (arm width 25 µm, gap 25 µm, claw finger 25 µm, claw gap 6 µm); away from it the
6
+ estimate is first-order and is replaced as soon as a C-matrix of the actual design exists.
7
+
8
+ ``hanger_k`` is the voltage coupling coefficient k = (Z0e − Z0o)/(Z0e + Z0o) of the parallel-coupled section of a
9
+ hanger coupler, per ground-strip width (µm), used for the external Q of a λ/4 hanger:
10
+ Q_ext = π / (2 k² sin²(β l_c)) (Besedin & Menushenkov 2018). Calibrate it from a driven/eigenmode simulation.
11
+ """
12
+
13
+ from __future__ import annotations
14
+
15
+ import math
16
+
17
+ # Q3D of examples/q1_r1_feedline.json group Q1R1 (AEDT 2021 R1, 2026-11-02), simulated on silicon and rescaled to
18
+ # sapphire with (εr + 1)/2, port-stub capacitance removed. Replace with a sapphire run when available.
19
+ _REF = "Q3D Q1R1 2026-11-02 (Si, rescaled (εr+1)/2)"
20
+ CALIBRATION: dict[tuple[str, str], dict] = {
21
+ ("Xmon", "quantcore_nb_sapphire_v1"): {
22
+ "C_island": {"knob": "cross_length", "k0": 300.0, "v0": 64.05, "p": 1.0, "ref": _REF},
23
+ "Cg": {"knob": "claw_length", "k0": 100.0, "v0": 3.17, "p": 1.0, "ref": _REF},
24
+ "C_claw": {"knob": "claw_length", "k0": 100.0, "v0": 76.4, "p": 0.8, "ref": _REF},
25
+ },
26
+ }
27
+ # ground-strip width µm → k. 6 µm: calibrated 2026-11-03 on examples/q1_r1_feedline.json R1 (λ/4 meander 4200 µm,
28
+ # 300 µm coupled section, 6 µm ground strip, claw-loaded) with an HFSS driven S21 (AEDT 2024 R1, sapphire, wave ports
29
+ # on FL, Q1 junction as Lj/Cj; 10 µm gap mesh seed, 4 passes / 359k tets, ΔS 0.0026): notch fit f0 6.6008 GHz,
30
+ # Q_c 24 698 → κ_ext 0.2673 MHz (Q_i 1.10e6 = the bulk-dielectric limit from EPR). The LOM evaluates
31
+ # hanger_kappa_MHz at the bare λ/4 frequency (7.62 GHz), so k is an *effective* value for this hanger family:
32
+ # k = 0.06 · √(0.2673 / 0.2189) = 0.0663. Previous uncalibrated estimate: 0.06. Cross-check: eigenmode Q of the same
33
+ # resonator (18 passes, not converged, ΔF 0.52 %) gives κ_ext 0.217 MHz → k 0.0597. Job: build/jobs/aedt241/driven_wide.
34
+ HANGER_K = {6.0: 0.0663}
35
+ HANGER_K_REF = "HFSS driven S21 notch fit, q1_r1_feedline R1, AEDT 2024 R1 (2026-11-03); was 0.06 (estimate)"
36
+
37
+
38
+ def _entry(cell: str, pdk_name: str) -> tuple[dict | None, float]:
39
+ """(calibration, capacitance scale) — other PDKs reuse the sapphire entry rescaled by (εr + 1)/2."""
40
+ from quantcore_circuits.pdk import get_pdk # pylint: disable=import-outside-toplevel
41
+
42
+ if (cell, pdk_name) in CALIBRATION:
43
+ return CALIBRATION[(cell, pdk_name)], 1.0
44
+ for (c, p), entry in CALIBRATION.items():
45
+ if c == cell:
46
+ eps_ref = get_pdk(p).stack.substrate_permittivity
47
+ eps = get_pdk(pdk_name).stack.substrate_permittivity
48
+ return entry, (eps + 1) / (eps_ref + 1)
49
+ return None, 1.0
50
+
51
+
52
+ def estimate(cell: str, quantity: str, params: dict, pdk_name: str) -> tuple[float | None, str]:
53
+ """(value fF, provenance) of ``quantity`` for a cell with ``params``; (None, reason) if uncalibrated."""
54
+ entry, scale = _entry(cell, pdk_name)
55
+ if entry is None or quantity not in entry:
56
+ return None, f"no calibration for {cell}.{quantity}"
57
+ c = entry[quantity]
58
+ k = float(params.get(c["knob"], c["k0"]))
59
+ return scale * c["v0"] * (k / c["k0"]) ** c["p"], f"calibration {cell}.{quantity} ({c['ref']})"
60
+
61
+
62
+ def invert(cell: str, quantity: str, value: float, pdk_name: str) -> float | None:
63
+ """Knob value that gives ``value`` (fF) for ``quantity`` (LOM → layout)."""
64
+ entry, scale = _entry(cell, pdk_name)
65
+ if entry is None or quantity not in entry:
66
+ return None
67
+ c = entry[quantity]
68
+ return c["k0"] * (value / (scale * c["v0"])) ** (1 / c["p"])
69
+
70
+
71
+ def hanger_k(ground_gap_um: float) -> float:
72
+ """Coupling coefficient for a hanger with the given ground strip (nearest calibrated width, e^-gap scaling)."""
73
+ g0 = min(HANGER_K, key=lambda g: abs(g - ground_gap_um))
74
+ return HANGER_K[g0] * math.exp(-(ground_gap_um - g0) / 10.0)
75
+
76
+
77
+ def hanger_kappa_MHz(f_GHz: float, vp_m_s: float, coupling_length_um: float, ground_gap_um: float) -> float:
78
+ """External linewidth κ/2π of a λ/4 hanger coupled over ``coupling_length_um`` near its shorted end."""
79
+ beta_l = 2 * math.pi * f_GHz * 1e9 / vp_m_s * coupling_length_um * 1e-6
80
+ k = hanger_k(ground_gap_um)
81
+ q_ext = math.pi / (2 * k**2 * math.sin(beta_l) ** 2)
82
+ return f_GHz * 1e3 / q_ext
@@ -0,0 +1,235 @@
1
+ """Analytic element estimates for component LOM models (no FEM): planar capacitances by conformal mapping.
2
+
3
+ Everything here is a closed-form, quasi-static estimate for thin conductors on a thick substrate (sapphire εr 10.25
4
+ in the default PDK), with the field split equally between substrate and air: ε_eff = (εr + 1)/2. It is meant for
5
+ a first LOM before any C-matrix exists, and it is labelled as such in every element value (``estimate_source``).
6
+
7
+ **The one primitive.** Two conductors on the boundary of a half-plane occupy the segments [x1, x2] and [x3, x4]
8
+ (the rest of the boundary is a Neumann boundary, i.e. the slot / dielectric interface). Their capacitance per unit
9
+ length in a half-space of permittivity ε is ε K(k)/K(k'), with the cross ratio
10
+ k² = (x2 − x1)(x4 − x3) / ((x3 − x1)(x4 − x2)). Substrate + air give 2 ε0 ε_eff K(k)/K(k'). The standard results
11
+ follow from it, and the unit tests check them against each other:
12
+
13
+ * CPW (centre a, gaps b): C' = 4 ε0 ε_eff K(k)/K(k'), k = a/(a + 2b) (Wen 1969; Simons, *Coplanar Waveguide*, ch. 2)
14
+ * coplanar strips w1, w2 at spacing s, no ground: C' = 2 ε0 ε_eff K(k)/K(k'), k² = w1 w2/((w1 + s)(w2 + s))
15
+ (equal widths: the textbook CPS K(k')/K(k) with k = s/(s + 2w), by Landen's transformation)
16
+ * two equal strips w at spacing s inside a ground slot (ground at distance g beyond each strip), z → z² mapping:
17
+ even mode k_e² = (b² − a²)/(c² − a²), odd mode k_o = (c/b)·√((b² − a²)/(c² − a²)) with a = s/2, b = a + w,
18
+ c = b + g; C_ground = C_e, C_mutual = (C_o − C_e)/2 per unit length (edge-coupled CPW, Simons ch. 7)
19
+ * interdigital capacitor (N fingers, width w, gap s, overlap L): Igreja & Dias, Sens. Actuators A 112, 291 (2004):
20
+ C = (N − 3) C_I/2 + 2 C_I C_E/(C_I + C_E), C_I,E = ε0 (εr + 1) L K(k)/K(k'), k_I = sin(πη/2),
21
+ k_E = 2√η/(1 + η), η = w/(w + s); within ~10 % of Alley's (εr + 1) L [(N − 3) A1 + A2] (Bahl, *Lumped elements*)
22
+
23
+ **Accuracy.** Against Q3D: the Xmon island (cross arms as CPW) comes out 13 % high; the two-pad Metal
24
+ ``TransmonPocket`` mutual capacitance about 25 % high, its pad-to-ground about 20 % high, and the connection-pad C_g
25
+ within 20 % (Metal tutorial 4.01). Each estimate carries an ``uncertainty`` and a ``kind``:
26
+
27
+ * ``"calibration"`` — power law anchored on a FEM run of the same component (:mod:`.calibration`)
28
+ * ``"analytic"`` — a conformal-mapping formula applied to the component's own geometry (±25 % typical)
29
+ * ``"rough"`` — a geometry the formulas only approximate: screened couplers, curved or spiral electrodes, a
30
+ calibration borrowed from another component (±50 %, or worse)
31
+
32
+ Values are rounded to 3 significant figures (analytic) or 2 (rough). Units: µm in, fF out. Inside
33
+ :func:`exact_values` they are not rounded (the co-design surrogate takes the LOM's sensitivities from small knob
34
+ steps, which the rounding would hide).
35
+ """
36
+
37
+ from __future__ import annotations
38
+
39
+ import math
40
+ from contextlib import contextmanager
41
+
42
+ EPS0_fF_per_um = 8.8541878128e-3 # ε0 in fF/µm
43
+ UNCERTAINTY = {"calibration": "±10%", "analytic": "±25%", "rough": "±50%"}
44
+ _EXACT = [False] # inside exact_values(): cap() keeps every digit
45
+
46
+
47
+ @contextmanager
48
+ def exact_values():
49
+ """Within this block :func:`cap` does not round (sensitivities of the estimates to small parameter changes)."""
50
+ old, _EXACT[0] = _EXACT[0], True
51
+ try:
52
+ yield
53
+ finally:
54
+ _EXACT[0] = old
55
+
56
+
57
+ # ---- primitives ----------------------------------------------------------------------------------------------------
58
+ def k_ratio(k: float) -> float:
59
+ """K(k)/K(k') with k' = √(1 − k²) (complete elliptic integrals of the first kind)."""
60
+ from scipy.special import ellipk # pylint: disable=import-outside-toplevel
61
+
62
+ k = min(max(k, 1e-12), 1 - 1e-15)
63
+ return float(ellipk(k * k) / ellipk(1 - k * k))
64
+
65
+
66
+ def eps_eff(eps_r: float) -> float:
67
+ """Quasi-static effective permittivity of a planar structure on a thick substrate: (εr + 1)/2."""
68
+ return (eps_r + 1) / 2
69
+
70
+
71
+ def substrate_eps(pdk) -> float:
72
+ """εr of the PDK substrate (``pdk`` is a PDK object, its name, or a number)."""
73
+ if isinstance(pdk, (int, float)):
74
+ return float(pdk)
75
+ if isinstance(pdk, str):
76
+ from quantcore_circuits.pdk import get_pdk # pylint: disable=import-outside-toplevel
77
+
78
+ pdk = get_pdk(pdk)
79
+ return float(pdk.stack.substrate_permittivity)
80
+
81
+
82
+ def segments_c_per_um(x1: float, x2: float, x3: float, x4: float, eps_r: float) -> float:
83
+ """C' (fF/µm) between boundary segments [x1, x2] and [x3, x4] (x4 may be ``inf``), substrate + air."""
84
+ if math.isinf(x4):
85
+ k2 = (x2 - x1) / (x3 - x1)
86
+ else:
87
+ k2 = (x2 - x1) * (x4 - x3) / ((x3 - x1) * (x4 - x2))
88
+ return 2 * EPS0_fF_per_um * eps_eff(eps_r) * k_ratio(math.sqrt(k2))
89
+
90
+
91
+ # ---- standard structures (per µm) ---------------------------------------------------------------------------------
92
+ def cpw_c_per_um(a: float, b: float, eps_r: float) -> float:
93
+ """CPW (centre width a, gaps b) capacitance per µm, fF/µm."""
94
+ return 4 * EPS0_fF_per_um * eps_eff(eps_r) * k_ratio(a / (a + 2 * b))
95
+
96
+
97
+ def cps_c_per_um(w1: float, w2: float, s: float, eps_r: float) -> float:
98
+ """Mutual capacitance per µm of two coplanar strips (widths w1, w2, spacing s), no ground nearby."""
99
+ return segments_c_per_um(0.0, w1, w1 + s, w1 + s + w2, eps_r)
100
+
101
+
102
+ def coupled_strips_per_um(w: float, s: float, g: float, eps_r: float) -> tuple[float, float]:
103
+ """Two equal strips (width w, spacing s) in a ground slot (gap g beyond each): (C to ground, C mutual), fF/µm."""
104
+ a, b = s / 2, s / 2 + w
105
+ c = b + g
106
+ k_e = math.sqrt((b * b - a * a) / (c * c - a * a))
107
+ k_o = min((c / b) * k_e, 1 - 1e-15)
108
+ pre = 2 * EPS0_fF_per_um * eps_eff(eps_r)
109
+ c_e, c_o = pre * k_ratio(k_e), pre * k_ratio(k_o)
110
+ return c_e, (c_o - c_e) / 2
111
+
112
+
113
+ # ---- component-level estimates (fF) -------------------------------------------------------------------------------
114
+ def pad_to_ground(w: float, h: float, gap_w: float, gap_h: float, eps_r: float, open_edges: int = 0) -> float:
115
+ """Rectangular pad w × h in a ground cut-out (clearance ``gap_w`` beyond the w-sides... i.e. along x, ``gap_h``
116
+ along y). Sum of the two CPW cross-sections: w·C'_cpw(h, gap_h) + h·C'_cpw(w, gap_w).
117
+
118
+ ``open_edges`` (0–2) removes that many long (length w) edges' share, for edges facing another conductor
119
+ instead of ground (half of the first term each).
120
+ """
121
+ long_edges = w * cpw_c_per_um(h, gap_h, eps_r)
122
+ short_edges = h * cpw_c_per_um(w, gap_w, eps_r)
123
+ return long_edges * (1 - open_edges / 2) + short_edges
124
+
125
+
126
+ def cpw_line(length: float, a: float, b: float, eps_r: float) -> float:
127
+ """Shunt capacitance of a CPW stub of ``length`` (lumped: valid for length ≪ λ/4)."""
128
+ return length * cpw_c_per_um(a, b, eps_r)
129
+
130
+
131
+ def cross_island(arm_lengths: list[float], arm_width: float, gap: float, eps_r: float) -> float:
132
+ """Cross (Xmon/Swissmon) island to ground: arms as CPW sections of centre ``arm_width`` and gap ``gap``.
133
+
134
+ ``arm_lengths`` are centre-to-tip lengths; the centre square is counted once. The end caps are not counted
135
+ (they roughly compensate the overestimate of treating the arm junctions as straight CPW).
136
+ """
137
+ total = sum(arm_lengths) - arm_width # the 4 arms overlap in the centre square
138
+ return total * cpw_c_per_um(arm_width, gap, eps_r)
139
+
140
+
141
+ def two_pads(
142
+ pad_w: float, pad_h: float, pad_gap: float, side_gap: float, back_gap: float, eps_r: float
143
+ ) -> tuple[float, float]:
144
+ """Two equal pads (w × h) facing each other across ``pad_gap`` along their long sides, in a pocket.
145
+
146
+ ``back_gap`` is the clearance from each pad's far long edge to the ground, ``side_gap`` from its short edges.
147
+ Returns (C pad → ground, C pad ↔ pad), fF. Long edges: edge-coupled strips in a ground slot; short edges: the
148
+ CPW cross-section along y.
149
+ """
150
+ cg, cm = coupled_strips_per_um(pad_h, pad_gap, back_gap, eps_r)
151
+ short = pad_h * cpw_c_per_um(pad_w, side_gap, eps_r)
152
+ return pad_w * cg + short, pad_w * cm
153
+
154
+
155
+ def coplanar_coupling(length: float, w1: float, w2: float, s: float, eps_r: float, screening: float = 1.0) -> float:
156
+ """Edge-to-edge coupling of two conductors facing each other over ``length`` across ``s`` (CPS formula).
157
+
158
+ ``screening`` < 1 for a ground strip or ground-plane edges close to the gap (rough).
159
+ """
160
+ return screening * length * cps_c_per_um(w1, w2, s, eps_r)
161
+
162
+
163
+ def interdigital(n_fingers: int, finger_w: float, finger_gap: float, overlap: float, eps_r: float) -> float:
164
+ """Interdigital capacitor (Igreja & Dias 2004), N ≥ 2 fingers; for N = 2 the two-strip CPS value is used."""
165
+ if n_fingers <= 2 or overlap <= 0:
166
+ return max(overlap, 0.0) * cps_c_per_um(finger_w, finger_w, finger_gap, eps_r)
167
+ eta = finger_w / (finger_w + finger_gap)
168
+ pre = EPS0_fF_per_um * (eps_r + 1) * overlap
169
+ c_i = pre * k_ratio(math.sin(math.pi * eta / 2))
170
+ c_e = pre * k_ratio(2 * math.sqrt(eta) / (1 + eta))
171
+ return (n_fingers - 3) * c_i / 2 + 2 * c_i * c_e / (c_i + c_e)
172
+
173
+
174
+ def concentric_rings(r_in: float, r_mid_in: float, eps_r: float) -> float:
175
+ """Disk of radius ``r_in`` and a ring starting at ``r_mid_in``: their facing edge as coupled strips, rough.
176
+
177
+ Uses the CPS formula along the mean circumference with strip widths = the radial extents (capped).
178
+ """
179
+ s = r_mid_in - r_in
180
+ return 2 * math.pi * (r_in + s / 2) * cps_c_per_um(r_in, r_in, s, eps_r)
181
+
182
+
183
+ def disk_to_ground(r: float, gap: float, eps_r: float) -> float:
184
+ """Disk of radius r in a circular ground cut-out of radius r + gap: a CPW of centre 2r bent into a circle."""
185
+ return math.pi * r * cpw_c_per_um(2 * r, gap, eps_r)
186
+
187
+
188
+ def ring_to_ground(r_out: float, width: float, gap: float, eps_r: float) -> float:
189
+ """Outer edge of a ring (outer radius r_out, radial width w) facing ground across ``gap`` (half-CPW)."""
190
+ return 2 * math.pi * r_out * cpw_c_per_um(2 * width, gap, eps_r) / 2
191
+
192
+
193
+ # ---- value records ------------------------------------------------------------------------------------------------
194
+ def _round(v: float, digits: int) -> float:
195
+ if v == 0 or not math.isfinite(v):
196
+ return v
197
+ return round(v, digits - 1 - int(math.floor(math.log10(abs(v)))))
198
+
199
+
200
+ def cap(value: float | None, kind: str, formula: str, fem: bool = True) -> dict:
201
+ """Element value dict for a capacitance estimate: ``{"estimate", "unit", "fem", "estimate_source", ...}``."""
202
+ if value is not None and not _EXACT[0]:
203
+ value = _round(float(value), 3 if kind in ("analytic", "calibration") else 2)
204
+ out = {
205
+ "estimate": value,
206
+ "unit": "fF",
207
+ "estimate_source": f"{kind}: {formula}",
208
+ "estimate_kind": kind,
209
+ "uncertainty": UNCERTAINTY.get(kind, "unknown"),
210
+ }
211
+ if fem:
212
+ out["fem"] = "cmatrix"
213
+ return out
214
+
215
+
216
+ __all__ = [
217
+ "cap",
218
+ "coplanar_coupling",
219
+ "concentric_rings",
220
+ "coupled_strips_per_um",
221
+ "cps_c_per_um",
222
+ "cpw_c_per_um",
223
+ "cpw_line",
224
+ "cross_island",
225
+ "disk_to_ground",
226
+ "eps_eff",
227
+ "exact_values",
228
+ "interdigital",
229
+ "k_ratio",
230
+ "pad_to_ground",
231
+ "ring_to_ground",
232
+ "segments_c_per_um",
233
+ "substrate_eps",
234
+ "two_pads",
235
+ ]