colder.models package

lattice tool module

colder.models.lattice.convert_array_to_target_list(arr: array) List[tuple][source]
colder.models.lattice.make_unique_permutations(sites: List[tuple]) List[tuple][source]
class colder.models.lattice.lattice[source]

Bases: object

Mother class for any lattice class. Defines the core methods to be inherited by the other classes.

__init__() None[source]

Shall be defined specifically for each ineriting class.

invert(interactions: List[Tuple]) List[Tuple][source]

Inverts list of interaction terms.

Parameters:

interactions (List[Tuple]) – List of tuples to invert.

Returns:

List of inverted interactions.

Return type:

List[Tuple]

add_invert(interactions: List[Tuple]) List[Tuple][source]

Return interaction terms and their inversion.

Parameters:

interactions (List[Tuple]) – List of tuples to invert.

Returns:

List of interactions.

Return type:

List[Tuple]

class colder.models.lattice.chain(nspin: int, periodic=False)[source]

Bases: lattice

1D chain lattice model.

single_site

single site indices

nearest_neighbor

nearest neighbor interactions

next_nearest_neighbor

next nearest neighbor interactions

annni

return both nearest and next nearest neighbor indices

full_connected

pairwise interactions of a fully connected model

three_neighbor

build interactions with 3 adjacent spins

__init__(nspin: int, periodic=False) None[source]

Initialize a 1D chain with nspin spins.

Parameters:
  • nspin (int) – Number of spins.

  • periodic (bool, optional) – If True, periodic conditions are assumed at boundary. Defaults to False.

class colder.models.lattice.square(shape: tuple)[source]

Bases: lattice

2D square lattice model.

single_site

single site indices

nearest_neighbor

nearest neighbor interactions

next_nearest_neighbor

next nearest neighbor interactions

annni

return both nearest and next nearest neighbor indices

full_connected

pairwise interactions of a fully connected model

__init__(shape: tuple) None[source]

Initialize a 2D square lattice with nspin spins.

Parameters:
  • nspin (int) – Number of spins.

  • periodic (bool, optional) – If True, periodic conditions are assumed at boundary. Defaults to False.