JuliaAttic / QuBase.jl

A foundational library for quantum mechanics in Julia
Other
43 stars 6 forks source link

Vectorize and tests added. #37

Closed amitjamadagni closed 9 years ago

acroy commented 9 years ago

Seems some of the commits for dot and trace got mixed in.

You should also use similar_type vec to get the right constructor (see for instance /).

acroy commented 9 years ago

Also: does vec work for arbitrary arrays or only for matrices?

amitjamadagni commented 9 years ago

@acroy vec works for arbitrary arrays, I was of the thinking that if it is a vector it returns a vector, if it is a matrix then it flattens it, this might be directly useful in propagate methods for example here, for current_qustate and always returns a QuArray as it is always a one dimensional array.

acroy commented 9 years ago

Ok, I wasn't sure if it would work for all arrays. You also right about returning QuArray.