Skip to content

Commit

Permalink
Backup.
Browse files Browse the repository at this point in the history
  • Loading branch information
f-koehler committed Sep 15, 2023
1 parent 530af09 commit 8dc6b7f
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/Models/TransverseIsing2D.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
struct TransverseIsing2D <: SpinHalf
parameters::Dict{String,Any}
sites::vector{Index{Int64}}

TransverseIsing2D(Lx::Int64, Ly::Int64) = new(
Dict{String,Any}(
"Lx" => Lx,
"Ly" => Ly,
"J" => 1.0,
"hx" => 1.0,
"hz" => 0.5,
"pbc" => false,
),
siteinds("S=1/2", Lx * Ly)
)
end

function getHamiltonian(model::TransverseIsing2D)::MPO
ampo = OpSum()

Lx = model.parameters["Lx"]
Ly = model.parameters["Ly"]
J = model.parameters["J"]
hx = model.parameters["hx"]
hy = model.parameters["hy"]

lattice = square_lattice(Lx, Ly; yperiodic=false)
for b in lattice
ampo += -4.0 * J
end

end

0 comments on commit 8dc6b7f

Please sign in to comment.