Skip to content

Commit 6929d88

Browse files
committed
Add back support for vector-valued cutoff and maxdim
1 parent d9aa070 commit 6929d88

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

src/solvers/insert.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ function insert!(region_iter, local_tensor; normalize = false, set_orthogonal_re
1212
indsTe = inds(psi[first(region)])
1313
tags = ITensors.tags(psi, e)
1414

15+
trunc_kwargs = truncation_parameters(region_iter.which_sweep; region_kwargs(factorize, region_iter)...)
1516
U, C, spectrum = factorize(
16-
local_tensor, indsTe; tags, region_kwargs(factorize, region_iter)...
17+
local_tensor, indsTe; tags, trunc_kwargs...
1718
)
1819

1920
@preserve_graph psi[first(region)] = U

src/solvers/subspace/densitymatrix.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ function subspace_expand!(
2929
isnothing(a) && return region_iter, local_state
3030
basis_size = prod(dim.(uniqueinds(A, C)))
3131

32+
trunc_kwargs = truncation_parameters(region_iter.which_sweep; eigen_kwargs...)
3233
expanded_maxdim = compute_expansion(
33-
dim(a), basis_size; expansion_factor, maxexpand, eigen_kwargs.maxdim
34+
dim(a), basis_size; expansion_factor, maxexpand, trunc_kwargs.maxdim
3435
)
3536
expanded_maxdim <= 0 && return region_iter, local_state
3637

@@ -48,7 +49,7 @@ function subspace_expand!(
4849
sqrt_rho = conj_proj_A(sqrt_rho)
4950
end
5051
rho = sqrt_rho * dag(noprime(sqrt_rho))
51-
D, U = eigen(rho; eigen_kwargs..., ishermitian = true)
52+
D, U = eigen(rho; trunc_kwargs..., ishermitian = true)
5253

5354
Uproj(T) = (T - prime(A, a) * (dag(prime(A, a)) * T))
5455
for _ in 1:north_pass

0 commit comments

Comments
 (0)