Skip to content

Commit

Permalink
Revert some files
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Jun 16, 2024
1 parent af68e63 commit 0704609
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ NamedGraphs = "678767b0-92e7-4007-89e4-4527a8725b19"
PackageExtensionCompat = "65ce6f38-6b18-4e1d-a461-8949797d7930"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
SerializedElementArrays = "d3ce8812-9567-47e9-a7b5-65a6d70a3065"
SimpleTraits = "699a6c99-e7fa-54fc-8d76-47d257e15c1d"
SparseArrayKit = "a9a3c162-d163-4c15-8926-b8794fbefed2"
Expand Down
5 changes: 2 additions & 3 deletions src/lib/ModelHamiltonians/src/ModelHamiltonians.jl
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ heisenberg(N::Integer; kwargs...) = heisenberg(path_graph(N); kwargs...)
"""
Next-to-nearest-neighbor Ising model (ZZX) on a general graph
"""
function ising(g::AbstractGraph; J1=-1, J2=0, h=0, hl=0)
(; J1, J2, h, hl) = map(to_callable, (; J1, J2, h, hl))
function ising(g::AbstractGraph; J1=-1, J2=0, h=0)
(; J1, J2, h) = map(to_callable, (; J1, J2, h))
= OpSum()
for e in edges(g)
+= J1(e), "Sz", src(e), "Sz", dst(e)
Expand All @@ -129,7 +129,6 @@ function ising(g::AbstractGraph; J1=-1, J2=0, h=0, hl=0)
end
for v in vertices(g)
+= h(v), "Sx", v
+= hl(v), "Sz", v
end
return
end
Expand Down
2 changes: 1 addition & 1 deletion src/solvers/dmrg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function ITensorMPS.dmrg(
state = alternating_update(
operator, init_state; nsweeps, nsites, updater, region_observer!, kwargs...
)
eigval = first(eigvals_ref[])
eigval = only(eigvals_ref[])
return eigval, state
end

Expand Down
2 changes: 1 addition & 1 deletion src/solvers/insert/insert.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function default_inserter(
indsTe = inds(state[ortho_vert])
L, phi, spec = factorize(phi, indsTe; tags=tags(state, e), maxdim, mindim, cutoff)
state[ortho_vert] = L

else
v = ortho_vert
end
Expand Down

0 comments on commit 0704609

Please sign in to comment.