Skip to content
Merged
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
6 changes: 3 additions & 3 deletions src/algorithms/changebonds/optimalexpand.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# Use the nullspaces and SVD decomposition to determine the optimal expansion space
VL = leftnull(ψ.AL[i])
VR = rightnull!(_transpose_tail(ψ.AR[i + 1]))
intermediate = adjoint(VL) * AC2 * adjoint(VR)
intermediate = normalize!(adjoint(VL) * AC2 * adjoint(VR))
U, _, V, = tsvd!(intermediate; trunc=alg.trscheme, alg=alg.alg_svd)

AL′[i] = VL * U
Expand All @@ -56,7 +56,7 @@
# Use the nullspaces and SVD decomposition to determine the optimal expansion space
VL = leftnull(ψ.AL[i, j])
VR = rightnull!(_transpose_tail(ψ.AR[i, j + 1]))
intermediate = adjoint(VL) * AC2 * adjoint(VR)
intermediate = normalize!(adjoint(VL) * AC2 * adjoint(VR))

Check warning on line 59 in src/algorithms/changebonds/optimalexpand.jl

View check run for this annotation

Codecov / codecov/patch

src/algorithms/changebonds/optimalexpand.jl#L59

Added line #L59 was not covered by tests
U, _, V, = tsvd!(intermediate; trunc=alg.trscheme, alg=alg.alg_svd)

AL′[i, j] = VL * U
Expand Down Expand Up @@ -87,7 +87,7 @@
NR = rightnull!(_transpose_tail(ψ.AR[i + 1]))

#Use this nullspaces and SVD decomposition to determine the optimal expansion space
intermediate = adjoint(NL) * AC2 * adjoint(NR)
intermediate = normalize!(adjoint(NL) * AC2 * adjoint(NR))

Check warning on line 90 in src/algorithms/changebonds/optimalexpand.jl

View check run for this annotation

Codecov / codecov/patch

src/algorithms/changebonds/optimalexpand.jl#L90

Added line #L90 was not covered by tests
_, _, V, = tsvd!(intermediate; trunc=alg.trscheme, alg=alg.alg_svd)

ar_re = V * NR
Expand Down
4 changes: 2 additions & 2 deletions src/algorithms/changebonds/randexpand.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
# Use the nullspaces and SVD decomposition to determine the optimal expansion space
VL = leftnull(ψ.AL[i])
VR = rightnull!(_transpose_tail(ψ.AR[i + 1]))
intermediate = adjoint(VL) * AC2 * adjoint(VR)
intermediate = normalize!(adjoint(VL) * AC2 * adjoint(VR))
U, _, V, = tsvd!(intermediate; trunc=alg.trscheme, alg=alg.alg_svd)

AL′[i] = VL * U
Expand All @@ -52,7 +52,7 @@
NR = rightnull!(_transpose_tail(ψ.AR[i + 1]))

#Use this nullspaces and SVD decomposition to determine the optimal expansion space
intermediate = adjoint(NL) * AC2 * adjoint(NR)
intermediate = normalize!(adjoint(NL) * AC2 * adjoint(NR))

Check warning on line 55 in src/algorithms/changebonds/randexpand.jl

View check run for this annotation

Codecov / codecov/patch

src/algorithms/changebonds/randexpand.jl#L55

Added line #L55 was not covered by tests
_, _, V, = tsvd!(intermediate; trunc=alg.trscheme, alg=alg.alg_svd)

ar_re = V * NR
Expand Down
Loading