ham_oz#
- torchspin.ham_oz(sys, B0=None, oam=None, dtype=torch.complex128, device='cpu')[source]#
Orbital Zeeman Hamiltonian (or magnetic-moment operators).
- Parameters:
sys (SpinSystem) – Spin system with orbital angular momenta (
Sys.L).B0 (list | Tensor | None) – Magnetic field vector in mT, shape
(3,). If given, returns the orbital Zeeman Hamiltonian. IfNone, returns(mux, muy, muz).oam (list[int] | None) – 1-based indices of OAMs to include. Defaults to all.
dtype (dtype) – Output dtype.
device (str) – PyTorch device string.
- Returns:
H – If B0 is given — orbital Zeeman Hamiltonian (MHz).
(mux, muy, muz) – If B0 is
None— orbital magnetic-dipole-moment operators (MHz/mT).
- Return type: