Skip to content

Commit

Permalink
fix the bug in RMF clustered hamiltonian
Browse files Browse the repository at this point in the history
  • Loading branch information
annamariadziubyna committed Nov 21, 2023
1 parent 7290d96 commit f54b926
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/clustered_hamiltonian.jl
Original file line number Diff line number Diff line change
Expand Up @@ -479,13 +479,13 @@ function clustered_hamiltonian(fname::String, Nx::Integer = 240, Ny::Integer = 3
for (index, value) in factors
if length(index) == 2
y, x = index
Eng = sum(functions[value])
sp = Spectrum([Eng], [collect(1:8), collect(1:8)], zeros(1))
Eng = functions[value]'
sp = Spectrum(collect(Eng), [collect(1:8), collect(1:8)], zeros(1))
set_props!(cl_h, (x+1, y+1), Dict(:spectrum => sp))
elseif length(index) == 4
y1, x1, y2, x2 = index
add_edge!(cl_h, (x1 + 1, y1 + 1), (x2 + 1, y2 + 1))
Eng = sum(functions[value], dims=1)
Eng = functions[value]
ipl = add_projector!(lp, collect(1:N[y1+1, x1+1]))
ipr = add_projector!(lp, collect(1:N[y2+1, x2+1]))
set_props!(cl_h, (x1 + 1, y1 + 1), (x2 + 1, y2 + 1), Dict(:outer_edges=> ((x1 + 1, y1 + 1), (x2 + 1, y2 + 1)),
Expand All @@ -496,6 +496,5 @@ function clustered_hamiltonian(fname::String, Nx::Integer = 240, Ny::Integer = 3
end

set_props!(cl_h, Dict(:pool_of_projectors => lp))
println(lp)
cl_h
end

0 comments on commit f54b926

Please sign in to comment.