pyqcm 2.3.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 (303) hide show
  1. pyqcm-2.3.0/.gitignore +14 -0
  2. pyqcm-2.3.0/.readthedocs.yaml +19 -0
  3. pyqcm-2.3.0/CMakeLists.txt +307 -0
  4. pyqcm-2.3.0/INSTALL.md +164 -0
  5. pyqcm-2.3.0/LICENSE +679 -0
  6. pyqcm-2.3.0/PKG-INFO +59 -0
  7. pyqcm-2.3.0/README.md +48 -0
  8. pyqcm-2.3.0/bench/ED/bench_ED.py +25 -0
  9. pyqcm-2.3.0/bench/ED/bench_ED2.py +33 -0
  10. pyqcm-2.3.0/bench/ED/bench_ED2_laptop.txt +10 -0
  11. pyqcm-2.3.0/bench/ED/bench_GS.py +31 -0
  12. pyqcm-2.3.0/bench/ED/bench_GS2.py +50 -0
  13. pyqcm-2.3.0/bench/ED/bench_GS_loop.py +40 -0
  14. pyqcm-2.3.0/bench/ED/model_1D.py +40 -0
  15. pyqcm-2.3.0/bench/ED/model_2D.py +30 -0
  16. pyqcm-2.3.0/bench/ED/plot_bench_ED.py +34 -0
  17. pyqcm-2.3.0/bench/integrals/plot_concurrent.py +37 -0
  18. pyqcm-2.3.0/bench/integrals/plot_integrals.py +37 -0
  19. pyqcm-2.3.0/bench/integrals/small/integrals_small.py +17 -0
  20. pyqcm-2.3.0/bench/integrals/small/integrals_small_concurrent.txt +19 -0
  21. pyqcm-2.3.0/bench/integrals/small/integrals_small_results.txt +13 -0
  22. pyqcm-2.3.0/bench/integrals/small/model_small.py +13 -0
  23. pyqcm-2.3.0/bench/vca/bench_vca.py +65 -0
  24. pyqcm-2.3.0/bench/vca/bench_vca2.py +70 -0
  25. pyqcm-2.3.0/bitbucket-pipelines.yml +12 -0
  26. pyqcm-2.3.0/docs/Makefile +20 -0
  27. pyqcm-2.3.0/docs/makedoc +6 -0
  28. pyqcm-2.3.0/docs/source/2x2.png +0 -0
  29. pyqcm-2.3.0/docs/source/T6.png +0 -0
  30. pyqcm-2.3.0/docs/source/cdmft.rst +35 -0
  31. pyqcm-2.3.0/docs/source/conf.py +186 -0
  32. pyqcm-2.3.0/docs/source/defining_cluster_models.rst +120 -0
  33. pyqcm-2.3.0/docs/source/defining_models.rst +122 -0
  34. pyqcm-2.3.0/docs/source/h4-6b.png +0 -0
  35. pyqcm-2.3.0/docs/source/h8.asy +58 -0
  36. pyqcm-2.3.0/docs/source/h8.png +0 -0
  37. pyqcm-2.3.0/docs/source/hartree.rst +40 -0
  38. pyqcm-2.3.0/docs/source/hexa6.png +0 -0
  39. pyqcm-2.3.0/docs/source/index.rst +31 -0
  40. pyqcm-2.3.0/docs/source/intro.rst +81 -0
  41. pyqcm-2.3.0/docs/source/models.rst +283 -0
  42. pyqcm-2.3.0/docs/source/options.rst +91 -0
  43. pyqcm-2.3.0/docs/source/options_intro.txt +13 -0
  44. pyqcm-2.3.0/docs/source/other_functions.rst +10 -0
  45. pyqcm-2.3.0/docs/source/parallel.rst +125 -0
  46. pyqcm-2.3.0/docs/source/parallel_performance_concurrent.png +0 -0
  47. pyqcm-2.3.0/docs/source/parallel_performance_ed.png +0 -0
  48. pyqcm-2.3.0/docs/source/parallel_performance_integrals.png +0 -0
  49. pyqcm-2.3.0/docs/source/parameters.rst +68 -0
  50. pyqcm-2.3.0/docs/source/t15.png +0 -0
  51. pyqcm-2.3.0/docs/source/vca.rst +19 -0
  52. pyqcm-2.3.0/examples/1D_2_4b/QCM_params.def +9 -0
  53. pyqcm-2.3.0/examples/1D_2_4b/averages.tsv +450 -0
  54. pyqcm-2.3.0/examples/1D_2_4b/cdmft.tsv +107 -0
  55. pyqcm-2.3.0/examples/1D_2_4b/cdmft_distance.tsv +52 -0
  56. pyqcm-2.3.0/examples/1D_2_4b/cdmft_grid.tsv +4430 -0
  57. pyqcm-2.3.0/examples/1D_2_4b/cdmft_iter.tsv +1970 -0
  58. pyqcm-2.3.0/examples/1D_2_4b/debug.py +36 -0
  59. pyqcm-2.3.0/examples/1D_2_4b/debug_complex.py +49 -0
  60. pyqcm-2.3.0/examples/1D_2_4b/debug_dvmc.py +26 -0
  61. pyqcm-2.3.0/examples/1D_2_4b/debug_variable_parameter.py +35 -0
  62. pyqcm-2.3.0/examples/1D_2_4b/dos.tsv +63 -0
  63. pyqcm-2.3.0/examples/1D_2_4b/h1.pdf +0 -0
  64. pyqcm-2.3.0/examples/1D_2_4b/h2.pdf +0 -0
  65. pyqcm-2.3.0/examples/1D_2_4b/hop.npy +0 -0
  66. pyqcm-2.3.0/examples/1D_2_4b/hopping.def +6 -0
  67. pyqcm-2.3.0/examples/1D_2_4b/interaction.def +2 -0
  68. pyqcm-2.3.0/examples/1D_2_4b/interaction.npy +0 -0
  69. pyqcm-2.3.0/examples/1D_2_4b/model_1D_2_4b.py +97 -0
  70. pyqcm-2.3.0/examples/1D_2_4b/out +68 -0
  71. pyqcm-2.3.0/examples/1D_2_4b/s1.pdf +0 -0
  72. pyqcm-2.3.0/examples/1D_2_4b/s2.pdf +0 -0
  73. pyqcm-2.3.0/examples/1D_4/GS.tsv +15 -0
  74. pyqcm-2.3.0/examples/1D_4/ave.tsv +148 -0
  75. pyqcm-2.3.0/examples/1D_4/averages.tsv +148 -0
  76. pyqcm-2.3.0/examples/1D_4/debug.py +17 -0
  77. pyqcm-2.3.0/examples/1D_4/debug_cdw.py +46 -0
  78. pyqcm-2.3.0/examples/1D_4/debug_dvmc.py +17 -0
  79. pyqcm-2.3.0/examples/1D_4/debug_rhoAB.py +82 -0
  80. pyqcm-2.3.0/examples/1D_4/hartree.tsv +87 -0
  81. pyqcm-2.3.0/examples/1D_4/model_1D_4.py +40 -0
  82. pyqcm-2.3.0/examples/1D_4/model_1D_4_C2.py +11 -0
  83. pyqcm-2.3.0/examples/1D_4/record.py +70 -0
  84. pyqcm-2.3.0/examples/1D_4/sef.tsv +4945 -0
  85. pyqcm-2.3.0/examples/1D_4/vca.tsv +104 -0
  86. pyqcm-2.3.0/external/FindAVX2.cmake +58 -0
  87. pyqcm-2.3.0/notebooks/AF_VCA_vs_L.ipynb +295 -0
  88. pyqcm-2.3.0/notebooks/AF_VCA_vs_L.py +39 -0
  89. pyqcm-2.3.0/notebooks/CDW_1D.ipynb +2266 -0
  90. pyqcm-2.3.0/notebooks/CDW_1D.py +98 -0
  91. pyqcm-2.3.0/notebooks/Mott_Weyl.ipynb +255 -0
  92. pyqcm-2.3.0/notebooks/Mott_Weyl.py +104 -0
  93. pyqcm-2.3.0/notebooks/Mott_transition_graphene_CDMFT.ipynb +261 -0
  94. pyqcm-2.3.0/notebooks/Mott_transition_graphene_CDMFT.py +142 -0
  95. pyqcm-2.3.0/notebooks/Rashba_coupling.ipynb +183 -0
  96. pyqcm-2.3.0/notebooks/Rashba_coupling.py +65 -0
  97. pyqcm-2.3.0/notebooks/antiferromagnetism_VCA.ipynb +291 -0
  98. pyqcm-2.3.0/notebooks/antiferromagnetism_VCA.py +177 -0
  99. pyqcm-2.3.0/notebooks/dimerization_1D.ipynb +279 -0
  100. pyqcm-2.3.0/notebooks/dimerization_1D.py +42 -0
  101. pyqcm-2.3.0/notebooks/intro1.ipynb +108 -0
  102. pyqcm-2.3.0/notebooks/intro1.py +47 -0
  103. pyqcm-2.3.0/notebooks/intro2.ipynb +114 -0
  104. pyqcm-2.3.0/notebooks/intro2.py +53 -0
  105. pyqcm-2.3.0/notebooks/intro3.ipynb +121 -0
  106. pyqcm-2.3.0/notebooks/intro3.py +59 -0
  107. pyqcm-2.3.0/notebooks/periodic_cluster.ipynb +118 -0
  108. pyqcm-2.3.0/notebooks/periodic_cluster.py +39 -0
  109. pyqcm-2.3.0/notebooks/superconductivity_VCA.ipynb +174 -0
  110. pyqcm-2.3.0/notebooks/superconductivity_VCA.py +69 -0
  111. pyqcm-2.3.0/print_version.py +12 -0
  112. pyqcm-2.3.0/pyproject.toml +13 -0
  113. pyqcm-2.3.0/pyqcm/Kolmogorov_Smirnov.py +113 -0
  114. pyqcm-2.3.0/pyqcm/__init__.py +2092 -0
  115. pyqcm-2.3.0/pyqcm/_draw.py +482 -0
  116. pyqcm-2.3.0/pyqcm/_loop.py +533 -0
  117. pyqcm-2.3.0/pyqcm/_spectral.py +1832 -0
  118. pyqcm-2.3.0/pyqcm/cdmft.py +1186 -0
  119. pyqcm-2.3.0/pyqcm/cdw.py +504 -0
  120. pyqcm-2.3.0/pyqcm/dca.py +276 -0
  121. pyqcm-2.3.0/pyqcm/external.py +71 -0
  122. pyqcm-2.3.0/pyqcm/qcm_git_hash.py +2 -0
  123. pyqcm-2.3.0/pyqcm/slab.py +111 -0
  124. pyqcm-2.3.0/pyqcm/variable_parameter.py +169 -0
  125. pyqcm-2.3.0/pyqcm/vca.py +1008 -0
  126. pyqcm-2.3.0/pyqcm.egg-info/PKG-INFO +59 -0
  127. pyqcm-2.3.0/pyqcm.egg-info/SOURCES.txt +301 -0
  128. pyqcm-2.3.0/pyqcm.egg-info/dependency_links.txt +1 -0
  129. pyqcm-2.3.0/pyqcm.egg-info/requires.txt +3 -0
  130. pyqcm-2.3.0/pyqcm.egg-info/top_level.txt +1 -0
  131. pyqcm-2.3.0/requirements.txt +3 -0
  132. pyqcm-2.3.0/setup.cfg +4 -0
  133. pyqcm-2.3.0/setup.py +47 -0
  134. pyqcm-2.3.0/src_ed/.clang-format +44 -0
  135. pyqcm-2.3.0/src_ed/Doxyfile +2494 -0
  136. pyqcm-2.3.0/src_ed/ED_basis.cpp +439 -0
  137. pyqcm-2.3.0/src_ed/ED_basis.hpp +101 -0
  138. pyqcm-2.3.0/src_ed/Green_function_set.hpp +36 -0
  139. pyqcm-2.3.0/src_ed/Hamiltonian/CSR_hermitian.hpp +98 -0
  140. pyqcm-2.3.0/src_ed/Hamiltonian/Davidson.hpp +234 -0
  141. pyqcm-2.3.0/src_ed/Hamiltonian/Hamiltonian_CSR.hpp +140 -0
  142. pyqcm-2.3.0/src_ed/Hamiltonian/Hamiltonian_Dense.hpp +195 -0
  143. pyqcm-2.3.0/src_ed/Hamiltonian/Hamiltonian_Eigen.hpp +129 -0
  144. pyqcm-2.3.0/src_ed/Hamiltonian/Hamiltonian_Factorized.hpp +88 -0
  145. pyqcm-2.3.0/src_ed/Hamiltonian/Hamiltonian_OnTheFly.hpp +79 -0
  146. pyqcm-2.3.0/src_ed/Hamiltonian/Hamiltonian_Operator.hpp +99 -0
  147. pyqcm-2.3.0/src_ed/Hamiltonian/Hamiltonian_base.hpp +219 -0
  148. pyqcm-2.3.0/src_ed/Hamiltonian/Hamiltonian_ops.hpp +0 -0
  149. pyqcm-2.3.0/src_ed/Hamiltonian/Lanczos.cpp +55 -0
  150. pyqcm-2.3.0/src_ed/Hamiltonian/Lanczos.hpp +398 -0
  151. pyqcm-2.3.0/src_ed/Hamiltonian/PRIMME_solver.cpp +21 -0
  152. pyqcm-2.3.0/src_ed/Hamiltonian/PRIMME_solver.hpp +165 -0
  153. pyqcm-2.3.0/src_ed/Operators/HS_Heisenberg_operator.hpp +124 -0
  154. pyqcm-2.3.0/src_ed/Operators/HS_Hermitian_operator.hpp +55 -0
  155. pyqcm-2.3.0/src_ed/Operators/HS_Hund_operator.hpp +62 -0
  156. pyqcm-2.3.0/src_ed/Operators/HS_anomalous_operator.hpp +46 -0
  157. pyqcm-2.3.0/src_ed/Operators/HS_factorized_operator.hpp +117 -0
  158. pyqcm-2.3.0/src_ed/Operators/HS_general_interaction_operator.hpp +62 -0
  159. pyqcm-2.3.0/src_ed/Operators/HS_half_operator.hpp +72 -0
  160. pyqcm-2.3.0/src_ed/Operators/HS_interaction_operator.hpp +135 -0
  161. pyqcm-2.3.0/src_ed/Operators/HS_nondiagonal_operator.hpp +238 -0
  162. pyqcm-2.3.0/src_ed/Operators/HS_one_body_operator.hpp +42 -0
  163. pyqcm-2.3.0/src_ed/Operators/HS_operator.hpp +71 -0
  164. pyqcm-2.3.0/src_ed/Operators/Heisenberg_operator.cpp +82 -0
  165. pyqcm-2.3.0/src_ed/Operators/Heisenberg_operator.hpp +27 -0
  166. pyqcm-2.3.0/src_ed/Operators/Hermitian_operator.hpp +92 -0
  167. pyqcm-2.3.0/src_ed/Operators/Hund_operator.cpp +87 -0
  168. pyqcm-2.3.0/src_ed/Operators/Hund_operator.hpp +25 -0
  169. pyqcm-2.3.0/src_ed/Operators/anomalous_operator.hpp +381 -0
  170. pyqcm-2.3.0/src_ed/Operators/destruction_operator.cpp +58 -0
  171. pyqcm-2.3.0/src_ed/Operators/destruction_operator.hpp +78 -0
  172. pyqcm-2.3.0/src_ed/Operators/general_interaction_operator.hpp +136 -0
  173. pyqcm-2.3.0/src_ed/Operators/interaction_operator.hpp +161 -0
  174. pyqcm-2.3.0/src_ed/Operators/one_body_operator.hpp +522 -0
  175. pyqcm-2.3.0/src_ed/Q_matrix.hpp +332 -0
  176. pyqcm-2.3.0/src_ed/Q_matrix_set.hpp +212 -0
  177. pyqcm-2.3.0/src_ed/binary_state.cpp +170 -0
  178. pyqcm-2.3.0/src_ed/binary_state.hpp +66 -0
  179. pyqcm-2.3.0/src_ed/continued_fraction.cpp +93 -0
  180. pyqcm-2.3.0/src_ed/continued_fraction.hpp +31 -0
  181. pyqcm-2.3.0/src_ed/continued_fraction_set.cpp +179 -0
  182. pyqcm-2.3.0/src_ed/continued_fraction_set.hpp +28 -0
  183. pyqcm-2.3.0/src_ed/flex_array.hpp +86 -0
  184. pyqcm-2.3.0/src_ed/fraction.hpp +38 -0
  185. pyqcm-2.3.0/src_ed/index.hpp +101 -0
  186. pyqcm-2.3.0/src_ed/index_pair.hpp +44 -0
  187. pyqcm-2.3.0/src_ed/matrix_element.hpp +63 -0
  188. pyqcm-2.3.0/src_ed/model.cpp +305 -0
  189. pyqcm-2.3.0/src_ed/model.hpp +55 -0
  190. pyqcm-2.3.0/src_ed/model_instance.cpp +240 -0
  191. pyqcm-2.3.0/src_ed/model_instance.hpp +1393 -0
  192. pyqcm-2.3.0/src_ed/model_instance_base.cpp +137 -0
  193. pyqcm-2.3.0/src_ed/model_instance_base.hpp +78 -0
  194. pyqcm-2.3.0/src_ed/qcm_ED.cpp +442 -0
  195. pyqcm-2.3.0/src_ed/qcm_ED.hpp +323 -0
  196. pyqcm-2.3.0/src_ed/sector.cpp +35 -0
  197. pyqcm-2.3.0/src_ed/sector.hpp +170 -0
  198. pyqcm-2.3.0/src_ed/sparse_matrix.hpp +83 -0
  199. pyqcm-2.3.0/src_ed/state.hpp +101 -0
  200. pyqcm-2.3.0/src_ed/symmetric_orbital.hpp +53 -0
  201. pyqcm-2.3.0/src_ed/symmetry_group.cpp +656 -0
  202. pyqcm-2.3.0/src_ed/symmetry_group.hpp +144 -0
  203. pyqcm-2.3.0/src_python/common_Py.cpp +378 -0
  204. pyqcm-2.3.0/src_python/common_Py.hpp +41 -0
  205. pyqcm-2.3.0/src_python/qcm_ED_lib.cpp +112 -0
  206. pyqcm-2.3.0/src_python/qcm_ED_only.hpp +20 -0
  207. pyqcm-2.3.0/src_python/qcm_ED_wrap.hpp +1087 -0
  208. pyqcm-2.3.0/src_python/qcm_lib.cpp +193 -0
  209. pyqcm-2.3.0/src_python/qcm_wrap.hpp +2265 -0
  210. pyqcm-2.3.0/src_qcm/CPT.cpp +445 -0
  211. pyqcm-2.3.0/src_qcm/Chern.cpp +415 -0
  212. pyqcm-2.3.0/src_qcm/Doxyfile +2494 -0
  213. pyqcm-2.3.0/src_qcm/Green_function.hpp +45 -0
  214. pyqcm-2.3.0/src_qcm/QCM.cpp +995 -0
  215. pyqcm-2.3.0/src_qcm/QCM.hpp +105 -0
  216. pyqcm-2.3.0/src_qcm/average.cpp +468 -0
  217. pyqcm-2.3.0/src_qcm/basis3D.cpp +171 -0
  218. pyqcm-2.3.0/src_qcm/basis3D.hpp +39 -0
  219. pyqcm-2.3.0/src_qcm/lattice3D.cpp +269 -0
  220. pyqcm-2.3.0/src_qcm/lattice3D.hpp +41 -0
  221. pyqcm-2.3.0/src_qcm/lattice_matrix_element.hpp +90 -0
  222. pyqcm-2.3.0/src_qcm/lattice_model.cpp +1096 -0
  223. pyqcm-2.3.0/src_qcm/lattice_model.hpp +210 -0
  224. pyqcm-2.3.0/src_qcm/lattice_model_instance.cpp +742 -0
  225. pyqcm-2.3.0/src_qcm/lattice_model_instance.hpp +91 -0
  226. pyqcm-2.3.0/src_qcm/lattice_operator.cpp +270 -0
  227. pyqcm-2.3.0/src_qcm/lattice_operator.hpp +66 -0
  228. pyqcm-2.3.0/src_qcm/omp.h +371 -0
  229. pyqcm-2.3.0/src_qcm/parameter_set.cpp +250 -0
  230. pyqcm-2.3.0/src_qcm/parameter_set.hpp +52 -0
  231. pyqcm-2.3.0/src_qcm/print.cpp +322 -0
  232. pyqcm-2.3.0/src_qcm/profile.cpp +120 -0
  233. pyqcm-2.3.0/src_qcm/vector3D.hpp +382 -0
  234. pyqcm-2.3.0/src_util/ED_global_parameter.cpp +277 -0
  235. pyqcm-2.3.0/src_util/VDVH_kernel.cpp +317 -0
  236. pyqcm-2.3.0/src_util/VDVH_kernel.hpp +33 -0
  237. pyqcm-2.3.0/src_util/block_matrix.hpp +291 -0
  238. pyqcm-2.3.0/src_util/cblas.h +856 -0
  239. pyqcm-2.3.0/src_util/clapack.h +5355 -0
  240. pyqcm-2.3.0/src_util/f2c.h +437 -0
  241. pyqcm-2.3.0/src_util/global_parameter.cpp +85 -0
  242. pyqcm-2.3.0/src_util/global_parameter.hpp +80 -0
  243. pyqcm-2.3.0/src_util/integrate.cpp +768 -0
  244. pyqcm-2.3.0/src_util/integrate.hpp +227 -0
  245. pyqcm-2.3.0/src_util/lapack-blas.h +10 -0
  246. pyqcm-2.3.0/src_util/matrix.cpp +359 -0
  247. pyqcm-2.3.0/src_util/matrix.hpp +739 -0
  248. pyqcm-2.3.0/src_util/parser.cpp +323 -0
  249. pyqcm-2.3.0/src_util/parser.hpp +84 -0
  250. pyqcm-2.3.0/src_util/types.hpp +34 -0
  251. pyqcm-2.3.0/src_util/vector_num.cpp +190 -0
  252. pyqcm-2.3.0/src_util/vector_num.hpp +287 -0
  253. pyqcm-2.3.0/tests/README.md +7 -0
  254. pyqcm-2.3.0/tests/test_all.py +33 -0
  255. pyqcm-2.3.0/tests/test_diagonalization/S_format.ref +653 -0
  256. pyqcm-2.3.0/tests/test_diagonalization/S_format_complex.ref +53 -0
  257. pyqcm-2.3.0/tests/test_diagonalization/cluster_2x2_2C_8b_C2v_L.py +55 -0
  258. pyqcm-2.3.0/tests/test_diagonalization/common.py +24 -0
  259. pyqcm-2.3.0/tests/test_diagonalization/model_1D_8.py +18 -0
  260. pyqcm-2.3.0/tests/test_diagonalization/model_2x2_2C_8b_C2v_L.py +48 -0
  261. pyqcm-2.3.0/tests/test_diagonalization/test_pole_distribution.py +78 -0
  262. pyqcm-2.3.0/tests/test_diagonalization/test_pole_distribution_complex.py +34 -0
  263. pyqcm-2.3.0/tests/test_files/model_1D.py +39 -0
  264. pyqcm-2.3.0/tests/test_files/model_1D_2.py +24 -0
  265. pyqcm-2.3.0/tests/test_files/model_1D_2_4b.py +98 -0
  266. pyqcm-2.3.0/tests/test_files/model_1D_4.py +24 -0
  267. pyqcm-2.3.0/tests/test_files/model_1D_4_C2.py +18 -0
  268. pyqcm-2.3.0/tests/test_files/model_2x2_C2.py +39 -0
  269. pyqcm-2.3.0/tests/test_files/model_2x2_C2_vca.py +39 -0
  270. pyqcm-2.3.0/tests/test_files/model_G4_6b_2C.py +40 -0
  271. pyqcm-2.3.0/tests/test_files/model_WSM.py +21 -0
  272. pyqcm-2.3.0/tests/test_files/model_graphene_bath.py +60 -0
  273. pyqcm-2.3.0/tests/test_files/model_hartree.py +16 -0
  274. pyqcm-2.3.0/tests/test_files/record_2x2.py +93 -0
  275. pyqcm-2.3.0/tests/test_files/record_2x2_8b.py +240 -0
  276. pyqcm-2.3.0/tests/test_files/record_2x2_anom.py +388 -0
  277. pyqcm-2.3.0/tests/test_files/record_WSM.py +140 -0
  278. pyqcm-2.3.0/tests/test_files/record_WSM2.py +381 -0
  279. pyqcm-2.3.0/tests/test_files/record_spin.py +134 -0
  280. pyqcm-2.3.0/tests/test_files/test_2clusters.py +80 -0
  281. pyqcm-2.3.0/tests/test_files/test_CF.py +78 -0
  282. pyqcm-2.3.0/tests/test_files/test_averages.py +33 -0
  283. pyqcm-2.3.0/tests/test_files/test_averages_bath.py +26 -0
  284. pyqcm-2.3.0/tests/test_files/test_berry.py +59 -0
  285. pyqcm-2.3.0/tests/test_files/test_cdmft.py +43 -0
  286. pyqcm-2.3.0/tests/test_files/test_cdmft_hartree.py +34 -0
  287. pyqcm-2.3.0/tests/test_files/test_cluster_average.py +27 -0
  288. pyqcm-2.3.0/tests/test_files/test_controlled_loop.py +44 -0
  289. pyqcm-2.3.0/tests/test_files/test_draw.py +30 -0
  290. pyqcm-2.3.0/tests/test_files/test_fidelity.py +46 -0
  291. pyqcm-2.3.0/tests/test_files/test_fixed_density_loop.py +37 -0
  292. pyqcm-2.3.0/tests/test_files/test_hartree.py +59 -0
  293. pyqcm-2.3.0/tests/test_files/test_hybridization.py +20 -0
  294. pyqcm-2.3.0/tests/test_files/test_instances.py +21 -0
  295. pyqcm-2.3.0/tests/test_files/test_mixing.py +61 -0
  296. pyqcm-2.3.0/tests/test_files/test_mixing2.py +52 -0
  297. pyqcm-2.3.0/tests/test_files/test_mixing_cf.py +62 -0
  298. pyqcm-2.3.0/tests/test_files/test_reset.py +73 -0
  299. pyqcm-2.3.0/tests/test_files/test_spectral.py +106 -0
  300. pyqcm-2.3.0/tests/test_files/test_varia.py +23 -0
  301. pyqcm-2.3.0/tests/test_files/test_vca.py +54 -0
  302. pyqcm-2.3.0/tests/test_files/test_vca_MPI.py +31 -0
  303. pyqcm-2.3.0/tests/test_files/test_write.py +22 -0
