Skip to content

English · Español · Français · Deutsch · 中文 · 日本語 · Русский

Tutorial: torch_vn_algebra in the context of the lecture notes

This tutorial shows how to compute with the finite-dimensional von Neumann algebras \(\bigoplus_cM_{k_c}(\mathbb C)\) — block-diagonal matrices with symmetry sectors — in the PyTorch library torch_vn_algebra, on CPU and GPU, in the context of the lecture notes: random matrices and Haar-random unitaries, quantum states, channels and entropies, Schrödinger and Lindblad dynamics, spin chains and exact diagonalisation in symmetry sectors, Wedderburn decompositions of group representations, quantum error correction, equivariant layers and Jordan algebras. Each tutorial accompanies the chapter of the lecture notes with the same number: it shows the library code for the results proved there, checks the code against an exact result (a theorem, a closed formula or an independent computation), and names, in a section What to compare with, the standard tools for the same task. Each section starts with a line Lecture notes: that links to the section and the results it uses. Numbers that are only computed (for instance large-\(n\) level statistics) are labelled numerical observation and are never used as premises or test targets. Besides the prerequisites of the lecture notes, the tutorial assumes Python.

All code in the tutorial is executed by the test suite (tests/test_man.py), so every example works with the current version of the library.

How to run the code

pip install -e .                # from the root of the repository
python -m pytest tests/test_man.py -q

Every code block of a chapter can be pasted, in order, into one Python session or a Jupyter notebook. The blocks of one chapter share their variables.

Contents

chapter main results
0 What this course is about the algebra as a data type: block structure = batched tensors; cost; what exists and what is new
1 Matrix algebras and functional calculus spectral theorem, functional calculus, polar decomposition, trace-norm duality, a GUE moment
2 Finite-dimensional von Neumann algebras double commutant theorem, structure theorem, centre, symmetry groups and commutants, conditional expectations
3 Traces, states and entropy classification of traces, densities, entropy of sectors, Klein's inequality, monotonicity under the conditional expectation onto the centre, Michelson contrast
4 Symmetries and representations Schur's lemma, charge sectors, \(U(1)\) and \(SU(2)\), spin systems, real, complex and quaternionic type
5 Random matrices in an algebra Haar measure on \(\prod_cU(k_c)\), Weingarten calculus, level statistics and why sectors must not be mixed
6 Quantum channels Kraus and Stinespring, duals with respect to a trace, maps between sectors, decoherence
7 Tensor products and entanglement partial trace, Page's formula, fusion of charges
8 Dynamics Schrödinger and Lindblad equations, jumps between sectors, post-selection
9 Spin chains sectors of magnetisation and momentum, Lanczos, Bethe ansatz checks, disorder
10 Quantum computing decoherence-free subspaces, operator-algebra error correction, constrained mixers
11 Optimisation and trace inequalities constrained parametrisations, sampling versus optimisation
12 Equivariant machine learning equivariant layers as commutants
13 Jordan algebras: why quantum mechanics uses *-algebras Jordan product and quadratic representation, spin factors and the Lorentz cone, the Jordan–von Neumann–Wigner classification, the transpose and the partial transpose, a trace inequality in Jordan form
A Facts from analysis and probability power series and null sets, Gaussian vectors, spherical measures, eigenvalue inequalities, Isserlis–Wick
B Schur–Weyl duality and the Weingarten calculus Schur–Weyl duality, Weingarten functions, Wigner–Eckart theorem, Haar measure on \(O(k)\)
C Eigenvalue densities and Page's formula Weyl integration formula, GOE/GUE, Wishart and induced densities, Page's formula
D Generators of quantum dynamical semigroups the GKSL theorem, generators on direct sums, Frigerio's theorem, Bény–Kempf–Kribs
E Classification of Euclidean Jordan algebras Peirce decomposition, Hurwitz and Frobenius theorems, coordinatisation, the Albert algebra, the Jordan–von Neumann–Wigner theorem
F Symmetric cones, order isomorphisms and Jordan maps cones of squares, the Koecher–Vinberg theorem, Kadison's theorem, Jordan automorphisms of \(\bigoplus_cM_{k_c}\)

The mathematics — definitions, theorems and complete proofs — is in the lecture notes, together with the prerequisites, further reading and the companion paper of the library.