muon-spectroscopy-computational-project / muspinsim

Full quantum simulation of muon experiments
https://muon-spectroscopy-computational-project.github.io/muspinsim/
MIT License
1 stars 0 forks source link

Speedy angular averages for ZF #26

Open wilkojohnny opened 1 year ago

wilkojohnny commented 1 year ago

When you are calculating the angular average of the muon polarisation, if there are no externally applied fields you can do this by taking an average of the muon polarisation with the muon (and detectors) initially in any three perpendicular directions (so x,y, and z). In other words, <S__avg(t)> = (<s_x(t)>+<s_y(t)>+<s_z(t)>)/3

I believe the current implementation doesn't do this, so this would be a quick win for speeding up large dipolar-coupled systems in ZF.

joelvdavies commented 1 year ago

This is already possible using

polarization
    1 0 0
    0 1 0
    0 0 1
average_axes
    polarization

instead of using orientation directly. Perhaps something we could mention in the docs under this use case. I don't personally think it would be good to automatically switch to this when using orientation as I think it could be confusing as to what muspinsim actually does with something like

orientation
    eulrange(10)

Perhaps we should add a message in the log file when orientation is being used with no field stating this method would be better?