pyqcm-2.3.0/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ *.o
2
+ *.d
3
+ *.out
4
+ *.zip
5
+ *.vscode
6
+ *.tsv
7
+ _skbuild
8
+ *egg-info*
9
+ **/__pycache__
10
+ qcm_git_hash.py
11
+ external
12
+ tests/test_outputs/
13
+ doc/build
14
+ build
@@ -0,0 +1,19 @@
1
+ # Read the Docs configuration file for Sphinx projects
2
+ # See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3
+
4
+ version: 2
5
+
6
+ # Set the OS, Python version for building the docs
7
+ build:
8
+ os: ubuntu-22.04
9
+ tools:
10
+ python: "3.10"
11
+
12
+ python:
13
+ install:
14
+ - requirements: requirements.txt
15
+
16
+ # Build documentation in the "docs/" directory with Sphinx
17
+ sphinx:
18
+ builder: html
19
+ configuration: docs/source/conf.py
@@ -0,0 +1,307 @@
1
+ cmake_minimum_required(VERSION 3.15)
2
+
3
+ # Compiler options
4
+ if(APPLE)
5
+ #enforce compiler because Apple system can use a broken compiler
6
+ if ((NOT CMAKE_C_COMPILER) AND (NOT CMAKE_CXX_COMPILER))
7
+ message(STATUS "Enforce Clang and Clang++ compilers on Apple. To disable this behavior, manually set CMake variables -DCMAKE_C_COMPILER=[your_c_compiler] and -DCMAKE_CXX_COMPILER=[your_cxx_compiler]")
8
+ set(CMAKE_C_COMPILER "clang")
9
+ set(CMAKE_CXX_COMPILER "clang++")
10
+ endif()
11
+ elseif(UNIX)
12
+ #Nothing
13
+ else()
14
+ message(WARNING "Potentially unsupported system, compilation may fail...")
15
+ endif()
16
+
17
+ if(POLICY CMP0135) # From CMake 3.24
18
+ # We don't care about DOWNLOAD_EXTRACT_TIMESTAMP; prefer the new behavior
19
+ cmake_policy(SET CMP0135 NEW)
20
+ endif()
21
+
22
+
23
+ #------------------
24
+ # QCM specific options
25
+ #------------------
26
+ option(DOWNLOAD_CUBA "Specify to download and compile automatically the CUBA integration library" ON)
27
+ option(CUBA_DIR "If CUBA not downloaded and build by this project, specify the path to CUBA directory for linking Pyqcm against (must contain compiled Cuba library libcuba.a along with the header cuba.h")
28
+ option(BLA_VENDOR "BLAS implementation to use. See CMake vendor documentation https://cmake.org/cmake/help/latest/module/FindBLAS.html for more information")
29
+ option(EIGEN_HAMILTONIAN "Specify to compile with Eigen format for the Hamiltonian for better performance in the diagonalisation solver on multi-core machine (require Eigen library)" ON)
30
+ option(WITH_PRIMME "Whether to use or not the PRIMME library and its eigensolver for finding ground state of the Hamiltonian (needs EIGEN_HAMILTONIAN=1)" ON)
31
+ option(DOWNLOAD_PRIMME "Specify to download and compile automatically the PRIMME eigensolver library (needs WITH_PRIMME=ON)" ON)
32
+ option(PRIMME_DIR "Specify the path to the PRIMME root directory for linking qcm_wed library against if not download automatically")
33
+ option(WITH_GF_OPT_KERNEL "Automatically detect host processor AVX2 capabilities (i.e. Intel processors after 2014 and AMD processors after 2015) and compile the optimized kernel (5 times quicker) for Green function evaluation" ON)
34
+ option(QCM_DEBUG "Enable extra verbose information for debug purpose" OFF)
35
+ option(APPLE_LIBOMP_PREFIX "Custom path to the OpenMP library libomp on Apple computer")
36
+ option(USE_OPENMP "Enable parallelization using OpenMP" ON)
37
+ option(GENERIC_BUILD "Compile qcm_wed with the minimum optimization flag to target generic machine" OFF)
38
+
39
+
40
+ # set the project name and version
41
+ project(qcm LANGUAGES C CXX VERSION 2.2.6 DESCRIPTION "Quantum Cluster Methods shared library")
42
+
43
+ if(NOT CMAKE_BUILD_TYPE)
44
+ set(CMAKE_BUILD_TYPE Release)
45
+ endif()
46
+
47
+ # specify the C++ standard
48
+ set(CMAKE_CXX_STANDARD 14)
49
+ set(CMAKE_CXX_STANDARD_REQUIRED True)
50
+
51
+ message(STATUS "Host processor : ${CMAKE_HOST_SYSTEM_PROCESSOR}")
52
+ message(STATUS "Architecture: ${ARCHITECTURE}")
53
+
54
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
55
+ set(CMAKE_CXX_FLAGS_DEBUG "-g ")
56
+
57
+
58
+ #------------------
59
+ # Compilation option (optimisation)
60
+ #------------------
61
+
62
+ if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
63
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -xHost -funroll-loops")
64
+ #elseif(CMAKE_CXX_COMPILER_ID MATCHES Clang OR CMAKE_CXX_COMPILER_ID MATCHES GNU)
65
+ else()
66
+ set(CMAKE_CXX_FLAGS_RELEASE "-O2 -ftree-vectorize -funroll-loops")
67
+ include(CheckCXXCompilerFlag)
68
+ if (NOT GENERIC_BUILD)
69
+ CHECK_CXX_COMPILER_FLAG("-march=native" NATIVE_ARCH_BUILD)
70
+ if (NATIVE_ARCH_BUILD)
71
+ message(STATUS "Target this machine architecture (enable -march=native)")
72
+ set(CMAKE_CXX_FLAGS_RELEASE "-march=native ${CMAKE_CXX_FLAGS_RELEASE}")
73
+ endif()
74
+ endif()
75
+ endif()
76
+
77
+ if(QCM_DEBUG)
78
+ add_definitions(-DQCM_DEBUG)
79
+ endif()
80
+
81
+
82
+ #------------------
83
+ # Define target
84
+ #------------------
85
+
86
+ add_library(qcm SHARED
87
+ src_qcm/CPT.cpp
88
+ src_qcm/Chern.cpp
89
+ src_qcm/QCM.cpp
90
+ src_qcm/average.cpp
91
+ src_qcm/basis3D.cpp
92
+ src_qcm/lattice3D.cpp
93
+ src_qcm/lattice_model.cpp
94
+ src_qcm/lattice_model_instance.cpp
95
+ src_qcm/lattice_operator.cpp
96
+ src_qcm/parameter_set.cpp
97
+ src_qcm/profile.cpp
98
+ src_ed/ED_basis.cpp
99
+ src_ed/Operators/Heisenberg_operator.cpp
100
+ src_ed/Operators/Hund_operator.cpp
101
+ src_ed/Hamiltonian/PRIMME_solver.cpp
102
+ src_ed/Hamiltonian/Lanczos.cpp
103
+ src_ed/binary_state.cpp
104
+ src_ed/continued_fraction.cpp
105
+ src_ed/continued_fraction_set.cpp
106
+ src_ed/Operators/destruction_operator.cpp
107
+ src_ed/model.cpp
108
+ src_ed/model_instance.cpp
109
+ src_ed/model_instance_base.cpp
110
+ src_ed/qcm_ED.cpp
111
+ src_ed/sector.cpp
112
+ src_ed/symmetry_group.cpp
113
+ src_python/common_Py.cpp
114
+ src_python/qcm_lib.cpp
115
+ src_util/ED_global_parameter.cpp
116
+ src_util/global_parameter.cpp
117
+ src_util/integrate.cpp
118
+ src_util/matrix.cpp
119
+ src_util/parser.cpp
120
+ src_util/VDVH_kernel.cpp
121
+ src_util/vector_num.cpp
122
+ )
123
+
124
+ set_target_properties(qcm PROPERTIES VERSION ${PROJECT_VERSION} PREFIX "" SUFFIX ".so")
125
+
126
+ #------------------
127
+ # Python components
128
+ #------------------
129
+ find_package(Python3 3.7 COMPONENTS Interpreter Development NumPy REQUIRED)
130
+ message(STATUS "python executable: ${Python3_EXECUTABLE}")
131
+ message(STATUS "python include dir: ${Python3_INCLUDE_DIRS}")
132
+ message(STATUS "python libs: ${Python3_LIBRARIES}")
133
+ set(NUMPY_INCLUDE_DIR ${Python3_NumPy_INCLUDE_DIRS})
134
+ message(STATUS "numpy dir : ${NUMPY_INCLUDE_DIR}")
135
+
136
+ if(SKBUILD)
137
+ message(STATUS "this is built with SciKit-build")
138
+ else()
139
+ execute_process (COMMAND ${Python3_EXECUTABLE} -c "import numpy; print(numpy.get_include())" OUTPUT_VARIABLE NUMPY_INCLUDE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
140
+ endif()
141
+
142
+ #------------------
143
+ # External Dependencies for Hamiltonian
144
+ #------------------
145
+
146
+ if (EIGEN_HAMILTONIAN)
147
+ find_package(Eigen3 REQUIRED)
148
+ target_include_directories(qcm PUBLIC ${EIGEN3_INCLUDE_DIR})
149
+ message(STATUS "Compile with Eigen Hamiltonian format 'E'")
150
+ message(STATUS "Eigen3 directory: ${EIGEN3_INCLUDE_DIR}")
151
+ add_compile_definitions(EIGEN_HAMILTONIAN)
152
+ endif()
153
+
154
+
155
+ #------------------
156
+ # PRIMME Eigensolver
157
+ #------------------
158
+
159
+ if (WITH_PRIMME)
160
+ if (NOT EIGEN_HAMILTONIAN)
161
+ message(FATAL_ERROR "PRIMME eigensolver require qcm_wed to be build with Eigen Hamiltonian. Add -DEIGEN_HAMILTONIAN=1 to CMake.")
162
+ endif()
163
+ if (DOWNLOAD_PRIMME)
164
+ include(ExternalProject)
165
+ set(CMD_MAKE_PRIMME "make")
166
+ list(APPEND CMD_MAKE_PRIMME "lib")
167
+ list(APPEND CMD_MAKE_PRIMME "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_CXX_FLAGS_RELEASE} -fPIC -DNDEBUG")
168
+ ExternalProject_Add(PRIMME
169
+ PREFIX ${CMAKE_SOURCE_DIR}/external
170
+ SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/primme
171
+ URL https://github.com/primme/primme/archive/refs/tags/v3.2.tar.gz
172
+ URL_HASH MD5=b26968d0ea8aa2e6feefc89f3c863062
173
+ CONFIGURE_COMMAND COMMAND ""
174
+ BUILD_COMMAND COMMAND ${CMD_MAKE_PRIMME}
175
+ BUILD_IN_SOURCE 1
176
+ INSTALL_COMMAND ""
177
+ STEP_TARGETS build
178
+ BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/external/primme/lib/libprimme.a
179
+ )
180
+ add_dependencies(qcm PRIMME)
181
+ set(PRIMME_LIBRARY ${CMAKE_SOURCE_DIR}/external/primme/lib/libprimme.a)
182
+ else()
183
+ find_library(
184
+ PRIMME_LIBRARY REQUIRED
185
+ NAMES libprimme.a
186
+ HINTS "/usr/local/lib" ${PRIMME_DIR}/lib "${CMAKE_SOURCE_DIR}/external/primme/lib"
187
+ )
188
+ endif()
189
+ get_filename_component(PRIMME_DIR ${PRIMME_LIBRARY} DIRECTORY)
190
+ set(PRIMME_DIR "${PRIMME_DIR}/..")
191
+ add_compile_definitions(WITH_PRIMME)
192
+ message(STATUS "PRIMME_DIR: ${PRIMME_DIR}")
193
+ message(STATUS "PRIMME lib: ${PRIMME_LIBRARY}")
194
+ endif()
195
+
196
+
197
+ #------------------
198
+ # BLAS / LAPACK
199
+ #------------------
200
+
201
+ include(FindLAPACK REQUIRED)
202
+ message(STATUS "LAPACK lib: ${LAPACK_LIBRARIES}")
203
+
204
+
205
+ #------------------
206
+ # Cuba library
207
+ #------------------
208
+
209
+ if (DOWNLOAD_CUBA)
210
+ include(ExternalProject)
211
+ ExternalProject_Add(Cuba
212
+ PREFIX ${CMAKE_SOURCE_DIR}/external
213
+ SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/cuba
214
+ URL http://www.feynarts.de/cuba/Cuba-4.2.2.tar.gz
215
+ URL_HASH MD5=a92897343027893ba2ec40dc15558b32
216
+ CONFIGURE_COMMAND COMMAND ${CMAKE_SOURCE_DIR}/external/cuba/configure "CFLAGS=${CMAKE_CXX_FLAGS_RELEASE} -fPIC" "CC=${CMAKE_C_COMPILER}"
217
+ BUILD_COMMAND COMMAND make "lib"
218
+ BUILD_IN_SOURCE 1
219
+ INSTALL_COMMAND ""
220
+ STEP_TARGETS build
221
+ BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/external/cuba/libcuba.a
222
+ )
223
+ add_dependencies(qcm Cuba)
224
+ set(CUBA_LIBRARY ${CMAKE_SOURCE_DIR}/external/cuba/libcuba.a)
225
+ else()
226
+ find_library(CUBA_LIBRARY
227
+ NAMES libcuba.a
228
+ HINTS "${CUBA_DIR}" "/usr/local/lib" "$ENV{HOME}/lib" "${CMAKE_SOURCE_DIR}/external/cuba/"
229
+ )
230
+ endif()
231
+
232
+ get_filename_component(CUBA_DIR ${CUBA_LIBRARY} DIRECTORY)
233
+ message(STATUS "CUBA lib: ${CUBA_LIBRARY}")
234
+ message(STATUS "CUBA dir: ${CUBA_DIR}")
235
+
236
+
237
+ #-----------------------------------------------
238
+ # Optimized kernel for Green function evaluation
239
+ #-----------------------------------------------
240
+ if (GENERIC_BUILD)
241
+ set( WITH_GF_OPT_KERNEL OFF)
242
+ message(WARNING "Generic build cannot use AVX2 optimized kernel for Green function evaluation. Setting WITH_GF_OPT_KERNEL to false")
243
+ endif()
244
+ if (WITH_GF_OPT_KERNEL)
245
+ set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/external" ${CMAKE_MODULE_PATH} )
246
+ include(FindAVX2)
247
+ if (AVX2_FOUND)
248
+ add_compile_definitions(HAVE_AVX2)
249
+ else()
250
+ message(WARNING "WITH_GF_KERNEL specified but the host processor does not have AVX2 capability: optimized kernel will not be used.")
251
+ set(AVX2_FOUND false)
252
+ endif()
253
+ message(STATUS "Using AVX2 optimized kernel for Green function evaluation: ${AVX2_FOUND}")
254
+ endif()
255
+
256
+
257
+ #------------------
258
+ # Parallelization using OpenMP
259
+ #------------------
260
+
261
+ if (USE_OPENMP)
262
+ if (APPLE)
263
+ #Let's try once
264
+ find_package(OpenMP)
265
+ #If can't be find automatically
266
+ if (NOT OpenMP_FOUND)
267
+ if (NOT ${APPLE_LIBOMP_PREFIX})
268
+ execute_process(COMMAND brew --prefix libomp
269
+ OUTPUT_VARIABLE APPLE_LIBOMP_PREFIX
270
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
271
+ endif()
272
+ message(STATUS "Apple OpenMP library: ${APPLE_LIBOMP_PREFIX}")
273
+ #OpenMP_C
274
+ set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I${APPLE_LIBOMP_PREFIX}/include")
275
+ set(OpenMP_C_LIB_NAMES "omp")
276
+ #OpenMP_CXX
277
+ set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I${APPLE_LIBOMP_PREFIX}/include")
278
+ set(OpenMP_CXX_LIB_NAMES "omp")
279
+ #OpenMP libs name
280
+ set(OpenMP_omp_LIBRARY "${APPLE_LIBOMP_PREFIX}/lib/libomp.dylib")
281
+ find_package(OpenMP REQUIRED)
282
+ endif()
283
+ else()
284
+ find_package(OpenMP REQUIRED)
285
+ endif()
286
+ endif()
287
+
288
+
289
+ #------------------
290
+ # Link dependencies
291
+ #------------------
292
+
293
+ target_link_libraries(qcm ${Python3_LIBRARIES} ${LAPACK_LIBRARIES} ${CUBA_LIBRARY} ${PRIMME_LIBRARY} OpenMP::OpenMP_CXX)
294
+
295
+ target_include_directories(qcm PUBLIC src_qcm src_ed src_python src_util ${Python3_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR}/numpy ${CUBA_DIR} ${PRIMME_DIR}/include)
296
+
297
+
298
+ #------------------
299
+ # Install targets
300
+ #------------------
301
+ # Be sure to install in the pyqcm folder
302
+ if (NOT CMAKE_INSTALL_PREFIX)
303
+ set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR})
304
+ endif()
305
+ # install(TARGETS qcm DESTINATION ${PYTHON_INCLUDE_DIR}/site-packages)
306
+ # install(TARGETS qcm DESTINATION ${CMAKE_SOURCE_DIR}/pyqcm)
307
+ install(TARGETS qcm DESTINATION pyqcm)
pyqcm-2.3.0/INSTALL.md ADDED
@@ -0,0 +1,164 @@
1
+ # PyQCM installation
2
+
3
+ ## Default installation using pip
4
+
5
+ This is the easiest installation of PyQCM suitable for all users.
6
+ It builds the PyQCM library and downloads runtime dependencies automatically using the default system compiler and libraries.
7
+
8
+ 1. Install CMake (may change depending of your system):
9
+ On Ubuntu:
10
+ ```
11
+ sudo apt install cmake
12
+ ```
13
+ On MacOS:
14
+ ```
15
+ brew install cmake
16
+ ```
17
+
18
+
19
+ 2. Open a terminal and clone the Pyqcm Git repository:
20
+
21
+ ```
22
+ git clone https://bitbucket.org/dsenechQCM/qcm_wed.git
23
+ cd qcm_wed
24
+ ```
25
+
26
+ 2. Configure Pyqcm to use whether or not optional dependencies (optional, see below):
27
+ ```
28
+ export CMAKE_ARGS="[BUILD_ARG1]=[VALUE1] [BUILD_ARG2]=[VALUE2] ..."
29
+ ```
30
+
31
+ 3. Perform automatic installation with `pip`:
32
+
33
+ ```
34
+ pip install .
35
+ ```
36
+
37
+ ## Building the documentation
38
+
39
+ The code's documentation can be built by going to the "docs" directory and typing "./makedoc"
40
+ By default this produces a web site within the "html" folder. Open the file "html/index.html".
41
+ Alternatively, one can acccess the documentation at
42
+
43
+ https://qcm-wed.readthedocs.io/en/latest/
44
+
45
+ ## Build options
46
+
47
+ Additional options for building the code are described in the introduction section of the documentation.
48
+
49
+ * ``-DDOWNLOAD_CUBA=0/1``: Specify to download and compile automatically the CUBA integration library.
50
+ * ``-DCUBA_DIR=[path_to_CUBA_root_dir]``: If CUBA not downloaded from above, specify the path to CUBA directory for linking Pyqcm against (must contain compiled Cuba library ``libcuba.a`` along with the header ``cuba.h``).
51
+ * ``-DBLA_VENDOR=[value]``: BLAS implementation to use. See `CMake vendor documentation <https://cmake.org/cmake/help/latest/module/FindBLAS.html?highlight=bla_vendor#blas-lapack-vendors>`_ for more information (recommended: do not specify or ``FlexiBLAS`` on Digital Alliance clusters in Canada). Otherwise install LAPACK/BLAS on your system and cmake will probably find it. For MacOS : will use the Accelerate Framework automatically.
52
+ * ``-DEIGEN_HAMILTONIAN=0/1``: Specify to compile with Eigen format for the Hamiltonian for better performance in the diagonalisation solver on multi-core machine (require `Eigen library <https://eigen.tuxfamily.org/index.php?title=Main_Page>`_).
53
+ * ``-DWITH_PRIMME=0/1``: Whether to use or not the PRIMME library and its eigensolver for finding ground state of the Hamiltonian (needs ``-DEIGEN_HAMILTONIAN=1``).
54
+ * ``-DDOWNLOAD_PRIMME=0/1``: Specify to download and compile automatically the PRIMME eigensolver library (needs ``-DWITH_PRIMME=1``).
55
+ * ``-DPRIMME_DIR=[path_to_PRIMME_root_dir]``: Specify the path to the PRIMME root directory for linking qcm_wed library against if not download automatically.
56
+
57
+
58
+ ## Installation from source
59
+
60
+ These instructions allow a finely tunned compilation of the qcm library and dependencies for better performance.
61
+ Library and dependencies compilation and installation are no more handled automatically.
62
+
63
+
64
+ ### CUBA numerical integration library
65
+
66
+ 1. Download and extract sources:
67
+ ```
68
+ wget http://www.feynarts.de/cuba/Cuba-4.2.2.tar.gz #download
69
+ tar -xf Cuba-4.2.2.tar.gz #decompress
70
+ ```
71
+
72
+ 2. Configure and compile:
73
+ ```
74
+ cd Cuba-4.2.2 #enter extraction CUBA directory
75
+ ./configure CFLAGS="-O3 -fPIC -ffast-math -fomit-frame-pointer" #configure
76
+ make lib #compile
77
+ ```
78
+
79
+ ### PRIMME eigensolver
80
+
81
+ 1. Download and extract sources:
82
+ ```
83
+ wget https://github.com/primme/primme/archive/refs/tags/v3.2.tar.gz #download
84
+ tar -xf primme-3.2.tar.gz #decompress
85
+ ```
86
+
87
+ 2. Compile:
88
+ ```
89
+ make lib
90
+ ```
91
+
92
+ ### Eigen linear algebra library
93
+
94
+ Eigen could be installed on many Linux system by their respective package manager.
95
+ For example, for Ubuntu and Debian machine:
96
+ ```
97
+ sudo apt install libeigen3-dev
98
+ ```
99
+
100
+ Or, on MacOS with:
101
+ ```
102
+ brew install eigen
103
+ ```
104
+
105
+ ### Pyqcm
106
+
107
+ 1. Clone PyQCM:
108
+
109
+ ```
110
+ git clone https://bitbucket.org/dsenechQCM/qcm_wed.git
111
+ ```
112
+
113
+ 3. Configure and compile QCM library:
114
+
115
+ ```
116
+ cd qcm_wed
117
+ mkdir build && cd build
118
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DCUBA_DIR=../Cuba-4.2.2 [...] #see build options above
119
+ cmake --build .
120
+ cp ./qcm* ../pyqcm/.
121
+ ```
122
+
123
+ 4. Add the source directory (qcm_wed) to your PYTHONPATH:
124
+
125
+ ```
126
+ export PYTHONPATH="$HOME/qcm_wed:$PYTHONPATH"
127
+ ```
128
+
129
+ ## Tips on MacOS
130
+
131
+ Compiling CUBA on MacOS must be done with the same compiler as the rest, and the ./configure
132
+ file of the CUBA distribution may not follow this. Therefore it is recommended to manually set
133
+ the following cmake options:
134
+
135
+ ```
136
+ -DCMAKE_C_COMPILER=cc -DCMAKE_CXX_COMPILER=c++
137
+ ```
138
+
139
+ ## Tips for compilation on Compute Canada server (not up to date)
140
+
141
+ ### Compilation on Intel based cluster with ICC compiler
142
+
143
+ CUBA configure step (2):
144
+
145
+ ```
146
+ ./configure FC=`which ifort` CC=`which icc` CFLAGS="-O3 -fPIC"
147
+ ```
148
+
149
+ QCM configure step (3) with CMake:
150
+
151
+ ```
152
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DCUBA_DIR=../CUBA-4.2.2 -DCMAKE_CXX_COMPILER=`which icc` -DBLA_VENDOR=Intel10_64lp_seq -DCMAKE_INCLUDE_PATH=${MKLLROOT}/lib/intel64_lin/
153
+ ```
154
+
155
+ ### Compilation with FlexiBLAS
156
+
157
+ QCM configure step (3) with CMake 3.21.4:
158
+
159
+ ```
160
+ module load cmake/3.21.4 flexiblas/3.0.4 scipy-stack
161
+ cmake .. -DCMAKE_BUILD_TYPE=Release -DCUBA_DIR=../CUBA-4.2.2 -DBLA_VENDOR=FlexiBLAS
162
+ ```
163
+
164
+