SpinChainComputeS2

From diagham
Jump to navigation Jump to search

SpinChainComputeS2 computes the S value of an eigenstate or a group of eigenstates. For example, if we generate an eigenstate spin_2_periodicaklt_p3_1.000000_p4_1.000000_n_8_sz_0_invsym_1_szsym_1_k_4.22.vec using PeriodicSpinChainGeneralizedAKLT

$PATHTODIAGHAM/build/Spin/src/Programs/SpinChainComputeS2 -i spin_2_periodicaklt_p3_1.000000_p4_1.000000_n_8_sz_0_invsym_1_szsym_1_k_4.22.vec --force-real

The output will look like

   can't guess x-momentum sector from file name spin_2_periodicaklt_p3_1.000000_p4_1.000000_n_8_sz_0_invsym_1_szsym_1_k_4.22.vec
   can't guess x-momentum sector from file name spin_2_periodicaklt_p3_1.000000_p4_1.000000_n_8_sz_0_invsym_1_szsym_1_k_4.22.vec
   N=8 Sz=0 2s=4 kx=4
   memory requested for Hilbert space = 13ko
   memory requested for lookup table = 16Mo
   <S^2>=20 <S>=4
   round(<2S>)=8


The first few lines are just information about testing symmetries (detected from the file name). The two last lines gives the expectation of <math>S^2</math> and thus the S value. The last line is the rounded value of 2S. Note that we have used the --force-real to indicate that the eigenstate is real despite it has been computed using momentum conservation (since the state here is at momentum <math>\pi</math>).

If we have a set of eigenstates (for example corresponding to some degenerate energy), we can diagonalize them in one shot. Remember that diagonalization codes usually never produced <math>S^2</math> eigenstates for degenerate energies, so this step is mandatory in that case to get the correct <math>S^2</math> values. First ew need to provide a list of text through a text file (here basis.dat)


   spin_2_periodicaklt_p3_1.000000_p4_1.000000_n_8_sz_0_invsym_1_szsym_1_k_4.21.vec
   spin_2_periodicaklt_p3_1.000000_p4_1.000000_n_8_sz_0_invsym_1_szsym_1_k_4.22.vec


Note that all the states should have the same quantum numbers. Then we just have to run

$PATHTODIAGHAM/build/Spin/src/Programs/SpinChainComputeS2 --degenerate-states basis.dat --force-real

and we will get as an output

   can't guess x-momentum sector from file name spin_2_periodicaklt_p3_1.000000_p4_1.000000_n_8_sz_0_invsym_1_szsym_1_k_4.21.vec
   can't guess x-momentum sector from file name spin_2_periodicaklt_p3_1.000000_p4_1.000000_n_8_sz_0_invsym_1_szsym_1_k_4.21.vec
   N=8 Sz=0 2s=4 kx=4
   memory requested for Hilbert space = 13ko
   memory requested for lookup table = 16Mo
   <S^2>=3.5687597400896e-15 <S>=3.5527136788005e-15
   round(<2S>)=0
   <S^2>=20 <S>=4
   round(<2S>)=8

We now have the two <math>S^2</math> eigenvalues and thus the corresponding S values. If we want the corresponding eigenstates, we just have to include the --compute-eigenstates option

$PATHTODIAGHAM/build/Spin/src/Programs/SpinChainComputeS2 --degenerate-states basis.dat --force-real --compute-eigenstates

This will create two new vectors spin_2_periodicaklt_p3_1.000000_p4_1.000000_n_8_sz_0_s_0_invsym_1_szsym_1_k_4.21.vec and spin_2_periodicaklt_p3_1.000000_p4_1.000000_n_8_sz_0_s_8_invsym_1_szsym_1_k_4.22.vec. Note that each file name includes the s value (here _s_0_ and _s_8_).