Learn to Use ITensor

main / classes / indextype


IndexType is a lightweight label for Index objects.

IndexTypes are useful for manipulating and retrieving Index objects based on a certain grouping (the meaning is up to the user). For example, you may want to only adjust the prime level of Index objects of type Site while leaving other indices unchanged.

An IndexType is implemented internally as a constant, fixed-size string of up to 7 characters.

ITensor pre-defines a number of IndexTypes for you to use (see the full list below).

IndexType is defined in "itensor/indextype.h".


auto MyType = IndexType("MyType");

auto i = Index("i",2,MyType);
Print(i.type()); //prints: i.type() = MyType

Class Methods

Other IndexType Functions

Pre-defined IndexTypes

Below are IndexType variables pre-defined by ITensor for you to use:

For convenience, ITensor also pre-defines the following IndexTypes, leaving their interpretation up to the user:

This page current as of version 2.0.6

Back to Classes
Back to Main