DMRG-06 Correlations
Correlation Functions
The most important correlation functions in many-body physics are two-point correlators, i.e. correlators that involve two sites and , such as . Short-ranged ones determine energies (in the typical short-ranged Hamiltonians of correlation physics), long-ranged ones determine correlation lengths.
Another Go At The Energy Per Bond
As already mentioned in DMRG-02, the ground state energy per bond in both spin-1/2 and spin-1 chains are given by:
This gives the energy of each bond individually, but we are interested in the thermodynamic limit, where all bonds are on equal footing and hence should have the same energy unless there is some physical breaking of translational invariance. Obviously, the bonds that are closest this asymptotic behaviour are those in the chain center, so the direct approach would be to calculate and extrapolate it first in for fixed and then in after fixing . Before you do this, plot versus for a few values of and , that are not too small (as a check of the program, you may also consider the three contributions individually before you do the sum).
For the spin-1/2 chain, bond energies oscillate strongly between odd and even numbered bonds. This is because the open ends are felt very strongly, due to criticality, and because the spin-1/2 chain is on the verge of dimerization, i.e. a spontaneous breaking of translational symmetry of the ground state down to a periodicity of 2. It is therefore more meaningful to extrapolate the average energy of a strong and a weak bond: you immediately gain lots of accuracy. This is yet another demonstration that it is worthwhile to have a close look at the actual output of DMRG by considering various local or (here) almost local observables.
Spin-Spin Correlations: Spin-1/2
Take a relatively long chain (say, ), and calculate for various increasing .
Now plot , where you round the positions such that their distance is . The purpose of this is to center the correlators about the chain center to make boundary effects as small as possible. There are other ways of doing this, like averaging over several correlators with same site distance (also more or less centered). Since we expect a power-law with critical exponent (see DMRG-02), use a log-log plot, where you should take absolute values or multiply out the antiferromagnetic factor .
What you should see, is a power-law on short distances, but a faster (in fact, exponential) decay for larger distances. This has two reasons: (i) the finite system size cuts off the power-law correlations; but as we took a large system size here, this should not matter too much. (ii) DMRG’s algorithmic structure effectively generates correlators which are superpositions of up to purely exponential decays, and therefore can only mimic power-laws by such superpositions - at large distances, the slowest exponential decay will survive all the others, replacing the power-law by an exponential law. The larger you choose , the further you push out this crossover.
Using parameter files
The following parameter file spin_one_half will setup this run for us (once again, for illustration we shall use a smaller system and number of states than the more realistic numbers stated above). In this example we consider a chain of length and we setup multiple runs with different numbers of states . We use 6 sweeps. Make sure that the correlations look symmetric:
LATTICE="open chain lattice"
MODEL="spin"
CONSERVED_QUANTUMNUMBERS="N,Sz"
Sz_total=0
SWEEPS=6
J=1
NUMBER_EIGENVALUES=1
MEASURE_AVERAGE[Magnetization]=Sz
MEASURE_AVERAGE[Exchange]=exchange
MEASURE_LOCAL[Local magnetization]=Sz
MEASURE_CORRELATIONS[Diagonal spin correlations]=Sz
MEASURE_CORRELATIONS[Offdiagonal spin correlations]="Splus:Sminus"
L=32
{ MAXSTATES=20 }
{ MAXSTATES=40 }
{ MAXSTATES=60 }
parameter2xml spin_one_half
dmrg --write-xml spin_one_half.in.xml
Using Python
The script spin_one_half.py sets up three runs with different numbers of states and loads the results:
import pyalps
import numpy as np
import matplotlib.pyplot as plt
import pyalps.plot
parms = []
for D in [20,40,60]:
parms.append( {
'LATTICE' : 'open chain lattice',
'MODEL' : 'spin',
'CONSERVED_QUANTUMNUMBERS' : 'N,Sz',
'Sz_total' : 0,
'J' : 1,
'SWEEPS' : 6,
'NUMBER_EIGENVALUES' : 1,
'L' : 32,
'MAXSTATES' : D,
'MEASURE_AVERAGE[Magnetization]' : 'Sz',
'MEASURE_AVERAGE[Exchange]' : 'exchange',
'MEASURE_LOCAL[Local magnetization]' : 'Sz',
'MEASURE_CORRELATIONS[Diagonal spin correlations]' : 'Sz',
'MEASURE_CORRELATIONS[Offdiagonal spin correlations]' : 'Splus:Sminus'
} )
input_file = pyalps.writeInputFiles('parm_spin_one_half',parms)
res = pyalps.runApplication('dmrg',input_file,writexml=True)
data = pyalps.loadEigenstateMeasurements(pyalps.getResultFiles(prefix='parm_spin_one_half'))
Now we can extract e.g. correlations:
curves = []
for run in data:
for s in run:
if s.props['observable'] == 'Diagonal spin correlations':
d = pyalps.DataSet()
d.props['observable'] = 'Sz correlations'
d.props['label'] = 'D = '+str(s.props['MAXSTATES'])
L = int(s.props['L'])
d.x = np.arange(L)
# sites with increasing distance l symmetric to the chain center
site1 = np.array([int(-(l+1)/2.0) for l in range(0,L)]) + L/2
site2 = np.array([int( l /2.0) for l in range(0,L)]) + L/2
indices = L*site1 + site2
d.y = abs(s.y[0][indices])
curves.append(d)
and plot them vs. site distance:
plt.figure()
pyalps.plot.plot(curves)
plt.xscale('log')
plt.yscale('log')
plt.legend()
plt.title('Spin correlations in antiferromagnetic Heisenberg chain (S=1/2)')
plt.ylabel('correlations $| \\langle S^z_{L/2-l/2} S^z_{L/2+l/2} \\rangle |$')
plt.xlabel('distance $l$')
plt.show()
Spin-Spin Correlations: Spin-1
In the spin-1 chain, we do expect exponential decay (with an analytic modification), so the exponential nature of the correlators of DMRG should fit well. Again, choose a long chain (say, ), and calculate for various increasing .
Now plot where you round the positions such that their distance is , as before. As we expect an exponential law, use a log-lin plot, again eliminating the negative signs.
From the log-lin plot, extract a correlation length, and compare it to the benchmark value quoted in DMRG-02. It will depend (and in fact monotonically increase with) .
In fact, the calculation of correlation lengths is much harder to converge than that of the local quantities. This is due to the fact that a more profound algorithmic analysis reveals DMRG to be an algorithm geared especially well to the optimal representation of local quantities, not so much non-local ones as long-ranged correlators.
Using parameter files
The parameter file spin_one looks much like the one for the previous example, but replacing the lattice and the model as follows:
LATTICE_LIBRARY="my_lattices.xml"
LATTICE="open chain lattice with special edges 32"
MODEL="spin"
local_S0=0.5
local_S1=1
CONSERVED_QUANTUMNUMBERS="N,Sz"
Sz_total=0
SWEEPS=6
J=1
NUMBER_EIGENVALUES=1
MEASURE_AVERAGE[Magnetization]=Sz
MEASURE_AVERAGE[Exchange]=exchange
MEASURE_LOCAL[Local magnetization]=Sz
MEASURE_CORRELATIONS[Diagonal spin correlations]=Sz
MEASURE_CORRELATIONS[Offdiagonal spin correlations]="Splus:Sminus"
{ MAXSTATES=20 }
{ MAXSTATES=40 }
{ MAXSTATES=60 }
parameter2xml spin_one
dmrg --write-xml spin_one.in.xml
Using Python
The main difference of the script spin_one.py with respect to the previous one is the definition of lattice and model:
parms = []
L = 32
for D in [20,40,60]:
parms.append( {
'LATTICE_LIBRARY' : 'my_lattices.xml',
'LATTICE' : 'open chain lattice with special edges '+str(L),
'MODEL' : 'spin',
'local_S0' : 0.5,
'local_S1' : 1,
'CONSERVED_QUANTUMNUMBERS' : 'N,Sz',
'Sz_total' : 0,
'J' : 1,
'SWEEPS' : 4,
'NUMBER_EIGENVALUES' : 1,
'MAXSTATES' : D,
'MEASURE_AVERAGE[Magnetization]' : 'Sz',
'MEASURE_AVERAGE[Exchange]' : 'exchange',
'MEASURE_LOCAL[Local magnetization]' : 'Sz',
'MEASURE_CORRELATIONS[Diagonal spin correlations]' : 'Sz',
'MEASURE_CORRELATIONS[Offdiagonal spin correlations]' : 'Splus:Sminus'
} )
After running the simulation, correlations can be extracted and plotted in the same way as before.
Sometimes There Is A Way Out
In the special case of the spin-1 chain, we have a loophole for the calculation of the correlation length, which is related to the weird observation that the first excitation was not a bulk excitation. It can be shown that a good toy model for a spin-1 chain is given as follows: at each site of a spin-1, you put two spin-1/2, and construct the spin-1 states from the triplet states of the two spin-1/2 at each site. The ground state is then approximated quite well by a state where you link two spin-1/2 on neighbouring sites by a singlet state.
In this construction, for open boundary conditions (but not periodic ones), on the first and on the last site there will be two lonely spin-1/2 without partner. These two spin-1/2 particles can form 4 states among themselves, which in the toy model the ground state is four-fold degenerate. In the real spin-1 chain, this four-fold degeneracy (from one state of total spin 0 and three of total spin 1) is only achieved in the thermodynamic limit when the two spins are totally removed from each other. This is why there was no gap between magnetization sectors 0 and 1. The first bulk excitation needs magnetization 2.
To cure this, we can attach one spin-1/2 operator on each side of the lattice, taking the same bond Hamiltonian for these new sites, linking the two lonely spins by a singlet state. You may check that now there is a gap between magnetization sectors 0 and 1!
In order to calculate the correlation length, one can also play the following trick: attach only one spin-1/2 at one end. This means that the ground state will now be doubly degenerate, in magnetization sectors +1/2 or -1/2. We can characterize this by the boundary site where there is NO spin-1/2 attached carrying finite magnetization, that decays into the bulk, with the correlation length.
For a chain of length and , calculate the ground state magnetization. Plot it (eliminating the sign oscillation) versus site in a log-lin plot and extract the correlation length.
Summary
Correlation functions directly expose the qualitative difference between the two chains — power-law decay for the critical spin-1/2 chain versus exponential decay for the gapped spin-1 chain — while also showing where DMRG itself is least accurate, since long-ranged correlations converge far more slowly in than local quantities like the energy.
Questions
- Plotting versus for various (not too small ): what do you observe for the spin-1 chain, and what for the spin-1/2 chain? Considering the three contributions to individually before summing them, what relationship between them should exist?
- Has the correlation length converged by the time you reach , and how does this compare to the convergence of local or quasi-local observables such as the magnetization or energy at the same ?
- For a chain of length and , extracting the correlation length from the ground-state magnetization profile this way: what correlation length do you get, and how does it compare to from DMRG-02?