quant-met 0.0.26__py3-none-any.whl → 0.1.0__py3-none-any.whl

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 (51) hide show
  1. quant_met/__init__.py +4 -4
  2. quant_met/bdg/__init__.py +26 -0
  3. quant_met/bdg/bdg_hamiltonian.py +97 -0
  4. quant_met/bdg/gap_equation.py +127 -0
  5. quant_met/bdg/sc_current.py +60 -0
  6. quant_met/bdg/superfluid_weight.py +110 -0
  7. quant_met/cli/__init__.py +0 -4
  8. quant_met/cli/crit_temp.py +18 -15
  9. quant_met/cli/main.py +8 -8
  10. quant_met/cli/q_analysis.py +60 -0
  11. quant_met/cli/q_loop.py +91 -0
  12. quant_met/cli/scf.py +44 -22
  13. quant_met/parameters/__init__.py +0 -25
  14. quant_met/parameters/control.py +57 -0
  15. quant_met/parameters/main.py +2 -54
  16. quant_met/quantum_geometry/__init__.py +13 -0
  17. quant_met/quantum_geometry/qgt.py +37 -0
  18. quant_met/routines/__init__.py +22 -0
  19. quant_met/routines/analyse_q_data.py +226 -0
  20. quant_met/routines/loop_over_q.py +154 -0
  21. quant_met/{mean_field → routines}/search_crit_temp.py +71 -47
  22. quant_met/{mean_field → routines}/self_consistency.py +32 -27
  23. quant_met/utils.py +1 -5
  24. {quant_met-0.0.26.dist-info → quant_met-0.1.0.dist-info}/METADATA +7 -11
  25. quant_met-0.1.0.dist-info/RECORD +28 -0
  26. quant_met/cli/_utils.py +0 -66
  27. quant_met/cli/dmft.py +0 -96
  28. quant_met/dmft/__init__.py +0 -5
  29. quant_met/dmft/dmft_loop.py +0 -178
  30. quant_met/dmft/utils.py +0 -207
  31. quant_met/geometry/__init__.py +0 -35
  32. quant_met/geometry/base_lattice.py +0 -99
  33. quant_met/geometry/bz_path.py +0 -89
  34. quant_met/geometry/graphene.py +0 -47
  35. quant_met/geometry/square.py +0 -46
  36. quant_met/mean_field/__init__.py +0 -39
  37. quant_met/mean_field/_utils.py +0 -16
  38. quant_met/mean_field/hamiltonians/__init__.py +0 -33
  39. quant_met/mean_field/hamiltonians/base_hamiltonian.py +0 -792
  40. quant_met/mean_field/hamiltonians/dressed_graphene.py +0 -117
  41. quant_met/mean_field/hamiltonians/graphene.py +0 -94
  42. quant_met/mean_field/hamiltonians/one_band_tight_binding.py +0 -69
  43. quant_met/mean_field/hamiltonians/three_band_tight_binding.py +0 -84
  44. quant_met/mean_field/hamiltonians/two_band_tight_binding.py +0 -75
  45. quant_met/parameters/hamiltonians.py +0 -181
  46. quant_met/plotting/__init__.py +0 -30
  47. quant_met/plotting/plotting.py +0 -214
  48. quant_met-0.0.26.dist-info/RECORD +0 -37
  49. {quant_met-0.0.26.dist-info → quant_met-0.1.0.dist-info}/WHEEL +0 -0
  50. {quant_met-0.0.26.dist-info → quant_met-0.1.0.dist-info}/entry_points.txt +0 -0
  51. {quant_met-0.0.26.dist-info → quant_met-0.1.0.dist-info}/licenses/LICENSE.txt +0 -0
