Skip to content

Commit 4376ebe

Browse files
committed
add LinearAlgebra.svd overload
1 parent b593974 commit 4376ebe

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

docs/src/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ When releasing a new version, move the "Unreleased" changes to a new version sec
2424

2525
- Extended support for selecting storage types in the `TensorMap` constructors ([#327](https://github.com/QuantumKitHub/TensorKit.jl/pull/327))
2626
- `similar_diagonal` to handle storage types when constructing diagonals ([#330](https://github.com/QuantumKitHub/TensorKit.jl/pull/330))
27+
- `LinearAlgebra.svd` overloads
2728

2829
### Fixed
2930

src/factorizations/factorizations.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ function LinearAlgebra.eigvals(t::AbstractTensorMap; kwargs...)
4949
end
5050
LinearAlgebra.eigvals!(t::AbstractTensorMap; kwargs...) = eig_vals!(t)
5151

52+
LinearAlgebra.svd(t::AbstractTensorMap; full::Bool = false) =
53+
full ? svd_full(t) : svd_compact(t)
54+
LinearAlgebra.svd!(t::AbstractTensorMap; full::Bool = false) =
55+
full ? svd_full!(t) : svd_compact!(t)
56+
5257
function LinearAlgebra.svdvals(t::AbstractTensorMap)
5358
tcopy = copy_oftype(t, factorisation_scalartype(svd_vals!, t))
5459
return LinearAlgebra.svdvals!(tcopy)

0 commit comments

Comments
 (0)