# Migrating to PyPhi 2.0 PyPhi 2.0 is a breaking release. It computes IIT 4.0 (Albantakis et al., 2023; Mayner, Marshall & Tononi, 2026), in which system integrated information includes the system's intrinsic information. IIT 3.0, and IIT 4.0 as published in 2023, remain available for reproducing earlier results. There are no deprecation shims: code written against pre-2.0 PyPhi must be updated to run. The PyPhi MCP server carries a condensed, agent-facing copy of this guide as its `migration` reference topic, so an assistant can port code without this site. This guide documents the changes a pre-2.0 user hits, organized by topic. Each topic is tagged with who it affects: - **[1.x]** — released PyPhi 1.x (the PyPhi-paper / IIT 3.0 era). - **[4.0-branch]** — the IIT 4.0 feature branch. - **[both]** — everyone. - **[rc]** — the 2.0 release candidates (rc1 to rc3). If you are upgrading from one of those, read {ref}`upgrading-from-rc` first: some calls that ran without error under a release candidate now compute different numbers. ## Renames at a glance | Old | New | Affects | | --- | --- | --- | | `pyphi.Network` | `pyphi.Substrate` | [1.x] | | `pyphi.Subsystem(network, state, nodes)` | `pyphi.System(substrate, state, subset=nodes)` | [1.x] | | `network.tpm` (an array) | `substrate.tpm` (a `FactoredTPM`; `np.asarray(substrate.tpm)` gives the state-by-node array when every unit is binary) | [1.x] | | `pyphi.compute.*` | `pyphi.analyze(...)` | [1.x] | | `subsystem.cause_tpm`, `proper_cause_tpm` | `system.cause_marginal`, `proper_cause_marginal` | [4.0-branch] | | `subsystem.effect_tpm`, `proper_effect_tpm` | `system.effect_marginal`, `proper_effect_marginal` | [4.0-branch] | | `subsystem.cut` | `system.partition` | [1.x] | | `pyphi.jsonify` | `pyphi.serialize` / `pyphi.save` / `pyphi.load` | [both] | | `pyphi.config.IIT_VERSION` | `pyphi.config.formalism.iit.version` | [both] | | `pyphi.models.Concept` | `pyphi.models.Distinction` | [1.x] | | `pyphi.models.CauseEffectStructure`, the concepts | `pyphi.models.Distinctions` | [1.x] | | `PhiStructure` | `pyphi.models.CauseEffectStructure` | [4.0-branch] | | `subsystem.null_concept` | `system.null_distinction` | [1.x] | | `subsystem.apply_cut(cut)`, `transition.apply_cut(cut)` | `system.apply_partition(partition)`, `transition.apply_partition(partition)` | [1.x] | | `pyphi.actual.events(network, previous_state, current_state, next_state, nodes)`; `indices=` on `true_events` and `extrinsic_events` | `pyphi.actual.events(substrate, previous_state, current_state, next_state, subset=nodes)`; `subset=` on all three | [1.x] | | `pyphi.convert.b2l`, `l2b`, `l2s`, `b2s`, `s2l`, `s2b` | `be2le`, `le2be`, `le_index2state`, `be_index2state`, `state2le_index`, `state2be_index` | [1.x] | | `pyphi.convert.b2l_sbs`, `l2b_sbs` | `be2le_state_by_state`, `le2be_state_by_state` | [1.x] | | `pyphi.convert.to_md`, `to_2d` | `to_multidimensional`, `to_2dimensional` | [1.x] | | `pyphi.convert.sbn2sbs`, `sbs2sbn` | `state_by_node2state_by_state`, `state_by_state2state_by_node` | [1.x] | | `pyphi.new_big_phi` | `pyphi.formalism.iit4` (`sia`, `ces`) | [4.0-branch] | | `pyphi.network_generator` | `pyphi.substrate_generator` | [4.0-branch] | | `pyphi.metrics` | `pyphi.measures` | [4.0-branch] | | `ria.purview_state`, `mice.purview_state` (the current state of the purview units) | `ria.current_state`, `mice.current_state`; the state a mechanism specifies is `mice.specified_state.state` | [4.0-branch] | | `state_specification.intrinsic_information` | `state_specification.intrinsic_specification`. `sia.intrinsic_information` is a different quantity, ii(s), and keeps its name | [4.0-branch] | | `subsystem.intrinsic_information(direction, mechanism, purview, ...)` | `system.intrinsic_specification(direction, mechanism, purview, ...)` | [4.0-branch] | | `pyphi.models.SystemIrreducibilityAnalysis` | `pyphi.formalism.iit4.SystemIrreducibilityAnalysis` (IIT 4.0) or `pyphi.models.IIT3SystemIrreducibilityAnalysis` (IIT 3.0) | [1.x] | | `pyphi.models.Bipartition`, `Tripartition`, `KPartition` | `JointBipartition`, `JointTripartition`, `JointPartition` | [1.x] | | `pyphi.models.KCut`, `pyphi.models.ActualCut` | `DirectedJointPartition(direction, partition)`, `DirectedBipartition` (applied with `Transition(..., partition=)` or `transition.apply_partition`) | [1.x] | Most removed names, used as an attribute, raise an `AttributeError` that gives the replacement: `pyphi.Network` and the other 1.x names in this table, `pyphi.distance` and `pyphi.utils.eq`, the IIT 4.0 branch's `cause_tpm`, `effect_tpm` (and their `proper_` forms) and `PhiStructure`, and every renamed example function, including the release candidates' unprefixed 2014 names such as `fig4_substrate()`. Importing one, as in `from pyphi import Network`, raises a plain `ImportError` instead, because Python's import statement drops that message; look the name up in the table above. A few names give no replacement and raise a plain `AttributeError` (or a plain `ImportError` when imported): the `pyphi.tpm` module, the IIT 4.0 branch's `pyphi.new_big_phi`, `pyphi.network_generator` and `pyphi.metrics`, `purview_state` and `intrinsic_information` on a result or a system, and most names that existed only in a release candidate (see the last section). The name `CauseEffectStructure` now means a different object. In 1.x it was the list of concepts, which 2.0 calls `Distinctions`; in 2.0 it is the distinctions together with their relations and the system irreducibility analysis. An unported import of `CauseEffectStructure` therefore still succeeds, but gives the newer object. `cause_marginal` and `effect_marginal` (with the `proper_cause_marginal` / `proper_effect_marginal` variants) replace the IIT 4.0 branch's `cause_tpm` and `effect_tpm`; released 1.x had neither. They hold the cause and effect TPMs of IIT 4.0, š’Æ_c and š’Æ_e (Albantakis et al., 2023, Eqs. 3–4), with the background causally marginalized conditional on the current state: held at its current state for effects, and with its past states weighted by their probability given the current state for causes. `effect_marginal` is a factored transition matrix and `cause_marginal` a mapping of per-unit cause factors. See [Substrate and system](../theory/substrate-and-system.md) for what they are. ### Example networks The example functions follow the same vocabulary: every `*_network` is now `*_substrate` and every `*_subsystem` is `*_system`. Transitions and bare matrices (`prevention_transition`, `cond_depend_tpm`, `cond_independ_tpm`, `differentiation_*_tpm`) keep their names. The networks from the 2014 IIT 3.0 paper (Oizumi et al., 2014) carry the prefix `iit3_2014_`, as the later papers' networks carry theirs. In the 2.0 release candidates they had no prefix (`fig4_substrate()`). Every old name in this table raises an `AttributeError` that gives the new one. | Old | New | | --- | --- | | `examples.basic_network()` | `examples.basic_substrate()` | | `examples.basic_subsystem()` | `examples.basic_system()` | | `examples.basic_noisy_selfloop_network()` / `_subsystem()` | `examples.basic_noisy_selfloop_substrate()` / `_system()` | | `examples.grid3_network()` / `_subsystem()` | `examples.grid3_substrate()` / `_system()` | | `examples.residue_network()` / `_subsystem()` | `examples.residue_substrate()` / `_system()` | | `examples.xor_network()` / `_subsystem()` | `examples.xor_substrate()` / `_system()` | | `examples.rule110_network()` / `_subsystem()` | `examples.rule110_substrate()` / `_system()` | | `examples.rule154_network()` / `_subsystem()` | `examples.rule154_substrate()` / `_system()` | | `examples.macro_network()` / `_subsystem()` | `examples.macro_substrate()` / `_system()` | | `examples.blackbox_network()` | `examples.blackbox_substrate()` | | `examples.propagation_delay_network()` | `examples.propagation_delay_substrate()` | | `examples.fig1a()`, `fig3a()`, `fig3b()`, `fig16()` [1.x]; `fig1a_network()` and the like [4.0-branch] | `examples.iit3_2014_fig1a_substrate()`, `iit3_2014_fig3a_substrate()`, `iit3_2014_fig3b_substrate()`, `iit3_2014_fig16_substrate()` | | `examples.fig4()`, `fig5a()`, `fig5b()` [1.x]; `fig4_network()` / `_subsystem()` [4.0-branch] | `examples.iit3_2014_fig4_substrate()` / `iit3_2014_fig4_system()`, `iit3_2014_fig5a_*`, `iit3_2014_fig5b_*` | | `examples.fig6()`, `fig8()`, `fig9()`, `fig10()` (the Figure 4 network), `fig14()` (the Figure 1A network) [1.x] | `examples.iit3_2014_fig6_substrate()`, `iit3_2014_fig8_substrate()`, `iit3_2014_fig9_substrate()`, `iit3_2014_fig10_substrate()`, `iit3_2014_fig14_substrate()` | | `examples.actual_causation()` [1.x]; `actual_causation_network()` [4.0-branch] | `examples.actual_causation_substrate()` | | `examples.prevention()` [1.x] | `examples.prevention_transition()` | | `examples.disjunction_conjunction_network()` | `examples.disjunction_conjunction_substrate()` | | `examples.frog_example()` | `examples.frog_substrate()` and `examples.frog_transition()` | | `examples.differentiation_micro_1_subsystem()` | `examples.differentiation_micro_1_system()` | `iit3_2014_fig5b_substrate()` follows Figure 5B of the 2014 paper, in which unit B is AND(A, C); the 1.x `fig5b()` network computed OR(A, C), so its results differ. The IIT 4.0 paper's networks are new in 2.0 (`iit4_2023_fig1a_substrate()` and the other `iit4_2023_*`, `marshall_2023_*`, and `mayner_2026_*` functions); the {doc}`examples gallery ` lists every registered example. ### Configuration options Every 1.x option and where it went. Names are lowercase and belong to a layer. Read one with `pyphi.config..