quant-met 0.0.9__py3-none-any.whl → 0.0.11__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.
@@ -2,7 +2,22 @@
2
2
  #
3
3
  # SPDX-License-Identifier: MIT
4
4
 
5
- """Pydantic models to hold parameters for Hamiltonians."""
5
+ """
6
+ Hamiltonian Parameter Classes
7
+ =============================
8
+
9
+ Classes holding the configuration for the Hamiltonians.
10
+
11
+ .. autosummary::
12
+ :toctree: generated/parameters/
13
+
14
+ HamiltonianParameters
15
+ DressedGrapheneParameters
16
+ GrapheneParameters
17
+ OneBandParameters
18
+ TwobandParameters
19
+ ThreeBandParameters
20
+ """ # noqa: D205, D400
6
21
 
7
22
  from typing import Literal, TypeVar
8
23
 
@@ -34,10 +49,22 @@ def validate_float(value: float, info: ValidationInfo) -> float:
34
49
 
35
50
 
36
51
  class HamiltonianParameters(BaseModel):
37
- """Base class for Hamiltonian parameters."""
52
+ """Base class for Hamiltonian parameters.
53
+
54
+ Attributes
55
+ ----------
56
+ name : str
57
+ The name of the Hamiltonian model (e.g., "Graphene", "DressedGraphene").
58
+ beta : float
59
+ The inverse temperature; default is set to infinity.
60
+ q : :class:`numpy.ndarray` | None
61
+ An optional numpy array representing the momentum of Cooper pairs.
62
+ hubbard_int_orbital_basis : :class:`numpy.ndarray`
63
+ A numpy array representing the Hubbard interactions in the orbital basis.
64
+ """
38
65
 
39
66
  name: str
40
- beta: float | None = Field(default=None, description="Inverse temperature")
67
+ beta: float = Field(default=np.inf, description="Inverse temperature")
41
68
  q: NDArray[Shape["2"], int | float] | None = Field(
42
69
  default=None, description="Momentum of Cooper pairs"
43
70
  )
@@ -47,7 +74,25 @@ class HamiltonianParameters(BaseModel):
47
74
 
48
75
 
49
76
  class DressedGrapheneParameters(HamiltonianParameters):
50
- """Parameters for the dressed Graphene model."""
77
+ """Parameters for the Dressed Graphene model.
78
+
79
+ Attributes
80
+ ----------
81
+ hopping_gr : float
82
+ Hopping parameter in the graphene layer.
83
+ hopping_x : float
84
+ Hopping parameter at the impurity site.
85
+ hopping_x_gr_a : float
86
+ Hybridization parameter.
87
+ lattice_constant : float
88
+ The lattice constant of the model.
89
+ chemical_potential : float
90
+ The chemical potential.
91
+ hubbard_int_orbital_basis : npt.NDArray[np.float64]
92
+ Hubbard interaction in the orbital basis.
93
+ delta : npt.NDArray[np.complex64] | None
94
+ Initial value for gaps in orbital space.
95
+ """
51
96
 
52
97
  name: Literal["DressedGraphene"] = "DressedGraphene"
53
98
  hopping_gr: float = Field(..., description="Hopping in graphene")
@@ -12,7 +12,20 @@ from .hamiltonians import DressedGrapheneParameters, GrapheneParameters, OneBand
12
12
 
13
13
 
14
14
  class Control(BaseModel):
15
- """Control for the calculation."""
15
+ """Control for the calculation.
16
+
17
+ Attributes
18
+ ----------
19
+ calculation : str
20
+ Specifies the type of calculation to be performed.
21
+ prefix : str
22
+ A string used as a prefix for naming output files generated by the simulation.
23
+ outdir : :class:`pathlib.Path`
24
+ A path indicating the output directory where results will be saved.
25
+ conv_treshold : float
26
+ A float value representing the convergence threshold.
27
+ The calculation will stop when changes in the results drop below this threshold.
28
+ """
16
29
 
17
30
  calculation: str
18
31
  prefix: str
@@ -21,14 +34,33 @@ class Control(BaseModel):
21
34
 
22
35
 
23
36
  class KPoints(BaseModel):
