-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtensor_type.h
More file actions
250 lines (147 loc) · 3.9 KB
/
Copy pathtensor_type.h
File metadata and controls
250 lines (147 loc) · 3.9 KB
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
#include <vector>
#include <complex>
using namespace std;
#ifndef tensors
#define tensors
#define ulli unsigned long long int
#ifdef USE_COMPLEX
#define double_type complex<double>
#define USING_COMPLEX true
#endif
#ifndef USE_COMPLEX
#define double_type double
#define USING_COMPLEX false
#endif
typedef vector< complex<double> > Mat_1_Complex_doub;
typedef vector<Mat_1_Complex_doub> Mat_2_Complex_doub;
typedef vector<Mat_2_Complex_doub> Mat_3_Complex_doub;
typedef vector<Mat_3_Complex_doub> Mat_4_Complex_doub;
typedef vector<double_type> Mat_1_doub;
typedef vector<Mat_1_doub> Mat_2_doub;
typedef vector<Mat_2_doub> Mat_3_doub;
typedef vector<Mat_3_doub> Mat_4_doub;
typedef vector<Mat_4_doub> Mat_5_doub;
typedef vector<Mat_5_doub> Mat_6_doub;
typedef vector<Mat_6_doub> Mat_7_doub;
typedef vector<unsigned long long int> Mat_1_ullint;
typedef vector<Mat_1_ullint> Mat_2_ullint;
typedef vector<int> Mat_1_int;
typedef vector<Mat_1_int> Mat_2_int;
typedef vector<Mat_2_int> Mat_3_int;
typedef vector<Mat_3_int> Mat_4_int;
typedef vector<string> Mat_1_string;
typedef vector<Mat_1_string> Mat_2_string;
typedef vector<Mat_2_string> Mat_3_string;
typedef vector<Mat_3_string> Mat_4_string;
typedef vector<double> Mat_1_real;
typedef vector<Mat_1_real> Mat_2_real;
typedef vector<Mat_2_real> Mat_3_real;
typedef vector<Mat_3_real> Mat_4_real;
complex<double> const one_comp(1,0);
complex<double> const zero_comp(0,0);
complex<double> const iota_comp(0,1);
double const one_real=1.0;
double const zero_real=0.0;
#ifndef USE_COMPLEX
#define one one_real
#define zero zero_real
#endif
#ifdef USE_COMPLEX
#define one one_comp
#define zero zero_comp
#endif
struct TUPLE_2_INT{
int first;
int second;
};
struct pair_doubletype_int{
double_type first;
int second;
};
typedef vector<pair_doubletype_int> Mat_1_pair_DoubInt;
typedef vector<Mat_1_pair_DoubInt> Mat_2_pair_Doubint;
struct pair_real_int{
double first;
int second;
};
typedef vector<pair_real_int> Mat_1_pair_realInt;
typedef vector<Mat_1_pair_realInt> Mat_2_pair_realint;
struct pair_int{
int first;
int second;
};
typedef vector<pair_int> Mat_1_intpair;
typedef vector<Mat_1_intpair> Mat_2_intpair;
struct tetra_int{
int first;
int second;
int third;
int fourth;
};
typedef vector<tetra_int> Mat_1_tetra_int;
typedef vector<Mat_1_tetra_int> Mat_2_tetra_int;
struct trio_int{
int orb_;
int spin_;
int site_;
};
typedef vector<trio_int> Mat_1_trio_int;
typedef vector<Mat_1_trio_int> Mat_2_trio_int;
struct triad_int{
int first_;
int second_;
int third_;
};
typedef vector<triad_int> Mat_1_triad_int;
typedef vector<Mat_1_triad_int> Mat_2_triad_int;
class INT_CSR_MAT{
public:
Mat_1_int value;
Mat_1_int columns;
Mat_1_int row_ind;
};
class DOUBLE_CSR_MAT{
public:
Mat_1_doub value;
Mat_1_int columns;
Mat_1_int row_ind;
};
class DOUBLE_COO_MAT{
public:
Mat_1_doub value;
Mat_1_int columns;
Mat_1_int rows;
int nrows;
int ncols;
};
class COMPLEXDOUBLE_CSR_MAT{
public:
Mat_1_Complex_doub value;
Mat_1_int columns;
Mat_1_int row_ind;
};
//template<class Mat_1_Type>
//struct TMatrix_COO{
// Mat_1_Type value;
// Mat_1_int rows;
// Mat_1_int columns;
// int nrows;
// int ncols;
// };
struct Matrix_COO{
Mat_1_doub value;
Mat_1_int rows;
Mat_1_int columns;
int nrows;
int ncols;
};
typedef vector<Matrix_COO> Hamiltonian_1_COO;
typedef vector<Hamiltonian_1_COO> Hamiltonian_2_COO;
typedef vector<Hamiltonian_2_COO> Hamiltonian_3_COO;
typedef vector<Hamiltonian_3_COO> Hamiltonian_4_COO;
typedef vector<Hamiltonian_4_COO> Hamiltonian_5_COO;
typedef vector<Hamiltonian_5_COO> Hamiltonian_6_COO;
typedef vector<Hamiltonian_6_COO> Hamiltonian_7_COO;
typedef vector<Hamiltonian_7_COO> Hamiltonian_8_COO;
typedef vector<Hamiltonian_8_COO> Hamiltonian_9_COO;
#endif