Tensor network algorithms for chemical systems.
This library is written in C and offers a Python 3 interface for simpler accessibility.
The examples folder contains several demonstrations of the functionalities. Most examples use Jupyter notebooks and the Python interface.
- Matrix product state and operator structures
- Represent common Hamiltonians as MPOs, including molecular Hamiltonians
- General MPO construction with optimized bond dimensions from a list of operator chains
- Block-sparse tensors based on additive quantum number conservation to implement abelian symmetries
- Single- and two-site DMRG algorithm
- Gradient computation with respect to MPO parameters
- Tree tensor network topologies (work in progress )
- Non-abelian symmetries (work in progress)
The code requires the BLAS, LAPACKE, HDF5 and Python 3 development libraries with NumPy. These can be installed via
sudo apt install libblas-dev liblapacke-dev libhdf5-dev python3-dev python3-numpy
(on Ubuntu Linux)brew install openblas lapack hdf5 python3 numpy
(on MacOS)
From the project directory, use cmake
to build the project:
mkdir build && cd build
cmake ../
cmake --build .
Currently, this will compile the unit tests, which you can run via ./chemtensor_test
, as well as the demo examples and Python module library.
- Generally, follow the current coding style of the project.
- Naming: lower_case_with_underscores in general (variable, function, and struct names); exceptionally CAPITALIZATION for preprocessor and enum constants.
- Tabs for indentation at the beginning of a line, otherwise whitespace. This ensures that vertical alignment (of, e.g., comments for struct members) is independent of tab size. Avoid trailing whitespace.
- Comments: // for normal comments, /// for Doxygen documentation.
- Put curly braces
{ }
after everyif
andelse
(to avoid pitfalls). - Left-align pointers throughout:
int* p
instead ofint *p
. - Keep the
struct
andenum
keywords in variable types:struct foo f;
instead oftypedef struct foo { ... } foo_t; foo_t f;
. - Use
const
for function arguments which are not modified by the function.
- U. Schollwöck
The density-matrix renormalization group in the age of matrix product states
Ann. Phys. 326, 96-192 (2011) (arXiv:1008.3477) - J. Haegeman, C. Lubich, I. Oseledets, B. Vandereycken, F. Verstraete
Unifying time evolution and optimization with matrix product states
Phys. Rev. B 94, 165116 (2016) (arXiv:1408.5056) - C. Krumnow, L. Veis, Ö. Legeza, J. Eisert
Fermionic orbital optimization in tensor network states
Phys. Rev. Lett. 117, 210402 (2016) (arXiv:1504.00042) - G. K.-L. Chan, A. Keselman, N. Nakatani, Z. Li, S. R. White
Matrix product operators, matrix product states, and ab initio density matrix renormalization group algorithms
J. Chem. Phys. 145, 014102 (2016) (arXiv:1605.02611) - J. Ren, W. Li, T. Jiang, Z. Shuai
A general automatic method for optimal construction of matrix product operators using bipartite graph theory
J. Chem. Phys. 153, 084118 (2020) (arXiv:2006.02056)