pyqpp 8.0.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.
Files changed (319) hide show
  1. pyqpp-8.0.0/.clang-format +20 -0
  2. pyqpp-8.0.0/.clang-tidy +208 -0
  3. pyqpp-8.0.0/.gitattributes +1 -0
  4. pyqpp-8.0.0/.github/workflows/ci.yml +96 -0
  5. pyqpp-8.0.0/.github/workflows/codeberg.yml +40 -0
  6. pyqpp-8.0.0/.github/workflows/coverage.yml +72 -0
  7. pyqpp-8.0.0/.github/workflows/pypi.yml +155 -0
  8. pyqpp-8.0.0/.gitignore +103 -0
  9. pyqpp-8.0.0/CHANGES.md +1200 -0
  10. pyqpp-8.0.0/CMakeLists.txt +242 -0
  11. pyqpp-8.0.0/CODE_OF_CONDUCT.md +131 -0
  12. pyqpp-8.0.0/CONTRIBUTING.md +9 -0
  13. pyqpp-8.0.0/DISCREPANCIES.md +19 -0
  14. pyqpp-8.0.0/Doxyfile +3000 -0
  15. pyqpp-8.0.0/INSTALL.md +376 -0
  16. pyqpp-8.0.0/LICENSE.txt +21 -0
  17. pyqpp-8.0.0/PKG-INFO +141 -0
  18. pyqpp-8.0.0/README.md +109 -0
  19. pyqpp-8.0.0/VERSION.txt +1 -0
  20. pyqpp-8.0.0/benchmarks/CMakeLists.txt +53 -0
  21. pyqpp-8.0.0/benchmarks/README.md +49 -0
  22. pyqpp-8.0.0/benchmarks/include/openmp_utils.hpp +50 -0
  23. pyqpp-8.0.0/benchmarks/src/apply_ctrl_fan_psi_bench.cpp +77 -0
  24. pyqpp-8.0.0/benchmarks/src/apply_ctrl_fan_rho_bench.cpp +77 -0
  25. pyqpp-8.0.0/benchmarks/src/apply_ctrl_psi_bench.cpp +134 -0
  26. pyqpp-8.0.0/benchmarks/src/apply_ctrl_rho_bench.cpp +134 -0
  27. pyqpp-8.0.0/benchmarks/src/apply_psi_bench.cpp +104 -0
  28. pyqpp-8.0.0/benchmarks/src/apply_rho_bench.cpp +104 -0
  29. pyqpp-8.0.0/benchmarks/src/bricks_bench.cpp +69 -0
  30. pyqpp-8.0.0/benchmarks/src/measure_seq_psi_bench.cpp +59 -0
  31. pyqpp-8.0.0/benchmarks/src/measure_seq_rho_bench.cpp +59 -0
  32. pyqpp-8.0.0/benchmarks/src/ptrace_psi_bench.cpp +70 -0
  33. pyqpp-8.0.0/benchmarks/src/ptrace_rho_bench.cpp +70 -0
  34. pyqpp-8.0.0/benchmarks/src/ptranspose_psi_bench.cpp +72 -0
  35. pyqpp-8.0.0/benchmarks/src/ptranspose_rho_bench.cpp +72 -0
  36. pyqpp-8.0.0/benchmarks/src/qft_bench.cpp +57 -0
  37. pyqpp-8.0.0/benchmarks/src/syspermute_psi_bench.cpp +70 -0
  38. pyqpp-8.0.0/benchmarks/src/syspermute_rho_bench.cpp +70 -0
  39. pyqpp-8.0.0/benchmarks/src/tfq_bench.cpp +57 -0
  40. pyqpp-8.0.0/cmake/pybind11.cmake +19 -0
  41. pyqpp-8.0.0/cmake/qppConfig.cmake.in +17 -0
  42. pyqpp-8.0.0/cmake/qpp_MATLAB.cmake +16 -0
  43. pyqpp-8.0.0/cmake/qpp_compiler_flags.cmake +96 -0
  44. pyqpp-8.0.0/cmake/qpp_coverage.cmake +80 -0
  45. pyqpp-8.0.0/cmake/qpp_eigen.cmake +43 -0
  46. pyqpp-8.0.0/cmake/qpp_openmp.cmake +32 -0
  47. pyqpp-8.0.0/cmake/qpp_openqasm.cmake +13 -0
  48. pyqpp-8.0.0/cmake/qpp_sanitize.cmake +26 -0
  49. pyqpp-8.0.0/cmake/qpp_select_target.cmake +51 -0
  50. pyqpp-8.0.0/cmake/qpp_types.cmake +129 -0
  51. pyqpp-8.0.0/cmake/qpp_uninstall.cmake.in +35 -0
  52. pyqpp-8.0.0/docker/Dockerfile +52 -0
  53. pyqpp-8.0.0/docker/README.md +24 -0
  54. pyqpp-8.0.0/docker/notebooks/qpp_demo.ipynb +119 -0
  55. pyqpp-8.0.0/docker/requirements.txt +3 -0
  56. pyqpp-8.0.0/examples/CMakeLists.txt +29 -0
  57. pyqpp-8.0.0/examples/README.md +3 -0
  58. pyqpp-8.0.0/examples/bb84.cpp +311 -0
  59. pyqpp-8.0.0/examples/bell_inequalities.cpp +105 -0
  60. pyqpp-8.0.0/examples/channels.cpp +59 -0
  61. pyqpp-8.0.0/examples/circuits/conditional_if.cpp +61 -0
  62. pyqpp-8.0.0/examples/circuits/conditional_while.cpp +54 -0
  63. pyqpp-8.0.0/examples/circuits/hhl_circuit.cpp +184 -0
  64. pyqpp-8.0.0/examples/circuits/noisy_teleport_qubit_circuit.cpp +55 -0
  65. pyqpp-8.0.0/examples/circuits/post_selection.cpp +39 -0
  66. pyqpp-8.0.0/examples/circuits/qpe_circuit.cpp +61 -0
  67. pyqpp-8.0.0/examples/circuits/runtime_set_dits.cpp +50 -0
  68. pyqpp-8.0.0/examples/circuits/state_prep.cpp +46 -0
  69. pyqpp-8.0.0/examples/circuits/teleport_qubit_circuit.cpp +52 -0
  70. pyqpp-8.0.0/examples/circuits/teleport_qudit_circuit.cpp +55 -0
  71. pyqpp-8.0.0/examples/circuits/vqe.cpp +64 -0
  72. pyqpp-8.0.0/examples/dense_coding.cpp +51 -0
  73. pyqpp-8.0.0/examples/entanglement.cpp +63 -0
  74. pyqpp-8.0.0/examples/entropies.cpp +29 -0
  75. pyqpp-8.0.0/examples/exceptions.cpp +22 -0
  76. pyqpp-8.0.0/examples/experimental_average.cpp +38 -0
  77. pyqpp-8.0.0/examples/functor.cpp +32 -0
  78. pyqpp-8.0.0/examples/gates_states.cpp +33 -0
  79. pyqpp-8.0.0/examples/gram_schmidt.cpp +21 -0
  80. pyqpp-8.0.0/examples/graph_states.cpp +70 -0
  81. pyqpp-8.0.0/examples/grover.cpp +66 -0
  82. pyqpp-8.0.0/examples/hhl.cpp +186 -0
  83. pyqpp-8.0.0/examples/input_output.cpp +24 -0
  84. pyqpp-8.0.0/examples/layouts.cpp +41 -0
  85. pyqpp-8.0.0/examples/matlab_io.cpp +26 -0
  86. pyqpp-8.0.0/examples/measurements1.cpp +34 -0
  87. pyqpp-8.0.0/examples/measurements2.cpp +114 -0
  88. pyqpp-8.0.0/examples/minimal.cpp +21 -0
  89. pyqpp-8.0.0/examples/noise.cpp +28 -0
  90. pyqpp-8.0.0/examples/qasm/bell.qasm +13 -0
  91. pyqpp-8.0.0/examples/qasm/coin_flip.qasm +9 -0
  92. pyqpp-8.0.0/examples/qasm/qpp_qasm.cpp +47 -0
  93. pyqpp-8.0.0/examples/qasm/teleport_minimal.qasm +30 -0
  94. pyqpp-8.0.0/examples/qasm/teleport_minimal_qasm.cpp +42 -0
  95. pyqpp-8.0.0/examples/qecc.cpp +35 -0
  96. pyqpp-8.0.0/examples/qft.cpp +49 -0
  97. pyqpp-8.0.0/examples/qft_inplace.cpp +50 -0
  98. pyqpp-8.0.0/examples/qpe.cpp +101 -0
  99. pyqpp-8.0.0/examples/qram.cpp +22 -0
  100. pyqpp-8.0.0/examples/quantum_operations.cpp +47 -0
  101. pyqpp-8.0.0/examples/randomness.cpp +23 -0
  102. pyqpp-8.0.0/examples/reversible1.cpp +32 -0
  103. pyqpp-8.0.0/examples/reversible2.cpp +77 -0
  104. pyqpp-8.0.0/examples/shor.cpp +233 -0
  105. pyqpp-8.0.0/examples/spectral.cpp +30 -0
  106. pyqpp-8.0.0/examples/standalone/CMakeLists.txt +19 -0
  107. pyqpp-8.0.0/examples/standalone/src/main.cpp +20 -0
  108. pyqpp-8.0.0/examples/statistics.cpp +41 -0
  109. pyqpp-8.0.0/examples/teleport_qubit.cpp +58 -0
  110. pyqpp-8.0.0/examples/teleport_qudit.cpp +59 -0
  111. pyqpp-8.0.0/examples/test_numeric_types.sh +163 -0
  112. pyqpp-8.0.0/examples/timing1.cpp +36 -0
  113. pyqpp-8.0.0/examples/timing2.cpp +54 -0
  114. pyqpp-8.0.0/examples/toffoli.cpp +83 -0
  115. pyqpp-8.0.0/include/qpp/MATLAB/matlab.hpp +361 -0
  116. pyqpp-8.0.0/include/qpp/classes/codes.hpp +175 -0
  117. pyqpp-8.0.0/include/qpp/classes/exception.hpp +667 -0
  118. pyqpp-8.0.0/include/qpp/classes/gates.hpp +917 -0
  119. pyqpp-8.0.0/include/qpp/classes/idisplay.hpp +178 -0
  120. pyqpp-8.0.0/include/qpp/classes/ijson.hpp +63 -0
  121. pyqpp-8.0.0/include/qpp/classes/init.hpp +62 -0
  122. pyqpp-8.0.0/include/qpp/classes/layouts.hpp +219 -0
  123. pyqpp-8.0.0/include/qpp/classes/noise.hpp +602 -0
  124. pyqpp-8.0.0/include/qpp/classes/qbase_engine.hpp +260 -0
  125. pyqpp-8.0.0/include/qpp/classes/qcircuit.hpp +8091 -0
  126. pyqpp-8.0.0/include/qpp/classes/qcircuit_traits.hpp +45 -0
  127. pyqpp-8.0.0/include/qpp/classes/qdummy_engine.hpp +109 -0
  128. pyqpp-8.0.0/include/qpp/classes/qengine.hpp +1566 -0
  129. pyqpp-8.0.0/include/qpp/classes/qengine_traits.hpp +72 -0
  130. pyqpp-8.0.0/include/qpp/classes/qnoisy_engine.hpp +253 -0
  131. pyqpp-8.0.0/include/qpp/classes/random_devices.hpp +95 -0
  132. pyqpp-8.0.0/include/qpp/classes/reversible.hpp +919 -0
  133. pyqpp-8.0.0/include/qpp/classes/states.hpp +329 -0
  134. pyqpp-8.0.0/include/qpp/classes/timer.hpp +136 -0
  135. pyqpp-8.0.0/include/qpp/constants.hpp +124 -0
  136. pyqpp-8.0.0/include/qpp/entanglement.hpp +722 -0
  137. pyqpp-8.0.0/include/qpp/entropies.hpp +412 -0
  138. pyqpp-8.0.0/include/qpp/experimental/experimental.hpp +41 -0
  139. pyqpp-8.0.0/include/qpp/functions.hpp +2723 -0
  140. pyqpp-8.0.0/include/qpp/input_output.hpp +398 -0
  141. pyqpp-8.0.0/include/qpp/instruments.hpp +1320 -0
  142. pyqpp-8.0.0/include/qpp/internal/classes/iomanip.hpp +343 -0
  143. pyqpp-8.0.0/include/qpp/internal/classes/labelled_vector_proxy.hpp +107 -0
  144. pyqpp-8.0.0/include/qpp/internal/classes/qcircuit_gate_step.hpp +346 -0
  145. pyqpp-8.0.0/include/qpp/internal/classes/qcircuit_measurement_step.hpp +294 -0
  146. pyqpp-8.0.0/include/qpp/internal/classes/qcircuit_nop_step.hpp +79 -0
  147. pyqpp-8.0.0/include/qpp/internal/classes/qcircuit_resources.hpp +124 -0
  148. pyqpp-8.0.0/include/qpp/internal/classes/qcircuit_runtime_step.hpp +336 -0
  149. pyqpp-8.0.0/include/qpp/internal/classes/qengine_state.hpp +162 -0
  150. pyqpp-8.0.0/include/qpp/internal/classes/qengine_statistics.hpp +173 -0
  151. pyqpp-8.0.0/include/qpp/internal/classes/singleton.hpp +122 -0
  152. pyqpp-8.0.0/include/qpp/internal/kernels/qubit/apply.hpp +1047 -0
  153. pyqpp-8.0.0/include/qpp/internal/kernels/qubit/apply_ctrl.hpp +797 -0
  154. pyqpp-8.0.0/include/qpp/internal/kernels/qubit/apply_ctrl_diag.hpp +796 -0
  155. pyqpp-8.0.0/include/qpp/internal/kernels/qubit/apply_ctrl_fan.hpp +238 -0
  156. pyqpp-8.0.0/include/qpp/internal/kernels/qubit/apply_diag.hpp +741 -0
  157. pyqpp-8.0.0/include/qpp/internal/kernels/qubit/ptrace.hpp +256 -0
  158. pyqpp-8.0.0/include/qpp/internal/kernels/qubit/ptranspose.hpp +219 -0
  159. pyqpp-8.0.0/include/qpp/internal/kernels/qubit/syspermute.hpp +156 -0
  160. pyqpp-8.0.0/include/qpp/internal/kernels/qudit/apply.hpp +292 -0
  161. pyqpp-8.0.0/include/qpp/internal/kernels/qudit/apply_ctrl.hpp +194 -0
  162. pyqpp-8.0.0/include/qpp/internal/kernels/qudit/apply_ctrl_diag.hpp +1020 -0
  163. pyqpp-8.0.0/include/qpp/internal/kernels/qudit/apply_ctrl_fan.hpp +208 -0
  164. pyqpp-8.0.0/include/qpp/internal/kernels/qudit/apply_diag.hpp +204 -0
  165. pyqpp-8.0.0/include/qpp/internal/kernels/qudit/ptrace.hpp +261 -0
  166. pyqpp-8.0.0/include/qpp/internal/kernels/qudit/ptranspose.hpp +189 -0
  167. pyqpp-8.0.0/include/qpp/internal/kernels/qudit/syspermute.hpp +162 -0
  168. pyqpp-8.0.0/include/qpp/internal/util.hpp +817 -0
  169. pyqpp-8.0.0/include/qpp/number_theory.hpp +706 -0
  170. pyqpp-8.0.0/include/qpp/operations.hpp +3495 -0
  171. pyqpp-8.0.0/include/qpp/options.hpp +444 -0
  172. pyqpp-8.0.0/include/qpp/qasm/qasm.hpp +823 -0
  173. pyqpp-8.0.0/include/qpp/qpp.hpp +171 -0
  174. pyqpp-8.0.0/include/qpp/random.hpp +507 -0
  175. pyqpp-8.0.0/include/qpp/statistics.hpp +260 -0
  176. pyqpp-8.0.0/include/qpp/traits.hpp +197 -0
  177. pyqpp-8.0.0/include/qpp/types.hpp +258 -0
  178. pyqpp-8.0.0/prettyprint.sh +62 -0
  179. pyqpp-8.0.0/pyproject.toml +47 -0
  180. pyqpp-8.0.0/pyqpp/CMakeLists.txt +163 -0
  181. pyqpp-8.0.0/pyqpp/README.md +129 -0
  182. pyqpp-8.0.0/pyqpp/examples/README.md +3 -0
  183. pyqpp-8.0.0/pyqpp/examples/minimal.py +12 -0
  184. pyqpp-8.0.0/pyqpp/examples/teleport.py +56 -0
  185. pyqpp-8.0.0/pyqpp/include/pyqpp/classes/codes_bind.hpp +60 -0
  186. pyqpp-8.0.0/pyqpp/include/pyqpp/classes/gates_bind.hpp +101 -0
  187. pyqpp-8.0.0/pyqpp/include/pyqpp/classes/qcircuit_bind.hpp +636 -0
  188. pyqpp-8.0.0/pyqpp/include/pyqpp/classes/qdummy_engine_bind.hpp +123 -0
  189. pyqpp-8.0.0/pyqpp/include/pyqpp/classes/qengine_bind.hpp +177 -0
  190. pyqpp-8.0.0/pyqpp/include/pyqpp/classes/qnoisy_engine_bind.hpp +187 -0
  191. pyqpp-8.0.0/pyqpp/include/pyqpp/classes/random_devices_bind.hpp +90 -0
  192. pyqpp-8.0.0/pyqpp/include/pyqpp/classes/reversible_bind.hpp +168 -0
  193. pyqpp-8.0.0/pyqpp/include/pyqpp/classes/states_bind.hpp +96 -0
  194. pyqpp-8.0.0/pyqpp/include/pyqpp/constants_bind.hpp +47 -0
  195. pyqpp-8.0.0/pyqpp/include/pyqpp/entanglement_bind.hpp +123 -0
  196. pyqpp-8.0.0/pyqpp/include/pyqpp/entropies_bind.hpp +110 -0
  197. pyqpp-8.0.0/pyqpp/include/pyqpp/functions_bind.hpp +282 -0
  198. pyqpp-8.0.0/pyqpp/include/pyqpp/input_output_bind.hpp +93 -0
  199. pyqpp-8.0.0/pyqpp/include/pyqpp/instruments_bind.hpp +259 -0
  200. pyqpp-8.0.0/pyqpp/include/pyqpp/number_theory_bind.hpp +97 -0
  201. pyqpp-8.0.0/pyqpp/include/pyqpp/operations_bind.hpp +577 -0
  202. pyqpp-8.0.0/pyqpp/include/pyqpp/pyqpp_common.hpp +41 -0
  203. pyqpp-8.0.0/pyqpp/include/pyqpp/pyqpp_specific_bind.hpp +64 -0
  204. pyqpp-8.0.0/pyqpp/include/pyqpp/qasm/qasm_bind.hpp +50 -0
  205. pyqpp-8.0.0/pyqpp/include/pyqpp/random_bind.hpp +120 -0
  206. pyqpp-8.0.0/pyqpp/include/pyqpp/statistics_bind.hpp +99 -0
  207. pyqpp-8.0.0/pyqpp/include/pyqpp/types_bind.hpp +79 -0
  208. pyqpp-8.0.0/pyqpp/python/pyqpp/__init__.py +40 -0
  209. pyqpp-8.0.0/pyqpp/python/pyqpp/__init__.pyi +200 -0
  210. pyqpp-8.0.0/pyqpp/python/pyqpp/_pyqpp.pyi +2269 -0
  211. pyqpp-8.0.0/pyqpp/python/pyqpp/codes.py +12 -0
  212. pyqpp-8.0.0/pyqpp/python/pyqpp/codes.pyi +60 -0
  213. pyqpp-8.0.0/pyqpp/python/pyqpp/gates.py +12 -0
  214. pyqpp-8.0.0/pyqpp/python/pyqpp/gates.pyi +65 -0
  215. pyqpp-8.0.0/pyqpp/python/pyqpp/py.typed +0 -0
  216. pyqpp-8.0.0/pyqpp/python/pyqpp/qasm.py +12 -0
  217. pyqpp-8.0.0/pyqpp/python/pyqpp/qasm.pyi +11 -0
  218. pyqpp-8.0.0/pyqpp/python/pyqpp/random_devices.py +12 -0
  219. pyqpp-8.0.0/pyqpp/python/pyqpp/random_devices.pyi +26 -0
  220. pyqpp-8.0.0/pyqpp/python/pyqpp/states.py +12 -0
  221. pyqpp-8.0.0/pyqpp/python/pyqpp/states.pyi +57 -0
  222. pyqpp-8.0.0/pyqpp/src/pyqpp.cpp +96 -0
  223. pyqpp-8.0.0/pyqpp/tests/README.md +20 -0
  224. pyqpp-8.0.0/pyqpp/tests/test_engine_regressions.py +198 -0
  225. pyqpp-8.0.0/pyrightconfig.json +4 -0
  226. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/ast.hpp +42 -0
  227. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/base.hpp +111 -0
  228. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/cloneable.hpp +71 -0
  229. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/decl.hpp +402 -0
  230. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/expr.hpp +550 -0
  231. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/program.hpp +148 -0
  232. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/replacer.hpp +402 -0
  233. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/semantic.hpp +479 -0
  234. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/stmt.hpp +681 -0
  235. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/traversal.hpp +118 -0
  236. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/var.hpp +195 -0
  237. pyqpp-8.0.0/qasmtools/include/qasmtools/ast/visitor.hpp +106 -0
  238. pyqpp-8.0.0/qasmtools/include/qasmtools/parser/lexer.hpp +383 -0
  239. pyqpp-8.0.0/qasmtools/include/qasmtools/parser/parser.hpp +1062 -0
  240. pyqpp-8.0.0/qasmtools/include/qasmtools/parser/position.hpp +121 -0
  241. pyqpp-8.0.0/qasmtools/include/qasmtools/parser/preprocessor.hpp +275 -0
  242. pyqpp-8.0.0/qasmtools/include/qasmtools/parser/token.hpp +392 -0
  243. pyqpp-8.0.0/qasmtools/include/qasmtools/tools/ast_printer.hpp +219 -0
  244. pyqpp-8.0.0/qasmtools/include/qasmtools/utils/angle.hpp +271 -0
  245. pyqpp-8.0.0/qasmtools/include/qasmtools/utils/templates.hpp +50 -0
  246. pyqpp-8.0.0/qasmtools/qasm/generic/W-state.qasm +31 -0
  247. pyqpp-8.0.0/qasmtools/qasm/generic/adder.qasm +38 -0
  248. pyqpp-8.0.0/qasmtools/qasm/generic/bigadder.qasm +57 -0
  249. pyqpp-8.0.0/qasmtools/qasm/generic/inverseqft1.qasm +26 -0
  250. pyqpp-8.0.0/qasmtools/qasm/generic/inverseqft2.qasm +24 -0
  251. pyqpp-8.0.0/qasmtools/qasm/generic/ipea_3_pi_8.qasm +58 -0
  252. pyqpp-8.0.0/qasmtools/qasm/generic/pea_3_pi_8.qasm +51 -0
  253. pyqpp-8.0.0/qasmtools/qasm/generic/qec.qasm +20 -0
  254. pyqpp-8.0.0/qasmtools/qasm/generic/qelib1.inc +95 -0
  255. pyqpp-8.0.0/qasmtools/qasm/generic/qft.qasm +19 -0
  256. pyqpp-8.0.0/qasmtools/qasm/generic/qpt.qasm +12 -0
  257. pyqpp-8.0.0/qasmtools/qasm/generic/rb.qasm +17 -0
  258. pyqpp-8.0.0/qasmtools/qasm/generic/teleport.qasm +21 -0
  259. pyqpp-8.0.0/qasmtools/qasm/generic/teleportv2.qasm +20 -0
  260. pyqpp-8.0.0/qasmtools/qasm/ibmqx2/011_3_qubit_grover_50_.qasm +135 -0
  261. pyqpp-8.0.0/qasmtools/qasm/ibmqx2/Deutsch_Algorithm.qasm +13 -0
  262. pyqpp-8.0.0/qasmtools/qasm/ibmqx2/W3test.qasm +24 -0
  263. pyqpp-8.0.0/qasmtools/qasm/ibmqx2/images/5qubitQXlabeled.png +0 -0
  264. pyqpp-8.0.0/qasmtools/qasm/ibmqx2/iswap.qasm +19 -0
  265. pyqpp-8.0.0/qasmtools/qasm/ibmqx2/qe_qft_3.qasm +47 -0
  266. pyqpp-8.0.0/qasmtools/qasm/ibmqx2/qe_qft_4.qasm +91 -0
  267. pyqpp-8.0.0/qasmtools/qasm/ibmqx2/qe_qft_5.qasm +126 -0
  268. pyqpp-8.0.0/qasmtools/qasm/invalid/gate_no_found.qasm +7 -0
  269. pyqpp-8.0.0/qasmtools/qasm/invalid/missing_semicolon.qasm +6 -0
  270. pyqpp-8.0.0/unit_tests/CMakeLists.txt +51 -0
  271. pyqpp-8.0.0/unit_tests/include/tests/util.hpp +28 -0
  272. pyqpp-8.0.0/unit_tests/test_numeric_types.sh +165 -0
  273. pyqpp-8.0.0/unit_tests/tests/MATLAB/matlab_test.cpp +128 -0
  274. pyqpp-8.0.0/unit_tests/tests/classes/gates_test.cpp +305 -0
  275. pyqpp-8.0.0/unit_tests/tests/classes/layouts_test.cpp +61 -0
  276. pyqpp-8.0.0/unit_tests/tests/classes/noise_test.cpp +144 -0
  277. pyqpp-8.0.0/unit_tests/tests/classes/qcircuit_test.cpp +2032 -0
  278. pyqpp-8.0.0/unit_tests/tests/classes/qdummy_engine_test.cpp +223 -0
  279. pyqpp-8.0.0/unit_tests/tests/classes/qengine_test.cpp +413 -0
  280. pyqpp-8.0.0/unit_tests/tests/classes/qnoisy_engine_test.cpp +214 -0
  281. pyqpp-8.0.0/unit_tests/tests/classes/random_devices_test.cpp +61 -0
  282. pyqpp-8.0.0/unit_tests/tests/classes/reversible_test.cpp +273 -0
  283. pyqpp-8.0.0/unit_tests/tests/classes/states_test.cpp +157 -0
  284. pyqpp-8.0.0/unit_tests/tests/classes/timer_test.cpp +63 -0
  285. pyqpp-8.0.0/unit_tests/tests/entanglement_test.cpp +600 -0
  286. pyqpp-8.0.0/unit_tests/tests/entropies_test.cpp +364 -0
  287. pyqpp-8.0.0/unit_tests/tests/functions_test.cpp +659 -0
  288. pyqpp-8.0.0/unit_tests/tests/input_output_test.cpp +232 -0
  289. pyqpp-8.0.0/unit_tests/tests/instruments_test.cpp +235 -0
  290. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qubit/apply_ctrl_diag_test.cpp +359 -0
  291. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qubit/apply_ctrl_fan_test.cpp +301 -0
  292. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qubit/apply_ctrl_test.cpp +407 -0
  293. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qubit/apply_diag_test.cpp +334 -0
  294. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qubit/apply_test.cpp +354 -0
  295. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qubit/ptrace_test.cpp +338 -0
  296. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qubit/ptranspose_test.cpp +318 -0
  297. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qubit/syspermute_test.cpp +328 -0
  298. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qudit/apply_ctrl_diag_test.cpp +241 -0
  299. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qudit/apply_ctrl_fan_test.cpp +568 -0
  300. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qudit/apply_ctrl_test.cpp +544 -0
  301. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qudit/apply_diag_test.cpp +332 -0
  302. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qudit/apply_test.cpp +374 -0
  303. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qudit/ptrace_test.cpp +218 -0
  304. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qudit/ptranspose_test.cpp +205 -0
  305. pyqpp-8.0.0/unit_tests/tests/internal/kernels/qudit/syspermute_test.cpp +211 -0
  306. pyqpp-8.0.0/unit_tests/tests/issues_test.cpp +37 -0
  307. pyqpp-8.0.0/unit_tests/tests/main.cpp +8 -0
  308. pyqpp-8.0.0/unit_tests/tests/number_theory_test.cpp +484 -0
  309. pyqpp-8.0.0/unit_tests/tests/operations_test.cpp +541 -0
  310. pyqpp-8.0.0/unit_tests/tests/qasm/circuits/units/builtingates.qasm +15 -0
  311. pyqpp-8.0.0/unit_tests/tests/qasm/circuits/units/mappedgates.qasm +6 -0
  312. pyqpp-8.0.0/unit_tests/tests/qasm/circuits/units/nondestrmeas.qasm +8 -0
  313. pyqpp-8.0.0/unit_tests/tests/qasm/circuits/units/reset.qasm +7 -0
  314. pyqpp-8.0.0/unit_tests/tests/qasm/circuits/units/scinot.qasm +8 -0
  315. pyqpp-8.0.0/unit_tests/tests/qasm/circuits/units/teleportation.qasm +28 -0
  316. pyqpp-8.0.0/unit_tests/tests/qasm/qasm_test.cpp +180 -0
  317. pyqpp-8.0.0/unit_tests/tests/random_test.cpp +583 -0
  318. pyqpp-8.0.0/unit_tests/tests/statistics_test.cpp +254 -0
  319. pyqpp-8.0.0/unit_tests/tests/traits_test.cpp +56 -0
