Advanced Computing Platform for Theoretical Physics

commit大文件会使得服务器变得不稳定,请大家尽量只commit代码,不要commit大的文件。

Commit 21d08b21 authored by Lei Wang's avatar Lei Wang
Browse files

added info

parent ca716f2a
......@@ -35,6 +35,8 @@ loss.backward()
exact_grad = ((T.grad + T.grad.t())/2) # need to symmetrize since it is an upper triangular matrix
# (4) use leading eigenvector of the transfer matrix $T$
#c.f. sec.3.1 https://people.maths.ox.ac.uk/gilesm/files/NA-08-01.pdf
#or, HF theorem
eigenvector_grad= torch.ger(v[:,-1], v[:, -1])/w[-1] # outer product of the leading eigenvector and its transpose
print ((impurity_grad-exact_grad).abs().max().item())
......
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