-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinitialization.jl
29 lines (28 loc) · 950 Bytes
/
initialization.jl
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
function ising(beta::Float64)
Z2 = CyclicGroup(2)
e = GroupElement(0,Z2)
a = GroupElement(1,Z2)
A = Obj(e=>1,a=>1)
B = Obj(e=>1,a=>1)
C = Obj(e=>1,a=>1)
D = Obj(e=>1,a=>1)
T = Mor(Float64, (A, B, C, D))
T[e,e,e,e] = reshape([3 + cosh(4*beta)],1,1,1,1)
T[e,a,e,a] = reshape([cosh(4*beta)-1],1,1,1,1)
T[a,e,a,e] = reshape([cosh(4*beta)-1],1,1,1,1)
T[e,e,a,a] = reshape([sinh(4*beta)],1,1,1,1)
T[a,e,e,a] = reshape([sinh(4*beta)],1,1,1,1)
T[a,a,e,e] = reshape([sinh(4*beta)],1,1,1,1)
T[e,a,a,e] = reshape([sinh(4*beta)],1,1,1,1)
T[a,a,a,a] = reshape([cosh(4*beta)-1],1,1,1,1)
return T
end
# Z2 = CyclicGroup(2)
# e = GroupElement(0,Z2)
# a = GroupElement(1,Z2)
# beta = log(sqrt(2)+1)/2
# T = ising(beta)
# # Q, R = VecG_qr(T, (4,1,2))
# F, K = VecG_factorize(T, (1,2), 5)
# Tp = VecG_tensordot(F, K, (3,), (3,))
# # T = VecG_tensordot(VecG_tensordot(U, S, (3,), (1,)), V, (3,), (3,))