quant-met 0.0.17__tar.gz → 0.0.18__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 (280) hide show
  1. {quant_met-0.0.17 → quant_met-0.0.18}/CHANGELOG.rst +10 -0
  2. {quant_met-0.0.17 → quant_met-0.0.18}/PKG-INFO +1 -1
  3. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/example_input_scf.yaml +4 -2
  4. {quant_met-0.0.17 → quant_met-0.0.18}/pyproject.toml +1 -1
  5. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/cli/scf.py +27 -3
  6. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/__init__.py +0 -2
  7. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/hamiltonians/base_hamiltonian.py +111 -2
  8. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/hamiltonians/dressed_graphene.py +1 -1
  9. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/quantum_metric.py +1 -1
  10. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/parameters/main.py +1 -0
  11. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_benchmarks.py +3 -3
  12. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_cli.py +33 -14
  13. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_plotting.py +2 -0
  14. quant_met-0.0.18/tests/test_superfluid_weight/test_superfluid_weight_dressed_graphene.npz +0 -0
  15. quant_met-0.0.18/tests/test_superfluid_weight/test_superfluid_weight_graphene.npz +0 -0
  16. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_superfluid_weight.py +4 -5
  17. {quant_met-0.0.17 → quant_met-0.0.18}/uv.lock +1 -1
  18. quant_met-0.0.17/src/quant_met/mean_field/superfluid_weight.py +0 -126
  19. quant_met-0.0.17/tests/test_superfluid_weight/test_superfluid_weight_dressed_graphene.npz +0 -0
  20. quant_met-0.0.17/tests/test_superfluid_weight/test_superfluid_weight_graphene.npz +0 -0
  21. {quant_met-0.0.17 → quant_met-0.0.18}/.coveragerc +0 -0
  22. {quant_met-0.0.17 → quant_met-0.0.18}/.github/dependabot.yml +0 -0
  23. {quant_met-0.0.17 → quant_met-0.0.18}/.github/workflows/check_version.yml +0 -0
  24. {quant_met-0.0.17 → quant_met-0.0.18}/.github/workflows/codspeed.yml +0 -0
  25. {quant_met-0.0.17 → quant_met-0.0.18}/.github/workflows/integration_tests.yml +0 -0
  26. {quant_met-0.0.17 → quant_met-0.0.18}/.github/workflows/publish.yml +0 -0
  27. {quant_met-0.0.17 → quant_met-0.0.18}/.github/workflows/unit_tests.yml +0 -0
  28. {quant_met-0.0.17 → quant_met-0.0.18}/.gitignore +0 -0
  29. {quant_met-0.0.17 → quant_met-0.0.18}/.pre-commit-config.yaml +0 -0
  30. {quant_met-0.0.17 → quant_met-0.0.18}/.readthedocs.yaml +0 -0
  31. {quant_met-0.0.17 → quant_met-0.0.18}/LICENSE.txt +0 -0
  32. {quant_met-0.0.17 → quant_met-0.0.18}/LICENSES/MIT.txt +0 -0
  33. {quant_met-0.0.17 → quant_met-0.0.18}/Makefile +0 -0
  34. {quant_met-0.0.17 → quant_met-0.0.18}/README.md +0 -0
  35. {quant_met-0.0.17 → quant_met-0.0.18}/changelog.d/scriv.ini +0 -0
  36. {quant_met-0.0.17 → quant_met-0.0.18}/check_version.sh +0 -0
  37. {quant_met-0.0.17 → quant_met-0.0.18}/docs/Makefile +0 -0
  38. {quant_met-0.0.17 → quant_met-0.0.18}/docs/make.bat +0 -0
  39. {quant_met-0.0.17 → quant_met-0.0.18}/docs/requirements.txt +0 -0
  40. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/_static/custom.css +0 -0
  41. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/_templates/autosummary/attribute.rst +0 -0
  42. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/_templates/autosummary/class.rst +0 -0
  43. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/_templates/autosummary/function.rst +0 -0
  44. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/_templates/autosummary/method.rst +0 -0
  45. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/_templates/autosummary/module.rst +0 -0
  46. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/_templates/autosummary/property.rst +0 -0
  47. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/_templates/autosummary/pydantic.rst +0 -0
  48. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/changelog.rst +0 -0
  49. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/conf.py +0 -0
  50. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/development.rst +0 -0
  51. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/example_input_T_C.yaml +0 -0
  52. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/example_input_T_C_one_band.yaml +0 -0
  53. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/examples/band_structures.ipynb +0 -0
  54. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/examples/band_structures.ipynb.license +0 -0
  55. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/extra/versions.json +0 -0
  56. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/extra/versions.json.license +0 -0
  57. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/index.rst +0 -0
  58. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/cli.rst +0 -0
  59. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.bdg_hamiltonian.rst +0 -0
  60. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.bdg_hamiltonian_derivative.rst +0 -0
  61. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.calculate_bandstructure.rst +0 -0
  62. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.calculate_density_of_states.rst +0 -0
  63. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.calculate_spectral_gap.rst +0 -0
  64. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.diagonalize_bdg.rst +0 -0
  65. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.diagonalize_nonint.rst +0 -0
  66. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.from_file.rst +0 -0
  67. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.gap_equation.rst +0 -0
  68. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.get_parameters_model.rst +0 -0
  69. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.hamiltonian.rst +0 -0
  70. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.hamiltonian_derivative.rst +0 -0
  71. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.rst +0 -0
  72. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.save.rst +0 -0
  73. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.BaseHamiltonian.setup_lattice.rst +0 -0
  74. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.bdg_hamiltonian.rst +0 -0
  75. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.bdg_hamiltonian_derivative.rst +0 -0
  76. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.calculate_bandstructure.rst +0 -0
  77. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.calculate_density_of_states.rst +0 -0
  78. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.calculate_spectral_gap.rst +0 -0
  79. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.diagonalize_bdg.rst +0 -0
  80. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.diagonalize_nonint.rst +0 -0
  81. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.from_file.rst +0 -0
  82. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.gap_equation.rst +0 -0
  83. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.get_parameters_model.rst +0 -0
  84. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.hamiltonian.rst +0 -0
  85. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.hamiltonian_derivative.rst +0 -0
  86. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.rst +0 -0
  87. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.save.rst +0 -0
  88. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.DressedGraphene.setup_lattice.rst +0 -0
  89. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.bdg_hamiltonian.rst +0 -0
  90. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.bdg_hamiltonian_derivative.rst +0 -0
  91. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.calculate_bandstructure.rst +0 -0
  92. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.calculate_density_of_states.rst +0 -0
  93. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.calculate_spectral_gap.rst +0 -0
  94. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.diagonalize_bdg.rst +0 -0
  95. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.diagonalize_nonint.rst +0 -0
  96. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.from_file.rst +0 -0
  97. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.gap_equation.rst +0 -0
  98. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.get_parameters_model.rst +0 -0
  99. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.hamiltonian.rst +0 -0
  100. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.hamiltonian_derivative.rst +0 -0
  101. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.rst +0 -0
  102. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.save.rst +0 -0
  103. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.Graphene.setup_lattice.rst +0 -0
  104. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.bdg_hamiltonian.rst +0 -0
  105. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.bdg_hamiltonian_derivative.rst +0 -0
  106. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.calculate_bandstructure.rst +0 -0
  107. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.calculate_density_of_states.rst +0 -0
  108. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.calculate_spectral_gap.rst +0 -0
  109. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.diagonalize_bdg.rst +0 -0
  110. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.diagonalize_nonint.rst +0 -0
  111. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.from_file.rst +0 -0
  112. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.gap_equation.rst +0 -0
  113. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.get_parameters_model.rst +0 -0
  114. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.hamiltonian.rst +0 -0
  115. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.hamiltonian_derivative.rst +0 -0
  116. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.rst +0 -0
  117. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.save.rst +0 -0
  118. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.OneBand.setup_lattice.rst +0 -0
  119. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.bdg_hamiltonian.rst +0 -0
  120. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.bdg_hamiltonian_derivative.rst +0 -0
  121. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.calculate_bandstructure.rst +0 -0
  122. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.calculate_density_of_states.rst +0 -0
  123. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.calculate_spectral_gap.rst +0 -0
  124. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.diagonalize_bdg.rst +0 -0
  125. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.diagonalize_nonint.rst +0 -0
  126. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.from_file.rst +0 -0
  127. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.gap_equation.rst +0 -0
  128. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.get_parameters_model.rst +0 -0
  129. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.hamiltonian.rst +0 -0
  130. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.hamiltonian_derivative.rst +0 -0
  131. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.rst +0 -0
  132. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.save.rst +0 -0
  133. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.ThreeBand.setup_lattice.rst +0 -0
  134. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.bdg_hamiltonian.rst +0 -0
  135. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.bdg_hamiltonian_derivative.rst +0 -0
  136. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.calculate_bandstructure.rst +0 -0
  137. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.calculate_density_of_states.rst +0 -0
  138. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.calculate_spectral_gap.rst +0 -0
  139. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.diagonalize_bdg.rst +0 -0
  140. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.diagonalize_nonint.rst +0 -0
  141. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.from_file.rst +0 -0
  142. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.gap_equation.rst +0 -0
  143. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.get_parameters_model.rst +0 -0
  144. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.hamiltonian.rst +0 -0
  145. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.hamiltonian_derivative.rst +0 -0
  146. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.rst +0 -0
  147. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.save.rst +0 -0
  148. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/hamiltonians/quant_met.mean_field.hamiltonians.TwoBand.setup_lattice.rst +0 -0
  149. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/parameters/hamiltonians/quant_met.parameters.hamiltonians.DressedGrapheneParameters.rst +0 -0
  150. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/parameters/hamiltonians/quant_met.parameters.hamiltonians.GrapheneParameters.rst +0 -0
  151. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/parameters/hamiltonians/quant_met.parameters.hamiltonians.HamiltonianParameters.rst +0 -0
  152. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/parameters/hamiltonians/quant_met.parameters.hamiltonians.OneBandParameters.rst +0 -0
  153. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/parameters/hamiltonians/quant_met.parameters.hamiltonians.ThreeBandParameters.rst +0 -0
  154. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/parameters/hamiltonians/quant_met.parameters.hamiltonians.TwoBandParameters.rst +0 -0
  155. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/parameters/hamiltonians/quant_met.parameters.hamiltonians.rst +0 -0
  156. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/parameters/quant_met.parameters.Control.rst +0 -0
  157. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/parameters/quant_met.parameters.KPoints.rst +0 -0
  158. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/parameters/quant_met.parameters.Parameters.rst +0 -0
  159. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.cli.cli.rst +0 -0
  160. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.BaseLattice.bz_corners.rst +0 -0
  161. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.BaseLattice.generate_bz_grid.rst +0 -0
  162. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.BaseLattice.generate_high_symmetry_path.rst +0 -0
  163. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.BaseLattice.high_symmetry_points.rst +0 -0
  164. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.BaseLattice.lattice_constant.rst +0 -0
  165. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.BaseLattice.reciprocal_basis.rst +0 -0
  166. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.BaseLattice.rst +0 -0
  167. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.GrapheneLattice.bz_corners.rst +0 -0
  168. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.GrapheneLattice.generate_bz_grid.rst +0 -0
  169. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.GrapheneLattice.generate_high_symmetry_path.rst +0 -0
  170. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.GrapheneLattice.high_symmetry_points.rst +0 -0
  171. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.GrapheneLattice.lattice_constant.rst +0 -0
  172. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.GrapheneLattice.reciprocal_basis.rst +0 -0
  173. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.GrapheneLattice.rst +0 -0
  174. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.SquareLattice.bz_corners.rst +0 -0
  175. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.SquareLattice.generate_bz_grid.rst +0 -0
  176. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.SquareLattice.generate_high_symmetry_path.rst +0 -0
  177. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.SquareLattice.high_symmetry_points.rst +0 -0
  178. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.SquareLattice.lattice_constant.rst +0 -0
  179. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.SquareLattice.reciprocal_basis.rst +0 -0
  180. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.SquareLattice.rst +0 -0
  181. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.geometry.generate_bz_path.rst +0 -0
  182. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.mean_field.hamiltonians.rst +0 -0
  183. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.mean_field.quantum_metric.rst +0 -0
  184. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.mean_field.search_crit_temp.rst +0 -0
  185. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.mean_field.self_consistency_loop.rst +0 -0
  186. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.mean_field.superfluid_weight.rst +0 -0
  187. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.plotting.format_plot.rst +0 -0
  188. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.plotting.plot_bandstructure.rst +0 -0
  189. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.plotting.plot_superfluid_weight.rst +0 -0
  190. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.plotting.scatter_into_bz.rst +0 -0
  191. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/generated/quant_met.utils.generate_uniform_grid.rst +0 -0
  192. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/geometry.rst +0 -0
  193. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/index.rst +0 -0
  194. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/mean_field.rst +0 -0
  195. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/parameters.rst +0 -0
  196. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/plotting.rst +0 -0
  197. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/reference/utils.rst +0 -0
  198. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/user_guide/first-scf.rst +0 -0
  199. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/user_guide/search_T_C.rst +0 -0
  200. {quant_met-0.0.17 → quant_met-0.0.18}/docs/source/user_guide.rst +0 -0
  201. {quant_met-0.0.17 → quant_met-0.0.18}/environment.yml +0 -0
  202. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/__init__.py +0 -0
  203. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/cli/__init__.py +0 -0
  204. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/cli/_utils.py +0 -0
  205. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/cli/crit_temp.py +0 -0
  206. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/cli/main.py +0 -0
  207. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/geometry/__init__.py +0 -0
  208. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/geometry/base_lattice.py +0 -0
  209. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/geometry/bz_path.py +0 -0
  210. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/geometry/graphene.py +0 -0
  211. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/geometry/square.py +0 -0
  212. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/_utils.py +0 -0
  213. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/hamiltonians/__init__.py +0 -0
  214. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/hamiltonians/graphene.py +0 -0
  215. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/hamiltonians/one_band_tight_binding.py +0 -0
  216. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/hamiltonians/three_band_tight_binding.py +0 -0
  217. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/hamiltonians/two_band_tight_binding.py +0 -0
  218. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/search_crit_temp.py +0 -0
  219. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/mean_field/self_consistency.py +0 -0
  220. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/parameters/__init__.py +0 -0
  221. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/parameters/hamiltonians.py +0 -0
  222. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/plotting/__init__.py +0 -0
  223. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/plotting/plotting.py +0 -0
  224. {quant_met-0.0.17 → quant_met-0.0.18}/src/quant_met/utils.py +0 -0
  225. {quant_met-0.0.17 → quant_met-0.0.18}/tests/__init__.py +0 -0
  226. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/nonint_bandstructure_dressed_graphene.png +0 -0
  227. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/nonint_bandstructure_dressed_graphene.png.license +0 -0
  228. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/nonint_bandstructure_graphene.png +0 -0
  229. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/nonint_bandstructure_graphene.png.license +0 -0
  230. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/nonint_bandstructure_one_band.png +0 -0
  231. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/nonint_bandstructure_one_band.png.license +0 -0
  232. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/scatter_into_bz.png +0 -0
  233. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/scatter_into_bz.png.license +0 -0
  234. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/scatter_into_bz_with_data.png +0 -0
  235. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/scatter_into_bz_with_data.png.license +0 -0
  236. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/sf_weight.png +0 -0
  237. {quant_met-0.0.17 → quant_met-0.0.18}/tests/baseline_images/test_plotting/sf_weight.png.license +0 -0
  238. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_geometry.py +0 -0
  239. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/__init__.py +0 -0
  240. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_fixed_values.py +0 -0
  241. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_invalid_values.py +0 -0
  242. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_random_samples.py +0 -0
  243. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_bdg_hamiltonian_derivative_graphene.npz +0 -0
  244. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_bdg_hamiltonian_derivative_graphene.npz.license +0 -0
  245. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_current.npz +0 -0
  246. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_current.npz.license +0 -0
  247. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_density_of_states.npz +0 -0
  248. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_density_of_states.npz.license +0 -0
  249. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_free_energy.npz +0 -0
  250. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_free_energy.npz.license +0 -0
  251. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_hamiltonian_derivative_graphene.npz +0 -0
  252. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_hamiltonian_derivative_graphene.npz.license +0 -0
  253. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_hamiltonian_derivative_one_band.npz +0 -0
  254. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_hamiltonian_derivative_one_band.npz.license +0 -0
  255. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_hamiltonian_three_band.npz +0 -0
  256. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_hamiltonian_three_band.npz.license +0 -0
  257. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_hamiltonian_two_band.npz +0 -0
  258. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_hamiltonian_two_band.npz.license +0 -0
  259. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_spectral_gap.npz +0 -0
  260. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions/test_spectral_gap.npz.license +0 -0
  261. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_regressions.py +0 -0
  262. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_hamiltonians/test_save.py +0 -0
  263. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_integration/__init__.py +0 -0
  264. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_integration/test_crit_temp.py +0 -0
  265. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_integration/test_scf.py +0 -0
  266. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_quantum_metric/test_quantum_metric_bdg_dressed_graphene.npz +0 -0
  267. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_quantum_metric/test_quantum_metric_bdg_dressed_graphene.npz.license +0 -0
  268. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_quantum_metric/test_quantum_metric_bdg_graphene.npz +0 -0
  269. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_quantum_metric/test_quantum_metric_bdg_graphene.npz.license +0 -0
  270. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_quantum_metric/test_quantum_metric_dressed_graphene.npz +0 -0
  271. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_quantum_metric/test_quantum_metric_dressed_graphene.npz.license +0 -0
  272. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_quantum_metric/test_quantum_metric_graphene.npz +0 -0
  273. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_quantum_metric/test_quantum_metric_graphene.npz.license +0 -0
  274. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_quantum_metric.py +0 -0
  275. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_self_consistency.py +0 -0
  276. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_superfluid_weight/test_superfluid_weight_dressed_graphene.npz.license +0 -0
  277. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_superfluid_weight/test_superfluid_weight_graphene.npz.license +0 -0
  278. {quant_met-0.0.17 → quant_met-0.0.18}/tests/test_utils.py +0 -0
  279. {quant_met-0.0.17 → quant_met-0.0.18}/tox.ini +0 -0
  280. {quant_met-0.0.17 → quant_met-0.0.18}/uv.lock.license +0 -0
