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,124 @@
1
+ """Two-pad transmon ported from the QWri ``Transmon`` PCell.
2
+
3
+ The legacy cell only has a positive drawing (metal on legacy layer 1/0): two ``pad_thickness`` × ``pad_height`` pads
4
+ facing each other across ``gap`` (the junction gap), each with a 10 µm lead of width 10 µm on the outside. Here the
5
+ metal goes to ``base_metal_addition`` (metal wins over gaps, so the cell also works inside another element's gap)
6
+ and, with ``pocket_margin`` > 0, the cell etches its own pocket: from lead end to lead end in x and ``pocket_margin``
7
+ beyond the pads in y, so the leads end on the pocket edge where the ports are.
8
+
9
+ Ports (outward): ``left`` (−x) and ``right`` (+x) at the lead ends, CPW width ``a`` (the legacy read-only
10
+ ``path_width`` = 10 µm). The junction spans the gap: refpoints ``port_squid_a`` (left pad edge) / ``port_squid_b``
11
+ (right pad edge) for the simulation builder's junction port.
12
+
13
+ Junction (design decisions #6 / #21): ``junction_type`` ``"No Squid"`` (default, as the legacy cell: nothing drawn, the
14
+ refpoints mark the gap) or a trilayer cell — ``"Quantcore Junction"`` / ``"Quantcore Squid"`` (PDK junctions) or
15
+ ``"Trilayer Junction"`` / ``"Trilayer Squid"`` — placed across the pad gap (window = the gap between the pad faces,
16
+ ≤ 32 µm wide, CLEARER on; :func:`~quantcore_circuits.layouts.junctions.trilayer.place_trilayer`), sized by
17
+ ``junction_params`` (``{"lj_nH": …}`` on the PDK rule, or explicit finger widths). ``"Sim"`` (set by simulation
18
+ builds) draws nothing, like ``"No Squid"``.
19
+ """
20
+
21
+ import json
22
+
23
+ from kqcircuits.elements.element import Element
24
+ from kqcircuits.pya_resolver import pya
25
+ from kqcircuits.util.parameters import Param, pdt
26
+
27
+
28
+ def two_pad_metal(dbu, pad_thickness, pad_height, gap, path_width, lead_length=10.0):
29
+ """Legacy ``Transmon.produce_impl`` (= ``Coupler.produce_impl``) metal, in dbu."""
30
+ gap = 1 if gap <= 0 else gap # legacy coerce_parameters_impl
31
+ left_pad = pya.Box((-gap / 2 - pad_thickness) / dbu, -pad_height / 2 / dbu, (-gap / 2) / dbu, pad_height / 2 / dbu)
32
+ right_pad = pya.Box(gap / 2 / dbu, -pad_height / 2 / dbu, (gap / 2 + pad_thickness) / dbu, pad_height / 2 / dbu)
33
+ metal = pya.Region(left_pad)
34
+ if path_width > 0:
35
+ left_path = pya.Box(
36
+ (-gap / 2 - pad_thickness - lead_length) / dbu,
37
+ -path_width / 2 / dbu,
38
+ (-gap / 2 - pad_thickness) / dbu,
39
+ path_width / 2 / dbu,
40
+ )
41
+ right_path = pya.Box(
42
+ (gap / 2 + pad_thickness) / dbu,
43
+ -path_width / 2 / dbu,
44
+ (gap / 2 + pad_thickness + lead_length) / dbu,
45
+ path_width / 2 / dbu,
46
+ )
47
+ metal.insert([right_pad, left_path, right_path])
48
+ else:
49
+ metal.insert(right_pad)
50
+ return metal
51
+
52
+
53
+ class TwoPadTransmon(Element):
54
+ """Floating two-pad transmon (legacy ``Transmon``); ports ``left`` / ``right`` at the lead ends.
55
+
56
+ Like the legacy ``Transmon.lym`` it draws only the pads on 1/0 and no junction (no 2/0, 4/0 or 50/0): the
57
+ refpoints ``port_squid_a`` / ``port_squid_b`` mark the junction gap, where a junction cell (e.g. ``Trilayer
58
+ Junction``) must be placed for fab. Its LOM model assumes that junction."""
59
+
60
+ pad_thickness = Param(pdt.TypeDouble, "Pad thickness (along the axis)", 20, unit="μm")
61
+ pad_height = Param(pdt.TypeDouble, "Pad height", 30, unit="μm")
62
+ gap = Param(pdt.TypeDouble, "Gap between the pads (junction gap)", 10, unit="μm")
63
+ lead_length = Param(pdt.TypeDouble, "Lead length outside each pad", 10, unit="μm")
64
+ pocket_margin = Param(pdt.TypeDouble, "Pocket beyond the pads in y (0 = no pocket, legacy)", 20, unit="μm")
65
+ junction_type = Param(
66
+ pdt.TypeString,
67
+ "Junction across the gap: none (legacy) or a trilayer cell",
68
+ "No Squid",
69
+ choices=["No Squid", "Quantcore Junction", "Quantcore Squid", "Trilayer Junction", "Trilayer Squid", "Sim"],
70
+ )
71
+ junction_params = Param(pdt.TypeString, "Trilayer junction cell parameters (JSON dict, e.g. lj_nH)", "{}")
72
+
73
+ qcc_category = "qubit"
74
+ qcc_junction = True
75
+
76
+ @classmethod
77
+ def qcc_params(cls, params: dict) -> dict:
78
+ """design.json params → PCell params: ``junction_params`` dict → JSON (validated)."""
79
+ from quantcore_circuits.layouts.junctions.trilayer import _json_dict # pylint: disable=C0415
80
+
81
+ params = dict(params)
82
+ jp = params.get("junction_params")
83
+ if isinstance(jp, dict):
84
+ params["junction_params"] = json.dumps(jp, sort_keys=True)
85
+ elif isinstance(jp, str):
86
+ _json_dict(jp)
87
+ return params
88
+
89
+ def _x_end(self) -> float:
90
+ gap = 1 if self.gap <= 0 else self.gap
91
+ return gap / 2 + self.pad_thickness + (self.lead_length if self.a > 0 else 0)
92
+
93
+ def build(self):
94
+ dbu = self.layout.dbu
95
+ metal = two_pad_metal(dbu, self.pad_thickness, self.pad_height, self.gap, self.a, self.lead_length)
96
+ self.cell.shapes(self.get_layer("base_metal_addition")).insert(metal)
97
+ x_end = self._x_end()
98
+ outline = pya.Region(metal.bbox())
99
+ if self.pocket_margin > 0:
100
+ y = self.pad_height / 2 + self.pocket_margin
101
+ pocket = pya.Region(pya.DBox(-x_end, -y, x_end, y).to_itype(dbu))
102
+ gaps = pocket - metal
103
+ self.cell.shapes(self.get_layer("base_metal_gap_wo_grid")).insert(gaps)
104
+ outline = pocket
105
+ self.add_protection(outline.sized(self.margin / dbu))
106
+ self.add_port("left", pya.DPoint(-x_end, 0), pya.DVector(-1, 0))
107
+ self.add_port("right", pya.DPoint(x_end, 0), pya.DVector(1, 0))
108
+ if self.qcc_junction:
109
+ gap = 1 if self.gap <= 0 else self.gap
110
+ self.refpoints["port_squid_a"] = pya.DPoint(-gap / 2, 0)
111
+ self.refpoints["port_squid_b"] = pya.DPoint(gap / 2, 0)
112
+ jtype = str(getattr(self, "junction_type", "No Squid") or "No Squid")
113
+ if jtype not in ("No Squid", "Sim"):
114
+ from quantcore_circuits.layouts.junctions.trilayer import place_trilayer # pylint: disable=C0415
115
+
116
+ gaps = pya.Region(self.cell.begin_shapes_rec(self.get_layer("base_metal_gap_wo_grid")))
117
+ a, b = self.refpoints["port_squid_a"], self.refpoints["port_squid_b"]
118
+ try:
119
+ place_trilayer(self, jtype, gaps, a, b, self.junction_params)
120
+ except ValueError as e:
121
+ self.raise_error_on_cell(f"TwoPadTransmon: {e}")
122
+ centre = (1 if self.gap <= 0 else self.gap) / 2 + self.pad_thickness / 2
123
+ self.refpoints["pad_left"] = pya.DPoint(-centre, 0)
124
+ self.refpoints["pad_right"] = pya.DPoint(centre, 0)
@@ -0,0 +1,374 @@
1
+ """Qubits re-implemented from gdsfactory/quantum-rf-pdk (QPDK, MIT licence, © the QPDK authors): the geometry is
2
+ re-drawn here as KQC Elements in µm (QPDK was read, never imported or run).
3
+
4
+ * :class:`Flipmon` — ``qpdk/cells/transmon.py::flipmon_with_bbox`` (Li et al. 2021 vacuum-gap transmon): a circular
5
+ two-face transmon, M1 inner disc + outer ring on the bottom chip, an M2 disc on the top chip joined to the inner
6
+ disc by an indium bump; optionally with the ``plate_capacitor_single`` readout coupler that QPDK's
7
+ ``flipmon_with_resonator_and_probeline`` puts outside the ring.
8
+ * :class:`Gatemon` — ``qpdk/cells/gatemon.py::gatemon`` (Riechert et al. 2025 carbon-nanotube gatemon): a pocketed
9
+ island with a gate feed; its readout couples through :class:`~quantcore_circuits.layouts.others.qpdk_cells.
10
+ GatemonCoupler`.
11
+
12
+ QPDK draws metal on ``M1_DRAW``/``M2_DRAW`` and etch on ``M1_ETCH``/``M2_ETCH`` and exports etch − draw; here that
13
+ difference is drawn on ``base_metal_gap_wo_grid`` of face 0 (``1t1``, PDK v2 fab 1/0) and face 1 (``2b1``, the
14
+ flip-chip top face, which PDK v2 does not export yet: ``export_fab`` warns). Indium bumps go to ``indium_bump`` of
15
+ both faces (KQC convention).
16
+ """
17
+
18
+ from __future__ import annotations
19
+
20
+ import json
21
+ import math
22
+
23
+ from kqcircuits.elements.element import Element
24
+ from kqcircuits.junctions import junction_type_choices
25
+ from kqcircuits.pya_resolver import pya
26
+ from kqcircuits.qubits.qubit import Qubit
27
+ from kqcircuits.util.parameters import Param, pdt
28
+
29
+ from quantcore_circuits.layouts.junctions.sim_gap import sim_junction_in_gap
30
+ from quantcore_circuits.layouts.qubits.xmon import _junction_params
31
+
32
+ # Gatemon process layers (QPDK CNT_CONTACT, CNT, HBN, JJ_PATCH, TOP_GATE). No fab numbers were given for them
33
+ # (decision #29): drawn at the numbers *proposed* here (600–604/0, free in the PDK map), for the lead to map in
34
+ # ``pdk``/``fab_export`` once they are confirmed.
35
+ GATEMON_LAYERS = {
36
+ "cnt_contact": pya.LayerInfo(600, 0, "qcc_cnt_contact"), # Nb/Au landing pads, stems and tips
37
+ "cnt": pya.LayerInfo(601, 0, "qcc_cnt"), # nanotube placement trace
38
+ "hbn": pya.LayerInfo(602, 0, "qcc_hbn"), # hBN dielectric flake
39
+ "jj_patch": pya.LayerInfo(603, 0, "qcc_jj_patch"), # Al reconnection patches (contact pad ↔ M1)
40
+ "top_gate": pya.LayerInfo(604, 0, "qcc_top_gate"), # top gate over the hBN, landing on the M1 gate feed
41
+ }
42
+
43
+
44
+ def _disk(dbu, radius, n, centre=(0.0, 0.0)) -> pya.Region:
45
+ cx, cy = centre
46
+ return pya.Region(
47
+ pya.DPolygon.ellipse(pya.DBox(cx - radius, cy - radius, cx + radius, cy + radius), n).to_itype(dbu)
48
+ )
49
+
50
+
51
+ def _rect(dbu, x0, y0, x1, y1) -> pya.Region:
52
+ return pya.Region(pya.DBox(min(x0, x1), min(y0, y1), max(x0, x1), max(y0, y1)).to_itype(dbu))
53
+
54
+
55
+ def _polar(r, angle_deg) -> pya.DPoint:
56
+ a = math.radians(angle_deg)
57
+ return pya.DPoint(r * math.cos(a), r * math.sin(a))
58
+
59
+
60
+ class Flipmon(Qubit):
61
+ """Circular flip-chip transmon (QPDK ``flipmon_with_bbox``), optionally with its plate readout coupler.
62
+
63
+ Re-implemented from gdsfactory/quantum-rf-pdk ``qpdk/cells/transmon.py`` (MIT); coupler from
64
+ ``qpdk/cells/capacitor.py::plate_capacitor_single`` as placed by ``flipmon_with_resonator_and_probeline``.
65
+ Centred at the origin. Face 0 (M1): inner disc of ``inner_circle_radius`` and a ring of centre radius
66
+ ``outer_ring_radius`` and width ``outer_ring_width`` (QPDK ring = centre radius ± width / 2, so 80–140 µm at
67
+ defaults), in an etched disc ``m1_etch_extension_gap`` beyond the ring. Face 1 (M2): a disc of
68
+ ``top_circle_radius`` in an etched disc ``m2_etch_extension_gap`` larger. A ``bump_diameter`` indium bump at the
69
+ centre joins the inner disc and the M2 disc (one island, ``port_squid_a`` side); the ring is the other island.
70
+
71
+ Junction: ``junction_type`` (KQC/Quantcore junction cell, ``"No Squid"`` = none) placed radially across the
72
+ disc-ring gap at ``junction_position_rotation`` degrees (QPDK: 0 = +x; the test chip uses 180), ground side on
73
+ the ring; ``junction_params`` (dict / JSON) goes to the junction cell. QPDK's own evaporated
74
+ ``squid_junction_long`` is not drawn (other process). Refpoints ``port_squid_a`` (disc edge) / ``port_squid_b``
75
+ (ring edge), ``junction``, and QPDK's placement ports ``inner_ring_near_junction``, ``outer_ring_near_junction``,
76
+ ``outer_ring_outside`` (all at +x, as in QPDK).
77
+
78
+ Coupler (``with_coupler``): a ``coupler_width`` (radial) × ``coupler_length`` plate centred ``coupler_offset``
79
+ beyond the ring's outer edge at +x, in a ``coupler_etch_margin`` etch box, with a CPW (``a``/``b``) lead to port
80
+ ``coupler`` on the M1 etch edge (facing +x). QPDK's plate port ``o1`` is ``coupler_etch_margin`` beyond the plate,
81
+ inside the etched disc; here the lead continues to the etch edge (13 µm further at defaults) so that a route
82
+ starting at ``coupler`` is a CPW on ground — subtract that from QPDK's route length.
83
+ """
84
+
85
+ inner_circle_radius = Param(pdt.TypeDouble, "Inner disc radius (M1)", 60, unit="μm")
86
+ outer_ring_radius = Param(pdt.TypeDouble, "Outer ring centre radius (M1)", 110, unit="μm")
87
+ outer_ring_width = Param(pdt.TypeDouble, "Outer ring width (M1)", 60, unit="μm")
88
+ top_circle_radius = Param(pdt.TypeDouble, "Top disc radius (M2, face 1)", 110, unit="μm")
89
+ bump_diameter = Param(pdt.TypeDouble, "Indium bump diameter", 15, unit="μm")
90
+ m1_etch_extension_gap = Param(pdt.TypeDouble, "M1 etch radius beyond the ring", 30, unit="μm")
91
+ m2_etch_extension_gap = Param(pdt.TypeDouble, "M2 etch radius beyond the top disc", 40, unit="μm")
92
+ junction_position_rotation = Param(pdt.TypeDouble, "Junction angle around the centre", 0, unit="°")
93
+ junction_params = Param(pdt.TypeString, "Junction cell parameters (JSON dict)", "{}")
94
+ with_coupler = Param(pdt.TypeBoolean, "Draw the plate readout coupler and its port", True)
95
+ coupler_width = Param(pdt.TypeDouble, "Coupler plate radial width", 10, unit="μm")
96
+ coupler_length = Param(pdt.TypeDouble, "Coupler plate length (tangential)", 58, unit="μm")
97
+ coupler_offset = Param(pdt.TypeDouble, "Coupler plate centre beyond the ring's outer edge", 10, unit="μm")
98
+ coupler_etch_margin = Param(pdt.TypeDouble, "Etch margin around the plate", 2, unit="μm")
99
+ n = Param(pdt.TypeInt, "Number of points on a full circle", 144)
100
+ junction_type = Param(
101
+ pdt.TypeString,
102
+ "Junction Type",
103
+ "Manhattan",
104
+ choices=junction_type_choices
105
+ + ["Trilayer Junction", "Trilayer Squid", "Quantcore Junction", "Quantcore Squid"],
106
+ )
107
+
108
+ qcc_category = "qubit"
109
+
110
+ @classmethod
111
+ def qcc_params(cls, params: dict) -> dict:
112
+ """design.json params → PCell params: ``junction_params`` dict → JSON. Unknown parameters raise."""
113
+ params = dict(params)
114
+ unknown = sorted(set(params) - set(cls.get_schema()))
115
+ if unknown:
116
+ raise ValueError(f"Flipmon: unknown parameter(s) {unknown}")
117
+ if isinstance(params.get("junction_params"), dict):
118
+ params["junction_params"] = json.dumps(params["junction_params"], sort_keys=True)
119
+ return params
120
+
121
+ def _radii(self):
122
+ ring_in = self.outer_ring_radius - self.outer_ring_width / 2
123
+ ring_out = self.outer_ring_radius + self.outer_ring_width / 2
124
+ return ring_in, ring_out, ring_out + self.m1_etch_extension_gap
125
+
126
+ def build(self):
127
+ dbu, n = self.layout.dbu, int(self.n)
128
+ ring_in, ring_out, r_etch1 = self._radii()
129
+ if not 0 < self.inner_circle_radius < ring_in:
130
+ self.raise_error_on_cell(
131
+ "Flipmon: the inner disc must end inside the ring (inner_circle_radius < "
132
+ "outer_ring_radius - outer_ring_width / 2)"
133
+ )
134
+ metal1 = _disk(dbu, self.inner_circle_radius, n) + (_disk(dbu, ring_out, n) - _disk(dbu, ring_in, n))
135
+ etch1 = _disk(dbu, r_etch1, n)
136
+ if self.with_coupler:
137
+ rc = ring_out + self.coupler_offset
138
+ w, ln, m = self.coupler_width, self.coupler_length, self.coupler_etch_margin
139
+ if rc - w / 2 <= ring_out or self.a > ln:
140
+ self.raise_error_on_cell("Flipmon: the coupler plate must clear the ring and be at least a long")
141
+ metal1 += _rect(dbu, rc - w / 2, -ln / 2, rc + w / 2, ln / 2)
142
+ etch1 += _rect(dbu, rc - w / 2 - m, -ln / 2 - m, rc + w / 2 + m, ln / 2 + m)
143
+ r_port = max(r_etch1, rc + w / 2 + m)
144
+ metal1 += _rect(dbu, rc + w / 2, -self.a / 2, r_port, self.a / 2)
145
+ etch1 += _rect(dbu, rc + w / 2, -self.a / 2 - self.b, r_port, self.a / 2 + self.b)
146
+ self.add_port("coupler", pya.DPoint(r_port, 0), pya.DVector(1, 0))
147
+ gap1 = (etch1 - metal1).merged()
148
+ self.cell.shapes(self.get_layer("base_metal_gap_wo_grid", 0)).insert(gap1)
149
+ self.add_protection(pya.Region(gap1.bbox()).sized(self.margin / dbu), 0)
150
+
151
+ metal2 = _disk(dbu, self.top_circle_radius, n)
152
+ gap2 = _disk(dbu, self.top_circle_radius + self.m2_etch_extension_gap, n) - metal2
153
+ self.cell.shapes(self.get_layer("base_metal_gap_wo_grid", 1)).insert(gap2)
154
+ self.add_protection(pya.Region(gap2.bbox()).sized(self.margin / dbu), 1)
155
+ bump = _disk(dbu, self.bump_diameter / 2, n)
156
+ for face in (0, 1):
157
+ self.cell.shapes(self.get_layer("indium_bump", face)).insert(bump)
158
+
159
+ theta = self.junction_position_rotation
160
+ self.refpoints["junction"] = _polar((self.inner_circle_radius + ring_in) / 2, theta)
161
+ self.refpoints["port_squid_a"] = _polar(self.inner_circle_radius, theta)
162
+ self.refpoints["port_squid_b"] = _polar(ring_in, theta)
163
+ if self.junction_type != "No Squid":
164
+ gap = ring_in - self.inner_circle_radius
165
+ trans = pya.DCplxTrans(1, theta + 90, False, pya.DVector(_polar(ring_in, theta)))
166
+ sim = {}
167
+ if self.junction_type == "Sim": # simulation stand-in: pads into disc and ring, port in the gap
168
+ shift, sim = sim_junction_in_gap(gap)
169
+ trans = trans * pya.DCplxTrans(1, 0, False, 0, -shift)
170
+ params = {"junction_total_length": gap, "window_height": gap, **sim,
171
+ **_junction_params(self.junction_params)}
172
+ refs = self.produce_squid(trans, **params)
173
+ squid_trans = trans * pya.DTrans.M90 if self.mirror_squid else trans
174
+ for ref in ("port_squid_a", "port_squid_b"):
175
+ if ref in refs:
176
+ self.refpoints[ref] = squid_trans * refs[ref]
177
+ self.refpoints["bump"] = pya.DPoint(0, 0)
178
+ self.refpoints["inner_ring_near_junction"] = pya.DPoint(self.inner_circle_radius / 2, 0)
179
+ self.refpoints["outer_ring_near_junction"] = pya.DPoint(ring_in, 0)
180
+ self.refpoints["outer_ring_outside"] = pya.DPoint(ring_out, 0)
181
+
182
+
183
+ class Gatemon(Element):
184
+ """Carbon-nanotube gatemon island in an etched pocket with a gate feed (QPDK ``gatemon``), M1 only.
185
+
186
+ Re-implemented from gdsfactory/quantum-rf-pdk ``qpdk/cells/gatemon.py`` (MIT), same parameters and checks,
187
+ island centred at the origin with the readout side at +y. Drawn (M1): the ``island_size`` island, the pocket
188
+ (``pocket_gap`` to the side walls, ``pocket_gap_top`` above, down to 0.2 × electrode height below the lower
189
+ contact pad), the M1 gate feed with its landing beside the hBN, and a ``gate_length`` CPW (``a``/``b``) out of
190
+ the pocket to port ``gate`` (faces −y). Port ``readout`` is the island's top edge (faces +y, a = island width,
191
+ b = ``pocket_gap_top``): snap it to a :class:`GatemonCoupler` ``qubit`` port.
192
+
193
+ Process layers (``draw_process_layers``, on by default; :data:`GATEMON_LAYERS`, proposed fab 600–604/0, not
194
+ yet in the PDK map — design decision #29): the Nb/Au contacts (two ``electrode_size`` pads centred at
195
+ ``electrode_offset``, the upper one 0.85 × its height under the island, the lower one 0.8 × under the ground;
196
+ ``lead_width`` stems down / up to the weak link and branches to ``junction_x``, tips ``junction_length`` apart),
197
+ the nanotube (``junction_width`` × (``junction_length`` + 2 · ``nanotube_contact_overlap``) across the tips),
198
+ the hBN flake (``hbn_size`` from ``hbn_left``, centred on the weak link), the Al reconnection patches
199
+ (``size_patch`` on each pad's overlap with the M1) and the top gate (``gate_tip_width`` strip from the weak link
200
+ over the hBN onto the M1 gate landing, ``gate_tip_gap`` of overlap). These are re-drawn from QPDK's derived
201
+ coordinates (the QPDK source was not available locally for an XOR check). Refpoints: ``junction`` (the weak
202
+ link), ``contact_island`` / ``contact_ground`` (pad centres), ``hbn`` (flake centre). The weak link joins the
203
+ island to ground: ``port_squid_a`` is the island edge above the contact stems, ``port_squid_b`` the pocket's
204
+ ground edge below them (the M1 terminals of the contacts).
205
+ """
206
+
207
+ island_size = Param(pdt.TypeList, "Island (width, height)", [150, 150], unit="[μm, μm]")
208
+ pocket_gap = Param(pdt.TypeDouble, "Island to pocket side walls", 60, unit="μm")
209
+ pocket_gap_top = Param(pdt.TypeDouble, "Island to the readout side of the pocket", 40, unit="μm")
210
+ electrode_size = Param(pdt.TypeList, "Nb/Au landing pad (width, height)", [60, 60], unit="[μm, μm]")
211
+ electrode_spacing = Param(pdt.TypeDouble, "Gap between the landing pads", 100, unit="μm")
212
+ lead_width = Param(pdt.TypeDouble, "Contact stem width", 2, unit="μm")
213
+ junction_length = Param(pdt.TypeDouble, "Gap between the contact tips", 1, unit="μm")
214
+ junction_width = Param(pdt.TypeDouble, "Nanotube placement width", 0.002, unit="μm")
215
+ junction_offset = Param(pdt.TypeDouble, "Stems to weak link (x)", 20, unit="μm")
216
+ nanotube_contact_overlap = Param(pdt.TypeDouble, "Tube overlap onto each contact", 0.5, unit="μm")
217
+ hbn_size = Param(pdt.TypeList, "hBN footprint (width, height)", [80, 80], unit="[μm, μm]")
218
+ size_patch = Param(pdt.TypeList, "Al reconnection patch (width, height)", [60, 50], unit="[μm, μm]")
219
+ electrode_offset = Param(pdt.TypeDouble, "Contact stems x relative to the island", -40, unit="μm")
220
+ gate_offset = Param(pdt.TypeDouble, "Stems to the M1 gate feed (x)", 100, unit="μm")
221
+ gate_tip_width = Param(pdt.TypeDouble, "Top-gate tip width", 16, unit="μm")
222
+ gate_tip_gap = Param(pdt.TypeDouble, "hBN to M1 gate landing clearance", 5, unit="μm")
223
+ gate_length = Param(pdt.TypeDouble, "M1 gate CPW beyond the pocket", 50, unit="μm")
224
+ draw_process_layers = Param(
225
+ pdt.TypeBoolean, "Draw contacts, nanotube, hBN, patches and top gate (proposed fab 600–604/0)", True
226
+ )
227
+
228
+ qcc_category = "qubit"
229
+
230
+ @classmethod
231
+ def qcc_port_widths(cls, params: dict) -> dict:
232
+ """``readout`` is the island edge (a reference plane for the coupler), not a CPW end."""
233
+ size = list(params.get("island_size") or [150, 150])
234
+ return {"readout": (float(size[0]), float(params.get("pocket_gap_top", 40)))}
235
+
236
+ def _geometry(self) -> dict:
237
+ """QPDK's derived coordinates (µm), after its checks; raises ValueError like QPDK."""
238
+ iw, ih = (float(v) for v in self.island_size)
239
+ ew, eh = (float(v) for v in self.electrode_size)
240
+ hw, hh = (float(v) for v in self.hbn_size)
241
+ pw, ph = (float(v) for v in self.size_patch)
242
+ a, b = self.a, self.b
243
+ dims = (
244
+ iw,
245
+ ih,
246
+ self.pocket_gap,
247
+ self.pocket_gap_top,
248
+ ew,
249
+ eh,
250
+ self.electrode_spacing,
251
+ self.lead_width,
252
+ self.junction_length,
253
+ self.junction_width,
254
+ self.junction_offset,
255
+ self.nanotube_contact_overlap,
256
+ hw,
257
+ hh,
258
+ pw,
259
+ ph,
260
+ self.gate_tip_width,
261
+ self.gate_tip_gap,
262
+ self.gate_length,
263
+ )
264
+ if min(dims) <= 0:
265
+ raise ValueError("Gatemon dimensions must be positive")
266
+ if self.junction_width < 2 * self.layout.dbu:
267
+ raise ValueError("Nanotube placement width must span at least two database units")
268
+ if self.junction_width > self.lead_width or self.nanotube_contact_overlap > self.lead_width:
269
+ raise ValueError("Nanotube trace and overlap must fit on the contact tips")
270
+ if self.junction_length + 2 * self.lead_width >= self.electrode_spacing:
271
+ raise ValueError("The contact branches must fit between the electrode pads")
272
+ if self.lead_width > ew or pw > ew or ph > 0.85 * eh:
273
+ raise ValueError("Contact leads and reconnection patches must fit the electrodes")
274
+ if abs(self.electrode_offset) + ew / 2 > iw / 2:
275
+ raise ValueError("The junction electrodes must lie under the island")
276
+ pocket_half = iw / 2 + self.pocket_gap
277
+ gate_x = self.electrode_offset + self.gate_offset
278
+ junction_x = self.electrode_offset + self.junction_offset
279
+ gate_half_extent = max(self.gate_tip_width / 2, a / 2 + b)
280
+ if self.gate_offset - a / 2 <= ew / 2:
281
+ raise ValueError("The gate line overlaps the junction electrodes")
282
+ if gate_x + gate_half_extent >= pocket_half:
283
+ raise ValueError("The gate line is outside the pocket")
284
+ upper_bottom = -ih / 2 - 0.15 * eh
285
+ lower_top = upper_bottom - self.electrode_spacing
286
+ pocket_bottom = lower_top - 0.2 * eh
287
+ junction_y = (upper_bottom + lower_top) / 2
288
+ stem_right = self.electrode_offset + self.lead_width / 2
289
+ gate_tip_left = junction_x - self.gate_tip_width / 2
290
+ if gate_tip_left <= stem_right:
291
+ raise ValueError("The gate tip must clear the left contact stems")
292
+ hbn_left = (stem_right + gate_tip_left) / 2
293
+ gate_landing_x = hbn_left + hw + self.gate_tip_gap
294
+ if gate_landing_x >= gate_x - a / 2:
295
+ raise ValueError("The hBN footprint and gate landing must fit before the gate line")
296
+ if hbn_left <= -pocket_half:
297
+ raise ValueError("The hBN footprint is outside the pocket")
298
+ if junction_y - hh / 2 <= pocket_bottom or junction_y + hh / 2 >= -ih / 2:
299
+ raise ValueError("The hBN footprint must fit between island and ground")
300
+ return {
301
+ "iw": iw,
302
+ "ih": ih,
303
+ "eh": eh,
304
+ "hw": hw,
305
+ "pocket_half": pocket_half,
306
+ "gate_x": gate_x,
307
+ "junction_x": junction_x,
308
+ "junction_y": junction_y,
309
+ "upper_bottom": upper_bottom,
310
+ "lower_top": lower_top,
311
+ "pocket_bottom": pocket_bottom,
312
+ "hbn_left": hbn_left,
313
+ "gate_landing_x": gate_landing_x,
314
+ }
315
+
316
+ def build(self):
317
+ try:
318
+ g = self._geometry()
319
+ except ValueError as e:
320
+ self.raise_error_on_cell(f"Gatemon: {e}")
321
+ dbu, a, b = self.layout.dbu, self.a, self.b
322
+ iw, ih, gx = g["iw"], g["ih"], g["gate_x"]
323
+ metal = _rect(dbu, -iw / 2, -ih / 2, iw / 2, ih / 2)
324
+ metal += _rect(dbu, gx - a / 2, g["pocket_bottom"], gx + a / 2, g["junction_y"] + self.gate_tip_width / 2)
325
+ metal += _rect(
326
+ dbu,
327
+ g["gate_landing_x"],
328
+ g["junction_y"] - self.gate_tip_width / 2,
329
+ gx + a / 2,
330
+ g["junction_y"] + self.gate_tip_width / 2,
331
+ )
332
+ pocket = _rect(dbu, -g["pocket_half"], g["pocket_bottom"], g["pocket_half"], ih / 2 + self.pocket_gap_top)
333
+ y_end = g["pocket_bottom"] - self.gate_length
334
+ gate_cpw = _rect(dbu, gx - a / 2 - b, y_end, gx + a / 2 + b, g["pocket_bottom"]) - _rect(
335
+ dbu, gx - a / 2, y_end, gx + a / 2, g["pocket_bottom"]
336
+ )
337
+ gaps = ((pocket - metal) + gate_cpw).merged()
338
+ self.cell.shapes(self.get_layer("base_metal_gap_wo_grid")).insert(gaps)
339
+ self.add_protection(pya.Region(gaps.bbox()).sized(self.margin / dbu))
340
+ self.add_port("readout", pya.DPoint(0, ih / 2), pya.DVector(0, 1))
341
+ self.add_port("gate", pya.DPoint(gx, y_end), pya.DVector(0, -1))
342
+ self.refpoints["junction"] = pya.DPoint(g["junction_x"], g["junction_y"])
343
+ self.refpoints["contact_island"] = pya.DPoint(self.electrode_offset, g["upper_bottom"] + g["eh"] / 2)
344
+ self.refpoints["contact_ground"] = pya.DPoint(self.electrode_offset, g["lower_top"] - g["eh"] / 2)
345
+ self.refpoints["hbn"] = pya.DPoint(g["hbn_left"] + g["hw"] / 2, g["junction_y"])
346
+ self.refpoints["port_squid_a"] = pya.DPoint(self.electrode_offset, -ih / 2)
347
+ self.refpoints["port_squid_b"] = pya.DPoint(self.electrode_offset, g["pocket_bottom"])
348
+ if self.draw_process_layers:
349
+ for name, region in self._process_layers(g).items():
350
+ self.cell.shapes(self.layout.layer(GATEMON_LAYERS[name])).insert(region.merged())
351
+
352
+ def _process_layers(self, g: dict) -> dict:
353
+ """The gatemon's non-M1 layers (dbu regions), from QPDK's derived coordinates ``g``."""
354
+ dbu, lw, jl = self.layout.dbu, self.lead_width, self.junction_length
355
+ ew, eh = (float(v) for v in self.electrode_size)
356
+ pw, ph = (float(v) for v in self.size_patch)
357
+ hw, hh = (float(v) for v in self.hbn_size)
358
+ ex, jx, jy = self.electrode_offset, g["junction_x"], g["junction_y"]
359
+ ub, lt = g["upper_bottom"], g["lower_top"]
360
+ y_up, y_lo = jy + jl / 2 + lw / 2, jy - jl / 2 - lw / 2 # branch centre lines (tips jl apart)
361
+ contacts = _rect(dbu, ex - ew / 2, ub, ex + ew / 2, ub + eh) + _rect(dbu, ex - ew / 2, lt - eh, ex + ew / 2, lt)
362
+ contacts += _rect(dbu, ex - lw / 2, y_up - lw / 2, ex + lw / 2, ub) # stems
363
+ contacts += _rect(dbu, ex - lw / 2, lt, ex + lw / 2, y_lo + lw / 2)
364
+ contacts += _rect(dbu, ex - lw / 2, y_up - lw / 2, jx + lw / 2, y_up + lw / 2) # branches to the tips
365
+ contacts += _rect(dbu, ex - lw / 2, y_lo - lw / 2, jx + lw / 2, y_lo + lw / 2)
366
+ ov, tw = self.nanotube_contact_overlap, max(self.junction_width, 2 * dbu)
367
+ cnt = _rect(dbu, jx - tw / 2, jy - jl / 2 - ov, jx + tw / 2, jy + jl / 2 + ov)
368
+ hbn = _rect(dbu, g["hbn_left"], jy - hh / 2, g["hbn_left"] + hw, jy + hh / 2)
369
+ # patches on the pads' far ends (over the island / the ground; QPDK allows ph ≤ 0.85 · eh)
370
+ patch = _rect(dbu, ex - pw / 2, ub + eh - ph, ex + pw / 2, ub + eh)
371
+ patch += _rect(dbu, ex - pw / 2, lt - eh, ex + pw / 2, lt - eh + ph)
372
+ gt = self.gate_tip_width
373
+ top_gate = _rect(dbu, jx - gt / 2, jy - gt / 2, g["gate_landing_x"] + self.gate_tip_gap, jy + gt / 2)
374
+ return {"cnt_contact": contacts, "cnt": cnt, "hbn": hbn, "jj_patch": patch, "top_gate": top_gate}