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,398 @@
1
+ """Pydantic schema for ``design.json`` (schema ``qcc/0.1``).
2
+
3
+ The design file is the single source of truth: geometry is always regenerated from it. Units are µm and degrees.
4
+ The structure follows gdsfactory's ``Netlist``/``Instance``/``Placement`` ideas, but cells are KQC Elements and
5
+ connections are KQC refpoint ports (``port_<name>`` + ``port_<name>_corner``).
6
+
7
+ Port references are strings ``"<instance>.<port>"``. The reserved instance name ``chip`` refers to chip-level ports
8
+ (e.g. launchers: ``"chip.WN"``).
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ from typing import Any, Literal
14
+
15
+ from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator
16
+
17
+ SCHEMA_VERSION = "qcc/0.1"
18
+ _ACCEPTED_SCHEMAS = {SCHEMA_VERSION, "qcd/0.1"} # "qcd/0.1" is the name used before the rename to quantcore_circuits
19
+ CHIP = "chip" # reserved instance name for chip-level ports
20
+
21
+
22
+ class _Model(BaseModel):
23
+ model_config = ConfigDict(extra="forbid", populate_by_name=True)
24
+
25
+
26
+ def split_port_ref(ref: str) -> tuple[str, str]:
27
+ """Split ``"Q1.claw_n"`` into ``("Q1", "claw_n")``."""
28
+ inst, sep, port = ref.partition(".")
29
+ if not sep or not inst or not port:
30
+ raise ValueError(f"port reference {ref!r} must look like '<instance>.<port>'")
31
+ return inst, port
32
+
33
+
34
+ class Place(_Model):
35
+ """Placement of an instance: absolute (``at``/``rot``) or port-to-port snap (``snap``/``to``).
36
+
37
+ For a snap, the instance is rotated so that its ``snap`` port faces the ``to`` port (outward directions
38
+ anti-parallel) and translated so that both ports coincide; ``gap`` then pushes it out along the target port
39
+ direction. ``rot`` is ignored for snaps; ``mirror`` is applied before solving the rotation.
40
+
41
+ ``edge`` (``"n"``/``"s"``/``"e"``/``"w"``, or ``"auto"`` = the die edge nearest ``at``; absolute placements
42
+ only) slides the instance perpendicular to that die edge so the outer edge of its etch sits the PDK's
43
+ ``frame.pad_edge`` (100 µm) from it — the Quantcore pad rule; ``at`` keeps the position
44
+ along the edge.
45
+ """
46
+
47
+ at: tuple[float, float] | None = None
48
+ rot: float = 0.0
49
+ mirror: bool = False
50
+ snap: str | None = None
51
+ to: str | None = None
52
+ gap: float = 0.0
53
+ edge: Literal["n", "s", "e", "w", "auto"] | None = None
54
+
55
+ @model_validator(mode="after")
56
+ def _one_mode(self):
57
+ if (self.snap is None) != (self.to is None):
58
+ raise ValueError("snap placement needs both 'snap' and 'to'")
59
+ if self.snap is not None and self.at is not None:
60
+ raise ValueError("use either 'at' or 'snap'/'to', not both")
61
+ if self.snap is None and self.at is None:
62
+ raise ValueError("placement needs 'at' or 'snap'/'to'")
63
+ if self.edge is not None and self.snap is not None:
64
+ raise ValueError("'edge' applies to absolute placements ('at'), not snaps")
65
+ return self
66
+
67
+ @property
68
+ def is_snap(self) -> bool:
69
+ return self.snap is not None
70
+
71
+
72
+ class PortSpec(_Model):
73
+ """Explicit port of a static (freeform) cell. Direction is the outward direction in degrees."""
74
+
75
+ name: str
76
+ at: tuple[float, float]
77
+ dir: float
78
+ a: float | None = None
79
+ b: float | None = None
80
+
81
+
82
+ class Junction(_Model):
83
+ """Lumped junction values for the LOM and the simulations (not geometry or fab), fixed per component.
84
+
85
+ ``Lj_nH`` is L_J at zero flux (a SQUID: both junctions in parallel), ``Cj_fF`` its capacitance. A SQUID also has
86
+ ``flux_phi0`` (static flux Φ/Φ0) and ``asym`` (d = (I_c1 − I_c2)/(I_c1 + I_c2)); the defaults (0, 0) are a symmetric
87
+ SQUID at its sweet spot. Each field also takes a list, one value per junction (the first one is used).
88
+ Without ``Lj_nH`` the drawn trilayer junction's PDK value is used (``lom.fragment.effective_junction``).
89
+ """
90
+
91
+ Lj_nH: float | list[float] | None = None
92
+ Cj_fF: float | list[float] = 0.0
93
+ flux_phi0: float | list[float] = 0.0
94
+ asym: float | list[float] = 0.0
95
+
96
+ @field_validator("asym")
97
+ @classmethod
98
+ def _asym_range(cls, v):
99
+ if any(abs(float(x)) > 1 for x in (v if isinstance(v, list) else [v])):
100
+ raise ValueError(f"junction asym {v!r}: d = (I_c1 - I_c2)/(I_c1 + I_c2) lies in [-1, 1]")
101
+ return v
102
+
103
+
104
+ class Instance(_Model):
105
+ """A placed component.
106
+
107
+ ``cell`` is a dotted class path (``"quantcore_circuits.layouts.Xmon"``,
108
+ ``"kqcircuits.qubits.swissmon.Swissmon"``), a short name known to :mod:`quantcore_circuits.layouts` (``"Xmon"``),
109
+ or ``"static:<path.oas>"`` for freeform cells with ``ports``.
110
+ """
111
+
112
+ cell: str
113
+ params: dict[str, Any] = Field(default_factory=dict)
114
+ place: Place
115
+ ports: list[PortSpec] | None = None
116
+ junction: Junction | None = None
117
+
118
+ @model_validator(mode="after")
119
+ def _static_ports(self):
120
+ if self.cell.startswith("static:") and not self.ports:
121
+ raise ValueError("static cells need an explicit 'ports' list")
122
+ return self
123
+
124
+
125
+ class Waypoint(_Model):
126
+ """A route waypoint with optional KQC ``Node`` extras (airbridge, taper, ...).
127
+
128
+ ``r`` is the bend radius of the corner *at this waypoint only* (µm); the route's ``r`` applies to every other
129
+ corner. ``None`` (default) uses the route radius.
130
+ """
131
+
132
+ at: tuple[float, float]
133
+ airbridge: bool = False
134
+ a: float | None = None
135
+ b: float | None = None
136
+ r: float | None = None
137
+ params: dict[str, Any] = Field(default_factory=dict)
138
+
139
+
140
+ class FreeEnd(_Model):
141
+ """A route end that is not a port: a point, a direction (deg) and a termination gap.
142
+
143
+ ``dir`` follows the port convention: it points from this end *towards the route* (for a resonator that ends
144
+ heading down, ``dir`` is 90). ``term`` is the KQC termination length: 0 shorts the centre conductor to ground
145
+ (λ/4 short end), a positive value leaves an open end with that gap.
146
+ """
147
+
148
+ at: tuple[float, float]
149
+ dir: float | None = None
150
+ term: float = 0.0
151
+
152
+
153
+ class HangerEnd(_Model):
154
+ """End a route in a coupler running parallel to another route (e.g. a λ/4 resonator hanging off a feedline).
155
+
156
+ The coupler is centred at arclength ``s`` (µm, measured along the target route's node polyline), on the ``side``
157
+ (relative to the target route's direction of travel), separated from it by a ``ground_gap`` metal strip between the
158
+ two CPW gaps. The route approaches the coupler perpendicularly at one end and terminates at the other:
159
+ ``direction="forward"`` terminates downstream (in the target route's travel direction). ``end="short"`` grounds the
160
+ termination (λ/4 short end), ``end="open"`` leaves an ``open_gap`` gap. ``bend=True`` (default) brings the
161
+ route into the coupler with a 90° bend (perpendicular to the target route); ``bend=False`` enters it straight,
162
+ along the coupler axis (the route must then arrive in line with the coupler).
163
+
164
+ Instead of ``s``, ``near=(x, y)`` (µm, chip coordinates) centres the coupler at the point of the target route
165
+ nearest to that point, so it stays put when the target route's start moves (e.g. a pad moved to the die edge).
166
+
167
+ ``coupler_gap`` / ``line_gap`` (µm, None = the CPW's own gap ``b``) narrow the two gaps that face each other along
168
+ the coupler: this route's gap on the line's side and the line's gap on this route's side. The centre lines come
169
+ closer by what they save (stronger coupling at the same ``ground_gap`` strip); the outer gaps keep ``b``. The
170
+ build draws the extra ground as ``base_metal_addition`` over the coupler length.
171
+ """
172
+
173
+ hanger: str
174
+ s: float | None = None
175
+ length: float
176
+ near: tuple[float, float] | None = None
177
+ side: Literal["left", "right"] = "left"
178
+ ground_gap: float = 6.0
179
+ direction: Literal["forward", "backward"] = "forward"
180
+ end: Literal["short", "open"] = "short"
181
+ open_gap: float = 6.0
182
+ bend: bool = True
183
+ coupler_gap: float | None = None
184
+ line_gap: float | None = None
185
+
186
+ @model_validator(mode="after")
187
+ def _one_position(self):
188
+ if (self.s is None) == (self.near is None):
189
+ raise ValueError("hanger end needs exactly one of 's' (arclength) or 'near' (a point)")
190
+ return self
191
+
192
+
193
+ RouteEndSpec = str | FreeEnd | HangerEnd
194
+
195
+
196
+ class Route(_Model):
197
+ """A CPW connection between two ports, built with KQC ``WaveguideComposite``.
198
+
199
+ ``type="meander"`` makes a fixed-``length`` route; the meander is inserted on ``meander_segment`` (default: the
200
+ longest straight segment that is not part of a port stub or hanger coupler) using KQC
201
+ ``Node(length_increment=...)``.
202
+ """
203
+
204
+ from_: str | FreeEnd = Field(alias="from")
205
+ to: RouteEndSpec
206
+ type: Literal["cpw", "meander"] = "cpw"
207
+ nodes: list[tuple[float, float] | Waypoint] = Field(default_factory=list)
208
+ length: float | None = None
209
+ meander_segment: int | None = None
210
+ meanders: int = -1
211
+ meander_direction: Literal[1, -1] = 1 # which way the meander's first turn goes (KQC Node.meander_direction)
212
+ a: float | None = None
213
+ b: float | None = None
214
+ r: float | None = None
215
+ airbridges: Literal["auto", "none"] | int = "none"
216
+ params: dict[str, Any] = Field(default_factory=dict)
217
+
218
+ @model_validator(mode="after")
219
+ def _meander_length(self):
220
+ if self.type == "meander" and self.length is None:
221
+ raise ValueError("meander routes need a 'length'")
222
+ if isinstance(self.from_, FreeEnd) and isinstance(self.to, FreeEnd):
223
+ raise ValueError("a route needs at least one port end")
224
+ return self
225
+
226
+ def waypoints(self) -> list[Waypoint]:
227
+ return [n if isinstance(n, Waypoint) else Waypoint(at=n) for n in self.nodes]
228
+
229
+
230
+ class Launchers(_Model):
231
+ """KQC sample-holder launchers with names: ``assign`` maps pad numbers to port names (KQC
232
+ ``launcher_assignments``); only assigned pads are drawn unless ``enabled`` lists names to keep.
233
+
234
+ ``type`` is a KQC sample holder ("ARD24", "SMA8", "DC24"). Any of ``n`` (pads in total, or ``[top, right,
235
+ bottom, left]`` per side), ``launcher_type`` ("RF"/"DC"), ``width``, ``gap``, ``indent``, ``pitch`` and
236
+ ``frame_gap`` (µm) override that preset, or, with ``type="custom"``, define the launchers outright (KQC
237
+ ``produce_n_launchers``); then the chip keeps its own box.
238
+ """
239
+
240
+ type: str = "custom" # noqa: A003
241
+ assign: dict[int, str] = Field(default_factory=dict)
242
+ enabled: list[str] | None = None
243
+ n: int | list[int] | None = None
244
+ launcher_type: Literal["RF", "DC"] | None = None
245
+ width: float | None = None
246
+ gap: float | None = None
247
+ indent: float | None = None
248
+ pitch: float | None = None
249
+ frame_gap: float | None = None
250
+
251
+ @model_validator(mode="after")
252
+ def _custom_needs_geometry(self):
253
+ if self.type == "custom" and self.n is None:
254
+ raise ValueError("custom launchers need at least 'n' (and usually width, gap, indent, pitch)")
255
+ return self
256
+
257
+
258
+ class Chip(_Model):
259
+ """Chip-level settings, passed to the KQC ``Chip`` base class (``box``, ``with_grid``, ``name_chip``, ...)."""
260
+
261
+ cell: str = "quantcore_circuits.assembly.DesignChip"
262
+ box: tuple[float, float, float, float] = (0.0, 0.0, 10000.0, 10000.0)
263
+ launchers: str | Launchers | None = None # KQC sample holder type ("SMA8", "ARD24") or named launchers
264
+ params: dict[str, Any] = Field(default_factory=dict)
265
+
266
+
267
+ class Coupling(_Model):
268
+ """A lumped element the layout implies but no route or snap carries, e.g. two qubit arms facing each other.
269
+
270
+ ``between`` holds two ends, each ``"<instance>"`` (its main island), ``"<instance>.<port>"``,
271
+ ``"<instance>.<LOM node>"`` or ``"<route>"`` (the route's conductor, e.g. a hanger declared against a routed
272
+ feedline). The LOM builder adds the element between those nodes; ``fem: True`` lets a C-matrix replace the value by
273
+ island name.
274
+
275
+ ``type: "wire"`` is a galvanic join with no element and no geometry: both ends must be ports
276
+ (``"<instance>.<port>"``), their LOM nodes merge into one conductor, and the netlist check counts the pair as a
277
+ declared connection. It is for cells whose metal overlaps instead of meeting port to port (legacy chips keep their
278
+ absolute positions, e.g. a resonator end drawn inside an Xmon claw tail).
279
+ """
280
+
281
+ between: tuple[str, str]
282
+ type: Literal["C", "L", "wire"] = "C" # noqa: A003
283
+ value: float | None = None # fF for C, nH for L; None = estimate later / FEM only
284
+ fem: bool = True
285
+ note: str = ""
286
+
287
+ @model_validator(mode="after")
288
+ def _wire_ends_are_ports(self):
289
+ if self.type == "wire":
290
+ bad = [e for e in self.between if "." not in e]
291
+ if bad:
292
+ raise ValueError(f"wire coupling ends must be '<instance>.<port>': {bad}")
293
+ if self.value is not None:
294
+ raise ValueError("wire coupling takes no value")
295
+ return self
296
+
297
+
298
+ class SimGroup(_Model):
299
+ """A simulation sub-problem: the selected instances (plus routes between them) cut out with a margin."""
300
+
301
+ select: list[str]
302
+ margin_um: float = 300.0
303
+ # decision #31: eigenmode/EPR is the default analysis (frequencies, participations); Q3D adds the capacitances
304
+ analyses: list[str] = Field(default_factory=lambda: ["eigenmode_epr", "q3d_cmatrix"])
305
+ # keep = do not cut (capacitance); edge = terminate a grounded line the box cuts (eigenmode / driven); cut = remove
306
+ # the route for every analysis and end it at each selected instance with a short 50 Ω stub (subset simulation:
307
+ # a bus to a qubit outside the subset, :mod:`quantcore_circuits.sim_tools.subset`)
308
+ ports: dict[str, Literal["edge", "internal", "keep", "cut"]] = Field(default_factory=dict)
309
+ settings: dict[str, Any] = Field(default_factory=dict)
310
+
311
+
312
+ class Design(_Model):
313
+ schema_: str = Field(SCHEMA_VERSION, alias="schema")
314
+ name: str = "design"
315
+ pdk: str = "quantcore_nb_sapphire_v1"
316
+ chip: Chip = Field(default_factory=Chip)
317
+ instances: dict[str, Instance] = Field(default_factory=dict)
318
+ routes: dict[str, Route] = Field(default_factory=dict)
319
+ nets: Literal["derived"] | list[list[str]] = "derived"
320
+ targets: dict[str, dict[str, float]] = Field(default_factory=dict)
321
+ sim_groups: dict[str, SimGroup] = Field(default_factory=dict)
322
+ couplings: dict[str, Coupling] = Field(default_factory=dict)
323
+
324
+ @field_validator("schema_")
325
+ @classmethod
326
+ def _schema(cls, v):
327
+ if v not in _ACCEPTED_SCHEMAS:
328
+ raise ValueError(f"unsupported design schema {v!r}; expected {SCHEMA_VERSION!r}")
329
+ return SCHEMA_VERSION
330
+
331
+ @field_validator("instances")
332
+ @classmethod
333
+ def _reserved(cls, v):
334
+ if CHIP in v:
335
+ raise ValueError(f"'{CHIP}' is a reserved instance name")
336
+ return v
337
+
338
+ @model_validator(mode="after")
339
+ def _references(self):
340
+ known = set(self.instances) | {CHIP}
341
+ for name, inst in self.instances.items():
342
+ if inst.place.is_snap:
343
+ own, _ = split_port_ref(inst.place.snap) if "." in inst.place.snap else (name, inst.place.snap)
344
+ if own != name:
345
+ raise ValueError(f"{name}: snap port {inst.place.snap!r} must belong to {name}")
346
+ target, _ = split_port_ref(inst.place.to)
347
+ if target not in known:
348
+ raise ValueError(f"{name}: snap target {inst.place.to!r} refers to unknown instance")
349
+ for name, route in self.routes.items():
350
+ for end in (route.from_, route.to):
351
+ if isinstance(end, str) and split_port_ref(end)[0] not in known:
352
+ raise ValueError(f"route {name}: {end!r} refers to unknown instance")
353
+ if isinstance(end, HangerEnd) and end.hanger not in self.routes:
354
+ raise ValueError(f"route {name}: hanger target {end.hanger!r} is not a route")
355
+ if isinstance(end, HangerEnd) and end.hanger == name:
356
+ raise ValueError(f"route {name}: cannot hang off itself")
357
+ for cname, c in self.couplings.items():
358
+ for end in c.between:
359
+ head = end.split(".", 1)[0]
360
+ if head not in self.instances and not (c.type != "wire" and end in self.routes):
361
+ raise ValueError(f"coupling {cname}: {end!r} refers to unknown instance or route")
362
+ for gname, group in self.sim_groups.items():
363
+ for sel in group.select:
364
+ if sel not in self.instances and sel not in self.routes:
365
+ raise ValueError(f"sim group {gname}: unknown instance/route {sel!r}")
366
+ return self
367
+
368
+ def to_json_dict(self) -> dict[str, Any]:
369
+ data = self.model_dump(mode="json", by_alias=True, exclude_defaults=False)
370
+ if not data["couplings"]: # optional section: designs without it keep their JSON (and hash) unchanged
371
+ del data["couplings"]
372
+ for inst in data["instances"].values():
373
+ if inst["place"].get("edge") is None:
374
+ inst["place"].pop("edge", None)
375
+ junction = inst.get("junction")
376
+ if isinstance(junction, dict): # flux / asymmetry at the default (0) stay out of the file
377
+ for key in ("flux_phi0", "asym"):
378
+ if junction.get(key) == 0 and not isinstance(junction.get(key), list):
379
+ junction.pop(key, None)
380
+ for route in data["routes"].values(): # optional route options at their defaults stay out of the file
381
+ if route.get("meander_direction") == 1:
382
+ route.pop("meander_direction")
383
+ for node in route.get("nodes") or []: # per-corner radius: optional, absent when unset
384
+ if isinstance(node, dict) and node.get("r") is None:
385
+ node.pop("r", None)
386
+ for end in (route.get("from"), route.get("to")):
387
+ if isinstance(end, dict) and end.get("bend") is True:
388
+ end.pop("bend")
389
+ if isinstance(end, dict) and "hanger" in end:
390
+ for key in ("near", "s"):
391
+ if end.get(key) is None:
392
+ end.pop(key, None)
393
+ launchers = data["chip"].get("launchers")
394
+ if isinstance(launchers, dict): # launcher overrides are optional too: unset ones stay out of the file
395
+ for key in ("n", "launcher_type", "width", "gap", "indent", "pitch", "frame_gap"):
396
+ if launchers.get(key) is None:
397
+ launchers.pop(key, None)
398
+ return data