JuliaAttic / QuBase.jl

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

Generalized CTranspose + conversion methods and promotion rules #33

Closed jrevels closed 9 years ago

jrevels commented 9 years ago

This PR generalizes the CTranspose type to store Q<:AbstractQuArray and supplies the appropriate promotion rules and conversion methods. Once this is merged, we can close #31.

The only thing left before merging this in (unless something needs to be altered or I missed something) is to add some tests.

(I also snuck in a generalization of LabeledQuArray, a type alias that probably won't see much love for a while but for which I have future plans).

This also makes it simpler to call similar_type by adding a method that auto-extracts the type of a value argument (and promotes the types of two value arguments).

acroy commented 9 years ago

Looks good. I really like the new similar_type! I will try to play with it tomorrow. Any idea how we should test these things?

jrevels commented 9 years ago

I added a bunch of unit tests for the QuArray and CTranspose types.

This PR should be ready to merge, given that the tests pass (and I didn't miss anything).

acroy commented 9 years ago

This is really good stuff! Let's see what Travis says ...

Maybe it is time to include code coverage via Coverage.jl (in a separate PR of course)?

jrevels commented 9 years ago

Definitely agree!

jrevels commented 9 years ago

Seems like things passed!

Let me know when you're done reviewing so I can merge it (or you can merge it when you're done, if you want).

acroy commented 9 years ago

I am done - you can merge.