Skip to content

Tensor network algorithms for chemical systems (work in progress)

License

Notifications You must be signed in to change notification settings

MatthiasReumann/chemtensor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

91 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unit tests

ChemTensor

Tensor network algorithms for chemical systems.

This library is written in C and offers a Python 3 interface for simpler accessibility.

Examples

The examples folder contains several demonstrations of the functionalities. Most examples use Jupyter notebooks and the Python interface.

Features

  • 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)

Building

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.

Coding style conventions

  • 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 every if and else (to avoid pitfalls).
  • Left-align pointers throughout: int* p instead of int *p.
  • Keep the struct and enum keywords in variable types: struct foo f; instead of typedef struct foo { ... } foo_t; foo_t f;.
  • Use const for function arguments which are not modified by the function.

References

About

Tensor network algorithms for chemical systems (work in progress)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 91.6%
  • Python 8.2%
  • CMake 0.2%