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
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "BlockSparseArrays"
uuid = "2c9a651f-6452-4ace-a6ac-809f4280fbb4"
authors = ["ITensor developers <[email protected]> and contributors"]
version = "0.7.0"
version = "0.7.1"

[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Expand Down Expand Up @@ -39,7 +39,7 @@ GPUArraysCore = "0.1.0, 0.2"
LinearAlgebra = "1.10"
MacroTools = "0.5.13"
MapBroadcast = "0.1.5"
MatrixAlgebraKit = "0.2"
MatrixAlgebraKit = "0.2.2"
SparseArraysBase = "0.5"
SplitApplyCombine = "1.2.3"
TensorAlgebra = "0.3.2"
Expand Down
19 changes: 0 additions & 19 deletions src/factorizations/lq.jl
Original file line number Diff line number Diff line change
@@ -1,24 +1,5 @@
using MatrixAlgebraKit: MatrixAlgebraKit, default_lq_algorithm, lq_compact!, lq_full!

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_lq_algorithm(A::AbstractBlockSparseMatrix; kwargs...)
return default_lq_algorithm(typeof(A); kwargs...)
end

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_algorithm(
::typeof(lq_compact!), A::Type{<:AbstractBlockSparseMatrix}; kwargs...
)
return default_lq_algorithm(A; kwargs...)
end

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_algorithm(
::typeof(lq_full!), A::Type{<:AbstractBlockSparseMatrix}; kwargs...
)
return default_lq_algorithm(A; kwargs...)
end

function MatrixAlgebraKit.default_lq_algorithm(
A::Type{<:AbstractBlockSparseMatrix}; kwargs...
)
Expand Down
28 changes: 0 additions & 28 deletions src/factorizations/polar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,6 @@ using MatrixAlgebraKit:
right_polar!,
svd_compact!

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_algorithm(
::typeof(left_polar!), A::AbstractBlockSparseMatrix; kwargs...
)
return default_algorithm(left_polar!, typeof(A); kwargs...)
end

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_algorithm(
::typeof(left_polar!), A::Type{<:AbstractBlockSparseMatrix}; kwargs...
)
return PolarViaSVD(default_algorithm(svd_compact!, A; kwargs...))
end

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_algorithm(
::typeof(right_polar!), A::AbstractBlockSparseMatrix; kwargs...
)
return default_algorithm(right_polar!, typeof(A); kwargs...)
end

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_algorithm(
::typeof(right_polar!), A::Type{<:AbstractBlockSparseMatrix}; kwargs...
)
return PolarViaSVD(default_algorithm(svd_compact!, A; kwargs...))
end

function MatrixAlgebraKit.check_input(::typeof(left_polar!), A::AbstractBlockSparseMatrix)
@views for I in eachblockstoredindex(A)
m, n = size(A[I])
Expand Down
19 changes: 0 additions & 19 deletions src/factorizations/qr.jl
Original file line number Diff line number Diff line change
@@ -1,25 +1,6 @@
using MatrixAlgebraKit:
MatrixAlgebraKit, default_qr_algorithm, lq_compact!, lq_full!, qr_compact!, qr_full!

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_qr_algorithm(A::AbstractBlockSparseMatrix; kwargs...)
return default_qr_algorithm(typeof(A); kwargs...)
end

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_algorithm(
::typeof(qr_compact!), A::Type{<:AbstractBlockSparseMatrix}; kwargs...
)
return default_qr_algorithm(A; kwargs...)
end

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_algorithm(
::typeof(qr_full!), A::Type{<:AbstractBlockSparseMatrix}; kwargs...
)
return default_qr_algorithm(A; kwargs...)
end

function MatrixAlgebraKit.default_qr_algorithm(
A::Type{<:AbstractBlockSparseMatrix}; kwargs...
)
Expand Down
28 changes: 0 additions & 28 deletions src/factorizations/svd.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
using MatrixAlgebraKit: MatrixAlgebraKit, default_svd_algorithm, svd_compact!, svd_full!

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
using MatrixAlgebraKit: TruncatedAlgorithm, select_truncation, svd_trunc!
function MatrixAlgebraKit.select_algorithm(
::typeof(svd_trunc!), A::Type{<:AbstractBlockSparseMatrix}, alg; trunc=nothing, kwargs...
)
alg_svd = select_algorithm(svd_compact!, A, alg; kwargs...)
return TruncatedAlgorithm(alg_svd, select_truncation(trunc))
end

"""
BlockPermutedDiagonalAlgorithm(A::MatrixAlgebraKit.AbstractAlgorithm)
Expand All @@ -21,25 +12,6 @@ struct BlockPermutedDiagonalAlgorithm{A<:MatrixAlgebraKit.AbstractAlgorithm} <:
alg::A
end

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_svd_algorithm(A::AbstractBlockSparseMatrix; kwargs...)
return default_svd_algorithm(typeof(A), kwargs...)
end

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_algorithm(
f::typeof(svd_compact!), A::Type{<:AbstractBlockSparseMatrix}; kwargs...
)
return default_svd_algorithm(A; kwargs...)
end

# TODO: Delete once https://github.com/QuantumKitHub/MatrixAlgebraKit.jl/pull/32 is merged.
function MatrixAlgebraKit.default_algorithm(
f::typeof(svd_full!), A::Type{<:AbstractBlockSparseMatrix}; kwargs...
)
return default_svd_algorithm(A; kwargs...)
end

function MatrixAlgebraKit.default_svd_algorithm(
A::Type{<:AbstractBlockSparseMatrix}; kwargs...
)
Expand Down
Loading