Skip to content

Commit

Permalink
Complex coeffs support.
Browse files Browse the repository at this point in the history
  • Loading branch information
amitjamadagni committed Jul 12, 2015
1 parent e38e0cc commit df5092c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/arrays/arraymath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ function \{B<:OrthonormalBasis}(op::AbstractQuMatrix{B}, vec::AbstractQuVector{B
return QAT(div, bases(op,1))
end

# convert coeffs to complex
Base.complex{B<:OrthonormalBasis}(qarr::AbstractQuArray{B}) = similar_type(qarr)(complex(coeffs(vec(qarr))), bases(qarr))

# Vectorize QuArray
Base.vec{B<:OrthonormalBasis}(vec1::AbstractQuArray{B}) = QuArray(vec(coeffs(vec1)))

Expand Down

0 comments on commit df5092c

Please sign in to comment.