Skip to content

kyungminlee/PiTensor

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.