quant-met 0.0.27__py3-none-any.whl → 0.1.1__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 (47) hide show
  1. quant_met/__init__.py +2 -7
  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 -5
  8. quant_met/cli/crit_temp.py +18 -16
  9. quant_met/cli/main.py +8 -5
  10. quant_met/cli/q_analysis.py +60 -0
  11. quant_met/cli/q_loop.py +95 -0
  12. quant_met/cli/scf.py +44 -23
  13. quant_met/parameters/__init__.py +0 -26
  14. quant_met/parameters/control.py +57 -0
  15. quant_met/parameters/main.py +2 -55
  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 -48
  22. quant_met/{mean_field → routines}/self_consistency.py +32 -28
  23. quant_met/utils.py +1 -6
  24. {quant_met-0.0.27.dist-info → quant_met-0.1.1.dist-info}/METADATA +5 -11
  25. quant_met-0.1.1.dist-info/RECORD +28 -0
  26. quant_met/cli/_utils.py +0 -32
  27. quant_met/geometry/__init__.py +0 -36
  28. quant_met/geometry/base_lattice.py +0 -100
  29. quant_met/geometry/bz_path.py +0 -90
  30. quant_met/geometry/graphene.py +0 -48
  31. quant_met/geometry/square.py +0 -47
  32. quant_met/mean_field/__init__.py +0 -38
  33. quant_met/mean_field/_utils.py +0 -17
  34. quant_met/mean_field/hamiltonians/__init__.py +0 -34
  35. quant_met/mean_field/hamiltonians/base_hamiltonian.py +0 -793
  36. quant_met/mean_field/hamiltonians/dressed_graphene.py +0 -118
  37. quant_met/mean_field/hamiltonians/graphene.py +0 -95
  38. quant_met/mean_field/hamiltonians/one_band_tight_binding.py +0 -70
  39. quant_met/mean_field/hamiltonians/three_band_tight_binding.py +0 -85
  40. quant_met/mean_field/hamiltonians/two_band_tight_binding.py +0 -76
  41. quant_met/parameters/hamiltonians.py +0 -182
  42. quant_met/plotting/__init__.py +0 -31
  43. quant_met/plotting/plotting.py +0 -215
  44. quant_met-0.0.27.dist-info/RECORD +0 -33
  45. {quant_met-0.0.27.dist-info → quant_met-0.1.1.dist-info}/WHEEL +0 -0
  46. {quant_met-0.0.27.dist-info → quant_met-0.1.1.dist-info}/entry_points.txt +0 -0
  47. {quant_met-0.0.27.dist-info → quant_met-0.1.1.dist-info}/licenses/LICENSE.txt +0 -0
