Recent Changes - Search:

HomePage

PmWiki

pmwiki.org

TutorialDmrg

This is a start at updating the old tutorial. It is no way near complete yet. It doesn't even do any DMRG itself, just some expectation values for a Neel state. For some basic introduction to an actual DMRG calculation, see Main.SpinChain.

This tutorial was originally used as a DMRG demonstration at the First ALPS Users Workshop, Lugano, Switzerland, Sep/Oct 2004.

1. Spin 1/2 Heisenberg chain

The first step is to construct a lattice, and the associated operators. All operators that are used for a particular lattice are stored in one file, and indexed by name. This includes all operators that are defined by the site basis, named as "Operator(coordinates)", the identity operator "I" and the Hamiltonian "H". For example, "Sz(5)" is the operator that measures the z-component of the spin at coordinate 5.

There is a program to generate the lattice and operators for a one-dimensional isotropic nearest neighbor spin chain with open boundary conditions, named spinchain-u1.

usage: spinchain-u1 [options]
Allowed options:
  --help                   show this help message
  -L [ --LatticeSize ] arg lattice size [required]
  -S [ --Spin ] arg        magnitude of the spin in the bulk [default 0.5]
  --SpinEdge arg           magnitude of the spin at the edges [default Spin]
  --J arg                  isotropic bilinear coupling [default 1]
  --Jp arg                 XY bilinear coupling [default J]
  --Jz arg                 Z bilinear coupling [default J]
  --JpEdge arg             XY bilinear coupling at the edge bonds [default Jp]
  --JzEdge arg             Z bilinear coupling at the edge bonds [default Jz]
  --Beta arg               nearest neighbor biquadratic coupling [default 0]
  --BetaEdge arg           biquadratic coupling at the edge bonds [default Beta]
  -o [ --out ] arg         output filename [required]

Spin and SpinEdge specify the magnitude of the spins in the bulk and at the left/right boundaries, respectively. The SpinEdge is mostly useful to reduce edge effects in integer spin chains. Open boundary conditions are assumed. The Hamiltonian is

{%ham,H = \sum_{i=1}^{L-1}\left[ \frac{\mbox{Jperp}}{2} \left( S^+_i S^-_{i+1} \; +\; S^-_i S^+_{i+1} \right) \: + \: \mbox{Jz} \: S^z_i S^z_{i+1} \: + \: \mathrm{Beta} \: (\mathbf{S}_i \cdot \mathbf{S}_{i+1})^2 \right]%}

To generate the Hamiltonian for a 60 site spin-1/2 Heisenberg chain, use

spinchain-u1 -L 60 -o spinhalf-60

This will take a few seconds to generate the lattice file named spinhalf-60. Once this is done, you can see the dimension of each symmetry sector using the mp-dimensions program.

mp-dimensions spinhalf-60

You might need to scroll up the terminal, or pipe the output through a pager such as more, to see all of the output. The most interesting symmetry sector is Sz=0, which is also the largest. How does the dimension of this sector compare to what could be done with exact diagonalization? How much would additional symmetries (eg, spin reflection or translation symmetry) help? (To see the effect of SU(2) symmetry, you can use spinchain-su2 to generate a lattice and compare the dimensions of Sz symmetery sectors versus {$S^2$} sectors. The parameters for spinchain-su2 are almost the same as those of spinchain-u1, just the Jperp and Jz parameters are replaced by a single parameter J, as the SU(2) symmetry requires Jperp=Jz).

Using the lattice description, we can generate some matrix product states. Firstly, we will construct the Néel state. The program mp-construct is used to construct m=1 matrix product states. These simply correspond to basis states of the original lattice, specified by a list of basis states, one for each lattice site. Thus, the Neél state, which looks like {$\uparrow \downarrow \uparrow \downarrow \uparrow \downarrow \ldots$}, can be constructed by specifying an input list of basis states, one on each line. These are specified from right to left, thus to reproduce the Néel state with a down-spin on the left hand edge and an up-spin on the right hand edge we need a file that starts with 0.5 and ends with -0.5;

0.5
-0.5
0.5
-0.5
0.5
-0.5
0.5
-0.5
0.5
-0.5
0.5
-0.5
0.5
-0.5
0.5
-0.5
0.5
-0.5
0.5
-0.5

Use your favourite editor to construct this, or simply cut&paste from this page (three times, since this only includes 20 lines and you need 60). Save this text file as neel-in. If you have fewer basis states than exist in the physical lattice, the program will fail. Extra lines are ignored.

To generate the matrix product representation of the Néel state, use

mp-construct spinhalf-60 neel-in neel-state

This command takes the lattice we defined before (spinhalf-60), the description of the basis state (neel-in), and saves the matrix product wavefunction as neel-state.

With any matrix product wavefunction, we can calculate expectation values, overlaps and so on. A rather trivial example is,

mp-overlap neel-state neel-state

which should give '(1,0)', which is the standard C++ format for a complex number with real part 1 and imaginary part 0. Note that the lattice description is not needed to calculate overlaps between wavefunctions. Almost as trivial,

mp-expectation neel-state spinhalf-60:'Sz(1)' neel-state

calculates the expectation value {$\langle \mbox{neel--state} | S^z(1) | \mbox{neel--state} \rangle$}, the z-component of the first spin on the lattice, which, all being well, will be -0.5. The quotes (' or ") are needed to stop the shell from interpreting the '(' itself. We can also calculate a correlation function;

mp-correlation spinhalf-60 neel-state Sz 5 Sz 15

which calculates the expectation value of the operator 'Sz(5) * Sz(j)', for j = 5,6,...,15. (mp-expectation does not yet understand expressions, otherwise you could enter an expression like 'Sz(5) * Sz(6)' into mp-expectation directly).

We can also calculate the expectation value of the energy for this state;

mp-expectation neel-state spinhalf-60:H neel-state

which will be exactly (-0.25) * 59 = -14.75.

Edit - History - Print - Recent Changes - Search
Page last modified on December 16, 2010, at 05:15 PM