Interaction

class Interaction(spin1, spin2, tensor=None)

Represent an interaction between two spins. By appropriately setting the tensor components, this class can model various types of spin interactions, such as:

  • The hyperfine interaction between an electron and a nuclear spin.

  • The dipole-dipole interaction between two nuclear spins.

Initialize an interaction.

Parameters:
  • spin1 (Spin) – First spin.

  • spin2 (Spin) – Second spin.

  • tensor (array | None) – Interaction coefficients (in \(\text{MHz}\), defaults to zero tensor).

Hint

Interaction tensor can be set at initialization:

interaction = Interaction(spin1, spin2, tensor=[[0,0,0.003],[0,0,0],[0.003,0,0.213154]])

Or coefficients can be set one-by-one:

interaction = Interaction(spin1, spin2)
interaction.zz = 0.213154
interaction.xz = 0.003
interaction.zx = 0.003

Attributes

spin1

First spin.

spin2

Second spin.

tensor

Full tensor representing the interaction.

xx

The \(xx\) components of the interaction.

xy

The \(xy\) components of the interaction.

xz

The \(xz\) components of the interaction.

yx

The \(yx\) components of the interaction.

yy

The \(yy\) components of the interaction.

yz

The \(yz\) components of the interaction.

zx

The \(zx\) components of the interaction.

zy

The \(zy\) components of the interaction.

zz

The \(zz\) components of the interaction.