@@ -1,3 +1,13 @@
1
+
2
+ .. _changelog-0.0.18:
3
+
4
+ 0.0.18 — 2025-01-10
5
+ -------------------
6
+
7
+ Added
8
+ ^^^^^
9
+
10
+ - Control parameter to calculate SC current, superfluid weight and free energy in scf calculation
1
11
  .. SPDX-FileCopyrightText: 2024 Tjark Sievers
2
12
  ..
3
13
  .. SPDX-License-Identifier: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: quant-met
3
- Version: 0.0.17
3
+ Version: 0.0.18
4
4
  Summary: Calculate superconductivity in flat-band systems.
5
5
  Author-email: Tjark Sievers <tsievers@physnet.uni-hamburg.de>
6
6
  License-File: LICENSE.txt
@@ -10,14 +10,16 @@ model:
10
10
  chemical_potential: 0.0
11
11
  hubbard_int_orbital_basis: [1.0, 1.0, 1.0]
12
12
  lattice_constant: 3
13
- q: [0, 0]
13
+ q: [0.0, 0.0]
14
+ beta: 100
14
15
 
15
16
  control:
16
17
  calculation: scf
17
18
  prefix: test
18
19
  outdir: test/
19
20
  conv_treshold: 1e-6
20
- iterations: 1000
21
+ max_iter: 1000
22
+ calculate_additional: true
21
23
 
