Coupling matrices

The task of creating a coupling matrix is divided into two parts:

  1. The Geometry describes how many spins in what spatial configuration there are
  2. The Interaction knows how to translate the positions into coupling strengths

So generally you want to first build up the desired geometry and then apply the correct interaction to that. Of course you can always directly provide a coupling matrix if these standards do not cover your needs. Just keep in mind the index order.

Geometry

There are several simple base geometries: Chain, NoisyChain and Box. The latter two don't admit to fixed positions and instead draw them randomly each time positions is called on them.

Then there are several modifiers, you can apply:

  • PBC to enforce periodic boundary conditions. This basically changes how distances are computed within the geometry.
  • Blockaded to enforce a minimal distance between spins. This only makes sense to apply to disordered geometries.
  • NN to only keep nearest neighbour distances.

You may use function like positions, distance_matrix and nearest_neighbor_from_distances on geometry objects.

Interaction

The next step is to define the desired interaction type. Currently implemented are ConstantInteraction and PowerLaw. You can also modify these to be nearest-neighbor only with NN. There are quality of life overloads, that removes the need to use ConstantInteraction(1)(geometry) such that you can simply use the geometry like an interaction matrix in most scenarios. Please complain if this produces unintuitive behavior.

Once you have defined your desired geometry and interaction you can get the final interaction matrix via interaction_matrix (or equivalently by calling the interaction object with the geometry).