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
  • Tensor hypercontraction form of molecular Hamiltonians
  • Tree tensor network topologies (work in progress)
  • Non-abelian symmetries (work in progress)

Installation

ChemTensor can be conveniently installed as a 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, LAPACK, 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 hdf5 python3 numpy (on arm64 macOS together with the Accelerate framework)

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, ensure that the Python build tool is installed, and 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.3-cp312-cp312-manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

chemtensor-0.1.3-cp312-cp312-macosx_14_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.12macOS 14.0+ ARM64

chemtensor-0.1.3-cp311-cp311-manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

chemtensor-0.1.3-cp311-cp311-macosx_14_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.11macOS 14.0+ ARM64

chemtensor-0.1.3-cp310-cp310-manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

chemtensor-0.1.3-cp310-cp310-macosx_14_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.10macOS 14.0+ ARM64

chemtensor-0.1.3-cp39-cp39-manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

chemtensor-0.1.3-cp38-cp38-manylinux_2_28_x86_64.whl (6.4 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.28+ x86-64

File details

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

File metadata

File hashes

Hashes for chemtensor-0.1.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9bc94410f49cbd5dde7876a29f1314aa6cc9e0a86a7d3e521f09fa8912052241
MD5 d00711c6b58e67feb565a8e9c7deba0e
BLAKE2b-256 4c50c229c3ba1e986a9355879d963d66044ac10f9808bf871202c14e724cd579

See more details on using hashes here.

File details

Details for the file chemtensor-0.1.3-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for chemtensor-0.1.3-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 d6297be916b381abc1e1bbf8759aa5eb75b4896f8e8817c8da311b6280748c99
MD5 832b500035df80edcf6f45a41a66ae61
BLAKE2b-256 4d5c3918fd68cba16600191681d8f993cc5d20fb7ddb361d40e3fb9d2a6ead23

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chemtensor-0.1.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 78bc9af5e7aa366f0aba91e247ac54c65ef71a1d01940d99c925bae98cdda92a
MD5 05c7639f323d7e47d01d0edb5bf2e61a
BLAKE2b-256 0b1eab629b0990faf31750dc70a88b743071b1e0048a607ba44ac5d503720379

See more details on using hashes here.

File details

Details for the file chemtensor-0.1.3-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for chemtensor-0.1.3-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 ce628c798dc4a37ad140b84956f86fc641f8e17f5db61e6dd9eac63a169fb397
MD5 50dd2c6522ecd8fecdb6a5b7bf545775
BLAKE2b-256 707020649f6913725399bc36ceddb4d7b84c9e66798c0dc890f45c524795ee6d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chemtensor-0.1.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 96495ac38af49cfd7bab9021e5012397c57708141b8398aa8ff745261f02b4c0
MD5 55bddecbe5de1c5065b926bf59d12228
BLAKE2b-256 d84ba8d81c6ea46fbbd0d03eeb816ed0bcd4b20f7cfc67e9ae0dce5f33e82422

See more details on using hashes here.

File details

Details for the file chemtensor-0.1.3-cp310-cp310-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for chemtensor-0.1.3-cp310-cp310-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 17e876ab74c0e2d80ceae3f135626eb894a5f7bb1a0f9c269b10d6f94632c3b9
MD5 b0dc4d64240fde50b3abbd1a279a00fc
BLAKE2b-256 56c96f62acba80fa1943549cb907e96480cf287b5b7e7561dfafc109cb8a1298

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chemtensor-0.1.3-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2816012e8bb0739f423e92323df49aadad326f89f3cedab373cb3f2c606d5735
MD5 71938b90f176ce9f28900e984b9d4662
BLAKE2b-256 7408c1e2e15aeb1209c8485465d5dea3aa118e29b430545bb4217ff856628878

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chemtensor-0.1.3-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 db01717bc647a670a6182eae42eda825c37dc28ccee9c89864083e285194c4a3
MD5 09e6b77f705d5cbd952f9fd2aca76be8
BLAKE2b-256 6a84ae66d2302c9f294873f07569739c37aebc4a53cd7239a62c6b9358a35a0f

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