Learn to Use ITensor

main / classes / dmrg

DMRG Interface

The density matrix renormalization group (DMRG) is a very powerful algorithm for optimizing matrix product states (MPS) for ground states and low-lying excited states of one-dimensional (and quasi-one-dimensional) Hamiltonians.

The ITensor DMRG code works with Hamiltonians in matrix product operator (MPO) form so that a single DMRG code can work for a very wide range of different Hamiltonians and local Hilbert spaces.

ITensor also offers DMRG routines for more general optimization tasks, including


int N = 100;
auto sites = SpinOne(N);

auto ampo = AutoMPO(sites);
for(int j = 1; j < N; ++j)
    ampo += "Sz",j,"Sz",j+1;
    ampo += 0.5,"S+",j,"S-",j+1;
    ampo += 0.5,"S-",j,"S+",j+1;
auto H = toMPO(ampo);

auto sweeps = Sweeps(5);
sweeps.maxdim() = 10,40,100,200,200;
sweeps.cutoff() = 1E-8;

// Create a random starting state
auto state = InitState(sites);
for(auto i : range1(N))
    if(i%2 == 1) state.set(i,"Up");
    else         state.set(i,"Dn");
auto psi0 = randomMPS(state);

auto [energy,psi] = dmrg(H,psi0,sweeps,{"Quiet",true});

printfln("Ground state energy = %.20f",energy);

Basic DMRG interface

Generalized DMRG interfaces

Back to Classes
Back to Main