22
24
  k_points:
23
25
  nk1: 30
@@ -4,7 +4,7 @@
4
4
 
5
5
  [project]
6
6
  name = "quant-met"
7
- version = "0.0.17"
7
+ version = "0.0.18"
8
8
  description = "Calculate superconductivity in flat-band systems."
9
9
  authors = [{name="Tjark Sievers", email="tsievers@physnet.uni-hamburg.de"}]
10
10
  readme = "README.md"
@@ -7,6 +7,8 @@
7
7
  import logging
8
8
  from pathlib import Path
9
9
 
10
+ import h5py
11
+
10
12
  from quant_met import mean_field
11
13
  from quant_met.parameters import Parameters
12
14
 
@@ -28,12 +30,13 @@ def scf(parameters: Parameters) -> None:
28
30
  result_path.mkdir(exist_ok=True, parents=True)
29
31
 
30
32
  h = _hamiltonian_factory(parameters=parameters.model, classname=parameters.model.name)
33
+ k_space_grid = h.lattice.generate_bz_grid(
34
+ ncols=parameters.k_points.nk1, nrows=parameters.k_points.nk2
35
+ )
31
36
 
32
37
  solved_h = mean_field.self_consistency_loop(
33
38
  h=h,
34
- k_space_grid=h.lattice.generate_bz_grid(
35
- ncols=parameters.k_points.nk1, nrows=parameters.k_points.nk2
36
- ),
39
+ k_space_grid=k_space_grid,
37
40
  epsilon=parameters.control.conv_treshold,
38
41
  max_iter=parameters.control.max_iter,
39
42
  )
