Skip to content

Commit

Permalink
added spin projection in Kondo Hamiltonian
Browse files Browse the repository at this point in the history
  • Loading branch information
abhirup-m committed Nov 8, 2024
1 parent 21313d8 commit 1185f24
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/modelHamiltonians.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ function KondoModel(
)
hamiltonian = Tuple{String, Vector{Int64}, Float64}[]

# project onto spin sector of impurity
largestScale = maximum(abs.[kondoJ, hop_t, globalField])
append!(hamiltonian, [("n", [1], -1e2 * largestScale), ("n", [2], -1e2 * largestScale), ("nn", [1, 2], 2e2 * largestScale)])

# intra-bath hopping
for site in 1:(numBathSites-1)
push!(hamiltonian, ("+-", [1 + 2 * site, 3 + 2 * site], -hop_t)) # c^†_{j,up} c_{j+1,up}
Expand Down Expand Up @@ -44,6 +48,10 @@ function KondoModel(
numBathSites = length(dispersion)
hamiltonian = Tuple{String, Vector{Int64}, Float64}[]

# project onto spin sector of impurity
largestScale = maximum(abs.[kondoJ, dispersion..., globalField])
append!(hamiltonian, [("n", [1], -1e2 * largestScale), ("n", [2], -1e2 * largestScale), ("nn", [1, 2], 2e2 * largestScale)])

# kinetic energy
for site in 1:numBathSites
push!(hamiltonian, ("n", [1 + 2 * site], dispersion[site])) # up spin
Expand Down

0 comments on commit 1185f24

Please sign in to comment.