From 8cef7a70a9839e2f31b865ca696abbf862e04c44 Mon Sep 17 00:00:00 2001 From: Iago Leal de Freitas Date: Wed, 18 Sep 2024 16:03:24 -0400 Subject: [PATCH] allow passing kwargs to dmrg --- src/solver.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/solver.jl b/src/solver.jl index 351b982..420ccf8 100644 --- a/src/solver.jl +++ b/src/solver.jl @@ -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) @@ -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