Functions for computing subsystem-level properties.

class pyphi.compute.subsystem.ComputeCauseEffectStructure(iterable, *context)

Engine for computing a CauseEffectStructure.

description = 'Computing concepts'
static compute(mechanism, subsystem, purviews, cause_purviews, effect_purviews)

Compute a Concept for a mechanism, in this Subsystem with the provided purviews.

process_result(new_concept, concepts)

Save all concepts with non-zero \(\varphi\) to the CauseEffectStructure.

pyphi.compute.subsystem.ces(subsystem, mechanisms=False, purviews=False, cause_purviews=False, effect_purviews=False, parallel=False)

Return the conceptual structure of this subsystem, optionally restricted to concepts with the mechanisms and purviews given in keyword arguments.

If you don’t need the full CauseEffectStructure, restricting the possible mechanisms and purviews can make this function much faster.


subsystem (Subsystem) – The subsystem for which to determine the CauseEffectStructure.

Keyword Arguments:
  • mechanisms (tuple[tuple[int]]) – Restrict possible mechanisms to those in this list.
  • purviews (tuple[tuple[int]]) – Same as in concept().
  • cause_purviews (tuple[tuple[int]]) – Same as in concept().
  • effect_purviews (tuple[tuple[int]]) – Same as in concept().
  • parallel (bool) – Whether to compute concepts in parallel. If True, overrides config.PARALLEL_CONCEPT_EVALUATION.

A tuple of every Concept in the cause-effect structure.

Return type:



Return the conceptual information for a Subsystem.

This is the distance from the subsystem’s CauseEffectStructure to the null concept.

pyphi.compute.subsystem.evaluate_cut(uncut_subsystem, cut, unpartitioned_ces)

Compute the system irreducibility for a given cut.

  • uncut_subsystem (Subsystem) – The subsystem without the cut applied.
  • cut (Cut) – The cut to evaluate.
  • unpartitioned_ces (CauseEffectStructure) – The cause-effect structure of the uncut subsystem.

The SystemIrreducibilityAnalysis for that cut.

Return type:


class pyphi.compute.subsystem.ComputeSystemIrreducibility(iterable, *context)

Computation engine for system-level irreducibility.

description = 'Evaluating Φ cuts'
empty_result(subsystem, ces)

Begin with a SystemIrreducibilityAnalysis with infinite \(\Phi\); all actual SIAs will have less.

static compute(cut, subsystem, ces)

Evaluate a cut.

process_result(new_sia, min_sia)

Check if the new SIA has smaller \(\Phi\) than the standing result.


Return all \(\Phi\) cuts for the given nodes.

This value changes based on config.CUT_ONE_APPROXIMATION.

Parameters:nodes (tuple[int]) – The node indices to partition.
Returns:All unidirectional partitions.
Return type:list[Cut]
pyphi.compute.subsystem.sia(cache_key, subsystem)

Return the minimal information partition of a subsystem.

Parameters:subsystem (Subsystem) – The candidate set of nodes.
Returns:A nested structure containing all the data from the intermediate calculations. The top level contains the basic irreducibility information for the given subsystem.
Return type:SystemIrreducibilityAnalysis

Return the \(\Phi\) value of a subsystem.

class pyphi.compute.subsystem.ConceptStyleSystem(subsystem, direction, cut=None)

A functional replacement for Subsystem implementing concept-style system cuts.


Pass attribute access through to the basic subsystem.

concept(mechanism, purviews=False, cause_purviews=False, effect_purviews=False)

Compute a concept, using the appropriate system for each side of the cut.

pyphi.compute.subsystem.concept_cuts(direction, node_indices)

Generator over all concept-syle cuts for these nodes.

pyphi.compute.subsystem.directional_sia(subsystem, direction, ces=None)

Calculate a concept-style SystemIrreducibilityAnalysisCause or SystemIrreducibilityAnalysisEffect.

class pyphi.compute.subsystem.SystemIrreducibilityAnalysisConceptStyle(sia_cause, sia_effect)

Represents a SystemIrreducibilityAnalysis computed using concept-style system cuts.


Pass attribute access through to the minimal SIA.

unorderable_unless_eq = ['network']

Compute a concept-style SystemIrreducibilityAnalysis