JohanSchott / impurityModel

Calculate many-body states of an impurity Anderson model and spectra (e.g. XPS, XAS, RIXS, NIXS)
MIT License
22 stars 2 forks source link

Magnetic field issue #1

Closed patrikthunstrom closed 3 years ago

patrikthunstrom commented 3 years ago

There is a small bug in get_spectrum and get_spectrum_using_CF. The magnetic field hx is overwritten by hy in the following lines:

    hHfieldOperator[(((l, 1, m), 'c'), ((l, 0, m), 'a'))] = hx*1/2.
    hHfieldOperator[(((l, 0, m), 'c'), ((l, 1, m), 'a'))] = hx*1/2.
    hHfieldOperator[(((l, 1, m), 'c'), ((l, 0, m), 'a'))] = -hy*1/2.*1j
    hHfieldOperator[(((l, 0, m), 'c'), ((l, 1, m), 'a'))] = hy*1/2.*1j

/Patrik

JohanSchott commented 3 years ago

Great that you found this bug. Thanks! In https://github.com/JohanSchott/impurityModel/pull/2 the bug should be fixed.