Wolfram Computation Meets Knowledge

Wolfram Summer School


Bohan Lu

Science and Technology

Class of 2019


Bohan studied physics and mathematics at Washington University in St. Louis. He is currently interested in condensed-matter physics, quantum information, and their application in novel quantum technologies. For his undergraduate thesis, he studied the space of reduced density matrices of translationally invariant quantum states, which inspired him to explore tensor networks, a set of tools that is powerful and has wide applications in both computational condensed-matter physics and machine learning. At the Wolfram Summer School, he is looking forward to implementing relevant ideas with Wolfram technologies and meeting new friends. He enjoys outdoor activities such as climbing and listening to Jazz music.

Computational Essay: Lorenz system

Project: Tensor Visualization


Tensors have wide applications in science and engineering. However, tedious index gymnastics often deter beginners and experienced researchers alike from grasping the physical meaning behind a string of tensors intuitively. The Penrose graphical notation was introduced by Roger Penrose to represent tensors by easily recognizable graphical objects that illustrate key structures at a glance. So far, no simple packages exist in the Wolfram Language to convert tensor calculations to the Penrose graphical notations and vice versa. Thus, the aim of this project is to take tensor objects and their operations in the Wolfram Language and visualize them using Penrose graphical notation. The task is broken into three components: (a) update the current tensor library with co/contravariant tensor functionality; (b) create a package that parses a tensor and outputs an intermediate data structure that can be readily used to draw the graphical notation; and (c) use the symbolic graphics language to draw the diagram, the intermediate data structure of which can be retrieved and used to revert the diagram to tensor format. A possible additional problem that might arise in the reverse direction may involve graph isomorphism problems because the Penrose graphical notation may not be unique and might require a sequence of transformations to turn a given diagram into default graphical standards.

Summary of Results

We have successfully transformed any given polynomial of tensor products into an expression consisting of the original polynomial with the tensors substituted by their graph representations. Each individual tensor with dummy indices is contracted automatically. However, there are a couple of departures from the original project proposal. (a) We did not modify the built-in tensor library to include contravariant and covariant tensor; instead, we stuck with the third-party tensor package xAct. (b) The reversed problem of finding the tensor given a graph representation was not attempted due to time constraints.

Future Work

A tensor can always be written as the sum of a symmetric part and an antisymmetric part. Therefore, it is crucial to also include a feature that indicates whether the tensor is symmetric or antisymmetric under a transposition of any given pair of indices of the tensor. This feature is so far half complete and will be updated on the Wolfram Community post once finished.