Fermionic Creation-Annihilation Operators in SNEG.

-Utkarsh Bajpai (PHYS814 : October 3, 2019)

<<sneg`sneg`; (* Call SNEG Mathematica Package *)

snegfermionoperators[c,b] ;(* Define fermionic operators in SNEG with symbol "c"*)

ops = {c[]};
makebasis[ops] (* Construct your basis,to display spin up and spin down creation operators*)

(* How to get the individual fermionic creation and annhilation operators ?*)

CupCR = c[CR,UP]

CdnCR = c[CR,DO]

CupAN = c[AN,UP]

conj[c[CR, UP]]

CdnAN = c[AN, DO]

(* Checking commutation relation of fermionic operators using "nc" introduced in the last class *)

nc[CupAN,CupCR] (* NOTE: How the result is normal ordered *)

nc[CupAN,CupCR] + nc[CupCR,CupAN]

nc[CupAN,CdnCR] + nc[CdnCR,CupAN]

nc[CupAN,CdnAN] + nc[CdnAN,CupAN]

nc[CupCR,CdnCR] + nc[CdnCR,CupCR]

(*Longer String of operators *)
nc[CupAN,CdnCR,CupCR,CdnAN]

(* HOW DO WE DEFINE SAME FERMIONIC OPERATORS ON MANY SITES *)

ops2 = {b[1],b[2]};
makebasis[ops2]

(* How to get individual fermionic operators *)
b1upCR = b[CR,1,UP]

b1upAN = b[AN,1,UP]

b1dnCR = b[CR,1,DO]

b1dnAN = b[AN,1,DO]

b2upCR = b[CR,2,UP]
b2upAN = b[AN,2,UP]
b2dnCR = b[CR,2,DO]
b2dnAN = b[AN,2,DO]

(* Checking commutation relations of these operators *)
nc[b1upCR,b2upCR] + nc[b2upCR,b1upCR]

nc[b1dnAN,b2dnAN] + nc[b2dnAN,b1dnAN]

nc[b1dnAN,b2dnCR] + nc[b2dnCR,b1dnAN]

(*Defining the Vaccum and creating one particle or many particle states *)

v= vacuum[] (*Note it defines vacuum based on THE BASIS WHICH WAS DEFINED LATEST *)

(* Creating single particle states by acting creation operators on vacuum*)

s1up = nc[b1upCR,v] (*Site 1 up spin state*)

s1dn = nc[b1dnCR,v] (*Site 1 down spin state*)

s2up = nc[b2upCR,v](* Site 2 up spin state *)

(* Constructing two particle states: Pauli principle allows only one electron per state*)

nc[b1dnCR,s1up](* NOTE the correct sign is automatically introduced LETS CHECK THIS ON BLACKBOARD*)

nc[b1upCR,s1up] (* Trying to put two fermions in same state *)

nc[b2dnCR,s2up]

nc[b1upCR,s2up]

(* Constructing three particle states *)
nc[b1upCR,b1dnCR,b2upCR,v]

nc[b1upCR,b1dnCR,b2dnCR,v]

nc[b1upCR,b2upCR,b2dnCR,v]

nc[b1dnCR,b2upCR,b2dnCR,v]

(* Constructing three particle states *)

fourP = nc[b1upCR,b1dnCR,b2upCR,b2dnCR,v]

(* Annhilating particles from 4 particle states *)

nc[b1upAN,fourP]
nc[b1dnAN,fourP] (* Notice the sign *)
nc[b2upAN,fourP]
nc[b2dnAN,fourP](* Notice the sign *)

(* Constructing the number operator*)
numop = nc[b1upCR,b1upAN] + nc[b1dnCR,b1dnAN ]+  nc[b2upCR,b2upAN] + nc[b2dnCR,b2dnAN]

nc[numop,fourP]

nc[numop,s1up]