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 = "DiagonalArrays"
uuid = "74fd4be6-21e2-4f6f-823a-4360d37c7a77"
authors = ["ITensor developers <[email protected]> and contributors"]
version = "0.3.16"
version = "0.3.17"

[deps]
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
Expand All @@ -23,6 +23,6 @@ DerivableInterfaces = "0.5.5"
FillArrays = "1.13.0"
LinearAlgebra = "1.10.0"
MapBroadcast = "0.1.10"
MatrixAlgebraKit = "0.2"
MatrixAlgebraKit = "0.2, 0.3"
SparseArraysBase = "0.7.2"
julia = "1.10"
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ for f in [
]
for Alg in [:ScaledDeltaAlgorithm, :DeltaAlgorithm]
@eval begin
function MatrixAlgebraKit.initialize_output(::typeof($f), a, alg::$Alg)
function MatrixAlgebraKit.initialize_output(
::typeof($f), a::AbstractMatrix, alg::$Alg
)
return nothing
end
end
Expand All @@ -148,13 +150,17 @@ for f in [
:svd_vals!,
]
@eval begin
function MatrixAlgebraKit.check_input(::typeof($f), a, F, alg::DeltaAlgorithm)
function MatrixAlgebraKit.check_input(
::typeof($f), a::AbstractMatrix, F, alg::DeltaAlgorithm
)
@assert size(a, 1) == size(a, 2)
@assert isdiag(a)
@assert all(isone, diagview(a))
return nothing
end
function MatrixAlgebraKit.check_input(::typeof($f), a, F, alg::ScaledDeltaAlgorithm)
function MatrixAlgebraKit.check_input(
::typeof($f), a::AbstractMatrix, F, alg::ScaledDeltaAlgorithm
)
@assert size(a, 1) == size(a, 2)
@assert isdiag(a)
@assert allequal(diagview(a))
Expand All @@ -164,13 +170,17 @@ for f in [
end
for f in [:eig_full!, :eig_vals!, :eigh_full!, :eigh_vals!]
@eval begin
function MatrixAlgebraKit.check_input(::typeof($f), a, F, alg::DeltaAlgorithm)
function MatrixAlgebraKit.check_input(
::typeof($f), a::AbstractMatrix, F, alg::DeltaAlgorithm
)
@assert issquare(a)
@assert isdiag(a)
@assert all(isone, diagview(a))
return nothing
end
function MatrixAlgebraKit.check_input(::typeof($f), a, F, alg::ScaledDeltaAlgorithm)
function MatrixAlgebraKit.check_input(
::typeof($f), a::AbstractMatrix, F, alg::ScaledDeltaAlgorithm
)
@assert issquare(a)
@assert isdiag(a)
@assert allequal(diagview(a))
Expand Down
2 changes: 1 addition & 1 deletion test/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ DerivableInterfaces = "0.5"
DiagonalArrays = "0.3"
FillArrays = "1"
LinearAlgebra = "1"
MatrixAlgebraKit = "0.2.5"
MatrixAlgebraKit = "0.2.5, 0.3"
SafeTestsets = "0.1"
SparseArraysBase = "0.7"
StableRNGs = "1"
Expand Down
Loading