quant-met 0.1.1__tar.gz → 0.1.3__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.
- {quant_met-0.1.1 → quant_met-0.1.3}/.github/workflows/check_version.yml +2 -2
- {quant_met-0.1.1 → quant_met-0.1.3}/.github/workflows/integration_tests.yml +2 -2
- {quant_met-0.1.1 → quant_met-0.1.3}/.github/workflows/linting.yml +2 -2
- {quant_met-0.1.1 → quant_met-0.1.3}/.github/workflows/publish.yml +1 -1
- {quant_met-0.1.1 → quant_met-0.1.3}/.github/workflows/typing.yml +2 -2
- {quant_met-0.1.1 → quant_met-0.1.3}/.github/workflows/unit_tests.yml +1 -1
- {quant_met-0.1.1 → quant_met-0.1.3}/CHANGELOG.rst +20 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/PKG-INFO +1 -1
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/extra/versions.json +1 -1
- {quant_met-0.1.1 → quant_met-0.1.3}/pyproject.toml +1 -1
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/bdg/bdg_hamiltonian.py +2 -5
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/bdg/gap_equation.py +1 -1
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/bdg/superfluid_weight.py +3 -1
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/cli/q_analysis.py +2 -1
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/cli/q_loop.py +4 -1
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/parameters/control.py +2 -2
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/routines/search_crit_temp.py +2 -2
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/routines/self_consistency.py +1 -1
- {quant_met-0.1.1 → quant_met-0.1.3}/tests/test_bdg.py +2 -1
- {quant_met-0.1.1 → quant_met-0.1.3}/tests/test_scf.py +1 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/uv.lock +1455 -1457
- {quant_met-0.1.1 → quant_met-0.1.3}/.coveragerc +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/.github/codspeed.yml +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/.github/dependabot.yml +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/.gitignore +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/.pre-commit-config.yaml +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/.readthedocs.yaml +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/.vscode/settings.json +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/LICENSE.txt +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/Makefile +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/README.md +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/changelog.d/scriv.ini +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/check_version.sh +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/Makefile +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/make.bat +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/requirements.txt +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/_static/custom.css +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/_templates/autosummary/attribute.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/_templates/autosummary/class.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/_templates/autosummary/function.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/_templates/autosummary/method.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/_templates/autosummary/module.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/_templates/autosummary/property.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/changelog.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/conf.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/development.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/dec-graphene.HSX +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/decorated_graphene_nonint.ipynb +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/decorated_graphene_scf.ipynb +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/decorated_graphene_sisl.ipynb +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/example-crit-temp.yaml +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/example-q-analysis-dec-graphene.yaml +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/example-q-loop-dec-graphene.yaml +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/example-q-loop-from-scratch.yaml +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/example-q-loop.yaml +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/example-scf.yaml +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/hamiltonian.HSX +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/examples/test_sisl.ipynb +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/index.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/bdg.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/cli.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/generated/parameters/quant_met.parameters.Control.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/generated/parameters/quant_met.parameters.KPoints.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/generated/parameters/quant_met.parameters.Parameters.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/generated/quant_met.bdg.bdg_hamiltonian.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/generated/quant_met.bdg.calculate_current_density.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/generated/quant_met.bdg.calculate_superfluid_weight.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/generated/quant_met.bdg.diagonalize_bdg.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/generated/quant_met.bdg.gap_equation.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/generated/quant_met.cli.cli.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/generated/quant_met.quantum_geometry.calculate_qgt.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/generated/quant_met.routines.self_consistency_loop.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/index.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/parameters.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/quantum_geometry.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/reference/routines.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/user_guide/first-scf.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/user_guide/search_T_C.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/docs/source/user_guide.rst +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/justfile +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/__init__.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/bdg/__init__.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/bdg/sc_current.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/cli/__init__.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/cli/crit_temp.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/cli/main.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/cli/scf.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/parameters/__init__.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/parameters/main.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/quantum_geometry/__init__.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/quantum_geometry/qgt.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/routines/__init__.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/routines/analyse_q_data.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/routines/loop_over_q.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/src/quant_met/utils.py +0 -0
- {quant_met-0.1.1 → quant_met-0.1.3}/tests/conftest.py +0 -0
@@ -11,11 +11,11 @@ jobs:
|
|
11
11
|
runs-on: ubuntu-latest
|
12
12
|
if: ${{ startsWith(github.head_ref, 'release') }}
|
13
13
|
steps:
|
14
|
-
- uses: getsentry/action-setup-venv@v2.
|
14
|
+
- uses: getsentry/action-setup-venv@v2.2.0
|
15
15
|
id: venv
|
16
16
|
with:
|
17
17
|
python-version: 3.12.2
|
18
18
|
install-cmd: pip install quant-met poetry
|
19
|
-
- uses: actions/checkout@
|
19
|
+
- uses: actions/checkout@v5
|
20
20
|
- name: check version
|
21
21
|
run: ./check_version.sh
|
@@ -21,10 +21,10 @@ jobs:
|
|
21
21
|
if: ${{ contains(github.event.head_commit.message, 'needs-integration') || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
|
22
22
|
runs-on: ubuntu-latest
|
23
23
|
steps:
|
24
|
-
- uses: actions/checkout@
|
24
|
+
- uses: actions/checkout@v5
|
25
25
|
with:
|
26
26
|
fetch-depth: 0
|
27
|
-
- uses: actions/checkout@
|
27
|
+
- uses: actions/checkout@v5
|
28
28
|
- name: Install uv
|
29
29
|
uses: astral-sh/setup-uv@v6
|
30
30
|
- name: Install the project
|
@@ -17,11 +17,11 @@ jobs:
|
|
17
17
|
name: Linting
|
18
18
|
runs-on: ubuntu-latest
|
19
19
|
steps:
|
20
|
-
- uses: actions/checkout@
|
20
|
+
- uses: actions/checkout@v5
|
21
21
|
with:
|
22
22
|
fetch-depth: 0
|
23
23
|
- name: Set up Python 3.12
|
24
|
-
uses: actions/setup-python@
|
24
|
+
uses: actions/setup-python@v6
|
25
25
|
with:
|
26
26
|
python-version: "3.12"
|
27
27
|
- name: Install uv
|
@@ -17,11 +17,11 @@ jobs:
|
|
17
17
|
name: Type checking
|
18
18
|
runs-on: ubuntu-latest
|
19
19
|
steps:
|
20
|
-
- uses: actions/checkout@
|
20
|
+
- uses: actions/checkout@v5
|
21
21
|
with:
|
22
22
|
fetch-depth: 0
|
23
23
|
- name: Set up Python 3.12
|
24
|
-
uses: actions/setup-python@
|
24
|
+
uses: actions/setup-python@v6
|
25
25
|
with:
|
26
26
|
python-version: "3.12"
|
27
27
|
- name: Install uv
|
@@ -1,4 +1,24 @@
|
|
1
1
|
|
2
|
+
.. _changelog-0.1.3:
|
3
|
+
|
4
|
+
0.1.3 — 2025-09-07
|
5
|
+
------------------
|
6
|
+
|
7
|
+
Fixed
|
8
|
+
^^^^^
|
9
|
+
|
10
|
+
- Add a default (0, 0, 0) for q in parameters
|
11
|
+
|
12
|
+
.. _changelog-0.1.2:
|
13
|
+
|
14
|
+
0.1.2 — 2025-07-27
|
15
|
+
------------------
|
16
|
+
|
17
|
+
Fixed
|
18
|
+
^^^^^
|
19
|
+
|
20
|
+
- q-analysis CLI routine deletes the result file only if it exists
|
21
|
+
|
2
22
|
.. _changelog-0.1.1:
|
3
23
|
|
4
24
|
0.1.1 — 2025-07-27
|
@@ -9,7 +9,7 @@ def bdg_hamiltonian(
|
|
9
9
|
hamiltonian: sisl.Hamiltonian,
|
10
10
|
k: npt.NDArray[np.floating],
|
11
11
|
delta_orbital_basis: npt.NDArray[np.complexfloating],
|
12
|
-
q: npt.NDArray[np.floating]
|
12
|
+
q: npt.NDArray[np.floating],
|
13
13
|
) -> npt.NDArray[np.complexfloating]:
|
14
14
|
"""
|
15
15
|
Construct the BdG Hamiltonian at momentum k.
|
@@ -34,9 +34,6 @@ def bdg_hamiltonian(
|
|
34
34
|
n_k_points = k.shape[0]
|
35
35
|
n_orbitals = hamiltonian.no
|
36
36
|
|
37
|
-
if q is None:
|
38
|
-
q = np.zeros(3)
|
39
|
-
|
40
37
|
h_bdg = np.zeros((n_k_points, 2 * n_orbitals, 2 * n_orbitals), dtype=np.complex128)
|
41
38
|
|
42
39
|
for i, kpt in enumerate(k):
|
@@ -58,7 +55,7 @@ def diagonalize_bdg(
|
|
58
55
|
hamiltonian: sisl.Hamiltonian,
|
59
56
|
kgrid: sisl.MonkhorstPack,
|
60
57
|
delta_orbital_basis: np.ndarray,
|
61
|
-
q: npt.NDArray[np.floating]
|
58
|
+
q: npt.NDArray[np.floating],
|
62
59
|
) -> tuple[npt.NDArray[np.float64], npt.NDArray[np.complex128]]:
|
63
60
|
"""Diagonalizes the BdG Hamiltonian.
|
64
61
|
|
@@ -14,7 +14,7 @@ def gap_equation( # noqa: PLR0913
|
|
14
14
|
hubbard_int_orbital_basis: npt.NDArray[np.float64],
|
15
15
|
delta_orbital_basis: npt.NDArray[np.complex128],
|
16
16
|
kgrid: sisl.MonkhorstPack,
|
17
|
-
q: npt.NDArray[np.float64]
|
17
|
+
q: npt.NDArray[np.float64],
|
18
18
|
) -> npt.NDArray[np.complexfloating]:
|
19
19
|
"""Gap equation.
|
20
20
|
|
@@ -24,7 +24,9 @@ def calculate_superfluid_weight(
|
|
24
24
|
k_tuple = tuple(k_point)
|
25
25
|
|
26
26
|
# Solve BdG problem
|
27
|
-
bdg_h = bdg_hamiltonian(
|
27
|
+
bdg_h = bdg_hamiltonian(
|
28
|
+
hamiltonian, k_point, delta_orbital_basis, q=np.array([0.0, 0.0, 0.0])
|
29
|
+
)
|
28
30
|
energies, wavefuncs = np.linalg.eigh(bdg_h)
|
29
31
|
|
30
32
|
# Cache coefficient tensor
|
@@ -44,7 +44,8 @@ def q_analysis(parameters: Parameters) -> None:
|
|
44
44
|
) = routines.get_lengths_vs_temp(q_data=q_data, hamiltonian=hamiltonian)
|
45
45
|
|
46
46
|
result_file = Path(f"{parameters.control.outdir}/{parameters.control.prefix}_sc_lengths.hdf5")
|
47
|
-
result_file.
|
47
|
+
if result_file.exists():
|
48
|
+
result_file.unlink()
|
48
49
|
lengths_vs_temp.to_hdf(result_file, key="lengths_vs_temp")
|
49
50
|
gap_and_current_fig.savefig(
|
50
51
|
f"{parameters.control.outdir}/{parameters.control.prefix}_gap_and_current_vs_q.pdf",
|
@@ -40,10 +40,13 @@ def q_loop(parameters: Parameters) -> None:
|
|
40
40
|
delta_vs_temp, critical_temperatures, fit_fig = routines.search_crit_temp(
|
41
41
|
hamiltonian=hamiltonian,
|
42
42
|
kgrid=k_grid_obj,
|
43
|
-
hubbard_int_orbital_basis=np.array(
|
43
|
+
hubbard_int_orbital_basis=np.array(
|
44
|
+
parameters.control.crit_temp.hubbard_int_orbital_basis
|
45
|
+
),
|
44
46
|
epsilon=parameters.control.crit_temp.conv_treshold,
|
45
47
|
max_iter=parameters.control.crit_temp.max_iter,
|
46
48
|
n_temp_points=20,
|
49
|
+
q=np.array([0.0, 0.0, 0.0]),
|
47
50
|
)
|
48
51
|
logger.info("Search for T_C completed successfully.")
|
49
52
|
logger.info("Obtained T_Cs: %s", critical_temperatures)
|
@@ -25,7 +25,7 @@ class SCF(ControlBase):
|
|
25
25
|
calculation: Literal["scf"]
|
26
26
|
beta: float
|
27
27
|
calculate_additional: bool = False
|
28
|
-
q: FloatList
|
28
|
+
q: FloatList = [0.0, 0.0, 0.0]
|
29
29
|
|
30
30
|
|
31
31
|
class CritTemp(ControlBase):
|
@@ -33,7 +33,7 @@ class CritTemp(ControlBase):
|
|
33
33
|
|
34
34
|
calculation: Literal["crit-temp"]
|
35
35
|
n_temp_points: int = 50
|
36
|
-
q: FloatList
|
36
|
+
q: FloatList = [0.0, 0.0, 0.0]
|
37
37
|
|
38
38
|
|
39
39
|
class QLoop(ControlBase):
|
@@ -136,9 +136,9 @@ def _gap_for_temp( # noqa: PLR0913
|
|
136
136
|
kgrid: sisl.MonkhorstPack,
|
137
137
|
hubbard_int_orbital_basis: npt.NDArray[np.float64],
|
138
138
|
epsilon: float,
|
139
|
+
q: npt.NDArray[np.float64],
|
139
140
|
max_iter: int = 1000,
|
140
141
|
delta_init: npt.NDArray[np.complex128] | None = None,
|
141
|
-
q: npt.NDArray[np.float64] | None = None,
|
142
142
|
) -> dict[str, Any] | None: # pragma: no cover
|
143
143
|
beta = np.inf if temp == 0 else 1 / temp
|
144
144
|
try:
|
@@ -170,7 +170,7 @@ def search_crit_temp( # noqa: PLR0913
|
|
170
170
|
epsilon: float,
|
171
171
|
max_iter: int,
|
172
172
|
n_temp_points: int,
|
173
|
-
q: npt.NDArray[np.float64]
|
173
|
+
q: npt.NDArray[np.float64],
|
174
174
|
beta_init: float | None = None,
|
175
175
|
) -> tuple[pd.DataFrame, list[float], matplotlib.figure.Figure]: # pragma: no cover
|
176
176
|
"""Search for critical temperature."""
|
@@ -18,9 +18,9 @@ def self_consistency_loop( # noqa: PLR0913
|
|
18
18
|
beta: float,
|
19
19
|
hubbard_int_orbital_basis: npt.NDArray[np.float64],
|
20
20
|
epsilon: float,
|
21
|
+
q: npt.NDArray[np.float64],
|
21
22
|
max_iter: int = 1000,
|
22
23
|
delta_init: npt.NDArray[np.complex128] | None = None,
|
23
|
-
q: npt.NDArray[np.float64] | None = None,
|
24
24
|
) -> ndarray[tuple[int, ...], dtype[complexfloating]]:
|
25
25
|
"""Self-consistently solves the gap equation for a given Hamiltonian.
|
26
26
|
|
@@ -10,7 +10,8 @@ def test_bdg_square_lattice(square_lattice_tb):
|
|
10
10
|
bdg = bdg_hamiltonian(
|
11
11
|
hamiltonian=square_lattice_tb,
|
12
12
|
k=k,
|
13
|
-
delta_orbital_basis=np.array([delta_0])
|
13
|
+
delta_orbital_basis=np.array([delta_0]),
|
14
|
+
q=np.array([0.0, 0.0, 0.0])
|
14
15
|
)
|
15
16
|
|
16
17
|
assert bdg.shape == (2, 2)
|