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
arithmetic_unary_error(funcname, x::AbstractOperator) =throw(ArgumentError("$funcname is not defined for this type of operator: $(typeof(x)).\nTry to convert to another operator type first with e.g. dense() or sparse()."))
3
5
arithmetic_binary_error(funcname, a::AbstractOperator, b::AbstractOperator) =throw(ArgumentError("$funcname is not defined for this combination of types of operators: $(typeof(a)), $(typeof(b)).\nTry to convert to a common operator type first with e.g. dense() or sparse()."))
@@ -8,33 +10,33 @@ addnumbererror() = throw(ArgumentError("Can't add or subtract a number and an op
8
10
# States
9
11
##
10
12
11
-
-(a::T) where {T<:StateVector} =T(a.basis, -a.data)
13
+
-(a::T) where {T<:StateVector} =T(a.basis, -a.data)#FIXME issue #12
12
14
*(a::StateVector, b::Number) = b*a
13
-
copy(a::T) where {T<:StateVector} =T(a.basis, copy(a.data))
14
-
length(a::StateVector) =length(a.basis)::Int
15
-
basis(a::StateVector) = a.basis
15
+
copy(a::T) where {T<:StateVector} =T(a.basis, copy(a.data))#FIXME issue #12
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