bloqade-circuit 0.3.0__tar.gz → 0.4.0__tar.gz

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.

Potentially problematic release.


This version of bloqade-circuit might be problematic. Click here for more details.

Files changed (304) hide show
  1. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/PKG-INFO +3 -1
  2. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/pyproject.toml +6 -1
  3. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/analysis/address/impls.py +3 -16
  4. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/noise/native.py +8 -8
  5. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/squin/op.py +7 -0
  6. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/squin/qubit.py +0 -29
  7. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/squin/runtime.py +18 -0
  8. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/squin/wire.py +0 -36
  9. {bloqade_circuit-0.3.0/src/bloqade/noise/native → bloqade_circuit-0.4.0/src/bloqade/qasm2/dialects/noise}/__init__.py +1 -7
  10. bloqade_circuit-0.4.0/src/bloqade/qasm2/dialects/noise/_dialect.py +3 -0
  11. {bloqade_circuit-0.3.0/src/bloqade → bloqade_circuit-0.4.0/src/bloqade/qasm2/dialects}/noise/fidelity.py +2 -2
  12. bloqade_circuit-0.4.0/src/bloqade/qasm2/dialects/noise/model.py +278 -0
  13. bloqade_circuit-0.4.0/src/bloqade/qasm2/emit/impls/__init__.py +1 -0
  14. bloqade_circuit-0.3.0/src/bloqade/qasm2/emit/impls/noise_native.py → bloqade_circuit-0.4.0/src/bloqade/qasm2/emit/impls/noise.py +11 -11
  15. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/emit/main.py +2 -4
  16. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/emit/target.py +3 -3
  17. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/groups.py +0 -2
  18. bloqade_circuit-0.3.0/src/bloqade/noise/native/_wrappers.py → bloqade_circuit-0.4.0/src/bloqade/qasm2/noise.py +9 -5
  19. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/passes/glob.py +12 -8
  20. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/passes/noise.py +5 -14
  21. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/rewrite/__init__.py +2 -0
  22. {bloqade_circuit-0.3.0/src/bloqade/qasm2/rewrite → bloqade_circuit-0.4.0/src/bloqade/qasm2/rewrite/noise}/heuristic_noise.py +31 -53
  23. bloqade_circuit-0.3.0/src/bloqade/noise/native/rewrite.py → bloqade_circuit-0.4.0/src/bloqade/qasm2/rewrite/noise/remove_noise.py +2 -2
  24. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qbraid/lowering.py +8 -8
  25. bloqade_circuit-0.4.0/src/bloqade/squin/__init__.py +8 -0
  26. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/analysis/nsites/impls.py +0 -9
  27. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/groups.py +4 -4
  28. bloqade_circuit-0.4.0/src/bloqade/squin/lowering.py +27 -0
  29. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/op/__init__.py +1 -0
  30. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/op/_wrapper.py +4 -0
  31. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/op/stmts.py +10 -0
  32. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/qubit.py +32 -37
  33. bloqade_circuit-0.4.0/src/bloqade/squin/rewrite/desugar.py +65 -0
  34. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/rewrite/qubit_to_stim.py +0 -23
  35. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/rewrite/squin_measure.py +2 -27
  36. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/rewrite/stim_rewrite_util.py +3 -8
  37. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/rewrite/wire_to_stim.py +0 -21
  38. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/wire.py +4 -9
  39. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/__init__.py +2 -1
  40. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/_wrappers.py +4 -0
  41. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/auxiliary/__init__.py +1 -0
  42. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/auxiliary/emit.py +17 -2
  43. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/auxiliary/stmts/__init__.py +1 -0
  44. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/auxiliary/stmts/annotate.py +8 -0
  45. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/collapse/emit_str.py +3 -1
  46. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/gate/emit.py +9 -2
  47. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/noise/emit.py +32 -1
  48. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/noise/stmts.py +29 -0
  49. bloqade_circuit-0.4.0/src/bloqade/stim/parse/__init__.py +1 -0
  50. bloqade_circuit-0.4.0/src/bloqade/stim/parse/lowering.py +686 -0
  51. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/analysis/address/test_analysis.py +32 -0
  52. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/analysis/fidelity/test_fidelity.py +41 -80
  53. {bloqade_circuit-0.3.0/test/pyqrack/runtime/noise/native → bloqade_circuit-0.4.0/test/pyqrack/runtime/noise/qasm2}/test_loss.py +3 -3
  54. {bloqade_circuit-0.3.0/test/pyqrack/runtime/noise/native → bloqade_circuit-0.4.0/test/pyqrack/runtime/noise/qasm2}/test_pauli.py +16 -16
  55. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/pyqrack/test_squin.py +1 -12
  56. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/emit/test_extended_noise.py +11 -10
  57. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/emit/test_qasm2_emit.py +7 -7
  58. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/passes/test_heuristic_noise.py +31 -42
  59. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/test_inline.py +3 -4
  60. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qbraid/test_clean_circuit.py +5 -7
  61. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qbraid/test_lowering.py +19 -20
  62. bloqade_circuit-0.4.0/test/squin/op/test_reset.py +58 -0
  63. bloqade_circuit-0.3.0/test/squin/stim/stim.py → bloqade_circuit-0.4.0/test/squin/stim/test_stim.py +18 -125
  64. bloqade_circuit-0.4.0/test/squin/test_sugar.py +72 -0
  65. bloqade_circuit-0.4.0/test/stim/dialects/stim/emit/test_stim_qubit_coords.py +15 -0
  66. bloqade_circuit-0.4.0/test/stim/parse/base.py +12 -0
  67. bloqade_circuit-0.4.0/test/stim/parse/test_parse.py +122 -0
  68. bloqade_circuit-0.4.0/test/stim/parse/test_parse_clifford.py +45 -0
  69. bloqade_circuit-0.4.0/test/stim/parse/test_parse_control.py +24 -0
  70. bloqade_circuit-0.4.0/test/stim/parse/test_parse_custom.py +30 -0
  71. bloqade_circuit-0.4.0/test/stim/parse/test_parse_noise.py +52 -0
  72. bloqade_circuit-0.4.0/test/stim/parse/test_parse_spp.py +21 -0
  73. bloqade_circuit-0.4.0/test/stim/wrapper/__init__.py +0 -0
  74. bloqade_circuit-0.4.0/test/test_zone_model.py +36 -0
  75. bloqade_circuit-0.4.0/test/visual/__init__.py +0 -0
  76. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/uv.lock +660 -539
  77. bloqade_circuit-0.3.0/src/bloqade/noise/__init__.py +0 -2
  78. bloqade_circuit-0.3.0/src/bloqade/noise/native/_dialect.py +0 -3
  79. bloqade_circuit-0.3.0/src/bloqade/noise/native/model.py +0 -346
  80. bloqade_circuit-0.3.0/src/bloqade/qasm2/dialects/noise.py +0 -48
  81. bloqade_circuit-0.3.0/src/bloqade/qasm2/emit/impls/__init__.py +0 -1
  82. bloqade_circuit-0.3.0/src/bloqade/squin/__init__.py +0 -2
  83. bloqade_circuit-0.3.0/src/bloqade/squin/rewrite/measure_desugar.py +0 -33
  84. bloqade_circuit-0.3.0/test/squin/test_measure_sugar.py +0 -36
  85. bloqade_circuit-0.3.0/test/test_zone_model.py +0 -66
  86. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/.github/dependabot.yml +0 -0
  87. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/.github/workflows/ci.yml +0 -0
  88. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/.github/workflows/isort.yml +0 -0
  89. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/.github/workflows/lint.yml +0 -0
  90. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/.github/workflows/release.yml +0 -0
  91. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/.gitignore +0 -0
  92. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/.pre-commit-config.yaml +0 -0
  93. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/LICENSE +0 -0
  94. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/README.md +0 -0
  95. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/_typos.toml +0 -0
  96. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/justfile +0 -0
  97. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/analysis/__init__.py +0 -0
  98. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/analysis/address/__init__.py +0 -0
  99. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/analysis/address/analysis.py +0 -0
  100. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/analysis/address/lattice.py +0 -0
  101. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/analysis/fidelity/__init__.py +0 -0
  102. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/analysis/fidelity/analysis.py +0 -0
  103. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/device.py +0 -0
  104. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/__init__.py +0 -0
  105. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/base.py +0 -0
  106. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/device.py +0 -0
  107. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/noise/__init__.py +0 -0
  108. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/qasm2/__init__.py +0 -0
  109. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/qasm2/core.py +0 -0
  110. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/qasm2/glob.py +0 -0
  111. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/qasm2/parallel.py +0 -0
  112. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/qasm2/uop.py +0 -0
  113. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/reg.py +0 -0
  114. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/squin/__init__.py +0 -0
  115. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/target.py +0 -0
  116. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/pyqrack/task.py +0 -0
  117. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/__init__.py +0 -0
  118. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/_qasm_loading.py +0 -0
  119. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/_wrappers.py +0 -0
  120. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/__init__.py +0 -0
  121. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/core/__init__.py +0 -0
  122. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/core/_dialect.py +0 -0
  123. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/core/_emit.py +0 -0
  124. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/core/_typeinfer.py +0 -0
  125. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/core/address.py +0 -0
  126. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/core/stmts.py +0 -0
  127. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/expr/__init__.py +0 -0
  128. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/expr/_dialect.py +0 -0
  129. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/expr/_emit.py +0 -0
  130. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/expr/_from_python.py +0 -0
  131. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/expr/_interp.py +0 -0
  132. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/expr/stmts.py +0 -0
  133. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/glob.py +0 -0
  134. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/indexing.py +0 -0
  135. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/inline.py +0 -0
  136. {bloqade_circuit-0.3.0/src/bloqade/noise/native → bloqade_circuit-0.4.0/src/bloqade/qasm2/dialects/noise}/stmts.py +0 -0
  137. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/parallel.py +0 -0
  138. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/uop/__init__.py +0 -0
  139. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/uop/_dialect.py +0 -0
  140. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/uop/_emit.py +0 -0
  141. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/uop/schedule.py +0 -0
  142. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/dialects/uop/stmts.py +0 -0
  143. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/emit/__init__.py +0 -0
  144. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/emit/base.py +0 -0
  145. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/emit/gate.py +0 -0
  146. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/glob.py +0 -0
  147. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/parallel.py +0 -0
  148. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/parse/__init__.py +0 -0
  149. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/parse/ast.py +0 -0
  150. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/parse/build.py +0 -0
  151. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/parse/lowering.py +0 -0
  152. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/parse/parser.py +0 -0
  153. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/parse/print.py +0 -0
  154. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/parse/qasm2.lark +0 -0
  155. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/parse/visitor.py +0 -0
  156. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/parse/visitor.pyi +0 -0
  157. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/passes/__init__.py +0 -0
  158. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/passes/fold.py +0 -0
  159. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/passes/lift_qubits.py +0 -0
  160. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/passes/parallel.py +0 -0
  161. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/passes/py2qasm.py +0 -0
  162. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/passes/qasm2py.py +0 -0
  163. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/passes/unroll_if.py +0 -0
  164. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/rewrite/desugar.py +0 -0
  165. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/rewrite/glob.py +0 -0
  166. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/rewrite/insert_qubits.py +0 -0
  167. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/rewrite/native_gates.py +0 -0
  168. {bloqade_circuit-0.3.0/src/bloqade/squin/analysis → bloqade_circuit-0.4.0/src/bloqade/qasm2/rewrite/noise}/__init__.py +0 -0
  169. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/rewrite/parallel_to_uop.py +0 -0
  170. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/rewrite/register.py +0 -0
  171. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/rewrite/split_ifs.py +0 -0
  172. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/rewrite/uop_to_parallel.py +0 -0
  173. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qasm2/types.py +0 -0
  174. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qbraid/__init__.py +0 -0
  175. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qbraid/schema.py +0 -0
  176. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qbraid/simulation_result.py +0 -0
  177. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/qbraid/target.py +0 -0
  178. {bloqade_circuit-0.3.0/src/bloqade/visual/animation → bloqade_circuit-0.4.0/src/bloqade/squin/analysis}/__init__.py +0 -0
  179. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/analysis/nsites/__init__.py +0 -0
  180. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/analysis/nsites/analysis.py +0 -0
  181. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/analysis/nsites/lattice.py +0 -0
  182. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/analysis/schedule.py +0 -0
  183. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/noise/__init__.py +0 -0
  184. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/noise/_dialect.py +0 -0
  185. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/noise/_wrapper.py +0 -0
  186. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/noise/stmts.py +0 -0
  187. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/op/_dialect.py +0 -0
  188. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/op/number.py +0 -0
  189. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/op/rewrite.py +0 -0
  190. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/op/stdlib.py +0 -0
  191. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/op/traits.py +0 -0
  192. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/op/types.py +0 -0
  193. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/passes/__init__.py +0 -0
  194. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/passes/stim.py +0 -0
  195. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/rewrite/__init__.py +0 -0
  196. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/rewrite/wire_identity_elimination.py +0 -0
  197. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/squin/rewrite/wrap_analysis.py +0 -0
  198. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/__init__.py +0 -0
  199. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/auxiliary/_dialect.py +0 -0
  200. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/auxiliary/interp.py +0 -0
  201. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/auxiliary/lowering.py +0 -0
  202. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/auxiliary/stmts/const.py +0 -0
  203. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/auxiliary/types.py +0 -0
  204. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/collapse/__init__.py +0 -0
  205. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/collapse/_dialect.py +0 -0
  206. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/collapse/stmts/__init__.py +0 -0
  207. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/collapse/stmts/measure.py +0 -0
  208. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/collapse/stmts/pp_measure.py +0 -0
  209. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/collapse/stmts/reset.py +0 -0
  210. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/gate/__init__.py +0 -0
  211. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/gate/_dialect.py +0 -0
  212. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/gate/stmts/__init__.py +0 -0
  213. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/gate/stmts/base.py +0 -0
  214. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/gate/stmts/clifford_1q.py +0 -0
  215. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/gate/stmts/clifford_2q.py +0 -0
  216. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/gate/stmts/control_2q.py +0 -0
  217. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/gate/stmts/pp.py +0 -0
  218. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/noise/__init__.py +0 -0
  219. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/dialects/noise/_dialect.py +0 -0
  220. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/emit/__init__.py +0 -0
  221. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/emit/stim_str.py +0 -0
  222. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/stim/groups.py +0 -0
  223. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/task.py +0 -0
  224. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/test_utils.py +0 -0
  225. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/types.py +0 -0
  226. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/visual/__init__.py +0 -0
  227. {bloqade_circuit-0.3.0/src/bloqade/visual/animation/runtime → bloqade_circuit-0.4.0/src/bloqade/visual/animation}/__init__.py +0 -0
  228. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/visual/animation/animate.py +0 -0
  229. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/visual/animation/base.py +0 -0
  230. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/visual/animation/gate_event.py +0 -0
  231. {bloqade_circuit-0.3.0/test → bloqade_circuit-0.4.0/src/bloqade/visual/animation/runtime}/__init__.py +0 -0
  232. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/visual/animation/runtime/aod.py +0 -0
  233. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/visual/animation/runtime/atoms.py +0 -0
  234. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/visual/animation/runtime/ppoly.py +0 -0
  235. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/visual/animation/runtime/qpustate.py +0 -0
  236. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/src/bloqade/visual/animation/runtime/utils.py +0 -0
  237. {bloqade_circuit-0.3.0/test/pyqrack → bloqade_circuit-0.4.0/test}/__init__.py +0 -0
  238. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/analysis/address/test_lattice.py +0 -0
  239. {bloqade_circuit-0.3.0/test/pyqrack/runtime → bloqade_circuit-0.4.0/test/pyqrack}/__init__.py +0 -0
  240. {bloqade_circuit-0.3.0/test/pyqrack/runtime/noise → bloqade_circuit-0.4.0/test/pyqrack/runtime}/__init__.py +0 -0
  241. {bloqade_circuit-0.3.0/test/qasm2 → bloqade_circuit-0.4.0/test/pyqrack/runtime/noise}/__init__.py +0 -0
  242. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/pyqrack/runtime/test_dyn_memory.py +0 -0
  243. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/pyqrack/runtime/test_qrack.py +0 -0
  244. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/pyqrack/test_target.py +0 -0
  245. {bloqade_circuit-0.3.0/test/qasm2/parse → bloqade_circuit-0.4.0/test/qasm2}/__init__.py +0 -0
  246. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/analysis/test_dag.py +0 -0
  247. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/emit/test_extended.py +0 -0
  248. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/emit/test_qasm2.py +0 -0
  249. {bloqade_circuit-0.3.0/test/qasm2/passes → bloqade_circuit-0.4.0/test/qasm2/parse}/__init__.py +0 -0
  250. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/invalid_programs/invalid_if.qasm +0 -0
  251. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/README.md +0 -0
  252. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/global.qasm +0 -0
  253. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/iqft1.qasm +0 -0
  254. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/main.qasm +0 -0
  255. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/noise.qasm +0 -0
  256. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/para.qasm +0 -0
  257. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/process_tomo.qasm +0 -0
  258. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/qelib1.inc +0 -0
  259. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/qft.qasm +0 -0
  260. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/qft2.qasm +0 -0
  261. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/rb.qasm +0 -0
  262. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/rep_code.qasm +0 -0
  263. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/ripple_carry_adder.qasm +0 -0
  264. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/tele.qasm +0 -0
  265. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/programs/valid_if.qasm +0 -0
  266. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/test_ast.py +0 -0
  267. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/parse/test_roundtrip.py +0 -0
  268. {bloqade_circuit-0.3.0/test/qbraid → bloqade_circuit-0.4.0/test/qasm2/passes}/__init__.py +0 -0
  269. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/passes/test_global_to_parallel.py +0 -0
  270. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/passes/test_global_to_uop.py +0 -0
  271. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/passes/test_parallel_to_uop.py +0 -0
  272. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/passes/test_qasm2py.py +0 -0
  273. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/passes/test_unroll_if.py +0 -0
  274. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/passes/test_uop_to_parallel.py +0 -0
  275. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/test_count.py +0 -0
  276. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/test_lowering.py +0 -0
  277. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/test_native.py +0 -0
  278. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qasm2/test_two2one.py +0 -0
  279. {bloqade_circuit-0.3.0/test/sample → bloqade_circuit-0.4.0/test/qbraid}/__init__.py +0 -0
  280. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/qbraid/test_target.py +0 -0
  281. {bloqade_circuit-0.3.0/test/stim → bloqade_circuit-0.4.0/test/sample}/__init__.py +0 -0
  282. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/sample/test_noise_model.py +0 -0
  283. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/squin/analysis/test_nsites_analysis.py +0 -0
  284. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/squin/test_constprop.py +0 -0
  285. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/squin/test_mult_rewrite.py +0 -0
  286. {bloqade_circuit-0.3.0/test/stim/dialects → bloqade_circuit-0.4.0/test/stim}/__init__.py +0 -0
  287. {bloqade_circuit-0.3.0/test/stim/dialects/stim → bloqade_circuit-0.4.0/test/stim/dialects}/__init__.py +0 -0
  288. {bloqade_circuit-0.3.0/test/stim/dialects/stim/emit → bloqade_circuit-0.4.0/test/stim/dialects/stim}/__init__.py +0 -0
  289. {bloqade_circuit-0.3.0/test/stim/wrapper → bloqade_circuit-0.4.0/test/stim/dialects/stim/emit}/__init__.py +0 -0
  290. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/dialects/stim/emit/base.py +0 -0
  291. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/dialects/stim/emit/test_stim_1q.py +0 -0
  292. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/dialects/stim/emit/test_stim_ctrl.py +0 -0
  293. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/dialects/stim/emit/test_stim_detector.py +0 -0
  294. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/dialects/stim/emit/test_stim_meas.py +0 -0
  295. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/dialects/stim/emit/test_stim_noise.py +0 -0
  296. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/dialects/stim/emit/test_stim_obs_inc.py +0 -0
  297. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/dialects/stim/emit/test_stim_ppmeas.py +0 -0
  298. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/dialects/stim/emit/test_stim_spp.py +0 -0
  299. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/dialects/stim/test_stim_circuits.py +0 -0
  300. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/dialects/stim/test_stim_const.py +0 -0
  301. {bloqade_circuit-0.3.0/test/visual → bloqade_circuit-0.4.0/test/stim/parse}/__init__.py +0 -0
  302. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/stim/wrapper/test_wrapper.py +0 -0
  303. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/test_serialization.py +0 -0
  304. {bloqade_circuit-0.3.0 → bloqade_circuit-0.4.0}/test/visual/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bloqade-circuit
