Skip to content

Latest commit

 

History

History
66 lines (51 loc) · 1.52 KB

README.md

File metadata and controls

66 lines (51 loc) · 1.52 KB

PiTensor: a Python wrapper for ITensor

Build Status Build Status

Introduction

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.

Installation

git clone https://github.com/kyungminlee/PiTensor.git
cd PiTensor
git submodule update --init --recursive
python setup.py build_ext
python setup.py install

Requirements

Linux

  • LAPACK and BLAS libraries (liblapack-dev, libblas-dev)
  • CMake
  • Python 3

macOS

  • XCode
  • CMake
  • Python 3

Windows (MSYS2 + MinGW)

  • MSYS2 + MinGW
  • OpenBLAS (mingw-w64-i686-openblas or mingw-w64-x86_64-openblas)
  • CMake (mingw-w64-i686-cmake or mingw-w64-x86_64-cmake)
  • Python 3

Getting Started

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)

Contributing

All contributions are welcome.