diff --git a/Project.toml b/Project.toml index 77aefefbf..a0cf0b881 100644 --- a/Project.toml +++ b/Project.toml @@ -51,7 +51,7 @@ Graphs = "1.7" IncompleteLU = "0.2" KernelAbstractions = "0.9.2" LinearAlgebra = "1" -LinearSolve = "2" +LinearSolve = "2, 3" OrdinaryDiffEqCore = "1" OrdinaryDiffEqTsit5 = "1" Pkg = "1" diff --git a/src/qobj/arithmetic_and_attributes.jl b/src/qobj/arithmetic_and_attributes.jl index 15a0f430d..e4aa070f8 100644 --- a/src/qobj/arithmetic_and_attributes.jl +++ b/src/qobj/arithmetic_and_attributes.jl @@ -443,7 +443,7 @@ LinearAlgebra.exp( ) where {ObjType<:Union{OperatorQuantumObject,SuperOperatorQuantumObject},DimsType} = QuantumObject(_spexp(A.data), A.type, A.dimensions) -function _spexp(A::SparseMatrixCSC{T,M}; threshold = 1e-14, nonzero_tol = 1e-20) where {T,M} +function _spexp(A::SparseMatrixCSC{T,M}; threshold = 1e-14, nonzero_tol = 1e-20) where {T<:Number,M<:Int} m = checksquare(A) # Throws exception if not square mat_norm = norm(A, Inf)