magnopy.SpinHamiltonian.parameters#

method

SpinHamiltonian.parameters(n=None, p_n=None)[source]#

Returns an iterator over parameters of the Hamiltonian.

Added in version 0.5.0.

See Spin Hamiltonian for the definition of the Hamiltonian and the meaning of n and p_n.

Parameters:
nint, optional

Number of spins in the terms of the spin Hamiltonian. Expected to be between 1 and 4. If not given, then all parameters are returned and p_n is ignored.

p_nint, optional

Index of integer partition of n. Expected to be between 1 and maximal number of integer partitions for the given n. If not given, then parameters of all respective terms of the spin Hamiltonian with n spins are returned. Ignored if n is not given.

Returns:
parametersiterator

Iterator over parameters of the Hamiltonian. Each element of the iterator is a tuple (nus, alphas, parameter) where nus is a tuple of unit cell indices, alphas is a tuple of atom indices, and parameter is a vector/matrix/tensor of the interaction parameter.

  • len(alphas) = n

  • len(nus) == len(alphas) - 1

  • len(parameter.shape) == len(alphas)

  • parameter.shape[i] == 3 for all 0 <= i < len(alphas)

  • alphas[0] is always located in the unit cell (0, 0, 0)

  • alphas[i] is located in the unit cell nus[i-1] for 1 <= i < len(alphas)