Advanced Computing Platform for Theoretical Physics

Commit a163cfaa authored by Lei Wang's avatar Lei Wang
Browse files

logtrace

parent b70a66d1
Pipeline #820 failed with stages
...@@ -18,7 +18,7 @@ for i in range(Niter): ...@@ -18,7 +18,7 @@ for i in range(Niter):
lnZ = lnZ + torch.log(s)/2**i lnZ = lnZ + torch.log(s)/2**i
M = M/s M = M/s
M = M@M M = M@M
lnZ = lnZ + torch.trace(M)/(2**Niter) lnZ = lnZ + torch.log(torch.trace(M))/(2**Niter)
#(1) impurity grad #(1) impurity grad
impurity_grad = (M@M).t()/torch.trace(M@T@M) impurity_grad = (M@M).t()/torch.trace(M@T@M)
......
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