SunnySuite / Sunny.jl

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

Unify normalization conventions of dynamical correlation #235

Closed kbarros closed 6 months ago

kbarros commented 7 months ago

Dynamical correlations calculated with spin wave theory and with classical dynamics currently follow different normalization conventions with respect to natoms (the number of atoms in the magnetic cell). The current state is:

  1. SpinW does not normalize by natoms
  2. Our current LSWT code does normalize by natoms
  3. Our current classical dynamics intensity code does not normalize by natoms.

@Lazersmoke argued on Slack that (2) is correct (even though it differs from the SpinW convention), and that (3) should be changed to match (2).

Here is my lightly edited summary of @Lazersmoke's argument:

Ok, so that everyone is on the same page, if I have a quantity S(x,t) with "units" S^2 and I Fourier transform it, then the result will have units S^2/BZ/fs where "per BZ" is [Length]^3 and "per fs" is [Time], and they indicate that the S(q,w) is a density in reciprocal space. In order for the typical density S(q,w) to be on the same order of magnitude as S(x,t), you need to do a fast Fourier transform (which is a sum of N terms with no normalization factor) and then divide by N.

For exactly the same reason, when you add Nm terms together in a spin wave code, you have to divide by Nm to get your intensity to be in the standard S^2/BZ/fs units; you're averaging Nm estimates of the correlation together.

For (once again) the same reason, you need to divide by prod(sys.latsize) when computing spatial correlations.

SpinW is adding together Nm terms and not dividing by Nm [bad]

LSWT is adding together Nm terms and using sqrt_Nm_inv to divide by Nm [good]

LL on main is correctly dividing by prod(sys.latsize) [good], but not by Nm [bad], and for energy axis it's dividing by nomega too many times

Lazersmoke commented 7 months ago

This all looks good 👍 and the classical dynamics as implemented in #217 fixes the Nm and n_omega factors.

One caveat: everything mentioned above includes only up to the output of calc_intensity. There are additional normalization considerations that need to be made on case-by-case basis for each of the following functions, which consume the output of calc_intensity:

kbarros commented 6 months ago

Work in progress at https://github.com/SunnySuite/Sunny.jl/pull/240 is going to use the convention that the extensive intensity will be normalized by the number of chemical unit cells, i.e., in terms of the lattice vectors that define the RLU system. This has the advantages: (1) consistency with SpinW, (2) adding more magnetic ions adds more intensity (3) avoid ambiguity, e.g., when working with entangled units, where the number of "sites" is not well defined.

Note that the shape of the chemical cell is an invariant in Sunny. Reshaping the System will not change the reference ("original") chemical cell.