pyphi.automorphism#

Behavior-aware substrate canonicalization.

A substrate’s identity is its connectivity, its per-node TPM, and its per-node alphabet sizes. A node permutation is a substrate automorphism only when it preserves all three – so a node implementing one mechanism is never identified with a node implementing a different one, even when their wiring is identical.

Canonicalization is exact: the automorphism group and canonical form are found by enumerating node permutations, which is factorial in the number of nodes.

Functions

are_structures_isomorphic(ces1, ces2)

Whether two cause-effect structures are equal up to a bijection of their node indices, at the resolution of structure_signature().

are_substrates_isomorphic(s1, s2)

Whether some node permutation maps s1's connectivity, TPM, and alphabet sizes onto s2's.

canonical_state(substrate, state)

Map state into canonical coordinates, reduced over the automorphism orbit.

structure_signature(ces[, mapping])

A canonical, order-independent value key for a cause-effect structure under a node-index mapping.

substrate_automorphisms(substrate)

All node permutations preserving connectivity, TPM, and alphabet sizes.

substrate_canonical_form(substrate)

Return (canonical_substrate, canonical_permutation).