JuliaQuantumControl / QuantumPropagators.jl

Propagators for Quantum Dynamics and Optimal Control
https://juliaquantumcontrol.github.io/QuantumPropagators.jl/
MIT License
16 stars 4 forks source link

Explore Bessel.jl for Chebychev coeffs #74

Open goerz opened 3 months ago

goerz commented 3 months ago

This might make the calculation of coefficients significantly faster:

See https://discourse.julialang.org/t/matrix-exponential-vector-for-various-scales/112022/17

Fe-r-oz commented 1 month ago

Do we need to normalize the spellings of Chebychev to Chebyshev in QuantumPropagators.jl?

goerz commented 1 month ago

No, I always spell it Chebychev, and that will be the canonical spelling inside this package.

Fe-r-oz commented 1 month ago

Alrighty!

I am excited to explore Bessel.jlfor chebychev coeff!

As you mentioned we have to useBessel.jl instead of (besselj) from SpecialFunctions.jl, as it is typically 2-12x faster than specialfunction.jl implementations. Bessel.jl also have same names etc. besselj

Screenshot from 2024-05-13 08-22-16

if I recall correctly, the regular exponential just uses the modified Bessel function (besseli instead of bessel) and you kill the i in the definition of c and in the final phase factor

It seems that regular exponential uses besseljinstead of besseli,, so there might be no need to kill i in c and phase factor, right?

Screenshot from 2024-05-13 08-31-12

goerz commented 1 month ago

To really "explore" this would require proper benchmarking in realistic settings. I have a WIP benchmarking repository that isn't quite ready to be pushed. Since the coefficients can typically be reused a lot, they are very unlikely to be a bottleneck in any optimization. Still, at some point, it would be nice to quantify it a bit more. This issue is more of a note to myself to look at this when my benchmarking code is in better shape. I don't think looking into this would be a good use of your time.

Fe-r-oz commented 1 month ago

Sounds good! I enjoyed your talk at Yao Community Call, that was comprehensive!

Looking forward to the workshop tutorial!