pyqcm 2.5.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.
- pyqcm-2.5.0/.gitignore +14 -0
- pyqcm-2.5.0/.readthedocs.yaml +19 -0
- pyqcm-2.5.0/CMakeLists.txt +316 -0
- pyqcm-2.5.0/INSTALL.md +164 -0
- pyqcm-2.5.0/LICENSE +679 -0
- pyqcm-2.5.0/PKG-INFO +59 -0
- pyqcm-2.5.0/README.md +48 -0
- pyqcm-2.5.0/bench/ED/bench_ED.py +25 -0
- pyqcm-2.5.0/bench/ED/bench_ED2.py +33 -0
- pyqcm-2.5.0/bench/ED/bench_ED2_laptop.txt +10 -0
- pyqcm-2.5.0/bench/ED/bench_GS.py +31 -0
- pyqcm-2.5.0/bench/ED/bench_GS2.py +50 -0
- pyqcm-2.5.0/bench/ED/bench_GS_loop.py +40 -0
- pyqcm-2.5.0/bench/ED/model_1D.py +40 -0
- pyqcm-2.5.0/bench/ED/model_2D.py +30 -0
- pyqcm-2.5.0/bench/ED/plot_bench_ED.py +34 -0
- pyqcm-2.5.0/bench/integrals/plot_concurrent.py +37 -0
- pyqcm-2.5.0/bench/integrals/plot_integrals.py +37 -0
- pyqcm-2.5.0/bench/integrals/small/integrals_small.py +17 -0
- pyqcm-2.5.0/bench/integrals/small/integrals_small_concurrent.txt +19 -0
- pyqcm-2.5.0/bench/integrals/small/integrals_small_results.txt +13 -0
- pyqcm-2.5.0/bench/integrals/small/model_small.py +13 -0
- pyqcm-2.5.0/bench/vca/bench_vca.py +65 -0
- pyqcm-2.5.0/bench/vca/bench_vca2.py +70 -0
- pyqcm-2.5.0/bitbucket-pipelines.yml +12 -0
- pyqcm-2.5.0/docs/Makefile +20 -0
- pyqcm-2.5.0/docs/makedoc +6 -0
- pyqcm-2.5.0/docs/source/2x2.png +0 -0
- pyqcm-2.5.0/docs/source/T6.png +0 -0
- pyqcm-2.5.0/docs/source/cdmft.rst +30 -0
- pyqcm-2.5.0/docs/source/conf.py +186 -0
- pyqcm-2.5.0/docs/source/defining_cluster_models.rst +120 -0
- pyqcm-2.5.0/docs/source/defining_models.rst +122 -0
- pyqcm-2.5.0/docs/source/h4-6b.png +0 -0
- pyqcm-2.5.0/docs/source/h8.asy +58 -0
- pyqcm-2.5.0/docs/source/h8.png +0 -0
- pyqcm-2.5.0/docs/source/hartree.rst +40 -0
- pyqcm-2.5.0/docs/source/hexa6.png +0 -0
- pyqcm-2.5.0/docs/source/index.rst +31 -0
- pyqcm-2.5.0/docs/source/intro.rst +81 -0
- pyqcm-2.5.0/docs/source/models.rst +283 -0
- pyqcm-2.5.0/docs/source/options.rst +93 -0
- pyqcm-2.5.0/docs/source/options_intro.txt +13 -0
- pyqcm-2.5.0/docs/source/other_functions.rst +10 -0
- pyqcm-2.5.0/docs/source/parallel.rst +125 -0
- pyqcm-2.5.0/docs/source/parallel_performance_concurrent.png +0 -0
- pyqcm-2.5.0/docs/source/parallel_performance_ed.png +0 -0
- pyqcm-2.5.0/docs/source/parallel_performance_integrals.png +0 -0
- pyqcm-2.5.0/docs/source/parameters.rst +68 -0
- pyqcm-2.5.0/docs/source/t15.png +0 -0
- pyqcm-2.5.0/docs/source/vca.rst +19 -0
- pyqcm-2.5.0/examples/1D_2_4b/QCM_params.def +9 -0
- pyqcm-2.5.0/examples/1D_2_4b/averages.tsv +450 -0
- pyqcm-2.5.0/examples/1D_2_4b/cdmft.tsv +107 -0
- pyqcm-2.5.0/examples/1D_2_4b/cdmft_distance.tsv +52 -0
- pyqcm-2.5.0/examples/1D_2_4b/cdmft_grid.tsv +4430 -0
- pyqcm-2.5.0/examples/1D_2_4b/cdmft_iter.tsv +1970 -0
- pyqcm-2.5.0/examples/1D_2_4b/debug.py +36 -0
- pyqcm-2.5.0/examples/1D_2_4b/debug_complex.py +49 -0
- pyqcm-2.5.0/examples/1D_2_4b/debug_dvmc.py +26 -0
- pyqcm-2.5.0/examples/1D_2_4b/debug_variable_parameter.py +35 -0
- pyqcm-2.5.0/examples/1D_2_4b/dos.tsv +63 -0
- pyqcm-2.5.0/examples/1D_2_4b/h1.pdf +0 -0
- pyqcm-2.5.0/examples/1D_2_4b/h2.pdf +0 -0
- pyqcm-2.5.0/examples/1D_2_4b/hop.npy +0 -0
- pyqcm-2.5.0/examples/1D_2_4b/hopping.def +6 -0
- pyqcm-2.5.0/examples/1D_2_4b/interaction.def +2 -0
- pyqcm-2.5.0/examples/1D_2_4b/interaction.npy +0 -0
- pyqcm-2.5.0/examples/1D_2_4b/model_1D_2_4b.py +97 -0
- pyqcm-2.5.0/examples/1D_2_4b/out +68 -0
- pyqcm-2.5.0/examples/1D_2_4b/s1.pdf +0 -0
- pyqcm-2.5.0/examples/1D_2_4b/s2.pdf +0 -0
- pyqcm-2.5.0/examples/1D_4/GS.tsv +15 -0
- pyqcm-2.5.0/examples/1D_4/ave.tsv +148 -0
- pyqcm-2.5.0/examples/1D_4/averages.tsv +148 -0
- pyqcm-2.5.0/examples/1D_4/debug.py +17 -0
- pyqcm-2.5.0/examples/1D_4/debug_cdw.py +46 -0
- pyqcm-2.5.0/examples/1D_4/debug_dvmc.py +17 -0
- pyqcm-2.5.0/examples/1D_4/debug_rhoAB.py +82 -0
- pyqcm-2.5.0/examples/1D_4/hartree.tsv +87 -0
- pyqcm-2.5.0/examples/1D_4/model_1D_4.py +40 -0
- pyqcm-2.5.0/examples/1D_4/model_1D_4_C2.py +11 -0
- pyqcm-2.5.0/examples/1D_4/record.py +70 -0
- pyqcm-2.5.0/examples/1D_4/sef.tsv +4945 -0
- pyqcm-2.5.0/examples/1D_4/vca.tsv +104 -0
- pyqcm-2.5.0/external/FindAVX2.cmake +58 -0
- pyqcm-2.5.0/notebooks/AF_VCA_vs_L.ipynb +295 -0
- pyqcm-2.5.0/notebooks/AF_VCA_vs_L.py +39 -0
- pyqcm-2.5.0/notebooks/CDW_1D.ipynb +2266 -0
- pyqcm-2.5.0/notebooks/CDW_1D.py +98 -0
- pyqcm-2.5.0/notebooks/Mott_Weyl.ipynb +255 -0
- pyqcm-2.5.0/notebooks/Mott_Weyl.py +104 -0
- pyqcm-2.5.0/notebooks/Mott_transition_graphene_CDMFT.ipynb +261 -0
- pyqcm-2.5.0/notebooks/Mott_transition_graphene_CDMFT.py +142 -0
- pyqcm-2.5.0/notebooks/Rashba_coupling.ipynb +183 -0
- pyqcm-2.5.0/notebooks/Rashba_coupling.py +65 -0
- pyqcm-2.5.0/notebooks/antiferromagnetism_VCA.ipynb +291 -0
- pyqcm-2.5.0/notebooks/antiferromagnetism_VCA.py +177 -0
- pyqcm-2.5.0/notebooks/dimerization_1D.ipynb +279 -0
- pyqcm-2.5.0/notebooks/dimerization_1D.py +42 -0
- pyqcm-2.5.0/notebooks/intro1.ipynb +108 -0
- pyqcm-2.5.0/notebooks/intro1.py +47 -0
- pyqcm-2.5.0/notebooks/intro2.ipynb +114 -0
- pyqcm-2.5.0/notebooks/intro2.py +53 -0
- pyqcm-2.5.0/notebooks/intro3.ipynb +121 -0
- pyqcm-2.5.0/notebooks/intro3.py +59 -0
- pyqcm-2.5.0/notebooks/periodic_cluster.ipynb +118 -0
- pyqcm-2.5.0/notebooks/periodic_cluster.py +39 -0
- pyqcm-2.5.0/notebooks/superconductivity_VCA.ipynb +174 -0
- pyqcm-2.5.0/notebooks/superconductivity_VCA.py +69 -0
- pyqcm-2.5.0/print_version.py +12 -0
- pyqcm-2.5.0/pyproject.toml +13 -0
- pyqcm-2.5.0/pyqcm/Kolmogorov_Smirnov.py +113 -0
- pyqcm-2.5.0/pyqcm/__init__.py +2247 -0
- pyqcm-2.5.0/pyqcm/_draw.py +481 -0
- pyqcm-2.5.0/pyqcm/_loop.py +597 -0
- pyqcm-2.5.0/pyqcm/_spectral.py +1838 -0
- pyqcm-2.5.0/pyqcm/cdmft.py +1247 -0
- pyqcm-2.5.0/pyqcm/cdw.py +504 -0
- pyqcm-2.5.0/pyqcm/dca.py +276 -0
- pyqcm-2.5.0/pyqcm/external.py +71 -0
- pyqcm-2.5.0/pyqcm/qcm_git_hash.py +2 -0
- pyqcm-2.5.0/pyqcm/slab.py +111 -0
- pyqcm-2.5.0/pyqcm/variable_parameter.py +167 -0
- pyqcm-2.5.0/pyqcm/vca.py +1006 -0
- pyqcm-2.5.0/pyqcm.egg-info/PKG-INFO +59 -0
- pyqcm-2.5.0/pyqcm.egg-info/SOURCES.txt +301 -0
- pyqcm-2.5.0/pyqcm.egg-info/dependency_links.txt +1 -0
- pyqcm-2.5.0/pyqcm.egg-info/requires.txt +3 -0
- pyqcm-2.5.0/pyqcm.egg-info/top_level.txt +1 -0
- pyqcm-2.5.0/requirements.txt +3 -0
- pyqcm-2.5.0/setup.cfg +4 -0
- pyqcm-2.5.0/setup.py +47 -0
- pyqcm-2.5.0/src_ed/.clang-format +44 -0
- pyqcm-2.5.0/src_ed/Doxyfile +2494 -0
- pyqcm-2.5.0/src_ed/ED_basis.cpp +439 -0
- pyqcm-2.5.0/src_ed/ED_basis.hpp +101 -0
- pyqcm-2.5.0/src_ed/Green_function_set.hpp +36 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/CSR_hermitian.hpp +98 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/Davidson.hpp +234 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/Hamiltonian_CSR.hpp +140 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/Hamiltonian_Dense.hpp +195 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/Hamiltonian_Eigen.hpp +129 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/Hamiltonian_Factorized.hpp +88 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/Hamiltonian_OnTheFly.hpp +79 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/Hamiltonian_Operator.hpp +99 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/Hamiltonian_base.hpp +219 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/Hamiltonian_ops.hpp +0 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/Lanczos.cpp +55 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/Lanczos.hpp +398 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/PRIMME_solver.cpp +21 -0
- pyqcm-2.5.0/src_ed/Hamiltonian/PRIMME_solver.hpp +165 -0
- pyqcm-2.5.0/src_ed/Operators/HS_Heisenberg_operator.hpp +124 -0
- pyqcm-2.5.0/src_ed/Operators/HS_Hermitian_operator.hpp +55 -0
- pyqcm-2.5.0/src_ed/Operators/HS_Hund_operator.hpp +62 -0
- pyqcm-2.5.0/src_ed/Operators/HS_anomalous_operator.hpp +46 -0
- pyqcm-2.5.0/src_ed/Operators/HS_factorized_operator.hpp +117 -0
- pyqcm-2.5.0/src_ed/Operators/HS_general_interaction_operator.hpp +62 -0
- pyqcm-2.5.0/src_ed/Operators/HS_half_operator.hpp +72 -0
- pyqcm-2.5.0/src_ed/Operators/HS_interaction_operator.hpp +135 -0
- pyqcm-2.5.0/src_ed/Operators/HS_nondiagonal_operator.hpp +238 -0
- pyqcm-2.5.0/src_ed/Operators/HS_one_body_operator.hpp +42 -0
- pyqcm-2.5.0/src_ed/Operators/HS_operator.hpp +71 -0
- pyqcm-2.5.0/src_ed/Operators/Heisenberg_operator.cpp +82 -0
- pyqcm-2.5.0/src_ed/Operators/Heisenberg_operator.hpp +27 -0
- pyqcm-2.5.0/src_ed/Operators/Hermitian_operator.hpp +92 -0
- pyqcm-2.5.0/src_ed/Operators/Hund_operator.cpp +87 -0
- pyqcm-2.5.0/src_ed/Operators/Hund_operator.hpp +25 -0
- pyqcm-2.5.0/src_ed/Operators/anomalous_operator.hpp +381 -0
- pyqcm-2.5.0/src_ed/Operators/destruction_operator.cpp +58 -0
- pyqcm-2.5.0/src_ed/Operators/destruction_operator.hpp +78 -0
- pyqcm-2.5.0/src_ed/Operators/general_interaction_operator.hpp +136 -0
- pyqcm-2.5.0/src_ed/Operators/interaction_operator.hpp +161 -0
- pyqcm-2.5.0/src_ed/Operators/one_body_operator.hpp +522 -0
- pyqcm-2.5.0/src_ed/Q_matrix.hpp +332 -0
- pyqcm-2.5.0/src_ed/Q_matrix_set.hpp +212 -0
- pyqcm-2.5.0/src_ed/binary_state.cpp +170 -0
- pyqcm-2.5.0/src_ed/binary_state.hpp +66 -0
- pyqcm-2.5.0/src_ed/continued_fraction.cpp +93 -0
- pyqcm-2.5.0/src_ed/continued_fraction.hpp +31 -0
- pyqcm-2.5.0/src_ed/continued_fraction_set.cpp +179 -0
- pyqcm-2.5.0/src_ed/continued_fraction_set.hpp +28 -0
- pyqcm-2.5.0/src_ed/flex_array.hpp +86 -0
- pyqcm-2.5.0/src_ed/fraction.hpp +38 -0
- pyqcm-2.5.0/src_ed/index.hpp +101 -0
- pyqcm-2.5.0/src_ed/index_pair.hpp +44 -0
- pyqcm-2.5.0/src_ed/matrix_element.hpp +63 -0
- pyqcm-2.5.0/src_ed/model.cpp +305 -0
- pyqcm-2.5.0/src_ed/model.hpp +55 -0
- pyqcm-2.5.0/src_ed/model_instance.cpp +240 -0
- pyqcm-2.5.0/src_ed/model_instance.hpp +1393 -0
- pyqcm-2.5.0/src_ed/model_instance_base.cpp +137 -0
- pyqcm-2.5.0/src_ed/model_instance_base.hpp +78 -0
- pyqcm-2.5.0/src_ed/qcm_ED.cpp +442 -0
- pyqcm-2.5.0/src_ed/qcm_ED.hpp +323 -0
- pyqcm-2.5.0/src_ed/sector.cpp +35 -0
- pyqcm-2.5.0/src_ed/sector.hpp +170 -0
- pyqcm-2.5.0/src_ed/sparse_matrix.hpp +83 -0
- pyqcm-2.5.0/src_ed/state.hpp +101 -0
- pyqcm-2.5.0/src_ed/symmetric_orbital.hpp +53 -0
- pyqcm-2.5.0/src_ed/symmetry_group.cpp +656 -0
- pyqcm-2.5.0/src_ed/symmetry_group.hpp +144 -0
- pyqcm-2.5.0/src_python/common_Py.cpp +378 -0
- pyqcm-2.5.0/src_python/common_Py.hpp +41 -0
- pyqcm-2.5.0/src_python/qcm_ED_lib.cpp +112 -0
- pyqcm-2.5.0/src_python/qcm_ED_only.hpp +20 -0
- pyqcm-2.5.0/src_python/qcm_ED_wrap.hpp +1087 -0
- pyqcm-2.5.0/src_python/qcm_lib.cpp +193 -0
- pyqcm-2.5.0/src_python/qcm_wrap.hpp +2265 -0
- pyqcm-2.5.0/src_qcm/CPT.cpp +445 -0
- pyqcm-2.5.0/src_qcm/Chern.cpp +415 -0
- pyqcm-2.5.0/src_qcm/Doxyfile +2494 -0
- pyqcm-2.5.0/src_qcm/Green_function.hpp +45 -0
- pyqcm-2.5.0/src_qcm/QCM.cpp +989 -0
- pyqcm-2.5.0/src_qcm/QCM.hpp +105 -0
- pyqcm-2.5.0/src_qcm/average.cpp +468 -0
- pyqcm-2.5.0/src_qcm/basis3D.cpp +171 -0
- pyqcm-2.5.0/src_qcm/basis3D.hpp +39 -0
- pyqcm-2.5.0/src_qcm/lattice3D.cpp +269 -0
- pyqcm-2.5.0/src_qcm/lattice3D.hpp +41 -0
- pyqcm-2.5.0/src_qcm/lattice_matrix_element.hpp +90 -0
- pyqcm-2.5.0/src_qcm/lattice_model.cpp +1096 -0
- pyqcm-2.5.0/src_qcm/lattice_model.hpp +210 -0
- pyqcm-2.5.0/src_qcm/lattice_model_instance.cpp +691 -0
- pyqcm-2.5.0/src_qcm/lattice_model_instance.hpp +88 -0
- pyqcm-2.5.0/src_qcm/lattice_operator.cpp +270 -0
- pyqcm-2.5.0/src_qcm/lattice_operator.hpp +66 -0
- pyqcm-2.5.0/src_qcm/omp.h +371 -0
- pyqcm-2.5.0/src_qcm/parameter_set.cpp +250 -0
- pyqcm-2.5.0/src_qcm/parameter_set.hpp +52 -0
- pyqcm-2.5.0/src_qcm/print.cpp +322 -0
- pyqcm-2.5.0/src_qcm/profile.cpp +120 -0
- pyqcm-2.5.0/src_qcm/vector3D.hpp +382 -0
- pyqcm-2.5.0/src_util/ED_global_parameter.cpp +277 -0
- pyqcm-2.5.0/src_util/VDVH_kernel.cpp +271 -0
- pyqcm-2.5.0/src_util/VDVH_kernel.hpp +33 -0
- pyqcm-2.5.0/src_util/block_matrix.hpp +291 -0
- pyqcm-2.5.0/src_util/cblas.h +856 -0
- pyqcm-2.5.0/src_util/clapack.h +5355 -0
- pyqcm-2.5.0/src_util/f2c.h +437 -0
- pyqcm-2.5.0/src_util/global_parameter.cpp +85 -0
- pyqcm-2.5.0/src_util/global_parameter.hpp +80 -0
- pyqcm-2.5.0/src_util/integrate.cpp +768 -0
- pyqcm-2.5.0/src_util/integrate.hpp +227 -0
- pyqcm-2.5.0/src_util/lapack-blas.h +10 -0
- pyqcm-2.5.0/src_util/matrix.cpp +359 -0
- pyqcm-2.5.0/src_util/matrix.hpp +739 -0
- pyqcm-2.5.0/src_util/parser.cpp +323 -0
- pyqcm-2.5.0/src_util/parser.hpp +84 -0
- pyqcm-2.5.0/src_util/types.hpp +34 -0
- pyqcm-2.5.0/src_util/vector_num.cpp +190 -0
- pyqcm-2.5.0/src_util/vector_num.hpp +287 -0
- pyqcm-2.5.0/tests/README.md +7 -0
- pyqcm-2.5.0/tests/test_all.py +33 -0
- pyqcm-2.5.0/tests/test_diagonalization/S_format.ref +653 -0
- pyqcm-2.5.0/tests/test_diagonalization/S_format_complex.ref +53 -0
- pyqcm-2.5.0/tests/test_diagonalization/cluster_2x2_2C_8b_C2v_L.py +55 -0
- pyqcm-2.5.0/tests/test_diagonalization/common.py +24 -0
- pyqcm-2.5.0/tests/test_diagonalization/model_1D_8.py +18 -0
- pyqcm-2.5.0/tests/test_diagonalization/model_2x2_2C_8b_C2v_L.py +48 -0
- pyqcm-2.5.0/tests/test_diagonalization/test_pole_distribution.py +78 -0
- pyqcm-2.5.0/tests/test_diagonalization/test_pole_distribution_complex.py +34 -0
- pyqcm-2.5.0/tests/test_files/model_1D.py +39 -0
- pyqcm-2.5.0/tests/test_files/model_1D_2.py +24 -0
- pyqcm-2.5.0/tests/test_files/model_1D_2_4b.py +98 -0
- pyqcm-2.5.0/tests/test_files/model_1D_4.py +24 -0
- pyqcm-2.5.0/tests/test_files/model_1D_4_C2.py +18 -0
- pyqcm-2.5.0/tests/test_files/model_2x2_C2.py +39 -0
- pyqcm-2.5.0/tests/test_files/model_2x2_C2_vca.py +39 -0
- pyqcm-2.5.0/tests/test_files/model_G4_6b_2C.py +40 -0
- pyqcm-2.5.0/tests/test_files/model_WSM.py +21 -0
- pyqcm-2.5.0/tests/test_files/model_graphene_bath.py +60 -0
- pyqcm-2.5.0/tests/test_files/model_hartree.py +16 -0
- pyqcm-2.5.0/tests/test_files/record_2x2.py +93 -0
- pyqcm-2.5.0/tests/test_files/record_2x2_8b.py +240 -0
- pyqcm-2.5.0/tests/test_files/record_2x2_anom.py +388 -0
- pyqcm-2.5.0/tests/test_files/record_WSM.py +140 -0
- pyqcm-2.5.0/tests/test_files/record_WSM2.py +381 -0
- pyqcm-2.5.0/tests/test_files/record_spin.py +134 -0
- pyqcm-2.5.0/tests/test_files/test_2clusters.py +81 -0
- pyqcm-2.5.0/tests/test_files/test_CF.py +78 -0
- pyqcm-2.5.0/tests/test_files/test_averages.py +33 -0
- pyqcm-2.5.0/tests/test_files/test_averages_bath.py +26 -0
- pyqcm-2.5.0/tests/test_files/test_berry.py +59 -0
- pyqcm-2.5.0/tests/test_files/test_cdmft.py +46 -0
- pyqcm-2.5.0/tests/test_files/test_cdmft_hartree.py +53 -0
- pyqcm-2.5.0/tests/test_files/test_cluster_average.py +27 -0
- pyqcm-2.5.0/tests/test_files/test_controlled_loop.py +44 -0
- pyqcm-2.5.0/tests/test_files/test_draw.py +30 -0
- pyqcm-2.5.0/tests/test_files/test_fidelity.py +46 -0
- pyqcm-2.5.0/tests/test_files/test_fixed_density_loop.py +37 -0
- pyqcm-2.5.0/tests/test_files/test_hartree.py +65 -0
- pyqcm-2.5.0/tests/test_files/test_hybridization.py +20 -0
- pyqcm-2.5.0/tests/test_files/test_instances.py +21 -0
- pyqcm-2.5.0/tests/test_files/test_mixing.py +61 -0
- pyqcm-2.5.0/tests/test_files/test_mixing2.py +52 -0
- pyqcm-2.5.0/tests/test_files/test_mixing_cf.py +62 -0
- pyqcm-2.5.0/tests/test_files/test_reset.py +73 -0
- pyqcm-2.5.0/tests/test_files/test_spectral.py +106 -0
- pyqcm-2.5.0/tests/test_files/test_varia.py +23 -0
- pyqcm-2.5.0/tests/test_files/test_vca.py +54 -0
- pyqcm-2.5.0/tests/test_files/test_vca_MPI.py +31 -0
- pyqcm-2.5.0/tests/test_files/test_write.py +22 -0
pyqcm-2.5.0/.gitignore
ADDED
|
@@ -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,316 @@
|
|
|
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
|
+
set(GIT_DESCRIBE_CMD "")
|
|
42
|
+
execute_process(
|
|
43
|
+
COMMAND git describe --abbrev=0
|
|
44
|
+
COMMAND tr -d 'v'
|
|
45
|
+
OUTPUT_VARIABLE GIT_DESCRIBE_VERSION
|
|
46
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
47
|
+
)
|
|
48
|
+
message(STATUS "QCM_WED version: ${GIT_DESCRIBE_VERSION}")
|
|
49
|
+
project(qcm LANGUAGES C CXX VERSION ${GIT_DESCRIBE_VERSION} DESCRIPTION "Quantum Cluster Methods shared library")
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
if(NOT CMAKE_BUILD_TYPE)
|
|
53
|
+
set(CMAKE_BUILD_TYPE Release)
|
|
54
|
+
endif()
|
|
55
|
+
|
|
56
|
+
# specify the C++ standard
|
|
57
|
+
set(CMAKE_CXX_STANDARD 14)
|
|
58
|
+
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
|
59
|
+
|
|
60
|
+
message(STATUS "Host processor : ${CMAKE_HOST_SYSTEM_PROCESSOR}")
|
|
61
|
+
message(STATUS "Architecture: ${ARCHITECTURE}")
|
|
62
|
+
|
|
63
|
+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
|
64
|
+
set(CMAKE_CXX_FLAGS_DEBUG "-g ")
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
#------------------
|
|
68
|
+
# Compilation option (optimisation)
|
|
69
|
+
#------------------
|
|
70
|
+
|
|
71
|
+
if(CMAKE_CXX_COMPILER_ID MATCHES Intel)
|
|
72
|
+
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -xHost -funroll-loops")
|
|
73
|
+
#elseif(CMAKE_CXX_COMPILER_ID MATCHES Clang OR CMAKE_CXX_COMPILER_ID MATCHES GNU)
|
|
74
|
+
else()
|
|
75
|
+
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -ftree-vectorize -funroll-loops")
|
|
76
|
+
include(CheckCXXCompilerFlag)
|
|
77
|
+
if (NOT GENERIC_BUILD)
|
|
78
|
+
CHECK_CXX_COMPILER_FLAG("-march=native" NATIVE_ARCH_BUILD)
|
|
79
|
+
if (NATIVE_ARCH_BUILD)
|
|
80
|
+
message(STATUS "Target this machine architecture (enable -march=native)")
|
|
81
|
+
set(CMAKE_CXX_FLAGS_RELEASE "-march=native ${CMAKE_CXX_FLAGS_RELEASE}")
|
|
82
|
+
endif()
|
|
83
|
+
endif()
|
|
84
|
+
endif()
|
|
85
|
+
|
|
86
|
+
if(QCM_DEBUG)
|
|
87
|
+
add_definitions(-DQCM_DEBUG)
|
|
88
|
+
endif()
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
#------------------
|
|
92
|
+
# Define target
|
|
93
|
+
#------------------
|
|
94
|
+
|
|
95
|
+
add_library(qcm SHARED
|
|
96
|
+
src_qcm/CPT.cpp
|
|
97
|
+
src_qcm/Chern.cpp
|
|
98
|
+
src_qcm/QCM.cpp
|
|
99
|
+
src_qcm/average.cpp
|
|
100
|
+
src_qcm/basis3D.cpp
|
|
101
|
+
src_qcm/lattice3D.cpp
|
|
102
|
+
src_qcm/lattice_model.cpp
|
|
103
|
+
src_qcm/lattice_model_instance.cpp
|
|
104
|
+
src_qcm/lattice_operator.cpp
|
|
105
|
+
src_qcm/parameter_set.cpp
|
|
106
|
+
src_qcm/profile.cpp
|
|
107
|
+
src_ed/ED_basis.cpp
|
|
108
|
+
src_ed/Operators/Heisenberg_operator.cpp
|
|
109
|
+
src_ed/Operators/Hund_operator.cpp
|
|
110
|
+
src_ed/Hamiltonian/PRIMME_solver.cpp
|
|
111
|
+
src_ed/Hamiltonian/Lanczos.cpp
|
|
112
|
+
src_ed/binary_state.cpp
|
|
113
|
+
src_ed/continued_fraction.cpp
|
|
114
|
+
src_ed/continued_fraction_set.cpp
|
|
115
|
+
src_ed/Operators/destruction_operator.cpp
|
|
116
|
+
src_ed/model.cpp
|
|
117
|
+
src_ed/model_instance.cpp
|
|
118
|
+
src_ed/model_instance_base.cpp
|
|
119
|
+
src_ed/qcm_ED.cpp
|
|
120
|
+
src_ed/sector.cpp
|
|
121
|
+
src_ed/symmetry_group.cpp
|
|
122
|
+
src_python/common_Py.cpp
|
|
123
|
+
src_python/qcm_lib.cpp
|
|
124
|
+
src_util/ED_global_parameter.cpp
|
|
125
|
+
src_util/global_parameter.cpp
|
|
126
|
+
src_util/integrate.cpp
|
|
127
|
+
src_util/matrix.cpp
|
|
128
|
+
src_util/parser.cpp
|
|
129
|
+
src_util/VDVH_kernel.cpp
|
|
130
|
+
src_util/vector_num.cpp
|
|
131
|
+
)
|
|
132
|
+
|
|
133
|
+
set_target_properties(qcm PROPERTIES VERSION ${PROJECT_VERSION} PREFIX "" SUFFIX ".so")
|
|
134
|
+
|
|
135
|
+
#------------------
|
|
136
|
+
# Python components
|
|
137
|
+
#------------------
|
|
138
|
+
find_package(Python3 3.7 COMPONENTS Interpreter Development NumPy REQUIRED)
|
|
139
|
+
message(STATUS "python executable: ${Python3_EXECUTABLE}")
|
|
140
|
+
message(STATUS "python include dir: ${Python3_INCLUDE_DIRS}")
|
|
141
|
+
message(STATUS "python libs: ${Python3_LIBRARIES}")
|
|
142
|
+
set(NUMPY_INCLUDE_DIR ${Python3_NumPy_INCLUDE_DIRS})
|
|
143
|
+
message(STATUS "numpy dir : ${NUMPY_INCLUDE_DIR}")
|
|
144
|
+
|
|
145
|
+
if(SKBUILD)
|
|
146
|
+
message(STATUS "this is built with SciKit-build")
|
|
147
|
+
else()
|
|
148
|
+
execute_process (COMMAND ${Python3_EXECUTABLE} -c "import numpy; print(numpy.get_include())" OUTPUT_VARIABLE NUMPY_INCLUDE_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
149
|
+
endif()
|
|
150
|
+
|
|
151
|
+
#------------------
|
|
152
|
+
# External Dependencies for Hamiltonian
|
|
153
|
+
#------------------
|
|
154
|
+
|
|
155
|
+
if (EIGEN_HAMILTONIAN)
|
|
156
|
+
find_package(Eigen3 REQUIRED)
|
|
157
|
+
target_include_directories(qcm PUBLIC ${EIGEN3_INCLUDE_DIR})
|
|
158
|
+
message(STATUS "Compile with Eigen Hamiltonian format 'E'")
|
|
159
|
+
message(STATUS "Eigen3 directory: ${EIGEN3_INCLUDE_DIR}")
|
|
160
|
+
add_compile_definitions(EIGEN_HAMILTONIAN)
|
|
161
|
+
endif()
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
#------------------
|
|
165
|
+
# PRIMME Eigensolver
|
|
166
|
+
#------------------
|
|
167
|
+
|
|
168
|
+
if (WITH_PRIMME)
|
|
169
|
+
if (NOT EIGEN_HAMILTONIAN)
|
|
170
|
+
message(FATAL_ERROR "PRIMME eigensolver require qcm_wed to be build with Eigen Hamiltonian. Add -DEIGEN_HAMILTONIAN=1 to CMake.")
|
|
171
|
+
endif()
|
|
172
|
+
if (DOWNLOAD_PRIMME)
|
|
173
|
+
include(ExternalProject)
|
|
174
|
+
set(CMD_MAKE_PRIMME "make")
|
|
175
|
+
list(APPEND CMD_MAKE_PRIMME "lib")
|
|
176
|
+
list(APPEND CMD_MAKE_PRIMME "CC=${CMAKE_C_COMPILER}" "CFLAGS=${CMAKE_CXX_FLAGS_RELEASE} -fPIC -DNDEBUG")
|
|
177
|
+
ExternalProject_Add(PRIMME
|
|
178
|
+
PREFIX ${CMAKE_SOURCE_DIR}/external
|
|
179
|
+
SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/primme
|
|
180
|
+
URL https://github.com/primme/primme/archive/refs/tags/v3.2.tar.gz
|
|
181
|
+
URL_HASH MD5=b26968d0ea8aa2e6feefc89f3c863062
|
|
182
|
+
CONFIGURE_COMMAND COMMAND ""
|
|
183
|
+
BUILD_COMMAND COMMAND ${CMD_MAKE_PRIMME}
|
|
184
|
+
BUILD_IN_SOURCE 1
|
|
185
|
+
INSTALL_COMMAND ""
|
|
186
|
+
STEP_TARGETS build
|
|
187
|
+
BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/external/primme/lib/libprimme.a
|
|
188
|
+
)
|
|
189
|
+
add_dependencies(qcm PRIMME)
|
|
190
|
+
set(PRIMME_LIBRARY ${CMAKE_SOURCE_DIR}/external/primme/lib/libprimme.a)
|
|
191
|
+
else()
|
|
192
|
+
find_library(
|
|
193
|
+
PRIMME_LIBRARY REQUIRED
|
|
194
|
+
NAMES libprimme.a
|
|
195
|
+
HINTS "/usr/local/lib" ${PRIMME_DIR}/lib "${CMAKE_SOURCE_DIR}/external/primme/lib"
|
|
196
|
+
)
|
|
197
|
+
endif()
|
|
198
|
+
get_filename_component(PRIMME_DIR ${PRIMME_LIBRARY} DIRECTORY)
|
|
199
|
+
set(PRIMME_DIR "${PRIMME_DIR}/..")
|
|
200
|
+
add_compile_definitions(WITH_PRIMME)
|
|
201
|
+
message(STATUS "PRIMME_DIR: ${PRIMME_DIR}")
|
|
202
|
+
message(STATUS "PRIMME lib: ${PRIMME_LIBRARY}")
|
|
203
|
+
endif()
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
#------------------
|
|
207
|
+
# BLAS / LAPACK
|
|
208
|
+
#------------------
|
|
209
|
+
|
|
210
|
+
include(FindLAPACK REQUIRED)
|
|
211
|
+
message(STATUS "LAPACK lib: ${LAPACK_LIBRARIES}")
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
#------------------
|
|
215
|
+
# Cuba library
|
|
216
|
+
#------------------
|
|
217
|
+
|
|
218
|
+
if (DOWNLOAD_CUBA)
|
|
219
|
+
include(ExternalProject)
|
|
220
|
+
ExternalProject_Add(Cuba
|
|
221
|
+
PREFIX ${CMAKE_SOURCE_DIR}/external
|
|
222
|
+
SOURCE_DIR ${CMAKE_SOURCE_DIR}/external/cuba
|
|
223
|
+
URL https://feynarts.de/cuba/Cuba-4.2.2.tar.gz
|
|
224
|
+
URL_HASH MD5=a92897343027893ba2ec40dc15558b32
|
|
225
|
+
CONFIGURE_COMMAND COMMAND ${CMAKE_SOURCE_DIR}/external/cuba/configure "CFLAGS=${CMAKE_CXX_FLAGS_RELEASE} -fPIC" "CC=${CMAKE_C_COMPILER}"
|
|
226
|
+
BUILD_COMMAND COMMAND make "lib"
|
|
227
|
+
BUILD_IN_SOURCE 1
|
|
228
|
+
INSTALL_COMMAND ""
|
|
229
|
+
STEP_TARGETS build
|
|
230
|
+
BUILD_BYPRODUCTS ${CMAKE_SOURCE_DIR}/external/cuba/libcuba.a
|
|
231
|
+
)
|
|
232
|
+
add_dependencies(qcm Cuba)
|
|
233
|
+
set(CUBA_LIBRARY ${CMAKE_SOURCE_DIR}/external/cuba/libcuba.a)
|
|
234
|
+
else()
|
|
235
|
+
find_library(CUBA_LIBRARY
|
|
236
|
+
NAMES libcuba.a
|
|
237
|
+
HINTS "${CUBA_DIR}" "/usr/local/lib" "$ENV{HOME}/lib" "${CMAKE_SOURCE_DIR}/external/cuba/"
|
|
238
|
+
)
|
|
239
|
+
endif()
|
|
240
|
+
|
|
241
|
+
get_filename_component(CUBA_DIR ${CUBA_LIBRARY} DIRECTORY)
|
|
242
|
+
message(STATUS "CUBA lib: ${CUBA_LIBRARY}")
|
|
243
|
+
message(STATUS "CUBA dir: ${CUBA_DIR}")
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
#-----------------------------------------------
|
|
247
|
+
# Optimized kernel for Green function evaluation
|
|
248
|
+
#-----------------------------------------------
|
|
249
|
+
if (GENERIC_BUILD)
|
|
250
|
+
set( WITH_GF_OPT_KERNEL OFF)
|
|
251
|
+
message(WARNING "Generic build cannot use AVX2 optimized kernel for Green function evaluation. Setting WITH_GF_OPT_KERNEL to false")
|
|
252
|
+
endif()
|
|
253
|
+
if (WITH_GF_OPT_KERNEL)
|
|
254
|
+
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/external" ${CMAKE_MODULE_PATH} )
|
|
255
|
+
include(FindAVX2)
|
|
256
|
+
if (AVX2_FOUND)
|
|
257
|
+
add_compile_definitions(HAVE_AVX2)
|
|
258
|
+
else()
|
|
259
|
+
message(WARNING "WITH_GF_KERNEL specified but the host processor does not have AVX2 capability: optimized kernel will not be used.")
|
|
260
|
+
set(AVX2_FOUND false)
|
|
261
|
+
endif()
|
|
262
|
+
message(STATUS "Using AVX2 optimized kernel for Green function evaluation: ${AVX2_FOUND}")
|
|
263
|
+
endif()
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
#------------------
|
|
267
|
+
# Parallelization using OpenMP
|
|
268
|
+
#------------------
|
|
269
|
+
|
|
270
|
+
if (USE_OPENMP)
|
|
271
|
+
if (APPLE)
|
|
272
|
+
#Let's try once
|
|
273
|
+
find_package(OpenMP)
|
|
274
|
+
#If can't be find automatically
|
|
275
|
+
if (NOT OpenMP_FOUND)
|
|
276
|
+
if (NOT ${APPLE_LIBOMP_PREFIX})
|
|
277
|
+
execute_process(COMMAND brew --prefix libomp
|
|
278
|
+
OUTPUT_VARIABLE APPLE_LIBOMP_PREFIX
|
|
279
|
+
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
|
280
|
+
endif()
|
|
281
|
+
message(STATUS "Apple OpenMP library: ${APPLE_LIBOMP_PREFIX}")
|
|
282
|
+
#OpenMP_C
|
|
283
|
+
set(OpenMP_C_FLAGS "-Xpreprocessor -fopenmp -I${APPLE_LIBOMP_PREFIX}/include")
|
|
284
|
+
set(OpenMP_C_LIB_NAMES "omp")
|
|
285
|
+
#OpenMP_CXX
|
|
286
|
+
set(OpenMP_CXX_FLAGS "-Xpreprocessor -fopenmp -I${APPLE_LIBOMP_PREFIX}/include")
|
|
287
|
+
set(OpenMP_CXX_LIB_NAMES "omp")
|
|
288
|
+
#OpenMP libs name
|
|
289
|
+
set(OpenMP_omp_LIBRARY "${APPLE_LIBOMP_PREFIX}/lib/libomp.dylib")
|
|
290
|
+
find_package(OpenMP REQUIRED)
|
|
291
|
+
endif()
|
|
292
|
+
else()
|
|
293
|
+
find_package(OpenMP REQUIRED)
|
|
294
|
+
endif()
|
|
295
|
+
endif()
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
#------------------
|
|
299
|
+
# Link dependencies
|
|
300
|
+
#------------------
|
|
301
|
+
|
|
302
|
+
target_link_libraries(qcm ${Python3_LIBRARIES} ${LAPACK_LIBRARIES} ${CUBA_LIBRARY} ${PRIMME_LIBRARY} OpenMP::OpenMP_CXX)
|
|
303
|
+
|
|
304
|
+
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)
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
#------------------
|
|
308
|
+
# Install targets
|
|
309
|
+
#------------------
|
|
310
|
+
# Be sure to install in the pyqcm folder
|
|
311
|
+
if (NOT CMAKE_INSTALL_PREFIX)
|
|
312
|
+
set(CMAKE_INSTALL_PREFIX ${CMAKE_SOURCE_DIR})
|
|
313
|
+
endif()
|
|
314
|
+
# install(TARGETS qcm DESTINATION ${PYTHON_INCLUDE_DIR}/site-packages)
|
|
315
|
+
# install(TARGETS qcm DESTINATION ${CMAKE_SOURCE_DIR}/pyqcm)
|
|
316
|
+
install(TARGETS qcm DESTINATION pyqcm)
|
pyqcm-2.5.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
|
+
|