3
- Version: 0.3.0
3
+ Version: 0.4.0
4
4
  Summary: The software development toolkit for neutral atom arrays.
5
5
  Author-email: Roger-luo <rluo@quera.com>, kaihsin <khwu@quera.com>, weinbe58 <pweinberg@quera.com>, johnzl-777 <jlong@quera.com>
6
6
  License-File: LICENSE
@@ -24,6 +24,8 @@ Provides-Extra: qasm2
24
24
  Requires-Dist: lark>=1.2.2; extra == 'qasm2'
25
25
  Provides-Extra: qbraid
26
26
  Requires-Dist: qbraid>=0.9.3; extra == 'qbraid'
27
+ Provides-Extra: stim
28
+ Requires-Dist: stim>=1.15.0; extra == 'stim'
27
29
  Provides-Extra: vis
28
30
  Requires-Dist: ffmpeg>=1.4; extra == 'vis'
29
31
  Requires-Dist: matplotlib>=3.9.2; extra == 'vis'
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "bloqade-circuit"
3
- version = "0.3.0"
3
+ version = "0.4.0"
4
4
  description = "The software development toolkit for neutral atom arrays."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -44,6 +44,9 @@ pyqrack-opencl = [
44
44
  pyqrack-cuda = [
45
45
  "pyqrack-cuda>=1.38.2",
46
46
  ]
47
+ stim = [
48
+ "stim>=1.15.0",
49
+ ]
47
50
 
48
51
  [build-system]
49
52
  requires = ["hatchling"]
@@ -79,6 +82,7 @@ dev-linux = [
79
82
  "matplotlib>=3.9.2",
80
83
  "pyqt5>=5.15.11",
81
84
  "tqdm>=4.67.1",
85
+ "stim>=1.15.0",
82
86
  ]
83
87
  dev-mac-arm = [
84
88
  "cirq-core[contrib]>=1.4.1",
@@ -89,6 +93,7 @@ dev-mac-arm = [
89
93
  "pyqt5>=5.15.11",
90
94
  "qbraid>=0.9.5",
91
95
  "tqdm>=4.67.1",
96
+ "stim>=1.15.0",
92
97
  ]
93
98
 
94
99
  [tool.isort]
@@ -75,6 +75,7 @@ class PyIndexing(interp.MethodTable):
75
75
  def getitem(self, interp: AddressAnalysis, frame: interp.Frame, stmt: py.GetItem):
76
76
  # Integer index into the thing being indexed
77
77
  idx = interp.get_const_value(int, stmt.index)
78
+
78
79
  # The object being indexed into
79
80
  obj = frame.get(stmt.obj)
80
81
  # The `data` attributes holds onto other Address types
@@ -144,13 +145,13 @@ class Scf(scf.absint.Methods):
144
145
  # NOTE: we need to actually run iteration in case there are
145
146
  # new allocations/re-assign in the loop body.
146
147
  for _ in iterable:
147
- with interp_.state.new_frame(interp_.new_frame(stmt)) as body_frame:
148
+ with interp_.new_frame(stmt) as body_frame:
148
149
  body_frame.entries.update(frame.entries)
149
150
  body_frame.set_values(
150
151
  block_args,
151
152
  (NotQubit(),) + loop_vars,
152
153
  )
153
- loop_vars = interp_.run_ssacfg_region(body_frame, stmt.body)
154
+ loop_vars = interp_.run_ssacfg_region(body_frame, stmt.body, ())
154
155
 
155
156
  if loop_vars is None:
156
157
  loop_vars = ()
@@ -206,20 +207,6 @@ class SquinWireMethodTable(interp.MethodTable):
206
207
  ):
207
208
  return frame.get_values(stmt.inputs)
208
209
 
209
- @interp.impl(squin.wire.MeasureAndReset)
210
- def measure_and_reset(
211
- self,
212
- interp_: AddressAnalysis,
213
- frame: ForwardFrame[Address],
214
- stmt: squin.wire.MeasureAndReset,
215
- ):
216
-
217
- # take the address data from the incoming wire
218
- # and propagate that forward to the new wire generated.
219
- # The first entry can safely be NotQubit because
220
- # it's an integer
221
- return (NotQubit(), frame.get(stmt.wire))
222
-
223
210
 
224
211
  @squin.qubit.dialect.register(key="qubit.address")
225
212
  class SquinQubitMethodTable(interp.MethodTable):
@@ -2,11 +2,11 @@ from typing import List
2
2
 
3
3
  from kirin import interp
4
4
 
5
- from bloqade.noise import native
6
5
  from bloqade.pyqrack import PyQrackInterpreter, reg
6
+ from bloqade.qasm2.dialects import noise
7
7
 
8
8
 
9
- @native.dialect.register(key="pyqrack")
9
+ @noise.dialect.register(key="pyqrack")
10
10
  class PyQrackMethods(interp.MethodTable):
11
11
  def apply_pauli_error(
12
12
  self,
@@ -27,12 +27,12 @@ class PyQrackMethods(interp.MethodTable):
27
27
 
28
28
  getattr(qarg.sim_reg, which)(qarg.addr)
29
29
 
30
- @interp.impl(native.PauliChannel)
30
+ @interp.impl(noise.PauliChannel)
31
31
  def single_qubit_error_channel(
32
32
  self,
33
33
  interp: PyQrackInterpreter,
34
34
  frame: interp.Frame,
35
- stmt: native.PauliChannel,
35
+ stmt: noise.PauliChannel,
36
36
  ):
37
37
  qargs: List[reg.PyQrackQubit] = frame.get(stmt.qargs)
38
38
 
@@ -43,12 +43,12 @@ class PyQrackMethods(interp.MethodTable):
43
43
 
44
44
  return ()
45
45
 
46
- @interp.impl(native.CZPauliChannel)
46
+ @interp.impl(noise.CZPauliChannel)
47
47
  def cz_pauli_channel(
48
48
  self,
49
49
  interp: PyQrackInterpreter,
50
50
  frame: interp.Frame,
51
- stmt: native.CZPauliChannel,
51
+ stmt: noise.CZPauliChannel,
52
52
  ):
53
53
 
54
54
  qargs: List[reg.PyQrackQubit] = frame.get(stmt.qargs)
@@ -80,12 +80,12 @@ class PyQrackMethods(interp.MethodTable):
80
80
 
81
81
  return ()
82
82
 
83
- @interp.impl(native.AtomLossChannel)
83
+ @interp.impl(noise.AtomLossChannel)
84
84
  def atom_loss_channel(
85
85
  self,
86
86
  interp: PyQrackInterpreter,
87
87
  frame: interp.Frame,
88
- stmt: native.AtomLossChannel,
88
+ stmt: noise.AtomLossChannel,
89
89
  ):
90
90
  qargs: List[reg.PyQrackQubit] = frame.get(stmt.qargs)
91
91
 
@@ -10,6 +10,7 @@ from .runtime import (
10
10
  RotRuntime,
11
11
  KronRuntime,
12
12
  MultRuntime,
13
+ ResetRuntime,
13
14
  ScaleRuntime,
14
15
  AdjointRuntime,
15
16
  ControlRuntime,
@@ -94,6 +95,12 @@ class PyQrackMethods(interp.MethodTable):
94
95
  global_ = isinstance(stmt, op.stmts.PhaseOp)
95
96
  return (PhaseOpRuntime(theta, global_=global_),)
96
97
 
98
+ @interp.impl(op.stmts.Reset)
99
+ def reset(
100
+ self, interp: PyQrackInterpreter, frame: interp.Frame, stmt: op.stmts.Reset
101
+ ) -> tuple[OperatorRuntimeABC]:
102
+ return (ResetRuntime(),)
103
+
97
104
  @interp.impl(op.stmts.X)
98
105
  @interp.impl(op.stmts.Y)
99
106
  @interp.impl(op.stmts.Z)
@@ -61,32 +61,3 @@ class PyQrackMethods(interp.MethodTable):
61
61
  qbit: PyQrackQubit = frame.get(stmt.qubit)
62
62
  result = self._measure_qubit(qbit, interp)
63
63
  return (result,)
64
-
65
- @interp.impl(qubit.MeasureAndReset)
66
- def measure_and_reset(
67
- self,
68
- interp: PyQrackInterpreter,
69
- frame: interp.Frame,
70
- stmt: qubit.MeasureAndReset,
71
- ):
72
- qubits: ilist.IList[PyQrackQubit, Any] = frame.get(stmt.qubits)
73
- result = []
74
- for qbit in qubits:
75
- qbit_result = self._measure_qubit(qbit, interp)
76
-
77
- if qbit_result:
78
- qbit.sim_reg.x(qbit.addr)
79
-
80
- result.append(qbit_result)
81
-
82
- return (ilist.IList(result),)
83
-
84
- @interp.impl(qubit.Reset)
85
- def reset(self, interp: PyQrackInterpreter, frame: interp.Frame, stmt: qubit.Reset):
86
- qubits: ilist.IList[PyQrackQubit, Any] = frame.get(stmt.qubits)
87
- for qbit in qubits:
88
- if not qbit.is_active():
89
- continue
90
-
91
- if bool(qbit.sim_reg.m(qbit.addr)):
92
- qbit.sim_reg.x(qbit.addr)
@@ -41,6 +41,24 @@ class OperatorRuntimeABC:
41
41
  self.apply(*targets, **kwargs)
42
42
 
43
43
 
44
+ @dataclass(frozen=True)
45
+ class ResetRuntime(OperatorRuntimeABC):
46
+ """Reset the qubit to |0> state"""
47
+
48
+ @property
49
+ def n_sites(self) -> int:
50
+ return 1
51
+
52
+ def apply(self, *qubits: PyQrackQubit, adjoint: bool = False) -> None:
53
+ for qubit in qubits:
54
+ if not qubit.is_active():
55
+ continue
56
+
57
+ res: bool = qubit.sim_reg.m(qubit.addr)
58
+ if res:
59
+ qubit.sim_reg.x(qubit.addr)
60
+
61
+
44
62
  @dataclass(frozen=True)
45
63
  class OperatorRuntime(OperatorRuntimeABC):
46
64
  method_name: str
@@ -49,39 +49,3 @@ class PyQrackMethods(interp.MethodTable):
49
49
 
50
50
  res: bool = bool(qbit.sim_reg.m(qbit.addr))
51
51
  return (res,)
52
-
53
- @interp.impl(wire.MeasureAndReset)
54
- def measure_and_reset(
55
- self,
56
- interp: PyQrackInterpreter,
57
- frame: interp.Frame,
58
- stmt: wire.MeasureAndReset,
59
- ):
60
- w: PyQrackWire = frame.get(stmt.wire)
61
- qbit = w.qubit
62
-
63
- if not qbit.is_active():
64
- return (w, interp.loss_m_result)
65
-
66
- res: bool = bool(qbit.sim_reg.m(qbit.addr))
67
-
68
- if res:
69
- qbit.sim_reg.x(qbit.addr)
70
-
71
- # TODO: do we need to rewrap this here? The qbit changed in-place
72
- new_w = PyQrackWire(qbit)
73
- return (new_w, res)
74
-
75
- @interp.impl(wire.Reset)
76
- def reset(self, interp: PyQrackInterpreter, frame: interp.Frame, stmt: wire.Reset):
77
- w: PyQrackWire = frame.get(stmt.wire)
78
- qbit = w.qubit
79
-
80
- if not qbit.is_active():
81
- return (w,)
82
-
83
- if bool(qbit.sim_reg.m(qbit.addr)):
84
- qbit.sim_reg.x(qbit.addr)
85
-
86
- new_w = PyQrackWire(qbit)
87
- return (new_w,)
@@ -2,7 +2,6 @@
2
2
  moving towards a more general approach to noise modeling in the future."""
3
3
 
4
4
  from .model import (
5
- GateNoiseParams as GateNoiseParams,
6
5
  TwoRowZoneModel as TwoRowZoneModel,
7
6
  MoveNoiseModelABC as MoveNoiseModelABC,
8
7
  )
@@ -11,10 +10,5 @@ from .stmts import (
11
10
  CZPauliChannel as CZPauliChannel,
12
11
  AtomLossChannel as AtomLossChannel,
13
12
  )
14
- from .rewrite import RemoveNoisePass as RemoveNoisePass
15
13
  from ._dialect import dialect as dialect
16
- from ._wrappers import (
17
- pauli_channel as pauli_channel,
18
- cz_pauli_channel as cz_pauli_channel,
19
- atom_loss_channel as atom_loss_channel,
20
- )
14
+ from .fidelity import FidelityMethodTable as FidelityMethodTable
@@ -0,0 +1,3 @@
1
+ from kirin import ir
2
+
3
+ dialect = ir.Dialect("qasm2.noise")
@@ -4,8 +4,8 @@ from kirin.lattice import EmptyLattice
4
4
  from bloqade.analysis.address import AddressQubit, AddressTuple
5
5
  from bloqade.analysis.fidelity import FidelityAnalysis
6
6
 
7
- from .native import dialect
8
- from .native.stmts import PauliChannel, CZPauliChannel, AtomLossChannel
7
+ from .stmts import PauliChannel, CZPauliChannel, AtomLossChannel
8
+ from ._dialect import dialect
9
9
 
10
10
 
11
11
  @dialect.register(key="circuit.fidelity")
@@ -0,0 +1,278 @@
1
+ import abc
2
+ from dataclasses import field, dataclass
3
+
4
+
5
+ @dataclass(frozen=True)
6
+ class MoveNoiseModelABC(abc.ABC):
7
+ """Abstract base class for noise based on atom movement.
8
+
9
+ This class defines the interface for a noise model. The gate noise is calculated from the parameters
10
+ provided in this dataclass which can be updated when inheriting from this class. The move error is
11
+ calculated by implementing the parallel_cz_errors method which takes a set of ctrl and qarg qubits
12
+ and returns a noise model for all the qubits. The noise model is a dictionary with the keys being the
13
+ error rates for the qubits and the values being the list of qubits that the error rate applies to.
14
+
15
+ Once implemented the class can be used with the NoisePass to analyze a circuit and apply the noise
16
+ model to the circuit.
17
+
18
+ NOTE: This model is not guaranteed to be supported long-term in bloqade. We will be
19
+ moving towards a more general approach to noise modeling in the future.
20
+
21
+ """
22
+
23
+ # parameters for gate noise
24
+
25
+ local_px: float = field(default=4.102e-04, kw_only=True)
26
+ """The error probability for a Pauli-X error during a local single qubit gate operation."""
27
+ local_py: float = field(default=4.102e-04, kw_only=True)
28
+ """The error probability for a Pauli-Y error during a local single qubit gate operation."""
29
+ local_pz: float = field(default=4.112e-04, kw_only=True)
30
+ """The error probability for a Pauli-Z error during a local single qubit gate operation."""
31
+ local_loss_prob: float = field(default=0.0, kw_only=True)
32
+ """The error probability for a loss during a local single qubit gate operation."""
33
+
34
+ local_unaddressed_px: float = field(default=2.000e-07, kw_only=True)
35
+ """The error probability for a Pauli-X error during a local single qubit gate operation when the qubit is not addressed."""
36
+ local_unaddressed_py: float = field(default=2.000e-07, kw_only=True)
37
+ """The error probability for a Pauli-Y error during a local single qubit gate operation when the qubit is not addressed."""
38
+ local_unaddressed_pz: float = field(default=1.200e-06, kw_only=True)
39
+ """The error probability for a Pauli-Z error during a local single qubit gate operation when the qubit is not addressed."""
40
+ local_unaddressed_loss_prob: float = field(default=0.0, kw_only=True)
41
+ """The error probability for a loss during a local single qubit gate operation when the qubit is not addressed."""
42
+
43
+ global_px: float = field(default=6.500e-05, kw_only=True)
44
+ """The error probability for a Pauli-X error during a global single qubit gate operation."""
45
+ global_py: float = field(default=6.500e-05, kw_only=True)
46
+ """The error probability for a Pauli-Y error during a global single qubit gate operation."""
47
+ global_pz: float = field(default=6.500e-05, kw_only=True)
48
+ """The error probability for a Pauli-Z error during a global single qubit gate operation."""
49
+ global_loss_prob: float = field(default=0.0, kw_only=True)
50
+ """The error probability for a loss during a global single qubit gate operation."""
51
+
52
+ cz_paired_gate_px: float = field(default=6.549e-04, kw_only=True)
53
+ """The error probability for a Pauli-X error during CZ gate operation when two qubits are within blockade radius."""
54
+ cz_paired_gate_py: float = field(default=6.549e-04, kw_only=True)
55
+ """The error probability for a Pauli-Y error during CZ gate operation when two qubits are within blockade radius."""
56
+ cz_paired_gate_pz: float = field(default=3.184e-03, kw_only=True)
57
+ """The error probability for a Pauli-Z error during CZ gate operation when two qubits are within blockade radius."""
58
+ cz_gate_loss_prob: float = field(default=0.0, kw_only=True)
59
+ """The error probability for a loss during CZ gate operation when two qubits are within blockade radius."""
60
+
61
+ cz_unpaired_gate_px: float = field(default=5.149e-04, kw_only=True)
62
+ """The error probability for Pauli-X error during CZ gate operation when another qubit is not within blockade radius."""
63
+ cz_unpaired_gate_py: float = field(default=5.149e-04, kw_only=True)
64
+ """The error probability for Pauli-Y error during CZ gate operation when another qubit is not within blockade radius."""
65
+ cz_unpaired_gate_pz: float = field(default=2.185e-03, kw_only=True)
66
+ """The error probability for Pauli-Z error during CZ gate operation when another qubit is not within blockade radius."""
67
+ cz_unpaired_loss_prob: float = field(default=0.0, kw_only=True)
68
+ """The error probability for a loss during CZ gate operation when another qubit is not within blockade radius."""
69
+
70
+ # parameters for move noise
71
+
72
+ mover_px: float = field(default=8.060e-04, kw_only=True)
73
+ """Probability of X error occurring on a moving qubit during a move operation"""
74
+ mover_py: float = field(default=8.060e-04, kw_only=True)
75
+ """Probability of Y error occurring on a moving qubit during a move operation"""
76
+ mover_pz: float = field(default=2.458e-03, kw_only=True)
77
+ """Probability of Z error occurring on a moving qubit during a move operation"""
78
+ move_loss_prob: float = field(default=0.0, kw_only=True)
79
+ """Probability of loss occurring on a moving qubit during a move operation"""
80
+
81
+ sitter_px: float = field(default=3.066e-04, kw_only=True)
82
+ """Probability of X error occurring on a stationary qubit during a move operation"""
83
+ sitter_py: float = field(default=3.066e-04, kw_only=True)
84
+ """Probability of Y error occurring on a stationary qubit during a move operation"""
85
+ sitter_pz: float = field(default=4.639e-04, kw_only=True)
86
+ """Probability of Z error occurring on a stationary qubit during a move operation"""
87
+ sit_loss_prob: float = field(default=0.0, kw_only=True)
88
+ """Probability of loss occurring on a stationary qubit during a move operation"""
89
+
90
+ @property
91
+ def cz_paired_errors(
92
+ self,
93
+ ) -> tuple[float, float, float, float]:
94
+ """Returns the error rates for a CZ gate."""
95
+ return (
96
+ self.cz_paired_gate_px,
97
+ self.cz_paired_gate_py,
98
+ self.cz_paired_gate_pz,
99
+ self.cz_gate_loss_prob,
100
+ )
101
+
102
+ @property
103
+ def cz_unpaired_errors(
104
+ self,
105
+ ) -> tuple[float, float, float, float]:
106
+ """Returns the error rates for a CZ gate."""
107
+ return (
108
+ self.cz_unpaired_gate_px,
109
+ self.cz_unpaired_gate_py,
110
+ self.cz_unpaired_gate_pz,
111
+ self.cz_unpaired_loss_prob,
112
+ )
113
+
114
+ @property
115
+ def local_errors(
116
+ self,
117
+ ) -> tuple[float, float, float, float]:
118
+ """Returns the error rates for a local single qubit gate."""
119
+ return (
120
+ self.local_px,
121
+ self.local_py,
122
+ self.local_pz,
123
+ self.local_loss_prob,
124
+ )
125
+
126
+ @property
127
+ def local_unaddressed_errors(
128
+ self,
129
+ ) -> tuple[float, float, float, float]:
130
+ """Returns the error rates for a local single qubit gate."""
131
+ return (
132
+ self.local_unaddressed_px,
133
+ self.local_unaddressed_py,
134
+ self.local_unaddressed_pz,
135
+ self.local_unaddressed_loss_prob,
136
+ )
137
+
138
+ @property
139
+ def global_errors(
140
+ self,
141
+ ) -> tuple[float, float, float, float]:
142
+ """Returns the error rates for a global single qubit gate."""
143
+ return (
144
+ self.global_px,
145
+ self.global_py,
146
+ self.global_pz,
147
+ self.global_loss_prob,
148
+ )
149
+
150
+ @property
151
+ def sitter_errors(
152
+ self,
153
+ ) -> tuple[float, float, float, float]:
154
+ """Returns the error rates for a move operation."""
155
+ return (
156
+ self.sitter_px,
157
+ self.sitter_py,
158
+ self.sitter_pz,
159
+ self.sit_loss_prob,
160
+ )
161
+
162
+ @abc.abstractmethod
163
+ def parallel_cz_errors(
164
+ self, ctrls: list[int], qargs: list[int], rest: list[int]
165
+ ) -> dict[tuple[float, float, float, float], list[int]]:
166
+ """Takes a set of ctrls and qargs and returns a noise model for all qubits."""
167
+ pass
168
+
169
+ @classmethod
170
+ def join_binary_probs(cls, p1: float, *args: float) -> float:
171
+ """Merge the probabilities of an event happening if the event can only happen once.
172
+
173
+ For example, finding the effective probability of losing an atom from multiple sources, since
174
+ a qubit can only be lost once. This is done by using the formula:
175
+
176
+ p = p1 * (1 - p2) + p2 * (1 - p1)
177
+
178
+ applied recursively to all the probabilities in the list.
179
+
180
+ Args:
181
+ p1 (float): The probability of the event happening.
182
+ arg (float): The probabilities of the event happening from other sources.
183
+
184
+ Returns:
185
+ float: The effective probability of the event happening.
186
+
187
+ """
188
+ if len(args) == 0:
189
+ return p1
190
+ else:
191
+ p2 = cls.join_binary_probs(*args)
192
+ return p1 * (1 - p2) + p2 * (1 - p1)
193
+
194
+
195
+ @dataclass(frozen=True)
196
+ class TwoRowZoneModel(MoveNoiseModelABC):
197
+ """This model assumes that the qubits are arranged in a single storage row with a row corresponding to a gate zone below it.
198
+
199
+ The CZ gate noise is calculated using the following heuristic: The idle error is calculated by the total duration required
200
+ to do the move and entangle the qubits. Not every pair can be entangled at the same time, so we first deconflict the qargs
201
+ by finding subsets in which both the ctrl and the qarg qubits are in ascending order. This breaks the pairs into
202
+ groups that can be moved and entangled separately. We then take each group and assign each pair to a gate zone slot. The
203
+ slots are allocated by starting from the middle of the atoms and moving outwards making sure to keep the ctrl qubits in
204
+ ascending order. The time to move a group is calculated by finding the maximum travel distance of the qarg and ctrl qubits
205
+ and dviding by the move speed. The total move time is the sum of all the group move times. The error rate for all the qubits
206
+ is then calculated by using the poisson_pauli_prob function. An additional error for the pick operation is calculated by
207
+ joining the binary probabilities of the pick operation and the move operation.
208
+
209
+ """
210
+
211
+ @property
212
+ def move_errors(
213
+ self,
214
+ ) -> tuple[float, float, float, float]:
215
+ """Returns the error rates for a move operation."""
216
+ return (
217
+ self.mover_px / 2,
218
+ self.mover_py / 2,
219
+ self.mover_pz / 2,
220
+ self.move_loss_prob / 2,
221
+ )
222
+
223
+ def deconflict(
224
+ self, ctrls: list[int], qargs: list[int]
225
+ ) -> list[tuple[tuple[int, ...], tuple[int, ...]]]:
226
+ """Return a list of groups of ctrl and qarg qubits that can be moved and entangled separately."""
227
+ # sort by ctrl qubit first to guarantee that they will be in ascending order
228
+ sorted_pairs = sorted(zip(ctrls, qargs))
229
+
230
+ groups: list[list[tuple[int, int]]] = []
231
+ # group by qarg only putting it in a group if the qarg is greater than the last qarg in the group
232
+ # thus ensuring that the qargs are in ascending order
233
+ while len(sorted_pairs) > 0:
234
+ ctrl, qarg = sorted_pairs.pop(0)
235
+
236
+ found = False
237
+ for group in groups:
238
+ if group[-1][1] < qarg:
239
+ group.append((ctrl, qarg))
240
+ found = True
241
+ break
242
+ if not found:
243
+ groups.append([(ctrl, qarg)])
244
+
245
+ new_groups: list[tuple[tuple[int, ...], tuple[int, ...]]] = []
246
+
247
+ for group in groups:
248
+ ctrl, qarg = zip(*group)
249
+ ctrl = tuple(ctrl)
250
+ qarg = tuple(qarg)
251
+ new_groups.append((ctrl, qarg))
252
+
253
+ return new_groups
254
+
255
+ def parallel_cz_errors(
256
+ self, ctrls: list[int], qargs: list[int], rest: list[int]
257
+ ) -> dict[tuple[float, float, float, float], list[int]]:
258
+ """Apply parallel gates by moving ctrl qubits to qarg qubits."""
259
+ groups = self.deconflict(ctrls, qargs)
260
+ movers = ctrls + qargs
261
+ num_moves = len(groups)
262
+ # ignore order O(p^2) errors since they are small
263
+ effective_move_errors = (
264
+ self.move_errors[0] + self.sitter_errors[0] * (num_moves - 1),
265
+ self.move_errors[1] + self.sitter_errors[1] * (num_moves - 1),
266
+ self.move_errors[2] + self.sitter_errors[2] * (num_moves - 1),
267
+ self.move_errors[3] + self.sitter_errors[3] * (num_moves - 1),
268
+ )
269
+ effective_sitter_errors = (
270
+ self.sitter_errors[0] * num_moves,
271
+ self.sitter_errors[1] * num_moves,
272
+ self.sitter_errors[2] * num_moves,
273
+ self.sitter_errors[3] * num_moves,
274
+ )
275
+ result = {effective_move_errors: list(movers)}
276
+ result.setdefault(effective_sitter_errors, []).extend(rest)
277
+
278
+ return result
@@ -0,0 +1 @@
1
+ from .noise import NativeNoise as NativeNoise
@@ -3,12 +3,12 @@ from typing import Any
3
3
  from kirin import interp
4
4
  from kirin.dialects import ilist
5
5
 
6
- from bloqade.noise import native
7
6
  from bloqade.qasm2.parse import ast
7
+ from bloqade.qasm2.dialects import noise
8
8
  from bloqade.qasm2.emit.gate import EmitQASM2Gate, EmitQASM2Frame
9
9
 
10
10
 
11
- @native.dialect.register(key="emit.qasm2.gate")
11
+ @noise.dialect.register(key="emit.qasm2.gate")
12
12
  class NativeNoise(interp.MethodTable):
13
13
 
14
14
  def _convert(self, node: ast.Bit | ast.Name) -> str:
@@ -17,12 +17,12 @@ class NativeNoise(interp.MethodTable):
17
17
  else:
18
18
  return f"{node.id}"
19
19
 
20
- @interp.impl(native.CZPauliChannel)
20
+ @interp.impl(noise.CZPauliChannel)
21
21
  def emit_czp(
22
22
  self,
23
23
  emit: EmitQASM2Gate,
24
24
  frame: EmitQASM2Frame,
25
- stmt: native.CZPauliChannel,
25
+ stmt: noise.CZPauliChannel,
26
26
  ):
27
27
  paired: bool = stmt.paired
28
28
  px_ctrl: float = stmt.px_ctrl
@@ -35,7 +35,7 @@ class NativeNoise(interp.MethodTable):
35
35
  qargs: ilist.IList[ast.Bit, Any] = frame.get(stmt.qargs)
36
36
  frame.body.append(
37
37
  ast.Comment(
38
- text=f"native.CZPauliChannel(paired={paired}, p_ctrl=[x:{px_ctrl}, y:{py_ctrl}, z:{pz_ctrl}], p_qarg[x:{px_qarg}, y:{py_qarg}, z:{pz_qarg}])"
38
+ text=f"noise.CZPauliChannel(paired={paired}, p_ctrl=[x:{px_ctrl}, y:{py_ctrl}, z:{pz_ctrl}], p_qarg[x:{px_qarg}, y:{py_qarg}, z:{pz_qarg}])"
39
39
  )
40
40
  )
41
41
  frame.body.append(
@@ -50,16 +50,16 @@ class NativeNoise(interp.MethodTable):
50
50
  )
51
51
  return ()
52
52
 
53
- @interp.impl(native.AtomLossChannel)
53
+ @interp.impl(noise.AtomLossChannel)
54
54
  def emit_loss(
55
55
  self,
56
56
  emit: EmitQASM2Gate,
57
57
  frame: EmitQASM2Frame,
58
- stmt: native.AtomLossChannel,
58
+ stmt: noise.AtomLossChannel,
59
59
  ):
60
60
  prob: float = stmt.prob
61
61
  qargs: ilist.IList[ast.Bit, Any] = frame.get(stmt.qargs)
62
- frame.body.append(ast.Comment(text=f"native.Atomloss(p={prob})"))
62
+ frame.body.append(ast.Comment(text=f"noise.Atomloss(p={prob})"))
63
63
  frame.body.append(
64
64
  ast.Comment(
65
65
  text=f" -: qargs: {', '.join([self._convert(q) for q in qargs])}"
@@ -67,19 +67,19 @@ class NativeNoise(interp.MethodTable):
67
67
  )
68
68
  return ()
69
69
 
70
- @interp.impl(native.PauliChannel)
70
+ @interp.impl(noise.PauliChannel)
71
71
  def emit_pauli(
72
72
  self,
73
73
  emit: EmitQASM2Gate,
74
74
  frame: EmitQASM2Frame,
75
- stmt: native.PauliChannel,
75
+ stmt: noise.PauliChannel,
76
76
  ):
77
77
  px: float = stmt.px
78
78
  py: float = stmt.py
79
79
  pz: float = stmt.pz
80
80
  qargs: ilist.IList[ast.Bit, Any] = frame.get(stmt.qargs)
81
81
  frame.body.append(
82
- ast.Comment(text=f"native.PauliChannel(px={px}, py={py}, pz={pz})")
82
+ ast.Comment(text=f"noise.PauliChannel(px={px}, py={py}, pz={pz})")
83
83
  )
84
84
  frame.body.append(
85
85
  ast.Comment(