pyphi.macro.units#

Macro unit value objects (Marshall et al. 2026, Eq. 12).

A macro unit J = (U^J, V^J, tau'_J, g'_J, W^J) is specified by its direct constituents V^J (micro unit indices or meso MacroUnit objects), an update grain tau'_J counted in constituent updates, a state mapping g'_J, and a background apportionment W^J. The micro constituents U^J are derived recursively.

Truth-table indexing convention: the mapping is a flat tuple over the joint sequence-states of the direct constituents. Within an update the first constituent varies fastest (little-endian, matching pyphi’s state convention); updates are ordered oldest first, with newer updates varying slower.

All index arithmetic is mixed-radix, keyed to per-constituent alphabet tuples. Binary alphabets are enforced by validation at both the micro and macro level.

Functions

blackbox(num_constituents, update_grain, ...)

A black-boxing truth table.

coarse_grain(num_constituents, on_counts)

A coarse-graining truth table (update grain 1).

micro_unit(index[, background_apportionment])

An identity macro unit over a single micro unit.

Classes

MacroUnit(constituents, update_grain, mapping)

A macro unit J = (U^J, V^J, tau'_J, g'_J, W^J) (Eq.