Hamiltonian

In this section we will go a bit more in detail into the general Hamiltonian for a system in MuSpinSim, each term, and how they are defined and implemented.

The generic Hamiltonian for any MuSpinSim simulation can be written as follows:

\[ \mathcal{H} = \mathcal{H}_Z + \mathcal{H}_{hfine} + \mathcal{H}_{dip} + \mathcal{H}_Q \]

Where:

Let's now look at these more in detail.

For developers: the system Hamiltonian is built by the SpinSystem class, found in muspinsim/spinsys.py. While here we detail the terms in energy units, in practice MuSpinSim internally uses Hamiltonians in frequency units, specifically, MHz. This tends to be a very natural choice of unit for these problems as it coincides with the units used for hyperfine tensors, and keeps the numbers small and manageable, minimising risks of over or underflow. Working in SI units, this would mean that to get them in Joule you'd have to multiply by a factor of \(h\cdot 10^6\) .

Zeeman Hamiltonian

The Zeeman interaction is the interaction of any spin with an external magnetic field. In MuSpinSim this mainly means a strong global field applied to the entire experiment, though it is possible for the user to also set custom local magnetic fields for individual spins (representing for example the effect of nearby paramagnetic nuclei). The Hamiltonian written explicitly is:

\[ \mathcal{H}_Z = 2\pi\hbar\sum_i^N \gamma_i (\mathbf{B}+\mathbf{B}_i)\mathbf{S}_i \]

The sum is intended over all spins, with the gyromagnetic ratios \(\gamma_i\) depending on the nuclei's own properties. The magnetic field here was split in two parts, a global and a local one which bears the index of the spin. Of course, both of these can be zero, and by default are if the user does not specify anything. \(\mathbf{S}_i\) is the vector of spin operators.

For developers: SpinSystem has an add_zeeman_term() method to deal with this term.

Hyperfine Hamiltonian

The hyperfine interaction is often the main interaction we care about in muon spin resonance simulations. It represents an interaction between an electronic spin and a nuclear one (muon or otherwise). While physically it is often distinguished in two terms - a Fermi contact term due to the electronic spin density at the site of the nucleus as well as a dipolar part at a distance - these are effectively both incorporated in a single \(3 \times 3\) symmetric tensor with non-zero trace. The following interaction between spins is written like this:

\[ \mathcal{H}_{hfine} = 2\pi\hbar \sum_{i < j}^N \mathbf{S}_i\mathbf{A}_{ij}\mathbf{S}_j \]

(assuming a hyperfine tensor \(\mathbf{A}_{ij}\) in frequency units). MuSpinSim also makes sure that hyperfine terms can only be defined when one of the two spins is confirmed to be an electron.

For developers: SpinSystem has an add_hyperfine_term() method to deal with this term.

Dipolar Hamiltonian

Dipole-dipole interactions are the result of one spin interacting with the magnetic field generated by a different one. Conceptually, they are not unlike hyperfine interactions. The differences between them are due to the fact that unlike with a muon or nucleus and an electron, both dipoles in this case are considered point-like. This leads to two consequences:

  • there is no Fermi contact term, as the two spins don't overlap; therefore the tensor is traceless;
  • both spins can be approximated as being localised at precise points, which gives a very well defined geometric formula for the interaction tensor between them that only depends on the vector connecting them.

Given two spins \(i\) and \(j\), and a vector connecting them \(\mathbf{r}_{ij}\), the dipolar tensor for them can be computed as:

\[ \mathbf{D}_{ij} = -\frac{\mu_0\hbar \gamma_i \gamma_j}{2|r_{ij}|^3}\left(\frac{3}{|r_{ij}|^2}\mathbf{r}_{ij}\otimes \mathbf{r}_{ij} - \mathbb{1} \right) \]

This will return a tensor in frequency units, and thus the dipolar Hamiltonian can be defined like the hyperfine one:

\[ \mathcal{H}_{dip} = 2\pi\hbar \sum_{i < j}^N \mathbf{S}_i\mathbf{D}_{ij}\mathbf{S}_j \]

Quadrupolar Hamiltonian

Nuclei with spin greater than ½ can possess a quadrupole moment. This can be roughly understood in classical terms as the result of the nuclei's internal charge distribution (due to proton and neutron arrangement) not being perfectly symmetric, and the resulting inhomogeneities in the electrostatic field. Due to having spin 1/2, neither electrons, nor muons, nor protons possess a quadrupole moment. However, some other nuclei (most commonly, \(^{14}N\)) do possess a quadrupole moment. In presence of an electric field gradient (EFG), this affects the energies of their spin levels through quadrupolar self-interaction. This can then indirectly affect the results of a muon experiment when the particle interacts with the quadrupolar nucleus either through dipolar or hyperfine coupling. For this reason, MuSpinSim includes the possibility of simulating quadrupolar interactions as well. The Hamiltonian term for quadrupolar interactions depends mainly on the EFG, which can be written as a \(3 \times 3\) symmetric, traceless tensor:

\[ \mathbf{Z} = \begin{bmatrix} \frac{\partial E_x}{\partial x} & \frac{\partial E_x}{\partial y} & \frac{\partial E_x}{\partial z} \\ \frac{\partial E_y}{\partial x} & \frac{\partial E_y}{\partial y} & \frac{\partial E_y}{\partial z} \\ \frac{\partial E_z}{\partial x} & \frac{\partial E_z}{\partial y} & \frac{\partial E_z}{\partial z} \end{bmatrix} \]

The quadrupolar interaction Hamiltonian is then found as:

\[ \mathcal{H}_Q = \sum_{S_i > 1/2}^N \frac{eQ_i}{2S_i(2S_i-1)}\mathbf{S}_i\mathbf{Z}_i\mathbf{S}_i \]

where \(e\) is the elementary charge, \(Q_i\) the quadrupolar moment of the nucleus (these are tabulated, and MuSpinSim has data for most relevant isotopes of the periodic table) and \(S_i\) the spin of the nucleus.