During the past few weeks we have worked on integrating Quantum Monte-Carlo Wave Function Method as one of the solvers. We already had an initial version from QuDOS.jl and we had to set it up for QuDynamics. The setup of the alogrithm is as follows :
drawfrom the iterator version of
QuMCWFEnsemble(We will get back to the structure of
QuMCWFEnsembleat a later stage) and for the first time step we draw a random number.
conditionswhich involve the comparison of
jtolwhich is a constant. Here
epsis a random number and is generated only for the first step and in certain cases again generated if one of the
conditionsfrom above gets satisfied.
epshas to be stored from the current step to the use in next time step, for this we had to convert the
QuMCFto a type from immutable which is different when compared to other solvers.
conditions, we end up with the propagated state, which is used to generate the density matrix.
Coming back to the structure of
QuMCWFEnsemble this basically takes in a input of
the number of trajectories (which is defaulted to 500), and also has
decomp as a field which stores the
eigen value decomposition of
initial state, again we could have a vector passed, or we could have a density
matrix for the
initial state, for the former we pass nothing for decomp parameter but for the latter we
store the decomposition. The iterator version of
QuMCWFEnsemble generates a state using the
which again has a random value generated for the choice of eigen vector from the decomposition.
QuMCWF has the following fields :
options is defaulted to an empty
but can be used to provide a solver using the keyword
:solver which is defaulted to use
solver is required for propagating the state from
eps is the random number and
rand() is used to generate
The above implementation has been merged into the master and we have compared the results to QuTiP. Here is the notebook which present the QuTiP example. Also, we have worked on integrating some examples into the repo and this involves Jaynes-Cummings Model using MCWF method.
I would like to conclude by providing an example of how Quantum MCWF method works in QuDynamics :
# System construction ad = raiseop(2) hamiltonian = ad*ad' cs = coherentstatevec(2, 1.) c_ops = [lowerop(2)] tlist = 0.:0.25:2*pi rho = complex(cs*cs') rhos = Array(typeof(rho), length(tlist)-1) qumcwfen = QuMCWFEnsemble(complex(cs), 1000) # rhos to store density matrices at every time step for i=1:length(tlist)-1 rhos[i] = complex(zeros(rho)) end # using MCWF to propagate and storing states at every time step # looped over the number of trajectories (length(qumcwfen)) for psi0 in qumcwfen i = 1 for (t,psi) in QuPropagator(hamiltonian, c_ops, psi0, tlist, QuMCWF([:solver=>QuODE45()])) rhos[i] = rhos[i] + (psi*psi')/length(qumcwfen)/norm(psi)^2 i = i + 1 end end
The next targets include working on the documentation and also the related scripts.