QuTree: A tree tensor network package
Project description
pyQuTree
A smaller python version of the Tree Tensor Network library Qutree[^1] currently centered around optimization.
Installation
Install pyQuTree from PyPI:
pip install pyqutree
Or install the latest development version from GitHub:
pip install git+https://github.com/roman-ellerbrock/pyQuTree.git
For developers, create a conda environment via:
conda env {create, update} --file environment.yml
conda activate qutree
Optional Dependencies
Install with GPU support (PyTorch):
pip install pyqutree[gpu]
Install with chemistry tools (ASE):
pip install pyqutree[chem]
Install all optional dependencies:
pip install pyqutree[all]
You can use a tree tensor network version of cross interpolation[^2] via
from qutree import *
def V(x):
# change with your objective function
return np.sum((x-np.ones(x.shape[0]))**2)
N, r, f, nsweep = 21, 4, 3, 6
objective = Objective(V)
# create a tensor network, e.g. a balanced tree
tn = balanced_tree(f, r, N)
# Create a primitive grid and tensor network grid
primitive_grid = [linspace(-1., 3., N)] * f
# tensor network optimization
tn_updated = ttnopt(tn, objective, nsweep, primitive_grid)
print(objective)
dataframe = objective.logger.df
print(dataframe)
More details can be found in examples/ttopt_example.ipynb.
If Qutree was useful in your work, please consider citing the paper[^1].
References
[^1] Roman Ellerbrock, K. Grace Johnson, Stefan Seritan, Hannes Hoppe, J. H. Zhang, Tim Lenzen, Thomas Weike, Uwe Manthe, Todd J. Martínez; QuTree: A tree tensor network package. J. Chem. Phys. 21 March 2024; 160 (11): 112501. https://doi.org/10.1063/5.0180233
[^2] I created the present tree tensor network version which is currently unpublished. It is inspired by Ivan Oseledets, Eugene Tyrtyshnikov, TT-cross approximation for multidimensional arrays, Linear Algebra and its Applications, Volume 432, Issue 1, 2010, Pages 70-88, https://doi.org/10.1016/j.laa.2009.07.024.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyqutree-0.1.1.tar.gz.
File metadata
- Download URL: pyqutree-0.1.1.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.6.87.2-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9667770cf021cc56cb200266cc0c38ce708b75cf95b02e2e81553e86cc7bb2be
|
|
| MD5 |
093592da6e8b5f9d46d0604de9c15267
|
|
| BLAKE2b-256 |
da4b99b2409c3e2b429da48c0be68e382c5f32bc9cf5f175da955875d2c6b65c
|
File details
Details for the file pyqutree-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pyqutree-0.1.1-py3-none-any.whl
- Upload date:
- Size: 29.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.6.87.2-microsoft-standard-WSL2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b1d370b0e82feaaee749fa05339504aa13ff50d1e6293938637ee0023d3e183
|
|
| MD5 |
e81294d5ad09f30cec74e3cae526f0bb
|
|
| BLAKE2b-256 |
8e7826959785cd6dff18c568a910cff02878b7dea4e2e9b76111599154f46a2d
|