Snake Equation Appears on Rick and Morty

A paper with Christopher J. Wood and David G. Cory establishes graphical interoperability among the Liouville, Choi, process-matrix, Kraus, and Stinespring representations of open quantum systems. It also introduced a two-color summation convention. One diagrammatic identity from the paper later appeared in a fictional derivation of snake time travel.

A Rick and Morty classroom scene in which the snake equation and tensor diagrams appear on a blackboard.
Television appearance. The identity typically called the snake equation appears on the blackboard in Rick and Morty, “Rattlestar Ricklactica” (Season 4, Episode 5), as part of a derivation of snake time travel.

From paper to screen

A diagrammatic identity in the episode

The blackboard reproduces a derivation from Tensor Networks and Graphical Calculus for Open Quantum Systems, written with Christopher J. Wood and David G. Cory. The paper first appeared as a preprint in 2011 and was published in Quantum Information & Computation in 2015.

In diagrammatic algebra, an identity typically called the snake equation says that bending a wire one way and then bending it back gives the identity. It is standard in compact-closed graphical calculi and predates the open-systems paper. The episode uses the diagram as part of its visual explanation of snake time travel.

Technical context

A graphical treatment of open-system representations

Open quantum dynamics can be represented in several mathematically equivalent ways. The paper establishes graphical interoperability among the Liouville, Choi, process-matrix, Kraus, and Stinespring representations by expressing them as tensor-network diagrams and transforming between them through graphical operations.

Tensor networks also have an established many-body history through density-matrix renormalization, matrix-product states, and projected entangled-pair states. The paper does not introduce tensor networks or the snake equation. It focuses on how standard open-system representations are related in a particular graphical notation, drawing on earlier tensor-diagram, many-body, and categorical traditions listed below.

  • Liouville superoperator
  • Choi matrix
  • Process matrix
  • Kraus representation
  • Stinespring dilation

Notation used in the paper

The two-color summation convention

The paper introduced a graphical two-color summation convention. Repeated colors take the place of repeated symbolic index labels: matching colors tell the reader which components are summed over a shared basis.

The convention compresses dense tensor expressions into diagrams that can be manipulated directly. In the snake equation shown here, the colored tensors make the contracted indices and successive simplifications visible.

A colored tensor-network derivation showing the snake equation simplifying to a straight identity wire.
The snake equation expressed through the paper’s two-color summation convention.

Related graphical results

Three distinct statements

Expressive completeness. The normal form in Categorical Tensor Network States proves that AND, COPY, and parameterized rank-one tensors are expressively complete: every tensor—or, after reshaping, every vector—in the target space can be represented by a tensor network constructed from them. The construction extends to fixed qudit dimension. Its general form can be exponentially large and need not be efficiently contractible.

Direct construction. Unlike universality arguments that proceed through a quantum gate set, this normal form proves expressive completeness directly by factoring the target state into the tensor generators.

Finite-dimensional graphical circuits and MPS invariants. Categorical Quantum Circuits, with Ville Bergholm, defines a graphical calculus with generalized X/Z and COPY/PLUS structures for finite-dimensional systems, including unequal dimensions. Tensor Network Methods for Invariant Theory, with Bergholm and Marco Lanzagorta, gives a diagrammatic singular-value decomposition for matrix-product states. In its local-unitary invariant calculations, unitary factors cancel and the diagrams reduce to loops containing Schmidt-coefficient tensors, whose evaluations give power sums and Rényi entropies.

The paper

Tensor Networks and Graphical Calculus for Open Quantum Systems

Christopher J. Wood, Jacob D. Biamonte, and David G. Cory

Quantum Information & Computation 15, 759–811 (2015)

Journal article and DOI · Open preprint

Background and related references

Related work from this research program includes J. Biamonte, S. Clark, and D. Jaksch, Categorical Tensor Network States (2011); V. Bergholm and J. Biamonte, Categorical Quantum Circuits (2011); S. J. Denny, J. D. Biamonte, D. Jaksch, and S. R. Clark, Algebraically Contractible Topological Tensor Network States (2012); J. Biamonte, V. Bergholm, and M. Lanzagorta, Tensor Network Methods for Invariant Theory (2013); and J. Biamonte and V. Bergholm, Tensor Networks in a Nutshell (2017).

← All press