@@ -44,3 +47,24 @@ def scf(parameters: Parameters) -> None:
44
47
  result_file = result_path / f"{parameters.control.prefix}.hdf5"
45
48
  solved_h.save(filename=result_file)
46
49
  logger.info("Results saved to %s", result_file)
50
+
51
+ if parameters.control.calculate_additional is True:
52
+ logger.info("Calculating additional things.")
53
+ current = solved_h.calculate_current_density(k=k_space_grid)
54
+ free_energy = solved_h.calculate_free_energy(k=k_space_grid)
55
+ sf_weight_conv, sf_weight_geom = solved_h.calculate_superfluid_weight(k=k_space_grid)
56
+
57
+ with h5py.File(result_file, "a") as f:
58
+ f.attrs["current_x"] = current[0]
59
+ f.attrs["current_y"] = current[1]
60
+ f.attrs["free_energy"] = free_energy
61
+ f.attrs["sf_weight_conv_xx"] = sf_weight_conv[0, 0]
62
+ f.attrs["sf_weight_conv_xy"] = sf_weight_conv[0, 1]
63
+ f.attrs["sf_weight_conv_yx"] = sf_weight_conv[1, 0]
64
+ f.attrs["sf_weight_conv_yy"] = sf_weight_conv[1, 1]
65
+ f.attrs["sf_weight_geom_xx"] = sf_weight_geom[0, 0]
66
+ f.attrs["sf_weight_geom_xy"] = sf_weight_geom[0, 1]
67
+ f.attrs["sf_weight_geom_yx"] = sf_weight_geom[1, 0]
68
+ f.attrs["sf_weight_geom_yy"] = sf_weight_geom[1, 1]
69
+
70
+ logger.info("Additional results saved to %s", result_file)
@@ -32,12 +32,10 @@ from quant_met.mean_field import hamiltonians
32
32
  from .quantum_metric import quantum_metric
