pyspinw.subsystems#

Identification of subsystems of a collection of sites and exchanges

Functions

find_components(sites, exchanges)

Find components (maximal disjoint subsystems) of the given system

Classes

Node()

Graph model for depth first search

class pyspinw.subsystems.Node#

Bases: object

Graph model for depth first search

propagate(group) → bool#

Search the graph, only follow if not already visited (self.group>=0)

pyspinw.subsystems.find_components(sites: list[Site], exchanges: list[Exchange]) → list[tuple[list[Site], list[Exchange]]]#

Find components (maximal disjoint subsystems) of the given system

or in other words, group the sites by being coupled to each other.

Important: Assumes that all the sites in the exchanges are in the list of sites