[KeldyshGF-svncheckins] [svn commit /var/www/svn/KeldyshGF] r269 - trunk/kgf/exact_diagonalization

svn at fysik.dtu.dk svn at fysik.dtu.dk
Fri Nov 16 15:13:06 CET 2012


Author: strange
Date: 2012-11-16 15:13:06 +0100 (Fri, 16 Nov 2012)
New Revision: 269

Removed:
   trunk/kgf/exact_diagonalization/exactd.py
Log:
arghh..

Deleted: trunk/kgf/exact_diagonalization/exactd.py
===================================================================
--- trunk/kgf/exact_diagonalization/exactd.py	2012-11-16 14:10:50 UTC (rev 268)
+++ trunk/kgf/exact_diagonalization/exactd.py	2012-11-16 14:13:06 UTC (rev 269)
@@ -1,63 +0,0 @@
-import numpy as np
-from numpy import ascontiguousarray as asc
-from numpy import linalg as la
-import pylab as pl
-
-def anticom(x,y):
-    return np.dot(x,y) + np.dot(y,x)
-
-# one single particle state
-P1 = np.identity(4,int)
-S1z = np.zeros((4,4),int)
-c1da = np.zeros((4,4),int)
-c1db = np.zeros((4,4),int)
-c1da[1,0] = 1
-c1da[3,2] = 1
-c1db[2,0] = 1
-c1db[3,1] = -1
-c1a = asc(c1da.T)
-c1b = asc(c1db.T)
-P1[1,1] = -1
-P1[2,2] = -1
-S1z[1,1] = 1
-S1z[2,2] = -1
-s1z = 0.5
-N1 = np.dot(c1da,c1a) + np.dot(c1db,c1b)
-
-# two single particle states
-c2da = np.kron(P1, c1da) # c_{2\uparrow}^\dagger
-c2db = np.kron(P1, c1db) # c_{2\downarrow}^\dagger
-
-c2a = asc(c2da.T)
-c2b = asc(c2db.T)
-
-c1da = np.kron(c1da, np.identity(4, int))
-c1db = np.kron(c1db, np.identity(4, int))
-c1a = asc(c1da.T)
-c1b = asc(c1db.T)
-
-N2 = np.kron(N1, np.identity(4,int)) + np.kron(np.identity(4,int), N1)
-P2 = np.kron(P1, P1) 
-S2z = np.kron(S1z, np.identity(4,int)) + np.kron(np.identity(4,int), S1z)
-
-print c1da
-print c1db
-print c2da
-print c2db
-# hamiltonian
-t = -2.0
-h = (np.dot(c1da, c2a) + np.dot(c1db, c2b) + np.dot(c2da, c1a) + 
-     np.dot(c2db, c1b)) * t
-
-def find_nparticle_subspace(npart, N):
-    return [i for i, n in enumerate(N.diagonal()) if n==npart]
-
-indices = find_nparticle_subspace(2, N2)
-ht = asc(h.take(indices,axis=0).take(indices,axis=1))
-#print np.around(ht,1)
-S2zt = asc(S2z.take(indices, axis=0).take(indices,axis=1))
-eigs, vecs = la.eig(ht)
-Sz_evaluated = np.around(np.dot(np.dot(vecs.T, S2zt*0.5), vecs),1).diagonal()
-#print N2.diagonal()
-#print Sz_evaluated
-#print np.around(eigs,1)



More information about the KeldyshGF-svncheckins mailing list