magnopy.SpinHamiltonian.set_magnetic_field#

method

SpinHamiltonian.set_magnetic_field(B=None, alphas=None) None[source]#

Sets a uniform external magnetic field applied to the Hamiltonian.

Added in version 0.5.2.

Parameters:
B(3, ) array-like

Vector of magnetic field (magnetic flux density, B) given in the units of Tesla.

alphaslist of int, optional

Indices of atoms, to which the magnetic field effect should be added. If none give, then magnetic field is added only to the SpinHamiltonian.magnetic_atoms. See Magnetic vs non-magnetic atoms for more details on the difference between magnetic and non-magnetic atoms.

See also

magnetic_field

Notes

The Zeeman term is defined as

\[\sum_{\mu, \alpha} \mu_B g_{\alpha} \boldsymbol{B}\cdot\boldsymbol{S}_{\mu,\alpha}\]

We map this term to the ( 1 ) terms, which are written as

\[C_1 \sum_{\mu, \alpha} \boldsymbol{S}_{\mu,\alpha} \cdot \boldsymbol{J}^{Zeeman}_{\alpha}\]

where \(\boldsymbol{J}^{Zeeman}_{\alpha}\) is defined as

\[\boldsymbol{J}^{Zeeman}_{\alpha} = \dfrac{\mu_B g_{\alpha}}{C_1}\boldsymbol{B}\]

Zeeman energy is minimal when the magnetic moment is aligned with the direction of the external field. Therefore, the spin vector shall be directed opposite to the direction of the magnetic field. In other words, in the ground state \(\ket{0}\) of the Zeeman Hamiltonian, the eigenvalue of the spin operator \(\boldsymbol{S}_{\mu,\alpha}^{||\boldsymbol{B}}\) shall be equal to \(-S_{\alpha}\). Therefore, the g-factors (spinham.atoms.g_factors) are expected to be positive when the Zeeman term is written as we do in Magnopy.

Examples

See Magnetic field for more details on how to use this method.