You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/identityoperator.jl
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -11,15 +11,17 @@ type which has to a subtype of [`AbstractOperator`](@ref) as well as the number
11
11
to be used in the identity matrix.
12
12
"""
13
13
identityoperator(::Type{T}, ::Type{S}, b1::Basis, b2::Basis) where {T<:AbstractOperator,S} =throw(ArgumentError("Identity operator not defined for operator type $T."))
14
+
identityoperator(::Type{T}, ::Type{S}, b::OperatorBasis) where {T<:AbstractOperator,S} =identityoperator(T,S,b.left,b.right)
14
15
identityoperator(::Type{T}, ::Type{S}, b::Basis) where {T<:AbstractOperator,S} =identityoperator(T,S,b,b)
15
-
identityoperator(::Type{T}, bases::Basis...) where T<:AbstractOperator=identityoperator(T,eltype(T),bases...)
16
+
identityoperator(::Type{T}, b::OperatorBasis) where {T<:AbstractOperator} =identityoperator(T,eltype(T),b)
17
+
identityoperator(::Type{T}, bases::Basis...) where {T<:AbstractOperator} =identityoperator(T,eltype(T),bases...)
exp(op::AbstractOperator) =throw(ArgumentError("exp() is not defined for this type of operator: $(typeof(op)).\nTry to convert to dense operator first with dense()."))
0 commit comments