Skip to content

Commit

Permalink
allow passing kwargs to dmrg
Browse files Browse the repository at this point in the history
  • Loading branch information
iagoleal committed Sep 18, 2024
1 parent f1e3cc0 commit 8cef7a7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function solve_qubo( Q :: AbstractMatrix{T}
, nsweeps :: Int = 10
, maxdim = [10, 20, 100, 100, 200]
, accelerator :: Function = identity
, kwargs...
) where {T}
dim = size(Q)[1]
sites = ITensors.siteinds("Qubit", dim)
Expand All @@ -78,7 +79,8 @@ function solve_qubo( Q :: AbstractMatrix{T}
psi0 = ITensors.MPS(T, sites, "+") # ⨂ (|0> + |1>) / √2

energy, psi = ITensors.dmrg(accelerator(H), accelerator(psi0)
; nsweeps, maxdim, cutoff)
; nsweeps, maxdim, cutoff
, kwargs...)

return energy, psi
end
Expand Down

0 comments on commit 8cef7a7

Please sign in to comment.