Learn to Use ITensor

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


A QN object is an ordered set of "quantum numbers". Quantum numbers are ordered sets of integers, each of which follow either usual integer addition or @@Z_N@@ addition rules.

When describing spin quantum numbers (total Sz, say), our convention is to work in units of spin 1/2. Thus a QN object made as QN("Sz=",+1) means Sz=+0.5 in physics units. The reason for this is that computers can perform integer arithmetic quickly and exactly. For particle quantum numbers (such as total boson or fermion number) integer values have their usual meaning.

QN objects have up to four "slots" which can be assigned values. Each slot also has a modulus which can take the following types of values:

The QN class recognizes certain conventions about the order and type of slots used. These are implemented by the QN constructor which takes named arguments. For example, creating a QN as

auto q = QN("Sz=",+3,"Nf=",5);

results in q having two slots: the first slot "Sz" will have a value of 3 and a modulus of 1 (since spin follows usual integer addition rules); the second slot "Nf" has a value of 5 and a modulus of -1 (integer addition with a fermionic "flag"). Passing the arguments in a different order has the exact same result when using named slots ("Sz", "Nf"), because the QN system recognizes certain names and keeps them in the right order internally. QN objects made with named slots are also printed out in a nicer way than "custom" QN objects.

The special types of QN's with named slots are as follows:

QN is defined in the header "itensor/qn.h".

QN Class Methods

Other QN Features

QN Value Access Functions

To aid in retrieving special QN slot values according to the special QN types listed at the top of this page, users may use the following functions.

QN Functions

This page current as of version 2.0.6

Back to Classes
Back to Main