-
Notifications
You must be signed in to change notification settings - Fork 1
/
FinalSuperblock.h
64 lines (57 loc) · 3.28 KB
/
FinalSuperblock.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
#ifndef FINALSUPERBLOCK_H
#define FINALSUPERBLOCK_H
#include <map>
#include "TheBlock.h"
typedef std::map<int, obsMatrixD_t, std::less<int>,
Eigen::aligned_allocator<std::pair<const int, obsMatrixD_t>>>
opsMap;
typedef Eigen::Matrix<obsScalar, Eigen::Dynamic, 1> obsVectorX_t;
class FinalSuperblock
{
public:
double gsEnergy; // returns ground-state energy
FinalSuperblock(double gsEnergy, int lSupFinal,
const rmMatrixX_t& psiGround,
int mSFinal, int mEFinal, int skips);
double expValue(const opsVec& ops, std::vector<TheBlock>& westBlocks,
std::vector<TheBlock>& eastBlocks);
// calculates expectation value of a combination of single-site operators
private:
// system information set upon initialization:
int lSup; // final system size
rmMatrixX_t psiGround; // final superblock ground state
int lS, // final length of the system block
lE, // final length of the environment block
mS, // final number of states stored in system block
mE, // final number of states stored in environment block
skips;
// observables that are currently being evaluated:
opsMap sysBlockOps,
// observable operators that will act on the system block
envBlockOps; // same for environment block
obsMatrixD_t lFreeSite,
rFreeSite;
void placeOp(const std::pair<obsMatrixD_t, int>& op, opsMap& blockSide,
bool systemSide),
// assign each one-site observable to the appropriate block
reshapePsiGround(); // back into a column vector
obsVectorX_t actSysBlock(std::vector<TheBlock>& leftBlocks),
// act the system block on the ground state
actLFreeSite(),
// acts the left-hand free site on the ground state
actSysBlockLFreeSite(std::vector<TheBlock>& leftBlocks),
// acts both the system block and the
// left-hand free site on the ground state
actEnvBlock(std::vector<TheBlock>& rightBlocks),
// acts the ADJOINT of the environment block on the ground state
actRFreeSite(), // acts the ADJOINT of the right-hand
// free site on the ground state
actEnvBlockRFreeSite(std::vector<TheBlock>& rightBlocks);
// acts both the ADJOINT of the right-hand free site and
// the ADJOINT of the environment block on the ground state
obsMatrixX_t rhoBasisRep(const opsMap& blockOps,
std::vector<TheBlock>& blocks, int blockSize)
const;
// converts single-site operators into the system block basis
};
#endif