11using MatrixAlgebraKit: MatrixAlgebraKit, default_svd_algorithm, svd_compact!, svd_full!
22
3- # TODO : Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
4- using MatrixAlgebraKit: TruncatedAlgorithm, select_truncation, svd_trunc!
5- function MatrixAlgebraKit. select_algorithm (
6- :: typeof (svd_trunc!), A:: Type{<:AbstractBlockSparseMatrix} , alg; trunc= nothing , kwargs...
7- )
8- alg_svd = select_algorithm (svd_compact!, A, alg; kwargs... )
9- return TruncatedAlgorithm (alg_svd, select_truncation (trunc))
10- end
11-
123"""
134 BlockPermutedDiagonalAlgorithm(A::MatrixAlgebraKit.AbstractAlgorithm)
145
@@ -21,25 +12,6 @@ struct BlockPermutedDiagonalAlgorithm{A<:MatrixAlgebraKit.AbstractAlgorithm} <:
2112 alg:: A
2213end
2314
24- # TODO : Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
25- function MatrixAlgebraKit. default_svd_algorithm (A:: AbstractBlockSparseMatrix ; kwargs... )
26- return default_svd_algorithm (typeof (A), kwargs... )
27- end
28-
29- # TODO : Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
30- function MatrixAlgebraKit. default_algorithm (
31- f:: typeof (svd_compact!), A:: Type{<:AbstractBlockSparseMatrix} ; kwargs...
32- )
33- return default_svd_algorithm (A; kwargs... )
34- end
35-
36- # TODO : Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
37- function MatrixAlgebraKit. default_algorithm (
38- f:: typeof (svd_full!), A:: Type{<:AbstractBlockSparseMatrix} ; kwargs...
39- )
40- return default_svd_algorithm (A; kwargs... )
41- end
42-
4315function MatrixAlgebraKit. default_svd_algorithm (
4416 A:: Type{<:AbstractBlockSparseMatrix} ; kwargs...
4517)
0 commit comments