@@ -1,215 +0,0 @@
1
- # SPDX-FileCopyrightText: 2024 Tjark Sievers
2
- # SPDX-FileCopyrightText: 2025 Tjark Sievers
3
- #
4
- # SPDX-License-Identifier: MIT
5
-
6
- """Methods for plotting data."""
7
-
8
- import matplotlib.axes
9
- import matplotlib.colors
10
- import matplotlib.figure
11
- import matplotlib.pyplot as plt
12
- import numpy as np
13
- import numpy.typing as npt
14
- from matplotlib.collections import Collection, LineCollection
15
-
16
-
17
- def format_plot(
18
- ax: matplotlib.axes.Axes,
19
- ) -> matplotlib.axes.Axes:
20
- """Format the axis to the predefined style.
21
-
22
- Parameters
23
- ----------
24
- ax : :class:`matplotlib.axes.Axes`
25
-
26
- Returns
27
- -------
28
- :class:`matplotlib.axes.Axes`
29
-
30
- """
31
- ax.set_box_aspect(1)
32
- ax.set_facecolor("lightgray")
33
- ax.grid(visible=True)
34
- ax.tick_params(axis="both", direction="in", bottom=True, top=True, left=True, right=True)
35
-
36
- return ax
37
-
38
-
39
- def scatter_into_bz(
40
- bz_corners: list[npt.NDArray[np.floating]],
41
- k_points: npt.NDArray[np.floating],
42
- data: npt.NDArray[np.floating] | None = None,
43
- data_label: str | None = None,
44
- fig_in: matplotlib.figure.Figure | None = None,
45
- ax_in: matplotlib.axes.Axes | None = None,
46
- ) -> matplotlib.figure.Figure:
47
- """Scatter a list of points into the brillouin zone.
48
-
49
- Parameters
50
- ----------
51
- bz_corners : list[:class:`numpy.ndarray`]
52
- Corner points defining the brillouin zone.
53
- k_points : :class:`numpy.ndarray`
54
- List of k points.
55
- data : :class:`numpy.ndarray`, optional
56
- Data to put on the k points.
57
- data_label : :class:`str`, optional
58
- Label for the data.
59
- fig_in : :class:`matplotlib.figure.Figure`, optional
60
- Figure that holds the axes. If not provided, a new figure and ax is created.
61
- ax_in : :class:`matplotlib.axes.Axes`, optional
62
- Ax to plot the data in. If not provided, a new figure and ax is created.
63
-
64
- Returns
65
- -------
66
- :obj:`matplotlib.figure.Figure`
67
- Figure with the data plotted onto the axis.
68
-
69
- """
70
- if fig_in is None or ax_in is None:
71
- fig, ax = plt.subplots()
72
- else:
73
- fig, ax = fig_in, ax_in
74
-
75
- if data is not None:
76
- x_coords, y_coords = zip(*k_points, strict=True)
77
- scatter = ax.scatter(x=x_coords, y=y_coords, c=data, cmap="viridis")
78
- fig.colorbar(scatter, ax=ax, fraction=0.046, pad=0.04, label=data_label)
79
- else:
80
- x_coords, y_coords = zip(*k_points, strict=True)
81
- ax.scatter(x=x_coords, y=y_coords)
82
-
83
- bz_corner_x, bz_corners_y = zip(*bz_corners, strict=True)
84
- ax.scatter(x=bz_corner_x, y=bz_corners_y, alpha=0.8)
85
- ax.set_aspect("equal", adjustable="box")
86
- ax.set_xlabel(r"$k_x\ [1/a_0]$")
87
- ax.set_ylabel(r"$k_y\ [1/a_0]$")
88
-
89
- return fig
90
-
91
-
92
- def plot_bandstructure(
93
- bands: npt.NDArray[np.floating],
94
- k_point_list: npt.NDArray[np.floating],
95
- ticks: list[float],
96
- labels: list[str],
97
- overlaps: npt.NDArray[np.floating] | None = None,
98
- overlap_labels: list[str] | None = None,
99
- fig_in: matplotlib.figure.Figure | None = None,
100
- ax_in: matplotlib.axes.Axes | None = None,
101
- ) -> matplotlib.figure.Figure:
102
- """Plot bands along a k space path.
103
-
104
- To have a plot that respects the distances in k space and generate everything that is needed for
105
- plotting, use the function :func:`~quant_met.plotting.generate_bz_path`.
106
-
107
- Parameters
108
- ----------
109
- bands : :class:`numpy.ndarray`
110
- k_point_list : :class:`numpy.ndarray`
111
- List of points to plot against. This is not a list of two-dimensional k-points!
112
- ticks : list(float)
113
- Position for ticks.
114
- labels : list(str)
115
- Labels on ticks.
116
- overlaps : :class:`numpy.ndarray`, optional
117
- Overlaps.
118
- overlap_labels : list(str), optional
119
- Labels to put on overlaps.
120
- fig_in : :class:`matplotlib.figure.Figure`, optional
121
- Figure that holds the axes. If not provided, a new figure and ax is created.
122
- ax_in : :class:`matplotlib.axes.Axes`, optional
123
- Ax to plot the data in. If not provided, a new figure and ax is created.
124
-
125
- Returns
126
- -------
127
- :obj:`matplotlib.figure.Figure`
128
- Figure with the data plotted onto the axis.
129
-
130
- """
131
- if fig_in is None or ax_in is None:
132
- fig, ax = plt.subplots()
133
- else:
134
- fig, ax = fig_in, ax_in
135
-
136
- ax.axhline(y=0, alpha=0.7, linestyle="--", color="black")
137
-
138
- if overlaps is None:
139
- for band in bands:
140
- ax.plot(k_point_list, band)
141
- else:
142
- line = Collection()
143
- for band, wx in zip(bands, overlaps, strict=True):
144
- points = np.array([k_point_list, band]).T.reshape(-1, 1, 2)
145
- segments = np.concatenate([points[:-1], points[1:]], axis=1)
146
-
147
- norm = matplotlib.colors.Normalize(-1, 1)
148
- lc = LineCollection(segments, cmap="seismic", norm=norm)
149
- lc.set_array(wx)
150
- lc.set_linewidth(2)
151
- line = ax.add_collection(lc)
152
-
153
- colorbar = fig.colorbar(line, fraction=0.046, pad=0.04, ax=ax)
154
- color_ticks = [-1, 1]
155
- colorbar.set_ticks(ticks=color_ticks, labels=overlap_labels)
156
-
157
- ax.set_ylim(
158
- top=float(np.max(bands) + 0.1 * np.max(bands)),
159
- bottom=float(np.min(bands) - 0.1 * np.abs(np.min(bands))),
160
- )
161
- ax.set_xticks(ticks, labels)
162
-
163
- ax = format_plot(ax)
164
-
165
- ax.set_ylabel(r"$E\ [t]$")
166
-
167
- return fig
168
-
169
-
170
- def plot_superfluid_weight(
171
- x_data: npt.NDArray[np.floating],
172
- sf_weight_geom: npt.NDArray[np.floating],
173
- sf_weight_conv: npt.NDArray[np.floating],
174
- fig_in: matplotlib.figure.Figure | None = None,
175
- ax_in: matplotlib.axes.Axes | None = None,
176
- ) -> matplotlib.figure.Figure:
177
- """Plot superfluid weight against some parameter.
178
-
179
- Parameters
180
- ----------
181
- x_data : :class:`numpy.ndarray`
182
- sf_weight_geom : :class:`numpy.ndarray`
183
- sf_weight_conv : :class:`numpy.ndarray`
184
- fig_in : :class:`matplotlib.figure.Figure`, optional
185
- ax_in : :class:`matplotlib.axes.Axes`, optional
186
-
187
- Returns
188
- -------
189
- :obj:`matplotlib.figure.Figure`
190
- Figure with the data plotted onto the axis.
191
-
192
- """
193
- if fig_in is None or ax_in is None:
194
- fig, ax = plt.subplots()
195
- else:
196
- fig, ax = fig_in, ax_in
197
-
198
- ax.fill_between(
199
- x_data, 0, np.abs(sf_weight_geom), color="black", fc="#0271BB", label="geometric", hatch="-"
200
- )
201
- ax.fill_between(
202
- x_data,
203
- np.abs(sf_weight_geom),
204
- np.abs(sf_weight_geom) + np.abs(sf_weight_conv),
205
- color="black",
206
- fc="#E2001A",
207
- label="conventional",
208
- hatch="//",
209
- )
210
- ax.plot(x_data, np.abs(sf_weight_geom) + np.abs(sf_weight_conv), "x--", color="black")
211
-
212
- ax = format_plot(ax)
213
- ax.set_ylabel(r"$D_S\ [t]$")
214
-
215
- return fig
@@ -1,33 +0,0 @@
1
- quant_met/__init__.py,sha256=gRG4ktbxayIWQc5JjSZcZaUpNhPhQ9CjZ1EbZthocaw,334
2
- quant_met/utils.py,sha256=evF4BBhfElXK0sj4eUTIfF_vRyyzW6XYK44VZaLexE8,2112
3
- quant_met/cli/__init__.py,sha256=OHV3Ia-aXPP2kGYoEQsSbqQaLMaOd07K7jdE-u6u2y0,299
4
- quant_met/cli/_utils.py,sha256=211xxeO1a24AGMg6H-7Ls3gJhjP54Tws7OTmzW2-Q0Q,986
5
- quant_met/cli/crit_temp.py,sha256=DVdxw_lLZPA7Eu_NvCKxcDLrKBJBOe0W6df4Js2Su9U,2072
6
- quant_met/cli/main.py,sha256=myDASJvAhFp5olOy0sbilijyCYkztUMUkPfAiblhTo0,1916
7
- quant_met/cli/scf.py,sha256=eU6h6BPqB19-1r2tGhHOhG_nT5xUxmu57uzlEDkicJs,2658
8
- quant_met/geometry/__init__.py,sha256=Cxp0-SnqgAwUov0z1xWJ3r2JCL1eiYOX96g73O4X8x4,637
9
- quant_met/geometry/base_lattice.py,sha256=OF6diQaryrm5RI7z8Eq-fYibzxaAriJSMQZItoi-qAw,2694
10
- quant_met/geometry/bz_path.py,sha256=HcBENq6LoGxZ8p3H6qMG-gmJ0H3oS5qpMv8T5Rm5aaw,2548
11
- quant_met/geometry/graphene.py,sha256=XikDAtNCCBHDbTEJXyu3U18I1adGEKek8B_ArridrpA,1672
12
- quant_met/geometry/square.py,sha256=DWNGRU2K0uXIKkIgDiY9dmXIfz5u3S2sQ950FTQCeWY,1610
13
- quant_met/mean_field/__init__.py,sha256=jDz2DU8D9WeRKu2fWtJMhxeVUg511LZDLBX9jH3dfrk,603
14
- quant_met/mean_field/_utils.py,sha256=wMF0dpVGVYsVjx7Brot7eqqyUqZrl03KUfF1nvCSTXA,401
15
- quant_met/mean_field/search_crit_temp.py,sha256=iEHAJFKuULUuZnoxHyyXIBUKLAVX44rZPLja4Wuavp0,8962
16
- quant_met/mean_field/self_consistency.py,sha256=1KQEhnCBrNYRzIj4TnC9sQPlp9hXR_jBPDA3VrGprPw,3444
17
- quant_met/mean_field/hamiltonians/__init__.py,sha256=bjbkP4kC9yuTAsRJnVSSMDdjvi8P0AQp_00Sg0JMIrs,726
18
- quant_met/mean_field/hamiltonians/base_hamiltonian.py,sha256=uEL4Nk7EdL8Bf73pDtw85JvfHPh2jlJQyq37GceT1iE,29385
19
- quant_met/mean_field/hamiltonians/dressed_graphene.py,sha256=e6m51P2JQvwUhx-OP7RIQfAZUQoNxeM0S9wpElBttT8,4093
20
- quant_met/mean_field/hamiltonians/graphene.py,sha256=bOIYGGoUwtqtWr1nqLD1lRKngjgtsmXVyxbig0luPeQ,3321
21
- quant_met/mean_field/hamiltonians/one_band_tight_binding.py,sha256=P0N6upQCloRCorrB-Tsapkc681hetLR3SgEB-cnS508,2557
22
- quant_met/mean_field/hamiltonians/three_band_tight_binding.py,sha256=6SWjjExppXURnsuRM8CX7rAKt-sxmgKBuOg2d4dzwdg,3340
23
- quant_met/mean_field/hamiltonians/two_band_tight_binding.py,sha256=PSX2TsS3J2afKvKcurwhq-2XC2gbIle3iN4hQM_lq9E,2910
24
- quant_met/parameters/__init__.py,sha256=8bTFW1owqGixUYjrT5K4XT5YTmrVtGlLS5UBHp7gnBA,1052
25
- quant_met/parameters/hamiltonians.py,sha256=FLfRpNX3uA0MV1e3Obyb_J7VM5xwk9E4z6NKMmFd6Cw,6091
26
- quant_met/parameters/main.py,sha256=j9-G-UgEuv9YYmDB7MPhlr67kpHhoCC5GtYN5FVkcgc,2370
27
- quant_met/plotting/__init__.py,sha256=PrGNm8fVY4WafQPiNgE22boaG7HXoeeG_u82jFv8Npg,568
28
- quant_met/plotting/plotting.py,sha256=vxfzYdrKIIrjC79GHb61AU_Ngu3TFrbOFujqsgitb0A,6637
29
- quant_met-0.0.27.dist-info/METADATA,sha256=Mohh2BTtINTLuG0S7uF6e_VSvpW7Zi85DL2r0Z1DUGU,2051
30
- quant_met-0.0.27.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
31
- quant_met-0.0.27.dist-info/entry_points.txt,sha256=1Al3Kt-cMeQxwMp84ZSNL0qFwlbOVBu1o8A19MH8lEU,48
32
- quant_met-0.0.27.dist-info/licenses/LICENSE.txt,sha256=QO_duPQihSJlaxSLxPAXo52X3esROP5wBkhxqBd1Z4E,1104
33
- quant_met-0.0.27.dist-info/RECORD,,