Closed marcusps closed 9 years ago
I think expmv(π/4,[0 -1im; 1im 0]|>sparse, complex([1.;0.]))
should work. The problem is that we don't promote the output vector(s) to the have right element type (in this case Complex128
).
I guess for the mutating versions expmv!
one has to rely on the user to provide appropriate vectors as input. But expmv
should try to construct the output vector with elements of type promote_type(promote_type(eltype(A),eltype(vec)), typeof(tau))
or such.
I'll submit a patch.
In Julia v0.3.5 I get: