You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed that in the function Omega_k_chain the following expression is calculated: $$\Re(\text{Li}_3(e^{i(k_0+k)a}) + \text{Li}_3(e^{i(k_0-k)a}) - ik_0a[\text{Li}_2(e^{i(k_0+k)a}) + \text{Li}_2(e^{i(k_0-k)a})])$$
This expression uses (time-costly) complex polylogarithms. However, the result is purely real. I believe this expression can be expressed in terms of simpler real Clausen functions, due to the following relations: $$\Re[\text{Li}_3(e^{i\theta})] = \text{Cl}_3(\theta),\qquad\Im[\text{Li}_2(e^{i\theta})] = \text{Cl}_2(\theta)$$
Using these relations I believe the first expression can be written as: $$\text{Cl}_3[(k_0+k)a] + \text{Cl}_3[(k_0-k)a] + k_0a(\text{Cl}_2[(k_0+k)a] + \text{Cl}_2[(k_0-k)a])$$
which can be significantly faster when a fast implementation of the Clausen functions is used.
In Julia one could use the package ClausenFunctions.jl which provide very fast implementations of $\text{Cl}_2$ and $\text{Cl}_3$:
using ClausenFunctions
cl2(1.0)
cl3(1.0)
Best regards
Alexander Voigt
The text was updated successfully, but these errors were encountered:
thanks for pointing that out! I think you're right, at least tests pass locally if I switch things the way you suggested. Now I'm just waiting for CI to pass in #28. The next version of CollectiveSpins should include this then.
Dear CollectiveSpins developers,
I've noticed that in the function
$$\Re(\text{Li}_3(e^{i(k_0+k)a}) + \text{Li}_3(e^{i(k_0-k)a}) - ik_0a[\text{Li}_2(e^{i(k_0+k)a}) + \text{Li}_2(e^{i(k_0-k)a})])$$
$$\Re[\text{Li}_3(e^{i\theta})] = \text{Cl}_3(\theta),\qquad\Im[\text{Li}_2(e^{i\theta})] = \text{Cl}_2(\theta)$$
$$\text{Cl}_3[(k_0+k)a] + \text{Cl}_3[(k_0-k)a] + k_0a(\text{Cl}_2[(k_0+k)a] + \text{Cl}_2[(k_0-k)a])$$
Omega_k_chain
the following expression is calculated:This expression uses (time-costly) complex polylogarithms. However, the result is purely real. I believe this expression can be expressed in terms of simpler real Clausen functions, due to the following relations:
Using these relations I believe the first expression can be written as:
which can be significantly faster when a fast implementation of the Clausen functions is used.
In Julia one could use the package ClausenFunctions.jl which provide very fast implementations of$\text{Cl}_2$ and $\text{Cl}_3$ :
Best regards
Alexander Voigt
The text was updated successfully, but these errors were encountered: