Learn to Use ITensor

main / classes / spinone

SpinOne and SpinOneSite

The SpinOne class is a specialization of SiteSet which initializes its sites to be of type SpinOneSite, representing a S=1 spin.

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

The SpinOne site set accepts the optional named arguments "SHalfEdge" which makes the first and last sites S=1/2 spins, or "SHalfLeftEdge" which only makes the first site a S=1/2 spin. (This is useful, for example, to study the edge physics of the Haldane phase of a one-dimensional S=1 Heisenberg chain.)

SpinOne and SpinOneSite are defined in the file "itensor/mps/sites/spinone.h"


auto sites = SpinOne(100);

auto Sz_3 = op(sites,"Sz",3);

auto Sx2_4 = op(sites,"Sx2",4);

auto Sp_5 = op(sites,"S+",5);

//Use IndexVals to get the 0,+ element of the S+ operator
auto Spzp = elt(Sp_5,sites(5,"Z0"),prime(sites(5,"Up")));

States of a SpinOneSite

Operators Provided by SpinOneSite

Back to Classes
Back to Main