PiTensor is a Python wrapper library for ITensor, a C++ library for implementing tensor network calculations.
PiTensor is currently at its pre-alpha stage; using PiTensor for any serious task is not recommended.
git clone https://github.com/kyungminlee/PiTensor.git
cd PiTensor
git submodule update --init --recursive
python setup.py build_ext
python setup.py install
- LAPACK and BLAS libraries (
liblapack-dev
,libblas-dev
) - CMake
- Python 3
- XCode
- CMake
- Python 3
- MSYS2 + MinGW
- OpenBLAS (
mingw-w64-i686-openblas
ormingw-w64-x86_64-openblas
) - CMake (
mingw-w64-i686-cmake
ormingw-w64-x86_64-cmake
) - Python 3
import pitensor
i = pitensor.Index("I", 3)
j = pitensor.Index("J", 4)
T = pitensor.ITensor(i, j)
T.fill(1.0)
U = pitensor.ITensor(i)
S = pitensor.ITensor()
V = pitensor.ITensor()
err = pitensor.svd(T, U, S, V)
print(err)
print(T)
print(U)
print(S)
print(V)
All contributions are welcome.