24
- """Control for k points."""
37
+ """Control for k points.
38
+
39
+ Attributes
40
+ ----------
41
+ nk1 : int
42
+ The number of k-points in the first dimension of the k-space grid.
43
+ nk2 : int
44
+ The number of k-points in the second dimension of the k-space grid.
45
+ """
25
46
 
26
47
  nk1: int
27
48
  nk2: int
28
49
 
29
50
 
30
51
  class Parameters(BaseModel):
31
- """Class to hold the parameters for a calculation."""
52
+ """Class to hold the parameters for a calculation.
53
+
54
+ Attributes
55
+ ----------
56
+ control : Control
57
+ An instance of the `Control` class containing settings for the calculation.
58
+ model :
59
+ An instance of one of the Hamiltonian parameter classes, holding the specific parameters
60
+ of the selected Hamiltonian model.
61
+ k_points : KPoints
62
+ An instance of the `KPoints` class that specifies the number of k-points for the simulation.
63
+ """
32
64
 
33
65
  control: Control
34
66
  model: DressedGrapheneParameters | GrapheneParameters | OneBandParameters = Field(
@@ -18,13 +18,11 @@ Functions
18
18
  scatter_into_bz
19
19
  plot_bandstructure
20
20
  plot_superfluid_weight
21
- plot_quantum_metric
22
21
  """ # noqa: D205, D400
23
22
 
24
23
  from .plotting import (
25
24
  format_plot,
26
25
  plot_bandstructure,
27
- plot_quantum_metric,
28
26
  plot_superfluid_weight,
29
27
  scatter_into_bz,
30
28
  )
@@ -34,5 +32,4 @@ __all__ = [
34
32
  "format_plot",
35
33
  "plot_bandstructure",
36
34
  "plot_superfluid_weight",
37
- "plot_quantum_metric",
38
35
  ]
@@ -212,37 +212,3 @@ def plot_superfluid_weight(
212
212
  ax.set_ylabel(r"$D_S\ [t]$")
213
213
 
214
214
  return fig
215
-
216
-
217
- def plot_quantum_metric(
218
- x_data: npt.NDArray[np.float64],
219
- quantum_metric: npt.NDArray[np.float64],
220
- fig_in: matplotlib.figure.Figure | None = None,
221
- ax_in: matplotlib.axes.Axes | None = None,
222
- ) -> matplotlib.figure.Figure:
223
- """Plot quantum metric against some parameter.
224
-
225
- Parameters
226
- ----------
227
- x_data : :class:`numpy.ndarray`
228
- quantum_metric : :class:`numpy.ndarray`
229
- fig_in : :class:`matplotlib.figure.Figure`, optional
230
- ax_in : :class:`matplotlib.axes.Axes`, optional
231
-
232
- Returns
233
- -------
234
- :obj:`matplotlib.figure.Figure`
235
- Figure with the data plotted onto the axis.
236
-
237
- """
238
- if fig_in is None or ax_in is None:
239
- fig, ax = plt.subplots()
240
- else:
241
- fig, ax = fig_in, ax_in
242
-
243
- ax.plot(x_data, quantum_metric, "x--")
244
-
245
- ax = format_plot(ax)
246
- ax.set_ylabel(r"$M\ [t]$")
247
-
248
- return fig
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: quant-met
3
- Version: 0.0.9
3
+ Version: 0.0.11
4
4
  Summary: Calculate superconductivity in flat-band systems.
5
5
  Home-page: https://quant-met.tjarksievers.de
6
6
  Author: Tjark Sievers
@@ -33,51 +33,15 @@ SPDX-License-Identifier: MIT
33
33
  [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/quant-met)](https://pypi.org/project/quant-met/)
34
34
  [![PyPI - Version](https://img.shields.io/pypi/v/quant-met)](https://pypi.org/project/quant-met/)
35
35
 
36
- This is a python package to treat superconductivity in flat-band systems.
36
+ quant-met is a python package to treat superconductivity in flat-band systems.
37
37
 
38
- * Documentation: [quant-met.tjarksievers.de](https://quant-met.tjarksievers.de)
39
-
40
- ## Installation
41
-
42
- The package can be installed via
43
- ```shell
44
- pip install quant-met
45
- ```
46
-
47
- ## Usage
48
-
49
- For usage examples see [documentation](https://quant-met.tjarksievers.de/en/latest/examples.html).
38
+ - Documentation: [quant-met.tjarksievers.de](https://quant-met.tjarksievers.de)
39
+ - user guide see [documentation](https://quant-met.tjarksievers.de/en/latest/examples.html).
50
40
 
51
41
  ## Contributing
52
42
 
53
43
  This is a personal project, very geared to the work I did in my master's thesis.
54
44
  If someone is using this and experiencing bugs or want the software extended, feel free to open an issue!
55
45
 
56
- ### Developing
57
-
58
- You can also help develop this software further.
59
- This should help you get set up to start this.
60
-
61
- Prerequisites:
62
- * make
63
- * python
64
- * conda
65
-
66
- Set up the development environment:
67
- * clone the repository
68
- * run `make environment`
69
- * now activate the conda environment `conda activate quant-met-dev`
70
-
71
- You can manually run tests using for example `tox -e py312` (for running against python 3.12).
72
- After pushing your branch, all tests will also be run via Github Actions.
73
-
74
- Using `pre-commit`, automatic linting and formatting is done before every commit, which may cause the first commit to fail.
75
- A second try should then succeed.
76
-
77
- To fix the reuse copyright:
78
- ```bash
79
- reuse annotate --license=MIT --copyright="Tjark Sievers" --skip-unrecognised -r .
80
- ```
81
-
82
- After you are done working on an issue and all tests are running successful, you can add a new piece of changelog via `scriv create` and make a pull request.
46
+ If you want to contribute, see [documentation](https://quant-met.tjarksievers.de/en/latest/examples.html).
83
47
 
@@ -0,0 +1,33 @@
1
+ quant_met/__init__.py,sha256=ZO1UFz1awUYTI7B9ZkBwucvDz7GMGXnLLUGnEwLBhkc,155
2
+ quant_met/cli/__init__.py,sha256=nGFXhK8zWyEKQtsQTyJWfEOLFOHTCjZnfEcrVb2dARc,254
3
+ quant_met/cli/main.py,sha256=VyOu4FhpDR_CsSDaFcY4FlYrRxnRRCBFpwhLLB2GP2Y,1729
4
+ quant_met/cli/scf.py,sha256=AT5321oo50siqm_7pY4MOi70arHZ2zO8_xrWB54YtRI,2310
5
+ quant_met/geometry/__init__.py,sha256=5BLliTnMzlzPrjzmphQ_EpTE6f6dF-uXgQU_Qj8sBoI,592
6
+ quant_met/geometry/base_lattice.py,sha256=dUBk3167cppy5nUNSEbXq57rwgbVnIen20jC_vrhomA,2642
7
+ quant_met/geometry/bz_path.py,sha256=q_eNhKYjhKLeFNjio8BdKVsseO6slQKlwKKSQQYTVJQ,2497
8
+ quant_met/geometry/graphene.py,sha256=AIKI2ice7LiKk5LHS27w97FkUds0UFV7EVNML3W5D28,1623
9
+ quant_met/geometry/square.py,sha256=lAEJ2R_2VBBPI_Bc-x-KhPE5r8AGoY1RgAx8GdoqdNY,1561
10
+ quant_met/mean_field/__init__.py,sha256=JgF26LUDI6LqOZdws6uZnilqdrEhj_3ysq-zElsL4DU,645
11
+ quant_met/mean_field/_utils.py,sha256=7hr0DDSdIqjft5Jjluvbw_HGoNLWgYJTxyuPJJvhBnc,356
12
+ quant_met/mean_field/hamiltonians/__init__.py,sha256=kLe31GiWYvPshl2-tpjEz0AHct2S1AuwRakAK2XDNSg,681
13
+ quant_met/mean_field/hamiltonians/base_hamiltonian.py,sha256=_GZLmNAcRAu6NGCM8PnwacPV9AlOxrGLo0vdgrcoBvM,18295
14
+ quant_met/mean_field/hamiltonians/dressed_graphene.py,sha256=sTApzorTj0jeXdEzeDxNUxuvSWq44UtVPwDzRawbvXs,4035
15
+ quant_met/mean_field/hamiltonians/graphene.py,sha256=tnmaaBka3G_vAMrg8ZsVcNGYjPPMPB3Z3NQfTbGRJNM,3263
16
+ quant_met/mean_field/hamiltonians/one_band_tight_binding.py,sha256=SXHPoVd_zyevNvUvmHuK85cfs2Y-_8phBbE7qM62RIE,2499
17
+ quant_met/mean_field/hamiltonians/three_band_tight_binding.py,sha256=MuOxUTPPBENjKBotPVQH-8343y4dv73jtZXo-w8mJsA,3282
18
+ quant_met/mean_field/hamiltonians/two_band_tight_binding.py,sha256=Vk01wY1UP4V1yYHZ9RmlbB0cybPJjGlrBUkR8d3o3j8,2852
19
+ quant_met/mean_field/quantum_metric.py,sha256=2yRu2bfgMxgPcVqasmqfgUy8-O7gXJwJI7ziuvIShXU,2580
20
+ quant_met/mean_field/self_consistency.py,sha256=nmP6WBJaP0TPS9T1U0k7kOmv7qxsF1QiUIHY5w-IsuQ,3287
21
+ quant_met/mean_field/superfluid_weight.py,sha256=0T_vkJB9AvjeaPG_y5h_3ZHh-0MCefeXnaPOn-hYjKw,4127
22
+ quant_met/parameters/__init__.py,sha256=i1pOw78ZshfBsUiUOKVo17C5xD9PfeJvlKITDRFKFvo,968
23
+ quant_met/parameters/hamiltonians.py,sha256=u5a-hVC6FzY1kHFdcHlNG7i3c7T5vpC-XPraTg_WzVM,6402
24
+ quant_met/parameters/main.py,sha256=acLuOLn5KD9_h5cbnd5H3akkF9XwcwAhLqV7jYJh0OA,1932
25
+ quant_met/plotting/__init__.py,sha256=HEt2KKhUOR1he2cKL9GLfGfqN87Q6jl_AKylGC20U4g,544
26
+ quant_met/plotting/plotting.py,sha256=ueFKhGK2mo-_JKifhRlgT6WDuEbKSMwDaTNnl70tCZQ,6583
27
+ quant_met/utils.py,sha256=JG_tShSL1JIi-Fn-N6mVD6J0sl7Egf-zuHnOSEKu7VA,1666
28
+ quant_met-0.0.11.dist-info/LICENSE.txt,sha256=QO_duPQihSJlaxSLxPAXo52X3esROP5wBkhxqBd1Z4E,1104
29
+ quant_met-0.0.11.dist-info/LICENSES/MIT.txt,sha256=QO_duPQihSJlaxSLxPAXo52X3esROP5wBkhxqBd1Z4E,1104
30
+ quant_met-0.0.11.dist-info/METADATA,sha256=Fy7ESr_LWvQODvKzt25oGpcqc9PM8TFa09Opt67dz38,2045
31
+ quant_met-0.0.11.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
32
+ quant_met-0.0.11.dist-info/entry_points.txt,sha256=fuVnEk5wiqPMEhn-Cc7q0Hdk2s_OniOn0zfdFPicH4Y,47
33
+ quant_met-0.0.11.dist-info/RECORD,,
@@ -1,33 +0,0 @@
1
- quant_met/__init__.py,sha256=ZO1UFz1awUYTI7B9ZkBwucvDz7GMGXnLLUGnEwLBhkc,155
2
- quant_met/cli/__init__.py,sha256=If5Jdi7mG-5PbIyjQGxnt9o2bsY5VyE3qtdcO5yTGnQ,321
3
- quant_met/cli/main.py,sha256=EZTRRTfrN3z-srgbG2BoDg64iYBjzZLuuMtrxTdZU8s,698
4
- quant_met/cli/scf.py,sha256=sc26jlsslZkVOw8Y88Fgm8gR6DZ99VhtNePqgsd8Ac4,1434
5
- quant_met/geometry/__init__.py,sha256=uCLEDBrYuMUkEgJmPnLAvR2WlmvoM9X9_cV_Q2zMzoA,620
6
- quant_met/geometry/base_lattice.py,sha256=dUBk3167cppy5nUNSEbXq57rwgbVnIen20jC_vrhomA,2642
7
- quant_met/geometry/bz_path.py,sha256=q_eNhKYjhKLeFNjio8BdKVsseO6slQKlwKKSQQYTVJQ,2497
8
- quant_met/geometry/graphene.py,sha256=AIKI2ice7LiKk5LHS27w97FkUds0UFV7EVNML3W5D28,1623
9
- quant_met/geometry/square.py,sha256=lAEJ2R_2VBBPI_Bc-x-KhPE5r8AGoY1RgAx8GdoqdNY,1561
10
- quant_met/mean_field/__init__.py,sha256=yH_UovKDaP5c06cb1uWPtvIO2WQ76pi6ZTsNBzE8oso,793
11
- quant_met/mean_field/_utils.py,sha256=7hr0DDSdIqjft5Jjluvbw_HGoNLWgYJTxyuPJJvhBnc,356
12
- quant_met/mean_field/hamiltonians/__init__.py,sha256=bThuXC2jHzyD6rG0CAII8huD2kCRnc_Dp-Cl7g3MDxg,741
13
- quant_met/mean_field/hamiltonians/base_hamiltonian.py,sha256=51uargS4B2MNAa-GFxuQ_hzZjIOhlfjBFwyeDMWs8gk,12653
14
- quant_met/mean_field/hamiltonians/dressed_graphene.py,sha256=arOfEFegblNTckow1_Xz-sf7xPNahcasjv_kGo-n4PE,4744
15
- quant_met/mean_field/hamiltonians/graphene.py,sha256=IDQVWDzGDgIliyNGPP-c-tsfEeevhdrbD1I4fZKHQJw,3972
16
- quant_met/mean_field/hamiltonians/one_band_tight_binding.py,sha256=Yj_AX6llD-It_VupY6tOgwUfpypt4S5Hw4yGNpz1GXE,3166
17
- quant_met/mean_field/hamiltonians/three_band_tight_binding.py,sha256=4-7ryAM0vYxuLX65Y2IPGv6pTbx7NaY_l-G9wgdDjHI,3967
18
- quant_met/mean_field/hamiltonians/two_band_tight_binding.py,sha256=kTqZ5VWGleHhB5leCF22TdnD9yS7T9LKmhs7OqdXe0Q,3539
19
- quant_met/mean_field/quantum_metric.py,sha256=dBHh5OW_noTfhNW_kAkjuvfHiMdWmoPPwCDEdR05_2s,3992
20
- quant_met/mean_field/self_consistency.py,sha256=riyrqjZZSg9L1Ryu_qz-fT3DY8mU5xUyvpmgK8XQgGo,1203
21
- quant_met/mean_field/superfluid_weight.py,sha256=c7fNcq7JQQBpKt0R5JjkGlO-pAoznblPkA__5rNCyVw,4118
22
- quant_met/parameters/__init__.py,sha256=t2bjPDW7pVYKP8nLG4mnFEgKiype6xbt8nK4YnKh9UQ,736
23
- quant_met/parameters/hamiltonians.py,sha256=JcXXwR31FUSMcqCZmix8oGC4iy1IqregiFtD45Uht-4,5087
24
- quant_met/parameters/main.py,sha256=_pBm9tvlOPjoZ-2ECVMegyCaSXkfD6IwdhHk5s9oRKw,790
25
- quant_met/plotting/__init__.py,sha256=s-DS22impzozKiS7p-v3yCmeccDQfXmBbtPiYMKwH0Y,620
26
- quant_met/plotting/plotting.py,sha256=_SqL8GrDqlBtccHnUWpZPqdSJy0Yd_4dhFdUOxOzPpY,7447
27
- quant_met/utils.py,sha256=JG_tShSL1JIi-Fn-N6mVD6J0sl7Egf-zuHnOSEKu7VA,1666
28
- quant_met-0.0.9.dist-info/LICENSE.txt,sha256=QO_duPQihSJlaxSLxPAXo52X3esROP5wBkhxqBd1Z4E,1104
29
- quant_met-0.0.9.dist-info/LICENSES/MIT.txt,sha256=QO_duPQihSJlaxSLxPAXo52X3esROP5wBkhxqBd1Z4E,1104
30
- quant_met-0.0.9.dist-info/METADATA,sha256=mY2CC8l98QgEPyGx4KrRUfQ7kqDtbfqI6qCTYnnHhew,2953
31
- quant_met-0.0.9.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
32
- quant_met-0.0.9.dist-info/entry_points.txt,sha256=fuVnEk5wiqPMEhn-Cc7q0Hdk2s_OniOn0zfdFPicH4Y,47
33
- quant_met-0.0.9.dist-info/RECORD,,