quant-met 0.0.4__py3-none-any.whl → 0.0.5__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.
- quant_met/mean_field/quantum_metric.py +20 -19
- quant_met/mean_field/superfluid_weight.py +5 -31
- {quant_met-0.0.4.dist-info → quant_met-0.0.5.dist-info}/METADATA +2 -2
- {quant_met-0.0.4.dist-info → quant_met-0.0.5.dist-info}/RECORD +7 -7
- {quant_met-0.0.4.dist-info → quant_met-0.0.5.dist-info}/LICENSE.txt +0 -0
- {quant_met-0.0.4.dist-info → quant_met-0.0.5.dist-info}/LICENSES/MIT.txt +0 -0
- {quant_met-0.0.4.dist-info → quant_met-0.0.5.dist-info}/WHEEL +0 -0
@@ -60,7 +60,7 @@ def quantum_metric(
|
|
60
60
|
|
61
61
|
|
62
62
|
def quantum_metric_bdg(
|
63
|
-
h: BaseHamiltonian, k_grid: npt.NDArray[np.float64],
|
63
|
+
h: BaseHamiltonian, k_grid: npt.NDArray[np.float64], bands: list[int]
|
64
64
|
) -> npt.NDArray[np.float64]:
|
65
65
|
"""Calculate the quantum metric in the BdG state.
|
66
66
|
|
@@ -85,24 +85,25 @@ def quantum_metric_bdg(
|
|
85
85
|
|
86
86
|
quantum_geom_tensor = np.zeros(shape=(2, 2), dtype=np.complex64)
|
87
87
|
|
88
|
-
for
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
for
|
94
|
-
|
95
|
-
(
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
88
|
+
for band in bands:
|
89
|
+
for i, direction_1 in enumerate(["x", "y"]):
|
90
|
+
h_derivative_dir_1 = h.bdg_hamiltonian_derivative(k=k_grid, direction=direction_1)
|
91
|
+
for j, direction_2 in enumerate(["x", "y"]):
|
92
|
+
h_derivative_dir_2 = h.bdg_hamiltonian_derivative(k=k_grid, direction=direction_2)
|
93
|
+
for k_index in range(len(k_grid)):
|
94
|
+
for n in [i for i in range(h.number_of_bands) if i != band]:
|
95
|
+
quantum_geom_tensor[i, j] += (
|
96
|
+
(
|
97
|
+
bdg_functions[k_index][:, band].conjugate()
|
98
|
+
@ h_derivative_dir_1[k_index]
|
99
|
+
@ bdg_functions[k_index][:, n]
|
100
|
+
)
|
101
|
+
* (
|
102
|
+
bdg_functions[k_index][:, n].conjugate()
|
103
|
+
@ h_derivative_dir_2[k_index]
|
104
|
+
@ bdg_functions[k_index][:, band]
|
105
|
+
)
|
106
|
+
/ (energies[k_index][band] - energies[k_index][n]) ** 2
|
104
107
|
)
|
105
|
-
/ (energies[k_index][band] - energies[k_index][n]) ** 2
|
106
|
-
)
|
107
108
|
|
108
109
|
return np.real(quantum_geom_tensor) / number_k_points
|
@@ -71,34 +71,8 @@ def _current_operator(
|
|
71
71
|
return j
|
72
72
|
|
73
73
|
|
74
|
-
def _w_matrix(
|
75
|
-
h: BaseHamiltonian, k: npt.NDArray[np.float64]
|
76
|
-
) -> tuple[npt.NDArray[np.complex64], npt.NDArray[np.complex64]]:
|
77
|
-
_, bloch = h.diagonalize_nonint(k=k)
|
78
|
-
_, bdg_functions = h.diagonalize_bdg(k=k)
|
79
|
-
|
80
|
-
w_plus = np.zeros((2 * h.number_of_bands, h.number_of_bands), dtype=np.complex64)
|
81
|
-
for i in range(2 * h.number_of_bands):
|
82
|
-
for m in range(h.number_of_bands):
|
83
|
-
w_plus[i, m] = (
|
84
|
-
np.tensordot(bloch[:, m], np.array([1, 0]), axes=0).reshape(-1)
|
85
|
-
@ bdg_functions[:, i]
|
86
|
-
)
|
87
|
-
|
88
|
-
w_minus = np.zeros((2 * h.number_of_bands, h.number_of_bands), dtype=np.complex64)
|
89
|
-
for i in range(2 * h.number_of_bands):
|
90
|
-
for m in range(h.number_of_bands):
|
91
|
-
w_minus[i, m] = (
|
92
|
-
np.tensordot(bloch[:, m].conjugate(), np.array([0, 1]), axes=0).reshape(-1)
|
93
|
-
@ bdg_functions[:, i]
|
94
|
-
)
|
95
|
-
|
96
|
-
return w_plus, w_minus
|
97
|
-
|
98
|
-
|
99
74
|
def _c_factor(h: BaseHamiltonian, k: npt.NDArray[np.float64]) -> npt.NDArray[np.complex64]:
|
100
|
-
bdg_energies,
|
101
|
-
w_plus, w_minus = _w_matrix(h, k)
|
75
|
+
bdg_energies, bdg_functions = h.diagonalize_bdg(k)
|
102
76
|
c_mnpq = np.zeros(
|
103
77
|
shape=(
|
104
78
|
h.number_of_bands,
|
@@ -124,10 +98,10 @@ def _c_factor(h: BaseHamiltonian, k: npt.NDArray[np.float64]) -> npt.NDArray[np.
|
|
124
98
|
c_tmp -= _fermi_dirac_derivative()
|
125
99
|
|
126
100
|
c_tmp *= (
|
127
|
-
|
128
|
-
*
|
129
|
-
*
|
130
|
-
*
|
101
|
+
bdg_functions[i, m].conjugate()
|
102
|
+
* bdg_functions[j, n]
|
103
|
+
* bdg_functions[j, p].conjugate()
|
104
|
+
* bdg_functions[i, q].conjugate()
|
131
105
|
)
|
132
106
|
|
133
107
|
c_mnpq[m, n, p, q] = 2 * c_tmp
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: quant-met
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.5
|
4
4
|
Summary: Calculate superconductivity in flat-band systems.
|
5
5
|
Author: Tjark Sievers
|
6
6
|
Author-email: tsievers@physnet.uni-hamburg.de
|
@@ -9,7 +9,7 @@ Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.11
|
10
10
|
Classifier: Programming Language :: Python :: 3.12
|
11
11
|
Requires-Dist: h5py (>=3.11.0,<4.0.0)
|
12
|
-
Requires-Dist: matplotlib (>=3.9.
|
12
|
+
Requires-Dist: matplotlib (>=3.9.2,<4.0.0)
|
13
13
|
Requires-Dist: numpy (>=2.0.0,<3.0.0)
|
14
14
|
Requires-Dist: pandas (>=2.2.2,<3.0.0)
|
15
15
|
Requires-Dist: scipy (>=1.14.0,<2.0.0)
|
@@ -5,13 +5,13 @@ quant_met/mean_field/base_hamiltonian.py,sha256=7rNBbkoSSaIQVg4GiKDI1WaSZxJiGR26
|
|
5
5
|
quant_met/mean_field/eg_x.py,sha256=y_DWBoyRaHVIof_itAgHaoaFEEssY_Q9mhvsKC7DxdM,5286
|
6
6
|
quant_met/mean_field/free_energy.py,sha256=FSGCHoBO1myHGwGQ8CqGu7_08whH0Ot3ikZhBu27tyM,3444
|
7
7
|
quant_met/mean_field/graphene.py,sha256=rKD2UjB0blN4ALePk4bQlg0XahHoe_3mCqRAvEUGiqI,4162
|
8
|
-
quant_met/mean_field/quantum_metric.py,sha256=
|
9
|
-
quant_met/mean_field/superfluid_weight.py,sha256=
|
8
|
+
quant_met/mean_field/quantum_metric.py,sha256=y-ky4bU566TNBxldaYWyloqojfpTODo9gbn4TPe6-4A,3902
|
9
|
+
quant_met/mean_field/superfluid_weight.py,sha256=840Fe3aHOVz1W7hi5GrX69_QxQ3vmdy3H0_B852dZqA,3971
|
10
10
|
quant_met/plotting/__init__.py,sha256=QRQ3TNb0PNQi2lWXY0LHKgYSRuegM1N3dVVs9146Zug,457
|
11
11
|
quant_met/plotting/plotting.py,sha256=iVTFZ9tQz_GalzqbQhxCiNWOhYHJM4wiZPTjXaXnApM,7326
|
12
12
|
quant_met/utils.py,sha256=Tvw_YfqjIWx0FPGSReikSnw9xfN-T2dpQZN-KPMa69A,1709
|
13
|
-
quant_met-0.0.
|
14
|
-
quant_met-0.0.
|
15
|
-
quant_met-0.0.
|
16
|
-
quant_met-0.0.
|
17
|
-
quant_met-0.0.
|
13
|
+
quant_met-0.0.5.dist-info/LICENSE.txt,sha256=QO_duPQihSJlaxSLxPAXo52X3esROP5wBkhxqBd1Z4E,1104
|
14
|
+
quant_met-0.0.5.dist-info/LICENSES/MIT.txt,sha256=QO_duPQihSJlaxSLxPAXo52X3esROP5wBkhxqBd1Z4E,1104
|
15
|
+
quant_met-0.0.5.dist-info/METADATA,sha256=Kh99UUBpu1y3cOU1wYektey2RuA1a5Xd_acXxMQnsyc,2598
|
16
|
+
quant_met-0.0.5.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
17
|
+
quant_met-0.0.5.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|