Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ITensorNetworks"
uuid = "2919e153-833c-4bdc-8836-1ea460a35fc7"
authors = ["Matthew Fishman <mfishman@flatironinstitute.org>, Joseph Tindall <jtindall@flatironinstitute.org> and contributors"]
version = "0.15.5"
version = "0.15.6"

[deps]
AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c"
Expand Down
1 change: 0 additions & 1 deletion src/solvers/eigsolve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ function eigsolve(
nsweeps;
nsites,
factorize_kwargs,
subspace_expand!_kwargs = (; eigen_kwargs = factorize_kwargs),
sweep_kwargs...,
)
prob = problem(sweep_solve!(sweep_iter))
Expand Down
3 changes: 1 addition & 2 deletions src/solvers/subspace/densitymatrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ function subspace_expand!(
expansion_factor = 1.5,
maxexpand = typemax(Int),
north_pass = 1,
eigen_kwargs = (;),
)
prob = problem(region_iter)

Expand All @@ -29,7 +28,7 @@ function subspace_expand!(
isnothing(a) && return region_iter, local_state
basis_size = prod(dim.(uniqueinds(A, C)))

trunc_kwargs = truncation_parameters(region_iter.which_sweep; eigen_kwargs...)
trunc_kwargs = truncation_parameters(region_iter.which_sweep; region_kwargs(factorize, region_iter)...)
expanded_maxdim = compute_expansion(
dim(a), basis_size; expansion_factor, maxexpand, trunc_kwargs.maxdim
)
Expand Down
8 changes: 6 additions & 2 deletions test/solvers/test_eigsolve.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Test: @test, @testset
using ITensors
using ITensorNetworks: siteinds, ttn, dmrg
using ITensorNetworks: dmrg, maxlinkdim, siteinds, ttn
using Graphs: dst, edges, src, vertices
using ITensorMPS: OpSum
using TensorOperations: TensorOperations #For contraction order finding
Expand Down Expand Up @@ -58,12 +58,16 @@ include("utilities/tree_graphs.jl")
#
nsites = 1
nsweeps = 5
factorize_kwargs = (; cutoff = [1.0e-5, 1.0e-6], maxdim = [8, 16, 32])
maxdim = [8, 16, 32]
factorize_kwargs = (; cutoff = [1.0e-5, 1.0e-6], maxdim)
extract!_kwargs = (; subspace_algorithm = "densitymatrix")
E, psi = dmrg(H, psi0; extract!_kwargs, factorize_kwargs, nsites, nsweeps, outputlevel)
(outputlevel >= 1) && println("1-site+subspace DMRG energy = ", E)
@test E ≈ Ex atol = 1.0e-5

# Regression test that subspace expansion feature obeys maxdim limit
@test maxlinkdim(psi) <= last(maxdim)

#
# Test passing cutoff and maxdim as a vector of values
#
Expand Down
Loading