-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalboson1siteCreationCorrelator_SBM1.m
38 lines (32 loc) · 1.21 KB
/
calboson1siteCreationCorrelator_SBM1.m
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
function c=calboson1siteCreationCorrelator_SBM1(mps0,Vmat0,para)
% Calculate bosonic 1-site correlators: c_i = <a_i>
% The operator on the spin site is set to zero
% modify this to get left and right chain occupation! perhaps in calbosonocc_SBM2.m
% copied from calbosonocc_SBM1
% Modified:
% FS 16/03/2014: created
c_op = cell(1,para.L); % here: M = 1
for j=1:para.L
if j~=para.spinposition
if para.foldedChain == 0
[bp,~,~] = bosonop(para.dk(j),para.shift(j),para.parity);
c_op{1,j} = bp; % for c_j
%Modification for folded 2chain model!! Not perfect or right yet!
elseif para.foldedChain == 1
if para.parity == 'n'
[bp,~,n] = bosonop(sqrt(para.dk(j)),para.shift(j),para.parity); % gives [bp,bm,n]
idm = eye(size(n));
bpr = kron(bp,idm);
else
[bp,~,~] = bosonop(para.dk(j),para.shift(j),para.parity); % Why without sqrt??
[bpr,~,~,~,~,~]=paritykron(bp,para.bosonparity);
end
c_op{1,j} = bpr;
else
end
else
c_op{1,para.spinposition}=zeros(para.dk(j));
end
end
c = correlator_allsites(c_op,mps0,Vmat0);
end