Learn to Use ITensor

main / classes / iqindexval


IQIndexVal conceptually represents an IQIndex fixed to a specific value.

An IQIndexVal holds both an IQIndex .index and an integer .val representing a particular value the IQIndex can take. The value is 1-indexed and must be in the range [1,m] where m is the size of the IQIndex.

IQIndexVals correspond to a specific block of their associated IQIndex. Consider an IQIndexVal iv associated with an IQIndex I having two blocks, both of size 8. If iv.val <= 8 it corresponds to the first block of I. If iv.val > 8 it corresponds to the second block of I.

IQIndexVal is defined in the header "itensor/iqindex.h".


auto I = IQIndex("I",Index("I+1",8),QN(+1),

auto iv = IQIndexVal(I,9);

Print(iv.index == I); //prints: true
Print(iv.val == 9);   //prints: true

Print(iv.qn()); //prints: QN(-1)

Public Data Members

Class Methods

Other IQIndexVal Features

IQIndexVal Functions

This page current as of version 2.0.6

Back to Classes
Back to Main