forked from sanshar/Block
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Operators.h
149 lines (123 loc) · 4.68 KB
/
Operators.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
144
145
146
147
148
149
#ifndef SPIN_OPERATORS_HEADER
#define SPIN_OPERATORS_HEADER
#include "BaseOperator.h"
#include <boost/function.hpp>
#include <boost/functional.hpp>
typedef boost::function<void (std::vector<boost::shared_ptr<SpinAdapted::SparseMatrix> >&)> Functor;
namespace SpinAdapted{
class Cre: public SpinAdapted::SparseMatrix
{
public:
Cre() { orbs.resize(1); fermion = true; build_pattern = "(C)"; }
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class Des: public SpinAdapted::SparseMatrix
{
public:
Des() { orbs.resize(1); fermion = true; build_pattern = "(D)"; }
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class CreDes: public SpinAdapted::SparseMatrix
{
public:
CreDes() { orbs.resize(2); fermion = false; build_pattern = "(CD)"; }
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class DesCre: public SpinAdapted::SparseMatrix
{
public:
DesCre() { orbs.resize(2); fermion = false; build_pattern = "(DC)"; }
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class CreCre: public SpinAdapted::SparseMatrix
{
public:
CreCre() { orbs.resize(2); fermion = false; build_pattern = "(CC)"; }
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class DesDes: public SpinAdapted::SparseMatrix
{
public:
DesDes() { orbs.resize(2); fermion = false; build_pattern = "(DD)"; }
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class CreDesComp: public SpinAdapted::SparseMatrix
{
public:
CreDesComp() { orbs.resize(2); fermion = false;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class DesCreComp: public SpinAdapted::SparseMatrix
{
public:
DesCreComp() { orbs.resize(2); fermion = false;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class DesDesComp: public SpinAdapted::SparseMatrix
{
public:
DesDesComp() { orbs.resize(2); fermion = false;}
void build_fromcc(SpinBlock& b);
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class CreCreComp: public SpinAdapted::SparseMatrix
{
public:
CreCreComp() { orbs.resize(2); fermion = false;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class CreCreDesComp: public SpinAdapted::SparseMatrix
{
public:
CreCreDesComp() { orbs.resize(1); fermion = true;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class CreDesDesComp: public SpinAdapted::SparseMatrix
{
public:
CreDesDesComp() { orbs.resize(1); fermion = true;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class Ham: public SpinAdapted::SparseMatrix
{
public:
Ham() { fermion = false;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
class Overlap: public SpinAdapted::SparseMatrix
{
public:
Overlap() { fermion = false;}
void build(const SpinBlock& b) ;
boost::shared_ptr<SparseMatrix> getworkingrepresentation(const SpinBlock* block);
double redMatrixElement(Csf c1, vector<Csf>& ladder, const SpinBlock* b);
};
double vcccc_4idx_asymm(int i, int j, int k, int l);
}
#endif