Advanced Computing Platform for Theoretical Physics

Commit 7ab0db6d authored by Lei Wang's avatar Lei Wang
Browse files

still not right, show we make Ux and Uy?

parent 60be88db
......@@ -38,6 +38,7 @@ def ctmrg(T, chi, nctmrg):
def renormalize(T, U):
UTU = torch.einsum('blu,xabcdy,dmv->uxacyv', (U, T, U)).contiguous()
#UTU2 = torch.einsum('cdp,ybldmz,abq->pylmzq', (U, T, U)).contiguous()
T = torch.einsum('uxacyv,pylmzq->xqupvz', (UTU, UTU)).contiguous()
return T
......@@ -99,20 +100,21 @@ if __name__=='__main__':
print ('use', dtype)
#dimer covering
#T = torch.zeros(2, 2, 2, 2, 2, 2, dtype=dtype, device=device)
#T[0, 0, 0, 0, 0, 1] = 1.0
#T[0, 0, 0, 0, 1, 0] = 1.0
#T[0, 0, 0, 1, 0, 0] = 1.0
#T[0, 0, 1, 0, 0, 0] = 1.0
#T[0, 1, 0, 0, 0, 0] = 1.0
#T[1, 0, 0, 0, 0, 0] = 1.0
K = torch.tensor([args.beta], dtype=dtype, device=device)
c = torch.sqrt(torch.cosh(K))
s = torch.sqrt(torch.sinh(K))
Q = [c, s, c, -s]
Q = torch.stack(Q).view(2, 2)
T = torch.einsum('ai,aj,ak,al,am,an->ijklmn', [Q, Q, Q, Q, Q, Q])
T = torch.zeros(2, 2, 2, 2, 2, 2, dtype=dtype, device=device)
T[0, 0, 0, 0, 0, 1] = 1.0
T[0, 0, 0, 0, 1, 0] = 1.0
T[0, 0, 0, 1, 0, 0] = 1.0
T[0, 0, 1, 0, 0, 0] = 1.0
T[0, 1, 0, 0, 0, 0] = 1.0
T[1, 0, 0, 0, 0, 0] = 1.0
#3d Ising
#K = torch.tensor([args.beta], dtype=dtype, device=device)
#c = torch.sqrt(torch.cosh(K))
#s = torch.sqrt(torch.sinh(K))
#Q = [c, s, c, -s]
#Q = torch.stack(Q).view(2, 2)
#T = torch.einsum('ai,aj,ak,al,am,an->ijklmn', [Q, Q, Q, Q, Q, Q])
model = Ising(args.D, args.chi, args.nxtrg, args.nctmrg, dtype=dtype, device=device)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment