-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHamiltonian.h
40 lines (31 loc) · 1.42 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
#ifndef HAMILTONIAN_H
#define HAMILTONIAN_H
#include "main.h"
struct effectiveHams // each site's effective block and bond Hamiltonians
{
int m; // number of states stored in block
rmMatrixX_t hS; // block Hamiltonian
std::vector<MatrixX_t> rhoBasisH2; // density-matrix-basis coupling operators
};
class TheBlock;
class Hamiltonian
{
public:
Hamiltonian();
void setParams(const std::vector<double>& couplingConstants);
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
private:
std::vector<double> couplingConstants;
std::vector<MatrixD_t, Eigen::aligned_allocator<MatrixD_t>> siteBasisH2;
// site-basis coupling operators
MatrixD_t h1; // single-site Hamiltonian
rmMatrixX_t EDNNCoupling(const std::vector<MatrixX_t>& rhoBasisH2) const;
Eigen::Matrix<hamScalar, Eigen::Dynamic, 1>
act(const effectiveHams& blockParts,
const effectiveHams& compBlockParts, rmMatrixX_t x) const;
rmMatrixX_t NNCoupling(TheBlock * block) const;
// specify the block-adjacent-free-site
// couplings to be projected into new basis
friend class TheBlock;
};
#endif