Learn to Use ITensor

main / classes / initstate

InitState

Note: this documentation page refers to code prior to version 2.0

A class for initializing matrix product states.

An InitState is constructed by providing (at minimum) an object derived from SiteSet. In the documentation below, the allowed "state" strings depend on the SiteSet class used. For example, for the SpinOne siteset allowed state strings are "Up","Z0", and "Dn". For the Hubbard SiteSet they are "Emp","Up","Dn", and "UpDn". See the documentation for each SiteSet class for further details.

One an InitState object is constructed and all sites are set, it can be used in an MPS or IQMPS constructor to initialize that wavefunction to a specific product state.

Synopsis

const int N = 100;
SpinHalf sites(N);
//First set all spins to be Up
InitState state(sites,"Up");
//Now set every other spin to be Dn
for(int j = 2; j <= N; j += 2)
    {
    state.set(j,"Dn");
    }

MPS neel(state);

Constructors

Accessor Methods


Back to Classes
Back to Main