forked from chengchen1987/ed_Nkpz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbasis.h
143 lines (114 loc) · 3.1 KB
/
basis.h
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
#pragma once
#include "common.h"
class Basis
{
private:
my_int L;
my_int nup;
my_int Dim;
my_int* State;
my_int* Index;
public:
~Basis();
// Basis with conserved nup
Basis(my_int _L, my_int _nup);
my_int get_L(void) { return L; }
my_int get_nup(void) { return nup; }
my_int get_Dim(void) { return Dim; }
my_int get_state(const my_int& index);
my_int get_index(const my_int& state);
};
// momentum states, conserved k
class Basis_k
{
private:
my_int L;
my_int nup;
my_int k;
my_int Dim;
my_int* State;
my_int* State_R;
my_int* Index;
public:
~Basis_k();
// Basis with conserved nup, k
Basis_k(my_int _L, my_int _nup, my_int _k);
my_int CheckState_Ra(my_int s);
void Representative(const my_int& s, my_int& sa, my_int& la);
my_int get_L(void) { return L; }
my_int get_nup(void) { return nup; }
my_int get_k(void) { return k; }
my_int get_Dim(void) { return Dim; }
my_int get_state(const my_int& index);
my_int get_Rs(const my_int& index);
my_int get_index(const my_int& state);
//
};
// semi-momentum states + parity, conserved k,p
class Basis_kp
{
private:
my_int L;
my_int nup;
my_int k, p;
my_int Dim;
my_int* State;
my_int* Index;
my_int* State_R;
my_int* State_sigma;
my_int* State_m;
public:
~Basis_kp();
// Basis with conserved nup, k
Basis_kp(my_int _L, my_int _nup, my_int _k, my_int _p);
void CheckState_R_m(my_int s, my_int &r, my_int &m);
void Representative(const my_int& s, my_int& sa, my_int& la, my_int&qa);
my_int get_L(void) { return L; }
my_int get_nup(void) { return nup; }
my_int get_k(void) { return k; }
my_int get_p(void) { return p; }
my_int get_Dim(void) { return Dim; }
my_int get_state(const my_int& index);
my_int get_Rs(const my_int& index);
my_int get_ms(const my_int& index);
my_int get_sigma(const my_int& index);
my_int get_index(const my_int& state);
//
};
// semi-momentum states + parity + spin-inversion, conserved k,p,z for only the mz=0 sector
class Basis_kpz
{
private:
my_int L;
my_int nup;
my_int k, p, z;
my_int Dim;
my_int* State;
my_int* Index;
my_int* State_R;
my_int* State_sigma;
my_int* State_mp;
my_int* State_mz;
my_int* State_mpz;
public:
~Basis_kpz();
// Basis with conserved nup, k
Basis_kpz(my_int _L, my_int _nup, my_int _k, my_int _p, my_int _z);
void CheckState_R_mpz(my_int s, my_int& r, my_int& mp, my_int &mz, my_int &mpz);
void Representative(const my_int& s, my_int& sa, my_int& la, my_int& qa, my_int &ga);
double get_Norm(my_int sigma, my_int mp, my_int mz, my_int mpz);
my_int get_L(void) { return L; }
my_int get_nup(void) { return nup; }
my_int get_k(void) { return k; }
my_int get_p(void) { return p; }
my_int get_z(void) { return z; }
my_int get_Dim(void) { return Dim; }
my_int get_state(const my_int& index);
my_int get_Rs(const my_int& index);
my_int get_mp(const my_int& index);
my_int get_mz(const my_int& index);
my_int get_mpz(const my_int& index);
my_int get_sigma(const my_int& index);
my_int get_index(const my_int& state);
//
};