File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -29,6 +29,9 @@ function MatrixAlgebraKit.left_polar!(A::AbstractBlockSparseMatrix, alg::PolarVi
2929 # TODO : Use more in-place operations here, avoid `copy`.
3030 U, S, Vᴴ = svd_compact! (A, alg. svdalg)
3131 W = U * Vᴴ
32+ # TODO : `copy` is required for now because of:
33+ # https://github.com/ITensor/BlockSparseArrays.jl/issues/24
34+ # Remove when that is fixed.
3235 P = copy (Vᴴ' ) * S * Vᴴ
3336 return (W, P)
3437end
@@ -37,6 +40,9 @@ function MatrixAlgebraKit.right_polar!(A::AbstractBlockSparseMatrix, alg::PolarV
3740 # TODO : Use more in-place operations here, avoid `copy`.
3841 U, S, Vᴴ = svd_compact! (A, alg. svdalg)
3942 Wᴴ = U * Vᴴ
43+ # TODO : `copy` is required for now because of:
44+ # https://github.com/ITensor/BlockSparseArrays.jl/issues/24
45+ # Remove when that is fixed.
4046 P = U * S * copy (U' )
4147 return (P, Wᴴ)
4248end
You can’t perform that action at this time.
0 commit comments