Skip to content

Commit

Permalink
commit
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandro-santini committed May 27, 2022
1 parent cfd360b commit 1574355
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Binary file not shown.
Binary file modified spin_systems/__pycache__/states.cpython-38.pyc
Binary file not shown.
13 changes: 13 additions & 0 deletions spin_systems/states.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ def all_down(L):
psi.center = 0
return psi

def all_up_along_x(L):
tensors = [1/np.sqrt(2)*np.array([1.,1.]).reshape(1,2,1)]*L
psi = MPS(L,tensors = tensors)
psi.center = 0
return psi

def all_down_along_x(L):
tensors = [1/np.sqrt(2)*np.array([1.,-1.]).reshape(1,2,1)]*L
psi = MPS(L,tensors = tensors)
psi.center = 0
return psi


def Neel(L):
tensors = [np.array([1.,0.]).reshape(1,2,1),np.array([0.,1.]).reshape(1,2,1)]*(L//2)
psi = MPS(L,tensors = tensors)
Expand Down

0 comments on commit 1574355

Please sign in to comment.