33
33
  from .search_crit_temp import search_crit_temp
34
34
  from .self_consistency import self_consistency_loop
35
- from .superfluid_weight import superfluid_weight
36
35
 
37
36
  __all__ = [
38
37
  "hamiltonians",
39
38
  "quantum_metric",
40
39
  "search_crit_temp",
41
40
  "self_consistency_loop",
42
- "superfluid_weight",
43
41
  ]
@@ -493,7 +493,7 @@ class BaseHamiltonian(Generic[GenericParameters], ABC):
493
493
  ),
494
494
  ]
495
495
  )
496
- density_of_states = np.zeros(shape=energies.shape, dtype=np.floating)
496
+ density_of_states = np.zeros(shape=energies.shape, dtype=np.float64)
497
497
 
498
498
  for i, energy in enumerate(energies):
499
499
  density_of_states[i] = np.sum(
@@ -612,10 +612,119 @@ class BaseHamiltonian(Generic[GenericParameters], ABC):
612
612
 
613
613
  current[0] = np.sum(matrix_x, axis=None)
614
614
  current[1] = np.sum(matrix_y, axis=None)
615
- assert np.allclose(np.imag(current), 0, atol=1e-14)
615
+ assert np.allclose(np.imag(current), 0, atol=1e-12)
616
616
 
617
617
  return (2 * np.real(current)) / len(k)
618
618
 
619
+ def calculate_superfluid_weight(
620
+ self,
621
+ k: npt.NDArray[np.floating],
622
+ ) -> tuple[npt.NDArray[np.complexfloating], npt.NDArray[np.complexfloating]]:
623
+ """Calculate the superfluid weight.
624
+
625
+ Parameters
626
+ ----------
627
+ h : :class:`~quant_met.mean_field.Hamiltonian`
628
+ Hamiltonian.
629
+ k : :class:`numpy.ndarray`
630
+ List of k points.
631
+
632
+ Returns
633
+ -------
634
+ :class:`numpy.ndarray`
635
+ Conventional contribution to the superfluid weight.
636
+ :class:`numpy.ndarray`
637
+ Geometric contribution to the superfluid weight.
638
+
639
+ """
640
+ s_weight_conv = np.zeros(shape=(2, 2), dtype=np.complex128)
641
+ s_weight_geom = np.zeros(shape=(2, 2), dtype=np.complex128)
642
+
643
+ c_mnpq_cache = {}
644
+
645
+ for i, direction_1 in enumerate(["x", "y"]):
646
+ for j, direction_2 in enumerate(["x", "y"]):
647
+ for k_point in k:
648
+ k_tuple = tuple(k_point)
649
+
650
+ if k_tuple not in c_mnpq_cache:
651
+ c_mnpq_cache[k_tuple] = self._c_factor(k_point)
652
+ c_mnpq = c_mnpq_cache[k_tuple]
653
+
654
+ j_up = self._current_operator(direction_1, k_point)
655
+ j_down = self._current_operator(direction_2, -k_point)
656
+
657
+ for m in range(self.number_of_bands):
658
+ for n in range(self.number_of_bands):
659
+ for p in range(self.number_of_bands):
660
+ for q in range(self.number_of_bands):
661
+ s_weight = c_mnpq[m, n, p, q] * j_up[m, n] * j_down[q, p]
662
+ if m == n and p == q:
663
+ s_weight_conv[i, j] += s_weight
664
+ else:
665
+ s_weight_geom[i, j] += s_weight
666
+
667
+ return s_weight_conv, s_weight_geom
668
+
669
+ def _current_operator(
670
+ self, direction: str, k: npt.NDArray[np.floating]
671
+ ) -> npt.NDArray[np.complexfloating]:
672
+ j = np.zeros(shape=(self.number_of_bands, self.number_of_bands), dtype=np.complex128)
673
+
674
+ _, bloch = self.diagonalize_nonint(k=k)
675
+
676
+ for m in range(self.number_of_bands):
677
+ for n in range(self.number_of_bands):
678
+ j[m, n] = (
679
+ bloch[:, m].conjugate()
680
+ @ self.hamiltonian_derivative(direction=direction, k=k)
681
+ @ bloch[:, n]
682
+ )
683
+
684
+ return j
685
+
686
+ def _c_factor(self, k: npt.NDArray[np.floating]) -> npt.NDArray[np.complexfloating]:
687
+ bdg_energies, bdg_functions = self.diagonalize_bdg(k)
688
+ c_mnpq = np.zeros(
689
+ shape=(
690
+ self.number_of_bands,
691
+ self.number_of_bands,
692
+ self.number_of_bands,
693
+ self.number_of_bands,
694
+ ),
695
+ dtype=np.complex128,
696
+ )
697
+
698
+ for m in range(self.number_of_bands):
699
+ for n in range(self.number_of_bands):
700
+ for p in range(self.number_of_bands):
701
+ for q in range(self.number_of_bands):
702
+ c_tmp: float = 0
703
+ for i in range(2 * self.number_of_bands):
704
+ for j in range(2 * self.number_of_bands):
705
+ if bdg_energies[i] != bdg_energies[j]:
706
+ c_tmp += (
707
+ fermi_dirac(bdg_energies[i], self.beta)
708
+ - fermi_dirac(bdg_energies[j], self.beta)
709
+ ) / (bdg_energies[i] - bdg_energies[j])
710
+ else:
711
+ c_tmp -= _fermi_dirac_derivative()
712
+
713
+ c_tmp *= (
714
+ bdg_functions[i, m].conjugate()
715
+ * bdg_functions[j, n]
716
+ * bdg_functions[j, p].conjugate()
717
+ * bdg_functions[i, q].conjugate()
718
+ )
719
+
720
+ c_mnpq[m, n, p, q] = 2 * c_tmp
721
+
722
+ return c_mnpq
723
+
724
+
725
+ def _fermi_dirac_derivative() -> float:
726
+ return 0
727
+
619
728
 
620
729
  def _gaussian(x: npt.NDArray[np.floating], sigma: float) -> npt.NDArray[np.floating]:
621
730
  gaussian: npt.NDArray[np.floating] = np.exp(-(x**2) / (2 * sigma**2)) / np.sqrt(
@@ -26,7 +26,7 @@ class DressedGraphene(BaseHamiltonian[DressedGrapheneParameters]):
26
26
  self.hubbard_int_orbital_basis = parameters.hubbard_int_orbital_basis
27
27
  self.chemical_potential = parameters.chemical_potential
28
28
  if parameters.delta is not None:
29
- self.delta_orbital_basis = parameters.delta.astype(np.complexfloating)
29
+ self.delta_orbital_basis = parameters.delta.astype(np.complex128)
30
30
 
31
31
  def setup_lattice(self, parameters: DressedGrapheneParameters) -> BaseLattice: # noqa: D102
32
32
  return GrapheneLattice(lattice_constant=parameters.lattice_constant)
@@ -43,7 +43,7 @@ def quantum_metric(
43
43
 
44
44
  number_k_points = len(k)
45
45
 
46
- quantum_geom_tensor = np.zeros(shape=(2, 2), dtype=np.complexfloating)
46
+ quantum_geom_tensor = np.zeros(shape=(2, 2), dtype=np.complex128)
47
47
 
48
48
  for band in bands:
49
49
  for i, direction_1 in enumerate(["x", "y"]):
@@ -39,6 +39,7 @@ class Control(BaseModel):
39
39
  conv_treshold: float
40
40
  max_iter: int = 1000
41
41
  n_temp_points: int = 50
42
+ calculate_additional: bool = False
42
43
 
43
44
 
44
45
  class KPoints(BaseModel):
@@ -1,6 +1,7 @@
1
1
  # SPDX-FileCopyrightText: 2024 Tjark Sievers
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
+
4
5
  import numpy as np
5
6
 
6
7
  from quant_met import mean_field, parameters
@@ -133,7 +134,6 @@ def test_benchmark_superfluid_weight_two_band(benchmark) -> None:
133
134
  )
134
135
  k_space_grid = one_band_h.lattice.generate_bz_grid(ncols=10, nrows=10)
135
136
 
136
- benchmark(lambda: mean_field.superfluid_weight(
137
- h=one_band_h,
137
+ benchmark(lambda: one_band_h.calculate_superfluid_weight(
138
138
  k=k_space_grid)
139
- )
139
+ )
@@ -5,13 +5,13 @@
5
5
  """Tests for the command line interface."""
6
6
 
7
7
  from pathlib import Path
8
- from unittest.mock import MagicMock
8
+ from unittest.mock import Mock, MagicMock
9
9
 
10
10
  import yaml
11
11
  from click.testing import CliRunner
12
12
  from pytest_mock import MockerFixture
13
13
 
14
- from quant_met import mean_field
14
+ from quant_met import mean_field, parameters
15
15
  from quant_met.cli import cli
16
16
 
17
17
 
@@ -82,34 +82,53 @@ def test_crit_temp_mock(tmp_path: Path, mocker: MockerFixture) -> None:
82
82
  def test_scf_mock(tmp_path: Path, mocker: MockerFixture) -> None:
83
83
  """Test scf calculation with mock."""
84
84
  runner = CliRunner()
85
- parameters = {
86
- "model": {
87
- "name": "DressedGraphene",
88
- "hopping_gr": 1,
89
- "hopping_x": 0.01,
90
- "hopping_x_gr_a": 1,
91
- "chemical_potential": 0.0,
92
- "hubbard_int_orbital_basis": [0.0, 0.0, 0.0],
93
- "lattice_constant": 3,
94
- },
85
+ model_parameters = {
86
+ "name": "DressedGraphene",
87
+ "hopping_gr": 1,
88
+ "hopping_x": 0.01,
89
+ "hopping_x_gr_a": 1,
90
+ "chemical_potential": 0.0,
91
+ "hubbard_int_orbital_basis": [0.0, 0.0, 0.0],
92
+ "lattice_constant": 3,
93
+ }
94
+ test_parameters = {
95
+ "model": model_parameters,
95
96
  "control": {
96
97
  "calculation": "scf",
97
98
  "prefix": "test",
98
99
  "outdir": "test/",
99
100
  "beta": 100,
100
101
  "conv_treshold": 1e-2,
102
+ "calculate_additional": True
101
103
  },
102
104
  "k_points": {"nk1": 30, "nk2": 30},
103
105
  }
104
106
  with runner.isolated_filesystem(temp_dir=tmp_path):
105
107
  with Path("input.yaml").open("w") as f:
106
- yaml.dump(parameters, f)
108
+ yaml.dump(test_parameters, f)
107
109
  mock_search_self_consistency_loop = mocker.patch(
108
110
  "quant_met.mean_field.self_consistency_loop"
109
111
  )
110
- mock_search_self_consistency_loop.return_value = MagicMock()
112
+ mock_search_self_consistency_loop.return_value = mean_field.hamiltonians.DressedGraphene(
113
+ parameters=parameters.DressedGrapheneParameters(
114
+ **model_parameters
115
+ )
116
+ )
111
117
  result = runner.invoke(cli, ["input.yaml", "--debug"])
118
+ mean_field.self_consistency_loop.assert_called()
112
119
  assert result.exit_code == 0
120
+ with runner.isolated_filesystem(temp_dir=tmp_path):
121
+ test_parameters['control']['calculate_additional'] = False
122
+ with Path("input.yaml").open("w") as f:
123
+ yaml.dump(test_parameters, f)
124
+ mock_search_self_consistency_loop = mocker.patch(
125
+ "quant_met.mean_field.self_consistency_loop"
126
+ )
127
+ mock_search_self_consistency_loop.return_value = mean_field.hamiltonians.DressedGraphene(
128
+ parameters=parameters.DressedGrapheneParameters(
129
+ **model_parameters
130
+ )
131
+ )
113
132
  result = runner.invoke(cli, ["input.yaml"])
114
133
  mean_field.self_consistency_loop.assert_called()
115
134
  assert result.exit_code == 0
@@ -257,6 +257,7 @@ def test_plotting_nonint_bandstructure_dressed_graphene_with_fig_in() -> None:
257
257
  remove_text=True,
258
258
  extensions=["png"],
259
259
  style="mpl20",
260
+ tol=0.06,
260
261
  )
261
262
  def test_plotting_sf_weight() -> None:
262
263
  """Test plotting for superfluid weight."""
@@ -272,6 +273,7 @@ def test_plotting_sf_weight() -> None:
272
273
  remove_text=True,
273
274
  extensions=["png"],
274
275
  style="mpl20",
276
+ tol=0.06,
275
277
  )
276
278
  def test_plotting_sf_weight_with_fig_in() -> None:
277
279
  """Test plotting for superfluid weight with input figure."""
@@ -31,15 +31,14 @@ def test_superfluid_weight_dressed_graphene(ndarrays_regression: NDArraysRegress
31
31
  )
32
32
  )
33
33
 
34
- d_s_conv, d_s_geom = mean_field.superfluid_weight(h=dressed_graphene_h, k=bz_grid)
35
- print(d_s_conv, d_s_geom)
34
+ d_s_conv, d_s_geom = dressed_graphene_h.calculate_superfluid_weight(k=bz_grid)
36
35
 
37
36
  ndarrays_regression.check(
38
37
  {
39
38
  "D_S_conv": np.array(d_s_conv),
40
39
  "D_S_geom": np.array(d_s_geom),
41
40
  },
42
- default_tolerance={"atol": 1e-8, "rtol": 1e-5},
41
+ default_tolerance={"atol": 1e-5, "rtol": 1e-5},
43
42
  )
44
43
 
45
44
 
@@ -61,12 +60,12 @@ def test_superfluid_weight_graphene(ndarrays_regression: NDArraysRegressionFixtu
61
60
  )
62
61
  )
