One tensor contraction, three mathematical universes

Plain-language explainer for doi:10.5281/zenodo.21158951 (#477)


The central idea in one sentence

The Maslov-Gibbs Einsum — a generalised tensor contraction at the heart of the TRS framework — exists in three distinct forms corresponding to classical optimisation ($H^0$), probabilistic simulation ($H^1$), and genuinely quantum computation ($H^2$), and moving between them is controlled by a single deformation parameter $\beta$.


Why one contraction rule is not enough

A tensor contraction is, at its core, a recipe for combining arrays of numbers. Einstein’s summation convention — repeated indices mean sum — is the simplest version. Write two matrices $A_{ij}$ and $B_{jk}$, contract over $j$, and you get matrix multiplication. The whole of linear algebra, quantum mechanics, and machine learning reduces to variations on this theme.

The Maslov-Gibbs Einsum (MGE) is a contraction rule built for physics across different levels of complexity. The puzzle it solves: a classical logistics problem (find the cheapest route through a network), a quantum simulation problem (compute the partition function of a spin system), and a topological physics problem (track phases acquired when quantum particles braid around each other) all look like tensor contractions — but they are not the same contraction. They use different arithmetic.

This paper identifies exactly three distinct MGE forms, explains why there are three (not two, not four), and shows they are all deformations of each other as $\beta$ varies.


The three forms

$H^0$-MGE: the tropical form. Replace ordinary addition with $\min$ (or $\max$) and replace ordinary multiplication with $+$. The result is the min-plus semiring, also called tropical arithmetic. A tensor contraction over this semiring finds the shortest path through a network — it is addition replaced by minimisation. Computationally this is the easiest tier: shortest-path algorithms run in polynomial time, so $H^0$-MGE lies in the complexity class P.

This is also the $\beta \to 0$ limit of the Gibbs distribution. As temperature rises without bound ($\beta = 1/k_BT \to 0$), a Boltzmann distribution spreads uniformly across all states and the free energy approaches the ground-state energy — the minimum over all configurations. Tropical arithmetic is the residue of quantum mechanics after all thermal fluctuations have been ironed flat.

$H^1$-MGE: the Clifford form. Work at $\beta = 1$ (unit inverse temperature, in natural units where quantum and thermal effects are balanced). Contractions run over the stabiliser calculus: a structured subset of quantum operations generated by Pauli matrices and their products. The Gottesman-Knill theorem guarantees that any computation in this calculus can be efficiently simulated on a classical computer — the complexity class is BPP (bounded-error probabilistic polynomial time). No quantum advantage here, but also no exponential classical overhead.

The $H^1$ form appears in quantum error correction (stabiliser codes), in quantum information theory (Clifford circuits), and — perhaps surprisingly — in the theory of Gibbs states at finite temperature, where the density matrix has exactly the form of an $H^1$ contraction.

$H^2$-MGE: the metaplectic form. Contract over the metaplectic group $\text{Mp}(2n,\mathbb{R})$ — the double cover of the symplectic group — and attach a phase correction $e^{i\pi\mu/2}$ to each amplitude, where $\mu$ is the Maslov index.

The Maslov index is a topological integer that counts how many times a Lagrangian submanifold (loosely: a surface in phase space on which a quantum system’s semiclassical evolution lives) passes through a degenerate configuration — a caustic, the quantum-mechanical analogue of a focal point in optics. Each such crossing contributes a phase of $e^{i\pi/2} = i$. Miss these crossings and the WKB approximation is wrong. Include them and it becomes exact at one loop.

The $H^2$ form cannot be classically simulated efficiently; it lies outside BPP and is the regime of genuine quantum advantage. It is the contraction you need to compute interference effects, Berry phases, and the holonomies that underpin topological quantum computing.


The $\beta$-deformation connecting all three

The three forms are not separate objects — they are points along a continuous family. The deformation parameter $\beta$ (physically: inverse temperature) interpolates smoothly:

\[H^0 \xleftarrow{\beta \to 0} H^1 \xleftarrow{\beta \to 0} H^2 \quad \text{as } \beta \text{ decreases from } 1 \text{ to } 0\]

At $\beta = 1$: full quantum Clifford arithmetic ($H^1$). As $\beta \to 0$: quantum fluctuations freeze out and the contraction dequantises to tropical arithmetic ($H^0$). Adding topological corrections — the Maslov index terms — lifts $H^1$ to $H^2$.

The “snap” — a phase transition at a critical $\beta^$ — marks the boundary where the computation crosses between regimes. Below $\beta^$, classical simulation is adequate. Above it, genuine quantum effects enter and only the $H^2$ form captures the correct answer.


Two connections worth knowing

Penrose’s empire. Section 1.1 of the paper draws an analogy to Penrose tilings: an aperiodic tiling of the plane that has no local defects but cannot be periodically extended. The $H^2$-MGE is the “empire” — the global topological obstruction that local ($H^0$ or $H^1$) checks cannot detect. The Maslov index is the integer that witnesses the obstruction.

The $H^3$ frontier. Section 7.1 notes that a fourth form — $H^3$-MGE, contracting over the octonion associator — exists in principle. It would correspond to non-associative quantum arithmetic, relevant to f-shell atomic physics and the G$_2$ wall seen in the spectroscopy series. Whether $H^3$ admits efficient algorithms or lies in a still-harder complexity class is open.


The big picture

The MGE framework unifies three historically separate ideas — tropical geometry (operations research), the stabiliser formalism (quantum computing), and the metaplectic/WKB correspondence (semiclassical physics) — as three levels of a single algebraic structure. The complexity gap between the levels ($\text{P} \subset \text{BPP} \subset$ beyond-BPP) is not accidental: it reflects the topological information content of each level, measured by the Maslov index $\mu$.

Knowing which form a computation requires determines whether it can be offloaded to classical hardware, run on near-term quantum devices, or fundamentally requires topological quantum resources. That classification is the paper’s central output.


See also: The H$^k$ Complexity Ladder — the complexity-theoretic consequences of the three-level structure; Cohomological Obstruction Theory for Derivatives Pricing — the same $H^0/H^1/H^2$ classification applied to financial markets