quadlib 0.1.0__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.
- quadlib/__init__.py +39 -0
- quadlib/basis/__init__.py +60 -0
- quadlib/basis/boson.py +61 -0
- quadlib/basis/discrete.py +71 -0
- quadlib/basis/expdvr.py +80 -0
- quadlib/basis/hodvr.py +51 -0
- quadlib/basis/jbasis.py +87 -0
- quadlib/basis/sindvr.py +97 -0
- quadlib/basis/spin.py +64 -0
- quadlib/cli/__init__.py +0 -0
- quadlib/cli/qlb_offset_oper_dof.py +34 -0
- quadlib/experimental/__init__.py +17 -0
- quadlib/experimental/cpd_eom.py +95 -0
- quadlib/experimental/mctdh.py +32 -0
- quadlib/experimental/node.py +259 -0
- quadlib/experimental/pdof.py +9 -0
- quadlib/experimental/tree.py +138 -0
- quadlib/hdmctdh/__init__.py +0 -0
- quadlib/hdmctdh/rundirectory.py +74 -0
- quadlib/legacy/__init__.py +14 -0
- quadlib/legacy/math.py +1337 -0
- quadlib/operator/sop.py +250 -0
- quadlib/propagation/__init__.py +17 -0
- quadlib/propagation/cpd.py +35 -0
- quadlib/propagation/exact.py +139 -0
- quadlib/propagation/integrators.py +108 -0
- quadlib/tools/__init__.py +0 -0
- quadlib/tools/bath.py +84 -0
- quadlib/tools/constants.py +289 -0
- quadlib/tools/iterators.py +276 -0
- quadlib/tools/linalg.py +215 -0
- quadlib/tools/pulses.py +187 -0
- quadlib/tools/spectra.py +179 -0
- quadlib/tools/tensor.py +227 -0
- quadlib/wavefunction/__init__.py +0 -0
- quadlib/wavefunction/wfn_cpd.py +266 -0
- quadlib/wavefunction/wfn_exact.py +147 -0
- quadlib-0.1.0.dist-info/METADATA +135 -0
- quadlib-0.1.0.dist-info/RECORD +43 -0
- quadlib-0.1.0.dist-info/WHEEL +5 -0
- quadlib-0.1.0.dist-info/entry_points.txt +2 -0
- quadlib-0.1.0.dist-info/licenses/LICENSE +19 -0
- quadlib-0.1.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quadlib
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: QuaDLib: Quantum Dynamics Library for Research, Development and Education
|
|
5
|
+
Author-email: Oriol Vendrell <oriol.vendrell@uni-heidelberg.de>, Sudip Sasmal <sudipsasmal.chem@gmail.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://gitlab.com/tc-heidelberg/quadlib
|
|
8
|
+
Project-URL: Repository, https://gitlab.com/tc-heidelberg/quadlib
|
|
9
|
+
Project-URL: Issues, https://gitlab.com/tc-heidelberg/quadlib/-/issues
|
|
10
|
+
Keywords: quantum dynamics,MCTDH,tensor decomposition,DVR,wavepacket propagation
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Intended Audience :: Education
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
22
|
+
Requires-Python: >=3.10
|
|
23
|
+
Description-Content-Type: text/markdown
|
|
24
|
+
License-File: LICENSE
|
|
25
|
+
Requires-Dist: numpy
|
|
26
|
+
Requires-Dist: scipy
|
|
27
|
+
Provides-Extra: plot
|
|
28
|
+
Requires-Dist: matplotlib; extra == "plot"
|
|
29
|
+
Provides-Extra: jupyter
|
|
30
|
+
Requires-Dist: matplotlib; extra == "jupyter"
|
|
31
|
+
Requires-Dist: jupyterlab; extra == "jupyter"
|
|
32
|
+
Requires-Dist: ipykernel; extra == "jupyter"
|
|
33
|
+
Requires-Dist: jupytext; extra == "jupyter"
|
|
34
|
+
Provides-Extra: dev
|
|
35
|
+
Requires-Dist: pytest; extra == "dev"
|
|
36
|
+
Requires-Dist: ruff; extra == "dev"
|
|
37
|
+
Dynamic: license-file
|
|
38
|
+
|
|
39
|
+
# QuaDLib
|
|
40
|
+
|
|
41
|
+
Quantum Dynamics Library for Research, Development and Education.
|
|
42
|
+
|
|
43
|
+
QuaDLib is a pure-Python library for quantum dynamics, built on NumPy
|
|
44
|
+
and SciPy. It serves as a test bed for methods development and as a
|
|
45
|
+
teaching tool; the tree-tensor-network (ML-MCTDH) methods it is meant
|
|
46
|
+
to host are not implemented yet.
|
|
47
|
+
|
|
48
|
+
## What works
|
|
49
|
+
|
|
50
|
+
- Primitive bases: sine, exponential and harmonic-oscillator DVRs
|
|
51
|
+
(`Sindvr`, `Expdvr`, `HOdvr`), boson, spin-1/2, angular momentum and
|
|
52
|
+
discrete bases (`Boson`, `Spin`, `Jbasis`, `Discrete`).
|
|
53
|
+
- Sum-of-products operators (`SOP`), with their full dense or sparse
|
|
54
|
+
matrix representation.
|
|
55
|
+
- Numerically exact propagation of a full wavefunction tensor
|
|
56
|
+
(`WfnExact`, `quadlib.propagation.propagate_exact`), either by
|
|
57
|
+
integrating the TDSE with the SOP right-hand side (`solver='zvode'`)
|
|
58
|
+
or with `scipy.sparse.linalg.expm_multiply` on the sparse Hamiltonian
|
|
59
|
+
matrix (`solver='expm'`). The second is faster and exact to machine
|
|
60
|
+
precision as long as the sparse matrix fits in memory; operators with
|
|
61
|
+
dense matrices on several degrees of freedom in one term favour the
|
|
62
|
+
first.
|
|
63
|
+
- CPD wavefunctions (`WfnCPD`): norm, overlaps, reduced densities,
|
|
64
|
+
expectation values, and propagation of the coefficient vector with
|
|
65
|
+
frozen single-particle functions (`propagate_cpd_A`).
|
|
66
|
+
- Bath discretization of spectral densities (`quadlib.tools.bath`),
|
|
67
|
+
correlation-function spectra and Fourier transforms
|
|
68
|
+
(`quadlib.tools.spectra`).
|
|
69
|
+
- Reading the autocorrelation function of an existing Heidelberg MCTDH
|
|
70
|
+
run directory (`Rundirectory`).
|
|
71
|
+
|
|
72
|
+
## Experimental
|
|
73
|
+
|
|
74
|
+
`quadlib.experimental` holds unfinished or known-incorrect code and is
|
|
75
|
+
not imported by `quadlib`: the tree data structures (`Node`, `Tree`,
|
|
76
|
+
`Pdof`), placeholders for the MCTDH equations of motion, and the coupled
|
|
77
|
+
CPD equations of motion.
|
|
78
|
+
`quadlib.legacy` keeps older utilities that the library does not use.
|
|
79
|
+
|
|
80
|
+
## Installation
|
|
81
|
+
|
|
82
|
+
Python 3.10 or later. NumPy and SciPy are the only required dependencies.
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
pip install quadlib
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Extras:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
pip install "quadlib[plot]" # matplotlib, for the plotting helpers
|
|
92
|
+
pip install "quadlib[jupyter]" # JupyterLab and jupytext, for the notebooks
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
From source:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
git clone https://gitlab.com/tc-heidelberg/quadlib.git
|
|
99
|
+
cd quadlib
|
|
100
|
+
pip install -e ".[plot,dev]" # dev adds pytest and ruff
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
or a specific release without cloning:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
pip install git+https://gitlab.com/tc-heidelberg/quadlib.git@v0.1.0
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Tests and examples
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
pytest # fast tests
|
|
113
|
+
pytest -m slow # long reference tests (about one minute)
|
|
114
|
+
ruff check # linter
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
Worked examples are in `docs/notebooks` (jupytext format):
|
|
118
|
+
`spin_boson_example.py` (exact propagation of a spin-boson model),
|
|
119
|
+
`td-cpd_example.md` (CPD wavefunction), and `bath_tests.md` (bath
|
|
120
|
+
discretization).
|
|
121
|
+
|
|
122
|
+
## Development
|
|
123
|
+
|
|
124
|
+
Day-to-day development happens in a private repository within the group. This
|
|
125
|
+
repository carries tagged releases, so its history is one commit per release
|
|
126
|
+
rather than a record of development. Bug reports and questions are welcome
|
|
127
|
+
through the issue tracker.
|
|
128
|
+
|
|
129
|
+
## Authors
|
|
130
|
+
|
|
131
|
+
- Oriol Vendrell, oriol.vendrell@uni-heidelberg.de,
|
|
132
|
+
[ORCID 0000-0003-4629-414X](https://orcid.org/0000-0003-4629-414X)
|
|
133
|
+
- Sudip Sasmal, sudipsasmal.chem@gmail.com
|
|
134
|
+
|
|
135
|
+
MIT License. See `CITATION.cff` for how to cite.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
quadlib/__init__.py,sha256=2rTQoXuytgzDdEhqAme9wQq8hg9i7eiJu-qWtV1f7tE,1413
|
|
2
|
+
quadlib/basis/__init__.py,sha256=GxTx2VSbLZfolBaxil83gVPRq1ib9PgCT8tpBBrQlnI,1761
|
|
3
|
+
quadlib/basis/boson.py,sha256=o_Xv6env9BFk4tiQSKtK_618hcYbWLdY5Gvmf2gfBEE,1421
|
|
4
|
+
quadlib/basis/discrete.py,sha256=c5Ny0uFhPNYY2N1cwJ2jNMPj0YfOkpCcoEdzRgwIB_Q,1458
|
|
5
|
+
quadlib/basis/expdvr.py,sha256=5DwMIqjWAvPOEZNKAZCkjNcmXDnxYzFo3UcgZefvz_Y,1905
|
|
6
|
+
quadlib/basis/hodvr.py,sha256=1G7227fBHkBXexSI_w9cSdvrLa_wc90ixdsw30Z50Aw,1370
|
|
7
|
+
quadlib/basis/jbasis.py,sha256=v8iB7nyVn8Z04c0bUadHDqbKHDQOkA2yAcU2NlNYgP8,1621
|
|
8
|
+
quadlib/basis/sindvr.py,sha256=xrNKf-Ccsl8-k6IAkTDvwswL290i95VnwGeOTaIfWJE,2520
|
|
9
|
+
quadlib/basis/spin.py,sha256=22okwk6JM1qD4mNsOzLmQ7mPpbU_rd1gBZNYyNq9Tb4,1165
|
|
10
|
+
quadlib/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
+
quadlib/cli/qlb_offset_oper_dof.py,sha256=4JCozgY8qtuU-9m_g0GYCEPpxOR7JF76rx5IKGB0L74,1088
|
|
12
|
+
quadlib/experimental/__init__.py,sha256=MdNfjiL7QwHo-mmGRAHs8FqNRaim6WP7ZYZIfb1idEU,757
|
|
13
|
+
quadlib/experimental/cpd_eom.py,sha256=JmddumH8GnxUPppoTVxl7aKcd6-ZdiiU-kD7XzwEytE,3436
|
|
14
|
+
quadlib/experimental/mctdh.py,sha256=bArxLcu5KGBm9s44F45kb2wBOJ8qEpmNpQQQkZmSSWw,1092
|
|
15
|
+
quadlib/experimental/node.py,sha256=CHvwo8OsdjFgpiCKCcRFBsqaHVNLHrjV799hX6Kqprk,7825
|
|
16
|
+
quadlib/experimental/pdof.py,sha256=gpzr0540WoGrC3QZrGV_5Z89yCnLlpS_RUl87pueG_Y,205
|
|
17
|
+
quadlib/experimental/tree.py,sha256=iKXs7iANxgixgpAprm_MOL425pyGl1GF3PZj-t0VVcg,4382
|
|
18
|
+
quadlib/hdmctdh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
+
quadlib/hdmctdh/rundirectory.py,sha256=sboX-8hPs-zYLo-OWn5aIlcp4Zwo8Y0RVe9ZsivUmLg,2238
|
|
20
|
+
quadlib/legacy/__init__.py,sha256=gjaf797m3745HEWl3Z-5_-bTAVVnK72py7tYPyDqnNg,626
|
|
21
|
+
quadlib/legacy/math.py,sha256=kmsNiWYAQ3gx9kmTaceAni_T7IouieVcSm14MkmPmSc,42222
|
|
22
|
+
quadlib/operator/sop.py,sha256=szA1lzcd9z02mNUpNuPyXUHCM_fRIEJiE_VPmm9bKpQ,9331
|
|
23
|
+
quadlib/propagation/__init__.py,sha256=9fZlGf3xZzFbSwV757cQdIx5gCuKE-tpBmc8iZr0538,680
|
|
24
|
+
quadlib/propagation/cpd.py,sha256=3mWB0ojq2RhwLeshV32m4Jm8RytFyKrtyN6arVdtr3M,1166
|
|
25
|
+
quadlib/propagation/exact.py,sha256=x1bLwoz-6pKcsVzZSML1gJ2N0LU0EqvgCxWCjdpXFF0,5500
|
|
26
|
+
quadlib/propagation/integrators.py,sha256=LReUqrBPtgbAZBWNsjxHQya8gkGki6H4qijsJyP4pGE,4204
|
|
27
|
+
quadlib/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
+
quadlib/tools/bath.py,sha256=QmbsaQm2faWmzpmutDQ5w3gUvZ6XWnCsG5Sjz0xjJGQ,2480
|
|
29
|
+
quadlib/tools/constants.py,sha256=bqdKwHFiVPX6tAYWE8e4r0CkmU2VSQQXBMrde8LSeAk,15239
|
|
30
|
+
quadlib/tools/iterators.py,sha256=1kTgYXaXmOquyhiWTjzE87ePLTR84LkEIyTPHI8ZnL8,7232
|
|
31
|
+
quadlib/tools/linalg.py,sha256=bIP-XwkwOOaEEnUeajOzBI4O-tuglTGiblS1y80cNKo,7197
|
|
32
|
+
quadlib/tools/pulses.py,sha256=-gm_is7ypB8ppByo8gHHWogMPVdRqzAmZ_hCwG_Y_P4,4988
|
|
33
|
+
quadlib/tools/spectra.py,sha256=hrg0EN2bKJ_DRHJiesGO6VNndb5AHulHxUrWgBmENhQ,5999
|
|
34
|
+
quadlib/tools/tensor.py,sha256=Rx0AnN4rF5xycaWunDEIqayhghONz4PYNN_Ghg7nh8o,6711
|
|
35
|
+
quadlib/wavefunction/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
|
+
quadlib/wavefunction/wfn_cpd.py,sha256=wuddg-HPmJZqXQgn1knJs2DDl8p3XBfyVNb6lnbvhoE,9657
|
|
37
|
+
quadlib/wavefunction/wfn_exact.py,sha256=zESnhNcorpLbSX6Z3fkxQc6gLrzShAZ6HnNvMzEUXXo,4698
|
|
38
|
+
quadlib-0.1.0.dist-info/licenses/LICENSE,sha256=g3g_5PX6Di-prbaJ9-VW-mQUTGDWeQHVPPy_IA0qR1Y,1103
|
|
39
|
+
quadlib-0.1.0.dist-info/METADATA,sha256=e2Uo18VLTdynSikeiZ-5e6F23ha18yw-UaFnefkEnhE,4943
|
|
40
|
+
quadlib-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
|
|
41
|
+
quadlib-0.1.0.dist-info/entry_points.txt,sha256=2-KCz7-rggTsKhl9ksHxSSofcUdBVqqBLIwglehIars,77
|
|
42
|
+
quadlib-0.1.0.dist-info/top_level.txt,sha256=q2QgzgN9SPaYecg0TqBr0fp__COcqzI3iVo776Ewn3s,8
|
|
43
|
+
quadlib-0.1.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Copyright (C) 2018-2026 The Theoretical Chemistry Group, Heidelberg University
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
+
in the Software without restriction, including without limitation the rights
|
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
+
furnished to do so, subject to the following conditions:
|
|
9
|
+
|
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
|
11
|
+
copies or substantial portions of the Software.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
19
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
quadlib
|