@@ -10,23 +10,23 @@ using Printf: @printf
1010 psi = copy (state (prob))
1111
1212 prev_vertex_set = setdiff (pos (operator (prob)), region)
13- (length (prev_vertex_set) != 1 ) && return local_state
13+ (length (prev_vertex_set) != 1 ) && return region_iter, local_state
1414 prev_vertex = only (prev_vertex_set)
1515 A = psi[prev_vertex]
1616
1717 next_vertices = filter (v -> (hascommoninds (psi[v], A)), region)
18- isempty (next_vertices) && return local_state
18+ isempty (next_vertices) && return region_iter, local_state
1919 next_vertex = only (next_vertices)
2020 C = psi[next_vertex]
2121
2222 a = commonind (A, C)
23- isnothing (a) && return local_state
23+ isnothing (a) && return region_iter, local_state
2424 basis_size = prod (dim .(uniqueinds (A, C)))
2525
2626 expanded_maxdim = compute_expansion (
2727 dim (a), basis_size; region_kwargs (compute_expansion, region_iter)...
2828 )
29- expanded_maxdim <= 0 && return local_state
29+ expanded_maxdim <= 0 && return region_iter, local_state
3030
3131 envs = environments (operator (prob))
3232 H = operator (operator (prob))
@@ -50,7 +50,7 @@ using Printf: @printf
5050 end
5151 if norm (dag (U) * A) > 1E-10
5252 @printf (" Warning: |U*A| = %.3E in subspace expansion\n " , norm (dag (U) * A))
53- return local_state
53+ return region_iter, local_state
5454 end
5555
5656 Ax, ax = directsum (A => a, U => commonind (U, D))
@@ -61,5 +61,5 @@ using Printf: @printf
6161
6262 prob. state = psi
6363
64- return local_state
64+ return region_iter, local_state
6565end
0 commit comments