IndexQN
An IndexQN is a struct holding an Index and a QN. Its primary purpose is for labeling individual sectors of an IQIndex.
IndexQN is defined in the header "itensor/iqindex.h".
Synopsis
auto i = Index("i",2);
auto q = QN(+1);
auto iq = IndexQN(i,q);
Print(iq.index); //prints: (i,2,Link)
Print(iq.qn); //prints: QN(1)
Public Data Members
Index index
QN qn
Class Methods
IndexQN(Index i, QN q)
Construct an IndexQN by providing an Index
i
and a QNq
.
Calling this constructor setsindex = i
andqn = q
.m() -> long
Return the size of the
.index
field of the IndexQN.type() -> IndexType
Return the IndexType of the
.index
field of the IndexQN.
Other Features of IndexQN
IndexQN's are default constructible.
An IndexQN can be explicitly converted to an Index. The resulting Index equals the
.index
field of the IndexQN.An IndexQN
iq
can be written to or read from disk by callingiq.write(s)
oriq.read(s)
wheres
is a stream object.An IndexQN
iq
can be compared (==
and!=
) to an Indexi
.
The comparison is equivalent to doingiq.index == i
oriq.index != i
.IndexQN's can be printed.
This page current as of version 2.0.6
Back to Classes
Back to Main