BBN-Q / QSimulator.jl

Unitary and Lindbladian evolution in Julia
Other
27 stars 13 forks source link

Use of QuDynamics #6

Open amitjamadagni opened 9 years ago

amitjamadagni commented 9 years ago

Hello QSimulator team,

I just came across evolution.jl in the source, it would be helpful to know if we could integrate QuDynamics.jl for the use of evolution. Hoping to hear from you on the possibility of the use of QuDynamics in QSimulator. Thanks !

blakejohnson commented 9 years ago

Hi @amitjamadagni. I'll take a look at QuDynamics.jl. One thing I immediately notice, however, is that our solver allows calculating the evolution operator itself, as opposed to just the state vector/density matrix. I didn't see support for that in QuDynamics.jl. I am missing something?

amitjamadagni commented 9 years ago

Hello @blakejohnson, yeah we return the evolved states and not the evolution operator itself. I guess we could have a work around to possibly return the evolution operator !

acroy commented 8 years ago

@blakejohnson : May I ask why you need the propagator? It is typically much more efficient to avoid the calculation of the propagator itself (in particular for QMEs). So unless you extract some information from this operator I would try to stick to states...

blakejohnson commented 8 years ago

@acroy One of our "applications" of QSimulator.jl is control design, i.e. we optimize time-domain control parameters to achieve a particular unitary evolution. In principle, I guess you could achieve the same thing by simulating the action on a large enough set of input states, but then you might as well just compute the evolution operator directly.

caryan commented 8 years ago

@acroy I'd also be curious if you have benchmarks for the "typically much more efficient". It's been years since I check but back then exponentiating Hamiltonians was just as fast as solving the state differential equation and much faster when there were periods of constant Hamiltonians that could be computed in one step where the DE solver had to step slower than the fastest frequency.

acroy commented 8 years ago

"More efficient" depends of course on your problem (size). If you have a Hamiltonian of size 100x100 matrix exponentiation will be fast(est), but it is clear that it doesn't scale well if you go beyond this (you can't avoid N^3 costs). This becomes even worse for QMEs. This is also independent of the type of time-dependence. If you have special knowledge about the time-dependence you may use that to make the propagation even more efficient, e.g. using Floquet theory for periodic driving. For the things I did scaling with the basis-size was usually the limiting factor.

I have to admit that I don't know your use case very well. Maybe you don't need that many states? Then you can just use expm for the matrix representation of your Hamiltonian/Lindbladian. The latter can easily be obtained in QuDynamics. But how do you know, for instance, that your time-step is sufficiently small if your Hamiltonian changes in time?

Could you maybe give an example of what you typically calculate? Or a reference? QuBase/QuDynamics really aims at being useful for all quantum science related questions, but we need some input to figure out how to achieve that. Apparently use cases can be very different ...

On Mo., 14. Sep. 2015 at 17:30, Colm Ryan notifications@github.com wrote:

@acroy https://github.com/acroy I'd also be curious if you have benchmarks for the "typically much more efficient". It's been years since I check but back then exponentiating Hamiltonians was just as fast as solving the state differential equation and much faster when there were periods of constant Hamiltonians that could be computed in one step where the DE solver had to step slower than the fastest frequency.

— Reply to this email directly or view it on GitHub https://github.com/BBN-Q/QSimulator.jl/issues/6#issuecomment-140116353.

caryan commented 8 years ago

Typically we have a fixed drift Hamiltonian and a time-dependent control Hamiltonians. We assume the control Hamiltonians are piece-wise constant (up to a bandwidth limit from our waveform generators and other electronics). We are usually interested in the average gate fidelity, which is most straightforwardly calculated from the propagator arXiv:0205035, as a measure of how well we are doing in implementing the desired quantum gate.

Another case where propagator information is crucial is quantum optimal control. This is need not only for the fitness function evaluation but also for the gradient information at each timestep. For a review style paper see arXiv:1011.4874

acroy commented 8 years ago

Thanks for the references. For problems with only a few basis-states calculating the propagator shouldn't be a (performance) problem. I think we can provide some functions for that in QuDynamics. We will open an issue there and report back once we have something.

amitjamadagni commented 8 years ago

@blakejohnson @caryan we have added the functionality of calculating the evolution operator. QuEvolutionOp does this. Though time dependency is still a functionality which we aim to integrate soon.