SunnySuite / Sunny.jl

Spin dynamics and generalization to SU(N) coherent states
Other
65 stars 19 forks source link

Structure factor docs #240

Closed kbarros closed 4 months ago

Lazersmoke commented 5 months ago

Hi Kip, thanks for writing this up! This is well on the way to getting it documented what we really compute 👍

A few comments which I think should be edited in to the document. I've tried to be exhaustive but I may have more comments later. Overall looks really great though!

  1. In the expression $A(r_0,0)B(r_0-r,t)$ inside the definition of $C(r,t)$, the time lag $t$ and position lag $r$ are going in opposite directions! In classical Sunny, we do both temporal and spatial correlations in the same way, so this should be reflected in the definition in the docs. What we actually use currently is $S^{\alpha\beta}\sim\alpha(r_0 + r,t_0 + t)\beta(r_0,t_0)$. (1) changed to reflect this
  2. Also in that initial definition of $C(r,t)$, the time dynamics are left unspecified. It's only later that we specify either Heisenberg time evolution, or a classical dynamics of some kind. It would be best to explicitly say that it's undetermined at that early stage of the definition ("where the dependence on time $t$ is to be specified later"), or else the reader may be misled that the classical dynamics uses Heisenberg evolution or vice versa, or that there is a single unique choice of time dynamics for this. This point is extra important for the project I'm working on now, where the $C(r,t)$ is distinct from what's written here; so it would be very useful if this was documented as a point of reference for possible modification. Document applies directly only to quantum version
  3. The Lehmann representation is only for spin wave theory (does not apply to the classical case) so it should go on maybe even a separate page (not in structure-factor.md) to talk about the SWT calculation. There is also omitted so far the sum $\sum_{\mu,k}$, which is a subtle SWT thing that is specially adapted to the harmonic oscillator. In particular, there is no $\beta$ anywhere in Sunny (except for c2q factor), and until there is, we shouldn't document that there is! The next section about spin-spin correlation covers the $\omega$ part sufficiently.
  4. It's best to let the intensive version of the correlations be in "moles of sites" rather than "moles of unit cells", since the latter depends on the choice of crystallographic unit cell. As things are written now, using a 2x larger unit cell makes the signal 2x as intense. With the "moles of sites" definition, all instances of "N_cell" (an unphysical quantity) go away and are replaced with "N_spins" = (total number of magnetic sites in the model), which is a physical quantity.
  5. In the cross-section, the kf/ki is on the right; we should probably comment that this is moved to the left hand side in practice, since Sunny doesn't do anything with this (ask xiaojian for more details)

A few notes (for the record) about our conventions:

Lazersmoke commented 5 months ago

About the section on the <MM> vs <SS>. They should coincide when g=1, right? (not g = 2)

I think some of the MM and SS labels are misplaced in the equations.

kbarros commented 4 months ago

Addressing the remaining comments from above:

  1. This Structure Factor document is a specification for the intended Sunny behavior in calculating quantum observables. We will eventually want a new section describing how to calculate classical correlations, but that is not yet part of (how I think about) mainstream Sunny. The option to include $\beta$ dependence should be applied uniformly across mode (LSWT or dynamical_correlations). Apart from bugs in the current implementation, this PR should clearly specify the intended Sunny behavior.
  2. Rationale for this normalization convention is given here: https://github.com/SunnySuite/Sunny.jl/issues/235#issuecomment-1978955833
  3. Standard tools for processing experimental data (e.g. Mantid) will apply the $(kf/ki)^{-1}$ prefactor to the measured intensities. I will update the document to explain this.