JuliaQuantum/QuBase.jl — pull request #4 by jrevels (2014-12-27 22:30:48+00:00)
Title: Merge functionality from QuDirac

I've done a bit of work on the `qudirac-merge` branch to get us up and running with the stuff I've been working on over in the QuDirac.jl repo (which I'll likely take down soon since the functionality has been moved here).

This merge accomplishes a few things:

1. Provides a cleaner directory structure and a more comprehensive type hierarchy.
2. Organizes/cleans up existing code. BTW, I hope my style of tabbing code sections doesn't annoy anybody. This can obviously be changed if so.
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. `DiracArray`s for computation using `AbstractDirac`types. A more comprehensive description can be found in `diracarrays.jl`.
5. Two new basis types, `FockBasis` and `LabelBasis`. Descriptions for these types are in their relevant files. I'm especially excited for `FockBasis`, which will make `DiracArray`s way more performant than they could be with only the `LabelBasis` type.

I tried to leave detailed comments on newly added types; some of those comments might be pulled out/made into actual documentation. It's a hefty merge, but let me know what you think.

Next steps:
- Build a test suite for existing code
- Set up/write some documentation
- Implement actual methods for `DiracArray`s and `QuArray`s.
- A `FunctionOperator{S,T} <: AbstractOperator{S}` type. The idea is that you can define an operator functionally and then use it to perform algebra with the state types.
- A `NullOperator`/`NullState` type for handling additive identities for `AbstractDirac` types.
- I don't have much experience in the way of implementing solvers - if somebody wants pick that up, it'd be great. If not, I have some research to do!