Full docs for Geometry

Types

SpinModels.ChainType
Chain(L; spacing=1)

Represents a 1D chain of L spins with regular spacing. Spins are at $x_i = spacing*i$

source
SpinModels.BoxType
Box(N, dims)

Represents a box with side-lengths given by dims. N spins are randomly positioned within that box.

source
SpinModels.NoisyChainType
NoisyChain(L, σ; spacing=1)

Represents a 1D chain of L spins with random noise on top of regular spaced positions. Spins are at $x_i = spacing*i + \delta$ where $\delta \sim \mathcal{U}([-\frac{\sigma}{2},\frac{\sigma}{2}])$

source
SpinModels.PartiallyFilledChainType
PartiallyFilledChain(numspins, numsites; spacing=1)

Represents a 1D chain of L sites where N spins are placed randomly. Sites are spacing units apart.

source
SpinModels.BlockadedType
Blockaded(geometry; retries=1000, blockade=1.0)

Modifies the underlying geometry to respect the blockade condition namely all spins need to be at least blockade units apart. Positions are resampled at most retries times.

Note

If you set retries=0, resampling will not stop until a valid configuration is found.

source
SpinModels.PBCType
PBC(geometry)

Modify the underlying geometry to respect periodic boundary conditions.

source

Functions

SpinModels.nspinsFunction
nspins(term)
nspins(sum_of_terms)

Return the number of spins in the underlying geometry if that information was already provided.

source
nspins(geometry)

Return number of spins the geometry.

source
SpinModels.positionsFunction
positions(geometry)
positions(geometry; rng)

Generate the positions of the spin in the geometry. Disordered geometries allow for setting an RNG.

source
SpinModels.distance_matrixFunction
distance_matrix(geometry[, positions]; rng)

Compute the spin-spin distances. Positions are generated by the geometry via positions or provided directly. Disordered geometries allow for setting an RNG.

source
SpinModels.nearest_neighbor_from_distances!Function
nearest_neighbor_from_distances!(distance_matrix, k=1)

Set all but the k smallest distances from each column to Inf. k only counts different values! Thus k=1 keeps only the closest distance per spin but allows to have the same distance multiple times.

Note

The distance to itself is always ignored.

Note

The resulting matrix won't necessarily be symmetric if nearest neighbors are ill-defined. See also: nearest_neighbor_from_interactions!

source