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,118 @@
1
+ """LOM-first synthesis: target Hamiltonian → circuit parameters → layout starting values.
2
+
3
+ This is the "LOM → layout" step of the loop. From targets (f_q, α, f_r, g) it computes EJ/EC → Lj and C_Σ, the
4
+ λ/4 resonator length (Metal's CPW model for the PDK stack) and the qubit–resonator coupling capacitance Cg that
5
+ gives g. The geometry knobs that realise C_Σ and Cg (cross length, claw length) are then tuned by simulation
6
+ (:mod:`quantcore_circuits.optimise`).
7
+ """
8
+
9
+ from __future__ import annotations
10
+
11
+ import math
12
+
13
+ from scipy.constants import e, h, hbar
14
+
15
+ from quantcore_circuits import track as _track
16
+ from quantcore_circuits.analysis._metal import cpw
17
+ from quantcore_circuits.analysis.transmon import (
18
+ c_from_ec,
19
+ koch_chi_MHz,
20
+ lj_from_ej,
21
+ n01_matrix_element,
22
+ transmon_from_targets,
23
+ )
24
+ from quantcore_circuits.pdk import DEFAULT_PDK, get_pdk
25
+
26
+
27
+ def cpw_properties(
28
+ f_GHz: float, a_um: float, b_um: float, pdk_name: str = DEFAULT_PDK, kinetic: bool | None = None
29
+ ) -> dict:
30
+ """Guided wavelength, phase velocity, ε_eff and Z0 of a CPW on the PDK stack (Metal ``cpw_calculations``).
31
+
32
+ The film's kinetic inductance (``pdk.kinetic``, decision #45) adds L'_k to the geometric L' (Metal's values):
33
+ v = v_geo/√(1+L'_k/L'), Z0 = Z0_geo √(1+L'_k/L'), λ and ε_eff (= (c/v)²) follow. ``kinetic=False`` forces the
34
+ purely geometric values (``None``: the PDK's switch). Extra keys: ``L_geo_nH_per_m``, ``L_k_nH_per_m``,
35
+ ``alpha_k`` (L'_k/(L'+L'_k)).
36
+ """
37
+ from quantcore_circuits.circuit.kinetic import cpw_kinetic_per_m # pylint: disable=import-outside-toplevel
38
+
39
+ pdk = get_pdk(pdk_name)
40
+ s = pdk.stack
41
+ m = cpw()
42
+ lam, etf_sqrt, _ = m.guided_wavelength(
43
+ f_GHz * 1e9,
44
+ a_um * 1e-6,
45
+ b_um * 1e-6,
46
+ s.substrate_height * 1e-6,
47
+ s.metal_thickness_um * 1e-6,
48
+ s.substrate_permittivity,
49
+ )
50
+ _, _, _, _, z0, _, _ = m.lumped_cpw(
51
+ f_GHz * 1e9,
52
+ a_um * 1e-6,
53
+ b_um * 1e-6,
54
+ s.substrate_height * 1e-6,
55
+ s.metal_thickness_um * 1e-6,
56
+ s.substrate_permittivity,
57
+ london_penetration_depth=s.london_penetration_depth_um * 1e-6,
58
+ )
59
+ vp = 299792458.0 / float(etf_sqrt)
60
+ z0 = float(z0)
61
+ lam = float(lam)
62
+ l_geo = z0 / vp # H/m
63
+ l_k = cpw_kinetic_per_m(a_um, b_um, pdk) if kinetic is not False else 0.0
64
+ if kinetic is True and l_k == 0.0: # forced on although the PDK switch is off: use the PDK's formula values
65
+ from dataclasses import replace # pylint: disable=import-outside-toplevel
66
+
67
+ l_k = cpw_kinetic_per_m(a_um, b_um, replace(pdk, kinetic=replace(pdk.kinetic, enabled=True)))
68
+ scale = math.sqrt(1.0 + l_k / l_geo)
69
+ return {
70
+ "lambda_um": lam * 1e6 / scale,
71
+ "vp_m_s": vp / scale,
72
+ "eps_eff": (float(etf_sqrt) * scale) ** 2,
73
+ "Z0_ohm": z0 * scale,
74
+ "L_geo_nH_per_m": l_geo * 1e9,
75
+ "L_k_nH_per_m": l_k * 1e9,
76
+ "alpha_k": l_k / (l_geo + l_k),
77
+ }
78
+
79
+
80
+ def quarter_wave_length_um(f_r_GHz: float, a_um: float, b_um: float, pdk_name: str = DEFAULT_PDK) -> float:
81
+ return cpw_properties(f_r_GHz, a_um, b_um, pdk_name)["lambda_um"] / 4
82
+
83
+
84
+ def coupling_capacitance_fF(g_MHz: float, f_r_GHz: float, ej_GHz: float, ec_GHz: float, z0: float = 50.0) -> float:
85
+ """Cg giving coupling g to the open end of a λ/4 resonator: ħg = 2e (Cg/C_Σ) V_rms <1|n|0>."""
86
+ w = 2 * math.pi * f_r_GHz * 1e9
87
+ c_r = math.pi / (4 * w * z0)
88
+ v_rms = math.sqrt(hbar * w / (2 * c_r))
89
+ beta = h * g_MHz * 1e6 / (2 * e * v_rms * n01_matrix_element(ej_GHz, ec_GHz))
90
+ return beta * c_from_ec(ec_GHz)
91
+
92
+
93
+ def synthesize_transmon_readout(
94
+ f_q_GHz: float,
95
+ alpha_MHz: float,
96
+ f_r_GHz: float,
97
+ g_MHz: float,
98
+ a_um: float = 10.0,
99
+ b_um: float = 6.0,
100
+ pdk_name: str = DEFAULT_PDK,
101
+ ) -> dict:
102
+ """Targets → {EJ, EC, Lj, C_Σ, Cg, resonator length, expected χ}."""
103
+ ej, ec = transmon_from_targets(f_q_GHz, alpha_MHz)
104
+ props = cpw_properties(f_r_GHz, a_um, b_um, pdk_name)
105
+ cg = coupling_capacitance_fF(g_MHz, f_r_GHz, ej, ec, props["Z0_ohm"])
106
+ out = {
107
+ "EJ_GHz": ej,
108
+ "EC_GHz": ec,
109
+ "EJ_EC": ej / ec,
110
+ "Lj_nH": lj_from_ej(ej),
111
+ "C_sigma_fF": c_from_ec(ec),
112
+ "Cg_fF": cg,
113
+ "resonator_length_um": float(props["lambda_um"]) / 4,
114
+ "cpw": props,
115
+ "chi_MHz_estimate": koch_chi_MHz(f_q_GHz, alpha_MHz, f_r_GHz, g_MHz),
116
+ }
117
+ _track.emit("synthesis", targets=dict(f_q_GHz=f_q_GHz, alpha_MHz=alpha_MHz, f_r_GHz=f_r_GHz, g_MHz=g_MHz), result=out)
118
+ return out
@@ -0,0 +1,126 @@
1
+ """Transmon parameters: unit conversions, spectrum (scqubits) and the inverse problem (EJ, EC from targets).
2
+
3
+ Conventions used throughout :mod:`quantcore_circuits.analysis`:
4
+
5
+ * frequencies in GHz, anharmonicity α / dispersive shift χ / coupling g in MHz, capacitance in fF, inductance in nH;
6
+ * α < 0 for a transmon;
7
+ * χ is the *full* dispersive shift ``E11 − E10 − E01 + E00`` (= 2χ in Koch et al.), negative for a transmon below
8
+ its resonator — the same convention as Metal LOM ``chi_in_MHz``.
9
+ """
10
+
11
+ from __future__ import annotations
12
+
13
+ import math
14
+ from dataclasses import asdict, dataclass
15
+
16
+ from scipy.constants import e, h, hbar
17
+
18
+ PHI0_RED = hbar / (2 * e) # reduced flux quantum Φ0/2π
19
+
20
+
21
+ def ec_from_c(c_fF: float) -> float:
22
+ """Charging energy EC = e²/2C in GHz."""
23
+ return e**2 / (2 * c_fF * 1e-15) / h / 1e9
24
+
25
+
26
+ def c_from_ec(ec_GHz: float) -> float:
27
+ return e**2 / (2 * ec_GHz * 1e9 * h) / 1e-15
28
+
29
+
30
+ def ej_from_lj(lj_nH: float) -> float:
31
+ """Josephson energy EJ = (Φ0/2π)²/Lj in GHz."""
32
+ return PHI0_RED**2 / (lj_nH * 1e-9) / h / 1e9
33
+
34
+
35
+ def lj_from_ej(ej_GHz: float) -> float:
36
+ return PHI0_RED**2 / (ej_GHz * 1e9 * h) / 1e-9
37
+
38
+
39
+ def transmon_spectrum(ej_GHz: float, ec_GHz: float, ng: float = 0.0, ncut: int = 31) -> tuple[float, float]:
40
+ """(f01 GHz, α MHz) of a charge-basis transmon (scqubits)."""
41
+ import scqubits as scq # pylint: disable=import-outside-toplevel
42
+
43
+ tmon = scq.Transmon(EJ=ej_GHz, EC=ec_GHz, ng=ng, ncut=ncut, truncated_dim=4)
44
+ ev = tmon.eigenvals(evals_count=3)
45
+ return float(ev[1] - ev[0]), float((ev[2] - 2 * ev[1] + ev[0]) * 1e3)
46
+
47
+
48
+ def transmon_from_targets(f_q_GHz: float, alpha_MHz: float, ng: float = 0.0) -> tuple[float, float]:
49
+ """Solve for (EJ, EC) in GHz giving the target f01 and α (exact charge-basis model, not the asymptotic formula)."""
50
+ from scipy.optimize import fsolve # pylint: disable=import-outside-toplevel
51
+
52
+ ec0 = -alpha_MHz / 1e3
53
+ ej0 = (f_q_GHz + ec0) ** 2 / (8 * ec0)
54
+
55
+ def residual(x):
56
+ f, a = transmon_spectrum(x[0], x[1], ng)
57
+ return [f - f_q_GHz, (a - alpha_MHz) / 1e3]
58
+
59
+ ej, ec = fsolve(residual, [ej0, ec0], xtol=1e-10)
60
+ return float(ej), float(ec)
61
+
62
+
63
+ @dataclass
64
+ class TransmonParams:
65
+ EJ_GHz: float
66
+ EC_GHz: float
67
+ f_q_GHz: float
68
+ alpha_MHz: float
69
+ Lj_nH: float
70
+ C_sigma_fF: float
71
+
72
+ @property
73
+ def EJ_EC(self) -> float:
74
+ return self.EJ_GHz / self.EC_GHz
75
+
76
+ def as_dict(self) -> dict:
77
+ return {**asdict(self), "EJ_EC": self.EJ_EC}
78
+
79
+
80
+ def transmon_from_circuit(c_sigma_fF: float, lj_nH: float) -> TransmonParams:
81
+ ej, ec = ej_from_lj(lj_nH), ec_from_c(c_sigma_fF)
82
+ f, a = transmon_spectrum(ej, ec)
83
+ return TransmonParams(ej, ec, f, a, lj_nH, c_sigma_fF)
84
+
85
+
86
+ def dressed_transmon_resonator(
87
+ ej_GHz: float, ec_GHz: float, f_r_GHz: float, g_MHz: float, ncut: int = 31, nq: int = 6, nr: int = 8
88
+ ) -> dict:
89
+ """Dressed f_q, f_r, α, χ from scqubits (charge coupling g_n·n̂(a + a†)).
90
+
91
+ ``g_MHz`` is the *exchange* coupling (as everywhere in qcc); it is converted to the charge-operator coupling with
92
+ the exact matrix element, g_n = g / |<1|n̂|0>|.
93
+ """
94
+ import scqubits as scq # pylint: disable=import-outside-toplevel
95
+
96
+ from quantcore_circuits.analysis._metal import apply_scqubits_compat # pylint: disable=import-outside-toplevel
97
+
98
+ apply_scqubits_compat()
99
+ qb = scq.Transmon(EJ=ej_GHz, EC=ec_GHz, ng=0.0, ncut=ncut, truncated_dim=nq, id_str="qubit")
100
+ n01 = abs(qb.matrixelement_table("n_operator", evals_count=2)[0, 1])
101
+ rs = scq.Oscillator(E_osc=f_r_GHz, truncated_dim=nr, id_str="resonator")
102
+ hs = scq.HilbertSpace([qb, rs])
103
+ hs.add_interaction(g=g_MHz / 1e3 / n01, op1=qb.n_operator, op2=rs.creation_operator, add_hc=True)
104
+ hs.generate_lookup()
105
+
106
+ def en(q, r):
107
+ return hs.energy_by_bare_index((q, r))
108
+
109
+ return {
110
+ "f_q_GHz": en(1, 0) - en(0, 0),
111
+ "f_r_GHz": en(0, 1) - en(0, 0),
112
+ "alpha_MHz": (en(2, 0) - 2 * en(1, 0) + en(0, 0)) * 1e3,
113
+ "chi_MHz": (en(1, 1) - en(1, 0) - en(0, 1) + en(0, 0)) * 1e3,
114
+ }
115
+
116
+
117
+ def koch_chi_MHz(f_q_GHz: float, alpha_MHz: float, f_r_GHz: float, g_MHz: float) -> float:
118
+ """Full dispersive shift 2χ from the transmon perturbative formula (Koch et al. 2007), MHz."""
119
+ delta = (f_q_GHz - f_r_GHz) * 1e3
120
+ a = alpha_MHz
121
+ return 2 * g_MHz**2 * a / (delta * (delta + a))
122
+
123
+
124
+ def n01_matrix_element(ej_GHz: float, ec_GHz: float) -> float:
125
+ """|<1|n|0>| ≈ (EJ/8EC)^(1/4)/√2 (transmon limit)."""
126
+ return (ej_GHz / (8 * ec_GHz)) ** 0.25 / math.sqrt(2)
@@ -0,0 +1,17 @@
1
+ """Assembly: design.json → resolved build plan (placement by port snapping, routing) → KQC chip cell."""
2
+
3
+ from quantcore_circuits.assembly.builder import BuildResult, build, show, write_layout
4
+ from quantcore_circuits.assembly.plan import BuildPlan, PlacementError, plan_design, snap_trans
5
+ from quantcore_circuits.layouts.chips.design_chip import DesignChip
6
+
7
+ __all__ = [
8
+ "BuildPlan",
9
+ "BuildResult",
10
+ "DesignChip",
11
+ "PlacementError",
12
+ "build",
13
+ "plan_design",
14
+ "show",
15
+ "snap_trans",
16
+ "write_layout",
17
+ ]
@@ -0,0 +1,127 @@
1
+ """Build a design into a KQC chip cell and write it out."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import os
6
+ import tempfile
7
+ from dataclasses import dataclass
8
+ from pathlib import Path
9
+
10
+ from kqcircuits.defaults import default_layers
11
+ from kqcircuits.elements.element import get_refpoints
12
+ from kqcircuits.pya_resolver import pya
13
+ from kqcircuits.util.load_save_layout import save_layout
14
+
15
+ from quantcore_circuits import track as _track
16
+ from quantcore_circuits.assembly.plan import BuildPlan, plan_design
17
+ from quantcore_circuits.design import Design, design_hash, load_design
18
+ from quantcore_circuits.layouts.chips.design_chip import DesignChip, ensure_registered
19
+ from quantcore_circuits.layouts.ports import check_cell
20
+
21
+
22
+ @dataclass
23
+ class BuildResult:
24
+ design: Design
25
+ plan: BuildPlan
26
+ layout: pya.Layout
27
+ cell: pya.Cell # the DesignChip PCell (library proxy)
28
+ top: pya.Cell # static top cell holding the chip; this is what gets written
29
+ source: Path | None = None # design file, when built from one
30
+
31
+ @property
32
+ def refpoints(self) -> dict[str, pya.DPoint]:
33
+ """Chip-level refpoints, e.g. ``Q1_port_claw_n``, ``FL_port_a`` (instance name prefixes)."""
34
+ return dict(get_refpoints(self.layout.layer(default_layers["refpoints"]), self.cell, pya.DTrans(), 0))
35
+
36
+ @property
37
+ def hash(self) -> str:
38
+ return design_hash(self.design)
39
+
40
+ def route_lengths(self) -> dict[str, float]:
41
+ return {n: r.length for n, r in self.plan.routes.items()}
42
+
43
+ @property
44
+ def failed_routes(self) -> dict:
45
+ """Routes left out of this build (``build(keep_going=True)`` only): ``{name: FailedRoute}``."""
46
+ return self.plan.failed
47
+
48
+ def require_complete(self, what: str = "this") -> None:
49
+ """Raise when a route failed (a ``keep_going`` build): ``what`` needs every route."""
50
+ if self.plan.failed:
51
+ from quantcore_circuits.route.router import RoutingError # pylint: disable=import-outside-toplevel
52
+
53
+ raise RoutingError(
54
+ f"{what} refused: " + "; ".join(f.error for f in self.plan.failed.values())
55
+ + " (fix the failed route(s), then build again)"
56
+ )
57
+
58
+
59
+ def build(
60
+ source, layout: pya.Layout | None = None, keep_going: bool = False, last_good: dict | None = None, **chip_overrides
61
+ ) -> BuildResult:
62
+ """Build ``source`` (path, dict or :class:`Design`) into a ``DesignChip`` cell.
63
+
64
+ ``chip_overrides`` replace chip parameters for this build only (e.g. ``with_grid=False`` for simulation).
65
+ ``keep_going`` leaves a route that cannot be built out of the layout instead of raising (it is listed in
66
+ ``result.failed_routes``, with its ``last_good`` geometry when given); the default is strict.
67
+ """
68
+ design = load_design(source)
69
+ ensure_registered()
70
+ layout = layout or pya.Layout()
71
+ plan = plan_design(design, keep_going=keep_going, last_good=last_good)
72
+ params = {**plan.chip_params, **chip_overrides}
73
+ cell = DesignChip.create(layout, plan=plan.to_json(), **params)
74
+ check_cell(cell, f"design {design.name}")
75
+ # KLayout drops top-level library proxies when writing, so (like KQC scripts) wrap the chip in a static top cell
76
+ top = layout.create_cell(design.name)
77
+ top.insert(pya.DCellInstArray(cell.cell_index(), pya.DTrans()))
78
+ path = Path(source) if isinstance(source, (str, Path)) else None
79
+ return BuildResult(design, plan, layout, cell, top, path)
80
+
81
+
82
+ def write_layout(result: BuildResult, path: str | Path, layers=None, sidecar: bool = True) -> Path:
83
+ """Write the chip as static geometry (no PCell context), atomically so a live viewer never reads half a file.
84
+
85
+ Also writes ``<name>.qcc.json`` (ports, instances, routes) for the KLayout plugin unless ``sidecar=False``.
86
+ """
87
+ path = Path(path)
88
+ path.parent.mkdir(parents=True, exist_ok=True)
89
+ fd, tmp = tempfile.mkstemp(suffix=path.suffix, dir=path.parent)
90
+ os.close(fd)
91
+ try:
92
+ save_layout(tmp, result.layout, [result.top], layers)
93
+ os.replace(tmp, path)
94
+ finally:
95
+ if os.path.exists(tmp):
96
+ os.remove(tmp)
97
+ if result.plan.keep_going: # the routes that built are the next build's "last good" (see assembly.last_good)
98
+ from quantcore_circuits.assembly import last_good # pylint: disable=import-outside-toplevel
99
+
100
+ last_good.update(last_good.store_path(path), result.plan, previous={
101
+ n: f.last_good for n, f in result.plan.failed.items() if f.last_good})
102
+ if sidecar:
103
+ from quantcore_circuits.assembly.sidecar import write_sidecar # pylint: disable=import-outside-toplevel
104
+
105
+ write_sidecar(result, path)
106
+ _track.emit("layout", result=result, path=path)
107
+ return path
108
+
109
+
110
+ def show(source, path: str | Path | None = None, **chip_overrides) -> BuildResult:
111
+ """Build, write and open in KLayout via klive (the Jupyter equivalent of ``qcc watch``). KLayout is started
112
+ (with the layout) when klive is not listening and raised to the front, unless ``QCC_KLAYOUT_GUI=0``."""
113
+ from quantcore_circuits.live import klayout as kl # pylint: disable=import-outside-toplevel
114
+ from quantcore_circuits.live.klive import klive_available, send_to_klive # pylint: disable=C0415
115
+
116
+ result = build(source, **chip_overrides)
117
+ path = Path(path) if path else Path("build") / f"{result.design.name}.oas"
118
+ write_layout(result, path)
119
+ if not klive_available() and kl.gui_enabled():
120
+ try:
121
+ kl.open_klayout(path, front=False)
122
+ except FileNotFoundError: # no KLayout installed: send_to_klive raises KliveUnavailable as before
123
+ pass
124
+ send_to_klive(path) # KliveUnavailable if klive is still not listening
125
+ if klive_available() and kl.gui_enabled():
126
+ kl.bring_to_front(layout=path)
127
+ return result