Skip to main content

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.

Install pyQutree via pip using

pip install git+https://github.com/roman-ellerbrock/pyQuTree.git

or create a conda environment via

conda env {create, update} --file environment.yml
conda activate qutree

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

pyqutree-0.1.0.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

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

pyqutree-0.1.0-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file pyqutree-0.1.0.tar.gz.

File metadata

  • Download URL: pyqutree-0.1.0.tar.gz
  • Upload date:
  • Size: 25.0 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

Hashes for pyqutree-0.1.0.tar.gz
Algorithm Hash digest
SHA256 24e6b2442f370a7ed3c2e14e8b5b77ea5350db81ef0a1e7c3b6279c906ba655d
MD5 c377192ef528949a3a75779a5bfed44c
BLAKE2b-256 8a12e1a5b7280861ab4caa3f41b56a571c9246da1fc4d7ba96e5bae9c5a744b4

See more details on using hashes here.

File details

Details for the file pyqutree-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyqutree-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.2 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

Hashes for pyqutree-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2df803550467162b5a25d2a3f0b11c0ec6321d6f3187eece5831de78ebff5fb
MD5 138bad16f5ab8fef2dac618d8eb663cf
BLAKE2b-256 eb5d65729166e603b63e8e2744bf588172a7b733745cb1f1b7e86151b4bec689

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