Lanczos diagonalization of the Heisenberg chain using magnetization conservation and semi-momentm states with parity and spin-inversion symmetry
Program: hchan_lanc
The program operates in the sector of magnetization mz=0, but it is very easy to modify it for any mz. The program only gives energies.
Input:
File read.in containing:
N, k, p, z
mlanc, rm, hm, vm
Line 1, Column 1: System size N (integer)
Line 1, Column 2: Momentum index k (integer, 0,...,N/2)
Line 1, Column 3: parity index p (integer, +1,-1)
Line 1, Column 3: spin-inversion index z (integer, +1,-1)
Line 2, Column 1: Number of Lanczos iterations (integer)
Line 2, Column 2: Maximum number of representatives
Line 2, Column 2: Maximum number of H-elements stored
Line 2, Column 3: Maximum number of different H-elements
Example read.in
16 0 1 1 50 1000 10000 200
File seed.in, containing an integer random number seed
Example read.in
72637361
Output:
File log.txt Information on the basis and storage requirements (actual and maximal values).
Line 1: Actual and maximum basis size
Line 2: Actual and maximum number of H-elements
Line 3: Actual and maximum number of different H-elements
File itr.dat
Convergence of the 5 lowest energies.
Column 1: Iteration number (number of Lanczos states)
Columns 2-6: Five lowest eigenvalues
File e.dat
All the eigenvalues of the final tri-diagonal Hamiltonian
Column 1: Iteration number
Column 2: energy
Note that the number of Lanczos iterations (states) cannot exceed the actual number of states in the block considered, because this is the maximum number of orthogonal states that can be formed. As an example of the behavior of the program if this rule is violated, the following is the output in itr.dat for N=8 in the sector k=0, p=1, z=1:
2 -3.1621336950 -0.2736354218 0.0000000000 0.0000000000 0.0000000000 3 -3.5964463541 -0.4960740597 0.5164881650 0.0000000000 0.0000000000 4 -3.6410241885 -1.0594470880 -0.2525265803 1.2489598038 0.0000000000 5 -3.6510005330 -1.7872019538 -0.4398498336 0.4218475976 1.9347353460 6 -3.6510929337 -1.8016145828 -0.4460035910 0.3737378380 1.2145807857 7 -3.6510934089 -1.8019377358 -0.7261094450 -0.4450418679 0.3772028540 8 NaN NaN NaN NaN NaN 9 NaN NaN NaN NaN NaN
The number of blocks in the state is 7, and the energies obtained with 7 Lanczos iterations are exact. Continuing after 7 iterations, the calculation produces garbage.