63
62
 
64
- d_s_conv, d_s_geom = mean_field.superfluid_weight(h=graphene_h, k=bz_grid)
63
+ d_s_conv, d_s_geom = graphene_h.calculate_superfluid_weight(k=bz_grid)
65
64
 
66
65
  ndarrays_regression.check(
67
66
  {
68
67
  "D_S_conv": np.array(d_s_conv),
69
68
  "D_S_geom": np.array(d_s_geom),
70
69
  },
71
- default_tolerance={"atol": 1e-8, "rtol": 1e-5},
70
+ default_tolerance={"atol": 1e-4, "rtol": 1e-5},
72
71
  )
@@ -2319,7 +2319,7 @@ wheels = [
2319
2319
 
2320
2320
  [[package]]
2321
2321
  name = "quant-met"
2322
- version = "0.0.17.dev0"
2322
+ version = "0.0.17"
2323
2323
  source = { editable = "." }
2324
2324
  dependencies = [
2325
2325
  { name = "click" },
@@ -1,126 +0,0 @@
1
- # SPDX-FileCopyrightText: 2024 Tjark Sievers
2
- #
3
- # SPDX-License-Identifier: MIT
4
-
5
- """Functions to calculate the superfluid weight."""
6
-
7
- import numpy as np
8
- import numpy.typing as npt
9
-
10
- from quant_met.mean_field.hamiltonians.base_hamiltonian import BaseHamiltonian
11
- from quant_met.parameters import GenericParameters
12
- from quant_met.utils import fermi_dirac
13
-
14
-
15
- def superfluid_weight(
16
- h: BaseHamiltonian[GenericParameters],
17
- k: npt.NDArray[np.floating],
18
- ) -> tuple[npt.NDArray[np.complexfloating], npt.NDArray[np.complexfloating]]:
19
- """Calculate the superfluid weight.
20
-
21
- Parameters
22
- ----------
23
- h : :class:`~quant_met.mean_field.Hamiltonian`
24
- Hamiltonian.
25
- k : :class:`numpy.ndarray`
26
- List of k points.
27
-
28
- Returns
29
- -------
30
- :class:`numpy.ndarray`
31
- Conventional contribution to the superfluid weight.
32
- :class:`numpy.ndarray`
33
- Geometric contribution to the superfluid weight.
34
-
35
- """
36
- s_weight_conv = np.zeros(shape=(2, 2), dtype=np.complexfloating)
37
- s_weight_geom = np.zeros(shape=(2, 2), dtype=np.complexfloating)
38
-
39
- c_mnpq_cache = {}
40
-
41
- for i, direction_1 in enumerate(["x", "y"]):
42
- for j, direction_2 in enumerate(["x", "y"]):
43
- for k_point in k:
44
- k_tuple = tuple(k_point)
45
-
46
- if k_tuple not in c_mnpq_cache:
47
- c_mnpq_cache[k_tuple] = _c_factor(h, k_point)
48
- c_mnpq = c_mnpq_cache[k_tuple]
49
-
50
- j_up = _current_operator(h, direction_1, k_point)
51
- j_down = _current_operator(h, direction_2, -k_point)
52
-
53
- for m in range(h.number_of_bands):
54
- for n in range(h.number_of_bands):
55
- for p in range(h.number_of_bands):
56
- for q in range(h.number_of_bands):
57
- s_weight = c_mnpq[m, n, p, q] * j_up[m, n] * j_down[q, p]
58
- if m == n and p == q:
59
- s_weight_conv[i, j] += s_weight
60
- else:
61
- s_weight_geom[i, j] += s_weight
62
-
63
- return s_weight_conv, s_weight_geom
64
-
65
-
66
- def _current_operator(
67
- h: BaseHamiltonian[GenericParameters], direction: str, k: npt.NDArray[np.floating]
68
- ) -> npt.NDArray[np.complexfloating]:
69
- j = np.zeros(shape=(h.number_of_bands, h.number_of_bands), dtype=np.complexfloating)
70
-
71
- _, bloch = h.diagonalize_nonint(k=k)
72
-
73
- for m in range(h.number_of_bands):
74
- for n in range(h.number_of_bands):
75
- j[m, n] = (
76
- bloch[:, m].conjugate()
77
- @ h.hamiltonian_derivative(direction=direction, k=k)
78
- @ bloch[:, n]
79
- )
80
-
81
- return j
82
-
83
-
84
- def _c_factor(
85
- h: BaseHamiltonian[GenericParameters], k: npt.NDArray[np.floating]
86
- ) -> npt.NDArray[np.complexfloating]:
87
- bdg_energies, bdg_functions = h.diagonalize_bdg(k)
88
- c_mnpq = np.zeros(
89
- shape=(
90
- h.number_of_bands,
91
- h.number_of_bands,
92
- h.number_of_bands,
93
- h.number_of_bands,
94
- ),
95
- dtype=np.complexfloating,
96
- )
97
-
98
- for m in range(h.number_of_bands):
99
- for n in range(h.number_of_bands):
100
- for p in range(h.number_of_bands):
101
- for q in range(h.number_of_bands):
102
- c_tmp: float = 0
103
- for i in range(2 * h.number_of_bands):
104
- for j in range(2 * h.number_of_bands):
105
- if bdg_energies[i] != bdg_energies[j]:
106
- c_tmp += (
107
- fermi_dirac(bdg_energies[i], h.beta)
108
- - fermi_dirac(bdg_energies[j], h.beta)
109
- ) / (bdg_energies[i] - bdg_energies[j])
110
- else:
111
- c_tmp -= _fermi_dirac_derivative()
112
-
113
- c_tmp *= (
114
- bdg_functions[i, m].conjugate()
115
- * bdg_functions[j, n]
116
- * bdg_functions[j, p].conjugate()
117
- * bdg_functions[i, q].conjugate()
118
- )
119
-
120
- c_mnpq[m, n, p, q] = 2 * c_tmp
121
-
122
- return c_mnpq
123
-
124
-
125
- def _fermi_dirac_derivative() -> float:
126
- return 0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes