wavepacket 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.
@@ -0,0 +1,32 @@
1
+ from typing import Callable, TypeAlias
2
+
3
+ import numpy as np
4
+ import numpy.typing as npt
5
+
6
+ RealData: TypeAlias = npt.NDArray[np.float64]
7
+ """
8
+ Type for real-valued input or output data.
9
+ """
10
+
11
+ ComplexData: TypeAlias = npt.NDArray[np.float64] | npt.NDArray[np.complex128]
12
+ """
13
+ Type for complex-valued input or output data.
14
+
15
+ Note that all client places should be able to consume real-valued data as well.
16
+ """
17
+
18
+ Generator: TypeAlias = Callable[[RealData], ComplexData]
19
+ """
20
+ A callable that transforms an real-valued input into complex-valued output.
21
+
22
+ Typical applications are transformations from grids or a time series, for
23
+ example for creating initial wave functions or potentials.
24
+ """
25
+
26
+ RealGenerator: TypeAlias = Callable[[RealData], RealData]
27
+ """
28
+ Similar to `Generator`, but outputs real-value data.
29
+
30
+ This is meant for cases where we deliberately want to constrain
31
+ the values.
32
+ """
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.4
2
+ Name: wavepacket
3
+ Version: 0.1.0
4
+ Summary: A package for the propagation of quantum-mechanical wave functions.
5
+ Author: Ulf Lorenz
6
+ Requires-Python: >=3.12
7
+ Description-Content-Type: text/x-rst
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
12
+ Classifier: Topic :: Scientific/Engineering :: Physics
13
+ License-File: LICENSE
14
+ Requires-Dist: numpy >= 2.1.3
15
+ Requires-Dist: scipy >= 1.14.1
16
+ Requires-Dist: matplotlib >= 3.10 ; extra == "demos"
17
+ Requires-Dist: sphinx >= 8.1.3 ; extra == "doc"
18
+ Requires-Dist: sphinx-autoapi >= 3.4.0 ; extra == "doc"
19
+ Requires-Dist: numpydoc >= 1.8.0 ; extra == "doc"
20
+ Requires-Dist: myst-nb >= 1.2 ; extra == "doc"
21
+ Requires-Dist: sphinx-rtd-theme >= 3.0.2 ; extra == "doc"
22
+ Requires-Dist: pytest >= 8.3 ; extra == "test"
23
+ Project-URL: Home, https://github.com/ulflor/wavepacket
24
+ Provides-Extra: demos
25
+ Provides-Extra: doc
26
+ Provides-Extra: test
27
+
28
+ Description
29
+ -----------
30
+
31
+ Wavepacket is a Python package to define and simulate small
32
+ quantum systems. Or, more technically, it allows you to numerically
33
+ solve Schrödinger and Liouville-von-Neumann equations for
34
+ distinguishable particles.
35
+
36
+ The full documentation can be found under https://wavepacket.readthedocs.io.
37
+
38
+ There are many different quantum systems and consequently approaches
39
+ to solve them. Here we focus on a particular niche:
40
+
41
+ - Wavepacket solves the differential equations directly. This simplifies
42
+ the maths, but limits the system size to few degrees of freedom.
43
+ If you want to deal with larger systems, look out for MCTDH.
44
+ - Wavepacket uses the DVR approximation heavily. This allows you to
45
+ directly define your potentials as functions of real-space coordinates
46
+ instead of setting up opaque operator matrices.
47
+ The latter approach is simpler an more concise if you are only
48
+ interested in harmonic oscillators or qubits, though.
49
+ - Wavepacket is a Python-only package relying chiefly on numpy.
50
+ This is slower than natively implemented code, but you gain
51
+ great tooling support, for example matplotlib, Jupyter notebooks or
52
+ integrated documentation.
53
+ - Most of the code can handle both wave functions and density operators.
54
+ This allows you to convert a closed system into an open
55
+ system with minimal fuss.
56
+
57
+ For example use cases, we have been using various precursors of this
58
+ package for simulating small molecular systems and for teaching.
59
+ Besides examples shipped with this package, see
60
+ https://sourceforge.net/p/wavepacket/wiki/Demos.Main for more applications.
61
+
62
+ The project is currently a first iteration to flesh out everything. Once
63
+ 0.1 is released, I plan to quickly translate the existing C++ code from
64
+ a precursor project and reach a stable state. More can be found on the
65
+ project homepage https://github.com/ulflor/wavepacket
66
+
67
+
68
+ Support
69
+ -------
70
+
71
+ If you lack a feature that you would like to have, open an issue at
72
+ `our issue tracker <https://github.com/ulflor/wavepacket/issues>`_.
73
+ Depending on the complexity of the feature, this will lead to an immediate,
74
+ rapid, or prioritized implementation.
75
+
76
+
77
+ Contribution
78
+ ------------
79
+
80
+ I currently lack a formal procedure for new contributors, but you are
81
+ very welcome to contribute to the project. If you do not know what to
82
+ do, feel free to contact one of the developers; there is enough work for
83
+ multiple developers, it is just not documented yet.
84
+
85
+
86
+ History
87
+ -------
88
+
89
+ The original version of Wavepacket was written in Matlab and is still
90
+ maintained under https://sourceforge.net/p/wavepacket/matlab. It is stable,
91
+ battle-tested and works.
92
+
93
+ However, Matlab is pretty expensive, so not all interested users had
94
+ access to it. Also, the project's architecture did not support some
95
+ advanced use cases without digging deep into the code. Finally,
96
+ C++11 had just come out and looked cool, so I started a
97
+ reimplementation in C++ around 2013, adding Python bindings as an
98
+ afterthought. The C++ project will be superseded by this Python package, but
99
+ can be found under https://sourceforge.net/p/wavepacket/cpp.
100
+
101
+ This worked really well. However, deploying C++ code is difficult.
102
+ In particular, there was no cheap route towards building a "good"
103
+ Python package, or towards easily building a Windows version.
104
+ Also, the underlying tensor library was slowly
105
+ getting fewer and fewer commits over the years, so I am currently
106
+ moving to a Python-only package.
107
+ The Python version is slower by a factor of two to three compared
108
+ to C++-backed code. This is, however, often cancelled by a
109
+ parallelization of the tensor operations, and the tooling is better by orders
110
+ of magnitude.
111
+
@@ -0,0 +1,36 @@
1
+ wavepacket/__init__.py,sha256=kEdmRrLVzyPjU3W8ShB_5apyzeBBqolBoRHEFMWu9N0,715
2
+ wavepacket/exceptions.py,sha256=JsrwiN7JvyZwOA-LgMMM-3bsSsR8AqO3REliiN7gWu4,1328
3
+ wavepacket/generators.py,sha256=ziBtS-xPj4jyovBYU1KNnPwWyD-k-JMqwBRFdZ4T1uk,2905
4
+ wavepacket/logging.py,sha256=ta4j_VmWTOJuBDBLL2VGteG0tyCTiEPodxWLBjimJyw,1205
5
+ wavepacket/builder/__init__.py,sha256=fo3--zlfT72fzailT8ZpIfl6xnvmtbpoa3r9qRLmOJc,238
6
+ wavepacket/builder/density.py,sha256=DT3Dw_anh3u43y68hGMFylGkwwfGGh-u3VpuKNgsEwk,2035
7
+ wavepacket/builder/wave_function.py,sha256=uLSYj99hUoy3W5r4r_53OJSXruAjxIDhne4b4QoFOks,2172
8
+ wavepacket/expression/__init__.py,sha256=dIuyrk1HkCPM1z1aieMMoRMWGw8lV9KJx6ykjWdc41o,332
9
+ wavepacket/expression/expressionbase.py,sha256=-aMvGRE-UTzYIP9vf0aafGauvUNFtrt889ZsqzD4R7o,1471
10
+ wavepacket/expression/liouvillian.py,sha256=RqL5dx__VEP26Gi23m1u0RJn9-qhmeeviFziy-7STTI,2168
11
+ wavepacket/expression/schroedingerequation.py,sha256=w-uqu7RtywSEwnxmDd85XV1uCAiohakI21f3J2u1rLg,2058
12
+ wavepacket/grid/__init__.py,sha256=t-NVIGFANV9MUPY67pC90GbN6a2aPJ-9YgTKUDh9xWg,342
13
+ wavepacket/grid/dofbase.py,sha256=GJ44ZvKapEpdzD0LJKI0RpOumK4okfOr_IRLC6bHkc8,7208
14
+ wavepacket/grid/grid.py,sha256=Lx6-mH50Rj0gOiSSmSIT_JNbWPzxvXRH4Y986CFE5e8,5378
15
+ wavepacket/grid/planewavedof.py,sha256=u8NJjxWJ_6ptdUFH-EShAQLsjnSXTMtfkUeoQM8theo,4059
16
+ wavepacket/grid/state.py,sha256=Ex1lgC2VrAphQ5R1Z4bR4BCD0Zm1wcXV0hzFRTUGXxE,3114
17
+ wavepacket/grid/state_utilities.py,sha256=_CLruVYIUZ8Nn-jfNDzp0EjnBPHzbHyULyxK5NqHdNU,2659
18
+ wavepacket/operator/__init__.py,sha256=qFkw3LBjchBi0zghzyxLCUTyznK36xxLvP4CzOJ3Zno,404
19
+ wavepacket/operator/fbroperators.py,sha256=RzDjhS07djHfdHHNQP7oe4ciREH73MnOJNEKk-md9m8,3635
20
+ wavepacket/operator/operatorbase.py,sha256=uz0Gs0q1sImoE6a3hoIl0QIIHmh4Q-7gAiYrIvMQgig,6712
21
+ wavepacket/operator/operatorutils.py,sha256=67l12vLnrtbbj-Tozz2s1CWeFXHfxPEiVzCQEISAK9k,969
22
+ wavepacket/operator/potentials.py,sha256=B6ajRH1cl-kSa0G4eePMLSITddG7RY8g3XFm46hJTEI,1559
23
+ wavepacket/solver/__init__.py,sha256=wxtl8s5R7jFs2LxsS7b4odx9UWVQVoNStjJWMS35X7A,246
24
+ wavepacket/solver/odesolver.py,sha256=dvOZR-5yM0WfwHWTy9AhK7VcY3MIXUoYMA5btKSnDqw,2578
25
+ wavepacket/solver/solverbase.py,sha256=v-mqEl39hfJYB4TcqZPaA6YJtjvL5DqBVkcqjudEmZc,3575
26
+ wavepacket/testing/__init__.py,sha256=GvyHU-sAEw-zUBSAT1PFdEeBsYZqPVKssFY44gdQFVU,295
27
+ wavepacket/testing/assertions.py,sha256=dJW8SQiY5zuOqPehgiUzWWw5vO2XCl_GLMTOwxJjmtw,616
28
+ wavepacket/testing/dummydof.py,sha256=89gx_o5Tw5uT1rff6GYGPSBEOCPn0dL9vEUpDldAJ_c,696
29
+ wavepacket/testing/dummyoperator.py,sha256=OOq4U1gYAxos_GMQZrS9NtYOA67R7r5aDiI56U9In1I,815
30
+ wavepacket/testing/random.py,sha256=4fVlNIDGJzteFECri5bHs1nonU_gGjwuh-EZHtlOKjU,443
31
+ wavepacket/typing/__init__.py,sha256=d3CGFQ2lN7SBCG0kJ4RN1E4jHRMmrZg3_UmE-VIsvbE,201
32
+ wavepacket/typing/data_types.py,sha256=lNVEwrAjh_ajOimMA7Q-9Shi5pTSTQxa0mClRU3hfW8,871
33
+ wavepacket-0.1.0.dist-info/licenses/LICENSE,sha256=gVWyw9y5Pfya7dxlnmexPdGqOas1ePZxQl7-0MQamz0,1067
34
+ wavepacket-0.1.0.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
35
+ wavepacket-0.1.0.dist-info/METADATA,sha256=2nYrKPz9oB6Ht14RWX_GEMyYhZi3sObcdRtXc_8dtZY,4674
36
+ wavepacket-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: flit 3.12.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Ulf Lorenz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.