Learn to Use ITensor

main / classes / index C++v2 | C++v3


An Index represents a single tensor index with fixed size m. Copies of an Index compare equal unless their "prime levels" are set to different values.

An Index has a name just for printing purposes, and an Index carries an IndexType label (typically Site or Link—see index conventions).

Index is defined in "itensor/index.h".


auto i = Index("index i",4);
Print(i.m()); //prints i.m() = 4

//Copies of the same Index compare equal
auto ii = i; //ii is a copy of i
Print(ii == i); //prints "true"

//The prime level of an Index can be
//adjusted to make it distinct
Print(ii.primeLevel()); //prints ii.primeLevel() = 2
Print(ii == i); //prints "false"

Print(ii == i); //prints "true"


Accessor Methods

Prime Level Class Methods

Operators and Conversions

Other Index Class Methods

Prime Level Functions

Other Functions

This page current as of version 2.0.6

Back to Classes
Back to Main