-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHamiltonian.h
51 lines (42 loc) · 2.09 KB
/
Hamiltonian.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
#ifndef HAMILTONIAN_H
#define HAMILTONIAN_H
#include "main.h"
#define kp kroneckerProduct
#define Id(size) MatrixXd::Identity(size, size)
#define Id_d Matrix<double, d, d>::Identity() // one-site identity matrix
typedef std::vector<MatrixD_t, Eigen::aligned_allocator<MatrixD_t>> vecMatD_t;
class Hamiltonian
{
public:
Hamiltonian();
void setParams(const std::vector<double>& couplingConstants,
int targetQNumIn, int lSysIn);
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
private:
Eigen::Matrix<double, 2, 3> BASJ;
// these are the arrays of coupling constants for each type of site in
// the lattice basis - the acronyms stand for the coupling operators
// listed below
std::vector<double> LBRSJ,
LSRBJ,
SSJ;
std::vector<int> oneSiteQNums; // one-site quantum numbers
int targetQNum, // targeted quantum number
lSys; // current system length
vecMatD_t siteBasisH2; // site-basis coupling operators
MatrixX_t blockAdjacentSiteJoin(int jType, int siteType,
const std::vector<MatrixX_t>& rhoBasisH2)
const,
// jType corresponds to the straightened-out chain,
// not the real-space coupling constants
lBlockrSiteJoin(int siteType,
const std::vector<MatrixX_t>& off0RhoBasisH2,
int compm) const,
lSiterBlockJoin(int siteType, int m,
const std::vector<MatrixX_t>& off0RhoBasisH2)
const,
siteSiteJoin(int siteType, int m, int compm) const;
// joins the two free sites together
friend class TheBlock;
};
#endif