@@ -1,89 +0,0 @@
1
- # SPDX-FileCopyrightText: 2024 Tjark Sievers
2
- #
3
- # SPDX-License-Identifier: MIT
4
-
5
- """Methods to generate paths through the BZ."""
6
-
7
- import numpy as np
8
- import numpy.typing as npt
9
-
10
-
11
- def _generate_part_of_path(
12
- p_0: npt.NDArray[np.floating],
13
- p_1: npt.NDArray[np.floating],
14
- n: int,
15
- length_whole_path: int,
16
- ) -> npt.NDArray[np.floating]:
17
- distance = np.linalg.norm(p_1 - p_0)
18
- number_of_points = int(n * distance / length_whole_path) + 1
19
-
20
- return np.vstack(
21
- [
22
- np.linspace(p_0[0], p_1[0], number_of_points),
23
- np.linspace(p_0[1], p_1[1], number_of_points),
24
- ]
25
- ).T[:-1]
26
-
27
-
28
- def generate_bz_path(
29
- points: list[tuple[npt.NDArray[np.floating], str]], number_of_points: int = 1000
30
- ) -> tuple[
31
- npt.NDArray[np.floating],
32
- npt.NDArray[np.floating],
33
- list[float],
34
- list[str],
35
- ]:
36
- """Generate a path through high symmetry points.
37
-
38
- Parameters
39
- ----------
40
- points : :class:`numpy.ndarray`
41
- Test
42
- number_of_points: int
43
- Number of point in the whole path.
44
-
45
- Returns
46
- -------
47
- :class:`numpy.ndarray`
48
- List of two-dimensional k points.
49
- :class:`numpy.ndarray`
50
- Path for plotting purposes: points between 0 and 1, with appropriate spacing.
51
- list[float]
52
- A list of ticks for the plotting path.
53
- list[str]
54
- A list of labels for the plotting path.
55
-
56
- """
57
- n = number_of_points
58
-
59
- cycle = [np.linalg.norm(points[i][0] - points[i + 1][0]) for i in range(len(points) - 1)]
60
- cycle.append(np.linalg.norm(points[-1][0] - points[0][0]))
61
-
62
- length_whole_path = np.sum(np.array([cycle]))
63
-
64
- ticks = [0.0]
65
- ticks.extend([np.sum(cycle[0 : i + 1]) / length_whole_path for i in range(len(cycle) - 1)])
66
- ticks.append(1.0)
67
- labels = [rf"${points[i][1]}$" for i in range(len(points))]
68
- labels.append(rf"${points[0][1]}$")
69
-
70
- whole_path_plot = np.concatenate(
71
- [
72
- np.linspace(
73
- ticks[i],
74
- ticks[i + 1],
75
- num=int(n * cycle[i] / length_whole_path),
76
- endpoint=False,
77
- )
78
- for i in range(len(ticks) - 1)
79
- ]
80
- )
81
-
82
- points_path = [
83
- _generate_part_of_path(points[i][0], points[i + 1][0], n, length_whole_path)
84
- for i in range(len(points) - 1)
85
- ]
86
- points_path.append(_generate_part_of_path(points[-1][0], points[0][0], n, length_whole_path))
87
- whole_path = np.concatenate(points_path)
88
-
89
- return whole_path, whole_path_plot, ticks, labels
@@ -1,47 +0,0 @@
1
- # SPDX-FileCopyrightText: 2024 Tjark Sievers
2
- #
3
- # SPDX-License-Identifier: MIT
4
-
5
- """Lattice geometry for Graphene."""
6
-
7
- import numpy as np
8
- import numpy.typing as npt
9
-
10
- from .base_lattice import BaseLattice
11
-
12
-
13
- class GrapheneLattice(BaseLattice):
14
- """Lattice geometry for Graphene."""
15
-
16
- def __init__(self, lattice_constant: float) -> None:
17
- self._lattice_constant = lattice_constant
18
- self._bz_corners = (
19
- 4
20
- * np.pi
21
- / (3 * self.lattice_constant)
22
- * np.array([(np.cos(i * np.pi / 3), np.sin(i * np.pi / 3)) for i in range(6)])
23
- )
24
- self.Gamma = np.array([0, 0])
25
- self.M = np.pi / self.lattice_constant * np.array([1, 1 / np.sqrt(3)])
26
- self.K = 4 * np.pi / (3 * self.lattice_constant) * np.array([1, 0])
27
- self._high_symmetry_points = ((self.M, "M"), (self.Gamma, r"\Gamma"), (self.K, "K"))
28
- self._reciprocal_basis = (
29
- 2 * np.pi / self.lattice_constant * np.array([1, 1 / np.sqrt(3)]),
30
- 2 * np.pi / self.lattice_constant * np.array([1, -1 / np.sqrt(3)]),
31
- )
32
-
33
- @property
34
- def lattice_constant(self) -> float: # noqa: D102
35
- return self._lattice_constant
36
-
37
- @property
38
- def bz_corners(self) -> npt.NDArray[np.floating]: # noqa: D102
39
- return self._bz_corners
40
-
41
- @property
42
- def reciprocal_basis(self) -> tuple[npt.NDArray[np.floating], npt.NDArray[np.floating]]: # noqa: D102
43
- return self._reciprocal_basis
44
-
45
- @property
46
- def high_symmetry_points(self) -> tuple[tuple[npt.NDArray[np.floating], str], ...]: # noqa: D102
47
- return self._high_symmetry_points
@@ -1,46 +0,0 @@
1
- # SPDX-FileCopyrightText: 2024 Tjark Sievers
2
- #
3
- # SPDX-License-Identifier: MIT
4
-
5
- """Lattice geometry for Square Lattice."""
6
-
7
- import numpy as np
8
- import numpy.typing as npt
9
-
10
- from .base_lattice import BaseLattice
11
-
12
-
13
- class SquareLattice(BaseLattice):
14
- """Lattice geometry for Square Lattice."""
15
-
16
- def __init__(self, lattice_constant: float) -> None:
17
- self._lattice_constant = lattice_constant
18
- self._bz_corners = (
19
- np.pi
20
- / lattice_constant
21
- * np.array([np.array([1, 1]), np.array([-1, 1]), np.array([1, -1]), np.array([-1, -1])])
22
- )
23
- self._reciprocal_basis = (
24
- 2 * np.pi / self.lattice_constant * np.array([1, 0]),
25
- 2 * np.pi / self.lattice_constant * np.array([0, 1]),
26
- )
27
- self.Gamma = np.array([0, 0])
28
- self.M = np.pi / lattice_constant * np.array([1, 1])
29
- self.X = np.pi / lattice_constant * np.array([1, 0])
30
- self._high_symmetry_points = ((self.Gamma, r"\Gamma"), (self.M, "M"))
31
-
32
- @property
33
- def lattice_constant(self) -> float: # noqa: D102
34
- return self._lattice_constant
35
-
36
- @property
37
- def bz_corners(self) -> npt.NDArray[np.floating]: # noqa: D102 # pragma: no cover
38
- return self._bz_corners
39
-
40
- @property
41
- def reciprocal_basis(self) -> tuple[npt.NDArray[np.floating], npt.NDArray[np.floating]]: # noqa: D102
42
- return self._reciprocal_basis
43
-
44
- @property
45
- def high_symmetry_points(self) -> tuple[tuple[npt.NDArray[np.floating], str], ...]: # noqa: D102
46
- return self._high_symmetry_points
@@ -1,39 +0,0 @@
1
- # SPDX-FileCopyrightText: 2024 Tjark Sievers
2
- #
3
- # SPDX-License-Identifier: MIT
4
-
5
- """
6
- Mean field
7
- ==========
8
-
9
- Submodules
10
- ----------
11
-
12
- .. autosummary::
13
- :toctree: generated/
14
-
15
- hamiltonians
16
-
17
-
18
- Functions
19
- ---------
20
-
21
- .. autosummary::
22
- :toctree: generated/
23
-
24
- superfluid_weight
25
- quantum_metric
26
- self_consistency_loop
27
- search_crit_temp
28
- """ # noqa: D205, D400
29
-
30
- from quant_met.mean_field import hamiltonians
31
-
32
- from .search_crit_temp import search_crit_temp
33
- from .self_consistency import self_consistency_loop
34
-
35
- __all__ = [
36
- "hamiltonians",
37
- "search_crit_temp",
38
- "self_consistency_loop",
39
- ]
@@ -1,16 +0,0 @@
1
- # SPDX-FileCopyrightText: 2024 Tjark Sievers
2
- #
3
- # SPDX-License-Identifier: MIT
4
-
5
- from typing import Any
6
-
7
- import numpy as np
8
- import numpy.typing as npt
9
-
10
-
11
- def _check_valid_array(array_in: npt.NDArray[Any]) -> bool:
12
- if np.isnan(array_in).any() or np.isinf(array_in).any():
13
- msg = "k is NaN or Infinity"
14
- raise ValueError(msg)
15
-
16
- return True
@@ -1,33 +0,0 @@
1
- # SPDX-FileCopyrightText: 2024 Tjark Sievers
2
- #
3
- # SPDX-License-Identifier: MIT
4
-
5
- """
6
- hamiltonians
7
- ============
8
-
9
- Base
10
-
11
- .. autosummary::
12
- :toctree: hamiltonians/
13
-
14
- BaseHamiltonian
15
-
16
- .. autosummary::
17
- :toctree: hamiltonians/
18
-
19
- Graphene
20
- DressedGraphene
21
- OneBand
22
- TwoBand
23
- ThreeBand
24
- """ # noqa: D205, D400
25
-
26
- from .base_hamiltonian import BaseHamiltonian
27
- from .dressed_graphene import DressedGraphene
28
- from .graphene import Graphene
29
- from .one_band_tight_binding import OneBand
30
- from .three_band_tight_binding import ThreeBand
31
- from .two_band_tight_binding import TwoBand
32
-
33
- __all__ = ["BaseHamiltonian", "DressedGraphene", "Graphene", "OneBand", "ThreeBand", "TwoBand"]