Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Amit
    @amitjamadagni
    hello @ntezak ! It would be really helpful to hear your insights and thoughts on speeding up on the current implementation of lindblad_op ... There is a issue reference here JuliaQuantum/QuDynamics.jl#32 ... It would be nice to hear from you if you have any specific thoughts on this ... Hoping to hear from you :-)
    Nikolas Tezak
    @ntezak
    Hi @amitjamadagni, yeah, the code that klickverbot has in there is pretty much what both the original MATLAB quantum optics toolbox and QuTiP are doing.
    I think that’s definitely a good way to start. For very large systems (say the tensor product of two Fock spaces of 80 photons each) even this sparse approach is problematic as the super operator matrices are of size (D^2 * D^2) where D is the Hilbert space dimension (D=80^2 for the above example) but that’s where QuantumTensors.jl can make a huge difference.
    My proposal would be to implement klickverbot’s code first and then have different separate backends that one can compile symbolic operator (and super operator) definitions to.
    I will try to contribute to this with actual code soon but I don’t know if I will be able to deliver much code until the summer, after my thesis defense (July 1)
    I guess if you would like me to turn his comment into a pull request I can help out with that
    Amit
    @amitjamadagni
    Sure ! I seem to understand what you are saying
    yeah in sense we wanted to know what better approaches are available other than the one already mentioned
    Nikolas Tezak
    @ntezak
    Well, if you have a very specific model with sufficiently sparse operators you can often just write explicit nested for-loops that directly implement the matrix vector products without storing any matrix representation of the operator
    similar to how PDEs such as heat equations are solved
    For complex models given in symbolic form one would like to automatically translate the expressions to such nested loops and compile them
    Amit
    @amitjamadagni
    oh okay ... I guess this is similar to what we have done with Lindblad operator construct in monte carlo solver
    and regarding the PR it would be nice if we could discuss how to integrate QuantumTensors.jl that can be used to solve large systems ... that is may be creating a hybrid version of klickverbot's code and some integration using QuantumTensors.jl !
    Nikolas Tezak
    @ntezak
    yeah, so one major issue that may affect a lot of existing code is how memory is allocated and reused
    For large dimensional systems there is a huge performance penalty to allocating memory to store a system state inside the propagator loop
    Instead one should pre-allocate some memory and keep reusing it
    For any type of operator or super operator the primitive matvec operation that needs to be implemented is
    y_k <- b y_k + a \sum_j A_kj * x_j
    I.e., an in-place application of the operator with coefficients a, b
    Amit
    @amitjamadagni
    yup ! I am getting what you are saying ... my initial implementation would be on the lines of having an overwriting operator either in QuBase or QuDynamics
    so that for every time step in the propagator the pre initialized array is over written for time dependent cases ... for time independent cases this allocation is done once and used over and over again !
    Nikolas Tezak
    @ntezak
    Yeah, so for time-dependent cases it is often enough to just allow scalar time dependent coefficients
    if your hamiltonian is f(t)H1 + g(t)H2 you can just reuse H1 and H2 and just use the scalar multiplication of the above matrix vector product
    Amit
    @amitjamadagni
    yup ! let me try to understand/address this in the time dependent support which is currently under construction in this PR JuliaQuantum/QuDynamics.jl#42
    as I get it in the current PR we are creating a new array always for each time step which is not efficient and can be avoided !
    please refer to the recent comments as the initial comment takes a anonymous function in the type construct !
    Nikolas Tezak
    @ntezak
    Ok, sounds good, I need to go but will check in later
    Amit
    @amitjamadagni
    sure ! thanks for the insight :+1:
    microchips-n-dip
    @microchips-n-dip
    Hello!