qit.hamiltonian.heisenberg

qit.hamiltonian.heisenberg(dim, J=(0, 0, 2), C=None)

Heisenberg spin network model.

Parameters
  • dim (tuple[int]) – dimensions of the spins, i.e. dim == (2, 2, 2) would be a system of three spin-1/2’s.

  • J (tuple[float], callable[[int, int, int], float]) – The form of the spin-spin interaction. Either a 3-tuple or a function J(s, i, j) returning the coefficient of the Hamiltonian term \(S_s^{(i)} S_s^{(j)}\).

  • C (array[float]) – Optional connection matrix of the spin network, where C[i, j] is the coupling strength between spins i and j. Only the upper triangle is used.

Returns

Hamiltonian operator

Return type

array[complex]

Builds a Heisenberg model Hamiltonian, describing a network of n interacting spins.

\[H = \sum_{\langle i,j \rangle} C[i,j] \sum_{k = x,y,z} J(i,j)[k] S_k^{(i)} S_k^{(j)},\]

where \(S_k^{(i)}\) is the k-component of the angular momentum operator of spin i.

Examples:

C = np.eye(n, n, 1)  linear n-spin chain
J = (2, 2, 2)        isotropic Heisenberg coupling
J = (2, 2, 0)        XX+YY coupling
J = (0, 0, 2)        Ising ZZ coupling