quant-met 0.0.6__py3-none-any.whl → 0.0.8__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/cli/__init__.py +22 -0
- quant_met/cli/main.py +34 -0
- quant_met/cli/scf.py +42 -0
- quant_met/geometry/__init__.py +12 -3
- quant_met/geometry/graphene.py +1 -1
- quant_met/mean_field/__init__.py +9 -32
- quant_met/mean_field/hamiltonians/__init__.py +34 -0
- quant_met/mean_field/{base_hamiltonian.py → hamiltonians/base_hamiltonian.py} +125 -16
- quant_met/mean_field/{eg_x.py → hamiltonians/dressed_graphene.py} +48 -25
- quant_met/mean_field/{graphene.py → hamiltonians/graphene.py} +42 -20
- quant_met/mean_field/{one_band_tight_binding.py → hamiltonians/one_band_tight_binding.py} +39 -19
- quant_met/mean_field/quantum_metric.py +24 -25
- quant_met/mean_field/self_consistency.py +22 -18
- quant_met/mean_field/superfluid_weight.py +1 -1
- quant_met/parameters/__init__.py +21 -0
- quant_met/parameters/hamiltonians.py +47 -0
- quant_met/parameters/main.py +40 -0
- quant_met/utils.py +1 -1
- {quant_met-0.0.6.dist-info → quant_met-0.0.8.dist-info}/METADATA +9 -6
- quant_met-0.0.8.dist-info/RECORD +31 -0
- {quant_met-0.0.6.dist-info → quant_met-0.0.8.dist-info}/WHEEL +1 -1
- quant_met-0.0.8.dist-info/entry_points.txt +3 -0
- quant_met/mean_field/free_energy.py +0 -130
- quant_met-0.0.6.dist-info/RECORD +0 -24
- {quant_met-0.0.6.dist-info → quant_met-0.0.8.dist-info}/LICENSE.txt +0 -0
- {quant_met-0.0.6.dist-info → quant_met-0.0.8.dist-info}/LICENSES/MIT.txt +0 -0
@@ -1,130 +0,0 @@
|
|
1
|
-
# SPDX-FileCopyrightText: 2024 Tjark Sievers
|
2
|
-
#
|
3
|
-
# SPDX-License-Identifier: MIT
|
4
|
-
|
5
|
-
"""Functions to calculate the free energy of a BdG Hamiltonian."""
|
6
|
-
|
7
|
-
import numpy as np
|
8
|
-
import numpy.typing as npt
|
9
|
-
|
10
|
-
from .base_hamiltonian import BaseHamiltonian
|
11
|
-
|
12
|
-
|
13
|
-
def free_energy(
|
14
|
-
hamiltonian: BaseHamiltonian,
|
15
|
-
k_points: npt.NDArray[np.float64],
|
16
|
-
) -> float:
|
17
|
-
"""Calculate the free energy of a BdG Hamiltonian.
|
18
|
-
|
19
|
-
Parameters
|
20
|
-
----------
|
21
|
-
hamiltonian : :class:`BaseHamiltonian`
|
22
|
-
Hamiltonian to be evaluated.
|
23
|
-
k_points : :class:`numpy.ndarray`
|
24
|
-
List of k points
|
25
|
-
|
26
|
-
Returns
|
27
|
-
-------
|
28
|
-
float
|
29
|
-
Free energy from the BdG Hamiltonian.
|
30
|
-
|
31
|
-
"""
|
32
|
-
number_k_points = len(k_points)
|
33
|
-
bdg_energies, _ = hamiltonian.diagonalize_bdg(k_points)
|
34
|
-
|
35
|
-
k_array = np.array(
|
36
|
-
[
|
37
|
-
np.sum(np.abs(bdg_energies[k_index][0 : hamiltonian.number_of_bands]))
|
38
|
-
for k_index in range(number_k_points)
|
39
|
-
]
|
40
|
-
)
|
41
|
-
|
42
|
-
integral: float = -np.sum(k_array, axis=-1) / number_k_points + np.sum(
|
43
|
-
np.power(np.abs(hamiltonian.delta_orbital_basis), 2) / hamiltonian.hubbard_int_orbital_basis
|
44
|
-
)
|
45
|
-
|
46
|
-
return integral
|
47
|
-
|
48
|
-
|
49
|
-
def free_energy_complex_gap(
|
50
|
-
delta_vector: npt.NDArray[np.float64],
|
51
|
-
hamiltonian: BaseHamiltonian,
|
52
|
-
k_points: npt.NDArray[np.float64],
|
53
|
-
) -> float:
|
54
|
-
"""Calculate the free energy of a BdG Hamiltonian, with a complex order parameter.
|
55
|
-
|
56
|
-
Parameters
|
57
|
-
----------
|
58
|
-
delta_vector : :class:`numpy.ndarray`
|
59
|
-
Delta in orbital basis, with consecutive floats getting converted into one complex number,
|
60
|
-
so [a, b, c, d] -> [a+b*j, c+d*j].
|
61
|
-
hamiltonian : :class:`BaseHamiltonian`
|
62
|
-
Hamiltonian to be evaluated.
|
63
|
-
k_points : :class:`numpy.ndarray`
|
64
|
-
List of k points
|
65
|
-
|
66
|
-
Returns
|
67
|
-
-------
|
68
|
-
float
|
69
|
-
Free energy from the BdG Hamiltonian.
|
70
|
-
|
71
|
-
"""
|
72
|
-
hamiltonian.delta_orbital_basis = delta_vector[0::2] + 1j * delta_vector[1::2]
|
73
|
-
|
74
|
-
return free_energy(hamiltonian=hamiltonian, k_points=k_points)
|
75
|
-
|
76
|
-
|
77
|
-
def free_energy_real_gap(
|
78
|
-
delta_vector: npt.NDArray[np.float64],
|
79
|
-
hamiltonian: BaseHamiltonian,
|
80
|
-
k_points: npt.NDArray[np.float64],
|
81
|
-
) -> float:
|
82
|
-
"""Calculate the free energy of a BdG Hamiltonian, with a real order parameter.
|
83
|
-
|
84
|
-
Parameters
|
85
|
-
----------
|
86
|
-
delta_vector : :class:`numpy.ndarray`
|
87
|
-
Delta in orbital basis.
|
88
|
-
hamiltonian : :class:`BaseHamiltonian`
|
89
|
-
Hamiltonian to be evaluated.
|
90
|
-
k_points : :class:`numpy.ndarray`
|
91
|
-
List of k points
|
92
|
-
|
93
|
-
Returns
|
94
|
-
-------
|
95
|
-
float
|
96
|
-
Free energy from the BdG Hamiltonian.
|
97
|
-
|
98
|
-
"""
|
99
|
-
hamiltonian.delta_orbital_basis = delta_vector.astype(np.complex64)
|
100
|
-
|
101
|
-
return free_energy(hamiltonian=hamiltonian, k_points=k_points)
|
102
|
-
|
103
|
-
|
104
|
-
def free_energy_uniform_pairing(
|
105
|
-
delta: float,
|
106
|
-
hamiltonian: BaseHamiltonian,
|
107
|
-
k_points: npt.NDArray[np.float64],
|
108
|
-
) -> float:
|
109
|
-
"""Calculate the free energy of a BdG Hamiltonian, with uniform pairing constraint.
|
110
|
-
|
111
|
-
Parameters
|
112
|
-
----------
|
113
|
-
delta : float
|
114
|
-
Delta.
|
115
|
-
hamiltonian : :class:`BaseHamiltonian`
|
116
|
-
Hamiltonian to be evaluated.
|
117
|
-
k_points : :class:`numpy.ndarray`
|
118
|
-
List of k points
|
119
|
-
|
120
|
-
Returns
|
121
|
-
-------
|
122
|
-
float
|
123
|
-
Free energy from the BdG Hamiltonian.
|
124
|
-
|
125
|
-
"""
|
126
|
-
hamiltonian.delta_orbital_basis = np.full(
|
127
|
-
hamiltonian.number_of_bands, fill_value=delta, dtype=np.float64
|
128
|
-
).astype(np.complex64)
|
129
|
-
|
130
|
-
return free_energy(hamiltonian=hamiltonian, k_points=k_points)
|
quant_met-0.0.6.dist-info/RECORD
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
quant_met/__init__.py,sha256=ZO1UFz1awUYTI7B9ZkBwucvDz7GMGXnLLUGnEwLBhkc,155
|
2
|
-
quant_met/geometry/__init__.py,sha256=dWT4yYDBKsJUI9Hv1DDCGtqx-lDLQF6mH7xSRLomvD4,508
|
3
|
-
quant_met/geometry/base_lattice.py,sha256=QVHuZVy6bOvBSITY_mKhr7hYW1jHJ5UAm3sMCFClYZ0,2276
|
4
|
-
quant_met/geometry/bz_path.py,sha256=q_eNhKYjhKLeFNjio8BdKVsseO6slQKlwKKSQQYTVJQ,2497
|
5
|
-
quant_met/geometry/graphene.py,sha256=37CZXj_NpFsnR1pPE_jFbrAiiMFhs1Q3FLlcgqG2pwM,1264
|
6
|
-
quant_met/geometry/square.py,sha256=1fSrHab07uB6ildNzlbTwINJvPa5C2Az0B0uuOVJmMc,1216
|
7
|
-
quant_met/mean_field/__init__.py,sha256=sXKp572huLdcqYEj0b9ojgefLiOiIHV7CH2XN54WU7E,1368
|
8
|
-
quant_met/mean_field/_utils.py,sha256=plkx6eYjyYV3CT3BWwlulqW7L-Q0t1TzZTLR4k7u0dg,666
|
9
|
-
quant_met/mean_field/base_hamiltonian.py,sha256=OUY3uMTU5iFmI77Ffm82BHuUJIk4VXKCr1U43t4LnO4,10778
|
10
|
-
quant_met/mean_field/eg_x.py,sha256=w-6UcSVYPC-B58152aJpp0HDNoxyy46c6eXNZCGHi6Q,5805
|
11
|
-
quant_met/mean_field/free_energy.py,sha256=59GPLJhyllyAJEZteAr6iYqCbHGFsmV1zcYxJ8Aw9Ao,3448
|
12
|
-
quant_met/mean_field/graphene.py,sha256=8xMR43ndL5oJ7BbYBVGxWTLU5BscsE8ixTpPlCZzKO8,4917
|
13
|
-
quant_met/mean_field/one_band_tight_binding.py,sha256=ZfZQZxcqoKRtx3oomQyXwuong81K5vKKg0cyjs5JJ48,4138
|
14
|
-
quant_met/mean_field/quantum_metric.py,sha256=y-ky4bU566TNBxldaYWyloqojfpTODo9gbn4TPe6-4A,3902
|
15
|
-
quant_met/mean_field/self_consistency.py,sha256=KzM7mIwGxzeN4cz82cUEI0AStWlJ6_slW-fiqvlTVPU,1412
|
16
|
-
quant_met/mean_field/superfluid_weight.py,sha256=840Fe3aHOVz1W7hi5GrX69_QxQ3vmdy3H0_B852dZqA,3971
|
17
|
-
quant_met/plotting/__init__.py,sha256=s-DS22impzozKiS7p-v3yCmeccDQfXmBbtPiYMKwH0Y,620
|
18
|
-
quant_met/plotting/plotting.py,sha256=_SqL8GrDqlBtccHnUWpZPqdSJy0Yd_4dhFdUOxOzPpY,7447
|
19
|
-
quant_met/utils.py,sha256=Tvw_YfqjIWx0FPGSReikSnw9xfN-T2dpQZN-KPMa69A,1709
|
20
|
-
quant_met-0.0.6.dist-info/LICENSE.txt,sha256=QO_duPQihSJlaxSLxPAXo52X3esROP5wBkhxqBd1Z4E,1104
|
21
|
-
quant_met-0.0.6.dist-info/LICENSES/MIT.txt,sha256=QO_duPQihSJlaxSLxPAXo52X3esROP5wBkhxqBd1Z4E,1104
|
22
|
-
quant_met-0.0.6.dist-info/METADATA,sha256=h5yPoWNaZQtSKHdldRac4OekVvUca9kzu3AX0jZMU28,2829
|
23
|
-
quant_met-0.0.6.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
24
|
-
quant_met-0.0.6.dist-info/RECORD,,
|
File without changes
|
File without changes
|