Bland3

30 Reputation

5 Badges

6 years, 175 days

MaplePrimes Activity


These are replies submitted by Bland3

@ecterrab The worksheet is a little unorganized, but attached.
 

restart

with(Physics):

with(combinat):

with(LinearAlgebra):

with(ArrayTools):

with(ListTools):

 

Setup(mathematicalnotation=true):

Setup(quantumop={cre,ann}, algebrarules={%AntiCommutator(cre[j],ann[k])=I*KroneckerDelta[j,k],%AntiCommutator(cre[j],cre[k])=0, %AntiCommutator(ann[j],ann[k])=0})

`* Partial match of  'quantumop' against keyword 'quantumoperators'`

 

[algebrarules = {%AntiCommutator(ann[j], ann[k]) = 0, %AntiCommutator(cre[j], ann[k]) = I*Physics:-KroneckerDelta[j, k], %AntiCommutator(cre[j], cre[k]) = 0}, quantumoperators = {ann, cre}]

(1)

Lattice Computations for Kitaev Problems

%AntiCommutator(cre[1],ann[1])

%AntiCommutator(cre[1], ann[1])

(2)

value(%)

I

(3)

%AntiCommutator(cre[1],ann[2])

%AntiCommutator(cre[1], ann[2])

(4)

value(%)

0

(5)

ann[1]*ann[1]

Physics:-`^`(ann[1], 2)

(6)

AntiCommutator(ann[1],ann[1])

Physics:-AntiCommutator(ann[1], ann[1])

(7)

value(%)

Physics:-AntiCommutator(ann[1], ann[1])

(8)

%AntiCommutator(ann[1],ann[2])

%AntiCommutator(ann[1], ann[2])

(9)

value(%)

Physics:-AntiCommutator(ann[1], ann[2])

(10)

AntiCommutator(ann[2],cre[3])

0

(11)

 

Config_Gen := proc(Length)
global Configurations;
local fermionarray,n_n,V,Ln,i_i;
fermionarray:= Array(triangular[upper],1..Length+1,1..Length,fill=1);
for n_n from 1 to Length+1 do
V[n_n] := fermionarray(n_n,1..Length);
Ln[n_n] := permute(convert(V[n_n],list));
end do;
Configurations := Ln[1];
for i_i from 2 to Length+1 do
    Configurations := [op( Configurations), op(Ln[i_i] ) ];
#    Configurations := Reverse([op( Configurations), op(Ln[i_i] ) ]);
end do;
 print("Table of configuratons is", fermionarray);
 print("The table written as a set of vectors is", V);
 print("Permutations of generators is", Ln);
 print("Full list of Configurations is", Configurations);
end proc;

proc (Length) local fermionarray, n_n, V, Ln, i_i; global Configurations; fermionarray := Array(triangular[upper], 1 .. Length+1, 1 .. Length, fill = 1); for n_n to Length+1 do V[n_n] := fermionarray(n_n, 1 .. Length); Ln[n_n] := combinat:-permute(convert(V[n_n], list)) end do; Configurations := Ln[1]; for i_i from 2 to Length+1 do Configurations := [op(Configurations), op(Ln[i_i])] end do; print("Table of configuratons is", fermionarray); print("The table written as a set of vectors is", V); print("Permutations of generators is", Ln); print("Full list of Configurations is", Configurations) end proc

(12)

Config_Gen(4)

"Table of configuratons is", Array(triangular[upper],1..5, 1..4, {(1, 1) = 1, (1, 2) = 1, (1, 3) = 1, (1, 4) = 1, (2, 2) = 1, (2, 3) = 1, (2, 4) = 1, (3, 3) = 1, (3, 4) = 1, (4, 4) = 1, }, storage = triangular[upper])

 

"The table written as a set of vectors is", table(%id = 18446745911705342014)

 

"Permutations of generators is", Ln

 

"Full list of Configurations is", [[1, 1, 1, 1], [0, 1, 1, 1], [1, 0, 1, 1], [1, 1, 0, 1], [1, 1, 1, 0], [0, 0, 1, 1], [0, 1, 0, 1], [0, 1, 1, 0], [1, 0, 0, 1], [1, 0, 1, 0], [1, 1, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0], [0, 1, 0, 0], [1, 0, 0, 0], [0, 0, 0, 0]]

(13)

Need to go from this list to the actual states.

Error, reserved word `to` unexpected

 

