Skip to content

Commit f750ac1

Browse files
committed
Allow subspace parameters to be arrays
1 parent f75d122 commit f750ac1

File tree

2 files changed

+21
-4
lines changed

2 files changed

+21
-4
lines changed

src/solvers/subspace/densitymatrix.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ function subspace_expand(
66
problem,
77
local_state::ITensor,
88
region_iterator;
9+
expansion_factor,
10+
max_expand,
911
north_pass=1,
10-
expansion_factor=default_expansion_factor(),
11-
max_expand=default_max_expand(),
1212
trunc,
1313
kws...,
1414
)

src/solvers/subspace/subspace.jl

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,27 @@ default_expansion_factor() = 1.5
55
default_max_expand() = typemax(Int)
66

77
function subspace_expand(
8-
problem, local_state, region_iterator; subspace_algorithm=nothing, sweep, trunc, kws...
8+
problem,
9+
local_state,
10+
region_iterator;
11+
expansion_factor=default_expansion_factor(),
12+
max_expand=default_max_expand(),
13+
subspace_algorithm=nothing,
14+
sweep,
15+
trunc,
16+
kws...,
917
)
18+
expansion_factor = get_or_last(expansion_factor, sweep)
19+
max_expand = get_or_last(max_expand, sweep)
1020
return subspace_expand(
11-
Backend(subspace_algorithm), problem, local_state, region_iterator; trunc, kws...
21+
Backend(subspace_algorithm),
22+
problem,
23+
local_state,
24+
region_iterator;
25+
expansion_factor,
26+
max_expand,
27+
trunc,
28+
kws...,
1229
)
1330
end
1431

0 commit comments

Comments
 (0)