JuliaAttic / QuBase.jl

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

Basic framework for QuArrays and basis types #5

Closed jrevels closed 9 years ago

jrevels commented 9 years ago

This PR splits off the non-QuDirac work from #4. To copy the summary from there, here's what this PR does:

  1. Provides a cleaner directory structure and a more comprehensive type hierarchy.
  2. Organizes/cleans up existing code, as well as splits off QuDirac-related work into the QuDirac repo, which got moved under the JuliaQuantum organization. That repo is where abstract Dirac-notated states and operator functionality will live for the time being, whereas QuBase will be focused on:
    • solvers/modeling capability for coefficient arrays
    • a foundational type system
    • a solid, general implementation for QuArrays and fundamental basis types
  3. Updates the creationop method provided by @acroy to work with arbitrary number of particles (you can pick which particle the operator should act on). I renamed it to raiseop for brevity's sake and implemented lowerop as well. These methods aren't optimized in the slightest (likely a tad slower than @acroy's original implementation), but provide a good starting point for ladder operations in multi-particle systems.
  4. Gives a single type implementation of FiniteBasis that supports a tensor product structure
  5. Implements a couple of functions for QuArray/FiniteBasis, including pretty-printing for QuArrays (let me know what you think, it's hard to compactly convey all that info).

Sorry for the previous commit; I had to go back and fix the tabs-to-spaces thing again for some reason.

jrevels commented 9 years ago

Ah, I realize now I probably should've checked out an orphan branch starting at d89ef16 or so, since a lot of these commits contain QuDirac stuff. I can squash the old commits in the merge, though, so that they don't pollute the history for master.

acroy commented 9 years ago

I think this looks good. Could you maybe squash some of the commits (or all of them)?