Learn to Use ITensor

main / classes / spinhalf

SpinHalf and SpinHalfSite

The SpinHalf class is a specialization of SiteSet which initializes its sites of be of type SpinHalfSite, representing a S=1/2 spin.

The SpinHalfSite class can also be used to create custom SiteSets which mix SpinHalfSites with other types of sites.

SpinHalf and SpinHalfSite are defined in the file "itensor/mps/sites/spinhalf.h"

Synopsis

auto sites = SpinHalf(100);

auto Sz3 = sites.op("Sz",3);

auto Sp4 = sites.op("S+",4);

//Use IQIndexVals to get the +,+ element of the Sz operator
auto Szpp = Sz3.real(sites(3,"Up"),prime(sites(3,"Up")));

States of a SpinHalfSite

Operators Provided by SpinHalfSite


Back to Classes
Back to Main