for i_i from 1 to 2^4 do
Ket(psi,Configurations[i_i]):= product(cre[j_j]^Configurations[i_i][j_j],j_j = 1 .. 4)* Ket(psi,Vacuum);
nnn:= sum(Configurations[i_i][j_j],j_j=1..4) :
fff:=(-1)^(nnn*(nnn-1)/2):
Bra(psi,Configurations[i_i]):= fff* Bra(psi,Vacuum) * product(( ann[j_j] )^Configurations[i_i][j_j],j_j = 1 .. 4);
end do;
Bracket( Bra(psi,Vacuum),Ket(psi,Vacuum) );
Bracket( Bra(psi,[1,1,1,1]),Ket(psi,[1,1,1,1]) );

Physics:-`*`(cre[1], cre[2], cre[3], cre[4], Physics:-Ket(psi, Vacuum))

 

4

 

1

 

Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[1], ann[2], ann[3], ann[4])

 

Physics:-`*`(cre[2], cre[3], cre[4], Physics:-Ket(psi, Vacuum))

 

3

 

-1

 

-Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[2], ann[3], ann[4])

 

Physics:-`*`(cre[1], cre[3], cre[4], Physics:-Ket(psi, Vacuum))

 

3

 

-1

 

-Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[1], ann[3], ann[4])

 

Physics:-`*`(cre[1], cre[2], cre[4], Physics:-Ket(psi, Vacuum))

 

3

 

-1

 

-Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[1], ann[2], ann[4])

 

Physics:-`*`(cre[1], cre[2], cre[3], Physics:-Ket(psi, Vacuum))

 

3

 

-1

 

-Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[1], ann[2], ann[3])

 

Physics:-`*`(cre[3], cre[4], Physics:-Ket(psi, Vacuum))

 

2

 

-1

 

-Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[3], ann[4])

 

Physics:-`*`(cre[2], cre[4], Physics:-Ket(psi, Vacuum))

 

2

 

-1

 

-Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[2], ann[4])

 

Physics:-`*`(cre[2], cre[3], Physics:-Ket(psi, Vacuum))

 

2

 

-1

 

-Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[2], ann[3])

 

Physics:-`*`(cre[1], cre[4], Physics:-Ket(psi, Vacuum))

 

2

 

-1

 

-Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[1], ann[4])

 

Physics:-`*`(cre[1], cre[3], Physics:-Ket(psi, Vacuum))

 

2

 

-1

 

-Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[1], ann[3])

 

Physics:-`*`(cre[1], cre[2], Physics:-Ket(psi, Vacuum))

 

2

 

-1

 

-Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[1], ann[2])

 

Physics:-`*`(cre[4], Physics:-Ket(psi, Vacuum))

 

1

 

1

 

Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[4])

 

Physics:-`*`(cre[3], Physics:-Ket(psi, Vacuum))

 

1

 

1

 

Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[3])

 

Physics:-`*`(cre[2], Physics:-Ket(psi, Vacuum))

 

1

 

1

 

Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[2])

 

Physics:-`*`(cre[1], Physics:-Ket(psi, Vacuum))

 

1

 

1

 

Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[1])

 

Physics:-Ket(psi, Vacuum)

 

0

 

1

 

Physics:-Bra(psi, Vacuum)

 

1

 

Physics:-`.`(Physics:-`*`(Physics:-Bra(psi, Vacuum), ann[1], ann[2], ann[3], ann[4]), Physics:-`*`(cre[1], cre[2], cre[3], cre[4], Physics:-Ket(psi, Vacuum)))

(14)

AntiCommutator(ann[1],ann[2])

Physics:-AntiCommutator(ann[1], ann[2])

(15)

value(ann[1]*ann[2] + ann[2]*ann[1])

Physics:-`*`(ann[1], ann[2])+Physics:-`*`(ann[2], ann[1])

(16)

 

 

Setup(anticommutativeprefix=psi);
type(psi,anticommutative);

[anticommutativeprefix = {_lambda, psi}]

 

true

(17)

# Define Annihilation ops dep on site j
am:=j -> Annihilation(psi,j,notation=explicit);

proc (j) options operator, arrow; Physics:-Annihilation(psi, j, notation = explicit) end proc

(18)

# Define Creation ops dep on site j
ap:=j -> Creation(psi,j,notation=explicit);

proc (j) options operator, arrow; Physics:-Creation(psi, j, notation = explicit) end proc

(19)

# Define Number operator
nn:= ap.am;

ap*am

(20)

# Total Number Operator
N:=L -> sum(nn(j),j-1..L);

proc (L) options operator, arrow; sum(nn(j), j-1 .. L) end proc

(21)

 

 

 

 

 

 

 

 

 

 

 

 

 

Download LatticeCalculationsMaple.mw

1 2 Page 2 of 2