SunnySuite / Sunny.jl

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

Support rotated spin directions in dipole-mode Spin Wave Theory #232

Closed Lazersmoke closed 6 months ago

Lazersmoke commented 7 months ago

Currently, the dipole-mode spin wave code can only handle axis-aligned, Sx, Sy, and Sz observables. But it needs to handle arbitrary directions to correctly support arbitrary g tensors! This code [1] needs to be updated to use observable_operators, like the :SUN case above it, and then it will work together with #231

[1] https://github.com/SunnySuite/Sunny.jl/blob/21fe7793d8a21c46d7c4d2dc6ac16b5e0e3ee3f0/src/SpinWaveTheory/DispersionAndIntensities.jl#L336-L353

ddahlbom commented 7 months ago

Might be useful to ping @Hao-Phys here. I'm not sure of the details of the construction of the v vector. It seems like it's basically a complex three vector which, nonetheless, transforms sensibly under an ordinary rotation matrix. Presumably the Avec transforms similarly. This seem to suggest that one could just apply the g-tensor to Avec.

Hao-Phys commented 7 months ago

I agree with @ddahlbom. For :dipole mode, knowing Sx, Sy, and Sz are enough to handle arbitrary directions. Here Avec should transform like a vector under rotation.

Lazersmoke commented 7 months ago

Thanks @Hao-Phys @ddahlbom ! This is implemented now at #231