QuaDLib
Quantum Dynamics Library for Research, Development and Education.
QuaDLib is a pure-Python library for quantum dynamics, built on NumPy and SciPy. It serves as a test bed for methods development and as a teaching tool; the tree-tensor-network (ML-MCTDH) methods it is meant to host are not implemented yet.
What works
- Primitive bases: sine, exponential and harmonic-oscillator DVRs
(
Sindvr,Expdvr,HOdvr), boson, spin-1/2, angular momentum and discrete bases (Boson,Spin,Jbasis,Discrete). - Sum-of-products operators (
SOP), with their full dense or sparse matrix representation. - Numerically exact propagation of a full wavefunction tensor
(
WfnExact,quadlib.propagation.propagate_exact), either by integrating the TDSE with the SOP right-hand side (solver='zvode') or withscipy.sparse.linalg.expm_multiplyon the sparse Hamiltonian matrix (solver='expm'). The second is faster and exact to machine precision as long as the sparse matrix fits in memory; operators with dense matrices on several degrees of freedom in one term favour the first. - CPD wavefunctions (
WfnCPD): norm, overlaps, reduced densities, expectation values, and propagation of the coefficient vector with frozen single-particle functions (propagate_cpd_A). - Bath discretization of spectral densities (
quadlib.tools.bath), correlation-function spectra and Fourier transforms (quadlib.tools.spectra). - Reading the autocorrelation function of an existing Heidelberg MCTDH
run directory (
Rundirectory).
Experimental
quadlib.experimental holds unfinished or known-incorrect code and is
not imported by quadlib: the tree data structures (Node, Tree,
Pdof), placeholders for the MCTDH equations of motion, and the coupled
CPD equations of motion.
quadlib.legacy keeps older utilities that the library does not use.
Installation
Python 3.10 or later. NumPy and SciPy are the only required dependencies.
pip install quadlib
Extras:
pip install "quadlib[plot]" # matplotlib, for the plotting helpers
pip install "quadlib[jupyter]" # JupyterLab and jupytext, for the notebooks
From source:
git clone https://gitlab.com/tc-heidelberg/quadlib.git
cd quadlib
pip install -e ".[plot,dev]" # dev adds pytest and ruff
or a specific release without cloning:
pip install git+https://gitlab.com/tc-heidelberg/quadlib.git@v0.1.0
Tests and examples
pytest # fast tests
pytest -m slow # long reference tests (about one minute)
ruff check # linter
Worked examples are in docs/notebooks (jupytext format):
spin_boson_example.py (exact propagation of a spin-boson model),
td-cpd_example.md (CPD wavefunction), and bath_tests.md (bath
discretization).
Development
Day-to-day development happens in a private repository within the group. This repository carries tagged releases, so its history is one commit per release rather than a record of development. Bug reports and questions are welcome through the issue tracker.
Authors
- Oriol Vendrell, oriol.vendrell@uni-heidelberg.de, ORCID 0000-0003-4629-414X
- Sudip Sasmal, sudipsasmal.chem@gmail.com
MIT License. See CITATION.cff for how to cite.
Metadata
Release files for quadlib 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| quadlib-0.1.0.tar.gz | 66.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| quadlib-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 131.7 kB
Release files / quadlib-0.1.0.tar.gz
| Download URL | quadlib-0.1.0.tar.gz |
|---|---|
| Size | 66.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ec4fa0eaed270824926c0fa717a20c5b0f20a037279eb8d30bcd28955415ef0
|
|
BLAKE2b-256 checksum How to use checksums |
417fa8c23e657ff11522b3eadec3bf687a1a6dc6dabdfaa966b38562ef4e8aeb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / quadlib-0.1.0-py3-none-any.whl
| Download URL | quadlib-0.1.0-py3-none-any.whl |
|---|---|
| Size | 64.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
011b4aca40aec5c0d5ef23555c158780bd22264d173b44a50ada3af40396388e
|
|
BLAKE2b-256 checksum How to use checksums |
004151d33e14466c58e0c22e2464e467c19740399790fb841fc327e1a7c07162
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|