ham_hf#
- torchspin.ham_hf(sys, elSpins=None, nucSpins=None, dtype=torch.complex128, device='cpu')[source]#
Hyperfine interaction Hamiltonian (MHz).
- Parameters:
sys (SpinSystem) – Spin system. Hyperfine tensors are in
sys.A(MHz) and frames insys.AFrame.elSpins (list[int] | None) – 1-based indices of electron spins to include. Defaults to all.
nucSpins (list[int] | None) – 1-based indices of nuclear spins to include. Defaults to all.
dtype (dtype) – Output dtype. Default
torch.complex128.device (str) – PyTorch device string.
- Returns:
torch.Tensor – Hyperfine Hamiltonian matrix (MHz), shape
(nStates, nStates).- Return type: