Main /
TutorialDmrgThis 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 chainThe 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 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]
{%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
This will take a few seconds to generate the lattice file named
You might need to scroll up the terminal, or pipe the output through a pager such as Using the lattice description, we can generate some matrix product states. Firstly, we will construct the Néel state. The program 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 To generate the matrix product representation of the Néel state, use
This command takes the lattice we defined before ( With any matrix product wavefunction, we can calculate expectation values, overlaps and so on. A rather trivial example is,
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,
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;
which calculates the expectation value of the operator 'Sz(5) * Sz(j)', for j = 5,6,...,15. ( We can also calculate the expectation value of the energy for this state;
which will be exactly (-0.25) * 59 = -14.75. |