@@ -0,0 +1,20 @@
1
+ ---
2
+ Language: Cpp
3
+ ColumnLimit: 80
4
+ Standard: c++17
5
+ IndentWidth: 4
6
+ TabWidth: 4
7
+ UseTab: Never
8
+ PointerAlignment: Left
9
+ IndentCaseLabels: true
10
+ AlwaysBreakTemplateDeclarations: Yes
11
+ InsertBraces: true
12
+ SortIncludes:
13
+ Enabled: true
14
+ IgnoreCase: false
15
+ # system headers come first
16
+ IncludeCategories:
17
+ - Regex: "^<.*>"
18
+ Priority: 1
19
+ - Regex: '^".*\.(h|hpp)"'
20
+ Priority: 2
@@ -0,0 +1,208 @@
1
+ FormatStyle: file
2
+ # WarningsAsErrors: "*"
3
+ Checks: "-*,
4
+ abseil-*,\
5
+ -abseil-string-find-startswith,\
6
+ -abseil-string-find-str-contains,\
7
+ bugprone-*,\
8
+ -bugprone-argument-comment,\
9
+ -bugprone-assert-side-effect,\
10
+ -bugprone-bad-signal-to-kill-thread,\
11
+ -bugprone-bool-pointer-implicit-conversion,\
12
+ -bugprone-branch-clone,\
13
+ -bugprone-copy-constructor-init,\
14
+ -bugprone-dangling-handle,\
15
+ -bugprone-dynamic-static-initializers,\
16
+ -bugprone-easily-swappable-parameters,\
17
+ -bugprone-exception-escape,\
18
+ -bugprone-fold-init-type,\
19
+ -bugprone-forward-declaration-namespace,\
20
+ -bugprone-forwarding-reference-overload,\
21
+ -bugprone-implicit-widening-of-multiplication-result,\
22
+ -bugprone-inaccurate-erase,\
23
+ -bugprone-incorrect-roundings,\
24
+ -bugprone-infinite-loop,\
25
+ -bugprone-integer-division,\
26
+ -bugprone-lambda-function-name,\
27
+ -bugprone-macro-parentheses,\
28
+ -bugprone-macro-repeated-side-effects,\
29
+ -bugprone-misplaced-operator-in-strlen-in-alloc,\
30
+ -bugprone-misplaced-widening-cast,\
31
+ -bugprone-move-forwarding-reference,\
32
+ -bugprone-multiple-statement-macro,\
33
+ -bugprone-narrowing-conversions,\
34
+ -bugprone-no-escape,\
35
+ -bugprone-not-null-terminated-result,\
36
+ -bugprone-parent-virtual-call,\
37
+ -bugprone-posix-return,\
38
+ -bugprone-redundant-branch-condition,\
39
+ -bugprone-reserved-identifier,\
40
+ -bugprone-signal-handler,\
41
+ -bugprone-signed-char-misuse,\
42
+ -bugprone-sizeof-container,\
43
+ -bugprone-sizeof-expression,\
44
+ -bugprone-spuriously-wake-up-functions,\
45
+ -bugprone-string-constructor,\
46
+ -bugprone-string-integer-assignment,\
47
+ -bugprone-string-literal-with-embedded-nul,\
48
+ -bugprone-stringview-nullptr,\
49
+ -bugprone-suspicious-enum-usage,\
50
+ -bugprone-suspicious-include,\
51
+ -bugprone-suspicious-memory-comparison,\
52
+ -bugprone-suspicious-memset-usage,\
53
+ -bugprone-suspicious-missing-comma,\
54
+ -bugprone-suspicious-semicolon,\
55
+ -bugprone-suspicious-string-compare,\
56
+ -bugprone-swapped-arguments,\
57
+ -bugprone-terminating-continue,\
58
+ -bugprone-throw-keyword-missing,\
59
+ -bugprone-too-small-loop-variable,\
60
+ -bugprone-undefined-memory-manipulation,\
61
+ -bugprone-undelegated-constructor,\
62
+ -bugprone-unhandled-exception-at-new,\
63
+ -bugprone-unhandled-self-assignment,\
64
+ -bugprone-unused-raii,\
65
+ -bugprone-unused-return-value,\
66
+ -bugprone-use-after-move,\
67
+ -bugprone-virtual-near-miss,\
68
+ cert-*,\
69
+ -cert-dcl16-c,\
70
+ -cert-dcl21-cpp,\
71
+ -cert-dcl37-c,\
72
+ -cert-dcl50-cpp,\
73
+ -cert-dcl51-cpp,\
74
+ -cert-dcl54-cpp,\
75
+ -cert-dcl58-cpp,\
76
+ -cert-err33-c,\
77
+ -cert-msc30-c,\
78
+ -cert-msc32-c,\
79
+ -cert-msc50-cpp,\
80
+ -cert-msc51-cpp,\
81
+ -cert-oop54-cpp,\
82
+ -cert-str34-c,\
83
+ -cert-str34-c,\
84
+ -cert-str34-c,\
85
+ -cert-str34-c,\
86
+ -clang-analyzer-*,\
87
+ concurrency-*,\
88
+ -concurrency-mt-unsafe,\
89
+ cppcoreguidelines-*,\
90
+ -concurrency-mt-unsafe,\
91
+ -cppcoreguidelines-avoid-c-arrays,\
92
+ -cppcoreguidelines-avoid-const-or-ref-data-members,\
93
+ -cppcoreguidelines-avoid-do-while,\
94
+ -cppcoreguidelines-avoid-goto,\
95
+ -cppcoreguidelines-avoid-magic-numbers,\
96
+ -cppcoreguidelines-avoid-non-const-global-variables,\
97
+ -cppcoreguidelines-c-copy-assignment-signature,\
98
+ -cppcoreguidelines-explicit-virtual-functions,\
99
+ -cppcoreguidelines-init-variables,\
100
+ -cppcoreguidelines-interfaces-global-init,\
101
+ -cppcoreguidelines-macro-usage,\
102
+ -cppcoreguidelines-narrowing-conversions,\
103
+ -cppcoreguidelines-no-malloc,\
104
+ -cppcoreguidelines-non-private-member-variables-in-classes,\
105
+ -cppcoreguidelines-owning-memory,\
106
+ -cppcoreguidelines-prefer-member-initializer,\
107
+ -cppcoreguidelines-pro-bounds-array-to-pointer-decay,\
108
+ -cppcoreguidelines-pro-bounds-constant-array-index,\
109
+ -cppcoreguidelines-pro-bounds-pointer-arithmetic,\
110
+ -cppcoreguidelines-pro-type-const-cast,\
111
+ -cppcoreguidelines-pro-type-member-init,\
112
+ -cppcoreguidelines-pro-type-reinterpret-cast,\
113
+ -cppcoreguidelines-pro-type-static-cast-downcast,\
114
+ -cppcoreguidelines-pro-type-union-access,\
115
+ -cppcoreguidelines-pro-type-vararg,\
116
+ -cppcoreguidelines-slicing,\
117
+ -cppcoreguidelines-special-member-functions,\
118
+ -cppcoreguidelines-virtual-class-destructor,\
119
+ google-*,\
120
+ -google-default-arguments,\
121
+ -google-explicit-constructor,\
122
+ -google-readability-avoid-underscore-in-googletest-name,\
123
+ -google-readability-braces-around-statements,\
124
+ -google-readability-casting,\
125
+ -google-readability-namespace-comments,\
126
+ -google-readability-todo,\
127
+ -google-runtime-int,\
128
+ -google-upgrade-googletest-case,\
129
+ -google-runtime-float,\
130
+ misc-*,\
131
+ -misc-misplaced-const,\
132
+ -misc-new-delete-overloads,\
133
+ -misc-non-private-member-variables-in-classes,\
134
+ -misc-no-recursion,\
135
+ -misc-redundant-expression,\
136
+ -misc-uniqueptr-reset-release,\
137
+ -misc-unconventional-assign-operator,\
138
+ -misc-unused-parameters,\
139
+ -misc-unused-using-decls,\
140
+ modernize-*,\
141
+ -modernize-avoid-c-arrays,\
142
+ -modernize-concat-nested-namespaces,\
143
+ -modernize-deprecated-headers,\
144
+ -modernize-loop-convert,\
145
+ -modernize-macro-to-enum,\
146
+ -modernize-make-unique,\
147
+ -modernize-pass-by-value,\
148
+ -modernize-raw-string-literal,\
149
+ -modernize-redundant-void-arg,\
150
+ -modernize-return-braced-init-list,\
151
+ -modernize-unary-static-assert,\
152
+ -modernize-use-auto,\
153
+ -modernize-use-bool-literals,\
154
+ -modernize-use-default-member-init,\
155
+ -modernize-use-emplace,\
156
+ -modernize-use-equals-default,\
157
+ -modernize-use-equals-delete,\
158
+ -modernize-use-nodiscard,\
159
+ -modernize-use-override,\
160
+ -modernize-use-trailing-return-type,\
161
+ -modernize-use-transparent-functors,\
162
+ -modernize-use-using,\
163
+ performance-*,\
164
+ -performance-faster-string-find,\
165
+ -performance-for-range-copy,\
166
+ -performance-inefficient-algorithm,\
167
+ -performance-inefficient-string-concatenation,\
168
+ -performance-inefficient-vector-operation,\
169
+ -performance-move-const-arg,\
170
+ -performance-no-automatic-move,\
171
+ -performance-noexcept-move-constructor,\
172
+ -performance-no-int-to-ptr,\
173
+ -performance-trivially-destructible,\
174
+ -performance-unnecessary-copy-initialization,\
175
+ -performance-unnecessary-value-param,\
176
+ portability-*,\
177
+ readability-*,\
178
+ -readability-avoid-const-params-in-decls,\
179
+ -readability-braces-around-statements,\
180
+ -readability-const-return-type,\
181
+ -readability-container-data-pointer,\
182
+ -readability-container-size-empty,\
183
+ -readability-convert-member-functions-to-static,\
184
+ -readability-else-after-return,\
185
+ -readability-function-cognitive-complexity,\
186
+ -readability-identifier-length,\
187
+ -readability-implicit-bool-conversion,\
188
+ -readability-inconsistent-declaration-parameter-name,\
189
+ -readability-isolate-declaration,\
190
+ -readability-magic-numbers,\
191
+ -readability-make-member-function-const,\
192
+ -readability-named-parameter,\
193
+ -readability-non-const-parameter,\
194
+ -readability-qualified-auto,\
195
+ -readability-redundant-access-specifiers,\
196
+ -readability-redundant-control-flow,\
197
+ -readability-redundant-declaration,\
198
+ -readability-redundant-member-init,\
199
+ -readability-redundant-smartptr-get,\
200
+ -readability-redundant-string-cstr,\
201
+ -readability-redundant-string-init,\
202
+ -readability-simplify-boolean-expr,\
203
+ -readability-static-accessed-through-instance,\
204
+ -readability-static-definition-in-anonymous-namespace,\
205
+ -readability-suspicious-call-argument,\
206
+ -readability-uppercase-literal-suffix,\
207
+ -readability-use-anyofallof
208
+ "
@@ -0,0 +1 @@
1
+ * text=auto
@@ -0,0 +1,96 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ pull_request:
7
+ branches: ["**"]
8
+
9
+ env:
10
+ BUILD_TYPE: Debug
11
+
12
+ jobs:
13
+ build:
14
+ strategy:
15
+ matrix:
16
+ os: [ubuntu-latest, macos-latest, windows-latest]
17
+
18
+ runs-on: ${{ matrix.os }}
19
+
20
+ steps:
21
+ - uses: actions/checkout@v6
22
+
23
+ - name: Configure Quantum++
24
+ run: |
25
+ cmake -S . -B build \
26
+ -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \
27
+ -DQPP_ENABLE_TESTING=ON
28
+ shell: bash
29
+
30
+ - name: Install Quantum++
31
+ shell: bash
32
+ run: |
33
+ if [ "$RUNNER_OS" == "Windows" ]; then
34
+ cmake --install build --config ${{ env.BUILD_TYPE }}
35
+ else
36
+ sudo cmake --install build --config ${{ env.BUILD_TYPE }}
37
+ fi
38
+
39
+ - name: Configure standalone example
40
+ run: cmake -S examples/standalone -B examples/standalone/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
41
+
42
+ - name: Build standalone example
43
+ run: cmake --build examples/standalone/build --config ${{ env.BUILD_TYPE }} --target standalone
44
+
45
+ - name: Run standalone example
46
+ shell: bash
47
+ run: |
48
+ if [ "$RUNNER_OS" == "Windows" ]; then
49
+ ./examples/standalone/build/${{ env.BUILD_TYPE }}/standalone.exe
50
+ else
51
+ ./examples/standalone/build/standalone
52
+ fi
53
+
54
+ - name: Build examples
55
+ run: cmake --build build --config ${{ env.BUILD_TYPE }} --target examples
56
+
57
+ - name: Configure benchmarks
58
+ run: cmake -S benchmarks -B benchmarks/build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
59
+
60
+ - name: Build benchmarks
61
+ run: cmake --build benchmarks/build --config ${{ env.BUILD_TYPE }}
62
+
63
+ - name: Build unit tests
64
+ run: cmake --build build/unit_tests --config ${{ env.BUILD_TYPE }} --target unit_tests --parallel 8
65
+
66
+ - name: Run unit tests
67
+ shell: bash
68
+ run: |
69
+ if [ "$RUNNER_OS" == "Windows" ]; then
70
+ ./build/unit_tests/unit_tests.exe \
71
+ --gtest_filter='-qpp_Timer_*'
72
+ else
73
+ ./build/unit_tests/unit_tests \
74
+ --gtest_filter='-qpp_Timer_*'
75
+ fi
76
+
77
+ - name: Uninstall Quantum++
78
+ shell: bash
79
+ run: |
80
+ if [ "$RUNNER_OS" == "Windows" ]; then
81
+ cmake --build build --config ${{ env.BUILD_TYPE }} --target uninstall
82
+ else
83
+ sudo cmake --build build --config ${{ env.BUILD_TYPE }} --target uninstall
84
+ fi
85
+
86
+ - name: Install pyqpp, test import, and run regression tests
87
+ shell: bash
88
+ run: |
89
+ # Windows has issues with virtual environment detection in CMake
90
+ if [ "$RUNNER_OS" != "Windows" ]; then
91
+ python3 -m venv venv
92
+ source venv/bin/activate
93
+ fi
94
+ python -m pip install -e . pytest
95
+ python -c "import pyqpp; print(pyqpp.dirac(pyqpp.states.zero()))"
96
+ python -m pytest -v pyqpp/tests/
@@ -0,0 +1,40 @@
1
+ name: Codeberg mirror
2
+
3
+ on:
4
+ push:
5
+ branches: ["**"]
6
+ tags: ["**"]
7
+ delete:
8
+ workflow_dispatch:
9
+ schedule:
10
+ - cron: "17 3 * * *"
11
+
12
+ permissions:
13
+ contents: read
14
+
15
+ concurrency:
16
+ group: codeberg-mirror
17
+ cancel-in-progress: false
18
+
19
+ jobs:
20
+ mirror:
21
+ runs-on: ubuntu-latest
22
+
23
+ steps:
24
+ - name: Configure SSH
25
+ env:
26
+ SSH_KEY: ${{ secrets.CODEBERG_SSH_KEY }}
27
+ run: |
28
+ mkdir -p ~/.ssh
29
+ chmod 700 ~/.ssh
30
+ printf '%s\n' "$SSH_KEY" > ~/.ssh/codeberg
31
+ chmod 600 ~/.ssh/codeberg
32
+ ssh-keyscan -t ed25519 codeberg.org >> ~/.ssh/known_hosts
33
+
34
+ - name: Mirror to Codeberg
35
+ env:
36
+ GIT_SSH_COMMAND: ssh -i ~/.ssh/codeberg -o IdentitiesOnly=yes
37
+ run: |
38
+ git clone --bare https://github.com/softwareQinc/qpp.git
39
+ cd qpp.git
40
+ git push --mirror git@codeberg.org:softwareQinc/qpp.git
@@ -0,0 +1,72 @@
1
+ name: Coverage
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ permissions:
11
+ contents: read
12
+
13
+ jobs:
14
+ coverage:
15
+ runs-on: ubuntu-24.04
16
+
17
+ env:
18
+ CC: clang-23
19
+ CXX: clang++-23
20
+
21
+ steps:
22
+ - name: Checkout
23
+ uses: actions/checkout@v6
24
+
25
+ - name: Install LLVM 23
26
+ run: |
27
+ sudo apt-get update
28
+ sudo apt-get install -y wget gnupg
29
+
30
+ wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key |
31
+ gpg --dearmor |
32
+ sudo tee /usr/share/keyrings/llvm-archive-keyring.gpg > /dev/null
33
+
34
+ echo "deb [signed-by=/usr/share/keyrings/llvm-archive-keyring.gpg] https://apt.llvm.org/noble/ llvm-toolchain-noble-23 main" |
35
+ sudo tee /etc/apt/sources.list.d/llvm.list
36
+
37
+ sudo apt-get update
38
+ sudo apt-get install -y \
39
+ clang-23 llvm-23 lld-23 \
40
+ libc++-23-dev libc++abi-23-dev \
41
+ libomp-23-dev libeigen3-dev ninja-build
42
+
43
+ - name: Configure LLVM tools
44
+ run: echo "/usr/lib/llvm-23/bin" >> "$GITHUB_PATH"
45
+
46
+ - name: Verify LLVM
47
+ run: |
48
+ clang++-23 --version
49
+ readlink -f "$(command -v clang++-23)"
50
+ llvm-cov-23 --version
51
+ llvm-profdata-23 --version
52
+
53
+ - name: Configure
54
+ run: |
55
+ cmake --fresh -S . -B build-coverage -G Ninja \
56
+ -DCMAKE_C_COMPILER=clang-23 \
57
+ -DCMAKE_CXX_COMPILER=clang++-23 \
58
+ -DCMAKE_CXX_FLAGS="-stdlib=libc++" \
59
+ -DCMAKE_BUILD_TYPE=Release \
60
+ -DQPP_ENABLE_COVERAGE=ON \
61
+ -DQPP_ENABLE_MATLAB=OFF
62
+
63
+ - name: Generate coverage
64
+ run: cmake --build build-coverage --target coverage --parallel 2
65
+
66
+ - name: Upload coverage to Codecov
67
+ uses: codecov/codecov-action@v7
68
+ with:
69
+ token: ${{ secrets.CODECOV_TOKEN }}
70
+ files: build-coverage/coverage/coverage-public.info
71
+ disable_search: true
72
+ fail_ci_if_error: true
@@ -0,0 +1,155 @@
1
+ name: Build and publish pyqpp
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - dev
8
+ release:
9
+ types: [published]
10
+
11
+ permissions:
12
+ contents: read
13
+
14
+ jobs:
15
+ build_wheels:
16
+ name: Build wheels on ${{ matrix.os }}
17
+ runs-on: ${{ matrix.os }}
18
+
19
+ strategy:
20
+ fail-fast: false
21
+ matrix:
22
+ os:
23
+ - ubuntu-latest
24
+ - ubuntu-24.04-arm
25
+ - macos-15-intel
26
+ - macos-15
27
+ - windows-latest
28
+ - windows-11-arm
29
+
30
+ steps:
31
+ - uses: actions/checkout@v7
32
+ with:
33
+ submodules: recursive
34
+ persist-credentials: false
35
+
36
+ - uses: actions/setup-python@v7
37
+ with:
38
+ python-version: "3.13"
39
+
40
+ - name: Configure OpenMP on macOS
41
+ if: runner.os == 'macOS'
42
+ run: |
43
+ brew install libomp
44
+ echo "OpenMP_ROOT=$(brew --prefix libomp)" >> "$GITHUB_ENV"
45
+
46
+ - name: Configure LLVM OpenMP on Windows
47
+ if: runner.os == 'Windows'
48
+ shell: pwsh
49
+ run: |
50
+ $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
51
+ $vs = & $vswhere -latest -products '*' -property installationPath
52
+
53
+ $arch = if ($env:RUNNER_ARCH -eq "ARM64") {
54
+ "ARM64"
55
+ } else {
56
+ "x64"
57
+ }
58
+
59
+ $llvm = "$vs\VC\Tools\Llvm\$arch"
60
+ $libomp = "$llvm\lib\libomp.lib"
61
+ $libomp_dll = "$llvm\bin\libomp.dll"
62
+
63
+ if (-not (Test-Path $libomp)) {
64
+ throw "LLVM OpenMP library not found: $libomp"
65
+ }
66
+
67
+ if (-not (Test-Path $libomp_dll)) {
68
+ throw "LLVM OpenMP runtime not found: $libomp_dll"
69
+ }
70
+
71
+ "$llvm\bin" >> $env:GITHUB_PATH
72
+
73
+ $libomp = $libomp.Replace('\', '/')
74
+ "CMAKE_ARGS=-DOpenMP_CXX_LIB_NAMES=libomp -DOpenMP_libomp_LIBRARY=`"$libomp`"" >> $env:GITHUB_ENV
75
+
76
+ - name: Install build tools
77
+ run: python -m pip install cibuildwheel twine
78
+
79
+ - name: Build wheels
80
+ run: python -m cibuildwheel --output-dir wheelhouse
81
+
82
+ - name: Validate wheels
83
+ run: python -m twine check --strict wheelhouse/*.whl
84
+
85
+ - uses: actions/upload-artifact@v7
86
+ with:
87
+ name: wheels-${{ matrix.os }}
88
+ path: wheelhouse/*.whl
89
+ if-no-files-found: error
90
+ compression-level: 0
91
+ retention-days: 7
92
+
93
+ build_sdist:
94
+ name: Build source distribution
95
+ runs-on: ubuntu-latest
96
+
97
+ steps:
98
+ - uses: actions/checkout@v7
99
+ with:
100
+ submodules: recursive
101
+ persist-credentials: false
102
+
103
+ - uses: actions/setup-python@v7
104
+ with:
105
+ python-version: "3.13"
106
+
107
+ - name: Install build tools
108
+ run: python -m pip install build twine
109
+
110
+ - name: Build source distribution
111
+ run: python -m build --sdist
112
+
113
+ - name: Validate source distribution
114
+ run: python -m twine check --strict dist/*
115
+
116
+ - uses: actions/upload-artifact@v7
117
+ with:
118
+ name: sdist
119
+ path: dist/*.tar.gz
120
+ if-no-files-found: error
121
+ compression-level: 0
122
+ retention-days: 7
123
+
124
+ publish:
125
+ name: Publish to PyPI
126
+ if: github.event_name == 'release'
127
+ needs:
128
+ - build_wheels
129
+ - build_sdist
130
+
131
+ runs-on: ubuntu-latest
132
+
133
+ environment:
134
+ name: pypi
135
+ url: https://pypi.org/project/pyqpp/
136
+
137
+ permissions:
138
+ id-token: write
139
+
140
+ steps:
141
+ - name: Download wheels
142
+ uses: actions/download-artifact@v8
143
+ with:
144
+ pattern: wheels-*
145
+ path: dist
146
+ merge-multiple: true
147
+
148
+ - name: Download source distribution
149
+ uses: actions/download-artifact@v8
150
+ with:
151
+ name: sdist
152
+ path: dist
153
+
154
+ - name: Publish package
155
+ uses: pypa/gh-action-pypi-publish@release/v1
pyqpp-8.0.0/.gitignore ADDED
@@ -0,0 +1,103 @@
1
+ # Prerequisites
2
+ *.d
3
+
4
+ # Compiled object files
5
+ *.slo
6
+ *.lo
7
+ *.o
8
+ *.obj
9
+
10
+ # Precompiled headers
11
+ *.gch
12
+ *.pch
13
+
14
+ # Compiled dynamic libraries
15
+ *.so
16
+ *.dylib
17
+ *.dll
18
+
19
+ # Fortran module files
20
+ *.mod
21
+ *.smod
22
+
23
+ # Compiled static libraries
24
+ *.lai
25
+ *.la
26
+ *.a
27
+ *.lib
28
+
29
+ # Executables
30
+ *.exe
31
+ *.out
32
+ *.app
33
+
34
+ # Vim
35
+ *.swp
36
+
37
+ # Emacs
38
+ \#*\#
39
+ *~
40
+
41
+ # clangd
42
+ .cache/
43
+ compile_commands.json
44
+
45
+ # MSVC
46
+ .vs/
47
+ /out*
48
+ CMakeSettings.json
49
+
50
+ # VS Code
51
+ .vscode/
52
+
53
+ # CLion
54
+ .idea/
55
+ cmake-build*/
56
+
57
+ # Build
58
+ build/
59
+ /build_examples_numeric_types/
60
+ /build_tests_numeric_types/
61
+
62
+ # CMake-generated files
63
+ Makefile
64
+ cmake_install.cmake
65
+ CMakeCache.txt
66
+ CMakeFiles/
67
+ .cmake/
68
+ Testing/
69
+
70
+ # Numeric type testing
71
+ /logs_examples_numeric_types/
72
+ /logs_tests_numeric_types/
73
+
74
+ # Generated documentation
75
+ /doc/
76
+
77
+ # Miscellaneous
78
+ .DS_Store
79
+ NOTES.txt
80
+ TODO.txt
81
+ mat.txt
82
+ out.tmp
83
+ rho.mat
84
+ rho.txt
85
+ /test
86
+ examples/_*.cpp
87
+
88
+ # Python / pyqpp
89
+ *.egg-info/
90
+ __pycache__/
91
+ *.py[cod]
92
+ .pytest_cache/
93
+ .venv/
94
+ venv/
95
+ /uv.lock
96
+ /dist/
97
+ /wheelhouse/
98
+
99
+ # Code coverage
100
+ /build-coverage/
101
+ /coverage*
102
+ *.profraw
103
+ *.profdata