Skip to main content

No project description provided

Project description

CI

ChemTensor

Tensor network algorithms for chemical systems.

This library is written in C, offering a Python 3 interface for more straightforward accessibility.

Documentation is available at chemtensor.readthedocs.io.

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)

Installation

ChemTensor can be conveniently installed as Python package (in a virtual environment) via

(venv) $ pip install chemtensor

This downloads and installs a pre-built Python "wheel" from PyPI, see pypi.org/project/chemtensor/.

Alternatively, you can build the project locally; see the instructions below.

Note that ChemTensor can also run as standalone C code.

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_ct && cd build_ct
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.

To build the corresponding Python package directly, run

python3 -m build . --wheel
pip3 install dist/chemtensor-...whl

The first line should run cmake in the background and create a Python "wheel" (.whl file) in the dist/ subfolder. This package file can then be installed locally via the second line.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

chemtensor-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

chemtensor-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

chemtensor-0.1.2-cp310-cp310-manylinux_2_28_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

chemtensor-0.1.2-cp39-cp39-manylinux_2_28_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

chemtensor-0.1.2-cp38-cp38-manylinux_2_28_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

File details

Details for the file chemtensor-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for chemtensor-0.1.2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1707a4f0573d30dfdf3f48bf8a8beb06e9a134b5db8c7112b8aee3b86af226c7
MD5 88409c6eb2886d9e48fd19d157fc0df0
BLAKE2b-256 4fbfb80b83a14b060aca173977e9d81c5f903ef8bee0bb0e3c8d1eb098383b3f

See more details on using hashes here.

File details

Details for the file chemtensor-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for chemtensor-0.1.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b32deae161b98efbbfcdf7c55cde692e9d8d1cecc67daf9d093d5919e84a244
MD5 ecfdc6189015bd13f033ba32ac664b13
BLAKE2b-256 4728a13503e25e4d7b544abfce1f4c9e96c7bc04f76e556daadecd16902368fa

See more details on using hashes here.

File details

Details for the file chemtensor-0.1.2-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for chemtensor-0.1.2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4ea8f4fd1a9c138068543b1b9ffbc3da28130092c84e2a4d56b19510654a3d04
MD5 ae248cbd021e47dc552663668ed91024
BLAKE2b-256 c79e88f98882b1bff226d833df37a3110cd174eb0341305a8777f3ba85779824

See more details on using hashes here.

File details

Details for the file chemtensor-0.1.2-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for chemtensor-0.1.2-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 da00bd18a4e26032ac42920d2d215d6848dc200a9cedc10a16074734e475dc3f
MD5 ad04b00b06ce108d34ecdc7a3e823c44
BLAKE2b-256 3952cc9bb49d1a08792fd16b6c8026919815a250077f4c40f9dfb8784e3c38ff

See more details on using hashes here.

File details

Details for the file chemtensor-0.1.2-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for chemtensor-0.1.2-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 464ae5832f8c997b72cd89ee92d5923cdafa052dfe91563b04a1f0f86b6e38c9
MD5 58084378ac1dd7f54ec20840497c897f
BLAKE2b-256 16c5589670a6bdcb8fb4c71bbd91bc1c47d2159f67e334df064d4e53670d25e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page