image/svg+xml

GSoC2015: Weeks 3, 4 and 5

Hello everyone,

We have made some decent progress during the past weeks and here is a list of things we have worked on :

  1. Integration of ODE Solvers from ODE.jl
  2. Integration of exponential solver from two packages ExpmV.jl and Expokit.jl
  3. Integration of Equation types QuSchrodingerEq and QuLiouvillevonNeumannEq

That was the list of major points we have worked upon. I would like to present the progress, the process involved and some of the techniques we have used to decide upon the package to integrate.

To begin with we have attempted to compare different step solvers implemented and we have it now in the form of a notebook. It also includes a reference to the original solution.

Moving on, as mentioned above, we have integrated the ODE solvers from ODE.jl. We have integrated the adaptive solvers :

a. ODE.ode45 b. ODE.ode78 c. ODE.ode23s

The prototype of each of the above solvers is same so we have used code generation technique to generate the types QuODE45, QuODE78, QuODE23s and also the related propagate functions. There was an issue with generating the docs but thanks to the maintainer of Docile, he helped us solving the issue of generating docs for different types. I had opened an issue on how to integrate LaTeX into docs (the issue is resolved, thanks again to the Docile maintainer, though it requires a bit of work), this issue has the reference to the technique used to generate docs while code generation technique is in place. We have also worked on the notebook using the ODE solvers which also includes some comparisons. The ODE solvers are currently in the master and a Pkg.update() should allow their usage. However, we have used some of the options which are currently not on the released version of ODE.jl, so a checkout of the package has to be performed by doing

Pkg.checkout("ODE")

as updated in the README.md

Moving on, we have integrated the exponential solver from Expokit.jl and ExpmV.jl packages. We have performed some benchmarks considering the quantum harmonic oscillator problem whose hamiltonian and initial state are as follows :

a = lowerop(n)
hamiltonian = a'*a + lambda*(a + a')
init_state = statevec(1,FiniteBasis(n))

The benchmarks take into consideration the timing analysis and memory analysis for the exmpv implementations from both the packages which have been presented in this notebook. We have included both the solvers in this pull, as we would like to further test them using density matrix implementations before integrating one of them into the master.

We have also worked on integrating equation types, with parent as QuEquation, we have equation types QuSchrodingerEq and QuLiouvillevonNeumannEq. Accordingly we have the QuPropagator constructs which take the following parameters :

  1. QuSchrondingerEq and AbstractQuVector.
  2. AbstractQuMatrix and AbstractQuVector, constructs a QuSchrondingerEq from AbstractQuMatrix and then passing to the above construct.

On similar lines we have the following :

  1. QuLiouvillevonNeumannEq and AbstractQuMatrix.
  2. AbstractQuMatrix and AbstractQuMatrix, by passing the AbstractQuMatrix as parameter to liouvillian_op which results in an superoperator, which is used to construct QuLiouvillevonNeumannEq, which is then passed to the above QuPropagator construct.

There have been two versions for the construction of Liouvillian, for which we have performed an analysis, the constructs and the results have been presented in this notebook

We are working on creating a pull request for the integration above, the gists of how the current files will change are presented below :

  1. propmachinery
  2. propstepsolvers
  3. propodesolvers
  4. propexposolvers

We have also worked on refactoring the tests, the current tests use code generation technique, though the underlying way of testing remains as mentioned in the previous update. Here is the related PR

We plan to integrate the above pulls in the following order :

  1. Pull on tests
  2. Update the repo with exponential solvers
  3. Update the repo with the new types

A related PR in work is the vec feature in QuBase, this is required so that we can support the new type integration (as it is required to vectorize the QuMatrix). So, the plan is to push this in before we have the new types.

For the next targets we plan to integrate an example in repo, and also work on some benchmarks to compare with other softwares present.

I would like to end it by presenting the type structure of QuDynamics which shows an outline of the solvers we have integrated :

Any
 |-> QuPropagatorMethod
 |      |-> QuCrankNicolson
 |      |-> QuEuler
 |      |-> QuExponential
 |            |-> QuExpmV
 |            |-> QuExpokit
 |      |-> QuKrylov
 |      |-> QuODESolvers
 |            |-> QuODE23s
 |            |-> QuODE45
 |            |-> QuODE78
 |
 |-> QuPropagatorState
 |
 |-> QuPropagator{QPM<:QuPropagatorMethod,QVM<:Union(AbstractQuArray{B<:AbstractBasis{S<:AbstractStructure},T,2},AbstractQuArray{B<:AbstractBasis{S<:AbstractStructure},T,1})}
 |
 |-> QuEquation
        |-> QuLiouvillevonNeumannEq{H<:AbstractQuArray{B<:AbstractBasis{S<:AbstractStructure},T,2}}
        |-> QuSchrodingerEq{H<:AbstractQuArray{B<:AbstractBasis{S<:AbstractStructure},T,2}}