-
Notifications
You must be signed in to change notification settings - Fork 6
/
Parms.m
87 lines (79 loc) · 3.73 KB
/
Parms.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
% Declaration of Run variables ============================================
%
% RUN VARIABLES------------------------------------------------------------
% F_NS : D.o.f of each site of the fermionic chain.
% For a One-channel chain, the states are {|0>, |-1>, |1>, |2>}.
%
% MAXDIM = F_NS*KEPT : Max. dim. of Hamiltonian matrix.
% H(MAXDIM,MAXDIM) : Hamiltonian Matrix.
% c(MAXDIM,MAXDIM) : Coeff. of eigenvectors after diagonalization.
% E(MAXDIM) : Array that stores Energies before and after sorting.
% MAXBLKDIM = KEPT: Max, dim. of a Hamiltonian block.
% HK(MAXBLKDIM,MAXBLKDIM) : Hamiltonain Matrix. of a Blk.
% cK(MAXBLKDIM,MAXBLKDIM) : Coeff. of eigenvectors after Blk. diag.
% EK(MAXBLKDIM) : Array that stores Energies after Blk. diag.
% fdag_u(MAXDIM,MAXDIM) : Matrix rep. of fdag_u at each It.
% fdag_d(MAXDIM,MAXDIM) : Matrix rep. of fdag_u at each It.
%
% QTM NOS.-----------------------------------------------------------------
% Kode = enkode(Sz,Q) stores the qtm. numbers 2Sz and Q together.
% They can be retrieved using [Sz,Q] = dekode(Kode)
% Kode(MAXDIM) : Stores the Kode of of each state in the current iteration.
% Kodep(MAXDIM): Stores the Kode of of each state in the prev. iteration.
% Sz(MAXDIM) : Stores Qtm. No. 2Sz of the eigenstates.
% Q(MAXDIM) : Stores charge Qtm. No. Q = n^-nv of the eigenstates.
% Sz_good(T/F): Sz is a good Qtm. No.
% Q_good(T/F) : Q is a good Qtm. No.
% dSz/dQ : Change in Sz Qtm. No. for the new basis states.
% (by taking a cross product with the new f0-site).
%
% THERMODYNAMICS-----------------------------------------------------------
% temp(ITMAX+1): Array that stores temp. of each It.
% s(ITMAX+1) : Array that stores Entropy <S> at each It.
% savg(ITMAX+1): Array that stores 3-pt. avg. of <S>.
% tChi(ITMAX+1): Array that stores <T\Chi> at each It.
% tchiavg(ITMAX+1) : Array that stores 3-pt. avg. of <TChi>.
% Cv(ITMAX+1 ) : Array that stores Specific heat <Cv> at each It.
% Cvavg(ITMAX+1): Array that stores 3-pt. avg. of <Cv>.
% s0, tchi0, Cv0 : Array that stores resp. thermodynamics from band file
% simp, tchiimp, Cvimp : Imp. contribution to resp. thermodynamic qts.
%
% OPMAT (Operator Matrix Elements)-----------------------------------------
% NOP : No. of Operators.
% op(MAXDIM,MAXDIM,NOP) : Matrix elements <i|Op|j>; where i,j are basis
% states of current It.
% op_n(MAXDIM,MAXDIM,NOP): Matrix elements <i|Op|j>; where i,j are
% eigenstates. of current It. (to be used to set up Opmat in next It.)
% =========================================================================
F_NS = 4; MAXDIM = F_NS*KEPT; MAXBLKDIM = KEPT;
H = zeros(MAXDIM); c = zeros(MAXDIM); E = zeros(MAXDIM,1);
HK = zeros(MAXBLKDIM); cK = zeros(MAXBLKDIM); EK = zeros(MAXBLKDIM,1);
fdag_u = zeros(MAXDIM); fdag_d = zeros(MAXDIM);
Kode = zeros(MAXDIM,1); Kodep = zeros(MAXDIM,1);
Sz = zeros(MAXDIM,1) ; Q = zeros(MAXDIM,1);
if (THERMO)
temp = zeros(ITMAX+1,1);
s = zeros(ITMAX+1,1); savg = zeros(ITMAX+1,1);
tchi = zeros(ITMAX+1,1); tchiavg = zeros(ITMAX+1,1);
Cv = zeros(ITMAX+1,1); Cvavg = zeros(ITMAX+1,1);
s0 = zeros(ITMAX+1,1); simp = zeros(ITMAX+1,1);
tchi0= zeros(ITMAX+1,1); tchiimp = zeros(ITMAX+1,1);
Cv0 = zeros(ITMAX+1,1); Cvimp = zeros(ITMAX+1,1);
end
if (PLOT_E || EO_PRINT)
EvenE = zeros(int16(ITMAX/2)+1,ENMAX_PL); EvenIt= zeros(int16(ITMAX/2)+1,1);
OddE = zeros(int16(ITMAX/2),ENMAX_PL); OddIt = zeros(int16(ITMAX/2),1);
end
if (OPMAT)
op = zeros(MAXDIM,MAXDIM,NOP); op_n = zeros(MAXDIM,MAXDIM,NOP);
op_exp = zeros(ITMAX+1,NOP);
end
Sz_good = true; Q_good = true;
dSz = [0 0 0 0]; dQ = [0 0 0 0];
if ( Sz_good == true )
dSz = [0 1 -1 0];
end
if (Q_good == true )
dQ = [-1 0 0 1];
end
% =========================================================================