Skip to content

Commit

Permalink
Certain kwargs -> Function signature in factorize_svd
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeyT1994 committed Oct 18, 2023
1 parent e8e3534 commit a4c6e74
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/tensor_operations/matrix_decomposition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -550,10 +550,15 @@ function sqrt_decomp(D::ITensor, u::Index, v::Index)
return sqrtDL, prime(δᵤᵥ), sqrtDR
end

function factorize_svd(A::ITensor, Linds...; (singular_values!)=nothing, kwargs...)
ortho::String = get(kwargs, :ortho, "left")
alg::String = get(kwargs, :svd_alg, "divide_and_conquer")
dir = get(kwargs, :dir, ITensors.In)
function factorize_svd(
A::ITensor,
Linds...;
(singular_values!)=nothing,
ortho="left",
alg="divide_and_conquer",
dir=ITensors.In,
kwargs...,
)
leftdir, rightdir = -dir, -dir

USV = svd(A, Linds...; leftdir, rightdir, kwargs..., alg=alg)
Expand Down

0 comments on commit a4c6e74

Please sign in to comment.