## Introduction

#### Clone via github.

(this is the preferred method—see our git quickstart guide.)

Or download latest

version v1.2.1
(changelog)

ITensor—Intelligent Tensor—is a C++ library for implementing tensor product wavefunction calculations.
It is efficient and flexible enough to be used for research-grade simulations.

Features include:

- A complete DMRG code
- Efficient matrix product state class
- Quantum number conserving (block-sparse) tensors
- Complex numbers (handled lazily: no efficiency loss if real)
- Easy to install; only dependencies are BLAS/LAPACK and C++11

## Recent News

- ITensor 1.1 (May 2015)
- Article: Should you use Periodic Boundary Conditions in DMRG?
- ITensor at 2014 Sherbrooke Summer School

ITensors have an "Einstein summation" interface making them nearly as easy to multiply as scalars: all tensors indices are stamped with a unique internal id number and matching indices automatically contract when two ITensors are multiplied. This type of interface makes it simple to transcribe tensor network diagrams into correct, efficient code.

For example, the diagram below (resembling the partial overlap of two matrix product states) can be converted to code as

**Installing ITensor:**

- Clone the latest version:

Or download zip file if you do not have git.`git clone https://github.com/ITensor/ITensor itensor`

(Cloning with git allows you to track changes to ITensor and is the preferred method; for more see our git quickstart guide.) - Read the installation instructions.
- Learn more from the documentation.

## Code Samples

## Perform a DMRG Calculation

## Multiply Two ITensors

Index a("a",2), b("b",2), c("c",2); ITensor Z(a,b), X(c,b); commaInit(Z,a,b) = 1, 0, 0,-1; commaInit(X,b,c) = 0, 1, 1, 0; //the * operator finds and //contracts common index 'b' //regardless of index order: ITensor R = Z * X; Print( R(a(1),c(2)) ); //Prints: R(a(1),c(2)) = 1 Print( R(a(2),c(1)) ); //Prints: R(a(1),c(2)) = -1