\documentclass[11pt]{amsart} \usepackage{amssymb,amsmath} \usepackage[dvipsnames]{xcolor} \usepackage{tikz,float} \usetikzlibrary{calc,arrows.meta,shapes.geometric,decorations.pathmorphing} \definecolor{qblue}{HTML}{24576C} \definecolor{qgold}{HTML}{BE771E} \usepackage[colorlinks=true,linkcolor=magenta,citecolor=magenta,urlcolor=magenta]{hyperref} \setlength{\textwidth}{6.1in}\setlength{\oddsidemargin}{0.2in}\setlength{\evensidemargin}{0.2in} \setlength{\textheight}{8.7in}\setlength{\topmargin}{-0.1in} \setlength{\unitlength}{1mm} \setlength{\belowcaptionskip}{12pt}\addtolength{\belowcaptionskip}{-2mm} \makeatletter \let\oldmakecaption\@makecaption \long\def\@makecaption#1#2{\vskip2mm\oldmakecaption{#1}{#2}} \def\indentlabel#1{\sbox\z@{#1}\ifdim\wd\z@>\z@\hbox to\@tempdima{\unhbox\z@\hss}\fi} \makeatother \newtheorem{theorem}{Theorem}[section] \newtheorem{proposition}[theorem]{Proposition} \newtheorem{lemma}[theorem]{Lemma} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{definition}[theorem]{Definition} \newtheorem{question}[theorem]{Question} \newtheorem{example}[theorem]{Example} \theoremstyle{remark} \newtheorem{remark}[theorem]{Remark} \theoremstyle{plain} \newtheorem*{maindefinition}{Definition} \newtheorem*{mainexample}{Example} \begin{document} \title{A brief initiation to quantum graphs} \author{T. Banica and Opus 5.5} \date{} \begin{abstract} We develop graph theory over the finite quantum spaces, with the quantum graphs being defined in the simplest possible way, as corresponding to arbitrary adjacency matrices over the quantum space of vertices. We discuss the basic theory, the quantum symmetries, the products and the Cayley graphs, then walks, the Laplacian and connectivity, trees and cycles, spectral theory, colorings and independence, planarity, extremal questions and random graphs, and flows, networks and random walks. \end{abstract} \maketitle \setcounter{tocdepth}{1} \tableofcontents \section*{Introduction} A finite graph $X$ with vertex set $\{1,\ldots,N\}$ is the same as its adjacency matrix $d\in M_N(0,1)$, and a colored, oriented graph, with loops allowed, is the same as an arbitrary matrix $d\in M_N(\mathbb C)$. In this paper we replace the vertex set by a finite quantum space $V$, coming from a finite dimensional $C^*$-algebra, as follows: $$C(V)=M_{n_1}(\mathbb C)\oplus\ldots\oplus M_{n_k}(\mathbb C)$$ We keep everything else as simple as possible, and our definition is as follows: \begin{maindefinition} A quantum graph is a pair $X=(V,d)$, with $V$ a finite quantum space, and with $d\in M_N(\mathbb C)$ an arbitrary matrix, where $N=\dim C(V)$, regarded as a linear map $d:C(V)\to C(V)$, in the multimatrix basis of $C(V)$. \end{maindefinition} No axioms are imposed on $d$. The usual conditions, namely undirected, real, without loops, simple, become conditions on $d$ that can be imposed or not, depending on the problem, and are formulated in terms of 4 basic operations, the composition, the adjoint, the Hadamard product $\circ$, and the operation $\#$, discussed in section 2. This definition, folklore since the 2002 paper \cite{ba2} on the quantum symmetries of Fuss-Catalan subfactors, appears explicitly in the work of Fima and Pittau \cite{fpi} on the free wreath products, where a finite quantum graph is a triple $(B,\psi,d)$, with $B$ a finite dimensional $C^*$-algebra, $\psi$ a faithful state, and $d$ arbitrary, but it is not the one which is mostly used in the recent literature. Quantum graphs in various forms go back to Vergnioux \cite{ver}, with his quantum Cayley graphs of the discrete quantum groups, and to Duan, Severini and Winter \cite{dsw}, Kuperberg and Weaver \cite{kwe}, \cite{wea}, and to Musto, Reutter and Verdon \cite{mrv}, where a quantum graph is a quantum adjacency matrix, which is an idempotent for the Hadamard product, with extra axioms, and with many equivalent formulations, see Daws \cite{daw}. In this paper we take a different point of view, and keep $d$ arbitrary, the various axioms being conditions which can be imposed when needed. At the level of quantum symmetries, our quantum graphs and the finite families of uncolored ones give the same quantum groups, as explained in section 3. But at the level of everything else, walks, spectra, Laplacians, random walks, networks, the arbitrary matrices $d$ are the natural objects, exactly as the weighted graphs are the natural objects in classical spectral graph theory \cite{bhe}, \cite{chu}, and in physics, where graphs appear as hopping Hamiltonians, transfer matrices and lattice Laplacians. But perhaps, before everything, most illustrating would be an example. \begin{mainexample} Consider the space $V=M_2$, whose multimatrix basis consists of the $4$ matrix units $e_{11},e_{12},e_{21},e_{22}$, and the quantum graph $X=(M_2,d)$ given by $$d(x)=UxU+\Lambda x\Lambda\quad,\quad U=\begin{pmatrix}0&1\\1&0\end{pmatrix}\quad,\quad\Lambda=\begin{pmatrix}1&0\\0&-1\end{pmatrix}$$ In the basis $e_{11},e_{12},e_{21},e_{22}$ the matrix of $d$, and the picture of $X$, are as follows, $$d=\begin{pmatrix}1&0&0&1\\0&-1&1&0\\0&1&-1&0\\1&0&0&1\end{pmatrix}\qquad\qquad\begin{tikzpicture}[baseline=(current bounding box.center),font=\scriptsize,>={Stealth[length=1.8mm]}] \draw[qblue,line width=1pt] (0,1.4)--(1.4,0); \draw[qblue,line width=1pt] (1.4,1.4)--(0,0); \draw[qgold,line width=.9pt] (0,1.4) .. controls +(40:0.95) and +(140:0.95) .. (0,1.4); \node[text=qgold!80!black] at (0.00,2.28) {$1$}; \draw[qgold,line width=.9pt] (1.4,1.4) .. controls +(40:0.95) and +(140:0.95) .. (1.4,1.4); \node[text=qgold!80!black] at (1.40,2.28) {$-1$}; \draw[qgold,line width=.9pt] (0,0) .. controls +(220:0.95) and +(320:0.95) .. (0,0); \node[text=qgold!80!black] at (-0.00,-0.88) {$-1$}; \draw[qgold,line width=.9pt] (1.4,0) .. controls +(220:0.95) and +(320:0.95) .. (1.4,0); \node[text=qgold!80!black] at (1.40,-0.88) {$1$}; \fill[black!75] (0,1.4) circle[radius=2.3pt]; \fill[black!75] (1.4,1.4) circle[radius=2.3pt]; \fill[black!75] (0,0) circle[radius=2.3pt]; \fill[black!75] (1.4,0) circle[radius=2.3pt]; \end{tikzpicture}$$ with the loops colored by $\pm1$, and the edges colored by $1$. \end{mainexample} This looks like a graph with loops. However, $X$ has no loops, in the quantum sense explained in section 2, namely $d\circ1=0$. In fact, $X$ is simple, real, undirected, regular of valence 2, connected, and its spectrum is $\{2,0,0,-2\}$, the spectrum of the square. Thus $X$ is a quantum version of the square, and more precisely, this is the Weyl-Cayley graph over $M_2$ coming from the generators $(1,0),(0,1)$ of $\mathbb Z_2^2$, see section 4. Historically, the quantum graphs in our sense go back to \cite{ba2}, and come from subfactor theory. Jones' index theory \cite{jon} showed that the index of a subfactor $N\subset M$ belongs to $\{4\cos^2(\frac{\pi}{n})\}\cup[4,\infty]$, with the Temperley-Lieb algebra being the basic invariant, and Bisch and Jones \cite{bjo} found that the intermediate subfactors $N\subset P\subset M$ are governed by the Fuss-Catalan algebras, which are a 2-colored version of the Temperley-Lieb algebra, with dimensions given by the Fuss-Catalan numbers. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \begin{scope} \coordinate (a) at (0,1.6); \coordinate (b) at (1.6,1.6); \coordinate (c) at (1.6,0); \coordinate (d) at (0,0); \draw[qblue,line width=1pt] (a)--(b)--(c)--(d)--cycle; \foreach \p/\l/\pos in {a/1/above left,b/2/above right,c/3/below right,d/4/below left}{\fill[qblue] (\p) circle[radius=2.3pt]; \node[\pos] at (\p) {$\l$};} \node at (0.8,-1.05) {the square $C_4$}; \end{scope} \node[align=center,text=black!75] at (4.2,0.8) {same spectrum\\ $\{2,0,0,-2\}$}; \draw[<->,black!45] (2.6,0.8)--(3.2,0.8); \draw[<->,black!45] (5.2,0.8)--(5.8,0.8); \begin{scope}[shift={(6.9,0)}] \coordinate (e11) at (0,1.6); \coordinate (e12) at (1.6,1.6); \coordinate (e21) at (0,0); \coordinate (e22) at (1.6,0); \draw[qblue,line width=1pt] (e11)--(e22); \draw[qblue,line width=1pt] (e12)--(e21); \draw[qgold,line width=.9pt] (e11) .. controls +(-0.55,0.9) and +(0.55,0.9) .. (e11); \node[qgold!80!black] at (0,2.45) {$1$}; \draw[qgold,line width=.9pt] (e12) .. controls +(-0.55,0.9) and +(0.55,0.9) .. (e12); \node[qgold!80!black] at (1.6,2.45) {$-1$}; \draw[qgold,line width=.9pt] (e21) .. controls +(-0.55,-0.9) and +(0.55,-0.9) .. (e21); \node[qgold!80!black] at (0,-0.85) {$-1$}; \draw[qgold,line width=.9pt] (e22) .. controls +(-0.55,-0.9) and +(0.55,-0.9) .. (e22); \node[qgold!80!black] at (1.6,-0.85) {$1$}; \foreach \p/\l/\pos in {e11/e_{11}/left,e12/e_{12}/right,e21/e_{21}/left,e22/e_{22}/right}{\fill[qblue] (\p) circle[radius=2.3pt]; \node[\pos] at (\p) {$\l$};} \node at (0.8,-1.45) {the quantum square over $M_2$}; \end{scope} \end{tikzpicture} \caption{The square $C_4$, and the quantum square from the above example, drawn in the multimatrix basis of $M_2$. The loops of the quantum square carry the colors $\pm1$, but in the quantum sense it has no loops, $d\circ1=0$.}\label{fig:squares} \end{figure} In \cite{ba2} it was shown that the Fuss-Catalan algebras are the Tannakian categories of the quantum symmetry groups $G^+(X_W)$ of the Markov inclusions $C(W)\subset C(V)$, with $X_W=(V,E_W)$, and $E_W$ being the conditional expectation, as explained in section 3. This was part of a systematic transfer of objects from subfactor theory to quantum groups, started with the Temperley-Lieb algebras and the quantum permutation groups \cite{ba1}, which the present paper continues. The paper is organized as follows, and a map of it is given in Figure \ref{fig:map}. Sections 1-4 are foundational: finite quantum spaces, quantum graphs and the 4 basic operations, the quantum symmetry groups, the invariance principle and the colors, then products, Cayley graphs and quantum reflection groups, as a stock of examples. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \node[draw=magenta,line width=1.1pt,ellipse,fill=magenta!6,inner sep=4pt] (c) at (0,0) {$X=(V,d)$}; \foreach \i/\t/\col in {1/{finite quantum spaces}/qblue,2/{the 4 basic operations}/qblue,3/{symmetries, planar algebras}/qblue,4/{products, Cayley graphs, twisting}/qblue,5/{walks, distances}/qgold,6/{Laplacian, heat flow}/qgold,7/{trees, cycles, circuits}/qgold,8/{spectra, matrix-tree}/qgold,9/{colorings, Hoffman bounds}/qgold,10/{planarity, embeddings}/qgold,11/{Mantel, random graphs}/qgold,12/{networks, random walks}/qgold}{ \node[draw=\col,rounded corners=3pt,fill=\col!9,align=center,text width=2.75cm,inner sep=2pt,font=\scriptsize,execute at begin node={\hyphenpenalty=10000}] (n\i) at ({6.15*cos(90-30*(\i-1))},{2.35*sin(90-30*(\i-1))}) {\textbf{\i.} \t}; \draw[\col!55,line width=.7pt] (c)--(n\i);} \end{tikzpicture} \caption{A map of the paper. Sections 1--4, in blue, set up the theory, and sections 5--12, in gold, go through graph theory.}\label{fig:map} \end{figure} In section 4 we also discuss the twisting relation, due to Gromada \cite{gr2}, between the Weyl-Cayley graphs over $M_n$ and the Cayley graphs of $\mathbb Z_n^2$, and, as an application, we compute the quantum symmetry group of the quantum torus over $M_3$, a noncommutative twist of order 72. Sections 5-12 go through graph theory, with walks, the Laplacian and connectivity, trees and cycles, spectral theory, colorings and independence, planarity, extremal questions and random graphs, and flows, networks and random walks. Several spectral results have predecessors for the quantum adjacency matrices, due to Matsuda \cite{ma2}, Courtney, Ganesan and Wasilewski \cite{cgw}, and Ganesan \cite{gan}, which we reprove with arbitrary positive weights. The present paper is accompanied by a number of computer programs, written in Python, which are available at the GitHub page of the first author. \section{Finite quantum spaces} According to the Gelfand theorem, any commutative $C^*$-algebra is of the form $C(X)$, with $X$ a compact space. In general, we can write any $C^*$-algebra as $A=C(X)$, and call $X$ a compact quantum space. In the finite dimensional case, we have: \begin{definition} A finite quantum space $V$ is the abstract dual of a finite dimensional $C^*$-algebra, $$C(V)=M_{n_1}(\mathbb C)\oplus\ldots\oplus M_{n_k}(\mathbb C)$$ taken with its multimatrix basis $\{e^r_{ab}\}$. The number of elements of $V$ is $$N=n_1^2+\ldots+n_k^2$$ which is the dimension of $C(V)$, and we write $N=|V|$. \end{definition} With $n_1=\ldots=n_k=1$ we obtain the usual finite space $V=\{1,\ldots,k\}$, and with $k=1$ we obtain the space $V=M_n$, with $C(M_n)=M_n(\mathbb C)$. In general, we can picture $V$ as a union of squares of points, one $n_r\times n_r$ square for each block, as in Figure \ref{fig:space}. \begin{figure}[H] \centering \begin{tikzpicture}[x=7mm,y=7mm,font=\small] \foreach \a in {1,2,3}\foreach \b in {1,2,3}{\ifnum\a=\b \fill[qgold] (\b,-\a) circle[radius=3.2pt]; \else \draw[qblue,fill=white,line width=.9pt] (\b,-\a) circle[radius=3.2pt]; \fi} \foreach \a in {1,2}\foreach \b in {1,2}{\ifnum\a=\b \fill[qgold] (\b+5,-\a-1) circle[radius=3.2pt]; \else \draw[qblue,fill=white,line width=.9pt] (\b+5,-\a-1) circle[radius=3.2pt]; \fi} \node at (9.6,-3) {$\ldots$}; \fill[qgold] (11.4,-3) circle[radius=3.2pt]; \node at (2,-4.1) {$M_3$}; \node at (6.5,-4.1) {$M_2$}; \node at (11.4,-4.1) {$\mathbb C$}; \node[right,font=\scriptsize] at (3.25,-1) {$e_{13}$}; \node[right,font=\scriptsize] at (3.25,-3) {$e_{33}$}; \draw[black!30,dashed,rounded corners=4pt] (0.45,-0.45) rectangle (3.55,-3.55); \draw[black!30,dashed,rounded corners=4pt] (5.45,-1.45) rectangle (7.55,-3.55); \draw[black!30,dashed,rounded corners=4pt] (10.9,-2.5) rectangle (11.9,-3.5); \end{tikzpicture} \caption{A finite quantum space $V$, with $C(V)=M_3(\mathbb C)\oplus M_2(\mathbb C)\oplus\ldots\oplus\mathbb C$, pictured as a union of squares of points. The points are the matrix units $e^r_{ab}$. The diagonal ones, in gold, have canonical trace $n_r$, and the off-diagonal ones, in blue, have canonical trace 0.}\label{fig:space} \end{figure} The points of this picture are the basis elements $e^r_{ab}$, and the number of points is the correct one, $N=|V|$. The diagonal points $e^r_{aa}$ are minimal projections, while the off-diagonal points $e^r_{ab}$ with $a\neq b$ are partial isometries, which are not self-adjoint, so a block $M_n$ has $n$ points of the first kind, and $n^2-n$ points of the second kind. For computations, we use single indices, as follows: \begin{definition} We write the multimatrix basis of $C(V)$ as $\{e_i\}$, with $i=(abr)$ standing for $e^r_{ab}$, so that the multiplication, involution and unit are given by $$e_ie_j=e_{ij}\quad,\quad e_i^*=e_{\bar{i}}\quad,\quad 1=\sum_{i=\bar{i}}e_i$$ where $(abr)(cdp)=(adr)$ if $r=p,b=c$, and $=\emptyset$ otherwise, with $e_\emptyset=0$, and where $\overline{(abr)}=(bar)$. We also write $n_i=n_r$ for the size of the block of $i=(abr)$. \end{definition} In the classical case, $V=\{1,\ldots,N\}$, we have $ii=i$, $ij=\emptyset$ for $i\neq j$, and $\bar{i}=i$, and in general, the matrix units multiply as arrows compose, as in Figure \ref{fig:arrows}. In particular $e_{ab}^*=e_{ba}$ is the reversed arrow, and $e_{ab}e_{ba}=e_{aa}$ is the source projection of $e_{ba}$, which is a loop at $a$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small,>={Stealth[length=2.2mm]}] \begin{scope} \foreach \i/\x in {1/0,2/1.7,3/3.4}{\coordinate (p\i) at (\x,0);} \draw[->,qblue,line width=1pt,shorten >=6pt,shorten <=6pt] (p3) to[bend left=35] node[below]{$e_{23}$} (p2); \draw[->,qblue,line width=1pt,shorten >=6pt,shorten <=6pt] (p2) to[bend left=35] node[below]{$e_{12}$} (p1); \draw[->,magenta,line width=1.1pt,shorten >=6pt,shorten <=6pt] (p3) to[bend right=40] node[above]{$e_{13}=e_{12}e_{23}$} (p1); \foreach \i in {1,2,3}{\node[draw=black!70,circle,inner sep=1.6pt,fill=white] at (p\i) {$\i$};} \end{scope} \begin{scope}[shift={(6.3,0.95)}] \foreach \c/\y in {1/0,2/-0.95,3/-1.9}{ \foreach \i/\x in {1/0,2/1.1,3/2.2}{\coordinate (q\i) at (\x,\y);} \node[left,font=\scriptsize] at (-0.35,\y) {$c=\c$}; \ifnum\c=1 \draw[->,qblue,line width=.9pt,shorten >=4pt,shorten <=4pt] (q3) to[bend right=28] (q1); \draw[->,qgold,line width=.9pt] (q1) .. controls +(-0.5,-0.55) and +(0.5,-0.55) .. (q1); \fi \ifnum\c=2 \draw[->,qblue,line width=.9pt,shorten >=4pt,shorten <=4pt] (q3) to[bend right=28] (q2); \draw[->,qgold,line width=.9pt,shorten >=4pt,shorten <=4pt] (q2) to[bend right=28] (q1); \fi \ifnum\c=3 \draw[->,qblue,line width=.9pt] (q3) .. controls +(-0.5,-0.55) and +(0.5,-0.55) .. (q3); \draw[->,qgold,line width=.9pt,shorten >=4pt,shorten <=4pt] (q3) to[bend right=28] (q1); \fi \foreach \i in {1,2,3}{\fill[black!70] (q\i) circle[radius=1.7pt];} \node[right,font=\scriptsize] at (2.5,\y) {$e_{1\c}\otimes e_{\c 3}$};} \end{scope} \end{tikzpicture} \caption{The matrix units multiply as arrows compose, $e_{ab}e_{bc}=e_{ac}$, with $e_{ab}$ going from $b$ to $a$. On the right, the comultiplication $\mu^*$ from Theorem \ref{thm:canonicaltrace} splits the arrow $e_{13}$ of $M_3$ in all possible ways, $\mu^*(e_{13})=\frac{1}{3}\sum_ce_{1c}\otimes e_{c3}$.}\label{fig:arrows} \end{figure} Regarding the integration, contrary to the classical case there is no universal quantum group acting on $V$, unless a trace is fixed \cite{wa1}. The natural choice is as follows: \begin{definition} The canonical trace of $V$ is the composition $\psi:C(V)\subset\mathcal L(C(V))\to\mathbb C$, of the regular representation $x\to L_x$, with $L_x(y)=xy$, and of the usual trace of $\mathcal L(C(V))\simeq M_N(\mathbb C)$: $$\psi(x)=Tr(L_x)$$ We use the scalar product $=\psi(y^*x)$, which makes $C(V)$ into a Hilbert space $L^2(V)$. \end{definition} In the classical case, $V=\{1,\ldots,N\}$, we have $\psi(f)=\sum_if(i)$, which is the integration with respect to the counting measure. In general, with $Tr$ denoting the usual trace of matrices, normalized by $Tr(1)=n$ on $M_n(\mathbb C)$, we have: \begin{proposition} The canonical trace is given by the following formula, $$\psi=n_1Tr\oplus\ldots\oplus n_kTr$$ and so it is a faithful positive trace, with $\psi(1)=N$. The multimatrix basis is orthogonal, $$=n_i\delta_{ij}$$ with $n_i$ being as usual the size of the block of $i$. \end{proposition} \begin{proof} On a block $M_n(\mathbb C)$, viewed as $\mathbb C^n\otimes\mathbb C^n$, the left multiplication by $x$ is $x\otimes1$, whose trace is $nTr(x)$. As for the scalar products, these are given by: $$=\psi(e^s_{dc}e^r_{ab})=\delta_{rs}\delta_{ac}\delta_{bd}n_r$$ Thus, we obtain the formulas in the statement. \end{proof} Thus each block gets a weight equal to its number of points, as in Figure \ref{fig:trace}, and $\psi$ is the counting measure on the points of the picture of $V$, at least on the diagonal ones. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[qgold] (0.00,-0.42) circle[radius=2.8pt]; \fill[qgold] (1.10,0.00) circle[radius=2.6pt]; \draw[qblue,fill=white,line width=.8pt] (1.52,0.00) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (1.10,-0.42) circle[radius=2.3pt]; \fill[qgold] (1.52,-0.42) circle[radius=2.6pt]; \fill[qgold] (2.70,0.21) circle[radius=2.6pt]; \draw[qblue,fill=white,line width=.8pt] (3.12,0.21) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (3.54,0.21) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (2.70,-0.21) circle[radius=2.3pt]; \fill[qgold] (3.12,-0.21) circle[radius=2.6pt]; \draw[qblue,fill=white,line width=.8pt] (3.54,-0.21) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (2.70,-0.63) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (3.12,-0.63) circle[radius=2.3pt]; \fill[qgold] (3.54,-0.63) circle[radius=2.6pt]; \node[font=\scriptsize] at (0.00,-1.25) {$\psi=Tr$}; \node[font=\scriptsize] at (1.31,-1.25) {$\psi=2Tr$}; \node[font=\scriptsize] at (3.12,-1.25) {$\psi=3Tr$}; \node[font=\scriptsize,text=magenta] at (0.00,-1.65) {$\psi(1)=1$}; \node[font=\scriptsize,text=magenta] at (1.31,-1.65) {$\psi(1)=4$}; \node[font=\scriptsize,text=magenta] at (3.12,-1.65) {$\psi(1)=9$}; \node[align=left,right] at (4.4,-0.5) {total: $\psi(1)=14=N$\\[2pt] $=n_i\delta_{ij}$}; \end{tikzpicture} \caption{The canonical trace of $V=\mathbb C\oplus M_2\oplus M_3$, which is $\psi=Tr\oplus2Tr\oplus3Tr$, giving weight $n_r^2$ to each block, the number of its points, as checked by {\tt pictures.py}.}\label{fig:trace} \end{figure} In terms of the normalized traces $tr=Tr/n$, the above formula reads $\psi=\oplus_rn_r^2tr$. The finite quantum spaces can be combined, in the same way as the usual finite spaces, as follows: \begin{proposition} We have the following operations on the finite quantum spaces: \begin{enumerate} \item Disjoint unions, given by $C(V\sqcup W)=C(V)\oplus C(W)$. \item Direct products, given by $C(V\times W)=C(V)\otimes C(W)$. \end{enumerate} The multimatrix bases are $\{e_i\}\cup\{f_a\}$ and $\{e_i\otimes f_a\}$, and these operations are subject to the same formulae as in the classical case, such as $$|V\sqcup W|=|V|+|W|\quad,\quad|V\times W|=|V|\cdot|W|\quad,\quad(U\sqcup V)\times W=(U\times W)\sqcup(V\times W)$$ along with the other usual associativity and distributivity formulae. \end{proposition} \begin{proof} For the direct products, the tensor product of 2 blocks is a block, as follows, and the tensor products of matrix units are matrix units: $$M_n(\mathbb C)\otimes M_m(\mathbb C)=M_{nm}(\mathbb C)$$ The rest is clear. \end{proof} As an illustration, the finite quantum spaces with $N\leq10$ points correspond to the ways of writing $N$ as a sum of squares, and are as follows, as listed by the program {\tt pictures.py}, with $M_n$ standing for $M_n(\mathbb C)$: \begin{center} \begin{tabular}{|c|l|c|} \hline $N$&$C(V)$, with $|V|=N$&number\\ \hline $1,2,3$&$\mathbb C^N$&$1$\\ \hline $4,5,6,7$&$\mathbb C^N$, $\mathbb C^{N-4}\oplus M_2$&$2$\\ \hline $8$&$\mathbb C^8$, $\mathbb C^4\oplus M_2$, $M_2\oplus M_2$&$3$\\ \hline $9$&$\mathbb C^9$, $\mathbb C^5\oplus M_2$, $\mathbb C\oplus M_2\oplus M_2$, $M_3$&$4$\\ \hline $10$&$\mathbb C^{10}$, $\mathbb C^6\oplus M_2$, $\mathbb C^2\oplus M_2\oplus M_2$, $\mathbb C\oplus M_3$&$4$\\ \hline \end{tabular} \end{center} \medskip The first genuinely quantum space is $M_2$, with 4 points, and the first ones having 2 different quantum blocks appear with $N=13$, namely $M_2\oplus M_3$. Observe also that the spaces having a single block, $C(V)=M_n(\mathbb C)$, appear precisely when $N=n^2$ is a square. As an illustration, for $V=M_2$ and $W=\mathbb C^2$ the operations from Proposition 1.5 are as in Figure \ref{fig:spaceops}, as computed by {\tt pictures.py}, with $V\times W$ having 2 blocks of size 2, and $|V\times W|=8$. Observe that the classical part of $V\sqcup W$ is $W$, while $V\times W$ has no classical part at all. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[qgold] (0.00,0.00) circle[radius=2.6pt]; \draw[qblue,fill=white,line width=.8pt] (0.50,0.00) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (0.00,-0.50) circle[radius=2.3pt]; \fill[qgold] (0.50,-0.50) circle[radius=2.6pt]; \node at (0.25,-0.95) {$V=M_2$}; \fill[qgold] (2.00,0.00) circle[radius=2.6pt]; \fill[qgold] (2.00,-0.50) circle[radius=2.6pt]; \node at (2.0,-0.95) {$W=\mathbb C^2$}; \fill[qgold] (3.60,0.00) circle[radius=2.6pt]; \draw[qblue,fill=white,line width=.8pt] (4.10,0.00) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (3.60,-0.50) circle[radius=2.3pt]; \fill[qgold] (4.10,-0.50) circle[radius=2.6pt]; \fill[qgold] (4.60,0.00) circle[radius=2.6pt]; \fill[qgold] (4.60,-0.50) circle[radius=2.6pt]; \node[align=center] at (4.1,-1.15) {$V\sqcup W$\\ $6$ points}; \fill[qgold] (6.60,0.00) circle[radius=2.6pt]; \draw[qblue,fill=white,line width=.8pt] (7.10,0.00) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (6.60,-0.50) circle[radius=2.3pt]; \fill[qgold] (7.10,-0.50) circle[radius=2.6pt]; \fill[qgold] (7.80,0.00) circle[radius=2.6pt]; \draw[qblue,fill=white,line width=.8pt] (8.30,0.00) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (7.80,-0.50) circle[radius=2.3pt]; \fill[qgold] (8.30,-0.50) circle[radius=2.6pt]; \node[align=center] at (7.45,-1.15) {$V\times W=M_2\sqcup M_2$\\ $8$ points}; \end{tikzpicture} \caption{The disjoint union and the direct product of $V=M_2$ and $W=\mathbb C^2$. We have $C(V\times W)=M_2(\mathbb C)\otimes\mathbb C^2=M_2(\mathbb C)\oplus M_2(\mathbb C)$, so $V\times W$ consists of $2$ copies of $M_2$.}\label{fig:spaceops} \end{figure} Besides unions and products, we have quotients, subspaces and opposites. In the classical case, a quotient map $V\to W$ is a surjection, and a subspace $W\subset V$ is a subset, and in the quantum case, following the Gelfand duality philosophy, these correspond respectively to the subalgebras $C(W)\subset C(V)$, and to the quotient algebras $C(V)\to C(W)$. As for the opposite space, this comes from the opposite algebra, which has the same underlying vector space as $C(V)$, and the same involution, but with the multiplication reversed, $x\cdot y=yx$, and in the classical case we have of course $V^{op}=V$. Summarizing, the theory of finite quantum spaces is that of the finite dimensional $C^*$-algebras, read backwards, and in practice, all this is as follows: \begin{proposition} We have the following constructions, for a finite quantum space $V$: \begin{enumerate} \item The quotient maps $V\to W$ correspond to the unital $*$-subalgebras $C(W)\subset C(V)$, with $C(W)$ taken with a multimatrix basis of its own. \item The subspaces $W\subset V$ correspond to the surjective $*$-morphisms $C(V)\to C(W)$, and are the unions of some of the blocks of $V$. \item The classical part $V_{class}\subset V$, which is the union of the blocks of size $1$, is the largest classical subspace of $V$. \item The opposite space $V^{op}$, given by $C(V^{op})=C(V)^{op}$, is isomorphic to $V$, via the blockwise transposition, which maps $e_i\to e_{\bar{i}}$. \end{enumerate} \end{proposition} \begin{proof} Here (1) is a definition. For (2), the kernel of a surjective $*$-morphism is an ideal, and the ideals of a multimatrix algebra are the sums of some of its blocks. For (3), the blocks $M_n(\mathbb C)$ with $n\geq2$ have no characters, so a classical subspace must be a union of blocks of size 1. Finally (4) holds because the transposition is an anti-automorphism of $M_n(\mathbb C)$. \end{proof} These constructions are illustrated in Figure \ref{fig:spaceconstr}. Observe that the quotient maps can mix the matrix units, while the subspaces cannot cut through the blocks. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[qgold] (0.00,0.00) circle[radius=2.6pt]; \draw[qblue,fill=white,line width=.8pt] (0.50,0.00) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (0.00,-0.50) circle[radius=2.3pt]; \fill[qgold] (0.50,-0.50) circle[radius=2.6pt]; \draw[->,magenta,line width=1pt] (0.85,-0.25)--(1.6,-0.25); \fill[qgold] (2.00,0.00) circle[radius=2.6pt]; \fill[qgold] (2.00,-0.50) circle[radius=2.6pt]; \node at (1.0,-1.0) {$M_2\to\{1,2\}$}; \fill[qgold] (4.00,0.00) circle[radius=2.6pt]; \draw[qblue,fill=white,line width=.8pt] (4.50,0.00) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (4.00,-0.50) circle[radius=2.3pt]; \fill[qgold] (4.50,-0.50) circle[radius=2.6pt]; \fill[qgold] (5.10,-0.25) circle[radius=2.6pt]; \draw[magenta,dashed,line width=.9pt] (5.1,-0.25) circle[radius=0.24]; \node at (4.55,-1.0) {$\{\cdot\}\subset M_2\sqcup\{\cdot\}$}; \fill[qgold] (7.60,0.00) circle[radius=2.6pt]; \draw[qblue,fill=white,line width=.8pt] (8.10,0.00) circle[radius=2.3pt]; \draw[qblue,fill=white,line width=.8pt] (7.60,-0.50) circle[radius=2.3pt]; \fill[qgold] (8.10,-0.50) circle[radius=2.6pt]; \draw[<->,magenta,line width=1pt,shorten >=3.5pt,shorten <=3.5pt] (8.1,0) to[bend left=45] (7.6,-0.5); \node at (7.85,-1.0) {$e_{ab}\to e_{ba}$}; \end{tikzpicture} \caption{A quotient map $M_2\to\{1,2\}$, corresponding to the diagonal subalgebra $\mathbb C^2\subset M_2(\mathbb C)$, a subspace, which must be a union of blocks, and the isomorphism $V^{op}\simeq V$, given by the transposition.}\label{fig:spaceconstr} \end{figure} Thus, the honest subspaces of a finite quantum space are rare, and when looking for quantum subsets, as in the coloring problems from section 9, we will have to use corners $pC(V)p$ instead. We can now formulate our main result regarding the finite quantum spaces, which explains why the canonical trace is the right one: \begin{theorem}\label{thm:canonicaltrace} The canonical trace $\psi$ has the following properties: \begin{enumerate} \item The multiplication $\mu:C(V)\otimes C(V)\to C(V)$ and the unit $\eta:\mathbb C\to C(V)$ satisfy: $$\mu^*(e_p)=\frac{1}{n_p}\sum_{kl=p}e_k\otimes e_l\quad,\quad\mu\mu^*=1\quad,\quad\eta^*=\psi$$ \item $\psi$ is, up to a scalar, the unique faithful positive trace $\varphi$ on $C(V)$ for which $\mu\mu^*$ is a scalar, the adjoint being taken with respect to $\varphi$. \item $\psi$ is invariant under the isomorphism $V\simeq V^{op}$, and is compatible with the disjoint unions and the direct products, in the sense that: $$\psi_{V\sqcup W}=\psi_V\oplus\psi_W\quad,\quad\psi_{V\times W}=\psi_V\otimes\psi_W$$ \item For a finite quantum group $G$, we have $\psi=|G|\,h$, with $h$ being the Haar state. \end{enumerate} \end{theorem} \begin{proof} We prove (1) and (2) together. Any faithful positive trace on $C(V)$ is of the form $\varphi=\oplus_rc_rTr$ with $c_r>0$, and with respect to $\varphi$ we have the following formula: $$<\mu^*(e_p),e_k\otimes e_l>=$$ This quantity equals $c_r$ when $kl=p$, with $r$ being the block of $p$, and 0 otherwise. Since $||e_k\otimes e_l||^2=c_r^2$ in this case, we obtain: $$\mu^*(e_p)=\frac{1}{c_r}\sum_{kl=p}e_k\otimes e_l\quad,\quad\mu\mu^*(e_p)=\frac{n_r}{c_r}\,e_p$$ Thus $\mu\mu^*$ is a scalar precisely when $c_r$ is proportional to $n_r$, and we have $\mu\mu^*=1$ precisely when $c_r=n_r$, which gives (1) and (2), the formula $\eta^*(x)==\psi(x)$ being clear. For (3), the regular representation of $C(V)\oplus C(W)$ is $L^V\oplus L^W$, and that of $C(V)\otimes C(W)$ is $L^V\otimes L^W$, and the trace is additive and multiplicative, while the transposition preserves the trace. Finally, for (4), the Haar state of $C(G)=\oplus_rM_{n_r}(\mathbb C)$ has weights $n_r^2/|G|$ on the blocks, by Peter-Weyl theory for the dual of $G$, and this is $\psi/|G|$. \end{proof} In diagrammatic terms, with the multiplication $\mu$ drawn as a merging of 2 strands, and the unit $\eta$ as a strand starting from a dot, the formulas in Theorem \ref{thm:canonicaltrace} (1) become the rules in Figure \ref{fig:bubble}, which will be the basic rules of the planar calculus in section 3. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.2pt] (0,0)--(0,0.45) (0,1.55)--(0,2); \draw[qblue,line width=1.2pt] (0,0.45) .. controls (-0.55,0.75) and (-0.55,1.25) .. (0,1.55); \draw[qblue,line width=1.2pt] (0,0.45) .. controls (0.55,0.75) and (0.55,1.25) .. (0,1.55); \fill[magenta] (0,0.45) circle[radius=2.3pt]; \fill[magenta] (0,1.55) circle[radius=2.3pt]; \node[right,font=\scriptsize] at (0.12,0.35) {$\mu^*$}; \node[right,font=\scriptsize] at (0.12,1.65) {$\mu$}; \node at (1.05,1) {$=$}; \draw[qblue,line width=1.2pt] (1.7,0)--(1.7,2); \begin{scope}[shift={(4.2,0)}] \draw[qgold,line width=1.2pt] (0,0.45)--(0,1.55); \fill[qgold] (0,0.45) circle[radius=2.6pt]; \fill[qgold] (0,1.55) circle[radius=2.6pt]; \node[right,font=\scriptsize] at (0.1,0.45) {$\eta$}; \node[right,font=\scriptsize] at (0.1,1.55) {$\eta^*$}; \node at (1.1,1) {$=\ N$}; \end{scope} \end{tikzpicture} \caption{The formulas $\mu\mu^*=1$ and $\eta^*\eta=\psi(1)=N$, with $\mu$ drawn as a merging of $2$ strands, and $\mu^*$ as a splitting. For the canonical trace, a bubble can be removed at no cost.}\label{fig:bubble} \end{figure} The traces $\varphi$ for which $\mu\mu^*$ is a scalar are called $\delta$-forms, with $\mu\mu^*=\delta^2$, so the canonical trace is the $\delta$-form with $\delta=1$. This normalization is the one making all the formulas in this paper clean, starting with the formulas for the Hadamard product, in section 2. \section{Quantum graphs, basics} Classical graph theory uses 2 kinds of operations on the adjacency matrices, namely the matrix operations, product and adjoint, and the componentwise operations, product and conjugation. Over a finite quantum space $V$, these become the following 4 operations: \begin{definition} For $A,B\in M_N(\mathbb C)$, regarded as linear maps $C(V)\to C(V)$, we use: \begin{enumerate} \item The composition $AB$, which is the usual matrix product. \item The adjoint $A^*$, taken in $L^2(V)$. \item The Hadamard product $A\circ B=\mu(A\otimes B)\mu^*$. \item The operation $A^\#(x)=A(x^*)^*$. \end{enumerate} \end{definition} These operations can be drawn as in Figure \ref{fig:fourops}, with the matrices $A,B$ being boxes on strands representing $C(V)$, and with the merging and splitting of strands being $\mu$ and $\mu^*$, as in section 1. The point is that the composition and the Hadamard product appear as 2 different ways of combining 2 boxes, in series and in parallel, exactly as for the 2-boxes of a planar algebra, and we will see in section 3 that this is not a coincidence. Both the Hadamard product and the operation $\#$ are built from $\mu$ and $\eta$, which generate the representation theory of the quantum permutation groups \cite{ba1}, \cite{ba3}, so these operations are compatible with the quantum symmetries, a key fact, to be discussed in section 3. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.1pt] (0,0)--(0,2.1); \node[draw,fill=white,minimum width=5mm,minimum height=4mm,inner sep=1pt] at (0,0.6) {$B$}; \node[draw,fill=white,minimum width=5mm,minimum height=4mm,inner sep=1pt] at (0,1.5) {$A$}; \node at (0,-0.45) {$AB$}; \begin{scope}[shift={(2.2,0)}] \draw[qblue,line width=1.1pt] (0,0)--(0,2.1); \node[draw,fill=white,minimum width=5mm,minimum height=4mm,inner sep=1pt] at (0,1.05) {\rotatebox{180}{$A$}}; \node at (0,-0.45) {$A^*$}; \end{scope} \begin{scope}[shift={(4.6,0)}] \draw[qblue,line width=1.1pt] (0,0)--(0,0.35) (0,1.75)--(0,2.1); \draw[qblue,line width=1.1pt] (0,0.35) .. controls (-0.45,0.55) .. (-0.45,1.05) .. controls (-0.45,1.55) .. (0,1.75); \draw[qblue,line width=1.1pt] (0,0.35) .. controls (0.45,0.55) .. (0.45,1.05) .. controls (0.45,1.55) .. (0,1.75); \node[draw,fill=white,minimum width=5mm,minimum height=4mm,inner sep=1pt] at (-0.45,1.05) {$A$}; \node[draw,fill=white,minimum width=5mm,minimum height=4mm,inner sep=1pt] at (0.45,1.05) {$B$}; \fill[magenta] (0,0.35) circle[radius=2.2pt]; \fill[magenta] (0,1.75) circle[radius=2.2pt]; \node at (0,-0.45) {$A\circ B$}; \end{scope} \begin{scope}[shift={(7.0,0)}] \draw[qblue,line width=1.1pt] (0,0)--(0,2.1); \node[draw,fill=white,minimum width=5mm,minimum height=4mm,inner sep=1pt] at (0,1.05) {$A$}; \node[circle,draw=qgold,fill=white,inner sep=0.5pt,font=\scriptsize] at (0,0.35) {$*$}; \node[circle,draw=qgold,fill=white,inner sep=0.5pt,font=\scriptsize] at (0,1.75) {$*$}; \node at (0,-0.45) {$A^\#$}; \end{scope} \end{tikzpicture} \caption{The $4$ basic operations, as diagrams: composition by stacking, adjoint by reflecting the box, Hadamard product via $\mu(A\otimes B)\mu^*$, and the operation $\#$, which is $A$ conjugated by the involution of $C(V)$.}\label{fig:fourops} \end{figure} In single indices, we have: \begin{proposition} The $4$ basic operations are given by the following formulas, $$(AB)_{ij}=\sum_kA_{ik}B_{kj}\quad,\quad(A^*)_{ij}=\frac{n_j}{n_i}\,\bar{A}_{ji}$$ $$(A\circ B)_{mp}=\frac{1}{n_p}\sum_{ij=m}\sum_{kl=p}A_{ik}B_{jl}\quad,\quad(A^\#)_{ij}=\bar{A}_{\bar{i}\hskip0.3mm\bar{j}}$$ and in the classical case, $\circ$ is the componentwise product, and $\#$ is the componentwise conjugation. Moreover, $J(x)=\psi(x)1$ is the unit of $\circ$, and $1\circ1=1$. \end{proposition} \begin{proof} The adjoint formula follows from $=n_i\delta_{ij}$. For the Hadamard product, by using the formula of $\mu^*$ from section 1 we obtain the following formula, which gives the formula in the statement: $$(A\circ B)(e_p)=\frac{1}{n_p}\sum_{kl=p}A(e_k)B(e_l)$$ For the operation $\#$, we have the following formula: $$A^\#(e_j)=A(e_{\bar{j}})^*=\sum_i\bar{A}_{i\bar{j}}e_{\bar{i}}$$ In the classical case, $ij=m$ forces $i=j=m$, and $kl=p$ forces $k=l=p$. Finally, we have $J=\eta\eta^*$ and $(\eta^*\otimes id)\mu^*=id$, because $<\mu^*(x),1\otimes y>=$, so $J\circ B=\mu(\eta\otimes B)=B$, and similarly $B\circ J=B$, and $1\circ1=\mu\mu^*=1$. \end{proof} Classically, these 4 operations have a transparent meaning, illustrated in Figure \ref{fig:operations}: the composition counts the walks, the adjoint reverses the arrows, the Hadamard product keeps the common edges, multiplying their weights, and $\#$ conjugates the weights. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small,scale=1] \foreach \sh/\name/\edges/\col in {0/A/{1/2,2/3,3/4,4/1,1/3}/qblue,4.2/B/{1/2,2/4,3/4,1/3}/qgold,8.4/{A\circ B}/{1/2,3/4,1/3}/magenta}{ \begin{scope}[shift={(\sh,0)}] \coordinate (v1) at (0,1.8); \coordinate (v2) at (1.8,1.8); \coordinate (v3) at (1.8,0); \coordinate (v4) at (0,0); \foreach \x/\y in \edges {\draw[\col,line width=1.2pt] (v\x)--(v\y);} \foreach \v/\pos in {1/above left,2/above right,3/below right,4/below left}{\fill[black!75] (v\v) circle[radius=2.2pt]; \node[\pos,font=\scriptsize] at (v\v) {$\v$};} \node at (0.9,-0.75) {$\name$}; \end{scope}} \end{tikzpicture} \caption{A pair of graphs $A,B$ on $4$ vertices, and their Hadamard product $A\circ B$, which keeps the common edges. In the quantum case, $A\circ B=\mu(A\otimes B)\mu^*$ is the same operation, read through the multiplication of $C(V)$.}\label{fig:operations} \end{figure} More conceptually, with $\theta_{a,b}(x)=a$ we have $\theta_{a,b}\circ\theta_{c,d}=\theta_{ac,bd}$ and $\theta_{a,b}^\#=\theta_{a^*,b^*}$, so $(M_N(\mathbb C),\circ,\#)$ is a $C^*$-algebra, isomorphic to $C(V)\otimes C(V)^{op}$, via $\theta_{a,b}\to a\otimes b^*$. We will only need this fact in sections 3 and 11. Now with these operations in hand, here is our definition of the quantum graphs, which is the simplest possible one: \begin{definition} A quantum graph is a pair $X=(V,d)$, with $V$ a finite quantum space, and $d\in M_N(\mathbb C)$, with $N=|V|$, regarded as a linear map $d:C(V)\to C(V)$, via $d(e_j)=\sum_id_{ij}e_i$. \end{definition} \medskip\noindent\textbf{Pictures.} We can draw $X$ by using the picture of $V$ from section 1, with an arrow $j\to i$, colored by $d_{ij}\in\mathbb C$, between any 2 points, with the convention that the arrows $j\to i$ and $i\to j$ with the same color are drawn as a single edge. For instance, the quantum square from the introduction is pictured as in Figure \ref{fig:squares}, with the 4 points $e_{11},e_{12},e_{21},e_{22}$ arranged as in section 1, the drawing conventions being summarized in Figure \ref{fig:conventions}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \coordinate (j) at (0,0); \coordinate (i) at (1.6,0); \draw[->,qblue,line width=1.1pt,shorten >=3pt,shorten <=3pt] (j)--(i) node[midway,above] {$d_{ij}$}; \fill[black!75] (j) circle[radius=2.4pt] node[below] {$j$}; \fill[black!75] (i) circle[radius=2.4pt] node[below] {$i$}; \begin{scope}[shift={(3.1,0)}] \coordinate (j) at (0,0); \coordinate (i) at (1.6,0); \draw[qblue,line width=1.1pt] (j)--(i) node[midway,above] {$c$}; \fill[black!75] (j) circle[radius=2.4pt] node[below] {$j$}; \fill[black!75] (i) circle[radius=2.4pt] node[below] {$i$}; \node[font=\scriptsize] at (0.8,-0.75) {$d_{ij}=d_{ji}=c$}; \end{scope} \begin{scope}[shift={(6.3,0)}] \coordinate (i) at (0,0); \draw[qgold,line width=1pt] (i) .. controls +(60:0.9) and +(120:0.9) .. (i); \node[text=qgold!80!black] at (0,0.85) {$d_{ii}$}; \fill[black!75] (i) circle[radius=2.4pt] node[below] {$i$}; \end{scope} \end{tikzpicture} \caption{The drawing conventions: an arrow $j\to i$ colored by $d_{ij}$, a pair of opposite arrows with the same color drawn as a single edge, and a loop at $i$, colored by $d_{ii}$. The absent arrows correspond to $d_{ij}=0$.}\label{fig:conventions} \end{figure} This is one of the key features of our quantum graphs: they can be drawn, exactly as the usual graphs, and in what follows we will draw them as often as possible. For $V=\{1,\ldots,N\}$ we obtain the colored oriented graphs, with loops allowed. In general, the picture depends on the multimatrix basis, which is part of the data of $V$. The usual conditions on graphs become conditions on $d$: \begin{definition} A quantum graph $X=(V,d)$ is called: \begin{enumerate} \item Undirected, if $d=d^*$. \item Real, if $d^\#=d$, that is, $d(x^*)=d(x)^*$ for any $x\in C(V)$. \item Without loops, if $d\circ1=0$. \item Simple, if $d\circ d=d$, and uncolored, if it is moreover real. \item Positively weighted, if $d:C(V)\to C(V)$ is completely positive. \end{enumerate} \end{definition} In the classical case, a linear map $d:\mathbb C^N\to\mathbb C^N$ is completely positive precisely when its entries are positive, and $\circ$ is the componentwise product. Thus for $V=\{1,\ldots,N\}$ the above conditions are the usual ones, and the usual graphs are the quantum graphs which are undirected, real, simple and without loops. Here is a summary of this dictionary, along with the degree and the number of edges, defined right below: \begin{center} \begin{tabular}{|l|c|c|} \hline property&classical, $V=\{1,\ldots,N\}$&quantum, $X=(V,d)$\\ \hline undirected&$d_{ij}=\bar{d}_{ji}$&$d=d^*$\\ \hline real&$d_{ij}\in\mathbb R$&$d^\#=d$\\ \hline without loops&$d_{ii}=0$&$d\circ1=0$\\ \hline simple&$d_{ij}\in\{0,1\}$&$d\circ d=d$\\ \hline positively weighted&$d_{ij}\geq0$&$d$ completely positive\\ \hline degree&$\sum_jd_{ij}$&$d(1)\in C(V)$\\ \hline number of edges&$\frac{1}{2}\sum_{ij}d_{ij}$&$\frac{1}{2}\psi(d(1))$\\ \hline \end{tabular} \end{center} \medskip The last 2 rows are quite natural, and lead to the following definition: \begin{definition} The degree of a quantum graph $X=(V,d)$ is the element $d(1)\in C(V)$. We call $X$ regular of valence $k$ when $d(1)=k1$, and we call $\frac{1}{2}\psi(d(1))$ its number of edges. \end{definition} In the classical case, $d(1)_i=\sum_jd_{ij}$ is the degree of $i$, and $\psi(d(1))=\sum_{ij}d_{ij}$ is twice the number of edges. The simplest examples of quantum graphs, over an arbitrary $V$, are the empty graph $d=0$, the graph made of loops $d=1$, and the complete graph with loops $d=J$, which are all undirected, real and simple. Over $V=M_2$, with the points $e_{11},e_{12},e_{21},e_{22}$ arranged as in section 1, the graph made of loops and the complete graph with loops are as follows: $$\begin{tikzpicture}[baseline=(current bounding box.center),font=\scriptsize,>={Stealth[length=1.8mm]}] \draw[qgold,line width=.9pt] (0,1.4) .. controls +(40:0.95) and +(140:0.95) .. (0,1.4); \node[text=qgold!80!black] at (0.00,2.28) {$1$}; \draw[qgold,line width=.9pt] (1.4,1.4) .. controls +(40:0.95) and +(140:0.95) .. (1.4,1.4); \node[text=qgold!80!black] at (1.40,2.28) {$1$}; \draw[qgold,line width=.9pt] (0,0) .. controls +(220:0.95) and +(320:0.95) .. (0,0); \node[text=qgold!80!black] at (-0.00,-0.88) {$1$}; \draw[qgold,line width=.9pt] (1.4,0) .. controls +(220:0.95) and +(320:0.95) .. (1.4,0); \node[text=qgold!80!black] at (1.40,-0.88) {$1$}; \fill[black!75] (0,1.4) circle[radius=2.3pt]; \fill[black!75] (1.4,1.4) circle[radius=2.3pt]; \fill[black!75] (0,0) circle[radius=2.3pt]; \fill[black!75] (1.4,0) circle[radius=2.3pt]; \end{tikzpicture} \qquad\qquad\qquad \begin{tikzpicture}[baseline=(current bounding box.center),font=\scriptsize,>={Stealth[length=1.8mm]}] \draw[qblue,line width=1pt] (0,1.4)--(1.4,0) node[pos=0.3,fill=white,inner sep=1pt] {$2$}; \draw[qgold,line width=.9pt] (0,1.4) .. controls +(40:0.95) and +(140:0.95) .. (0,1.4); \node[text=qgold!80!black] at (0.00,2.28) {$2$}; \draw[qgold,line width=.9pt] (1.4,0) .. controls +(220:0.95) and +(320:0.95) .. (1.4,0); \node[text=qgold!80!black] at (1.40,-0.88) {$2$}; \fill[black!75] (0,1.4) circle[radius=2.3pt]; \fill[black!75] (1.4,1.4) circle[radius=2.3pt]; \fill[black!75] (0,0) circle[radius=2.3pt]; \fill[black!75] (1.4,0) circle[radius=2.3pt]; \end{tikzpicture}$$ Observe that in the complete graph with loops, the off-diagonal points $e_{12},e_{21}$ are isolated, because $J(x)=\psi(x)1$ only sees the diagonal of $x$. Another class of basic examples, coming from \cite{ba2}, is as follows: \begin{example} Given a quotient map of finite quantum spaces $V\to W$, the conditional expectation $E_W:C(V)\to C(W)\subset C(V)$ produces an undirected, real and positively weighted quantum graph, as follows: $$X_W=(V,E_W)$$ In the classical case, $X_W$ is a disjoint union of complete graphs with loops. \end{example} Here $E_W$ is the orthogonal projection onto $C(W)$, in $L^2(V)$, which is completely positive, self-adjoint and real. In the classical case, where $V\to W$ is a surjection $\{1,\ldots,N\}\to\{1,\ldots,M\}$, and $C(W)$ consists of the functions which are constant on its fibers, $X_W$ is the disjoint union of the complete graphs with loops on these fibers, with the edges weighted by the inverses of the fiber sizes. As a quantum example, the inclusion $\mathbb C^2\subset M_2(\mathbb C)$ of the diagonal matrices corresponds to a quotient map $M_2\to\{1,2\}$, the expectation $E_W$ is the projection onto the diagonal, and $X_W$ is as follows: $$\begin{tikzpicture}[baseline=(current bounding box.center),font=\scriptsize,>={Stealth[length=1.8mm]}] \draw[qgold,line width=.9pt] (0,1.4) .. controls +(40:0.95) and +(140:0.95) .. (0,1.4); \node[text=qgold!80!black] at (0.00,2.28) {$1$}; \draw[qgold,line width=.9pt] (1.4,0) .. controls +(220:0.95) and +(320:0.95) .. (1.4,0); \node[text=qgold!80!black] at (1.40,-0.88) {$1$}; \fill[black!75] (0,1.4) circle[radius=2.3pt]; \fill[black!75] (1.4,1.4) circle[radius=2.3pt]; \fill[black!75] (0,0) circle[radius=2.3pt]; \fill[black!75] (1.4,0) circle[radius=2.3pt]; \end{tikzpicture}$$ \medskip\noindent\textbf{The simplex.} The most important example is the simplex, that we can now investigate: \begin{theorem}\label{thm:simplex} The simplex $X=(V,J-1)$ is undirected, real, simple, positively weighted and without loops, it is regular of valence $N-1$, and it has $N(N-1)/2$ edges. More generally, for any $X=(V,d)$ simple, real and without loops, the complement $X^c=(V,J-1-d)$ is simple, real and without loops. \end{theorem} \begin{proof} Since $J$ is the unit of $\circ$, and $1$ is a $\circ$-idempotent, we have: $$(J-1)\circ(J-1)=J-2+1=J-1\quad,\quad(J-1)\circ1=0$$ The matrices $J=\eta\eta^*$ and $1$ are self-adjoint and real, and the valence and the number of edges are given by the following formulas: $$(J-1)(1)=\psi(1)1-1=(N-1)1\quad,\quad\frac{1}{2}\psi((N-1)1)=\frac{N(N-1)}{2}$$ For complete positivity, the Choi matrix of $J-1$ restricted to a pair of blocks $M_{n_r}(\mathbb C)\to M_{n_s}(\mathbb C)$ is $n_r1$ for $r\neq s$, and $n_r(1-P)$ for $r=s$, with $P$ the rank one projection onto $\sum_ae_a\otimes e_a$, so it is positive. Finally, if $d$ is simple, real and without loops, then $1\circ d=(d\circ1)^\#=0$, the operation $\#$ being antimultiplicative for $\circ$, and so: $$(J-1-d)\circ(J-1-d)=J-1-d+1\circ d+d\circ1=J-1-d$$ Thus $J-1-d$ is a real $\circ$-idempotent, and it has no loops, because $(J-1-d)\circ1=1-1-d\circ1=0$. \end{proof} The reality assumption cannot be removed. Over $V=M_2$, consider $d=(J-1)+1\circ y\circ(J-1)$, with $y$ generic. Then $d\circ d=d$ and $d\circ1=0$, but $1\circ d\neq0$, and the complement $J-1-d=-1\circ y\circ(J-1)$ satisfies $(J-1-d)\circ(J-1-d)=0$. The program {\tt simplex.py} checks this, along with the above theorem, for random simple real graphs without loops, constructed via the isomorphism $(M_N(\mathbb C),\circ,\#)\simeq C(V)\otimes C(V)^{op}$. In the classical case $J$ is the all-one matrix, and we recover the usual simplex. In the quantum case, the entries of $J$ are $J_{ip}=\delta_{i\bar{i}}\delta_{p\bar{p}}n_p$, and the simplex looks as follows: \begin{example} For $V=M_n$ with $n\geq2$, the entries of the simplex $J-1$ in the multimatrix basis take $4$ different values, namely $n,n-1,-1,0$. \end{example} More precisely, the entries are $n$ at the positions $(i,p)$ with $i\neq p$, $i=\bar{i}$, $p=\bar{p}$, then $n-1$ at the positions $(i,i)$ with $i=\bar{i}$, then $-1$ at the positions $(i,i)$ with $i\neq\bar{i}$, and $0$ elsewhere. Here are the simplices over $M_2$ and over $M_3$, with the diagonal points forming a usual simplex, with weights $n$ on the edges and $n-1$ on the loops, and with loops worth $-1$ at the off-diagonal points: $$\begin{tikzpicture}[baseline=(current bounding box.center),font=\scriptsize,>={Stealth[length=1.8mm]}] \draw[qblue,line width=1pt] (0,1.4)--(1.4,0) node[pos=0.3,fill=white,inner sep=1pt] {$2$}; \draw[qgold,line width=.9pt] (0,1.4) .. controls +(40:0.95) and +(140:0.95) .. (0,1.4); \node[text=qgold!80!black] at (0.00,2.28) {$1$}; \draw[qgold,line width=.9pt] (1.4,1.4) .. controls +(40:0.95) and +(140:0.95) .. (1.4,1.4); \node[text=qgold!80!black] at (1.40,2.28) {$-1$}; \draw[qgold,line width=.9pt] (0,0) .. controls +(220:0.95) and +(320:0.95) .. (0,0); \node[text=qgold!80!black] at (-0.00,-0.88) {$-1$}; \draw[qgold,line width=.9pt] (1.4,0) .. controls +(220:0.95) and +(320:0.95) .. (1.4,0); \node[text=qgold!80!black] at (1.40,-0.88) {$1$}; \fill[black!75] (0,1.4) circle[radius=2.3pt]; \fill[black!75] (1.4,1.4) circle[radius=2.3pt]; \fill[black!75] (0,0) circle[radius=2.3pt]; \fill[black!75] (1.4,0) circle[radius=2.3pt]; \end{tikzpicture} \qquad\qquad\qquad \begin{tikzpicture}[baseline=(current bounding box.center),font=\scriptsize,>={Stealth[length=1.8mm]}] \draw[qblue,line width=1pt] (0.00,2.50)--(1.25,1.25) node[pos=0.3,fill=white,inner sep=1pt] {$3$}; \draw[qblue,line width=1pt] (1.25,1.25)--(2.50,0.00) node[pos=0.3,fill=white,inner sep=1pt] {$3$}; \draw[qblue,line width=1pt] (0.00,2.50) to[bend left=40] node[midway,fill=white,inner sep=1pt] {$3$} (2.50,0.00); \draw[qgold,line width=.9pt] (0.00,2.50) .. controls +(40:0.95) and +(140:0.95) .. (0.00,2.50); \node[text=qgold!80!black] at (0.00,3.38) {$2$}; \draw[qgold,line width=.9pt] (1.25,2.50) .. controls +(40:0.95) and +(140:0.95) .. (1.25,2.50); \node[text=qgold!80!black] at (1.25,3.38) {$-1$}; \draw[qgold,line width=.9pt] (2.50,2.50) .. controls +(40:0.95) and +(140:0.95) .. (2.50,2.50); \node[text=qgold!80!black] at (2.50,3.38) {$-1$}; \draw[qgold,line width=.9pt] (0.00,1.25) .. controls +(130:0.95) and +(230:0.95) .. (0.00,1.25); \node[text=qgold!80!black] at (-0.88,1.25) {$-1$}; \draw[qgold,line width=.9pt] (1.25,1.25) .. controls +(175:0.95) and +(275:0.95) .. (1.25,1.25); \node[text=qgold!80!black] at (0.63,0.63) {$2$}; \draw[qgold,line width=.9pt] (2.50,1.25) .. controls +(-50:0.95) and +(50:0.95) .. (2.50,1.25); \node[text=qgold!80!black] at (3.38,1.25) {$-1$}; \draw[qgold,line width=.9pt] (0.00,0.00) .. controls +(220:0.95) and +(320:0.95) .. (0.00,0.00); \node[text=qgold!80!black] at (-0.00,-0.88) {$-1$}; \draw[qgold,line width=.9pt] (1.25,0.00) .. controls +(220:0.95) and +(320:0.95) .. (1.25,0.00); \node[text=qgold!80!black] at (1.25,-0.88) {$-1$}; \draw[qgold,line width=.9pt] (2.50,0.00) .. controls +(220:0.95) and +(320:0.95) .. (2.50,0.00); \node[text=qgold!80!black] at (2.50,-0.88) {$2$}; \fill[black!75] (0.00,2.50) circle[radius=2.3pt]; \fill[black!75] (1.25,2.50) circle[radius=2.3pt]; \fill[black!75] (2.50,2.50) circle[radius=2.3pt]; \fill[black!75] (0.00,1.25) circle[radius=2.3pt]; \fill[black!75] (1.25,1.25) circle[radius=2.3pt]; \fill[black!75] (2.50,1.25) circle[radius=2.3pt]; \fill[black!75] (0.00,0.00) circle[radius=2.3pt]; \fill[black!75] (1.25,0.00) circle[radius=2.3pt]; \fill[black!75] (2.50,0.00) circle[radius=2.3pt]; \end{tikzpicture}$$ It is instructive to look as well at the matrix of the simplex itself. Over $M_3$, the program {\tt pictures.py} finds the $9\times9$ matrix in Figure \ref{fig:simplexmatrix}, with the 4 values $3,2,-1,0$. The diagonal points $e_{11},e_{22},e_{33}$ carry a usual triangle, with weights $3$, and loops of weight $2$, and the 6 off-diagonal points carry loops of weight $-1$. Thus the row sums are $8$ at the diagonal points, and $-1$ at the other ones, while the degree is $(J-1)(1)=8\cdot1$, the point being that $1=e_{11}+e_{22}+e_{33}$ is not the all-one vector, as checked by {\tt pictures.py} too. \begin{figure}[H] \centering \begin{tikzpicture}[x=4.2mm,y=4.2mm,font=\tiny] \foreach \i in {1,...,9}\foreach \j in {1,...,9}{ \pgfmathtruncatemacro{\di}{(\i==1||\i==5||\i==9)} \pgfmathtruncatemacro{\dj}{(\j==1||\j==5||\j==9)} \ifnum\di\dj=11 \ifnum\i=\j \fill[qblue!45] (\j-1,-\i) rectangle ++(1,1); \else \fill[qblue] (\j-1,-\i) rectangle ++(1,1); \fi \else \ifnum\i=\j \fill[qgold!80] (\j-1,-\i) rectangle ++(1,1); \fi \fi} \draw[black!30] (0,-9) grid (9,0); \foreach \l [count=\k] in {11,12,13,21,22,23,31,32,33}{\node[left] at (0,-\k+0.5) {$e_{\l}$}; \node[above] at (\k-0.5,0) {$e_{\l}$};} \foreach \c/\v/\y in {qblue/3/-1.5,qblue!45/2/-3,qgold!80/-1/-4.5}{\fill[\c] (10.3,\y) rectangle ++(0.8,0.8); \node[right] at (11.2,\y+0.4) {$\v$};} \draw[black!40] (10.3,-6) rectangle ++(0.8,0.8); \node[right] at (11.2,-5.6) {$0$}; \end{tikzpicture} \caption{The simplex $J-1$ over $M_3$, in the multimatrix basis, with $4$ different entries, while the simplex itself is uncolored.}\label{fig:simplexmatrix} \end{figure} When several blocks are present, the weights of the arrows between different blocks depend on the direction, because $J_{ip}=n_p$ for $i=\bar{i}$, $p=\bar{p}$. For instance, here is the simplex over $M_2\sqcup\{1\}$, the arrows between $M_2$ and the extra point being worth $2$ in one direction, and $1$ in the other direction: $$\begin{tikzpicture}[baseline=(current bounding box.center),font=\scriptsize,>={Stealth[length=1.8mm]}] \draw[qblue,line width=1pt] (0,1.4)--(1.4,0) node[pos=0.3,fill=white,inner sep=1pt] {$2$}; \draw[->,magenta,line width=.9pt,shorten >=2.5pt,shorten <=2.5pt] (0,1.4) to[bend left=12] node[midway,fill=white,inner sep=1pt] {$2$} (4.3,0.7); \draw[->,magenta,line width=.9pt,shorten >=2.5pt,shorten <=2.5pt] (4.3,0.7) to[bend left=12] node[midway,fill=white,inner sep=1pt] {$1$} (0,1.4); \draw[->,magenta,line width=.9pt,shorten >=2.5pt,shorten <=2.5pt] (1.4,0) to[bend left=12] node[midway,fill=white,inner sep=1pt] {$2$} (4.3,0.7); \draw[->,magenta,line width=.9pt,shorten >=2.5pt,shorten <=2.5pt] (4.3,0.7) to[bend left=12] node[midway,fill=white,inner sep=1pt] {$1$} (1.4,0); \draw[qgold,line width=.9pt] (0,1.4) .. controls +(40:0.95) and +(140:0.95) .. (0,1.4); \node[text=qgold!80!black] at (0.00,2.28) {$1$}; \draw[qgold,line width=.9pt] (1.4,1.4) .. controls +(40:0.95) and +(140:0.95) .. (1.4,1.4); \node[text=qgold!80!black] at (1.40,2.28) {$-1$}; \draw[qgold,line width=.9pt] (0,0) .. controls +(220:0.95) and +(320:0.95) .. (0,0); \node[text=qgold!80!black] at (-0.00,-0.88) {$-1$}; \draw[qgold,line width=.9pt] (1.4,0) .. controls +(220:0.95) and +(320:0.95) .. (1.4,0); \node[text=qgold!80!black] at (1.40,-0.88) {$1$}; \fill[black!75] (0,1.4) circle[radius=2.3pt]; \fill[black!75] (1.4,1.4) circle[radius=2.3pt]; \fill[black!75] (0,0) circle[radius=2.3pt]; \fill[black!75] (1.4,0) circle[radius=2.3pt]; \fill[black!75] (4.3,0.7) circle[radius=2.3pt]; \end{tikzpicture}$$ This is still an undirected quantum graph, because the adjoint is taken in $L^2(V)$, with weights $n_i$. Finally, here is the complement of the quantum square, which is the quantum graph $d(x)=YxY^*$, with $Y=U\Lambda$, a quantum version of the perfect matching: $$\begin{tikzpicture}[baseline=(current bounding box.center),font=\scriptsize,>={Stealth[length=1.8mm]}] \draw[qblue,line width=1pt] (0,1.4)--(1.4,0) node[pos=0.3,fill=white,inner sep=1pt] {$1$}; \draw[qblue,line width=1pt] (1.4,1.4)--(0,0) node[pos=0.3,fill=white,inner sep=1pt] {$-1$}; \fill[black!75] (0,1.4) circle[radius=2.3pt]; \fill[black!75] (1.4,1.4) circle[radius=2.3pt]; \fill[black!75] (0,0) circle[radius=2.3pt]; \fill[black!75] (1.4,0) circle[radius=2.3pt]; \end{tikzpicture}$$ So the picture of the simplex has 4 colors, while the simplex itself is uncolored, being a real $\circ$-idempotent. The picture of a quantum graph is an honest picture, in the multimatrix basis of $V$, but its colors are not the colors of the quantum graph, which will be discussed in section 3. The various classes of quantum graphs that we have are as in Figure \ref{fig:classes}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1pt,fill=qblue!5] (0,0) ellipse[x radius=5.7,y radius=1.6]; \draw[qblue,line width=1pt,fill=qblue!10] (1.3,-0.12) ellipse[x radius=4.2,y radius=1.2]; \draw[qgold,line width=1pt,fill=qgold!12] (2.25,-0.25) ellipse[x radius=3.0,y radius=0.82]; \draw[magenta,line width=1pt,fill=magenta!8] (3.3,-0.35) ellipse[x radius=1.45,y radius=0.42]; \node[font=\scriptsize,align=center] at (-4.25,0.1) {quantum graphs\\ $d$ arbitrary}; \node[font=\scriptsize,align=center] at (-1.85,0.0) {undirected\\ and real}; \node[font=\scriptsize,align=center] at (0.45,-0.22) {simple, no\\ loops, as in \cite{mrv}}; \node[font=\scriptsize,align=center] at (3.3,-0.35) {usual graphs}; \end{tikzpicture} \caption{The various classes of quantum graphs. Our quantum graphs are the arbitrary matrices $d$, and the quantum adjacency matrices of \cite{mrv} are, up to normalization, the simple real undirected ones, without loops, which contain the usual graphs.}\label{fig:classes} \end{figure} The simplex will reappear many times below: its quantum symmetry group is $S_V^+$, it has $N^{N-2}$ spanning trees, and it can be colored only when $V$ is classical. Another example, to be discussed in sections 4 and 7, is the Weyl cycle over $M_n$, given by $d(x)=UxU^*+U^*xU$, with $U$ being the shift matrix, whose picture is that of $n$ disjoint copies of the $n$-cycle. \medskip\noindent\textbf{Other quantum graphs.} Quantum graphs, in other senses, have been studied by many people. Vergnioux \cite{ver} introduced the quantum Cayley graphs of the discrete quantum groups, and studied them in the case of trees, with applications to property AO and to $K$-theory. Duan, Severini and Winter \cite{dsw} introduced the noncommutative graphs, as operator systems, in connection with zero-error quantum communication, along with a quantum Lov\'asz number. Kuperberg and Weaver \cite{kwe}, \cite{wea} developed the quantum relations, in the von Neumann algebra framework. Musto, Reutter and Verdon \cite{mrv} introduced the quantum adjacency matrices, as idempotents for the Hadamard product with extra axioms, in a categorical framework, and the quantum automorphism groups of these were introduced by Brannan, Chirvasitu, Eifler, Harris, Paulsen, Su and Wasilewski \cite{bce}. The equivalence between these approaches was clarified by Daws \cite{daw}, the quantum graphs on $M_2$ were classified by Matsuda \cite{mat} and by Gromada \cite{gr2}, and the quantum Cayley graphs were studied by Wasilewski \cite{was} and by Brannan, Gromada, Matsuda, Skalski and Wasilewski \cite{bgm}. Quantum graphs exactly in our sense, namely triples $(B,\psi,d)$ with $d$ arbitrary, along with their quantum automorphism groups, were considered by Fima and Pittau \cite{fpi}, in connection with the free wreath products. In our framework, the quantum adjacency matrices of \cite{mrv} are, up to normalization, the simple real quantum graphs, and we will see in section 3 that, at the level of quantum symmetries, nothing is lost by working with arbitrary matrices $d$ instead. \section{Symmetries, invariance} The quantum permutation groups were introduced by Wang \cite{wa1}, in the framework of the compact quantum groups of Woronowicz \cite{wo1}. Following \cite{wa1}, the quantum permutation group $S_V^+$ is the universal compact quantum group acting on $V$, via a coaction $\Phi:C(V)\to C(V)\otimes C(S_V^+)$, which is a morphism of $*$-algebras, leaving the canonical trace invariant: $$(\psi\otimes id)\Phi=\psi(.)1$$ For $V=\{1,\ldots,N\}$, this coaction is given by a magic unitary, as in Figure \ref{fig:magic}, and the quantum permutations are the quantum versions of the permutation matrices. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[black!30] (0.00,-0.00) circle[radius=3.4pt]; \fill[qblue] (0.45,-0.00) circle[radius=3.4pt]; \draw[black!30] (0.90,-0.00) circle[radius=3.4pt]; \draw[black!30] (1.35,-0.00) circle[radius=3.4pt]; \draw[black!30] (0.00,-0.45) circle[radius=3.4pt]; \draw[black!30] (0.45,-0.45) circle[radius=3.4pt]; \draw[black!30] (0.90,-0.45) circle[radius=3.4pt]; \fill[qblue] (1.35,-0.45) circle[radius=3.4pt]; \fill[qblue] (0.00,-0.90) circle[radius=3.4pt]; \draw[black!30] (0.45,-0.90) circle[radius=3.4pt]; \draw[black!30] (0.90,-0.90) circle[radius=3.4pt]; \draw[black!30] (1.35,-0.90) circle[radius=3.4pt]; \draw[black!30] (0.00,-1.35) circle[radius=3.4pt]; \draw[black!30] (0.45,-1.35) circle[radius=3.4pt]; \fill[qblue] (0.90,-1.35) circle[radius=3.4pt]; \draw[black!30] (1.35,-1.35) circle[radius=3.4pt]; \node at (0.67,-2.0) {permutation matrix}; \shade[ball color=qgold!25] (4.00,-0.00) circle[radius=3.8pt]; \shade[ball color=qgold!25] (4.45,-0.00) circle[radius=3.8pt]; \shade[ball color=qgold!25] (4.90,-0.00) circle[radius=3.8pt]; \shade[ball color=qgold!25] (5.35,-0.00) circle[radius=3.8pt]; \shade[ball color=qgold!70] (4.00,-0.45) circle[radius=3.8pt]; \shade[ball color=qgold!70] (4.45,-0.45) circle[radius=3.8pt]; \shade[ball color=qgold!70] (4.90,-0.45) circle[radius=3.8pt]; \shade[ball color=qgold!70] (5.35,-0.45) circle[radius=3.8pt]; \shade[ball color=qgold!40] (4.00,-0.90) circle[radius=3.8pt]; \shade[ball color=qgold!40] (4.45,-0.90) circle[radius=3.8pt]; \shade[ball color=qgold!40] (4.90,-0.90) circle[radius=3.8pt]; \shade[ball color=qgold!40] (5.35,-0.90) circle[radius=3.8pt]; \shade[ball color=qgold!85] (4.00,-1.35) circle[radius=3.8pt]; \shade[ball color=qgold!85] (4.45,-1.35) circle[radius=3.8pt]; \shade[ball color=qgold!85] (4.90,-1.35) circle[radius=3.8pt]; \shade[ball color=qgold!85] (5.35,-1.35) circle[radius=3.8pt]; \draw[magenta,rounded corners=3pt,line width=.8pt] (3.75,0.2) rectangle (5.6,-0.2); \node[right,text=magenta,font=\scriptsize] at (5.65,0) {$\sum_ju_{ij}=1$}; \draw[magenta,rounded corners=3pt,line width=.8pt] (3.8,0.25) rectangle (4.2,-1.6); \node[left,text=magenta,font=\scriptsize] at (3.75,-1.35) {$\sum_iu_{ij}=1$}; \node at (4.67,-2.25) {magic unitary}; \end{tikzpicture} \caption{For $V=\{1,\ldots,N\}$, the coaction of $S_N^+$ is given by a magic unitary $u=(u_{ij})$, whose entries are projections, summing up to $1$ on each row and column. Its classical version is a permutation matrix, with entries $0,1$.}\label{fig:magic} \end{figure} We write the coaction as follows, $$\Phi(e_j)=\sum_ie_i\otimes u_{ij}$$ and we call $u=(u_{ij})$ the fundamental corepresentation, which is unitary on $L^2(V)$. We have: \begin{theorem} The quantum groups $S_V^+$ are as follows: \begin{enumerate} \item For $V=\{1,\ldots,N\}$ we have $S_V^+=S_N^+$, the quantum permutation group. \item For $V=M_2$ we have $S_V^+=SO_3$, acting by conjugation. \item For $|V|\geq4$, the fusion rules of $S_V^+$ are the same as those of $SO_3$. \end{enumerate} \end{theorem} \begin{proof} These results are from \cite{ba1}, \cite{wa1}, the idea being that the spaces $End(u^{\otimes k})$ are spanned by the diagrams in $\mu$ and $\eta$, and form the Temperley-Lieb algebra of index $N$. \end{proof} In the classical case, $V=\{1,\ldots,N\}$, these diagrams are the noncrossing partitions, and the corresponding Temperley-Lieb diagrams appear by fattening, each point being doubled, as in Figure \ref{fig:nc}. The dimensions of the spaces $Fix(u^{\otimes k})$ are thus the Catalan numbers $1,2,5,14,42,\ldots$, for $N\geq4$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \begin{scope}[shift={(0.0,0)}] \draw[qblue,line width=1.2pt] (0,0)--(0,0.35); \draw[qblue,line width=1.2pt] (0.6,0)--(0.6,0.35); \draw[qblue,line width=1.2pt] (1.2,0)--(1.2,0.35); \foreach \x in {0,0.6,1.2}{\fill[black!75] (\x,0) circle[radius=1.8pt];} \node[font=\scriptsize] at (0.6,-0.35) {$\{1\}\{2\}\{3\}$}; \draw[qgold,line width=1.1pt] (-0.1,-1.9) .. controls (-0.1,-1.58) and (0.1,-1.58) .. (0.1,-1.9); \draw[qgold,line width=1.1pt] (0.5,-1.9) .. controls (0.5,-1.58) and (0.7,-1.58) .. (0.7,-1.9); \draw[qgold,line width=1.1pt] (1.1,-1.9) .. controls (1.1,-1.58) and (1.3,-1.58) .. (1.3,-1.9); \foreach \x in {-0.1,0.1,0.5,0.7,1.1,1.3}{\fill[black!75] (\x,-1.9) circle[radius=1.5pt];} \draw[->,black!40] (0.6,-0.6)--(0.6,-0.95); \end{scope} \begin{scope}[shift={(2.6,0)}] \draw[qblue,line width=1.2pt] (0,0)--(0,0.55)--(0.6,0.55)--(0.6,0); \draw[qblue,line width=1.2pt] (1.2,0)--(1.2,0.35); \foreach \x in {0,0.6,1.2}{\fill[black!75] (\x,0) circle[radius=1.8pt];} \node[font=\scriptsize] at (0.6,-0.35) {$\{12\}\{3\}$}; \draw[qgold,line width=1.1pt] (0.1,-1.9) .. controls (0.1,-1.58) and (0.5,-1.58) .. (0.5,-1.9); \draw[qgold,line width=1.1pt] (-0.1,-1.9) .. controls (-0.1,-1.17) and (0.7,-1.17) .. (0.7,-1.9); \draw[qgold,line width=1.1pt] (1.1,-1.9) .. controls (1.1,-1.58) and (1.3,-1.58) .. (1.3,-1.9); \foreach \x in {-0.1,0.1,0.5,0.7,1.1,1.3}{\fill[black!75] (\x,-1.9) circle[radius=1.5pt];} \draw[->,black!40] (0.6,-0.6)--(0.6,-0.95); \end{scope} \begin{scope}[shift={(5.2,0)}] \draw[qblue,line width=1.2pt] (0,0)--(0,0.35); \draw[qblue,line width=1.2pt] (0.6,0)--(0.6,0.55)--(1.2,0.55)--(1.2,0); \foreach \x in {0,0.6,1.2}{\fill[black!75] (\x,0) circle[radius=1.8pt];} \node[font=\scriptsize] at (0.6,-0.35) {$\{1\}\{23\}$}; \draw[qgold,line width=1.1pt] (-0.1,-1.9) .. controls (-0.1,-1.58) and (0.1,-1.58) .. (0.1,-1.9); \draw[qgold,line width=1.1pt] (0.7,-1.9) .. controls (0.7,-1.58) and (1.1,-1.58) .. (1.1,-1.9); \draw[qgold,line width=1.1pt] (0.5,-1.9) .. controls (0.5,-1.17) and (1.3,-1.17) .. (1.3,-1.9); \foreach \x in {-0.1,0.1,0.5,0.7,1.1,1.3}{\fill[black!75] (\x,-1.9) circle[radius=1.5pt];} \draw[->,black!40] (0.6,-0.6)--(0.6,-0.95); \end{scope} \begin{scope}[shift={(7.8,0)}] \draw[qblue,line width=1.2pt] (0,0)--(0,0.75)--(1.2,0.75)--(1.2,0); \draw[qblue,line width=1.2pt] (0.6,0)--(0.6,0.4); \foreach \x in {0,0.6,1.2}{\fill[black!75] (\x,0) circle[radius=1.8pt];} \node[font=\scriptsize] at (0.6,-0.35) {$\{13\}\{2\}$}; \draw[qgold,line width=1.1pt] (0.1,-1.9) .. controls (0.1,-1.17) and (1.1,-1.17) .. (1.1,-1.9); \draw[qgold,line width=1.1pt] (-0.1,-1.9) .. controls (-0.1,-0.83) and (1.3,-0.83) .. (1.3,-1.9); \draw[qgold,line width=1.1pt] (0.5,-1.9) .. controls (0.5,-1.58) and (0.7,-1.58) .. (0.7,-1.9); \foreach \x in {-0.1,0.1,0.5,0.7,1.1,1.3}{\fill[black!75] (\x,-1.9) circle[radius=1.5pt];} \draw[->,black!40] (0.6,-0.6)--(0.6,-0.95); \end{scope} \begin{scope}[shift={(10.4,0)}] \draw[qblue,line width=1.2pt] (0,0)--(0,0.55)--(1.2,0.55)--(1.2,0); \draw[qblue,line width=1.2pt] (0.6,0)--(0.6,0.55); \foreach \x in {0,0.6,1.2}{\fill[black!75] (\x,0) circle[radius=1.8pt];} \node[font=\scriptsize] at (0.6,-0.35) {$\{123\}$}; \draw[qgold,line width=1.1pt] (0.1,-1.9) .. controls (0.1,-1.58) and (0.5,-1.58) .. (0.5,-1.9); \draw[qgold,line width=1.1pt] (0.7,-1.9) .. controls (0.7,-1.58) and (1.1,-1.58) .. (1.1,-1.9); \draw[qgold,line width=1.1pt] (-0.1,-1.9) .. controls (-0.1,-0.83) and (1.3,-0.83) .. (1.3,-1.9); \foreach \x in {-0.1,0.1,0.5,0.7,1.1,1.3}{\fill[black!75] (\x,-1.9) circle[radius=1.5pt];} \draw[->,black!40] (0.6,-0.6)--(0.6,-0.95); \end{scope} \end{tikzpicture} \caption{The $5$ noncrossing partitions of $3$ points, in blue, which span $Fix(u^{\otimes3})$ for $S_N^+$ with $N\geq4$, and their fattenings, in gold, which are the $5$ Temperley-Lieb diagrams having $6$ points. Each block becomes the boundary of a fattened version of itself.}\label{fig:nc} \end{figure} For $V=M_2$, the action of $SO_3$ in Theorem 3.1 (2) is easy to visualize, as in Figure \ref{fig:so3}, and this is checked numerically by {\tt pictures.py}, on a sample rotation. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \shade[ball color=qblue!10,opacity=.6] (0,0) circle[radius=1.15]; \draw[black!45] (0,0) circle[radius=1.15]; \draw[black!35,dashed] (0,0) ellipse[x radius=1.15,y radius=0.35]; \draw[->,black!55] (0,0)--(0,1.5) node[above] {$\sigma_z$}; \draw[->,black!55] (0,0)--(1.5,0) node[right] {$\sigma_y$}; \draw[->,black!55] (0,0)--(-0.7,-0.5) node[below left] {$\sigma_x$}; \draw[->,magenta,line width=1.1pt] (-0.55,1.02) arc[start angle=200,end angle=520,x radius=0.55,y radius=0.17]; \node[text=magenta] at (1.25,1.15) {$R\in SO_3$}; \node[draw=qgold,rounded corners=3pt,fill=qgold!10,align=center] at (-4.3,0.2) {$x=a_0+a_1\sigma_x+a_2\sigma_y+a_3\sigma_z$\\[2pt] $WxW^*=a_0+\sum_{ij}R_{ij}a_j\sigma_i$}; \end{tikzpicture} \caption{The action of $S_{M_2}^+=SO_3$ on $M_2(\mathbb C)$. A unitary $W\in U_2$ acts by conjugation, fixing $1$, and rotating the traceless part, spanned by the Pauli matrices, via $U_2\to PU_2=SO_3$.}\label{fig:so3} \end{figure} Conversely, by a result of Mrozinski \cite{mrz}, any compact quantum group having the same fusion rules as $SO_3$ is the quantum automorphism group of a finite dimensional $C^*$-algebra, endowed with a homogeneous faithful state, not necessarily a trace. \medskip\noindent\textbf{Planar algebras.} The proof of Theorem 3.1 uses diagrams, and this is not an accident. The spaces $End(u^{\otimes k})$ are part of a planar algebra, in the sense of Jones \cite{jo3}, and this is the key structure behind everything that follows. Let us recall that the planar algebras were introduced in \cite{jo3}, as an axiomatization of the standard invariant of the subfactors \cite{jon}, covering the Temperley-Lieb algebras, the Fuss-Catalan algebras of Bisch and Jones \cite{bjo}, and the spin planar algebras, among many others. In our setting, we have: \begin{theorem}\label{thm:planar} Associated to $V$ is the planar algebra $P=(P_k)$ of the inclusion $\mathbb C\subset C(V)$, having loop parameter $\sqrt N$, and given in even degrees by $$P_{2k}=End(L^2(V)^{\otimes k})$$ and, given a closed subgroup $G\subset S_V^+$, the fixed point spaces $Q_{2k}=End(u^{\otimes k})$, together with their odd analogues, starting with $Q_1=Fix(u)\subset C(V)=P_1$, form a planar subalgebra $Q\subset P$. Moreover, each planar subalgebra $Q\subset P$ appears in this way, from a unique $G$. \end{theorem} \begin{proof} This is from \cite{ba3}, \cite{ba4}. In the classical case, $V=\{1,\ldots,N\}$, the planar algebra $P$ is the spin planar algebra of Jones \cite{jo3}, and the result follows from Woronowicz's Tannakian duality \cite{wo2}, the point being that the planar operations are all made of $\mu,\eta$ and their adjoints, which are intertwiners for any $G\subset S_V^+$. In general the proof is similar, with $P$ coming from the basic construction for $\mathbb C\subset C(V)$, whose Markov trace is our canonical trace $\psi$, up to the factor $N$. The converse statement, in the quantum case, was worked out in detail by Tarrago and Wahl \cite{tw}, in the setting of the subfactor planar algebras, which correspond to the case where $G$ is centrally ergodic, $Fix(u)\cap Z(C(V))=\mathbb C1$. \end{proof} Let us look now at the 2-box space $P_2=End(L^2(V))=M_N(\mathbb C)$, where our quantum graphs live. We represent its elements as boxes having 2 strands on top and 2 strands at bottom, with the shading of the regions, which alternates, not being drawn. In this picture, the 2 Temperley-Lieb diagrams are as follows: $$1=\vcenter{\hbox{\begin{picture}(4,14) \put(0,0){\line(0,1){14}} \put(4,0){\line(0,1){14}} \end{picture}}} \qquad\qquad\qquad E=\vcenter{\hbox{\begin{picture}(4,14) \put(2,14){\oval(4,10)[b]} \put(2,0){\oval(4,10)[t]} \end{picture}}}$$ The first diagram is the identity $1$, and the second one satisfies $E^2=\sqrt N E$, due to the loop parameter. In terms of our matrix $J$, given by $J(x)=\psi(x)1$ and satisfying $J^2=NJ$, we have $J=\sqrt NE$, and the Jones projection is $e=J/N$, which is the orthogonal projection onto $\mathbb C1\subset L^2(V)$. Next, the basic planar operations on the 2-boxes are the multiplication tangle $m(A,B)$, the coproduct tangle $c(A,B)$, and the rotation by $180^\circ$, denoted $\rho(A)$, which are as follows: $$m(A,B)=\vcenter{\hbox{\begin{picture}(8,22) \put(0,4){\framebox(8,5){$B$}} \put(0,13){\framebox(8,5){$A$}} \put(2,0){\line(0,1){4}}\put(6,0){\line(0,1){4}} \put(2,9){\line(0,1){4}}\put(6,9){\line(0,1){4}} \put(2,18){\line(0,1){4}}\put(6,18){\line(0,1){4}} \end{picture}}} \qquad\quad c(A,B)=\vcenter{\hbox{\begin{picture}(20,17) \put(0,6){\framebox(8,5){$A$}} \put(12,6){\framebox(8,5){$B$}} \put(10,11){\oval(8,6)[t]} \put(10,6){\oval(8,6)[b]} \put(2,0){\line(0,1){6}}\put(2,11){\line(0,1){6}} \put(18,0){\line(0,1){6}}\put(18,11){\line(0,1){6}} \end{picture}}} \qquad\quad \rho(A)=\vcenter{\hbox{\begin{picture}(28,21) \put(10,8){\framebox(8,5){$A$}} \put(20,13){\oval(8,6)[t]} \put(20,13){\oval(16,10)[t]} \put(8,8){\oval(8,6)[b]} \put(8,8){\oval(16,10)[b]} \put(0,8){\line(0,1){13}}\put(4,8){\line(0,1){13}} \put(24,0){\line(0,1){13}}\put(28,0){\line(0,1){13}} \end{picture}}}$$ The point now is that our 4 basic operations from section 2, which might look a bit ad hoc at first glance, are in fact the planar operations on the 2-boxes, as follows: \begin{theorem}\label{thm:twobox} The $4$ basic operations on $M_N(\mathbb C)=P_2$ are planar, as follows: \begin{enumerate} \item The composition is the multiplication tangle, $AB=m(A,B)$. \item The adjoint $A^*$ is the involution of $P$, coming from reflection. \item The Hadamard product $A\circ B$ is, up to a scalar, the coproduct tangle $c(A,B)$. \item The operation $\#$ is the involution composed with the rotation, $A^\#=\rho(A)^*$. \end{enumerate} \end{theorem} \begin{proof} Here (1) and (2) hold by definition, the involution of $P_2=End(L^2(V))$ being the adjoint. For (3), in planar terms the multiplication $\mu:L^2(V)^{\otimes 2}\to L^2(V)$ is, up to a scalar, the tangle connecting the 2 middle strands, and so $A\circ B=\mu(A\otimes B)\mu^*$ is, up to a scalar, the coproduct tangle. For (4), the caps and cups are $\psi\mu$ and $\mu^*\eta$, which satisfy the snake relations, so the rotation is: $$\rho(A)=(\psi\mu\otimes 1)(1\otimes A\otimes 1)(1\otimes\mu^*\eta)$$ We obtain $\psi(\rho(A)(x)y)=\psi(xA(y))$, and a direct computation, based on $\psi(z^*)=\overline{\psi(z)}$, gives from this $\rho(A)=(A^*)^\#=(A^\#)^*$, and so $A^\#=\rho(A)^*$, as claimed. \end{proof} Summarizing, the space $End(u)=Q_2$ is a 2-box space, and our 4 basic operations, along with the elements $1,J$, are all planar. All this is 20-year-old folklore, and the program {\tt planar.py} checks the snake relations, the rotation formulas $\rho(A)=(A^*)^\#=(A^\#)^*$, and the fact that $span(1,J)$ is stable under the 4 basic operations. The 2-box spaces, with their 2 multiplications, their rotations and their Fourier transform, are a central theme in the work of Bisch and Jones on the intermediate subfactors and on the singly generated planar algebras \cite{bjo}, \cite{bj2}, \cite{bj3}, continued with Liu in \cite{bjl}, and the connection with the quantum permutation groups goes back to \cite{ba2}, \cite{ba3}, \cite{ba4}. In particular, the various operations on the quantum adjacency matrices which appeared in the recent literature, discussed at the end of section 2, are particular cases of these planar operations. The main result in this section, that we will now formulate and prove, and which is the key to everything that follows, can be pictured as in Figure \ref{fig:invariance}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \node[draw=qblue,line width=1.1pt,rounded corners=6pt,fill=qblue!8,minimum width=2.6cm,minimum height=1.1cm] (E) at (0,0) {$End(u)$}; \draw[->,magenta,line width=1pt] (E.north west) ++(0.25,0) .. controls +(110:1.0) and +(70:1.0) .. ($(E.north west)+(1.05,0)$) node[midway,above,text=black] {$AB$}; \draw[->,magenta,line width=1pt] (E.north east) ++(-1.05,0) .. controls +(110:1.0) and +(70:1.0) .. ($(E.north east)+(-0.25,0)$) node[midway,above,text=black] {$A\circ B$}; \draw[->,magenta,line width=1pt] (E.south west) ++(0.25,0) .. controls +(250:1.0) and +(290:1.0) .. ($(E.south west)+(1.05,0)$) node[midway,below,text=black] {$A^*$}; \draw[->,magenta,line width=1pt] (E.south east) ++(-1.05,0) .. controls +(250:1.0) and +(290:1.0) .. ($(E.south east)+(-0.25,0)$) node[midway,below,text=black] {$A^\#$}; \node[draw=qgold,rounded corners=3pt,fill=qgold!10] (one) at (-3.2,0.35) {$1$}; \node[draw=qgold,rounded corners=3pt,fill=qgold!10] (J) at (-3.2,-0.35) {$J$}; \draw[->,qgold!80!black,line width=1pt] (one)--(E.west |- one); \draw[->,qgold!80!black,line width=1pt] (J)--(E.west |- J); \node[draw=qgold,rounded corners=3pt,fill=qgold!10] (d) at (3.3,0) {$d$}; \draw[<->,qgold!80!black,line width=1pt] (d)--(E.east) node[midway,above,font=\scriptsize,text=black] {$G\subset G^+(X)$}; \end{tikzpicture} \caption{The invariance principle. For any closed subgroup $G\subset S_V^+$, the space $End(u)$ contains $1$ and $J$, and is stable under the $4$ basic operations, and $G$ acts on $X=(V,d)$ precisely when $d\in End(u)$.}\label{fig:invariance} \end{figure} Getting now to quantum graphs, given $X=(V,d)$, its quantum automorphism group is the subgroup $G^+(X)\subset S_V^+$ obtained via the relations $du=ud$. This is the same as asking for $\Phi$ to commute with $d$, in the sense that $\Phi d=(d\otimes id)\Phi$. In the classical case we recover the quantum automorphism groups of graphs from \cite{ba3}. The main tool for computing $G^+(X)$ is: \begin{theorem}[Invariance principle]\label{thm:invariance} Given a closed subgroup $G\subset S_V^+$, the space $End(u)\subset M_N(\mathbb C)$ contains $1$ and $J$, and is stable under the $4$ basic operations. Moreover, if $d\in End(u)$ then the left and right multiplications by the degree $d(1)$ belong to $End(u)$. \end{theorem} \begin{proof} This follows from Theorem \ref{thm:planar} and Theorem \ref{thm:twobox}, but here is as well an independent, short proof. We have $\eta\in Hom(1,u)$, since $\Phi$ is unital, and $\eta^*=\psi\in Hom(u,1)$, since $\psi$ is invariant, so $J=\eta\eta^*\in End(u)$. The stability under composition and adjoint holds because $u$ is unitary. Since $\Phi$ is multiplicative we have $\mu\in Hom(u^{\otimes2},u)$, and so $\mu^*\in Hom(u,u^{\otimes2})$, and for $A,B\in End(u)$ we have $A\otimes B\in End(u^{\otimes2})$, so $A\circ B=\mu(A\otimes B)\mu^*\in End(u)$. Regarding $\#$, since $\Phi$ is involutive, for $A\in End(u)$ we have: $$\Phi(A^\# x)=\Phi(A(x^*))^*=((A\otimes id)\Phi(x^*))^*=((A\otimes id)(\Phi(x)^*))^*=(A^\#\otimes id)\Phi(x)$$ Finally, the left multiplication by $d(1)$ is $\mu(d\eta\otimes id)$, and the right one is $\mu(id\otimes d\eta)$. \end{proof} In planar algebra terms, the invariance principle has the following conceptual formulation, which shows that computing the quantum symmetry groups of the quantum graphs is the same as computing the planar algebras generated by 2-boxes: \begin{theorem}\label{thm:generated} Given a quantum graph $X=(V,d)$, the planar algebra $Q$ of the quantum group $G^+(X)$ is the planar algebra generated by $d$, regarded as a 2-box, $Q=\langle d\rangle$. \end{theorem} \begin{proof} By Theorem \ref{thm:planar}, the correspondence $G\to Q$ is bijective, and reverses the inclusions. Since $G^+(X)$ is the biggest $G\subset S_V^+$ having $d\in End(u)=Q_2$, its planar algebra is the smallest $Q\subset P$ having $d\in Q_2$, namely $\langle d\rangle$. In the classical case, this is the result from \cite{ba3}. Equivalently, the spaces $Hom(u^{\otimes k},u^{\otimes l})$ are spanned by the composable products of $\mu,\eta,d$, their adjoints, and the identity maps, and in this form, the result is due to Fima and Pittau \cite{fpi}. \end{proof} The correspondence $G\to Q$ can be pictured as in Figure \ref{fig:galois}, with the inclusions reversed, and with the quantum automorphism groups of the quantum graphs corresponding to the planar algebras generated by a 2-box. The planar algebras generated by a 2-box were investigated by Bisch and Jones in \cite{bj2}, \cite{bj3}, and with Liu in \cite{bjl}, in the case where the dimension of the 3-box space is small, and this provides a whole new source of examples, and of questions, for our quantum graphs. \medskip\noindent\textbf{Colors.} We can now discuss the colors. As explained in section 2, $(M_N(\mathbb C),\circ,\#)$ is a $C^*$-algebra, isomorphic to $C(V)\otimes C(V)^{op}$, with unit $J$, so a quantum graph over $V$ is the same as a function on the quantum space $V\times V^{op}$, exactly as a colored graph is a function on $\{1,\ldots,N\}^2$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \node[text=qblue,font=\bfseries\small] at (0,2.55) {quantum groups}; \node[text=qgold!80!black,font=\bfseries\small] at (6.4,2.55) {planar algebras}; \foreach \y/\g/\q [count=\i] in {1.8/S_V^+/{TL_N},0.9/G^+(X)/{},0/\{1\}/P}{ \node[draw=qblue,rounded corners=3pt,fill=qblue!8,minimum width=2.2cm,minimum height=5.5mm] (g\i) at (0,\y) {$\g$}; \node[draw=qgold,rounded corners=3pt,fill=qgold!10,minimum width=2.2cm,minimum height=5.5mm] (q\i) at (6.4,\y) {$\q$}; \draw[<->,magenta,line width=.9pt] (g\i.east)--(q\i.west);} \node[rotate=90] at (0,1.35) {$\subset$}; \node[rotate=90] at (0,0.45) {$\subset$}; \node[rotate=-90] at (6.4,1.35) {$\subset$}; \node[rotate=-90] at (6.4,0.45) {$\subset$}; \node[font=\scriptsize,text=magenta] at (3.2,2.05) {$Q_{2k}=End(u^{\otimes k})$}; \node[font=\scriptsize,text=magenta] at (3.2,1.15) {Theorem \ref{thm:generated}}; \node[font=\scriptsize,text=magenta] at (3.2,0.25) {Tannakian duality}; \end{tikzpicture} \caption{The correspondence between the closed subgroups $G\subset S_V^+$ and the planar subalgebras $Q\subset P$, which reverses the inclusions, with the Temperley-Lieb algebra $TL_N$ at the top.}\label{fig:galois} \end{figure} This suggests: \begin{definition} Given a quantum graph $X=(V,d)$ which is $\circ$-normal, $d\circ d^\#=d^\#\circ d$, its colors are the $\circ$-eigenvalues $\lambda_c$, and its color components are the corresponding $\circ$-spectral projections $p_c$: $$d=\sum_c\lambda_cp_c$$ In particular the uncolored quantum graphs, namely the real simple ones, are $\circ$-normal, and they are exactly the $\circ$-projections, $d\circ d=d=d^\#$, having the single color $1$. \end{definition} Indeed, a $\circ$-normal $\circ$-idempotent is a $\circ$-projection, and so is real, while the simple graph from section 2 which is not real is not $\circ$-normal. In the classical case, every $d$ is $\circ$-normal, its colors are its entries, and the color components are the level sets of $d$, so we recover the usual colors. In the quantum case the colors are not the entries in the multimatrix basis: the simplex over $M_n$ has 4 different entries, but only one color, and the Weyl-Cayley graphs in section 4 have pictures colored by roots of unity, while being uncolored. As a consequence of the invariance principle, the colors do not matter: \begin{corollary} For a $\circ$-normal quantum graph $X=(V,d)$, with $d=\sum_c\lambda_cp_c$, we have $$G^+(X)=\bigcap_cG^+(V,p_c)$$ so $G^+(X)$ depends only on the color components, and not on the colors $\lambda_c$. \end{corollary} \begin{proof} The $\circ$-spectral projections $p_c$ are $\circ$-polynomials in $d,d^\#,J$, so they belong to $End(u)$ when $d$ does, and conversely $d=\sum_c\lambda_cp_c$. \end{proof} As a classical illustration, the color decomposition of $K_4$ with a perfect matching colored $1$, and the remaining edges colored $2$, is as in Figure \ref{fig:colors}. Here $G^+(X)$ is the quantum symmetry group of the square $p_2=C_4$, which is the hyperoctahedral quantum group $H_2^+$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qgold,line width=1.2pt] (0.00,1.20)--(1.20,0.00); \draw[qgold,line width=1.2pt] (1.20,1.20)--(0.00,0.00); \draw[qblue,line width=1.2pt] (0.00,1.20)--(1.20,1.20); \draw[qblue,line width=1.2pt] (1.20,1.20)--(1.20,0.00); \draw[qblue,line width=1.2pt] (1.20,0.00)--(0.00,0.00); \draw[qblue,line width=1.2pt] (0.00,0.00)--(0.00,1.20); \fill[black!75] (0.00,1.20) circle[radius=2.2pt]; \fill[black!75] (1.20,1.20) circle[radius=2.2pt]; \fill[black!75] (1.20,0.00) circle[radius=2.2pt]; \fill[black!75] (0.00,0.00) circle[radius=2.2pt]; \node at (0.6,-0.5) {$d$}; \node at (2.0,0.6) {$=$}; \draw[qgold,line width=1.2pt] (2.80,1.20)--(4.00,0.00); \draw[qgold,line width=1.2pt] (4.00,1.20)--(2.80,0.00); \fill[black!75] (2.80,1.20) circle[radius=2.2pt]; \fill[black!75] (4.00,1.20) circle[radius=2.2pt]; \fill[black!75] (4.00,0.00) circle[radius=2.2pt]; \fill[black!75] (2.80,0.00) circle[radius=2.2pt]; \node at (3.4,-0.5) {$p_1$}; \node at (4.8,0.6) {$+\ 2\,\cdot$}; \draw[qblue,line width=1.2pt] (5.60,1.20)--(6.80,1.20); \draw[qblue,line width=1.2pt] (6.80,1.20)--(6.80,0.00); \draw[qblue,line width=1.2pt] (6.80,0.00)--(5.60,0.00); \draw[qblue,line width=1.2pt] (5.60,0.00)--(5.60,1.20); \fill[black!75] (5.60,1.20) circle[radius=2.2pt]; \fill[black!75] (6.80,1.20) circle[radius=2.2pt]; \fill[black!75] (6.80,0.00) circle[radius=2.2pt]; \fill[black!75] (5.60,0.00) circle[radius=2.2pt]; \node at (6.2,-0.5) {$p_2$}; \end{tikzpicture} \caption{The complete graph $K_4$ with a perfect matching colored $1$, in gold, and the remaining $4$-cycle colored $2$, in blue. Its color components are $p_1=2K_2$ and $p_2=C_4$, and $d=p_1+2p_2$.}\label{fig:colors} \end{figure} More generally, for an arbitrary $d$, the quantum group $G^+(V,d)$ depends only on the $C^*$-algebra generated by $d$ and $J$ inside $(M_N(\mathbb C),\circ,\#)$, and this $C^*$-algebra is spanned by its projections, which are simple quantum graphs. Since any finite dimensional $C^*$-algebra is generated by a single element, we conclude that the quantum groups $G^+(X)$, with $X$ arbitrary, are exactly the quantum symmetry groups of the finite families of simple real quantum graphs, namely the intersections $\bigcap_iG^+(V,p_i)$. A single simple graph is in general not enough: the Klein group $\mathbb Z_2\times\mathbb Z_2$ is the quantum symmetry group of $K_4$ with its 3 perfect matchings colored $1,2,3$, by Proposition \ref{prop:cayleyfrucht} below, but of no single graph on 4 vertices. Indeed, such a graph would have $\mathbb Z_2\times\mathbb Z_2$ as classical automorphism group. The graphs invariant under its regular action have 8 or 24 automorphisms, and for its other faithful action, by independent flips of 2 pairs of vertices, the 2 flips can be replaced by quantum flips with noncommuting coefficients, so the quantum symmetry group is not classical, as checked by {\tt rigidity.py}, which goes through all the graphs on 4 vertices. Thus our arbitrary matrices $d$, encoding such families, are the right objects here. Here are some basic computations: \begin{proposition} We have the following results: \begin{enumerate} \item For the empty graph, the simplex, the complete graph with loops, and the graph made of loops, the quantum automorphism group is $S_V^+$. \item For any $X$, we have $G^+(X)=G^+(X^c)$. \item For the quantum graph $X_W=(V,E_W)$ associated to a quotient map $V\to W$, the quantum group $G^+(X_W)$ is the quantum symmetry group of the inclusion $C(W)\subset C(V)$. \end{enumerate} \end{proposition} \begin{proof} Here (1) and (2) follow from $1,J\in End(u)$. For (3), if $E_W\in End(u)$ then $\Phi(C(W))\subset C(W)\otimes C(G)$, and conversely, if $C(W)$ is invariant then, $u$ being unitary, the orthogonal projection onto $C(W)$ belongs to $End(u)$. \end{proof} \medskip\noindent\textbf{Markov inclusions.} Let us discuss now in detail the quantum graphs $X_W$ from (3), which historically are the first quantum graphs, in the sense of the present paper, coming from \cite{ba2}. Given a quotient map $V\to W$, we call the inclusion $C(W)\subset C(V)$ Markov when the canonical trace of $V$ restricts to a multiple of that of $W$, which must be as follows, with $[V:W]=|V|/|W|$ being called the index: $$\psi_V|_{C(W)}=[V:W]\psi_W$$ As basic examples, the classical fibrations $\{1,\ldots,km\}\to\{1,\ldots,k\}$ with fibers of size $m$, the diagonal inclusions $\mathbb C^n\subset M_n(\mathbb C)$, and the diagonal embeddings $M_n(\mathbb C)\subset M_n(\mathbb C)\oplus M_n(\mathbb C)$ are Markov, of index $m$, $n$, $2$. In fact, in the classical case, a quotient map $V\to W$ is Markov precisely when its fibers have the same size, namely $[V:W]$. We have the following result, which shows that the conditional expectation $E_W$ is, up to scalars, a projection with respect to both products, or a biprojection, in the sense of Bisch \cite{bis}: \begin{proposition} For a Markov inclusion $C(W)\subset C(V)$, the conditional expectation satisfies $E_W^2=E_W=E_W^*$ and $E_W\circ E_W=E_W/[V:W]$, and so $d_W=[V:W]E_W$ is a simple, real, undirected, positively weighted quantum graph. \end{proposition} \begin{proof} The first assertion is clear, $E_W$ being the orthogonal projection onto $C(W)$. For the second one, we have $E_W\circ E_W=\mu(E_W\otimes E_W)\mu^*$, and $E_W\otimes E_W$ is the orthogonal projection onto $C(W)\otimes C(W)$. Thus $E_W\circ E_W$ vanishes on $C(W)^\perp$, and on $C(W)$ it equals $\mu_W\mu_W^\star$, with $\mu_W$ being the multiplication of $C(W)$, and $\star$ being the adjoint taken with respect to $\psi_V$. Since $\psi_V=[V:W]\psi_W$ on $C(W)$, we have $\mu_W^\star=\mu_W^*/[V:W]$, with the usual adjoint taken with respect to $\psi_W$, and since $\mu_W\mu_W^*=1$, by Theorem \ref{thm:canonicaltrace}, we obtain $E_W\circ E_W=E_W/[V:W]$. \end{proof} In subfactor theory, the biprojections correspond to the intermediate subfactors, by a result of Bisch \cite{bis}, and in our setting this suggests that the quantum graphs whose adjacency matrix is, up to scalars, a projection for both products, are exactly the graphs $X_W$. Regarding now the quantum symmetries, recall from the introduction that the Fuss-Catalan algebras of Bisch and Jones \cite{bjo} are the 2-colored version of the Temperley-Lieb algebras, describing the intermediate subfactors. In our setting, each leg of $u$ corresponds to 4 strands, colored $a,b,b,a$, with the $a$ strands corresponding to $\mathbb C\subset C(W)$, and the $b$ strands corresponding to $C(W)\subset C(V)$, and the Fuss-Catalan diagrams for $End(u)$ are as follows, with the $a$ strands drawn thick: $$1=\vcenter{\hbox{\begin{picture}(9,14) \thicklines\put(0,0){\line(0,1){14}}\put(9,0){\line(0,1){14}} \thinlines\put(3,0){\line(0,1){14}}\put(6,0){\line(0,1){14}} \end{picture}}} \qquad\qquad [V:W]E_W=\vcenter{\hbox{\begin{picture}(9,14) \thicklines\put(0,0){\line(0,1){14}}\put(9,0){\line(0,1){14}} \thinlines\put(4.5,14){\oval(3,11)[b]}\put(4.5,0){\oval(3,11)[t]} \end{picture}}} \qquad\qquad J=\vcenter{\hbox{\begin{picture}(9,14) \thicklines\put(4.5,14){\oval(9,12)[b]}\put(4.5,0){\oval(9,12)[t]} \thinlines\put(4.5,14){\oval(3,7)[b]}\put(4.5,0){\oval(3,7)[t]} \end{picture}}}$$ Here the diagrams correspond to our matrices, up to scalars. In general, the Fuss-Catalan diagrams are the noncrossing pairings between such 2-colored points, which respect the colors, and they are counted by the Fuss-Catalan numbers. For instance, the 3 diagrams in the above picture correspond to the matrices $1,[V:W]E_W,J$, which for $\mathbb C1\neq C(W)\neq C(V)$ span a space of dimension 3, stable under the 4 basic operations, as checked by {\tt fusscatalan.py}, in agreement with the first Fuss-Catalan number below, while at the endpoints $C(W)=\mathbb C1$ and $C(W)=C(V)$ we have $E_W=J/N$ and $E_W=1$. With these conventions, we have the following result, from \cite{ba2}, which was the starting point of the theory of quantum graphs, as developed in the present paper: \begin{theorem}[Fuss-Catalan]\label{thm:fusscatalan} For a Markov inclusion $C(W)\subset C(V)$, the planar algebra of $G^+(X_W)$ is the planar algebra generated by the biprojection $E_W$, which is the image of the Fuss-Catalan planar algebra of Bisch and Jones, with parameters $\sqrt{|W|}$ and $\sqrt{[V:W]}$. In the generic case, where the Fuss-Catalan diagrams are linearly independent, the dimensions are $$\dim Fix(u^{\otimes k})=\frac{1}{2k+1}\binom{3k}{k}\quad,\quad\dim End(u^{\otimes k})=\frac{1}{4k+1}\binom{6k}{2k}$$ which are the Fuss-Catalan numbers $1,3,12,55,\ldots$ and $3,55,\ldots$ respectively. \end{theorem} \begin{proof} This is from \cite{ba2}. In the present language, by Theorem \ref{thm:generated} the planar algebra of $G^+(X_W)$ is the planar algebra generated by the 2-box $E_W$, which is a biprojection, and by Bisch and Jones \cite{bjo}, this is the image of the Fuss-Catalan planar algebra, spanned by the Fuss-Catalan diagrams, which are counted by the Fuss-Catalan numbers. Equivalently, these count the pairs $\sigma\leq\pi$ of noncrossing partitions of $k$ points, with $\sigma$ finer than $\pi$, with $\pi$ describing the $a$ strands, and $\sigma$ describing the $b$ strands. At exceptional parameters these diagrams can become linearly dependent, and one has to use the image, or equivalently the quotient by the kernel of the representation. \end{proof} For instance, at $k=2$, the Fuss-Catalan number $3$ counts the pairs in Figure \ref{fig:fcpairs}, where the thick strands, corresponding to $\pi$, are the $a$ strands, and the thin ones, corresponding to $\sigma$, are the $b$ strands. \medskip\noindent\textbf{Fibrations.} As a first illustration, for a classical fibration with $k$ fibers of size $m$, we have $d_W=1_k\otimes J_m$, which is made of $k$ copies of the complete graph on $m$ points, with loops. Since loops do not change $G^+$, Corollary \ref{cor:lexico} gives $G^+(X_W)=S_m^+\wr_*S_k^+$, and we recover the fact that the free wreath products $S_m^+\wr_*S_k^+$ have Fuss-Catalan representation theory, with parameters $\sqrt k$ and $\sqrt m$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small,scale=1.35] \draw[qgold,line width=2.4pt] (0.00,0)--(0.00,0.75) (0.90,0)--(0.90,0.75); \draw[qblue,line width=1.1pt] (0.12,0)--(0.12,0.45) (0.78,0)--(0.78,0.45); \fill[black!75] (0.12,0.00) circle[radius=2.0pt]; \fill[black!75] (0.78,0.00) circle[radius=2.0pt]; \draw[qgold,line width=2.4pt] (2.60,0)--(2.60,0.75)--(3.50,0.75)--(3.50,0); \draw[qblue,line width=1.1pt] (2.72,0)--(2.72,0.45) (3.38,0)--(3.38,0.45); \fill[black!75] (2.72,0.00) circle[radius=2.0pt]; \fill[black!75] (3.38,0.00) circle[radius=2.0pt]; \draw[qgold,line width=2.4pt] (5.20,0)--(5.20,0.75)--(6.10,0.75)--(6.10,0); \draw[qblue,line width=1.1pt] (5.32,0)--(5.32,0.45)--(5.98,0.45)--(5.98,0); \fill[black!75] (5.32,0.00) circle[radius=2.0pt]; \fill[black!75] (5.98,0.00) circle[radius=2.0pt]; \node[font=\scriptsize] at (0.45,-0.4) {$\sigma=\pi=|\,|$}; \node[font=\scriptsize] at (3.05,-0.4) {$\sigma=|\,|$, $\pi=\sqcap$}; \node[font=\scriptsize] at (5.65,-0.4) {$\sigma=\pi=\sqcap$}; \end{tikzpicture} \caption{The $3$ pairs $\sigma\leq\pi$ of noncrossing partitions of $2$ points, with $\pi$ in gold and $\sigma$ in blue, which give $\dim Fix(u^{\otimes2})=3$ for $G^+(X_W)$, instead of the Catalan number $2$ for $S_V^+$.}\label{fig:fcpairs} \end{figure} Here is the comparison with $S_V^+$, for the dimensions of the spaces $Fix(u^{\otimes k})$ and $End(u^{\otimes k})$, as computed by {\tt pictures.py}, in the generic case: \begin{center} \begin{tabular}{|c|c|c|c|c|} \hline $k$&$Fix$, $S_V^+$&$Fix$, $G^+(X_W)$&$End$, $S_V^+$&$End$, $G^+(X_W)$\\ \hline $1$&$1$&$1$&$2$&$3$\\ \hline $2$&$2$&$3$&$14$&$55$\\ \hline $3$&$5$&$12$&$132$&$1428$\\ \hline $4$&$14$&$55$&$1430$&$43263$\\ \hline $5$&$42$&$273$&$16796$&$1430715$\\ \hline \end{tabular} \end{center} \medskip The Catalan numbers count the noncrossing partitions, and the Fuss-Catalan numbers count the pairs $\sigma\leq\pi$ of noncrossing partitions, with $\sigma$ finer than $\pi$, which correspond to the 2-colored diagrams of Bisch and Jones. This is in agreement with the general result of Tarrago and Wahl \cite{tw}, stating that the planar algebra of a free wreath product is the free product, in the sense of Bisch and Jones, of the planar algebras of its factors, the Fuss-Catalan algebra being the free product of 2 Temperley-Lieb algebras, and with its consequence that the law of the main character of a free wreath product is the free multiplicative convolution of the laws of the main characters of its factors, as conjectured in \cite{bb1}. As a more interesting example, the diagonal inclusion $\mathbb C^n\subset M_n(\mathbb C)$, which corresponds to the quantum graph over $M_2$ pictured in section 2 for $n=2$, has parameters $\sqrt n$ and $\sqrt n$, the same as the fibration with $n$ fibers of size $n$. Thus, the quantum symmetry group of $\mathbb C^n\subset M_n(\mathbb C)$ and the free wreath product $S_n^+\wr_*S_n^+$, although acting on different quantum spaces, have the same Tannakian category, abstractly, and so the same fusion rules. We will see in section 4 that these 2 quantum groups are in fact 2-cocycle twists of each other. The 2 quantum graphs, for $n=3$, are pictured in Figure \ref{fig:fibrations}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \foreach \f in {0,1,2}{ \begin{scope}[shift={(1.75*\f,0)}] \coordinate (a) at (0,0); \coordinate (b) at (0.9,0); \coordinate (c) at (0.45,0.78); \draw[qblue,line width=1pt] (a)--(b)--(c)--cycle; \foreach \p/\ang in {a/210,b/-30,c/90}{\draw[qblue,line width=.8pt] (\p) .. controls +(\ang-45:0.6) and +(\ang+45:0.6) .. (\p);} \foreach \p in {a,b,c}{\fill[black!75] (\p) circle[radius=2pt];} \end{scope}} \node at (2.2,-1.0) {$1_3\otimes J_3$, over $\{1,\ldots,9\}$}; \begin{scope}[shift={(6.7,-0.55)}] \foreach \a in {1,2,3}\foreach \b in {1,2,3}{\ifnum\a=\b \fill[qgold] (0.95*\b,-0.95*\a+2.9) circle[radius=2.4pt]; \else \draw[qgold,fill=white,line width=.8pt] (0.95*\b,-0.95*\a+2.9) circle[radius=2.2pt]; \fi} \foreach \a in {1,2,3}{\draw[qgold,line width=.8pt] (0.95*\a,-0.95*\a+2.9) .. controls +(105:0.6) and +(165:0.6) .. (0.95*\a,-0.95*\a+2.9); \node[font=\scriptsize,text=qgold!80!black] at (0.95*\a-0.5,-0.95*\a+3.4) {$3$};} \node at (1.9,-0.45) {$3E_W$, over $M_3$}; \end{scope} \end{tikzpicture} \caption{The quantum graphs of the fibration with $3$ fibers of size $3$, made of $3$ copies of the complete graph with loops, and of the diagonal inclusion $\mathbb C^3\subset M_3(\mathbb C)$, made of $3$ loops of weight $3$. Both have $9$ points, and both have Fuss-Catalan symmetry, with parameters $\sqrt3$ and $\sqrt3$.}\label{fig:fibrations} \end{figure} The program {\tt fusscatalan.py} checks the Markov property and the biprojection formulas for the above inclusions, and the fact that the 4 basic operations, applied to $1,J,E_W$, produce a space of dimension 3, which is $\dim End(u)$. It also counts the pairs $\sigma\leq\pi$ of noncrossing partitions, finding $3,12,55$ for $k=2,3,4$, and checks that the corresponding tensors are linearly independent for the fibrations with 3 fibers of size 3, and 4 fibers of size 4, while for 2 fibers of size 2 the ranks drop to $10$ and $35$, this being a non-generic case. Finally, we will need: \begin{definition} A quantum graph $X=(V,d)$ is called quantum vertex-transitive when the fixed point space of $G^+(X)$ is trivial, $Fix(u)=\mathbb C1$. \end{definition} Observe that $Fix(u)$ is a $*$-subalgebra of $C(V)$, which can be thought of as the algebra of functions on the orbit space $V/G^+(X)$, which is a finite quantum space. For instance, for the star $K_{1,3}$, whose quantum automorphism group is $S_3^+=S_3$, the orbit space has 2 points, as in Figure \ref{fig:orbits}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[black!40,line width=1.1pt] (0.00,0.50)--(0.00,1.30); \draw[black!40,line width=1.1pt] (0.00,0.50)--(-0.69,0.10); \draw[black!40,line width=1.1pt] (0.00,0.50)--(0.69,0.10); \fill[magenta] (0.00,0.50) circle[radius=3.2pt]; \fill[qgold] (0.00,1.30) circle[radius=3.2pt]; \fill[qgold] (-0.69,0.10) circle[radius=3.2pt]; \fill[qgold] (0.69,0.10) circle[radius=3.2pt]; \draw[->,black!50,line width=1pt] (1.4,0.5)--(2.4,0.5) node[midway,above,font=\scriptsize] {$V\to V/G$}; \fill[magenta] (3.00,0.50) circle[radius=3.2pt]; \fill[qgold] (3.80,0.50) circle[radius=3.2pt]; \node[right] at (4.3,0.5) {$\dim Fix(u)=2$}; \end{tikzpicture} \caption{The star $K_{1,3}$, whose automorphism group $S_3$ has $2$ orbits, the center and the leaves, so that the orbit space has $2$ points, and $Fix(u)$ is $2$-dimensional.}\label{fig:orbits} \end{figure} In general, the orbit space can be a genuine quantum space, and the quantum vertex-transitive graphs are those for which it is a point. \begin{remark} The planar algebra approach to the quantum permutation groups has been developed in many directions, and we refer here to Jones \cite{jo2} for the planar algebras of the bipartite graphs, to \cite{ba3}, \cite{ba4} for the general correspondence, and to the work of Tarrago and Wahl \cite{tw}, on the free wreath product quantum groups, and their relation with the standard invariants of subfactors. For the planar algebras generated by 2-boxes, which are the planar algebras of the quantum graphs, see Bisch, Jones and Liu \cite{bj2}, \cite{bj3}, \cite{bjl}. \end{remark} \section{Products, Cayley graphs} The basic product operations for graphs have the following quantum versions, using the disjoint unions $V\sqcup W$ and the direct products $V\times W$ of finite quantum spaces, from section 1: \begin{definition} Given quantum graphs $X=(V,d)$ and $Y=(W,e)$, we define: \begin{enumerate} \item The disjoint union $X\sqcup Y=(V\sqcup W,d\oplus e)$. \item The direct product $X\times Y=(V\times W,d\otimes e)$. \item The Cartesian product $X\,\square\,Y=(V\times W,d\otimes1+1\otimes e)$. \item The lexicographic product $X\circ Y=(V\times W,d\otimes J+1\otimes e)$. \end{enumerate} \end{definition} In the classical case, these are the usual products. For instance, the Cartesian product of 2 paths is a grid, the Cartesian product of 2 cycles is a discrete torus, which will reappear in the quantum setting, and the direct product of $K_2$ with a graph $X$ is the bipartite double cover of $X$. Observe that all these products are associative, and that the direct and Cartesian products are commutative, up to isomorphism, while the lexicographic product is not. In the quantum case, by section 1 the canonical trace of $V\times W$ is $\psi_V\otimes\psi_W$, and the multiplication of $V\times W$ is $\mu_V\otimes\mu_W$, up to the flip. Thus we have: \begin{proposition}\label{prop:products} The basic operations are compatible with the tensor products, $$(d\otimes e)\circ(d'\otimes e')=(d\circ d')\otimes(e\circ e')\quad,\quad(d\otimes e)^\#=d^\#\otimes e^\#\quad,\quad J_{V\times W}=J_V\otimes J_W$$ and so the products of simple, real quantum graphs without loops are simple, real, and without loops. Also, we have inclusions $$G^+(X)\,\widehat{*}\,G^+(Y)\subset G^+(X\sqcup Y)\quad,\quad G^+(X)\times G^+(Y)\subset G^+(X\times Y),G^+(X\,\square\,Y)$$ with $\widehat{*}$ being the dual free product of Wang. \end{proposition} \begin{proof} The formulas are clear from definitions. For the lexicographic product, the cross terms $(d\circ1)\otimes e$ and $(1\circ d)\otimes e$ vanish, because $1\circ d=(d\circ1)^\#=0$, by reality. For the inclusions, the coactions are given by $u\oplus v$ and $u\otimes v$, and these commute with the matrices in question. \end{proof} Classically, the products of the path $P_3$ with the segment $K_2$ are as in Figure \ref{fig:products}, and in the quantum case, the same pictures appear, in the multimatrix basis. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \begin{scope}[shift={(0.0,0)}] \draw[magenta,line width=1.1pt] (0.00,0.00)--(1.25,1.15); \draw[magenta,line width=1.1pt] (0.00,1.15)--(1.25,0.00); \draw[magenta,line width=1.1pt] (1.25,0.00)--(2.50,1.15); \draw[magenta,line width=1.1pt] (1.25,1.15)--(2.50,0.00); \foreach \x in {0,1.25,2.5}\foreach \y in {0,1.15}{\fill[black!75] (\x,\y) circle[radius=2.2pt];} \node at (1.25,-0.6) {$P_3\times K_2$, with $4$ edges}; \end{scope} \begin{scope}[shift={(4.1,0)}] \draw[qblue,line width=1.1pt] (0.00,0.00)--(1.25,0.00); \draw[qblue,line width=1.1pt] (1.25,0.00)--(2.50,0.00); \draw[qblue,line width=1.1pt] (0.00,1.15)--(1.25,1.15); \draw[qblue,line width=1.1pt] (1.25,1.15)--(2.50,1.15); \draw[qgold,line width=1.1pt] (0.00,0.00)--(0.00,1.15); \draw[qgold,line width=1.1pt] (1.25,0.00)--(1.25,1.15); \draw[qgold,line width=1.1pt] (2.50,0.00)--(2.50,1.15); \foreach \x in {0,1.25,2.5}\foreach \y in {0,1.15}{\fill[black!75] (\x,\y) circle[radius=2.2pt];} \node at (1.25,-0.6) {$P_3\,\square\,K_2$, with $7$ edges}; \end{scope} \begin{scope}[shift={(8.2,0)}] \draw[qblue,line width=1.1pt] (0.00,0.00)--(1.25,0.00); \draw[qblue,line width=1.1pt] (0.00,0.00)--(1.25,1.15); \draw[qblue,line width=1.1pt] (0.00,1.15)--(1.25,0.00); \draw[qblue,line width=1.1pt] (0.00,1.15)--(1.25,1.15); \draw[qblue,line width=1.1pt] (1.25,0.00)--(2.50,0.00); \draw[qblue,line width=1.1pt] (1.25,0.00)--(2.50,1.15); \draw[qblue,line width=1.1pt] (1.25,1.15)--(2.50,0.00); \draw[qblue,line width=1.1pt] (1.25,1.15)--(2.50,1.15); \draw[qgold,line width=1.1pt] (0.00,0.00)--(0.00,1.15); \draw[qgold,line width=1.1pt] (1.25,0.00)--(1.25,1.15); \draw[qgold,line width=1.1pt] (2.50,0.00)--(2.50,1.15); \foreach \x in {0,1.25,2.5}\foreach \y in {0,1.15}{\fill[black!75] (\x,\y) circle[radius=2.2pt];} \node at (1.25,-0.6) {$P_3\circ K_2$, with $11$ edges}; \end{scope} \end{tikzpicture} \caption{The products of the path $P_3$, drawn horizontally, with the segment $K_2$, drawn vertically. The direct product is made of $2$ paths, the Cartesian product is a ladder, and in the lexicographic product each vertex of $P_3$ is replaced by a copy of $K_2$.}\label{fig:products} \end{figure} For $V,W$ classical, the question of when these inclusions are equalities was investigated in \cite{bb1}, \cite{bb2}, and the results there extend to the quantum case. We call $X=(V,d)$ regular when $d(1)=\lambda1$, and, in the undirected case, connected when $\lambda$ is a simple eigenvalue of $d$, in agreement with section 6, the Laplacian being $L=\lambda-d$. We have: \begin{theorem}\label{thm:products} Let $X=(V,d)$ and $Y=(W,e)$ be undirected, regular and connected quantum graphs, with distinct eigenvalues $\{\lambda_i\}$ and $\{\mu_j\}$. If these eigenvalues are nonzero, and $\{\lambda_i/\lambda_k\}\cap\{\mu_j/\mu_l\}=\{1\}$, then $G^+(X\times Y)=G^+(X)\times G^+(Y)$. Also, if $\{\lambda_i-\lambda_k\}\cap\{\mu_j-\mu_l\}=\{0\}$, then we have $G^+(X\,\square\,Y)=G^+(X)\times G^+(Y)$. \end{theorem} \begin{proof} We follow \cite{bb2}. Let $d=\sum_i\lambda_iP_i$ and $e=\sum_j\mu_jQ_j$ be the spectral decompositions, with $P_1=J_V/|V|$ and $Q_1=J_W/|W|$, which are the orthogonal projections onto $\mathbb C1$, by regularity and connectivity. We have then: $$d\otimes e=\sum_{ij}\lambda_i\mu_jP_i\otimes Q_j\quad,\quad d\otimes1+1\otimes e=\sum_{ij}(\lambda_i+\mu_j)P_i\otimes Q_j$$ Under our assumptions the scalars on the right are distinct, so these are the spectral decompositions. Now let $G=G^+(X\times Y)$, with coaction $\Phi$ on $C(V)\otimes C(W)$ and fundamental corepresentation $w$. Since $End(w)$ is a $C^*$-algebra containing $d\otimes e$, it contains the projections $P_i\otimes Q_j$, and so the projections $P_i\otimes1$ and $1\otimes Q_j$, and the matrices $d\otimes1$ and $1\otimes e$. Thus $\Phi$ leaves invariant the images of $P_1\otimes1$ and $1\otimes Q_1$, which are $1\otimes C(W)$ and $C(V)\otimes1$, and by restriction we obtain coactions $\alpha,\beta$ of $G$ on $V,W$, which preserve the canonical traces, and commute with $d,e$. Since $x\otimes1$ and $1\otimes y$ commute, so do the coefficients of $\alpha$ and $\beta$, and $\Phi(x\otimes y)=\alpha(x)\beta(y)$ shows that $\Phi$ comes from a coaction of $G^+(X)\times G^+(Y)$. Together with Proposition \ref{prop:products}, this gives the first assertion, and the proof of the second one is similar. \end{proof} As an illustration, consider the simplex $K_V=(V,J-1)$, which is undirected, regular and connected, with eigenvalues $N-1$ and $-1$, and with $G^+(K_V)=S_V^+$. We have the following quantum analogues of the prisms and cubes from \cite{bb2}: \begin{corollary}\label{cor:prisms} For any finite quantum space $V$ with $N\geq3$, we have $$G^+(K_2\times K_V)=G^+(K_2\,\square\,K_V)=\mathbb Z_2\times S_V^+$$ and in particular, for $V=M_2$ we obtain in both cases the group $\mathbb Z_2\times SO_3$. \end{corollary} \begin{proof} The ratios of eigenvalues are $\{1,-1\}$ and $\{1,1-N,1/(1-N)\}$, and the differences are $\{0,\pm2\}$ and $\{0,\pm N\}$, so Theorem \ref{thm:products} applies for $N\geq3$. \end{proof} Classically, for $V=\{1,2,3,4\}$, these graphs are as in Figure \ref{fig:prisms}, the cube $K_2\times K_4$ having $\mathbb Z_2\times S_4^+$ as quantum automorphism group, and for $V=M_2$ we obtain a quantum cube, over $\{1,2\}\times M_2$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.0pt] (0.00,0.00)--(1.30,0.00); \draw[qblue,line width=1.0pt] (0.00,0.00)--(0.55,0.45); \draw[qblue,line width=1.0pt] (0.00,0.00)--(0.00,1.30); \draw[qblue,line width=1.0pt] (1.30,0.00)--(1.85,0.45); \draw[qblue,line width=1.0pt] (1.30,0.00)--(1.30,1.30); \draw[qblue,line width=1.0pt] (0.55,0.45)--(1.85,0.45); \draw[qblue,line width=1.0pt] (0.55,0.45)--(0.55,1.75); \draw[qblue,line width=1.0pt] (1.85,0.45)--(1.85,1.75); \draw[qblue,line width=1.0pt] (0.00,1.30)--(1.30,1.30); \draw[qblue,line width=1.0pt] (0.00,1.30)--(0.55,1.75); \draw[qblue,line width=1.0pt] (1.30,1.30)--(1.85,1.75); \draw[qblue,line width=1.0pt] (0.55,1.75)--(1.85,1.75); \fill[black!75] (0.00,0.00) circle[radius=2.5pt]; \fill[black!75] (1.30,0.00) circle[radius=2.5pt]; \fill[black!75] (0.55,0.45) circle[radius=2.5pt]; \fill[black!75] (1.85,0.45) circle[radius=2.5pt]; \fill[black!75] (0.00,1.30) circle[radius=2.5pt]; \fill[black!75] (1.30,1.30) circle[radius=2.5pt]; \fill[black!75] (0.55,1.75) circle[radius=2.5pt]; \fill[black!75] (1.85,1.75) circle[radius=2.5pt]; \node at (0.95,-0.55) {$K_2\times K_4$, the cube}; \draw[qblue,line width=1.0pt] (4.50,1.30)--(5.70,1.30); \draw[qblue,line width=1.0pt] (4.50,1.30)--(5.70,0.10); \draw[qblue,line width=1.0pt] (4.50,1.30)--(4.50,0.10); \draw[qblue,line width=1.0pt] (5.70,1.30)--(5.70,0.10); \draw[qblue,line width=1.0pt] (5.70,1.30)--(4.50,0.10); \draw[qblue,line width=1.0pt] (5.70,0.10)--(4.50,0.10); \draw[qblue,line width=1.0pt] (6.00,1.90)--(7.20,1.90); \draw[qblue,line width=1.0pt] (6.00,1.90)--(7.20,0.70); \draw[qblue,line width=1.0pt] (6.00,1.90)--(6.00,0.70); \draw[qblue,line width=1.0pt] (7.20,1.90)--(7.20,0.70); \draw[qblue,line width=1.0pt] (7.20,1.90)--(6.00,0.70); \draw[qblue,line width=1.0pt] (7.20,0.70)--(6.00,0.70); \draw[qgold,line width=1.2pt] (4.50,1.30)--(6.00,1.90); \draw[qgold,line width=1.2pt] (5.70,1.30)--(7.20,1.90); \draw[qgold,line width=1.2pt] (5.70,0.10)--(7.20,0.70); \draw[qgold,line width=1.2pt] (4.50,0.10)--(6.00,0.70); \fill[black!75] (4.50,1.30) circle[radius=2.2pt]; \fill[black!75] (5.70,1.30) circle[radius=2.2pt]; \fill[black!75] (5.70,0.10) circle[radius=2.2pt]; \fill[black!75] (4.50,0.10) circle[radius=2.2pt]; \fill[black!75] (6.00,1.90) circle[radius=2.2pt]; \fill[black!75] (7.20,1.90) circle[radius=2.2pt]; \fill[black!75] (7.20,0.70) circle[radius=2.2pt]; \fill[black!75] (6.00,0.70) circle[radius=2.2pt]; \node at (5.75,-0.55) {$K_2\,\square\,K_4$, $2$ tetrahedra}; \end{tikzpicture} \caption{The graphs from Corollary \ref{cor:prisms} for $V=\{1,2,3,4\}$. The direct product $K_2\times K_4$ is the cube, as checked by {\tt pictures.py}, and the Cartesian product $K_2\,\square\,K_4$ is made of $2$ copies of $K_4$, joined by a matching.}\label{fig:prisms} \end{figure} The program {\tt products.py} checks, for $V=M_2,M_3$, the spectral conditions, and the fact that the projections $P_1\otimes1$ and $1\otimes Q_1$ are sums of spectral projections of the product graphs. It also checks that the smallest subspace of $M_{2N}(\mathbb C)$ containing $1,J,d$, and stable under the 4 basic operations, has dimension 4, in agreement with $End(w)=End(u)\otimes End(v)$, which is of dimension $2\times2$. \medskip\noindent\textbf{Lexicographic products.} Regarding now the lexicographic products, recall that, classically, $X\circ Y$ is obtained by replacing each vertex of $X$ by a copy of $Y$. In order to discuss its quantum symmetries, we use the free wreath products of Bichon \cite{bi2}, extended to the case where the inner space is quantum, as in Tarrago and Wahl \cite{tw}: \begin{definition} Given closed subgroups $H\subset S_W^+$ and $K\subset S_m^+$, with fundamental corepresentations $u,v$, the free wreath product $H\wr_*K$ is the compact quantum group with $C(H\wr_*K)$ generated by $m$ copies of $C(H)$, with coefficients $u^{(b)}_{ij}$, and by $C(K)$, with the $b$-th copy of $C(H)$ commuting with the $b$-th row of $v$, and with fundamental corepresentation $w_{bi,aj}=u^{(b)}_{ij}v_{ba}$. \end{definition} Pictorially, $H\wr_*K$ acts as in Figure \ref{fig:wreath}, exactly as the usual wreath product, except that the copies of $C(H)$ do not commute. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,fill=qblue!8,line width=1pt] (0.00,1.25) circle[radius=0.45]; \node[font=\scriptsize] at (0.00,1.37) {$W$}; \node[font=\scriptsize,text=qgold!80!black] at (0.00,1.08) {$H_{1}$}; \draw[qblue,fill=qblue!8,line width=1pt] (-1.08,-0.63) circle[radius=0.45]; \node[font=\scriptsize] at (-1.08,-0.51) {$W$}; \node[font=\scriptsize,text=qgold!80!black] at (-1.08,-0.80) {$H_{2}$}; \draw[qblue,fill=qblue!8,line width=1pt] (1.08,-0.63) circle[radius=0.45]; \node[font=\scriptsize] at (1.08,-0.51) {$W$}; \node[font=\scriptsize,text=qgold!80!black] at (1.08,-0.80) {$H_{3}$}; \draw[->,magenta,line width=1pt] (-0.59,1.10) arc[start angle=118,end angle=182,radius=1.25]; \draw[->,magenta,line width=1pt] (-0.66,-1.06) arc[start angle=238,end angle=302,radius=1.25]; \draw[->,magenta,line width=1pt] (1.25,-0.04) arc[start angle=358,end angle=422,radius=1.25]; \node[text=magenta] at (0,0) {$K$}; \end{tikzpicture} \caption{The free wreath product $H\wr_*K$, acting on $m$ copies of $W$, here with $m=3$. Each copy of $W$ is acted upon by its own copy of $H$, and the copies are permuted by $K$, with the copies of $C(H)$ being free.}\label{fig:wreath} \end{figure} The corresponding coaction on $\{1,\ldots,m\}\times W$ is $\Phi(\delta_a\otimes f)=\sum_b\delta_b\otimes\alpha_b(f)(1\otimes v_{ba})$, with $\alpha_b$ being the coaction of the $b$-th copy of $H$ on $W$, and this is the free wreath action from \cite{tw}. Regarding the classical graphs, the lexicographic product result from \cite{bb2}, based on spectral conditions, was extended by Chassaniol \cite{cha} to all regular graphs, and then by \'Arnad\'ottir, van Dobben de Bruyn, Kar, Roberson and Zeman \cite{adk} to all graphs, with necessary and sufficient conditions, of combinatorial nature. In the case where the inner graph is quantum, the result from \cite{bb2} extends as follows, with a slightly weaker assumption, the outer graph not being required to be regular: \begin{theorem}\label{thm:lexico} Let $X=(V,d)$ be undirected, with $V=\{1,\ldots,m\}$ classical, and $Y=(W,e)$ be undirected, regular of valence $\lambda_1$ and connected. If the eigenvalues $\{\lambda_i\}$ of $e$ and $\{\mu_j\}$ of $d$ satisfy $$\{\lambda_1-\lambda_i\,|\,i\neq1\}\cap\{-|W|\mu_j\}=\emptyset$$ then the quantum automorphism group of $X\circ Y$ is given by $G^+(X\circ Y)=G^+(Y)\wr_*G^+(X)$. \end{theorem} \begin{proof} We follow \cite{bb2}. Since $v$ commutes with $d$, and the $\alpha_b$ commute with $e$ and preserve $\psi_W$, the above coaction $\Phi$ of $G^+(Y)\wr_*G^+(X)$ commutes with $d\otimes J+1\otimes e$, so we have an inclusion $\supset$. Conversely, let $d=\sum_j\mu_jR_j$ and $e=\sum_i\lambda_iQ_i$ be the spectral decompositions, with $Q_1=J/|W|$. We have: $$d\otimes J+1\otimes e=\sum_j(\lambda_1+|W|\mu_j)R_j\otimes Q_1+\sum_{i\neq1}\lambda_i\,1\otimes Q_i$$ By our assumption the scalars are distinct, so this is the spectral decomposition. Thus, with $G=G^+(X\circ Y)$ and $\Phi,w$ as before, $End(w)$ contains $1\otimes Q_1$ and $1\otimes Q_i$, and so $1\otimes e$ and $d\otimes J$. Since $C(V)\otimes1$ is the image of $1\otimes Q_1$, it is invariant, and we can write $\Phi(\delta_a\otimes1)=\sum_b\delta_b\otimes1\otimes y_{ba}$, with $y$ being a magic unitary commuting with $d$. We can write as well $\Phi(1\otimes f)=\sum_b\delta_b\otimes\alpha_b(f)$, with the $\alpha_b$ being unital $*$-morphisms, commuting with $e$. Since $\delta_a\otimes1$ and $1\otimes f$ commute, the coefficients of $\alpha_b$ commute with the $b$-th row of $y$. Also, $w_{bi,aj}=u^{(b)}_{ij}y_{ba}$, with $u^{(b)}$ being the coefficient matrix of $\alpha_b$, and since the elements $y_{ba}$ are projections, summing up to 1 over $a$, and commuting with $u^{(b)}$, the unitarity conditions on the rows of $w$ give the corresponding conditions for $u^{(b)}$. Finally, with $\varphi_b=(\psi_W\otimes id)\alpha_b$, the invariance of $\psi_V\otimes\psi_W$ gives $\sum_b\varphi_b(f)y_{ba}=\psi_W(f)$, and by multiplying by $y_{ca}$ and summing over $a$ we get $\varphi_c=\psi_W(.)1$, so the $\alpha_b$ preserve $\psi_W$. Thus we have a morphism $C(G^+(Y)\wr_*G^+(X))\to C(G)$, inverse to the one coming from the inclusion $\supset$. \end{proof} With $X$ being the empty graph on $m$ points, $X\circ Y$ is the disjoint union $mY$ of $m$ copies of $Y$, and we recover the free product formula from \cite{bb1}. Also, with $X=C_m$ being the $m$-cycle, whose quantum automorphism group is the dihedral group $D_m$ for $m\geq5$, as shown in \cite{bb2}, we obtain: \begin{corollary}\label{cor:lexico} For any finite quantum space $W$, we have the formula $$G^+(mK_W)=S_W^+\wr_*S_m^+$$ and for any $m\geq5$, we have as well $G^+(C_m\circ K_W)=S_W^+\wr_*D_m$. \end{corollary} \begin{proof} The first assertion follows from Theorem \ref{thm:lexico}, with $d=0$, the condition there being $\lambda_1\neq\lambda_i$ for $i\neq1$, which holds by connectivity. For the second one, the eigenvalues of $K_W$ being $|W|-1$ and $-1$, the condition is that $-1$ is not an eigenvalue of $C_m$, which holds when $3\nmid m$. In general, we use the complement. With $d$ being the adjacency matrix of $C_m$, that of $C_m\circ K_W$ is $D=d\otimes J+1\otimes(J-1)$, so $J-1-D=H\otimes J$, with $H=J-1-d$ being the adjacency matrix of the complement of $C_m$, and so $(J-1-D)^2=|W|H^2\otimes J$. The rows of $H$ are distinct, with common sum $m-3$, so $(H^2)_{ii}=m-3$, and $(H^2)_{ij},qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (0.00,0.50)--(0.50,0.00); \draw[->,qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (0.50,0.00)--(0.00,-0.50); \draw[->,qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (0.00,-0.50)--(-0.50,-0.00); \draw[->,qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (-0.50,-0.00)--(0.00,0.50); \fill[black!75] (0.00,0.50) circle[radius=2pt]; \fill[black!75] (0.50,0.00) circle[radius=2pt]; \fill[black!75] (0.00,-0.50) circle[radius=2pt]; \fill[black!75] (-0.50,-0.00) circle[radius=2pt]; \draw[->,qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (1.45,0.50)--(1.95,0.00); \draw[->,qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (1.95,0.00)--(1.45,-0.50); \draw[->,qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (1.45,-0.50)--(0.95,-0.00); \draw[->,qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (0.95,-0.00)--(1.45,0.50); \fill[black!75] (1.45,0.50) circle[radius=2pt]; \fill[black!75] (1.95,0.00) circle[radius=2pt]; \fill[black!75] (1.45,-0.50) circle[radius=2pt]; \fill[black!75] (0.95,-0.00) circle[radius=2pt]; \draw[->,qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (2.90,0.50)--(3.40,0.00); \draw[->,qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (3.40,0.00)--(2.90,-0.50); \draw[->,qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (2.90,-0.50)--(2.40,-0.00); \draw[->,qblue,line width=1pt,shorten >=3pt,shorten <=3pt] (2.40,-0.00)--(2.90,0.50); \fill[black!75] (2.90,0.50) circle[radius=2pt]; \fill[black!75] (3.40,0.00) circle[radius=2pt]; \fill[black!75] (2.90,-0.50) circle[radius=2pt]; \fill[black!75] (2.40,-0.00) circle[radius=2pt]; \node at (1.45,-1.05) {$3\vec{C}_4$}; \begin{scope}[shift={(5.3,-1.3)},x=2.2mm,y=2.2mm] \fill[qgold] (0,10) rectangle ++(1,1); \fill[qgold] (1,9) rectangle ++(1,1); \fill[qgold] (2,8) rectangle ++(1,1); \fill[qgold] (3,11) rectangle ++(1,1); \fill[qgold] (4,6) rectangle ++(1,1); \fill[qgold] (5,5) rectangle ++(1,1); \fill[qgold] (6,4) rectangle ++(1,1); \fill[qgold] (7,7) rectangle ++(1,1); \fill[qgold] (8,2) rectangle ++(1,1); \fill[qgold] (9,1) rectangle ++(1,1); \fill[qgold] (10,0) rectangle ++(1,1); \fill[qgold] (11,3) rectangle ++(1,1); \draw[black!20] (0,0) grid (12,12); \draw[black!60] (0,0) rectangle (12,12); \foreach \k in {4,8}{\draw[black!60] (\k,0)--(\k,12); \draw[black!60] (0,\k)--(12,\k);} \end{scope} \node at (6.62,-1.75) {the matrix of $3\vec{C}_4$}; \end{tikzpicture} \caption{The graph $3\vec{C}_4$, formed by $3$ oriented squares, and its adjacency matrix, in the basis $(a,i)$, ordered by $i$. The matrix is block-diagonal, with circulant blocks, and the matrices commuting with it are block-circulant.}\label{fig:reflection} \end{figure} For $s=1$ we recover $S_N^+$, and for $s=2$ we obtain the quantum hyperoctahedral group $H_N^+$, which is the quantum symmetry group of $N$ segments, and whose fundamental corepresentation is orthogonal, with $u_{ij}u_{ik}=u_{ji}u_{ki}=0$ for $j\neq k$. In general, the matrices $u_k=(u_{ij}^k)$ with $k\in\mathbb Z_s$, where $u_{ij}^0=p_{ij}$, are corepresentations, because $u_{ij}u_{ik}=0$ for $j\neq k$, and the magic unitary $w$ is conjugate, via a Fourier transform over $\mathbb Z_s$, to $u_0\oplus\ldots\oplus u_{s-1}$. The representation theory of $H_N^{s+}$ is as follows: \begin{theorem}\label{thm:reflfusion} For $N\geq4$, the irreducible corepresentations of $H_N^{s+}$ can be labeled $r_x$, with $x$ ranging over the words over $\mathbb Z_s$, with involution $\bar{r}_x=r_{\bar{x}}$, where $\overline{i_1\ldots i_k}=(-i_k)\ldots(-i_1)$, and with fusion rules $$r_x\otimes r_y=\sum_{x=vz,y=\bar{z}w}r_{vw}+r_{v\cdot w}$$ where $v\cdot w$ is obtained from $vw$ by adding the last letter of $v$ to the first letter of $w$, the second term being present only when $v,w\neq\emptyset$. Moreover, we have $u_k=r_k+\delta_{k0}1$, for any $k\in\mathbb Z_s$. \end{theorem} \begin{proof} This is from \cite{bve}, and is also a particular case of the fusion rules for the free wreath products $G\wr_*S_N^+$ found by Lemeux and Tarrago \cite{lta}. For the quantum space versions, with $S_N^+$ replaced by $S_V^+$, see Pittau \cite{pit}, for the duals of discrete groups, which include the quantum reflection groups $\mathbb Z_s\wr_*S_V^+$, and Fima and Pittau \cite{fpi}, in general. The idea is that, by Tannakian duality, the spaces $Hom(u_{i_1}\otimes\ldots\otimes u_{i_k},u_{j_1}\otimes\ldots\otimes u_{j_l})$ are spanned by the maps $T_\pi$ associated to the noncrossing partitions $\pi$ having the property that, in each block, the sum of the $i$ indices equals the sum of the $j$ indices, modulo $s$. The fusion rules follow from this by counting such partitions, as in the case $s=1$, where we obtain the fusion rules of $S_N^+$, which are those of $SO_3$. \end{proof} The first values of $s$ are pictured in Figure \ref{fig:reflections}, at $N=3$. Observe that $\vec{C}_1$ is a loop, and $\vec{C}_2$ is a segment, with both orientations, so for $s=1,2$ we obtain $S_N^+$ and $H_N^+$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[->,qblue,line width=1pt] (0.00,0.4) .. controls +(55:0.9) and +(125:0.9) .. (0.00,0.4); \fill[black!75] (0.00,0.40) circle[radius=2.4pt]; \draw[->,qblue,line width=1pt] (0.65,0.4) .. controls +(55:0.9) and +(125:0.9) .. (0.65,0.4); \fill[black!75] (0.65,0.40) circle[radius=2.4pt]; \draw[->,qblue,line width=1pt] (1.30,0.4) .. controls +(55:0.9) and +(125:0.9) .. (1.30,0.4); \fill[black!75] (1.30,0.40) circle[radius=2.4pt]; \node at (0.65,-0.5) {$s=1$, $S_3^+$}; \draw[<->,qblue,line width=1pt,shorten >=2pt,shorten <=2pt] (2.90,0)--(2.90,1.1); \fill[black!75] (2.90,0.00) circle[radius=2.4pt]; \fill[black!75] (2.90,1.10) circle[radius=2.4pt]; \draw[<->,qblue,line width=1pt,shorten >=2pt,shorten <=2pt] (3.55,0)--(3.55,1.1); \fill[black!75] (3.55,0.00) circle[radius=2.4pt]; \fill[black!75] (3.55,1.10) circle[radius=2.4pt]; \draw[<->,qblue,line width=1pt,shorten >=2pt,shorten <=2pt] (4.20,0)--(4.20,1.1); \fill[black!75] (4.20,0.00) circle[radius=2.4pt]; \fill[black!75] (4.20,1.10) circle[radius=2.4pt]; \node at (3.55,-0.5) {$s=2$, $H_3^+$}; \draw[->,qblue,line width=1pt,shorten >=2.5pt,shorten <=2.5pt] (6.00,1.00)--(5.52,0.17); \draw[->,qblue,line width=1pt,shorten >=2.5pt,shorten <=2.5pt] (5.52,0.17)--(6.48,0.17); \draw[->,qblue,line width=1pt,shorten >=2.5pt,shorten <=2.5pt] (6.48,0.17)--(6.00,1.00); \fill[black!75] (6.00,1.00) circle[radius=2.4pt]; \fill[black!75] (5.52,0.17) circle[radius=2.4pt]; \fill[black!75] (6.48,0.17) circle[radius=2.4pt]; \draw[->,qblue,line width=1pt,shorten >=2.5pt,shorten <=2.5pt] (7.40,1.00)--(6.92,0.17); \draw[->,qblue,line width=1pt,shorten >=2.5pt,shorten <=2.5pt] (6.92,0.17)--(7.88,0.17); \draw[->,qblue,line width=1pt,shorten >=2.5pt,shorten <=2.5pt] (7.88,0.17)--(7.40,1.00); \fill[black!75] (7.40,1.00) circle[radius=2.4pt]; \fill[black!75] (6.92,0.17) circle[radius=2.4pt]; \fill[black!75] (7.88,0.17) circle[radius=2.4pt]; \draw[->,qblue,line width=1pt,shorten >=2.5pt,shorten <=2.5pt] (8.80,1.00)--(8.32,0.17); \draw[->,qblue,line width=1pt,shorten >=2.5pt,shorten <=2.5pt] (8.32,0.17)--(9.28,0.17); \draw[->,qblue,line width=1pt,shorten >=2.5pt,shorten <=2.5pt] (9.28,0.17)--(8.80,1.00); \fill[black!75] (8.80,1.00) circle[radius=2.4pt]; \fill[black!75] (8.32,0.17) circle[radius=2.4pt]; \fill[black!75] (9.28,0.17) circle[radius=2.4pt]; \node at (7.4,-0.5) {$s=3$, $H_3^{3+}$}; \end{tikzpicture} \caption{The graphs $3\vec{C}_s$ for $s=1,2,3$, namely $3$ loops, $3$ segments and $3$ oriented triangles, with quantum automorphism groups $S_3^+$, $H_3^+$ and $H_3^{3+}$, the quantum reflection groups.}\label{fig:reflections} \end{figure} The program {\tt reflection.py} checks, for small values of $N,s$, that $N\vec{C}_s$ is normal, regular, with $N$ components, that its classical automorphism group, computed by brute force, has order $s^NN!$, which is the order of $H_N^s=\mathbb Z_s\wr S_N$, that the matrices commuting with $d$ are block-circulant, and that the smallest subspace containing $1,J,d$ and stable under the 4 basic operations has dimension $s+1$ for $N\geq2$, in agreement with $w\sim1+r_0+r_1+\ldots+r_{s-1}$. It also implements the above fusion rules, and checks that the multiplicity of $1$ in $c_{i_1}\otimes\ldots\otimes c_{i_k}$, with $c_i=r_i+\delta_{i0}1$, is the number of noncrossing partitions of $i_1\ldots i_k$ whose blocks have sums $0$ modulo $s$, for $s\leq4$ and $k\leq7$, as required by the above proof. \medskip\noindent\textbf{Cayley graphs.} Let us discuss now the Cayley graphs. For a finite quantum group $G$, the canonical trace of $C(G)$ is $|G|$ times the Haar state, so the comultiplication $\Delta$, regarded as a coaction of $G$ on itself, is $\psi$-preserving, and we have $G\subset S_G^+$. \begin{definition} Given a finite quantum group $G$ and a linear form $\varphi:C(G)\to\mathbb C$, the associated quantum Cayley graph is $X_\varphi=(G,d_\varphi)$, with $d_\varphi=(\varphi\otimes id)\Delta$. \end{definition} For a usual group $G$ and $\varphi$ the indicator function of $S\subset G$, we have $d_\varphi f(h)=\sum_{g\in S}f(gh)$, so $X_\varphi$ is the Cayley graph of $G$, with edges $h\to gh$. Quantum Cayley graphs were studied by Wasilewski \cite{was}, and the quantum symmetries of the classical Cayley graphs of abelian groups were studied by Gromada \cite{gr3}. \begin{proposition} We have $G\subset G^+(X_\varphi)$, for any finite quantum group $G$, and any $\varphi$. \end{proposition} \begin{proof} By coassociativity, we have the following computation: $$\Delta d_\varphi=(\varphi\otimes id\otimes id)(\Delta\otimes id)\Delta=(d_\varphi\otimes id)\Delta$$ Thus $d_\varphi$ commutes with the coaction $\Delta$, as claimed. \end{proof} The classical Frucht theorem \cite{fru} states that any finite group is the automorphism group of a graph. The quantum Frucht theorem, due to Brannan, Gromada, Matsuda, Skalski and Wasilewski \cite{bgm}, states that any finite quantum group is of the form $G^+(X)$, for a suitable undirected quantum graph $X$. Their general construction combines a finite family of quantum Cayley graphs of $G$ without loops, and they also study when disjoint colors suffice. In our framework, where a quantum graph can carry arbitrary complex colors, a single quantum Cayley graph does the job: \begin{proposition}\label{prop:cayleyfrucht} For a finite quantum group $G$, the maps $d_\varphi$ form a $C^*$-algebra $A_G$ of operators on $L^2(G)$, and if $d_\varphi$ generates $A_G$, as a $C^*$-algebra, then $G^+(X_\varphi)=G$. In particular, any finite quantum group is of the form $G^+(X_\varphi)$. \end{proposition} \begin{proof} By coassociativity $d_\varphi d_\nu=d_{(\nu\otimes\varphi)\Delta}$, and with respect to the Haar state, which is $\psi/N$, we have $d_\varphi^*=d_{\bar{\varphi}S}$, with $\bar{\varphi}(x)=\overline{\varphi(x^*)}$, so the maps $d_\varphi$ form a $C^*$-algebra. Now let $\alpha$ be the coaction of $H=G^+(X_\varphi)$. Since $End(u)$ is a $C^*$-algebra, $\alpha$ commutes with all the maps $d_\nu$, and with $\pi=(\varepsilon\otimes id)\alpha$, where $\varepsilon$ is the counit, we obtain, by using $\varepsilon d_\nu=\nu$: $$(\nu\otimes id)\alpha=\pi d_\nu=(\nu\otimes\pi)\Delta$$ Since this holds for any $\nu$, we have $\alpha=(id\otimes\pi)\Delta$, so $\pi$ maps the coefficients of $\Delta$ to those of $\alpha$, and $H\subset G$, this being the argument of Lemma 4.2 in \cite{bgm}. Together with the previous proposition, this gives $H=G$. Finally, any finite dimensional $C^*$-algebra is generated by a single element, so suitable linear forms $\varphi$ exist. \end{proof} For a usual group, the condition is that the colors $\varphi(g)$ are generic. For instance for $G=\mathbb Z_2\times\mathbb Z_2$ and $\varphi=(0,1,2,3)$, the eigenvalues of $d_\varphi$ are $6,0,-2,-4$, which are distinct, so $d_\varphi$ generates the 4-dimensional algebra $A_G$, and we obtain the colored $K_4$ from section 3, pictured in Figure \ref{fig:klein}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qgold,line width=1.2pt] (0.00,1.30)--(1.30,1.30); \draw[qgold,line width=1.2pt] (0.00,0.00)--(1.30,0.00); \draw[qblue,line width=1.2pt] (0.00,1.30)--(0.00,0.00); \draw[qblue,line width=1.2pt] (1.30,1.30)--(1.30,0.00); \draw[magenta,line width=1.2pt] (0.00,1.30)--(1.30,0.00); \draw[magenta,line width=1.2pt] (1.30,1.30)--(0.00,0.00); \node[font=\scriptsize] at (0.65,1.50) {$1$}; \node[font=\scriptsize] at (0.65,-0.22) {$1$}; \node[font=\scriptsize] at (-0.20,0.65) {$2$}; \node[font=\scriptsize] at (1.50,0.65) {$2$}; \node[font=\scriptsize,fill=white,inner sep=1pt] at (0.40,0.90) {$3$}; \node[font=\scriptsize,fill=white,inner sep=1pt] at (0.90,0.90) {$3$}; \fill[black!75] (0.00,1.30) circle[radius=2.3pt] node[above left] {$0$}; \fill[black!75] (1.30,1.30) circle[radius=2.3pt] node[above right] {$a$}; \fill[black!75] (0.00,0.00) circle[radius=2.3pt] node[below left] {$b$}; \fill[black!75] (1.30,0.00) circle[radius=2.3pt] node[below right] {$c$}; \end{tikzpicture} \caption{The colored Cayley graph of $\mathbb Z_2\times\mathbb Z_2=\{0,a,b,c\}$, with $\varphi=(0,1,2,3)$, which is $K_4$ with its $3$ perfect matchings colored $1,2,3$. Its quantum symmetry group is $\mathbb Z_2\times\mathbb Z_2$, while the single graphs on $4$ vertices invariant under $\mathbb Z_2\times\mathbb Z_2$ have $8$ or $24$ automorphisms.}\label{fig:klein} \end{figure} The program {\tt rigidity.py} checks this, as well as the fact that for $G=\mathbb Z_2\times\mathbb Z_2$ and $S_3$, with random colors, $d_\varphi$ generates $A_G$, and the classical automorphisms of $X_\varphi$ are the right translations. \medskip\noindent\textbf{Weyl-Cayley graphs.} We discuss now a family of examples over $V=M_n$, which are quantum analogues of the Cayley graphs of $\mathbb Z_n\times\mathbb Z_n$. Let $U,\Lambda\in M_n(\mathbb C)$ be the shift and clock matrices, $Ue_a=e_{a+1}$, $\Lambda e_a=\omega^ae_a$ with $\omega=e^{2\pi i/n}$, and set $U_g=U^{g_1}\Lambda^{g_2}$ for $g\in\mathbb Z_n^2$. We have $U_gU_hU_g^*=\omega^{\sigma(g,h)}U_h$, with $\sigma(g,h)=g_2h_1-g_1h_2$. For $n=3$, the $9$ matrices $U_g$ are as in Figure \ref{fig:weyl}, as computed by {\tt pictures.py}, each of them having exactly one nonzero entry in each row and each column. The maps $Ad_{U_g}(x)=U_gxU_g^*$, and more generally the maps $Ad_{A,B}(x)=AxB^*$, behave very nicely with respect to the Hadamard product, as follows: \begin{lemma}\label{lem:adab} For $A,B\in U_n$, the maps $Ad_{A,B}(x)=AxB^*$ satisfy $$Ad_{A,A}\circ Ad_{B,B}=\frac{Tr(A^*B)}{n}\,Ad_{A,B}$$ and in particular the maps $Ad_{U_g}=Ad_{U_g,U_g}$ are pairwise orthogonal $\circ$-projections, summing up to $J$. \end{lemma} \begin{proof} We have the following formula, coming from section 1: $$\mu^*(e_{pq})=\frac{1}{n}\sum_ce_{pc}\otimes e_{cq}$$ Thus we obtain the following formula, which gives the first assertion: $$(Ad_{A,A}\circ Ad_{B,B})(e_{pq})=\frac{1}{n}\sum_cAe_{pc}A^*Be_{cq}B^*=\frac{1}{n}Tr(A^*B)Ae_{pq}B^*$$ The matrices $U_g$ being orthogonal with respect to the trace, the $Ad_{U_g}$ are orthogonal $\circ$-projections. Finally, the following formula is the well-known twirling formula: $$\sum_gU_gxU_g^*=nTr(x)1=J(x)$$ \end{proof} In particular, the $n^2$ matrices $U_g$, pictured in Figure \ref{fig:weyl} for $n=3$, form an orthogonal basis of $M_n(\mathbb C)$, which is a unitary error basis, in the sense of quantum information. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[qblue] (0.00,-0.00) rectangle ++(0.36,0.36); \fill[qblue] (0.36,-0.36) rectangle ++(0.36,0.36); \fill[qblue] (0.72,-0.72) rectangle ++(0.36,0.36); \draw[black!25,step=0.36] (0.00,-0.72) grid ++(1.08,1.08); \draw[black!60] (0.00,-0.72) rectangle ++(1.08,1.08); \node[font=\scriptsize] at (0.54,-0.98) {$U_{00}$}; \fill[qblue] (1.65,-0.00) rectangle ++(0.36,0.36); \fill[qgold] (2.01,-0.36) rectangle ++(0.36,0.36); \fill[magenta] (2.37,-0.72) rectangle ++(0.36,0.36); \draw[black!25,step=0.36] (1.65,-0.72) grid ++(1.08,1.08); \draw[black!60] (1.65,-0.72) rectangle ++(1.08,1.08); \node[font=\scriptsize] at (2.19,-0.98) {$U_{01}$}; \fill[qblue] (3.30,-0.00) rectangle ++(0.36,0.36); \fill[magenta] (3.66,-0.36) rectangle ++(0.36,0.36); \fill[qgold] (4.02,-0.72) rectangle ++(0.36,0.36); \draw[black!25,step=0.36] (3.30,-0.72) grid ++(1.08,1.08); \draw[black!60] (3.30,-0.72) rectangle ++(1.08,1.08); \node[font=\scriptsize] at (3.84,-0.98) {$U_{02}$}; \fill[qblue] (0.72,-1.65) rectangle ++(0.36,0.36); \fill[qblue] (0.00,-2.01) rectangle ++(0.36,0.36); \fill[qblue] (0.36,-2.37) rectangle ++(0.36,0.36); \draw[black!25,step=0.36] (0.00,-2.37) grid ++(1.08,1.08); \draw[black!60] (0.00,-2.37) rectangle ++(1.08,1.08); \node[font=\scriptsize] at (0.54,-2.63) {$U_{10}$}; \fill[magenta] (2.37,-1.65) rectangle ++(0.36,0.36); \fill[qblue] (1.65,-2.01) rectangle ++(0.36,0.36); \fill[qgold] (2.01,-2.37) rectangle ++(0.36,0.36); \draw[black!25,step=0.36] (1.65,-2.37) grid ++(1.08,1.08); \draw[black!60] (1.65,-2.37) rectangle ++(1.08,1.08); \node[font=\scriptsize] at (2.19,-2.63) {$U_{11}$}; \fill[qgold] (4.02,-1.65) rectangle ++(0.36,0.36); \fill[qblue] (3.30,-2.01) rectangle ++(0.36,0.36); \fill[magenta] (3.66,-2.37) rectangle ++(0.36,0.36); \draw[black!25,step=0.36] (3.30,-2.37) grid ++(1.08,1.08); \draw[black!60] (3.30,-2.37) rectangle ++(1.08,1.08); \node[font=\scriptsize] at (3.84,-2.63) {$U_{12}$}; \fill[qblue] (0.36,-3.30) rectangle ++(0.36,0.36); \fill[qblue] (0.72,-3.66) rectangle ++(0.36,0.36); \fill[qblue] (0.00,-4.02) rectangle ++(0.36,0.36); \draw[black!25,step=0.36] (0.00,-4.02) grid ++(1.08,1.08); \draw[black!60] (0.00,-4.02) rectangle ++(1.08,1.08); \node[font=\scriptsize] at (0.54,-4.28) {$U_{20}$}; \fill[qgold] (2.01,-3.30) rectangle ++(0.36,0.36); \fill[magenta] (2.37,-3.66) rectangle ++(0.36,0.36); \fill[qblue] (1.65,-4.02) rectangle ++(0.36,0.36); \draw[black!25,step=0.36] (1.65,-4.02) grid ++(1.08,1.08); \draw[black!60] (1.65,-4.02) rectangle ++(1.08,1.08); \node[font=\scriptsize] at (2.19,-4.28) {$U_{21}$}; \fill[magenta] (3.66,-3.30) rectangle ++(0.36,0.36); \fill[qgold] (4.02,-3.66) rectangle ++(0.36,0.36); \fill[qblue] (3.30,-4.02) rectangle ++(0.36,0.36); \draw[black!25,step=0.36] (3.30,-4.02) grid ++(1.08,1.08); \draw[black!60] (3.30,-4.02) rectangle ++(1.08,1.08); \node[font=\scriptsize] at (3.84,-4.28) {$U_{22}$}; \foreach \c/\v/\y in {qblue/1/0.1,qgold/\omega/-0.5,magenta/\omega^2/-1.1}{\fill[\c] (5.4,\y) rectangle ++(0.36,0.36); \node[right] at (5.8,\y+0.18) {$\v$};} \end{tikzpicture} \caption{The Weyl matrices $U_g=U^{g_1}\Lambda^{g_2}$ for $n=3$, with $g_1$ indexing the rows of the picture and $g_2$ indexing the columns, and with the nonzero entries colored by their values $1,\omega,\omega^2$. The matrices are pairwise orthogonal, and the maps $Ad_{U_g}$ sum up to $J$.}\label{fig:weyl} \end{figure} With this lemma in hand, we can now introduce the Weyl-Cayley graphs, which are the quantum graphs over $M_n$ obtained by summing some of the maps $Ad_{U_g}$, and their basic properties are as follows: \begin{theorem}\label{thm:weylcayley} Given $S\subset\mathbb Z_n^2$, the Weyl-Cayley graph $X_S=(M_n,d_S)$, with $$d_S=\sum_{g\in S}Ad_{U_g}$$ is simple and real, it is undirected when $S=-S$, and has no loops when $0\notin S$. Its spectrum is the spectrum of the Cayley graph of $\mathbb Z_n^2$ with respect to $S$, and we have $\mathbb Z_n^2\subset G^+(X_S)$, acting via $g\to Ad_{U_g}$. \end{theorem} \begin{proof} Simplicity follows from the lemma, and the reality from $(AxA^*)^*=Ax^*A^*$. Since $Ad_{U_g}^*=Ad_{U_{-g}}$, we have undirectedness when $S=-S$, and since $1=Ad_{U_0}$, no loops when $0\notin S$. The $U_h$ form an orthogonal basis of $M_n(\mathbb C)$, with: $$d_S(U_h)=\sum_{g\in S}\omega^{\sigma(g,h)}U_h$$ Since $h\to \omega^{\sigma(.,h)}$ is a bijection onto the characters of $\mathbb Z_n^2$, these are the Cayley graph eigenvalues. Finally, the maps $Ad_{U_k}$ commute with all the $Ad_{U_g}$, because $U_kU_gU_k^*$ is a scalar multiple of $U_g$, and this gives $\mathbb Z_n^2\subset G^+(X_S)$. \end{proof} The program {\tt weyl.py} checks the above lemma and theorem numerically, for random choices of $S$, along with the properties of the quantum square from the introduction, and of the Weyl cycle from section 7. In the multimatrix basis, we have the following formula: $$Ad_{U_g}(e_{ab})=\omega^{g_2(a-b)}e_{a+g_1,b+g_1}$$ Thus the picture of $X_S$ has arrows colored by roots of unity, while $X_S$ itself is uncolored. For $n=2$ the $U_g$ are the Pauli matrices, and for $S=\mathbb Z_2^2-\{0\}$ we obtain the simplex on $M_2$, whose quantum automorphism group is $S_{M_2}^+=SO_3$. For instance, for $n=3$ and $g=(1,1)$, the map $Ad_{U_g}$ moves the points of $M_3$ along the diagonals, with the phases $\omega^{a-b}$, as in Figure \ref{fig:adu}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (0.00,1.50)--(0.87,0.00); \node[text=qblue] at (0.65,0.88) {$1$}; \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (0.87,0.00)--(-0.87,0.00); \node[text=qblue] at (0.00,-0.25) {$1$}; \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (-0.87,0.00)--(0.00,1.50); \node[text=qblue] at (-0.65,0.88) {$1$}; \fill[black!75] (0.00,1.50) circle[radius=2.6pt]; \node[font=\scriptsize] at (0.00,1.85) {$e_{11}$}; \fill[black!75] (0.87,0.00) circle[radius=2.6pt]; \node[font=\scriptsize] at (1.17,-0.17) {$e_{22}$}; \fill[black!75] (-0.87,0.00) circle[radius=2.6pt]; \node[font=\scriptsize] at (-1.17,-0.17) {$e_{33}$}; \draw[->,qgold,line width=1.2pt,shorten >=3pt,shorten <=3pt] (3.40,1.50)--(4.27,0.00); \node[text=qgold] at (4.05,0.88) {$\omega$}; \draw[->,qgold,line width=1.2pt,shorten >=3pt,shorten <=3pt] (4.27,0.00)--(2.53,0.00); \node[text=qgold] at (3.40,-0.25) {$\omega$}; \draw[->,qgold,line width=1.2pt,shorten >=3pt,shorten <=3pt] (2.53,0.00)--(3.40,1.50); \node[text=qgold] at (2.75,0.88) {$\omega$}; \fill[black!75] (3.40,1.50) circle[radius=2.6pt]; \node[font=\scriptsize] at (3.40,1.85) {$e_{21}$}; \fill[black!75] (4.27,0.00) circle[radius=2.6pt]; \node[font=\scriptsize] at (4.57,-0.17) {$e_{32}$}; \fill[black!75] (2.53,0.00) circle[radius=2.6pt]; \node[font=\scriptsize] at (2.23,-0.17) {$e_{13}$}; \draw[->,magenta,line width=1.2pt,shorten >=3pt,shorten <=3pt] (6.80,1.50)--(7.67,0.00); \node[text=magenta] at (7.45,0.88) {$\omega^2$}; \draw[->,magenta,line width=1.2pt,shorten >=3pt,shorten <=3pt] (7.67,0.00)--(5.93,0.00); \node[text=magenta] at (6.80,-0.25) {$\omega^2$}; \draw[->,magenta,line width=1.2pt,shorten >=3pt,shorten <=3pt] (5.93,0.00)--(6.80,1.50); \node[text=magenta] at (6.15,0.88) {$\omega^2$}; \fill[black!75] (6.80,1.50) circle[radius=2.6pt]; \node[font=\scriptsize] at (6.80,1.85) {$e_{31}$}; \fill[black!75] (7.67,0.00) circle[radius=2.6pt]; \node[font=\scriptsize] at (7.97,-0.17) {$e_{12}$}; \fill[black!75] (5.93,0.00) circle[radius=2.6pt]; \node[font=\scriptsize] at (5.63,-0.17) {$e_{23}$}; \end{tikzpicture} \caption{The map $Ad_{U_g}$ over $M_3$, for $g=(1,1)$, which sends $e_{ab}\to\omega^{a-b}e_{a+1,b+1}$, as checked by {\tt pictures.py}. The orbits are indexed by $a-b$, and the arrows are colored by the phases $1,\omega,\omega^2$.}\label{fig:adu} \end{figure} Regarding the quantum symmetries of the Weyl-Cayley graphs, the results for the circulant graphs from \cite{bb2} have the following analogue, where $E(x)$ denotes the eigenspace of $d_S$ containing an eigenvector $x\in M_n(\mathbb C)$, and where we say that a quantum graph has no quantum symmetry when $G^+(X)$ is a classical group: \begin{theorem}\label{thm:rigidity} Let $n\geq3$, $n\neq4$, and $S=-S\subset\mathbb Z_n^2$, and assume that: \begin{enumerate} \item $E(U)=span(U,U^*)$, and $E(\Lambda)=span(\Lambda,\Lambda^*)$. \item $1\notin E(U^2),E(\Lambda^2)$, $U^*\notin E(U^3)$, $\Lambda^*\notin E(\Lambda^3)$, and $U\Lambda^*\notin E(U\Lambda)$. \end{enumerate} Then $X_S$ has no quantum symmetry, and $G^+(X_S)=\mathbb Z_n^2\rtimes\mathbb Z_2$, generated by the maps $Ad_{U_k}$, and by the parity $Ad_P$, given by $Pe_a=e_{-a}$. \end{theorem} \begin{proof} We follow \cite{bb2}. The coaction $\Phi$ of $G^+(X_S)$ preserves the eigenspaces of $d_S$, so by (1) we can write $\Phi(U)=U\otimes a+U^*\otimes b$. By taking squares we get: $$\Phi(U^2)=U^2\otimes a^2+U^{-2}\otimes b^2+1\otimes(ab+ba)$$ Since $1\notin E(U^2)$ we obtain $ab=-ba$. By taking cubes, the coefficient of $U^{-1}$ in $\Phi(U^3)$ is $ab^2+bab+b^2a=ab^2$, and since $U^{-1}\notin E(U^3)$, which uses $n\neq4$, we obtain $ab^2=0$, and similarly $ba^2=0$. By induction we get $\Phi(U^s)=U^s\otimes a^s+U^{-s}\otimes b^s$, and with $s=n-1$, comparing with $\Phi(U^*)=\Phi(U)^*$ gives $a^*=a^{n-1}$ and $b^*=b^{n-1}$. Thus $(ab)(ab)^*=ab^na^*=0$, so $ab=0$, and similarly $ba=0$. In the same way, $\Phi(\Lambda)=\Lambda\otimes a'+\Lambda^*\otimes b'$, with $a',b'$ satisfying the same relations. Now consider the products: $$\Phi(U)\Phi(\Lambda)=U\Lambda\otimes aa'+U\Lambda^*\otimes ab'+U^*\Lambda\otimes ba'+U^*\Lambda^*\otimes bb'$$ Since $U\Lambda^*,U^*\Lambda\notin E(U\Lambda)$ we get $ab'=ba'=0$, and in the same way, by using $\Lambda U=\omega U\Lambda$, we get $b'a=a'b=0$, along with $aa'=a'a$ and $bb'=b'b$. Thus the elements $a,b,a',b'$ pairwise commute, and since $U,\Lambda$ generate $M_n(\mathbb C)$, the algebra $C(G^+(X_S))$ is commutative. As for the group itself, $\Phi(U)\Phi(U)^*=1$ gives $aa^*+bb^*=1$, so a character $\chi$, which satisfies $\chi(a)\chi(b)=0$, maps $(a,b)$ to $(\zeta,0)$ or $(0,\zeta)$, with $|\zeta|=1$, and since $a^n=aa^*$ and $b^n=bb^*$, we have $\zeta^n=1$. The same holds for $(a',b')$, and the relations $ab'=ba'=0$ show that the nonzero values are in the same position. Thus there are at most $2n^2$ characters, and the maps $Ad_{U_k}$ and $Ad_{U_kP}$, which commute with $d_S$ because $PU_gP^*=U_{-g}$ and $S=-S$, realize all of them. \end{proof} The program {\tt rigidity.py} checks, directly on the eigenspaces of $d_S$, the conditions in Theorem \ref{thm:rigidity}, for instance for the following choices: $$n=7\ ,\ S=\pm\{(1,0),(0,1),(0,2),(2,1)\}\quad,\quad n=5\ ,\ S=\pm\{(1,0),(0,1),(0,2),(1,1),(2,4)\}$$ It also checks that the $2n^2$ maps $Ad_{U_k}$ and $Ad_{U_kP}$ are distinct, and commute with $d_S$, and counts the sets $S$ satisfying these conditions, for $n=5,6,7$. In these cases, at least 4 pairs $\pm g$ are needed, because of coincidences between the eigenvalues. In particular the quantum torus $S=\{\pm(1,0),\pm(0,1)\}$ from section 7 does not satisfy (1), its eigenvalues being symmetric under $(h_1,h_2)\to(h_2,h_1)$, as shown in Figure \ref{fig:landscapes}, and we will see below that, unlike the torus graph, it has quantum symmetry. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[qgold!100] (0.00,-0.00) rectangle ++(0.44,0.44); \fill[qgold!81] (0.44,-0.00) rectangle ++(0.44,0.44); \fill[qgold!39] (0.88,-0.00) rectangle ++(0.44,0.44); \fill[qgold!5] (1.32,-0.00) rectangle ++(0.44,0.44); \fill[qgold!5] (1.76,-0.00) rectangle ++(0.44,0.44); \fill[qgold!39] (2.20,-0.00) rectangle ++(0.44,0.44); \fill[qgold!81] (2.64,-0.00) rectangle ++(0.44,0.44); \fill[qgold!81] (0.00,-0.44) rectangle ++(0.44,0.44); \fill[qgold!62] (0.44,-0.44) rectangle ++(0.44,0.44); \fill[qgold!20] (0.88,-0.44) rectangle ++(0.44,0.44); \fill[qblue!14] (1.32,-0.44) rectangle ++(0.44,0.44); \fill[qblue!14] (1.76,-0.44) rectangle ++(0.44,0.44); \fill[qgold!20] (2.20,-0.44) rectangle ++(0.44,0.44); \fill[qgold!62] (2.64,-0.44) rectangle ++(0.44,0.44); \fill[qgold!39] (0.00,-0.88) rectangle ++(0.44,0.44); \fill[qgold!20] (0.44,-0.88) rectangle ++(0.44,0.44); \fill[qblue!22] (0.88,-0.88) rectangle ++(0.44,0.44); \fill[qblue!56] (1.32,-0.88) rectangle ++(0.44,0.44); \fill[qblue!56] (1.76,-0.88) rectangle ++(0.44,0.44); \fill[qblue!22] (2.20,-0.88) rectangle ++(0.44,0.44); \fill[qgold!20] (2.64,-0.88) rectangle ++(0.44,0.44); \fill[qgold!5] (0.00,-1.32) rectangle ++(0.44,0.44); \fill[qblue!14] (0.44,-1.32) rectangle ++(0.44,0.44); \fill[qblue!56] (0.88,-1.32) rectangle ++(0.44,0.44); \fill[qblue!90] (1.32,-1.32) rectangle ++(0.44,0.44); \fill[qblue!90] (1.76,-1.32) rectangle ++(0.44,0.44); \fill[qblue!56] (2.20,-1.32) rectangle ++(0.44,0.44); \fill[qblue!14] (2.64,-1.32) rectangle ++(0.44,0.44); \fill[qgold!5] (0.00,-1.76) rectangle ++(0.44,0.44); \fill[qblue!14] (0.44,-1.76) rectangle ++(0.44,0.44); \fill[qblue!56] (0.88,-1.76) rectangle ++(0.44,0.44); \fill[qblue!90] (1.32,-1.76) rectangle ++(0.44,0.44); \fill[qblue!90] (1.76,-1.76) rectangle ++(0.44,0.44); \fill[qblue!56] (2.20,-1.76) rectangle ++(0.44,0.44); \fill[qblue!14] (2.64,-1.76) rectangle ++(0.44,0.44); \fill[qgold!39] (0.00,-2.20) rectangle ++(0.44,0.44); \fill[qgold!20] (0.44,-2.20) rectangle ++(0.44,0.44); \fill[qblue!22] (0.88,-2.20) rectangle ++(0.44,0.44); \fill[qblue!56] (1.32,-2.20) rectangle ++(0.44,0.44); \fill[qblue!56] (1.76,-2.20) rectangle ++(0.44,0.44); \fill[qblue!22] (2.20,-2.20) rectangle ++(0.44,0.44); \fill[qgold!20] (2.64,-2.20) rectangle ++(0.44,0.44); \fill[qgold!81] (0.00,-2.64) rectangle ++(0.44,0.44); \fill[qgold!62] (0.44,-2.64) rectangle ++(0.44,0.44); \fill[qgold!20] (0.88,-2.64) rectangle ++(0.44,0.44); \fill[qblue!14] (1.32,-2.64) rectangle ++(0.44,0.44); \fill[qblue!14] (1.76,-2.64) rectangle ++(0.44,0.44); \fill[qgold!20] (2.20,-2.64) rectangle ++(0.44,0.44); \fill[qgold!62] (2.64,-2.64) rectangle ++(0.44,0.44); \draw[black!20,step=0.44] (0.00,-2.64) grid ++(3.08,3.08); \draw[black!60] (0.00,-2.64) rectangle ++(3.08,3.08); \node[align=center] at (1.54,-3.3) {quantum torus\\ values in $[-3.60,4]$}; \fill[qgold!100] (5.40,-0.00) rectangle ++(0.44,0.44); \fill[qgold!60] (5.84,-0.00) rectangle ++(0.44,0.44); \fill[qgold!22] (6.28,-0.00) rectangle ++(0.44,0.44); \fill[qgold!43] (6.72,-0.00) rectangle ++(0.44,0.44); \fill[qgold!43] (7.16,-0.00) rectangle ++(0.44,0.44); \fill[qgold!22] (7.60,-0.00) rectangle ++(0.44,0.44); \fill[qgold!60] (8.04,-0.00) rectangle ++(0.44,0.44); \fill[qgold!51] (5.40,-0.44) rectangle ++(0.44,0.44); \fill[qgold!41] (5.84,-0.44) rectangle ++(0.44,0.44); \fill[qblue!18] (6.28,-0.44) rectangle ++(0.44,0.44); \fill[qblue!18] (6.72,-0.44) rectangle ++(0.44,0.44); \fill[qgold!12] (7.16,-0.44) rectangle ++(0.44,0.44); \fill[qblue!1] (7.60,-0.44) rectangle ++(0.44,0.44); \fill[qgold!3] (8.04,-0.44) rectangle ++(0.44,0.44); \fill[qblue!9] (5.40,-0.88) rectangle ++(0.44,0.44); \fill[qgold!12] (5.84,-0.88) rectangle ++(0.44,0.44); \fill[qblue!39] (6.28,-0.88) rectangle ++(0.44,0.44); \fill[qblue!73] (6.72,-0.88) rectangle ++(0.44,0.44); \fill[qblue!35] (7.16,-0.88) rectangle ++(0.44,0.44); \fill[qblue!18] (7.60,-0.88) rectangle ++(0.44,0.44); \fill[qblue!35] (8.04,-0.88) rectangle ++(0.44,0.44); \fill[qblue!4] (5.40,-1.32) rectangle ++(0.44,0.44); \fill[qgold!24] (5.84,-1.32) rectangle ++(0.44,0.44); \fill[qgold!3] (6.28,-1.32) rectangle ++(0.44,0.44); \fill[qblue!52] (6.72,-1.32) rectangle ++(0.44,0.44); \fill[qblue!35] (7.16,-1.32) rectangle ++(0.44,0.44); \fill[qgold!12] (7.60,-1.32) rectangle ++(0.44,0.44); \fill[qgold!3] (8.04,-1.32) rectangle ++(0.44,0.44); \fill[qblue!4] (5.40,-1.76) rectangle ++(0.44,0.44); \fill[qgold!3] (5.84,-1.76) rectangle ++(0.44,0.44); \fill[qgold!12] (6.28,-1.76) rectangle ++(0.44,0.44); \fill[qblue!35] (6.72,-1.76) rectangle ++(0.44,0.44); \fill[qblue!52] (7.16,-1.76) rectangle ++(0.44,0.44); \fill[qgold!3] (7.60,-1.76) rectangle ++(0.44,0.44); \fill[qgold!24] (8.04,-1.76) rectangle ++(0.44,0.44); \fill[qblue!9] (5.40,-2.20) rectangle ++(0.44,0.44); \fill[qblue!35] (5.84,-2.20) rectangle ++(0.44,0.44); \fill[qblue!18] (6.28,-2.20) rectangle ++(0.44,0.44); \fill[qblue!35] (6.72,-2.20) rectangle ++(0.44,0.44); \fill[qblue!73] (7.16,-2.20) rectangle ++(0.44,0.44); \fill[qblue!39] (7.60,-2.20) rectangle ++(0.44,0.44); \fill[qgold!12] (8.04,-2.20) rectangle ++(0.44,0.44); \fill[qgold!51] (5.40,-2.64) rectangle ++(0.44,0.44); \fill[qgold!3] (5.84,-2.64) rectangle ++(0.44,0.44); \fill[qblue!1] (6.28,-2.64) rectangle ++(0.44,0.44); \fill[qgold!12] (6.72,-2.64) rectangle ++(0.44,0.44); \fill[qblue!18] (7.16,-2.64) rectangle ++(0.44,0.44); \fill[qblue!18] (7.60,-2.64) rectangle ++(0.44,0.44); \fill[qgold!41] (8.04,-2.64) rectangle ++(0.44,0.44); \draw[black!20,step=0.44] (5.40,-2.64) grid ++(3.08,3.08); \draw[black!60] (5.40,-2.64) rectangle ++(3.08,3.08); \node[align=center] at (6.94,-3.3) {rigid example\\ values in $[-5.85,8]$}; \end{tikzpicture} \caption{The eigenvalues $F(h)=\sum_{g\in S}\omega^{\sigma(g,h)}$ of $X_S$ over $M_7$, indexed by $h\in\mathbb Z_7^2$, with $h=0$ at top left, positive values in gold, negative values in blue. For the quantum torus there are 10 distinct values, with many symmetries, and for $S=\pm\{(1,0),(0,1),(0,2),(2,1)\}$ there are 17 distinct values, and the conditions of Theorem \ref{thm:rigidity} hold.}\label{fig:landscapes} \end{figure} \medskip\noindent\textbf{Twisting.} In order to compute more quantum symmetry groups, we use twisting. The fact that the Weyl-Cayley graphs have the same spectra as the Cayley graphs of $\mathbb Z_n^2$ is not an accident, and comes from a twisting relation between $M_n$ and $\{1,\ldots,n^2\}$, at the level of the quantum permutation groups, found in \cite{bbc}. Let us recall that, given a Hopf algebra $A$, a 2-cocycle on $A$ is a convolution invertible linear form $\alpha:A\otimes A\to\mathbb C$ satisfying, in Sweedler notation: $$\alpha(x_1,y_1)\alpha(x_2y_2,z)=\alpha(y_1,z_1)\alpha(x,y_2z_2)\quad,\quad\alpha(x,1)=\alpha(1,x)=\varepsilon(x)$$ The twisted Hopf algebra $A^\alpha$ is then the coalgebra $A$, with the elements $x\in A$ being denoted $[x]$ when regarded in $A^\alpha$, and with the following product, following Doi \cite{doi}: $$[x][y]=\sum\alpha(x_1,y_1)\alpha^{-1}(x_3,y_3)[x_2y_2]$$ The basic example of a 2-cocycle, which will be the source of all our twists, is $\theta(g,h)=\omega^{g_2h_1}$ on $\mathbb Z_n^2$, for which $U_gU_h=\theta(g,h)U_{g+h}$, so that $M_n(\mathbb C)$ is the group algebra of $\mathbb Z_n^2$ twisted by $\theta$. Observe that $\theta(g,h)\theta(h,g)^{-1}=\omega^{\sigma(g,h)}$, and this asymmetry is what makes $M_n(\mathbb C)$ noncommutative. For $n=3$, this 2-cocycle is as in Figure \ref{fig:cocycle}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[qblue] (0.00,-0.00) rectangle ++(0.3,0.3); \fill[qblue] (0.30,-0.00) rectangle ++(0.3,0.3); \fill[qblue] (0.60,-0.00) rectangle ++(0.3,0.3); \fill[qblue] (0.90,-0.00) rectangle ++(0.3,0.3); \fill[qblue] (1.20,-0.00) rectangle ++(0.3,0.3); \fill[qblue] (1.50,-0.00) rectangle ++(0.3,0.3); \fill[qblue] (1.80,-0.00) rectangle ++(0.3,0.3); \fill[qblue] (2.10,-0.00) rectangle ++(0.3,0.3); \fill[qblue] (2.40,-0.00) rectangle ++(0.3,0.3); \fill[qblue] (0.00,-0.30) rectangle ++(0.3,0.3); \fill[qblue] (0.30,-0.30) rectangle ++(0.3,0.3); \fill[qblue] (0.60,-0.30) rectangle ++(0.3,0.3); \fill[qgold] (0.90,-0.30) rectangle ++(0.3,0.3); \fill[qgold] (1.20,-0.30) rectangle ++(0.3,0.3); \fill[qgold] (1.50,-0.30) rectangle ++(0.3,0.3); \fill[magenta] (1.80,-0.30) rectangle ++(0.3,0.3); \fill[magenta] (2.10,-0.30) rectangle ++(0.3,0.3); \fill[magenta] (2.40,-0.30) rectangle ++(0.3,0.3); \fill[qblue] (0.00,-0.60) rectangle ++(0.3,0.3); \fill[qblue] (0.30,-0.60) rectangle ++(0.3,0.3); \fill[qblue] (0.60,-0.60) rectangle ++(0.3,0.3); \fill[magenta] (0.90,-0.60) rectangle ++(0.3,0.3); \fill[magenta] (1.20,-0.60) rectangle ++(0.3,0.3); \fill[magenta] (1.50,-0.60) rectangle ++(0.3,0.3); \fill[qgold] (1.80,-0.60) rectangle ++(0.3,0.3); \fill[qgold] (2.10,-0.60) rectangle ++(0.3,0.3); \fill[qgold] (2.40,-0.60) rectangle ++(0.3,0.3); \fill[qblue] (0.00,-0.90) rectangle ++(0.3,0.3); \fill[qblue] (0.30,-0.90) rectangle ++(0.3,0.3); \fill[qblue] (0.60,-0.90) rectangle ++(0.3,0.3); \fill[qblue] (0.90,-0.90) rectangle ++(0.3,0.3); \fill[qblue] (1.20,-0.90) rectangle ++(0.3,0.3); \fill[qblue] (1.50,-0.90) rectangle ++(0.3,0.3); \fill[qblue] (1.80,-0.90) rectangle ++(0.3,0.3); \fill[qblue] (2.10,-0.90) rectangle ++(0.3,0.3); \fill[qblue] (2.40,-0.90) rectangle ++(0.3,0.3); \fill[qblue] (0.00,-1.20) rectangle ++(0.3,0.3); \fill[qblue] (0.30,-1.20) rectangle ++(0.3,0.3); \fill[qblue] (0.60,-1.20) rectangle ++(0.3,0.3); \fill[qgold] (0.90,-1.20) rectangle ++(0.3,0.3); \fill[qgold] (1.20,-1.20) rectangle ++(0.3,0.3); \fill[qgold] (1.50,-1.20) rectangle ++(0.3,0.3); \fill[magenta] (1.80,-1.20) rectangle ++(0.3,0.3); \fill[magenta] (2.10,-1.20) rectangle ++(0.3,0.3); \fill[magenta] (2.40,-1.20) rectangle ++(0.3,0.3); \fill[qblue] (0.00,-1.50) rectangle ++(0.3,0.3); \fill[qblue] (0.30,-1.50) rectangle ++(0.3,0.3); \fill[qblue] (0.60,-1.50) rectangle ++(0.3,0.3); \fill[magenta] (0.90,-1.50) rectangle ++(0.3,0.3); \fill[magenta] (1.20,-1.50) rectangle ++(0.3,0.3); \fill[magenta] (1.50,-1.50) rectangle ++(0.3,0.3); \fill[qgold] (1.80,-1.50) rectangle ++(0.3,0.3); \fill[qgold] (2.10,-1.50) rectangle ++(0.3,0.3); \fill[qgold] (2.40,-1.50) rectangle ++(0.3,0.3); \fill[qblue] (0.00,-1.80) rectangle ++(0.3,0.3); \fill[qblue] (0.30,-1.80) rectangle ++(0.3,0.3); \fill[qblue] (0.60,-1.80) rectangle ++(0.3,0.3); \fill[qblue] (0.90,-1.80) rectangle ++(0.3,0.3); \fill[qblue] (1.20,-1.80) rectangle ++(0.3,0.3); \fill[qblue] (1.50,-1.80) rectangle ++(0.3,0.3); \fill[qblue] (1.80,-1.80) rectangle ++(0.3,0.3); \fill[qblue] (2.10,-1.80) rectangle ++(0.3,0.3); \fill[qblue] (2.40,-1.80) rectangle ++(0.3,0.3); \fill[qblue] (0.00,-2.10) rectangle ++(0.3,0.3); \fill[qblue] (0.30,-2.10) rectangle ++(0.3,0.3); \fill[qblue] (0.60,-2.10) rectangle ++(0.3,0.3); \fill[qgold] (0.90,-2.10) rectangle ++(0.3,0.3); \fill[qgold] (1.20,-2.10) rectangle ++(0.3,0.3); \fill[qgold] (1.50,-2.10) rectangle ++(0.3,0.3); \fill[magenta] (1.80,-2.10) rectangle ++(0.3,0.3); \fill[magenta] (2.10,-2.10) rectangle ++(0.3,0.3); \fill[magenta] (2.40,-2.10) rectangle ++(0.3,0.3); \fill[qblue] (0.00,-2.40) rectangle ++(0.3,0.3); \fill[qblue] (0.30,-2.40) rectangle ++(0.3,0.3); \fill[qblue] (0.60,-2.40) rectangle ++(0.3,0.3); \fill[magenta] (0.90,-2.40) rectangle ++(0.3,0.3); \fill[magenta] (1.20,-2.40) rectangle ++(0.3,0.3); \fill[magenta] (1.50,-2.40) rectangle ++(0.3,0.3); \fill[qgold] (1.80,-2.40) rectangle ++(0.3,0.3); \fill[qgold] (2.10,-2.40) rectangle ++(0.3,0.3); \fill[qgold] (2.40,-2.40) rectangle ++(0.3,0.3); \draw[black!25,step=0.3] (0,-2.4) grid (2.7,0.3); \draw[black!60] (0,-2.4) rectangle (2.7,0.3); \node[left,font=\tiny] at (0,0.15) {$00$}; \node[above,font=\tiny,rotate=90,anchor=west] at (0.15,0.32) {$00$}; \node[left,font=\tiny] at (0,-0.15) {$01$}; \node[above,font=\tiny,rotate=90,anchor=west] at (0.45,0.32) {$01$}; \node[left,font=\tiny] at (0,-0.45) {$02$}; \node[above,font=\tiny,rotate=90,anchor=west] at (0.75,0.32) {$02$}; \node[left,font=\tiny] at (0,-0.75) {$10$}; \node[above,font=\tiny,rotate=90,anchor=west] at (1.05,0.32) {$10$}; \node[left,font=\tiny] at (0,-1.05) {$11$}; \node[above,font=\tiny,rotate=90,anchor=west] at (1.35,0.32) {$11$}; \node[left,font=\tiny] at (0,-1.35) {$12$}; \node[above,font=\tiny,rotate=90,anchor=west] at (1.65,0.32) {$12$}; \node[left,font=\tiny] at (0,-1.65) {$20$}; \node[above,font=\tiny,rotate=90,anchor=west] at (1.95,0.32) {$20$}; \node[left,font=\tiny] at (0,-1.95) {$21$}; \node[above,font=\tiny,rotate=90,anchor=west] at (2.25,0.32) {$21$}; \node[left,font=\tiny] at (0,-2.25) {$22$}; \node[above,font=\tiny,rotate=90,anchor=west] at (2.55,0.32) {$22$}; \foreach \c/\v/\y in {qblue/1/-0.3,qgold/\omega/-0.9,magenta/\omega^2/-1.5}{\fill[\c] (3.2,\y) rectangle ++(0.3,0.3); \node[right] at (3.55,\y+0.15) {$\v$};} \end{tikzpicture} \caption{The $2$-cocycle $\theta(g,h)=\omega^{g_2h_1}$ on $\mathbb Z_3^2$, with rows indexed by $g$ and columns by $h$, as computed by {\tt pictures.py}, which also checks that $U_gU_h=\theta(g,h)U_{g+h}$ for all $g,h$.}\label{fig:cocycle} \end{figure} By Schauenburg \cite{scb}, the comodule categories of $A$ and $A^\alpha$ are monoidally equivalent, with the same underlying vector spaces. Thus, a compact quantum group and its twists have the same fusion rules, and in the finite case, the same order. For the twists of the finite groups, which are in general not groups, and their actions on finite quantum spaces, see \cite{and}, \cite{bna}, \cite{ege}, \cite{gna}. At the level of graphs, the twisting procedure for the Cayley graphs of the abelian groups was developed by Gromada in \cite{gr2}, who showed that the twist of such a Cayley graph by a 2-cocycle is a quantum graph which is quantum isomorphic to the original one, with quantum automorphism group being the corresponding twist, see also \cite{mrv}. For the group $\mathbb Z_n^2$, and with weights allowed, this gives the following result, with $X_c$ being a weighted Weyl-Cayley graph, and $Y_c$ being the corresponding weighted Cayley graph of $\mathbb Z_n^2$: \begin{theorem}\label{thm:twisting} Given $c:\mathbb Z_n^2\to\mathbb C$, consider the quantum graph $X_c$ over $M_n$, and the classical graph $Y_c$ with vertex set $\mathbb Z_n^2$, given by $$X_c=\Big(M_n,\sum_gc_gAd_{U_g}\Big)\quad,\quad Y_c=\Big(\mathbb Z_n^2,f\to\sum_gc_gf(.+g)\Big)$$ Then $G^+(X_c)$ and $G^+(Y_c)$ are $2$-cocycle twists of each other. In particular, they have the same fusion rules, and the same order, when finite. \end{theorem} \begin{proof} In the uncolored case, this is due to Gromada \cite{gr2}, and here is a short proof, in our setting, based on \cite{bbc}. We use the basis $\{U_h\}$ of $M_n(\mathbb C)$, and the basis $\{\chi_h\}$ of $C(\mathbb Z_n^2)$ given by $\chi_h(p)=\omega^{\sigma(p,h)}$. These bases multiply as follows, with $\theta(g,h)=\omega^{g_2h_1}$: $$U_gU_h=\theta(g,h)U_{g+h}\quad,\quad\chi_g\chi_h=\chi_{g+h}$$ Thus $M_n(\mathbb C)$ is the group algebra of $\mathbb Z_n^2$ twisted by the 2-cocycle $\theta$, and $C(\mathbb Z_n^2)$ is the untwisted one, the canonical traces being in both cases $\psi(U_h)=\psi(\chi_h)=n^2\delta_{h0}$. Let us write the coactions of $S_{M_n}^+$ and $S_{n^2}^+$ as $\Phi(U_h)=\sum_gU_g\otimes x_{gh}$ and $\Phi(\chi_h)=\sum_g\chi_g\otimes y_{gh}$, and say that a monomial in the elements $y_{gh}$ has bidegree $(g,h)$ when its first indices sum up to $g$, and its second indices sum up to $h$. According to \cite{bbc}, there is a 2-cocycle $\alpha$ on $C(S_{n^2}^+)$, constructed from $\theta$ via the morphism $y_{gh}\to\delta_{gh}g$ onto the group algebra $C^*(\mathbb Z_n^2)$, such that $x_{gh}\to[y_{gh}]$ defines an isomorphism $C(S_{M_n}^+)\simeq C(S_{n^2}^+)^\alpha$, and such that, for any monomials $m,m'$ of bidegrees $(g,h)$ and $(g',h')$, we have: $$[m][m']=\theta(g,g')^{-1}\theta(h,h')[mm']$$ Now as in the proof of Theorem \ref{thm:weylcayley}, both $d_c=\sum_gc_gAd_{U_g}$ and the adjacency matrix $e_c$ of $Y_c$ are diagonal in these bases, with the same eigenvalues, namely $F(h)=\sum_gc_g\omega^{\sigma(g,h)}$. Thus $G^+(X_c)$ is obtained by imposing the relations $x_{gh}=0$ for $F(g)\neq F(h)$, and $G^+(Y_c)$ is obtained by imposing the relations $y_{gh}=0$ for $F(g)\neq F(h)$. We work first with the polynomial Hopf $*$-algebras, which are spanned by the monomials in the coordinates, and which are dense, and we take the universal $C^*$-completions at the end. At this level, the above formula shows that the ideal generated by the elements $[y_{gh}]$ with $F(g)\neq F(h)$, in the twisted algebra, is the image $[I]$ of the ideal $I$ generated by the elements $y_{gh}$ with $F(g)\neq F(h)$. Moreover, $I$ is spanned by monomials, and the morphism $y_{gh}\to\delta_{gh}g$ vanishes on $I$, so $\alpha$ induces a 2-cocycle on the quotient, that we still denote $\alpha$, and we obtain, after completion: $$C(G^+(X_c))\simeq C(S_{n^2}^+)^\alpha/[I]=(C(S_{n^2}^+)/I)^\alpha=C(G^+(Y_c))^\alpha$$ Finally, the last assertion follows from the above-mentioned results of Schauenburg \cite{scb}. \end{proof} Pictorially, Theorem \ref{thm:twisting} says that the twisting relation between $S_{n^2}^+$ and $S_{M_n}^+$ from \cite{bbc} restricts to the quantum automorphism groups of all the Cayley graphs of $\mathbb Z_n^2$, as in Figure \ref{fig:twist}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small,snk/.style={<->,magenta,line width=.9pt,decorate,decoration={snake,amplitude=.5mm,segment length=2.6mm,pre length=2mm,post length=2mm}}] \node[draw=qblue,rounded corners=3pt,fill=qblue!8,minimum width=2.3cm,minimum height=7mm] (a) at (0,1.7) {$S_{n^2}^+$}; \node[draw=qgold,rounded corners=3pt,fill=qgold!10,minimum width=2.3cm,minimum height=7mm] (b) at (5.4,1.7) {$S_{M_n}^+$}; \node[draw=qblue,rounded corners=3pt,fill=qblue!8,minimum width=2.3cm,minimum height=7mm] (c) at (0,0) {$G^+(Y_c)$}; \node[draw=qgold,rounded corners=3pt,fill=qgold!10,minimum width=2.3cm,minimum height=7mm] (d) at (5.4,0) {$G^+(X_c)$}; \draw[snk] (a.east)--(b.west) node[midway,above=1.5mm,text=magenta] {twist by $\alpha$}; \draw[snk] (c.east)--(d.west) node[midway,above=1.5mm,text=magenta] {twist by $\alpha$}; \node[rotate=90] at (0,0.85) {$\subset$}; \node[rotate=90] at (5.4,0.85) {$\subset$}; \node[text=qblue] at (0,-0.85) {acting on $\mathbb Z_n^2=\{1,\ldots,n^2\}$}; \node[text=qgold!80!black] at (5.4,-0.85) {acting on $M_n$}; \end{tikzpicture} \caption{The twisting relations from Theorem \ref{thm:twisting}. The classical graph $Y_c$ and the quantum graph $X_c$ have the same spectra, and their quantum automorphism groups have the same fusion rules, and the same order, when finite.}\label{fig:twist} \end{figure} The basic examples of Cayley graphs of $\mathbb Z_n^2$ lead to the following consequences, where we use the free wreath products from Theorem \ref{thm:lexico}, and the quantum reflection groups from Theorem \ref{thm:reflection}: \begin{corollary}\label{cor:twists} The quantum automorphism groups of the following quantum graphs over $M_n$ are $2$-cocycle twists of the following quantum groups: \begin{enumerate} \item The simplex, with $S=\mathbb Z_n^2-\{0\}$: the quantum group $S_{n^2}^+$. \item The Weyl cycle, with $S=\{\pm(1,0)\}$, and $n\geq5$: the quantum group $D_n\wr_*S_n^+$. \item The directed Weyl cycle, with $S=\{(1,0)\}$: the quantum reflection group $H_n^{n+}$. \item The graph $J-nE$, with $S=\{g|g_1\neq0\}$: the quantum group $S_n^+\wr_*S_n^+$. \end{enumerate} \end{corollary} \begin{proof} The corresponding Cayley graphs of $\mathbb Z_n^2$ are as follows, and we can use Theorem \ref{thm:twisting}: (1) Here we obtain the simplex $K_{n^2}$, whose quantum automorphism group is $S_{n^2}^+$. (2) Here we obtain $n$ copies of $C_n$, and Theorem \ref{thm:lexico} gives $G^+(nC_n)=D_n\wr_*S_n^+$. (3) Here we obtain $n$ copies of $\vec{C}_n$, and Theorem \ref{thm:reflection} gives $G^+(n\vec{C}_n)=H_n^{n+}$. (4) Here we obtain the complement of $nK_n$, and Corollary \ref{cor:lexico} gives $S_n^+\wr_*S_n^+$. \end{proof} Here (1) is the result in \cite{bbc}, and for $n=2$ this is the twisting relation between $S_4^+$ and $S_{M_2}^+=SO_3$. For $n=2$, the quantum graphs over $M_2$ were shown in \cite{gr2} to be quantum Cayley graphs of $\mathbb Z_2^2$, and the corresponding monoidal equivalences, between $S_4^+$ and $SO_3$, and between $H_2^+$ and $O_2$, were also obtained by Matsuda \cite{mat}, via quantum isomorphisms. Also for $n=2$, (3) shows that $O_2$, which is the quantum symmetry group of the quantum graph $d=Ad_{\sigma_x}$ from section 10, is a twist of the quantum symmetry group $H_2^+$ of the square, and the same holds for the quantum square from the introduction, whose complement is conjugate to this graph. Regarding (2), this shows that, as already suggested in section 7, the Weyl cycle is a quantum analogue of $n$ disjoint cycles, at the level of quantum symmetries too, and for $n=3,4$ we obtain in the same way twists of $S_3\wr_*S_3^+$ and of $H_2^+\wr_*S_4^+$. Regarding (4), the quantum graph $J-nE$ from section 9 has the same quantum symmetry group as the diagonal inclusion $\mathbb C^n\subset M_n(\mathbb C)$, and we recover, in a sharper form, the fact from section 3 that this quantum group has the same fusion rules as $S_n^+\wr_*S_n^+$. Finally, by combining (3) with Theorem \ref{thm:reflfusion}, for $n\geq4$ the irreducible corepresentations of the quantum symmetry group of the directed Weyl cycle are labeled by the words over $\mathbb Z_n$, with the fusion rules given there. Regarding (4), for $n=3$ the corresponding Cayley graph of $\mathbb Z_3^2$ is the complement of $3K_3$, which is the complete tripartite graph $K_{3,3,3}$ from Figure \ref{fig:k333}, and its quantum automorphism group is $S_3^+\wr_*S_3^+$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=0.6pt] (0.00,1.87)--(-1.62,-0.94); \draw[qblue,line width=0.6pt] (0.00,1.87)--(-0.89,-0.94); \draw[qblue,line width=0.6pt] (0.00,1.87)--(-1.26,-0.31); \draw[qblue,line width=0.6pt] (-0.36,1.24)--(-1.62,-0.94); \draw[qblue,line width=0.6pt] (-0.36,1.24)--(-0.89,-0.94); \draw[qblue,line width=0.6pt] (-0.36,1.24)--(-1.26,-0.31); \draw[qblue,line width=0.6pt] (0.36,1.24)--(-1.62,-0.94); \draw[qblue,line width=0.6pt] (0.36,1.24)--(-0.89,-0.94); \draw[qblue,line width=0.6pt] (0.36,1.24)--(-1.26,-0.31); \draw[qblue,line width=0.6pt] (0.00,1.87)--(1.62,-0.94); \draw[qblue,line width=0.6pt] (0.00,1.87)--(1.26,-0.31); \draw[qblue,line width=0.6pt] (0.00,1.87)--(0.89,-0.94); \draw[qblue,line width=0.6pt] (-0.36,1.24)--(1.62,-0.94); \draw[qblue,line width=0.6pt] (-0.36,1.24)--(1.26,-0.31); \draw[qblue,line width=0.6pt] (-0.36,1.24)--(0.89,-0.94); \draw[qblue,line width=0.6pt] (0.36,1.24)--(1.62,-0.94); \draw[qblue,line width=0.6pt] (0.36,1.24)--(1.26,-0.31); \draw[qblue,line width=0.6pt] (0.36,1.24)--(0.89,-0.94); \draw[qblue,line width=0.6pt] (-1.62,-0.94)--(1.62,-0.94); \draw[qblue,line width=0.6pt] (-1.62,-0.94)--(1.26,-0.31); \draw[qblue,line width=0.6pt] (-1.62,-0.94)--(0.89,-0.94); \draw[qblue,line width=0.6pt] (-0.89,-0.94)--(1.62,-0.94); \draw[qblue,line width=0.6pt] (-0.89,-0.94)--(1.26,-0.31); \draw[qblue,line width=0.6pt] (-0.89,-0.94)--(0.89,-0.94); \draw[qblue,line width=0.6pt] (-1.26,-0.31)--(1.62,-0.94); \draw[qblue,line width=0.6pt] (-1.26,-0.31)--(1.26,-0.31); \draw[qblue,line width=0.6pt] (-1.26,-0.31)--(0.89,-0.94); \fill[qgold] (0.00,1.87) circle[radius=2.8pt]; \fill[qgold] (-0.36,1.24) circle[radius=2.8pt]; \fill[qgold] (0.36,1.24) circle[radius=2.8pt]; \fill[magenta] (-1.62,-0.94) circle[radius=2.8pt]; \fill[magenta] (-0.89,-0.94) circle[radius=2.8pt]; \fill[magenta] (-1.26,-0.31) circle[radius=2.8pt]; \fill[black!75] (1.62,-0.94) circle[radius=2.8pt]; \fill[black!75] (1.26,-0.31) circle[radius=2.8pt]; \fill[black!75] (0.89,-0.94) circle[radius=2.8pt]; \end{tikzpicture} \caption{The complete tripartite graph $K_{3,3,3}$, which is the complement of $3K_3$. Its spectrum is $\{6,0,0,0,0,0,0,-3,-3\}$, the same as that of the quantum graph $J-3E$ over $M_3$, as checked by {\tt pictures.py}.}\label{fig:k333} \end{figure} \medskip\noindent\textbf{The quantum torus.} As a last application, let us go back to the quantum torus over $M_3$. This is the quantum rook's graph from \cite{gr2}, at $n=3$, whose quantum automorphism group is a twist of that of the rook's graph, which is here the torus graph $K_3\,\square\,K_3$, whose quantum automorphism group is the wreath product $S_3\wr\mathbb Z_2$, by \cite{bb2}, the structure of this twist being left open in \cite{gr2}. The computation of this twist leads to: \begin{theorem}\label{thm:qtorus} The quantum torus over $M_3$ has quantum symmetry. More precisely, its quantum automorphism group $G$ is a $2$-cocycle twist of $S_3\wr\mathbb Z_2$, so $G$ is a noncommutative finite quantum group of order $72$, and we have $C(G)\simeq\mathbb C^{36}\oplus M_3(\mathbb C)^4$, the classical version of $G$ being $\mathbb Z_3^2\rtimes\mathbb Z_4$. \end{theorem} \begin{proof} The first assertion follows from Theorem \ref{thm:twisting}, or from \cite{gr2}, and from \cite{bb2}. The group $K=S_3\wr\mathbb Z_2$ consists of the affine maps $k(p)=Ap+t$ of $\mathbb Z_3^2$, with $A$ being a signed permutation matrix, and since $\sigma(Ap,h)=\sigma(p,\det(A)A^{-1}h)$, the coordinates of $C(K)$ from the above proof are given by: $$y_{gh}(k)=\omega^{\sigma(t,h)}\delta_{g,\det(A)A^{-1}h}$$ By the formula of the twisted product, we have $[y_{gh}][y_{rs}]=\omega^{\sigma(h,s)-\sigma(g,r)}[y_{rs}][y_{gh}]$. Now for $k\in K$ with $\det(A)=-1$, such as the transposition $p\to(p_2,p_1)$, and for $g=\det(A)A^{-1}h$ and $r=\det(A)A^{-1}s$, we have $\sigma(g,r)=-\sigma(h,s)$, and $y_{gh}y_{rs}(k)\neq0$. Thus, by choosing $h,s$ with $\sigma(h,s)\neq0$, we obtain noncommuting elements $[y_{gh}],[y_{rs}]$. For the structure of $C(G)$, write $k=(t,A)$, set $B_A=\det(A)A^{-1}$, and consider the functions $f_{A,h}(t,A')=\delta_{AA'}\omega^{\sigma(t,h)}$. These are the restrictions of the coordinates $y_{B_Ah,h}$ to the fibers of $k\to A$, so they have bidegree $(B_Ah,h)$, and the 8 functions $f_{A,0}$, of bidegree $(0,0)$, are orthogonal central idempotents of $C(K)^\alpha$, summing up to 1. The corresponding ideal is spanned by the 9 functions $f_{A,h}$, and since $\det B_A=\det A$, the twisted product there has commutator bicharacter: $$(h,s)\to\omega^{\sigma(h,s)-\sigma(B_Ah,B_As)}=\omega^{(1-\det A)\sigma(h,s)}$$ For the 4 matrices with $\det A=1$ the ideal is commutative, so it is $\mathbb C^9$. For the 4 matrices with $\det A=-1$ the bicharacter $\omega^{2\sigma}$ is nondegenerate, so the center of this twisted group algebra of $\mathbb Z_3^2$ is $\mathbb C$, and the ideal is $M_3(\mathbb C)$. Thus $C(G)\simeq\mathbb C^{36}\oplus M_3(\mathbb C)^4$. Finally, $Ad_U,Ad_\Lambda$ generate a group of order 9, normalized by $Ad_{F_3}$, with $F_3$ being the Fourier matrix, which acts by a quarter turn on $U,\Lambda,U^*,\Lambda^*$. These 36 automorphisms commute with $d$, so they are the 36 characters, and the classical version is $\mathbb Z_3^2\rtimes\mathbb Z_4$. \end{proof} In the multimatrix basis, the quantum torus over $M_3$ is given by the following formula: $$d(e_{ab})=e_{a+1,b+1}+e_{a-1,b-1}+2\cos\left(\frac{2\pi(a-b)}{3}\right)e_{ab}$$ Thus, this quantum graph is made of 3 triangles, indexed by $a-b$, with loops of weight $2$ on the diagonal triangle, and $-1$ on the other ones. Its spectrum is $\{4,1,1,1,1,-2,-2,-2,-2\}$, the same as that of the rook's graph, as checked by {\tt pictures.py}, and as pictured in Figure \ref{fig:rook}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \begin{scope} \draw[qblue,line width=1pt] (0,-0.00)--(1.9,-0.00); \draw[qblue,line width=1pt] (0,-0.00) to[bend left=28] (1.9,-0.00); \draw[qgold,line width=1pt] (0.00,0)--(0.00,-1.9); \draw[qgold,line width=1pt] (0.00,0) to[bend left=28] (0.00,-1.9); \draw[qblue,line width=1pt] (0,-0.95)--(1.9,-0.95); \draw[qblue,line width=1pt] (0,-0.95) to[bend left=28] (1.9,-0.95); \draw[qgold,line width=1pt] (0.95,0)--(0.95,-1.9); \draw[qgold,line width=1pt] (0.95,0) to[bend left=28] (0.95,-1.9); \draw[qblue,line width=1pt] (0,-1.90)--(1.9,-1.90); \draw[qblue,line width=1pt] (0,-1.90) to[bend left=28] (1.9,-1.90); \draw[qgold,line width=1pt] (1.90,0)--(1.90,-1.9); \draw[qgold,line width=1pt] (1.90,0) to[bend left=28] (1.90,-1.9); \foreach \x in {0,0.95,1.9}\foreach \y in {0,-0.95,-1.9}{\fill[black!75] (\x,\y) circle[radius=2.3pt];} \node at (0.95,-2.75) {$K_3\,\square\,K_3$}; \end{scope} \draw[qblue,line width=1pt] (4.00,-0.10)--(3.35,-1.22)--(4.65,-1.23)--cycle; \draw[qgold,line width=.8pt] (4.00,-0.10) .. controls +(60:0.55) and +(120:0.55) .. (4.00,-0.10); \fill[black!75] (4.00,-0.10) circle[radius=2.3pt]; \node[font=\scriptsize] at (3.59,0.01) {$e_{11}$}; \draw[qgold,line width=.8pt] (3.35,-1.22) .. controls +(180:0.55) and +(240:0.55) .. (3.35,-1.22); \fill[black!75] (3.35,-1.22) circle[radius=2.3pt]; \node[font=\scriptsize] at (3.46,-1.63) {$e_{22}$}; \draw[qgold,line width=.8pt] (4.65,-1.23) .. controls +(300:0.55) and +(360:0.55) .. (4.65,-1.23); \fill[black!75] (4.65,-1.23) circle[radius=2.3pt]; \node[font=\scriptsize] at (4.95,-0.93) {$e_{33}$}; \node[font=\scriptsize,text=qgold!80!black] at (4.00,-2.20) {loops $2$}; \draw[qblue,line width=1pt] (6.25,-0.10)--(5.60,-1.22)--(6.90,-1.23)--cycle; \draw[magenta,line width=.8pt] (6.25,-0.10) .. controls +(60:0.55) and +(120:0.55) .. (6.25,-0.10); \fill[black!75] (6.25,-0.10) circle[radius=2.3pt]; \node[font=\scriptsize] at (5.84,0.01) {$e_{21}$}; \draw[magenta,line width=.8pt] (5.60,-1.22) .. controls +(180:0.55) and +(240:0.55) .. (5.60,-1.22); \fill[black!75] (5.60,-1.22) circle[radius=2.3pt]; \node[font=\scriptsize] at (5.71,-1.63) {$e_{32}$}; \draw[magenta,line width=.8pt] (6.90,-1.23) .. controls +(300:0.55) and +(360:0.55) .. (6.90,-1.23); \fill[black!75] (6.90,-1.23) circle[radius=2.3pt]; \node[font=\scriptsize] at (7.20,-0.93) {$e_{13}$}; \node[font=\scriptsize,text=magenta] at (6.25,-2.20) {loops $-1$}; \draw[qblue,line width=1pt] (8.50,-0.10)--(7.85,-1.22)--(9.15,-1.23)--cycle; \draw[magenta,line width=.8pt] (8.50,-0.10) .. controls +(60:0.55) and +(120:0.55) .. (8.50,-0.10); \fill[black!75] (8.50,-0.10) circle[radius=2.3pt]; \node[font=\scriptsize] at (8.09,0.01) {$e_{12}$}; \draw[magenta,line width=.8pt] (7.85,-1.22) .. controls +(180:0.55) and +(240:0.55) .. (7.85,-1.22); \fill[black!75] (7.85,-1.22) circle[radius=2.3pt]; \node[font=\scriptsize] at (7.96,-1.63) {$e_{23}$}; \draw[magenta,line width=.8pt] (9.15,-1.23) .. controls +(300:0.55) and +(360:0.55) .. (9.15,-1.23); \fill[black!75] (9.15,-1.23) circle[radius=2.3pt]; \node[font=\scriptsize] at (9.45,-0.93) {$e_{31}$}; \node[font=\scriptsize,text=magenta] at (8.50,-2.20) {loops $-1$}; \node at (6.25,-2.75) {the quantum torus over $M_3$}; \end{tikzpicture} \caption{The rook's graph $K_3\,\square\,K_3$, with rows in blue and columns in gold, and the quantum torus over $M_3$, made of $3$ triangles with loops. The rook's graph has $72$ automorphisms and no quantum symmetry, while the quantum torus has quantum symmetry, its quantum automorphism group being a noncommutative twist of order $72$.}\label{fig:rook} \end{figure} More generally, consider the quantum rook's graph over $M_n$ from \cite{gr2}, obtained with the set $S=\{(a,0),(0,b)|a,b\neq0\}$. This quantum graph has as quantum automorphism group a twist of that of the rook's graph, which is the Hamming graph $H(2,n)$, whose quantum automorphism group was computed in \cite{gr3}. The program {\tt twisting.py} checks Theorem \ref{thm:twisting} on the examples in Corollary \ref{cor:twists}, on the quantum square, the quantum torus over $M_3$, and on random weights $c$, real and undirected, or complex and directed, over $M_2,M_3,M_4$, by computing the spectra of $X_c$ and $Y_c$, and the dimensions of the smallest subspaces containing $1,J,d$ and stable under the 4 basic operations, which coincide. For the quantum torus over $M_3$, it computes the automorphism group $K$ of $K_3\,\square\,K_3$ by brute force, finding 72 affine maps, half of them having determinant $-1$, then decomposes $C(K)$ according to the bidegree, constructs the twisted algebra $C(K)^\alpha$, and checks that this is a Hopf $*$-algebra with positive Haar functional, coacting on $M_3$ via $\Phi(U_h)=\sum_gU_g\otimes[y_{gh}]$, and commuting with the quantum torus. It then finds that the center of $C(K)^\alpha$ has dimension 40, and its abelianization has dimension 36, and that the central elements act on the regular representation with 36 eigenvalues of multiplicity 1, and 4 eigenvalues of multiplicity 9, which confirms $C(K)^\alpha\simeq\mathbb C^{36}\oplus M_3(\mathbb C)^4$, and it checks as well the bidegrees, the central idempotents and the commutator bicharacters from the above proof. Thus $G$ is a finite quantum space too, with 72 points, which can be pictured as in section 1, see Figure \ref{fig:qtorusgroup}. \begin{figure}[H] \centering \begin{tikzpicture}[x=4.2mm,y=4.2mm] \foreach \a in {1,...,6}\foreach \b in {1,...,6}{\fill[qgold] (\b,-\a) circle[radius=2.6pt];} \foreach \s in {0,1,2,3}{ \foreach \a in {1,2,3}\foreach \b in {1,2,3}{\ifnum\a=\b \fill[qgold] (\b+8+4*\s,-\a-1.5) circle[radius=2.6pt]; \else \draw[qblue,fill=white,line width=.8pt] (\b+8+4*\s,-\a-1.5) circle[radius=2.4pt]; \fi} \draw[black!30,dashed,rounded corners=3pt] (8.4+4*\s,-1.9) rectangle (11.6+4*\s,-5.1);} \draw[black!30,dashed,rounded corners=3pt] (0.4,-0.4) rectangle (6.6,-6.6); \node[font=\small] at (3.5,-7.6) {$\mathbb C^{36}$, the characters}; \node[font=\small] at (16,-7.6) {$M_3(\mathbb C)^4$}; \end{tikzpicture} \caption{The quantum symmetry group $G$ of the quantum torus over $M_3$, pictured as a finite quantum space, with $C(G)=\mathbb C^{36}\oplus M_3(\mathbb C)^4$. The $36$ characters form the classical version of $G$, which is $\mathbb Z_3^2\rtimes\mathbb Z_4$, while the twist of $S_3\wr\mathbb Z_2$ has $72$ points in total.}\label{fig:qtorusgroup} \end{figure} Finally, the program checks that $Ad_U,Ad_\Lambda,Ad_{F_3}$ commute with the quantum torus, and generate a group of order 36, and that the main character $\sum_g[y_{gg}]$ has the same moments as the number of fixed points of $K$, as it should, namely: \begin{center} \begin{tabular}{|c|c|c|c|c|c|c|} \hline $k$&$1$&$2$&$3$&$4$&$5$&$6$\\ \hline $h(\chi^k)$&$1$&$3$&$15$&$105$&$861$&$7503$\\ \hline \end{tabular} \end{center} \medskip These are the numbers of orbits of $K$ on the $k$-tuples of points, and they are the same for $G$, because twisting does not change the Tannakian category. Summarizing, we have now a number of computations of quantum symmetry groups, of classical and of quantum graphs, which can be put in the following table, where $S_{M_2}^+=SO_3$, and where the conditions for the Weyl-Cayley graphs $X_S$ are those from Theorem \ref{thm:rigidity}: \begin{center} \begin{tabular}{|l|l|l|} \hline Quantum graph&Conditions&Quantum group\\ \hline $K_V$&$-$&$S_V^+$\\ \hline $K_2\times K_V$, $K_2\,\square\,K_V$&$N\geq3$&$\mathbb Z_2\times S_V^+$\\ \hline $mK_W$&$-$&$S_W^+\wr_*S_m^+$\\ \hline $C_m\circ K_W$&$m\geq5$&$S_W^+\wr_*D_m$\\ \hline $N\vec{C}_s$&$-$&$H_N^{s+}=\mathbb Z_s\wr_*S_N^+$\\ \hline $X_S$ over $M_n$&Theorem \ref{thm:rigidity}&$\mathbb Z_n^2\rtimes\mathbb Z_2$\\ \hline $X_c$ over $M_n$&$-$&twist of $G^+(Y_c)$\\ \hline Weyl cycle over $M_n$&$n\geq5$&twist of $D_n\wr_*S_n^+$\\ \hline Directed Weyl cycle over $M_n$&$-$&twist of $H_n^{n+}$\\ \hline Quantum torus over $M_3$&$-$&twist of $S_3\wr\mathbb Z_2$\\ \hline \end{tabular} \end{center} \medskip Historically, the classification in \cite{bb2} of the quantum automorphism groups of the vertex-transitive graphs having at most 11 vertices left open the case of the Petersen graph, which was settled by Schmidt in \cite{spe}, showing that it has no quantum symmetry. The quantum analogues of these computations, over small quantum spaces, are an interesting question. Over $M_n$, the weighted Weyl-Cayley graphs $X_c$ are exactly the quantum graphs commuting with the maps $Ad_{U_g}$, because such a quantum graph must be diagonal in the basis $\{U_h\}$, and by Theorem \ref{thm:twisting}, their quantum symmetry groups are twists of those of the Cayley graphs of $\mathbb Z_n^2$, which were studied by Gromada in \cite{gr3}. \section{Walks and connectivity} Classically, the number of walks of length $k$ from $j$ to $i$ is $(d^k)_{ij}$. In the quantum case we can use the same formula, in the multimatrix basis, as a weighted count, and we have as well the following global quantities: \begin{proposition} For a quantum graph $X=(V,d)$, the following weighted contractions, which in the classical case count respectively the walks of length $k$, and the closed walks of length $k$, $$w_k==\psi(d^k(1))\quad,\quad c_k=Tr(d^k)$$ are well-defined, and in the undirected case, $c_k=\sum_\lambda\lambda^k$, the sum being over the eigenvalues of $d$. Equivalently, $c_k/N$ are the moments of the spectral measure of $d$. \end{proposition} \begin{proof} In the classical case these are $\sum_{ij}(d^k)_{ij}$ and $\sum_i(d^k)_{ii}$, and the formulas make sense in general, with $=\psi(d^k(1))$ by definition of the scalar product. Observe that in general $1$ is not the all-one vector of the multimatrix basis, so $w_k$ is not the number of walks in the picture of $X$, but rather a weighted version of it. \end{proof} For instance, in the square there are 2 walks of length 2 between opposite vertices, as in Figure \ref{fig:walks2}, and 2 closed walks of length 2 at each vertex, so $c_2=8$, as in the table below. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[black!25,line width=1.0pt] (1.10,0.00)--(0.00,0.00); \draw[black!25,line width=1.0pt] (0.00,0.00)--(0.00,1.10); \draw[->,magenta,line width=1.4pt,shorten >=3pt,shorten <=3pt] (0.00,1.10)--(1.10,1.10); \draw[->,magenta,line width=1.4pt,shorten >=3pt,shorten <=3pt] (1.10,1.10)--(1.10,0.00); \fill[black!75] (0.00,1.10) circle[radius=2.2pt]; \node[font=\scriptsize] at (-0.25,1.30) {$1$}; \fill[black!75] (1.10,1.10) circle[radius=2.2pt]; \node[font=\scriptsize] at (1.35,1.30) {$2$}; \fill[black!75] (1.10,0.00) circle[radius=2.2pt]; \node[font=\scriptsize] at (1.35,-0.20) {$3$}; \fill[black!75] (0.00,0.00) circle[radius=2.2pt]; \node[font=\scriptsize] at (-0.25,-0.20) {$4$}; \draw[black!25,line width=1.0pt] (3.00,1.10)--(4.10,1.10); \draw[black!25,line width=1.0pt] (4.10,1.10)--(4.10,0.00); \draw[->,magenta,line width=1.4pt,shorten >=3pt,shorten <=3pt] (3.00,1.10)--(3.00,0.00); \draw[->,magenta,line width=1.4pt,shorten >=3pt,shorten <=3pt] (3.00,0.00)--(4.10,0.00); \fill[black!75] (3.00,1.10) circle[radius=2.2pt]; \node[font=\scriptsize] at (2.75,1.30) {$1$}; \fill[black!75] (4.10,1.10) circle[radius=2.2pt]; \node[font=\scriptsize] at (4.35,1.30) {$2$}; \fill[black!75] (4.10,0.00) circle[radius=2.2pt]; \node[font=\scriptsize] at (4.35,-0.20) {$3$}; \fill[black!75] (3.00,0.00) circle[radius=2.2pt]; \node[font=\scriptsize] at (2.75,-0.20) {$4$}; \end{tikzpicture} \caption{The $2$ walks of length $2$ from $1$ to $3$ in the square, in agreement with $(d^2)_{31}=2$, as computed by {\tt pictures.py}.}\label{fig:walks2} \end{figure} The generating series of the walks and of the closed walks are as follows: $$\sum_kw_kz^k=<(1-zd)^{-1}(1),1>\quad,\quad\sum_kc_kz^k=Tr((1-zd)^{-1})$$ As an illustration, here are the closed walks for the 4 simple quantum graphs over $M_2$ without loops, discussed in section 10, namely the empty graph, the graph $Ad_{\sigma_x}$, the quantum square and the simplex, as computed by {\tt pictures.py}: \begin{center} \begin{tabular}{|l|c|c|c|c|c|c|c|} \hline quantum graph&spectrum&$c_1$&$c_2$&$c_3$&$c_4$&$c_5$&$c_6$\\ \hline empty&$0,0,0,0$&$0$&$0$&$0$&$0$&$0$&$0$\\ \hline $Ad_{\sigma_x}$&$1,1,-1,-1$&$0$&$4$&$0$&$4$&$0$&$4$\\ \hline quantum square&$2,0,0,-2$&$0$&$8$&$0$&$32$&$0$&$128$\\ \hline simplex&$3,-1,-1,-1$&$0$&$12$&$24$&$84$&$240$&$732$\\ \hline \end{tabular} \end{center} \medskip These are the closed walks of the classical graphs $\emptyset$, $2K_2$, $C_4$, $K_4$ on 4 vertices. Observe that $c_1=Tr(d)=0$ in all cases, although the pictures of $Ad_{\sigma_x}$, of the quantum square and of the simplex have loops, because the loops come with signs. \medskip\noindent\textbf{Diagrams.} Both $w_k$ and $c_k$ are given by closed diagrams, and this is part of a general construction. By a drawn graph we mean a finite graph $F$ with a rotation system, namely a cyclic order on the edges around each vertex. Equivalently, $F$ is drawn on a closed orientable surface, with the faces being discs, and $F$ is called a plane graph when this surface is a sphere, that is, when the genus is 0. We can count the homomorphisms $F\to X$ as follows: \begin{definition} Given an undirected real quantum graph $X=(V,d)$ and a drawn graph $F$, we define $hom(F,X)$ as the scalar obtained by putting at each vertex of $F$, of degree $k$, the element $\mu^*_k(1)\in C(V)^{\otimes k}$ obtained by iterating $\mu^*$, with $\mu^*_1(1)=1$, with its legs in the cyclic order given by the drawing, and by contracting the legs along the edges of $F$, with the bilinear form $(x,y)\to\psi(x\,d(y))$, an isolated vertex contributing the factor $\psi(1)=N$. \end{definition} In the classical case we have $\mu^*_k(1)=\sum_ie_i^{\otimes k}$ and $\psi(e_i\,d(e_j))=d_{ij}$, so $hom(F,X)$ is the number of homomorphisms $F\to X$, counted with weights. These numbers are a central object in the theory of graph limits, see Lov\'asz \cite{lgl}, and by a classical result of Lov\'asz, the numbers $hom(F,X)$, with $F$ arbitrary, determine $X$ up to isomorphism. In general, $\mu^*_k(1)$ is invariant under the cyclic permutations of its legs, because $\psi$ is a trace, and the bilinear form is symmetric, because $X$ is undirected and real, so our definition makes sense. In planar algebra terms, $hom(F,X)$ is, up to a normalization factor, the value of a closed planar tangle having all its boxes labeled by $d$, so it is an invariant of the planar algebra $\langle d\rangle$ from section 3. We have: \begin{proposition}\label{prop:homwalks} For an undirected real quantum graph $X$, we have the formulas $$w_k=hom(P_{k+1},X)\quad,\quad c_k=hom(C_k,X)$$ where $P_{k+1}$ is the path with $k$ edges, and $C_k$ is the $k$-cycle. \end{proposition} \begin{proof} At the endpoints of $P_{k+1}$ we have $\mu^*_1(1)=1$, and at the other vertices $\mu^*_2(1)=\mu^*(1)$, which is the dual basis element of the bilinear form $(x,y)\to\psi(xy)$, in the sense that $\sum c_1\psi(c_2y)=y$, with $\mu^*(1)=\sum c_1\otimes c_2$. Thus the contraction gives $\psi(d^k(1))=w_k$. For $C_k$ we obtain in the same way the trace of $d^k$, computed with respect to the dual bases of $\psi(xy)$, which is the usual trace. \end{proof} The decorated graphs $P_5$ and $C_6$ are pictured in Figure \ref{fig:pathcycle}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \begin{scope} \draw[qblue,line width=1.1pt] (0.00,0)--(1.15,0) node[midway,below,font=\scriptsize,text=black] {$d$}; \draw[qblue,line width=1.1pt] (1.15,0)--(2.30,0) node[midway,below,font=\scriptsize,text=black] {$d$}; \draw[qblue,line width=1.1pt] (2.30,0)--(3.45,0) node[midway,below,font=\scriptsize,text=black] {$d$}; \draw[qblue,line width=1.1pt] (3.45,0)--(4.60,0) node[midway,below,font=\scriptsize,text=black] {$d$}; \fill[qgold] (0.00,0) circle[radius=2.6pt]; \node[above,font=\scriptsize] at (0.00,0.05) {$1$}; \fill[magenta] (1.15,0) circle[radius=2.6pt]; \node[above,font=\scriptsize] at (1.15,0.05) {$\mu^*(1)$}; \fill[magenta] (2.30,0) circle[radius=2.6pt]; \node[above,font=\scriptsize] at (2.30,0.05) {$\mu^*(1)$}; \fill[magenta] (3.45,0) circle[radius=2.6pt]; \node[above,font=\scriptsize] at (3.45,0.05) {$\mu^*(1)$}; \fill[qgold] (4.60,0) circle[radius=2.6pt]; \node[above,font=\scriptsize] at (4.60,0.05) {$1$}; \node at (2.3,-1.3) {$P_5$, giving $w_4=\psi(d^4(1))$}; \end{scope} \begin{scope}[shift={(7.6,0.1)}] \draw[qblue,line width=1.1pt] (0.00,0.85)--(-0.74,0.43); \node[font=\scriptsize] at (-0.48,0.83) {$d$}; \draw[qblue,line width=1.1pt] (-0.74,0.43)--(-0.74,-0.42); \node[font=\scriptsize] at (-0.96,0.00) {$d$}; \draw[qblue,line width=1.1pt] (-0.74,-0.42)--(-0.00,-0.85); \node[font=\scriptsize] at (-0.48,-0.83) {$d$}; \draw[qblue,line width=1.1pt] (-0.00,-0.85)--(0.74,-0.43); \node[font=\scriptsize] at (0.48,-0.83) {$d$}; \draw[qblue,line width=1.1pt] (0.74,-0.43)--(0.74,0.42); \node[font=\scriptsize] at (0.96,-0.00) {$d$}; \draw[qblue,line width=1.1pt] (0.74,0.42)--(0.00,0.85); \node[font=\scriptsize] at (0.48,0.83) {$d$}; \fill[magenta] (0.00,0.85) circle[radius=2.6pt]; \fill[magenta] (-0.74,0.43) circle[radius=2.6pt]; \fill[magenta] (-0.74,-0.42) circle[radius=2.6pt]; \fill[magenta] (-0.00,-0.85) circle[radius=2.6pt]; \fill[magenta] (0.74,-0.43) circle[radius=2.6pt]; \fill[magenta] (0.74,0.42) circle[radius=2.6pt]; \node at (0,-1.4) {$C_6$, giving $c_6=Tr(d^6)$}; \end{scope} \end{tikzpicture} \caption{The plane graphs $P_5$ and $C_6$, decorated as in the definition of $hom(F,X)$, with $\mu^*_1(1)=1$ at the endpoints, $\mu^*_2(1)=\mu^*(1)$ at the vertices of degree $2$, and the bilinear form $\psi(x\,d(y))$ on the edges. Contracting everything gives the walks and the closed walks.}\label{fig:pathcycle} \end{figure} The program {\tt diagrams.py} checks these formulas, for random undirected real quantum graphs over $\mathbb C^3$, $M_2$, $\mathbb C\oplus M_2$. It also enumerates all the ways of drawing small graphs $F$ on surfaces, by choosing the cyclic orders around the vertices. Over $\mathbb C^3$ all the drawings give the same value, while over $M_2$ and $\mathbb C\oplus M_2$ the value depends on the drawing. First, reversing all the cyclic orders, which is a reflection, conjugates $hom(F,X)$. Also, for some drawings of the complete graph $K_4$ on the torus, the value differs from the planar one. The simplest example is obtained by reversing the cyclic order around one vertex, as in Figure \ref{fig:k4}, and {\tt pictures.py} checks that the 2 values coincide over $\mathbb C^4$, and differ over $M_2$ and over $\mathbb C\oplus M_2$, for random $X$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small,>={Stealth[length=1.6mm]}] \foreach \sh/\col/\dir/\lab in {0/qblue/1/{planar, $4$ faces},5.2/magenta/-1/{genus $1$, $2$ faces}}{ \begin{scope}[shift={(\sh,0)}] \coordinate (o) at (0,0); \coordinate (p1) at (90:1.35); \coordinate (p2) at (210:1.35); \coordinate (p3) at (330:1.35); \draw[qgold,line width=1.1pt] (p1)--(p2)--(p3)--cycle; \draw[qgold,line width=1.1pt] (o)--(p1) (o)--(p2) (o)--(p3); \foreach \p in {o,p1,p2,p3}{\fill[black!75] (\p) circle[radius=2.3pt];} \draw[->,\col,line width=1pt] (30:0.42) arc[start angle=30,end angle=30+\dir*300,radius=0.42]; \node at (0,-1.35) {\lab}; \end{scope}} \end{tikzpicture} \caption{A pair of drawings of $K_4$, differing by the cyclic order of the edges around the center. The first one is planar, and the second one lives on the torus.}\label{fig:k4} \end{figure} Even the planar drawings can give different values. The simplest example is the tree $F$ having a vertex of degree 4, with pendant paths of lengths $1,1,2,2$. Its planar drawings, up to relabeling, have these paths in cyclic order $1,1,2,2$ or $1,2,1,2$ around the center, and with $a=d(1)$ and $b=d^2(1)$, they give the values $\psi(a^2b^2)$ and $\psi(abab)$, whose difference is $\frac{1}{2}\psi([a,b]^*[a,b])$. For instance, over $M_2$, with $p=e_{11}$, $q$ the rank one projection onto $(1,1)$, and $d(x)=pxp+2qxq$, which is real, undirected and positively weighted, we obtain $a=p+2q$ and $b=2p+5q$, and the values $525$ and $1049/2$. The 2 drawings are as in Figure \ref{fig:tree}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.1pt] (0.00,0.00)--(0.00,0.75); \fill[black!75] (0.00,0.75) circle[radius=2.2pt]; \node[font=\scriptsize,text=magenta] at (0.00,1.17) {$a$}; \draw[qblue,line width=1.1pt] (0.00,0.00)--(0.75,0.00); \fill[black!75] (0.75,0.00) circle[radius=2.2pt]; \node[font=\scriptsize,text=magenta] at (1.17,0.00) {$a$}; \draw[qblue,line width=1.1pt] (0.00,0.00)--(0.00,-0.75); \draw[qblue,line width=1.1pt] (0.00,-0.75)--(0.00,-1.50); \fill[black!75] (0.00,-0.75) circle[radius=2.2pt]; \fill[black!75] (0.00,-1.50) circle[radius=2.2pt]; \node[font=\scriptsize,text=magenta] at (0.00,-1.92) {$b$}; \draw[qblue,line width=1.1pt] (0.00,0.00)--(-0.75,-0.00); \draw[qblue,line width=1.1pt] (-0.75,-0.00)--(-1.50,-0.00); \fill[black!75] (-0.75,-0.00) circle[radius=2.2pt]; \fill[black!75] (-1.50,-0.00) circle[radius=2.2pt]; \node[font=\scriptsize,text=magenta] at (-1.92,-0.00) {$b$}; \fill[black!75] (0.00,0.00) circle[radius=2.6pt]; \node at (0.00,-2.25) {$\psi(a^2b^2)$}; \draw[qblue,line width=1.1pt] (4.00,0.00)--(4.00,0.75); \fill[black!75] (4.00,0.75) circle[radius=2.2pt]; \node[font=\scriptsize,text=magenta] at (4.00,1.17) {$a$}; \draw[qblue,line width=1.1pt] (4.00,0.00)--(4.75,0.00); \draw[qblue,line width=1.1pt] (4.75,0.00)--(5.50,0.00); \fill[black!75] (4.75,0.00) circle[radius=2.2pt]; \fill[black!75] (5.50,0.00) circle[radius=2.2pt]; \node[font=\scriptsize,text=magenta] at (5.92,0.00) {$b$}; \draw[qblue,line width=1.1pt] (4.00,0.00)--(4.00,-0.75); \fill[black!75] (4.00,-0.75) circle[radius=2.2pt]; \node[font=\scriptsize,text=magenta] at (4.00,-1.17) {$a$}; \draw[qblue,line width=1.1pt] (4.00,0.00)--(3.25,-0.00); \draw[qblue,line width=1.1pt] (3.25,-0.00)--(2.50,-0.00); \fill[black!75] (3.25,-0.00) circle[radius=2.2pt]; \fill[black!75] (2.50,-0.00) circle[radius=2.2pt]; \node[font=\scriptsize,text=magenta] at (2.08,-0.00) {$b$}; \fill[black!75] (4.00,0.00) circle[radius=2.6pt]; \node at (4.00,-2.25) {$\psi(abab)$}; \end{tikzpicture} \caption{The $2$ planar drawings, up to relabeling, of the tree with pendant paths of lengths $1,1,2,2$. Contracting toward the center, the paths of length $1$ and $2$ produce $a=d(1)$ and $b=d^2(1)$, and the drawings give $\psi(a^2b^2)$ and $\psi(abab)$, which differ by $\frac{1}{2}\psi([a,b]^*[a,b])$.}\label{fig:tree} \end{figure} The same happens for the connected simple graph over $M_3$ from section 7, as checked by {\tt diagrams.py}. Thus Proposition \ref{prop:homwalks} is special to paths and cycles, and in general $hom(F,X)$ is an invariant of the drawn graph $F$, with its cyclic orders. For classical targets, Man\v cinska and Roberson \cite{mro} proved that 2 graphs are quantum isomorphic precisely when they have the same homomorphism counts from all planar graphs, this coming from the planar algebra structure from section 3. In our setting, we are led to: \begin{question}\label{ques:hom} Do the numbers $hom(F,X)$, with $F$ ranging over the plane graphs, taken with their cyclic orders, characterize $X$ up to quantum isomorphism, defined as an isomorphism of the planar algebras $\langle d\rangle$, sending $d$ to $d$? \end{question} \medskip\noindent\textbf{Distances.} Let us discuss now distances. Classically, the distance between 2 vertices is the length of the shortest walk between them. In the quantum case, we use projections: \begin{definition} The distance between $2$ projections $p,q\in C(V)$ is the smallest $k\geq0$ such that $q\,d^k(p)\neq0$, and is $\infty$ when no such $k$ exists. \end{definition} Classically, the distances from a given vertex organize the graph into layers, as in Figure \ref{fig:layers} for the cube. In the quantum case, the vertex is replaced by a projection $p$, and the layers by the supports of the elements $d^k(p)$. In the classical case, for $p=e_j$ and $q=e_i$ we have $q\,d^k(p)=(d^k)_{ij}e_i$, so with weights $\geq0$ we recover the usual distance. Positivity is needed here: for the 4-cycle with 3 edges of weight $1$ and one of weight $-1$ we have $d^2=2$, so the opposite vertices are at distance $\infty$, as checked by {\tt distance.py}. In the positively weighted case, this is the quantum graph metric of Kuperberg and Weaver \cite{kwe}, as follows: \begin{proposition}\label{prop:kw} Let $X=(V,d)$ be positively weighted, with Kraus decomposition $d(x)=\sum_kK_k^*xK_k$, with $K_k\in B(H)$, where $H=\oplus_r\mathbb C^{n_r}$, each $K_k$ living in a block $M_{n_r\times n_s}(\mathbb C)$, and let $\mathcal V=span(K_k)$. Then the distance between $p,q$ is $$dist(p,q)=\min\left\{k\geq0\Big|p\,\mathcal V^kq\neq0\right\}$$ which is the Kuperberg-Weaver distance associated to the quantum relation $\mathcal V$. In the undirected case, $\mathcal V^*=\mathcal V$, and so $dist(p,q)=dist(q,p)$. \end{proposition} \begin{proof} We have $d^k(p)=\sum_WW^*pW$, with the sum over the words $W=K_{k_1}\ldots K_{k_k}$. Since $d^k(p)\geq0$, we have $q\,d^k(p)=0$ precisely when $q\,d^k(p)\,q=0$, and this latter quantity is $\sum_W(pWq)^*(pWq)$, which vanishes precisely when $pWq=0$ for any $W$. For the last assertion, we use the Kraus decomposition of $d^*$, from section 6, whose operators are multiples of the $K_k^*$. \end{proof} Here $\mathcal V$ is a bimodule over $C(V)'=\oplus_r\mathbb C1_r$, which is a quantum relation in the sense of Weaver \cite{kwe}, and it does not depend on the choice of the Kraus decomposition. The program {\tt distance.py} checks the above formula for random positively weighted quantum graphs over $V=M_2\oplus\mathbb C\oplus M_3$, and random projections. Classically, a graph is connected when any 2 vertices are at finite distance, and in the quantum case, the right notion of connectivity comes from the Laplacian, as explained in section 6. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[black!35,line width=1.0pt] (0.00,0.00)--(1.30,0.00); \draw[black!35,line width=1.0pt] (0.00,0.00)--(0.55,0.45); \draw[black!35,line width=1.0pt] (0.00,0.00)--(0.00,1.30); \draw[black!35,line width=1.0pt] (1.30,0.00)--(1.85,0.45); \draw[black!35,line width=1.0pt] (1.30,0.00)--(1.30,1.30); \draw[black!35,line width=1.0pt] (0.55,0.45)--(1.85,0.45); \draw[black!35,line width=1.0pt] (0.55,0.45)--(0.55,1.75); \draw[black!35,line width=1.0pt] (1.85,0.45)--(1.85,1.75); \draw[black!35,line width=1.0pt] (0.00,1.30)--(1.30,1.30); \draw[black!35,line width=1.0pt] (0.00,1.30)--(0.55,1.75); \draw[black!35,line width=1.0pt] (1.30,1.30)--(1.85,1.75); \draw[black!35,line width=1.0pt] (0.55,1.75)--(1.85,1.75); \fill[magenta] (0.00,0.00) circle[radius=3pt]; \fill[qgold] (1.30,0.00) circle[radius=3pt]; \fill[qgold] (0.55,0.45) circle[radius=3pt]; \fill[qblue] (1.85,0.45) circle[radius=3pt]; \fill[qgold] (0.00,1.30) circle[radius=3pt]; \fill[qblue] (1.30,1.30) circle[radius=3pt]; \fill[qblue] (0.55,1.75) circle[radius=3pt]; \fill[black!75] (1.85,1.75) circle[radius=3pt]; \fill[magenta] (3.4,1.60) circle[radius=3pt]; \node[right] at (3.55,1.60) {distance $0$: $1$ vertex}; \fill[qgold] (3.4,1.15) circle[radius=3pt]; \node[right] at (3.55,1.15) {distance $1$: $3$ vertices}; \fill[qblue] (3.4,0.70) circle[radius=3pt]; \node[right] at (3.55,0.70) {distance $2$: $3$ vertices}; \fill[black!75] (3.4,0.25) circle[radius=3pt]; \node[right] at (3.55,0.25) {distance $3$: $1$ vertex}; \end{tikzpicture} \caption{The distances in the cube from a given vertex, in magenta, which split the vertices into layers of sizes $1,3,3,1$, as computed by {\tt pictures.py}.}\label{fig:layers} \end{figure} \medskip\noindent\textbf{Bipartite graphs.} Classically, a graph is bipartite when its vertex set splits into 2 independent sets, which means that $d$ anticommutes with a diagonal matrix of signs. In the quantum case, we use the notion of independence from section 9, as follows: \begin{definition} A quantum graph $X=(V,d)$ is called bipartite when there is a projection $p\in C(V)$ such that $p$ and $1-p$ are independent, in the sense that $p\,d(pxp)\,p=0$ and $(1-p)\,d((1-p)x(1-p))\,(1-p)=0$, for any $x\in C(V)$. In this case, we say that $p,1-p$ is a bipartition of $X$. \end{definition} As in the classical case, this can be reformulated in terms of signs, with the diagonal matrix of signs being replaced by a symmetry $s\in C(V)$, that is, a self-adjoint unitary: \begin{proposition}\label{prop:bipsym} A positively weighted quantum graph $X=(V,d)$ is bipartite, with bipartition $p,1-p$, precisely when the symmetry $s=2p-1$ satisfies $$d(sx)=-s\,d(x)$$ for any $x\in C(V)$. In this case, the spectrum of $d$ is symmetric, with multiplicities. \end{proposition} \begin{proof} With the Kraus decomposition $d(x)=\sum_kK_k^*xK_k$, the condition $p\,d(p)\,p=0$ reads $\sum_k(pK_kp)^*(pK_kp)=0$, so it means $pK_kp=0$ for any $k$, and this implies the first independence condition. Thus $X$ is bipartite precisely when $pK_kp=(1-p)K_k(1-p)=0$ for any $k$, which means $sK_k=-K_ks$. With the $K_k$ chosen linearly independent, this is equivalent to $d(sx)=-s\,d(x)$. Finally, if $d(y)=\lambda y$ then $d(sy)=-\lambda sy$, and $y\to sy$ is invertible. \end{proof} The converse holds, under the assumptions that $X$ is regular and connected. In the framework of the quantum adjacency matrices, and in the tracial case, this is due to Matsuda \cite{ma2}, and here is a proof in our setting, for arbitrary positive weights: \begin{theorem}\label{thm:bipartite} For a positively weighted, undirected, regular and connected quantum graph $X=(V,d)$, of valence $\lambda>0$, the following are equivalent: \begin{enumerate} \item $X$ is bipartite. \item The spectrum of $d$ is symmetric. \item $-\lambda$ is an eigenvalue of $d$. \end{enumerate} \end{theorem} \begin{proof} We have (1)$\implies$(2) by Proposition \ref{prop:bipsym}, and (2)$\implies$(3) is clear. For (3)$\implies$(1), consider the map $\varphi=d/\lambda$, which is unital, completely positive, and leaves $\psi$ invariant, because $\psi(\varphi(x))==\psi(x)$. Since $\varphi$ commutes with the involution, we can pick a self-adjoint $y\neq0$ with $\varphi(y)=-y$. By the Kadison-Schwarz inequality we have $\varphi(y^2)\geq\varphi(y)^2=y^2$, and since $\psi(\varphi(y^2)-y^2)=0$, with $\psi$ faithful, we obtain $\varphi(y^2)=y^2$. Thus $y^2\in\ker L=\mathbb C1$, so we can assume that $y=s$ is a symmetry. Now since $\varphi(s^2)=1=\varphi(s)^2$, by the multiplicative domain theorem of Choi \cite{cho} we have $\varphi(sx)=\varphi(s)\varphi(x)=-s\varphi(x)$, and Proposition \ref{prop:bipsym} applies. \end{proof} Classically, the even cycles are bipartite, and the odd ones are not, and this can be seen on their spectra, as in Figure \ref{fig:c6c5}, with $-2$ being an eigenvalue of $C_n$ precisely when $n$ is even. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.0pt] (0.00,0.50)--(-0.43,0.25); \draw[qblue,line width=1.0pt] (-0.43,0.25)--(-0.43,-0.25); \draw[qblue,line width=1.0pt] (-0.43,-0.25)--(-0.00,-0.50); \draw[qblue,line width=1.0pt] (-0.00,-0.50)--(0.43,-0.25); \draw[qblue,line width=1.0pt] (0.43,-0.25)--(0.43,0.25); \draw[qblue,line width=1.0pt] (0.43,0.25)--(0.00,0.50); \fill[qgold] (0.00,0.50) circle[radius=2.4pt]; \fill[magenta] (-0.43,0.25) circle[radius=2.4pt]; \fill[qgold] (-0.43,-0.25) circle[radius=2.4pt]; \fill[magenta] (-0.00,-0.50) circle[radius=2.4pt]; \fill[qgold] (0.43,-0.25) circle[radius=2.4pt]; \fill[magenta] (0.43,0.25) circle[radius=2.4pt]; \node at (-1.0,-0.00) {$C_6$}; \draw[black!50] (1.4,-0.00)--(6.6,-0.00); \draw[black!50] (1.60,-0.06)--(1.60,0.06); \draw[black!50] (2.80,-0.06)--(2.80,0.06); \draw[black!50] (4.00,-0.06)--(4.00,0.06); \draw[black!50] (5.20,-0.06)--(5.20,0.06); \draw[black!50] (6.40,-0.06)--(6.40,0.06); \fill[magenta] (1.60,-0.00) circle[radius=2.7pt]; \fill[magenta] (2.80,-0.00) circle[radius=3.2pt]; \node[above,font=\tiny] at (2.80,0.05) {$2$}; \fill[magenta] (5.20,-0.00) circle[radius=3.2pt]; \node[above,font=\tiny] at (5.20,0.05) {$2$}; \fill[magenta] (6.40,-0.00) circle[radius=2.7pt]; \draw[qblue,line width=1.0pt] (0.00,-0.80)--(-0.48,-1.15); \draw[qblue,line width=1.0pt] (-0.48,-1.15)--(-0.29,-1.70); \draw[qblue,line width=1.0pt] (-0.29,-1.70)--(0.29,-1.70); \draw[qblue,line width=1.0pt] (0.29,-1.70)--(0.48,-1.15); \draw[qblue,line width=1.0pt] (0.48,-1.15)--(0.00,-0.80); \fill[black!75] (0.00,-0.80) circle[radius=2.4pt]; \fill[black!75] (-0.48,-1.15) circle[radius=2.4pt]; \fill[black!75] (-0.29,-1.70) circle[radius=2.4pt]; \fill[black!75] (0.29,-1.70) circle[radius=2.4pt]; \fill[black!75] (0.48,-1.15) circle[radius=2.4pt]; \node at (-1.0,-1.30) {$C_5$}; \draw[black!50] (1.4,-1.30)--(6.6,-1.30); \draw[black!50] (1.60,-1.36)--(1.60,-1.24); \node[below,font=\scriptsize] at (1.60,-1.38) {$-2$}; \draw[black!50] (2.80,-1.36)--(2.80,-1.24); \node[below,font=\scriptsize] at (2.80,-1.38) {$-1$}; \draw[black!50] (4.00,-1.36)--(4.00,-1.24); \node[below,font=\scriptsize] at (4.00,-1.38) {$0$}; \draw[black!50] (5.20,-1.36)--(5.20,-1.24); \node[below,font=\scriptsize] at (5.20,-1.38) {$1$}; \draw[black!50] (6.40,-1.36)--(6.40,-1.24); \node[below,font=\scriptsize] at (6.40,-1.38) {$2$}; \fill[magenta] (2.06,-1.30) circle[radius=3.2pt]; \node[above,font=\tiny] at (2.06,-1.25) {$2$}; \fill[magenta] (4.74,-1.30) circle[radius=3.2pt]; \node[above,font=\tiny] at (4.74,-1.25) {$2$}; \fill[magenta] (6.40,-1.30) circle[radius=2.7pt]; \end{tikzpicture} \caption{The hexagon $C_6$, which is bipartite, with symmetric spectrum $\{2,1,1,-1,-1,-2\}$, and the pentagon $C_5$, which is not bipartite, and whose spectrum $\{2,0.618,0.618,-1.618,-1.618\}$ is not symmetric, as computed by {\tt pictures.py}.}\label{fig:c6c5} \end{figure} This is the quantum analogue of the classical Perron-Frobenius statement, and is closely related to the work of Evans and H\o egh-Krohn \cite{ehk} on the peripheral spectrum of positive maps. As a first illustration, the quantum square from the introduction, $d(x)=UxU+\Lambda x\Lambda$ on $M_2$, has eigenvalues $2,0,0,-2$, so it is bipartite, and the symmetry is $s=iU\Lambda$, which is the Pauli matrix $\sigma_y$. Thus the bipartition is given by $p=(1+\sigma_y)/2$, which is a quantum point of $M_2$, with $\psi(p)=2$, so the quantum square splits into 2 quantum points of size 2, as the usual square splits into 2+2 vertices, as in Figure \ref{fig:bloch}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \begin{scope} \coordinate (a) at (0,1.5); \coordinate (b) at (1.5,1.5); \coordinate (c) at (1.5,0); \coordinate (d) at (0,0); \draw[qblue,line width=1.1pt] (a)--(b)--(c)--(d)--cycle; \foreach \p/\l/\c/\pos in {a/1/qgold/above left,b/2/magenta/above right,c/3/qgold/below right,d/4/magenta/below left}{\fill[\c] (\p) circle[radius=3pt]; \node[\pos] at (\p) {$\l$};} \node at (0.75,-0.95) {$\{1,3\}\sqcup\{2,4\}$}; \end{scope} \begin{scope}[shift={(6.2,0.75)}] \shade[ball color=qblue!12,opacity=.6] (0,0) circle[radius=1.35]; \draw[black!45] (0,0) circle[radius=1.35]; \draw[black!35,dashed] (0,0) ellipse[x radius=1.35,y radius=0.4]; \draw[->,black!50] (0,0)--(0,1.75) node[above] {$z$}; \draw[->,black!50] (0,0)--(1.75,0) node[right] {$y$}; \draw[->,black!50] (0,0)--(-0.75,-0.55) node[below left] {$x$}; \fill[qgold] (0,1.35) circle[radius=3pt]; \node[left] at (-0.08,1.4) {$e_{11}$}; \fill[qgold] (0,-1.35) circle[radius=3pt]; \node[left] at (-0.08,-1.4) {$e_{22}$}; \fill[magenta] (1.35,0) circle[radius=3pt]; \node[above right] at (1.3,0) {$p$}; \fill[magenta] (-1.35,0) circle[radius=3pt]; \node[above left] at (-1.3,0) {$1-p$}; \node at (0,-1.95) {$p=(1+\sigma_y)/2$}; \end{scope} \end{tikzpicture} \caption{The bipartition of the square, and that of the quantum square. The rank one projections of $M_2$ are the points of the Bloch sphere, with $e_{11},e_{22}$ at the poles, and the quantum square splits into the antipodal points $p,1-p$ on the $y$ axis.}\label{fig:bloch} \end{figure} More generally, we have: \begin{proposition} A connected Weyl-Cayley graph $X_S$ over $M_n$, with $S=-S$, is bipartite precisely when there is $h\in\mathbb Z_n^2$ such that $\omega^{\sigma(g,h)}=-1$ for any $g\in S$. In this case $n$ is even, the symmetry is a multiple of $U_h$, and the $2$ parts of the bipartition have size $N/2$. \end{proposition} \begin{proof} The eigenvalues are $F(h)=\sum_{g\in S}\omega^{\sigma(g,h)}$, so $-|S|$ is an eigenvalue precisely when there is $h$ as in the statement, and Theorem \ref{thm:bipartite} applies. In this case $\omega^{\sigma(g,h)}=-1$ forces $n$ to be even, and since $S$ generates $\mathbb Z_n^2$, by connectivity, we obtain $2h=0$, and that $h$ is unique. Thus the eigenspace of $-|S|$ is $\mathbb CU_h$, with $U_h^2$ being a scalar, and $s$ is a multiple of $U_h$. Finally, $Tr(U_h)=0$ for $h\neq0$, so $p=(1+s)/2$ has rank $n/2$, and $\psi(p)=n^2/2=N/2$. \end{proof} The program {\tt bipartite.py} checks Theorem \ref{thm:bipartite} on the connected Weyl-Cayley graphs with $n=2,3,4,6$, and on random quantum graphs over $M_2,M_4,M_6$ of the form $d=\sum_k(Ad_{W_k}+Ad_{W_k^*})$, with $W_k$ random unitaries, either arbitrary, or anticommuting with a given symmetry. In the classical case, the regularity assumption is not needed, and the same holds in the quantum case. This was proved by Courtney, Ganesan and Wasilewski \cite{cgw}, Proposition 4.13, for the irreducible GNS-symmetric completely positive maps, which covers the weighted case, and the nontracial setting too, and here is a short direct proof, in our tracial setting, with connectivity taken in the sense of section 6, namely $\ker L=\mathbb C1$: \begin{theorem}\label{thm:bipartite2} For a positively weighted, undirected and connected quantum graph $X=(V,d)$, with largest eigenvalue $\lambda>0$, the following are equivalent: \begin{enumerate} \item $X$ is bipartite. \item The spectrum of $d$ is symmetric. \item $-\lambda$ is an eigenvalue of $d$. \end{enumerate} \end{theorem} \begin{proof} As before, we must prove (3)$\implies$(1). Since $d$ commutes with the involution, we can pick $x=x^*\neq0$ with $d(x)=-\lambda x$. Write $x=x_+-x_-$, and $|x|=x_++x_-$. Since $\geq0$ for $a,b\geq0$, and $\leq\lambda||y||^2$, by expanding, and using $||x||=||\,|x|\,||$, we have: $$\lambda||x||^2=-\leq\leq\lambda||x||^2$$ Thus $d(|x|)=\lambda|x|$, and $d(x_\pm)=\lambda x_\mp$. Let $e$ be the support of $|x|$. Then $d(e)$ has support $e$, so $e_rK_{rsk}(1-e_s)=0$, with the notations of Theorem \ref{thm:dirichlet}, and since $d=d^*$, the Kraus operators of $d$ span an adjoint-stable space, so we have as well $(1-e_r)K_{rsk}e_s=0$. Thus $e_rK_{rsk}=K_{rsk}e_s$, so $e\in\ker L=\mathbb C1$, and $e=1$. Now with $p$ being the support of $x_+$, we have $1-p$ as support of $x_-$, and $d(p)$ has support $1-p$, so $p\,d(pyp)\,p=0$, and similarly for $1-p$. Thus $p,1-p$ is a bipartition. \end{proof} The program {\tt bipartite.py} checks this on random non-regular graphs over $M_4,M_6$, of the form $d=\sum_k(Ad_{Z_k}+Ad_{Z_k^*})$, with $Z_k$ random matrices, arbitrary or anticommuting with a symmetry, by reconstructing the bipartition from an eigenvector of $-\lambda$, as in the above proof. For the classical star $K_{1,3}$, which is bipartite and not regular, the proof is illustrated in Figure \ref{fig:starsign}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.1pt] (0.00,0.00)--(0.00,1.10); \draw[qblue,line width=1.1pt] (0.00,0.00)--(-0.95,-0.55); \draw[qblue,line width=1.1pt] (0.00,0.00)--(0.95,-0.55); \fill[qgold] (0.00,0.00) circle[radius=3.2pt]; \node[font=\scriptsize] at (0.00,-0.34) {$\sqrt3$}; \fill[magenta] (0.00,1.10) circle[radius=3.2pt]; \node[font=\scriptsize] at (0.00,1.45) {$-1$}; \fill[magenta] (-0.95,-0.55) circle[radius=3.2pt]; \node[font=\scriptsize] at (-1.26,-0.73) {$-1$}; \fill[magenta] (0.95,-0.55) circle[radius=3.2pt]; \node[font=\scriptsize] at (1.26,-0.73) {$-1$}; \node at (0.00,-1.35) {$x$}; \draw[qblue,line width=1.1pt] (3.60,0.00)--(3.60,1.10); \draw[qblue,line width=1.1pt] (3.60,0.00)--(2.65,-0.55); \draw[qblue,line width=1.1pt] (3.60,0.00)--(4.55,-0.55); \fill[qgold] (3.60,0.00) circle[radius=3.2pt]; \node[font=\scriptsize] at (3.60,-0.34) {$\sqrt3$}; \fill[qgold] (3.60,1.10) circle[radius=3.2pt]; \node[font=\scriptsize] at (3.60,1.45) {$1$}; \fill[qgold] (2.65,-0.55) circle[radius=3.2pt]; \node[font=\scriptsize] at (2.34,-0.73) {$1$}; \fill[qgold] (4.55,-0.55) circle[radius=3.2pt]; \node[font=\scriptsize] at (4.86,-0.73) {$1$}; \node at (3.60,-1.35) {$|x|$}; \end{tikzpicture} \caption{The star $K_{1,3}$, with the eigenvector $x$ of $-\lambda=-\sqrt3$, and its absolute value $|x|$, which is the Perron-Frobenius eigenvector. The supports of $x_+$ and $x_-$, in gold and magenta, give the bipartition, as checked by {\tt pictures.py}.}\label{fig:starsign} \end{figure} Observe that this proof avoids the Kadison-Schwarz inequality, and works directly with the absolute value $|x|$, as in the classical Perron-Frobenius theory. \section{Laplacian, heat flow} In this section we discuss the Laplacian of a quantum graph, and the associated heat flow. This material involves some analysis and some physics, so we will explain everything in detail, starting with the classical case. Consider a weighted graph, given by a symmetric matrix $d\in M_N(\mathbb R)$ with positive entries, and let $D$ be the diagonal matrix of degrees, $D_{ii}=\sum_jd_{ij}$. The Laplacian is then $L=D-d$, given by: $$(Lf)_i=\sum_jd_{ij}(f_i-f_j)$$ In matrix terms, $L$ is symmetric, with row sums $0$, and with off-diagonal entries $\leq0$. For the complete graph $K_N$ we have $L=N-J$, with eigenvalues $0$ and $N$, the latter with multiplicity $N-1$, for the cycle $C_N$ the eigenvalues of $L$ are the numbers $2-2\cos(2\pi k/N)$, with $k=0,\ldots,N-1$, and for the hypercube $\{0,1\}^n$ the eigenvalues are the numbers $2k$, with multiplicity $\binom{n}{k}$, as checked by {\tt pictures.py}. In general, the multiplicity of the eigenvalue $0$ is the number of connected components, as we will see below, and the second smallest eigenvalue $\lambda_2$, or spectral gap, measures how well connected the graph is, as discussed in section 8. For instance, on the infinite path $\mathbb Z$, with unit weights, the Laplacian of a smooth bump looks as in Figure \ref{fig:bump}, as minus a second derivative. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small,x=6.5mm,y=10mm] \draw[black!50] (-0.3,0)--(8.3,0); \draw[qblue,line width=1.6pt] (-0.10,0)--(-0.10,0.023); \fill[qblue] (-0.10,0.023) circle[radius=1.8pt]; \draw[magenta,line width=1.6pt] (0.10,0)--(0.10,-0.092); \fill[magenta] (0.10,-0.092) circle[radius=1.8pt]; \node[below,font=\scriptsize] at (0,-0.3) {$-4$}; \draw[qblue,line width=1.6pt] (0.90,0)--(0.90,0.137); \fill[qblue] (0.90,0.137) circle[radius=1.8pt]; \draw[magenta,line width=1.6pt] (1.10,0)--(1.10,-0.227); \fill[magenta] (1.10,-0.227) circle[radius=1.8pt]; \node[below,font=\scriptsize] at (1,-0.3) {$-3$}; \draw[qblue,line width=1.6pt] (1.90,0)--(1.90,0.478); \fill[qblue] (1.90,0.478) circle[radius=1.8pt]; \draw[magenta,line width=1.6pt] (2.10,0)--(2.10,-0.192); \fill[magenta] (2.10,-0.192) circle[radius=1.8pt]; \node[below,font=\scriptsize] at (2,-0.3) {$-2$}; \draw[qblue,line width=1.6pt] (2.90,0)--(2.90,1.013); \fill[qblue] (2.90,1.013) circle[radius=1.8pt]; \draw[magenta,line width=1.6pt] (3.10,0)--(3.10,0.247); \fill[magenta] (3.10,0.247) circle[radius=1.8pt]; \node[below,font=\scriptsize] at (3,-0.3) {$-1$}; \draw[qblue,line width=1.6pt] (3.90,0)--(3.90,1.300); \fill[qblue] (3.90,1.300) circle[radius=1.8pt]; \draw[magenta,line width=1.6pt] (4.10,0)--(4.10,0.575); \fill[magenta] (4.10,0.575) circle[radius=1.8pt]; \node[below,font=\scriptsize] at (4,-0.3) {$0$}; \draw[qblue,line width=1.6pt] (4.90,0)--(4.90,1.013); \fill[qblue] (4.90,1.013) circle[radius=1.8pt]; \draw[magenta,line width=1.6pt] (5.10,0)--(5.10,0.247); \fill[magenta] (5.10,0.247) circle[radius=1.8pt]; \node[below,font=\scriptsize] at (5,-0.3) {$1$}; \draw[qblue,line width=1.6pt] (5.90,0)--(5.90,0.478); \fill[qblue] (5.90,0.478) circle[radius=1.8pt]; \draw[magenta,line width=1.6pt] (6.10,0)--(6.10,-0.192); \fill[magenta] (6.10,-0.192) circle[radius=1.8pt]; \node[below,font=\scriptsize] at (6,-0.3) {$2$}; \draw[qblue,line width=1.6pt] (6.90,0)--(6.90,0.137); \fill[qblue] (6.90,0.137) circle[radius=1.8pt]; \draw[magenta,line width=1.6pt] (7.10,0)--(7.10,-0.227); \fill[magenta] (7.10,-0.227) circle[radius=1.8pt]; \node[below,font=\scriptsize] at (7,-0.3) {$3$}; \draw[qblue,line width=1.6pt] (7.90,0)--(7.90,0.023); \fill[qblue] (7.90,0.023) circle[radius=1.8pt]; \draw[magenta,line width=1.6pt] (8.10,0)--(8.10,-0.092); \fill[magenta] (8.10,-0.092) circle[radius=1.8pt]; \node[below,font=\scriptsize] at (8,-0.3) {$4$}; \draw[qblue,line width=1.6pt] (8.8,1.1)--++(0.4,0) node[right,text=black] {$f$}; \draw[magenta,line width=1.6pt] (8.8,0.6)--++(0.4,0) node[right,text=black] {$Lf$}; \end{tikzpicture} \caption{A bump $f_i=e^{-i^2/4}$ on the path $\mathbb Z$, in blue, and its Laplacian $(Lf)_i=2f_i-f_{i-1}-f_{i+1}$, in magenta, as computed by {\tt pictures.py}. The Laplacian is positive where $f$ is concave, and negative where $f$ is convex.}\label{fig:bump} \end{figure} The name comes from the infinite path $\mathbb Z$, where $(Lf)_i=2f_i-f_{i-1}-f_{i+1}$ is minus the discrete second derivative of $f$. Thus $L$ is a discrete version of the operator $-\Delta=-f''$, and this is the point of view that we will follow, namely that $L$ is the graph analogue of the positive Laplacian of Riemannian geometry. The basic facts about $L$ are as follows: \begin{proposition}\label{prop:classlap} For a weighted graph $d\in M_N(\mathbb R)$, as above, the following hold: \begin{enumerate} \item $=\frac{1}{2}\sum_{ij}d_{ij}|f_i-f_j|^2$, and in particular $L\geq0$. \item $Lf=0$ precisely when $f$ is constant on the connected components. \item $e^{-tL}$ has entries $\geq0$, and row sums $1$, for any $t\geq0$, the entries being $>0$ inside the connected components, for $t>0$. \item $e^{-tL}\to P$ with $t\to\infty$, with $P$ being the averaging over components. \end{enumerate} \end{proposition} \begin{proof} (1) follows by expanding the square, and (2) follows from (1), because $=0$ forces $f_i=f_j$ whenever $d_{ij}>0$. For (3), the off-diagonal entries of $-L$ are the numbers $d_{ij}\geq0$, so $c-L$ has entries $\geq0$ for $c>0$ large, and so does $e^{-tL}=e^{-ct}e^{t(c-L)}$, with the entries inside a connected component being $>0$ for $t>0$, because $c-L$ is irreducible there. Also, $L1=0$ gives $e^{-tL}1=1$. Finally, (4) follows from the spectral decomposition $L=\sum_\mu\mu P_\mu$, which gives $e^{-tL}=\sum_\mu e^{-t\mu}P_\mu\to P_0$, and from (2). \end{proof} Let us explain as well the meaning of all this. The quantity in (1) is the energy of $f$, which is small when $f$ varies slowly along the edges. The matrices $e^{-tL}$, which are given by the usual series $e^{-tL}=\sum_k(-t)^kL^k/k!$, form a semigroup, $e^{-(s+t)L}=e^{-sL}e^{-tL}$, and $f_t=e^{-tL}f$ is the solution of the heat equation $\partial_tf_t=-Lf_t$, with initial condition $f$. By (3) the matrices $e^{-tL}$ are stochastic, and they are the transition matrices of the continuous time random walk on the graph, where a walker sitting at $i$ waits an exponential time of rate $D_{ii}$, then jumps to $j$ with probability $d_{ij}/D_{ii}$. With this interpretation, $(e^{-tL}f)_i$ is the expected value of $f(X_t)$, for the walker $X_t$ starting at $i$, and (4) says that, after a long time, the walker is uniformly distributed on its connected component. As an illustration, on the path $P_7$, a unit amount of heat placed at the middle vertex spreads as in Figure \ref{fig:heatpath}, with the matrices $e^{-tL}$ being stochastic, and converging to the averaging matrix. The convergence is exponential, with rate the spectral gap, which for $P_7$ is $\lambda_2=2-2\cos(\pi/7)\simeq0.198$, the eigenvalues of $L$ being the numbers $2-2\cos(\pi k/7)$. On the infinite path $\mathbb Z$, the heat kernel is explicit, $(e^{-tL})_{ij}=e^{-2t}I_{|i-j|}(2t)$, with $I_k$ being the modified Bessel functions, and the heat spreads at distance of order $\sqrt{2t}$, as for the usual diffusion on $\mathbb R$. For the cycle $C_N$, and more generally for the Cayley graphs of the finite abelian groups, the heat kernel is diagonalized by the Fourier transform, $(e^{-tL})_{ij}=\frac{1}{N}\sum_ke^{-t(2-2\cos(2\pi k/N))}\omega^{k(i-j)}$ for $C_N$, with $\omega=e^{2\pi i/N}$, and the return probabilities $(e^{-tL})_{ii}$ decrease to $1/N$, as checked by {\tt pictures.py}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (0.00,0) rectangle (0.24,0.000); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (0.30,0) rectangle (0.54,0.000); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (0.60,0) rectangle (0.84,0.000); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (0.90,0) rectangle (1.14,1.600); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (1.20,0) rectangle (1.44,0.000); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (1.50,0) rectangle (1.74,0.000); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (1.80,0) rectangle (2.04,0.000); \draw[black!50] (-0.10,0)--(2.20,0); \foreach \i in {0,...,6}{\fill[black!75] (0.12+0.3*\i,-0.12) circle[radius=1.3pt];} \draw[black!75] (0.12,-0.12)--(1.92,-0.12); \node at (1.02,-0.5) {$t=0$}; \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (3.00,0) rectangle (3.24,0.014); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (3.30,0) rectangle (3.54,0.080); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (3.60,0) rectangle (3.84,0.333); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (3.90,0) rectangle (4.14,0.746); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (4.20,0) rectangle (4.44,0.333); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (4.50,0) rectangle (4.74,0.080); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (4.80,0) rectangle (5.04,0.014); \draw[black!50] (2.90,0)--(5.20,0); \foreach \i in {0,...,6}{\fill[black!75] (3.12+0.3*\i,-0.12) circle[radius=1.3pt];} \draw[black!75] (3.12,-0.12)--(4.92,-0.12); \node at (4.02,-0.5) {$t=0.5$}; \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (6.00,0) rectangle (6.24,0.139); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (6.30,0) rectangle (6.54,0.203); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (6.60,0) rectangle (6.84,0.291); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (6.90,0) rectangle (7.14,0.334); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (7.20,0) rectangle (7.44,0.291); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (7.50,0) rectangle (7.74,0.203); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (7.80,0) rectangle (8.04,0.139); \draw[black!50] (5.90,0)--(8.20,0); \foreach \i in {0,...,6}{\fill[black!75] (6.12+0.3*\i,-0.12) circle[radius=1.3pt];} \draw[black!75] (6.12,-0.12)--(7.92,-0.12); \node at (7.02,-0.5) {$t=2$}; \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (9.00,0) rectangle (9.24,0.227); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (9.30,0) rectangle (9.54,0.229); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (9.60,0) rectangle (9.84,0.229); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (9.90,0) rectangle (10.14,0.230); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (10.20,0) rectangle (10.44,0.229); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (10.50,0) rectangle (10.74,0.229); \fill[qgold!70,draw=qgold!80!black,line width=.4pt] (10.80,0) rectangle (11.04,0.227); \draw[black!50] (8.90,0)--(11.20,0); \foreach \i in {0,...,6}{\fill[black!75] (9.12+0.3*\i,-0.12) circle[radius=1.3pt];} \draw[black!75] (9.12,-0.12)--(10.92,-0.12); \node at (10.02,-0.5) {$t=8$}; \end{tikzpicture} \caption{The heat flow $e^{-tL}f$ on the path $P_7$, starting from a unit mass at the middle vertex, at times $t=0,1/2,2,8$, as computed by {\tt pictures.py}. The total mass stays $1$, and the distribution converges to the uniform one, $1/7$ at each vertex.}\label{fig:heatpath} \end{figure} \medskip\noindent\textbf{Complete positivity.} Our purpose now is to extend all this to the quantum case. The first problem is that of finding the correct analogue of the positivity of the entries, and this is complete positivity. Recall that a linear map $\varphi:A\to B$ between $C^*$-algebras is called positive when it maps positive elements to positive elements, and completely positive when all the maps $\varphi\otimes id:A\otimes M_k(\mathbb C)\to B\otimes M_k(\mathbb C)$ are positive. For the finite quantum spaces, we have the following description of the completely positive maps, due to Choi \cite{ch2} and Kraus \cite{kra}: \begin{theorem}\label{thm:choikraus} A linear map $d:C(V)\to C(V)$ is completely positive precisely when it has a Kraus decomposition, as follows, with $K_{rsk}\in M_{n_r\times n_s}(\mathbb C)$, $$d(x)_s=\sum_{r,k}K_{rsk}^*x_rK_{rsk}$$ and this happens precisely when the Choi matrices $C_{rs}=\sum_{ab}e_{ab}\otimes d_{rs}(e_{ab})$ are positive, where $d_{rs}:M_{n_r}(\mathbb C)\to M_{n_s}(\mathbb C)$ are the block components of $d$. \end{theorem} \begin{proof} This is well-known, and comes by applying the result of Choi \cite{ch2}, for the linear maps $M_n(\mathbb C)\to M_m(\mathbb C)$, to each block component $d_{rs}$. The idea is that the eigenvectors of the positive matrix $C_{rs}$, suitably reshaped, produce the Kraus operators $K_{rsk}$. \end{proof} In pictures, the Kraus operators are the quantum edges between the blocks of $V$, a block $M_{n_r}(\mathbb C)$ being connected to a block $M_{n_s}(\mathbb C)$ by rectangular matrices, as in Figure \ref{fig:kraus}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small,>={Stealth[length=2mm]}] \foreach \a in {1,2}\foreach \b in {1,2}{\fill[qgold] (0.45*\b,-0.45*\a) circle[radius=2.4pt];} \fill[qgold] (4.1,-0.68) circle[radius=2.4pt]; \foreach \a in {1,2,3}\foreach \b in {1,2,3}{\fill[qgold] (6.6+0.45*\b,-0.45*\a+0.22) circle[radius=2.4pt];} \draw[black!30,dashed,rounded corners=4pt] (0.15,-1.15) rectangle (1.15,-0.15) node[above,black,midway,yshift=7mm] {}; \draw[black!30,dashed,rounded corners=4pt] (3.8,-0.98) rectangle (4.4,-0.38); \draw[black!30,dashed,rounded corners=4pt] (6.75,-1.33) rectangle (8.2,0.12); \node at (0.65,-1.5) {$M_2$}; \node at (4.1,-1.5) {$\mathbb C$}; \node at (7.5,-1.7) {$M_3$}; \draw[->,qblue,line width=1pt] (1.25,-0.45) to[bend left=20] node[above] {$K\in M_{2\times1}$} (3.75,-0.6); \draw[->,qblue,line width=1pt] (4.45,-0.6) to[bend left=20] node[above] {$K\in M_{1\times3}$} (6.7,-0.5); \draw[->,magenta,line width=1pt] (1.2,-1.0) to[bend right=22] node[below] {$K\in M_{2\times3}$} (6.7,-1.1); \draw[->,qgold!80!black,line width=1pt] (0.25,-0.1) .. controls (-0.3,0.9) and (1.6,0.9) .. node[above] {$K\in M_{2\times2}$} (1.05,-0.1); \end{tikzpicture} \caption{The Kraus operators of a completely positive map $d$ on $C(V)=M_2(\mathbb C)\oplus\mathbb C\oplus M_3(\mathbb C)$. Each block component $d_{rs}$ is of the form $x\to\sum_kK_{rsk}^*xK_{rsk}$, with rectangular matrices $K_{rsk}\in M_{n_r\times n_s}(\mathbb C)$.}\label{fig:kraus} \end{figure} In the classical case the blocks are $1\times1$, the Kraus operators are scalars, and the condition is simply $d_{sr}=\sum_k|K_{rsk}|^2\geq0$, so we recover the positivity of the entries. For instance, the Choi matrix of the quantum square is as in Figure \ref{fig:choi}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[qgold!60] (0.00,-0.00) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (0.275,0.275) {$1$}; \fill[white] (0.55,-0.00) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (0.825,0.275) {$0$}; \fill[white] (1.10,-0.00) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (1.375,0.275) {$0$}; \fill[magenta!50] (1.65,-0.00) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (1.925,0.275) {$-1$}; \fill[white] (0.00,-0.55) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (0.275,-0.275) {$0$}; \fill[qgold!60] (0.55,-0.55) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (0.825,-0.275) {$1$}; \fill[qgold!60] (1.10,-0.55) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (1.375,-0.275) {$1$}; \fill[white] (1.65,-0.55) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (1.925,-0.275) {$0$}; \fill[white] (0.00,-1.10) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (0.275,-0.825) {$0$}; \fill[qgold!60] (0.55,-1.10) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (0.825,-0.825) {$1$}; \fill[qgold!60] (1.10,-1.10) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (1.375,-0.825) {$1$}; \fill[white] (1.65,-1.10) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (1.925,-0.825) {$0$}; \fill[magenta!50] (0.00,-1.65) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (0.275,-1.375) {$-1$}; \fill[white] (0.55,-1.65) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (0.825,-1.375) {$0$}; \fill[white] (1.10,-1.65) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (1.375,-1.375) {$0$}; \fill[qgold!60] (1.65,-1.65) rectangle ++(0.55,0.55); \node[font=\scriptsize] at (1.925,-1.375) {$1$}; \draw[black!25,step=0.55] (0,-1.65) grid (2.2,0.55); \draw[black!60] (0,-1.65) rectangle (2.2,0.55); \draw[black!60,line width=.9pt] (1.1,-1.65)--(1.1,0.55) (0,-0.55)--(2.2,-0.55); \node[align=left,right] at (2.7,-0.55) {$C=\sum_{ab}e_{ab}\otimes d(e_{ab})$\\[3pt] eigenvalues $0,0,2,2$}; \end{tikzpicture} \caption{The Choi matrix of the quantum square $d=Ad_{\sigma_x}+Ad_{\sigma_z}$, as computed by {\tt pictures.py}. It is positive, of rank $2$, which is the number of Kraus operators, namely $\sigma_x,\sigma_z$.}\label{fig:choi} \end{figure} As basic quantum examples, the maps $Ad_W(x)=WxW^*$ are completely positive, with Kraus operator $W^*$, so the Weyl-Cayley graphs from section 4 are positively weighted, and so is the simplex, because the Choi matrix of $J-1$ over $M_n$ is $n(1-P)$, with $P$ being the projection onto the vector $\sum_ae_a\otimes e_a/\sqrt n$. With these preliminaries in hand, we can now formulate: \begin{definition} The Laplacian of a positively weighted undirected quantum graph $X=(V,d)$ is $$L(x)=\frac{1}{2}\big(d(1)x+xd(1)\big)-d(x)$$ which in the regular case, $d(1)=\lambda1$, is simply $L=\lambda-d$. \end{definition} In the classical case, this is the usual Laplacian $L=D-d$. In the quantum case, the degree $d(1)$ is an element of $C(V)$ which need not be central, and so we cannot just multiply $x$ by it on the left, or on the right. The symmetrization in the above formula is precisely what makes $L$ self-adjoint on $L^2(V)$, compatible with the involution, $L(x^*)=L(x)^*$, and such that $L(1)=0$, exactly as in the classical case. Regarding now positivity, we have: \begin{theorem}\label{thm:dirichlet} Let $X=(V,d)$ be positively weighted and undirected, with Kraus decomposition $d(x)_s=\sum_{r,k}K_{rsk}^*x_rK_{rsk}$. Then we have the formula $$=\frac{1}{2}\sum_{r,s,k}n_s\,||x_rK_{rsk}-K_{rsk}x_s||_2^2$$ and in particular $L\geq0$, as an operator on $L^2(V)$. \end{theorem} \begin{proof} Expanding the norms, by using $\psi=\oplus n_sTr$, the right side is half of the following quantity: $$+-2Re$$ Here we have used the formula of the adjoint, which is as follows: $$d^*(y)_r=\sum_{s,k}\frac{n_s}{n_r}K_{rsk}y_sK_{rsk}^*$$ Since $d=d^*$, this is $$. \end{proof} In the classical case, the Kraus operators are $K_{rs}=\sqrt{d_{sr}}$, and we recover the formula in Proposition \ref{prop:classlap} (1). Thus, exactly as in the classical case, $$ is an energy, which measures how far $x$ is from commuting with the edges of the graph, these edges being now encoded by the Kraus operators $K_{rsk}$, which can be thought of as quantum edges, going from the block $r$ to the block $s$. In the language of Cipriani \cite{cip}, $$ is a Dirichlet form, and $e^{-tL}$, discussed below, is the associated Markovian semigroup. The program {\tt laplacian.py} checks the positivity of $L$ on random positively weighted undirected quantum graphs, along with the spectral bounds and the Cheeger inequality from section 8. As a consequence, the harmonic elements are those satisfying $x_rK_{rsk}=K_{rsk}x_s$, and we obtain: \begin{theorem} For $X=(V,d)$ positively weighted and undirected, $\ker L$ is a unital $*$-subalgebra of $C(V)$, invariant under $G^+(X)$. Thus we can write $\ker L=C(\pi_0(X))$, with $\pi_0(X)$ being a finite quantum space, the space of connected components of $X$. \end{theorem} \begin{proof} The conditions $x_rK_{rsk}=K_{rsk}x_s$ are stable under products, and are satisfied by $1$. For the stability under adjoints, we use the Kraus decomposition of $d^*=d$, coming from the operators $K_{rsk}^*$, whose conditions are the adjoints of the original ones. Finally, $L\in End(u)$ by the invariance principle, so $\ker L$ is invariant. \end{proof} In the classical case, the algebra $\ker L$ is as in Figure \ref{fig:components}, and the above result shows that, in general, it is still an algebra, of functions on a finite quantum space. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.2pt] (0.00,0.00)--(1.00,0.00); \draw[qblue,line width=1.2pt] (1.00,0.00)--(0.50,0.85); \draw[qblue,line width=1.2pt] (0.50,0.85)--(0.00,0.00); \fill[qblue] (0.00,0.00) circle[radius=3.0pt]; \fill[qblue] (1.00,0.00) circle[radius=3.0pt]; \fill[qblue] (0.50,0.85) circle[radius=3.0pt]; \draw[qgold,line width=1.2pt] (2.00,0.10)--(2.00,0.90); \fill[qgold] (2.00,0.10) circle[radius=3.0pt]; \fill[qgold] (2.00,0.90) circle[radius=3.0pt]; \fill[magenta] (3.00,0.45) circle[radius=3.0pt]; \node[align=left,right] at (3.6,0.45) {$\ker L=\{f$ constant on components$\}$\\[2pt] $\dim\ker L=3$}; \end{tikzpicture} \caption{A classical graph with $3$ connected components, in different colors. The harmonic functions, $Lf=0$, are those which are constant on the components, so $\ker L=C(\pi_0(X))$, with $|\pi_0(X)|=3$.}\label{fig:components} \end{figure} We call $X$ connected when $\pi_0(X)$ is a point, $\ker L=\mathbb C1$. In the classical case, $\ker L$ is the algebra of functions which are constant on the connected components, so we recover the usual notion. For the empty graph we have $\pi_0(X)=V$, and for the Weyl cycle on $M_n$, $\ker L$ is the algebra generated by $U$, so $\pi_0(X)=\{1,\ldots,n\}$, in agreement with its picture, made of $n$ disjoint cycles. Observe that $\pi_0(X)$ can be a quantum space, as for the empty graph. The program {\tt walks.py} checks that $\ker L$ is a $*$-algebra, of dimension $n$, for the Weyl cycle. \medskip\noindent\textbf{Lindblad generators.} Let us discuss now the heat flow. As in the classical case, we can consider the maps $e^{-tL}=\sum_k(-t)^kL^k/k!$, which form a semigroup, and solve the heat equation $\partial_tx_t=-Lx_t$. The question is whether these maps are completely positive, and the answer comes from the theory of open quantum systems. In quantum mechanics, the observables of a system are the self-adjoint elements of a $C^*$-algebra $A$, and the time evolution of an isolated system is given by $x\to e^{itH}xe^{-itH}$, with $H$ being the Hamiltonian. For a system interacting with its environment, the evolution is instead given by a semigroup of unital completely positive maps $T_t:A\to A$, called a quantum Markov semigroup, and in finite dimensions, these are classified as follows: \begin{theorem}\label{thm:lindblad} The semigroups $T_t=e^{t\mathcal L}$ of unital completely positive maps on $M_n(\mathbb C)$ are those whose generator is of the following form, $$\mathcal L(x)=i[H,x]+\sum_k\left(K_k^*xK_k-\frac{1}{2}\{K_k^*K_k,x\}\right)$$ with $H$ self-adjoint, called Hamiltonian, and with $K_k$ arbitrary, called jump operators. \end{theorem} \begin{proof} This is the theorem of Gorini, Kossakowski and Sudarshan \cite{gks} and of Lindblad \cite{lin}. Observe that the generator is the sum of the Hamiltonian part $i[H,x]$, which is the derivative of the isolated evolution, and of the dissipative part, made of the completely positive map $x\to\sum_kK_k^*xK_k$, corrected by an anticommutator term, which ensures that $\mathcal L(1)=0$, and so that $T_t$ is unital. \end{proof} Classically, the generators of the semigroups of stochastic matrices are the matrices with positive off-diagonal entries, and with rows summing up to 0, as in Figure \ref{fig:jumps}, and the above result is the quantum analogue of this. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \coordinate (a) at (0,0); \coordinate (b) at (1.6,0); \coordinate (c) at (0.8,1.3); \draw[<->,qblue,line width=1.1pt,shorten >=3pt,shorten <=3pt] (a)--(b) node[midway,below] {$1$}; \draw[<->,qblue,line width=1.1pt,shorten >=3pt,shorten <=3pt] (a)--(c) node[midway,left] {$2$}; \draw[<->,qblue,line width=1.1pt,shorten >=3pt,shorten <=3pt] (b)--(c) node[midway,right] {$3$}; \foreach \p/\l/\pos in {a/1/below left,b/2/below right,c/3/above}{\fill[black!75] (\p) circle[radius=2.6pt]; \node[\pos] at (\p) {$\l$};} \node[right] at (2.6,0.6) {$-L=\begin{pmatrix}-3&1&2\\1&-4&3\\2&3&-5\end{pmatrix}$}; \end{tikzpicture} \caption{A weighted triangle, with jump rates $1,2,3$, and the generator $-L$ of the continuous time random walk on it, as computed by {\tt pictures.py}. The off-diagonal entries are positive, and the rows sum up to $0$.}\label{fig:jumps} \end{figure} Now back to our quantum graphs, with Kraus decomposition $d(x)=\sum_kK_k^*xK_k$, written for simplicity without block indices, we have $d(1)=\sum_kK_k^*K_k$, and so: $$-L(x)=\sum_k\left(K_k^*xK_k-\frac{1}{2}\{K_k^*K_k,x\}\right)$$ In other words, in the positively weighted case, $-L$ is a Lindblad generator, with Hamiltonian $0$, and with jump operators the Kraus operators of $d$. In the classical case, these jump operators are the matrices $\sqrt{d_{ij}}\,e_{ij}$, corresponding to the jumps between $i$ and $j$, and we recover the continuous time random walk. This is the key to everything that follows, and we have: \begin{theorem}\label{thm:heat} For $X=(V,d)$ positively weighted and undirected, $e^{-tL}$ is a semigroup of unital completely positive maps, leaving $\psi$ invariant, symmetric with respect to $\psi$, and converging as $t\to\infty$ to the orthogonal projection onto $C(\pi_0(X))$. \end{theorem} \begin{proof} Complete positivity follows from Theorem \ref{thm:lindblad}, but here is as well a direct proof, which is the quantum analogue of the argument in Proposition \ref{prop:classlap} (3). Write $-L=d-G$, with $G(x)=\frac{1}{2}(d(1)x+xd(1))$. Since the left and right multiplications commute, we have: $$e^{-tG}(x)=e^{-td(1)/2}\,x\,e^{-td(1)/2}$$ Thus $e^{-tG}$ is completely positive. Now by iterating the Duhamel formula $$e^{t(d-G)}=e^{-tG}+\int_0^te^{-(t-s)G}\,d\,e^{s(d-G)}ds$$ we can write $e^{-tL}$ as a convergent series of integrals of compositions of the completely positive maps $d$ and $e^{-sG}$, so $e^{-tL}$ is completely positive. It is unital because $L(1)=0$, symmetric because $L=L^*$, and $\psi(Lx)===0$ gives the invariance of $\psi$. Finally, since $L\geq0$, the spectral decomposition $L=\sum_\mu\mu P_\mu$ gives $e^{-tL}=\sum_\mu e^{-t\mu}P_\mu\to P_0$, the projection onto $\ker L$. \end{proof} Thus the heat flow on a quantum graph is a quantum Markov semigroup, describing an open quantum system, and the connected components are its invariant algebra. The rate of convergence is governed by the smallest nonzero eigenvalue of $L$, the spectral gap, which will be discussed in section 8, along with the Cheeger inequality. Observe also that the positivity assumption on $d$ is really needed: classically, for a symmetric matrix $d$ having a negative off-diagonal entry $d_{ij}<0$, with $i\neq j$, the matrix $e^{-tL}$ has a negative entry at $(i,j)$ for $t>0$ small, because $e^{-tL}=1-tL+O(t^2)$. As for the diagonal entries, these cancel in $L$, so a negative loop weight has no effect. This phenomenon is illustrated in Figure \ref{fig:negative}, on a triangle with a negative weight. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[magenta!10] (0,0) rectangle (1.50,-0.42); \draw[->,black!60] (0,0)--(6.30,0) node[right] {$t$}; \draw[->,black!60] (0,-0.52)--(0,2.76) node[above] {$(e^{-tL})_{13}$}; \draw[black!60] (1.50,-0.06)--(1.50,0.06); \node[below,font=\scriptsize] at (1.50,-0.45) {$0.5$}; \draw[black!60] (3.00,-0.06)--(3.00,0.06); \node[below,font=\scriptsize] at (3.00,-0.45) {$1$}; \draw[black!60] (4.50,-0.06)--(4.50,0.06); \node[below,font=\scriptsize] at (4.50,-0.45) {$1.5$}; \draw[black!60] (6.00,-0.06)--(6.00,0.06); \node[below,font=\scriptsize] at (6.00,-0.45) {$2$}; \draw[qblue,line width=1.3pt] plot[smooth] coordinates {(0.00,-0.000) (0.30,-0.197) (0.60,-0.262) (0.90,-0.231) (1.20,-0.137) (1.50,0.001) (1.80,0.168) (2.10,0.353) (2.40,0.547) (2.70,0.745) (3.00,0.941) (3.30,1.135) (3.60,1.323) (3.90,1.505) (4.20,1.680) (4.50,1.847) (4.80,2.006) (5.10,2.157) (5.40,2.300) (5.70,2.436) (6.00,2.563)}; \node[text=magenta,font=\scriptsize] at (0.75,-0.98) {negative}; \begin{scope}[shift={(8.2,0.6)}] \coordinate (a) at (0,0); \coordinate (b) at (1.6,0); \coordinate (c) at (0.8,1.3); \draw[qblue,line width=1.1pt] (a)--(c) node[midway,left] {$1$}; \draw[qblue,line width=1.1pt] (c)--(b) node[midway,right] {$1$}; \draw[magenta,line width=1.1pt,dashed] (a)--(b) node[midway,below] {$-1/5$}; \foreach \p/\l/\pos in {a/1/left,c/2/above,b/3/right}{\fill[black!75] (\p) circle[radius=2.5pt]; \node[\pos] at (\p) {$\l$};} \end{scope} \end{tikzpicture} \caption{A classical graph with a negative weight $d_{13}=-1/5$, and the entry $(e^{-tL})_{13}$, which is negative for $t$ up to about $1/2$, as computed by {\tt pictures.py}. Thus $e^{-tL}$ is not positive, although $L\geq0$, and $e^{-tL}\to J/3$.}\label{fig:negative} \end{figure} There is a dual point of view, which is useful in physics. The states of $C(V)$ are the linear forms $x\to\psi(\rho x)$, with $\rho\geq0$ and $\psi(\rho)=1$, called density matrices, and the evolution of states is the transpose of the evolution of observables. Since $L$ is symmetric, this transpose is given by the same maps, $\rho\to e^{-tL}\rho$, which preserve the positivity and the normalization of $\rho$. As $t\to\infty$, the density converges to its average over the connected components, and in the connected case, to the uniform density $\rho=1/N$, which corresponds to the state $\psi/N$. This is the quantum analogue of the uniform distribution of the random walker, and it is in fact the maximally mixed state of quantum information, which is the state having the biggest possible entropy, and this convergence describes a thermalization phenomenon. \medskip\noindent\textbf{Examples.} The simplex and the quantum square are connected, and their heat flows produce some well-known quantum channels, while the Weyl cycle is disconnected, and produces decoherence. In all cases the computations are straightforward, because the Laplacian is diagonal in a suitable basis of $C(V)$, made of Pauli or Weyl matrices, and we obtain: \begin{proposition}\label{prop:heatex} The heat flows of our basic examples are as follows: \begin{enumerate} \item For the simplex over $V$ we have $L=N-J$, and $e^{-tL}(x)=e^{-Nt}x+(1-e^{-Nt})\psi(x)1/N$, which for $V=M_n$ is the depolarizing channel, with $\psi(x)/N=Tr(x)/n$. \item For the quantum square over $M_2$, the eigenvalues of $L$ are $0,2,2,4$, the corresponding eigenvectors being $1,\sigma_x,\sigma_z,\sigma_y$, and the heat flow is the following Pauli channel: $$e^{-tL}(a_0+a_1\sigma_x+a_2\sigma_y+a_3\sigma_z)=a_0+e^{-2t}(a_1\sigma_x+a_3\sigma_z)+e^{-4t}a_2\sigma_y$$ with the spectrum being that of the Laplacian of the usual square. \item For the Weyl cycle over $M_n$, the heat flow converges to the dephasing map $x\to\sum_aP_axP_a$, with $P_a$ being the spectral projections of $U$. \end{enumerate} \end{proposition} \begin{proof} (1) The simplex is regular of valence $N-1$, so $L=(N-1)-(J-1)=N-J$, and since $J^2=NJ$, we have $e^{tJ}=1+(e^{Nt}-1)J/N$, which gives the formula. (2) With $U=\sigma_x$ and $\Lambda=\sigma_z$, we have $d(1)=2$, so $L=2-d$, and $d(\sigma_x)=d(\sigma_z)=0$, $d(\sigma_y)=-2\sigma_y$, because the Pauli matrices anticommute, which gives the result. (3) Here $L=2-d$, and $d(U_h)=2\cos(2\pi h_2/n)U_h$, so $\ker L$ is spanned by the $U_h$ with $h_2=0$, which are the powers of $U$. Thus $e^{-tL}$ converges to the orthogonal projection onto the algebra generated by $U$, which is the dephasing map in the statement. \end{proof} For $V=M_2$, these heat flows can be visualized on the Bloch ball, as in Figure \ref{fig:blochflow}. For the Weyl cycle we must take here $S=\{(1,0)\}$, because $(1,0)=-(1,0)$ in $\mathbb Z_2^2$, so the Weyl cycle over $M_2$ is $d=Ad_{\sigma_x}$, which is regular of valence 1, with $L=1-d$ having eigenvalues $0,0,2,2$, and the limit of its heat flow is again the dephasing map. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \begin{scope}[shift={(0.0,0)}] \draw[black!40,dashed] (0,0) circle[radius=1.3]; \draw[->,black!40] (-1.55,0)--(1.6,0) node[right,font=\scriptsize] {$x$}; \draw[->,black!40] (0,-1.55)--(0,1.6) node[above,font=\scriptsize] {$y$}; \fill[qblue!25,draw=qblue,line width=1pt] (0,0) ellipse[x radius=0.478,y radius=0.478]; \fill[magenta] (0,0) circle[radius=2.4pt]; \node at (0,-1.95) {simplex}; \end{scope} \begin{scope}[shift={(4.1,0)}] \draw[black!40,dashed] (0,0) circle[radius=1.3]; \draw[->,black!40] (-1.55,0)--(1.6,0) node[right,font=\scriptsize] {$x$}; \draw[->,black!40] (0,-1.55)--(0,1.6) node[above,font=\scriptsize] {$y$}; \fill[qblue!25,draw=qblue,line width=1pt] (0,0) ellipse[x radius=0.788,y radius=0.478]; \fill[magenta] (0,0) circle[radius=2.4pt]; \node at (0,-1.95) {quantum square}; \end{scope} \begin{scope}[shift={(8.2,0)}] \draw[black!40,dashed] (0,0) circle[radius=1.3]; \draw[->,black!40] (-1.55,0)--(1.6,0) node[right,font=\scriptsize] {$x$}; \draw[->,black!40] (0,-1.55)--(0,1.6) node[above,font=\scriptsize] {$y$}; \fill[qblue!25,draw=qblue,line width=1pt] (0,0) ellipse[x radius=1.300,y radius=0.788]; \draw[magenta,line width=1.6pt] (-1.3,0)--(1.3,0); \node at (0,-1.95) {Weyl cycle over $M_2$}; \end{scope} \end{tikzpicture} \caption{The equatorial section of the Bloch ball of $M_2$, dashed, and its images under the heat flows at time $t=1/4$, in blue, computed by {\tt pictures.py}. The axes are scaled by $e^{-1}$ for the simplex, by $e^{-1/2},e^{-1}$ for the quantum square, and by $1,e^{-1/2}$ for the Weyl cycle $Ad_{\sigma_x}$. At $t=\infty$ we obtain the limits in magenta: a point, a point, and the segment of the diagonal density matrices in the eigenbasis of $\sigma_x$.}\label{fig:blochflow} \end{figure} In the case (3), the heat flow destroys the coherences between the eigenvectors of $U$, and makes every density matrix diagonal in the eigenbasis of $U$. This is the phenomenon of decoherence, and in our language, the heat flow forgets the quantum structure of $V=M_n$, and only remembers the classical space of connected components, $\pi_0(X)=\{1,\ldots,n\}$. \medskip\noindent\textbf{Heat traces.} As a related invariant, the heat trace $Tr(e^{-tL})=\sum_\mu e^{-t\mu}$ decreases from $N=|V|$ at $t=0$ to $|\pi_0(X)|$ at $t=\infty$, the dimension of $C(\pi_0(X))$, and in the regular case, $L=\lambda-d$, it is related to the closed walks from section 5, via $Tr(e^{-tL})=e^{-\lambda t}\sum_kc_kt^k/k!$, as illustrated in Figure \ref{fig:heattrace}. In general, the heat trace is the Laplace transform of the spectral measure of $L$, so it determines the Laplacian spectrum, and the quantum square and $C_4$, being isospectral, have the same heat trace. For small times we have $Tr(e^{-tL})=N-t\,Tr(L)+O(t^2)$, with $Tr(L)=\psi(d(1))-Tr(d)=2E-Tr(d)$, which for the simple real graphs without loops is $2E$, as in section 7, so the heat trace determines the number of edges, exactly as in the classical case. For large times, when $L\neq0$, we have $Tr(e^{-tL})-|\pi_0(X)|\simeq m\,e^{-\lambda_+t}$, with $\lambda_+$ being the smallest positive eigenvalue of $L$, and $m$ its multiplicity, so the heat trace determines $\lambda_+$ too, as checked by {\tt heat.py}. In the connected case $\lambda_+=\lambda_2$ is the spectral gap, while for a disconnected graph $\lambda_2=0$, as in section 8, and for $L=0$ the heat trace is constant. For instance, for the simplex over $M_2$ we have $\lambda_+=4$ and $m=3$, for the quantum square $\lambda_+=2$ and $m=2$, and for the Weyl cycle over $M_3$, which has 3 components, $\lambda_+=3$ and $m=6$, while $\lambda_2=0$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[->,black!60] (0,0)--(7.90,0) node[right] {$t$}; \draw[->,black!60] (0,0)--(0,4.18) node[above] {$Tr(e^{-tL})$}; \draw[black!60] (-0.08,0.420)--(0.08,0.420) node[left,xshift=-1.5mm,font=\scriptsize] {$1$}; \draw[black!60] (-0.08,1.260)--(0.08,1.260) node[left,xshift=-1.5mm,font=\scriptsize] {$3$}; \draw[black!60] (-0.08,1.680)--(0.08,1.680) node[left,xshift=-1.5mm,font=\scriptsize] {$4$}; \draw[black!60] (-0.08,3.780)--(0.08,3.780) node[left,xshift=-1.5mm,font=\scriptsize] {$9$}; \draw[black!60] (2.500,-0.08)--(2.500,0.08); \node[below,font=\scriptsize] at (2.500,-0.08) {$0.5$}; \draw[black!60] (5.000,-0.08)--(5.000,0.08); \node[below,font=\scriptsize] at (5.000,-0.08) {$1$}; \draw[black!60] (7.500,-0.08)--(7.500,0.08); \node[below,font=\scriptsize] at (7.500,-0.08) {$1.5$}; \draw[black!30,dashed] (0,0.420)--(7.50,0.420); \draw[black!30,dashed] (0,1.260)--(7.50,1.260); \draw[qblue,line width=1.3pt] plot[smooth] coordinates {(0.00,1.680) (0.50,1.265) (1.00,0.986) (1.50,0.800) (2.00,0.674) (2.50,0.591) (3.00,0.534) (3.50,0.497) (4.00,0.471) (4.50,0.454) (5.00,0.443) (5.50,0.435) (6.00,0.430) (6.50,0.427) (7.00,0.425) (7.50,0.423)}; \draw[qgold,line width=1.3pt] plot[smooth] coordinates {(0.00,1.680) (0.50,1.389) (1.00,1.172) (1.50,1.008) (2.00,0.882) (2.50,0.786) (3.00,0.711) (3.50,0.653) (4.00,0.607) (4.50,0.570) (5.00,0.541) (5.50,0.518) (6.00,0.500) (6.50,0.485) (7.00,0.473) (7.50,0.463)}; \draw[magenta,line width=1.3pt] plot[smooth] coordinates {(0.00,3.780) (0.50,3.127) (1.00,2.643) (1.50,2.285) (2.00,2.019) (2.50,1.822) (3.00,1.677) (3.50,1.569) (4.00,1.489) (4.50,1.429) (5.00,1.385) (5.50,1.353) (6.00,1.329) (6.50,1.311) (7.00,1.298) (7.50,1.288)}; \draw[qblue,line width=1.3pt] (4.30,3.60)--++(0.5,0) node[right,text=black] {simplex over $M_2$}; \draw[qgold,line width=1.3pt] (4.30,3.15)--++(0.5,0) node[right,text=black] {quantum square}; \draw[magenta,line width=1.3pt] (4.30,2.70)--++(0.5,0) node[right,text=black] {Weyl cycle over $M_3$}; \end{tikzpicture} \caption{The heat traces of the simplex over $M_2$, equal to $1+3e^{-4t}$, of the quantum square, equal to $1+2e^{-2t}+e^{-4t}$, and of the Weyl cycle over $M_3$, equal to $3+6e^{-3t}$, as computed by {\tt pictures.py}. They start at $N=|V|$, and converge to the number of connected components.}\label{fig:heattrace} \end{figure} The program {\tt heat.py} checks all the above: the Lindblad form of $-L$, the complete positivity of $e^{-tL}$, via the Choi matrices, its unitality and invariance properties, its limit, the examples in Proposition \ref{prop:heatex}, the limits of the heat trace, and the failure of positivity for a classical graph with a negative weight. \medskip\noindent\textbf{Hopping Hamiltonians.} Finally, there is a second physical interpretation of the theory, coming from closed systems. For any undirected quantum graph $X=(V,d)$, positively weighted or not, $H=-d$ is a self-adjoint operator on $L^2(V)$, which can be thought of as a hopping Hamiltonian on the quantum space $V$, and $e^{itH}$ is the corresponding Schr\"odinger evolution, which is a unitary group on $L^2(V)$. In the classical case, this is the continuous time quantum walk of Farhi and Gutmann \cite{fgu}, and in physics, these are the tight-binding Hamiltonians of the solid state physics, with $d_{ij}$ being the amplitude for an electron to hop from $j$ to $i$. In this context, the complex weights are natural, as for the Weyl-Cayley graphs, whose weights are roots of unity. These are the 2 physical interpretations of the theory. In both, the weights are essential: the jump rates of a Lindblad generator are arbitrary positive numbers, and the hopping amplitudes of a Hamiltonian are arbitrary complex numbers, with their phases encoding magnetic fluxes. This is the main motivation for working with arbitrary matrices $d$, instead of the idempotents $d\circ d=d$: the open systems use the positively weighted ones, possibly directed, and the closed systems use the undirected ones, possibly with complex weights. \section{Trees, cycles, circuits} Classically, the trees can be characterized in several equivalent ways. For an undirected simple graph $X$ with $N$ vertices, being a tree means being connected, and having $N-1$ edges, or, equivalently, being connected, and having no cycles, or, equivalently, being connected, and having exactly one spanning tree, $\tau(X)=1$. Behind this is the cyclomatic number $\beta_1(X)=E-N+c$, with $E$ being the number of edges, and $c$ the number of connected components, which is the number of independent cycles of $X$, or the first Betti number of $X$, regarded as a topological space. Classically $\beta_1(X)\geq0$, the trees are the connected graphs with $\beta_1=0$, and the cycles are the connected graphs which are regular of valence 2, and these have $\beta_1=1$, as in Figure \ref{fig:betti}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \begin{scope}[shift={(0.0,0)}] \draw[qgold,line width=1.1pt] (0.00,0.00)--(0.80,0.55); \draw[qgold,line width=1.1pt] (0.00,0.00)--(0.80,-0.55); \draw[qgold,line width=1.1pt] (0.80,0.55)--(1.60,0.55); \draw[qgold,line width=1.1pt] (0.80,-0.55)--(1.60,-0.55); \draw[qgold,line width=1.1pt] (1.60,-0.55)--(2.40,-0.55); \fill[black!75] (0.00,0.00) circle[radius=2.2pt]; \fill[black!75] (0.80,0.55) circle[radius=2.2pt]; \fill[black!75] (0.80,-0.55) circle[radius=2.2pt]; \fill[black!75] (1.60,0.55) circle[radius=2.2pt]; \fill[black!75] (1.60,-0.55) circle[radius=2.2pt]; \fill[black!75] (2.40,-0.55) circle[radius=2.2pt]; \node[font=\footnotesize] at (1.20,-1.25) {tree, $N=6$, $E=5$, $\beta_1=0$}; \end{scope} \begin{scope}[shift={(4.1,0)}] \draw[qblue,line width=1.1pt] (1.40,0.37)--(0.75,0.75); \draw[qblue,line width=1.1pt] (0.75,0.75)--(0.10,0.38); \draw[qblue,line width=1.1pt] (0.10,0.38)--(0.10,-0.37); \draw[qblue,line width=1.1pt] (0.10,-0.37)--(0.75,-0.75); \draw[qblue,line width=1.1pt] (0.75,-0.75)--(1.40,-0.38); \draw[qblue,line width=1.1pt] (1.40,-0.38)--(1.40,0.37); \fill[black!75] (1.40,0.37) circle[radius=2.2pt]; \fill[black!75] (0.75,0.75) circle[radius=2.2pt]; \fill[black!75] (0.10,0.38) circle[radius=2.2pt]; \fill[black!75] (0.10,-0.37) circle[radius=2.2pt]; \fill[black!75] (0.75,-0.75) circle[radius=2.2pt]; \fill[black!75] (1.40,-0.38) circle[radius=2.2pt]; \node[font=\footnotesize] at (0.75,-1.25) {$C_6$, $N=6$, $E=6$, $\beta_1=1$}; \end{scope} \begin{scope}[shift={(8.0,0)}] \draw[magenta,line width=1.1pt] (0.75,0.85)--(0.00,-0.55); \draw[magenta,line width=1.1pt] (0.00,-0.55)--(1.50,-0.55); \draw[magenta,line width=1.1pt] (1.50,-0.55)--(0.75,0.85); \draw[magenta,line width=1.1pt] (0.75,0.85)--(0.75,-0.05); \draw[magenta,line width=1.1pt] (0.00,-0.55)--(0.75,-0.05); \draw[magenta,line width=1.1pt] (1.50,-0.55)--(0.75,-0.05); \fill[black!75] (0.75,0.85) circle[radius=2.2pt]; \fill[black!75] (0.00,-0.55) circle[radius=2.2pt]; \fill[black!75] (1.50,-0.55) circle[radius=2.2pt]; \fill[black!75] (0.75,-0.05) circle[radius=2.2pt]; \node[font=\footnotesize] at (0.75,-1.25) {$K_4$, $N=4$, $E=6$, $\beta_1=3$}; \end{scope} \end{tikzpicture} \caption{A tree, a cycle, and the complete graph $K_4$, with their cyclomatic numbers $\beta_1=E-N+c$, which count the independent cycles. We will see that over $M_2$, the quantum square and the simplex have the same invariants $N,E,c,\beta_1,\tau$ as $C_4$ and $K_4$, while there is no quantum tree.}\label{fig:betti} \end{figure} In the quantum case, all these notions make sense, by using the number of edges $E=\frac{1}{2}\psi(d(1))$ from section 2, the space of connected components $\pi_0(X)$ from section 6, with $c=|\pi_0(X)|$, and the Kirchhoff number $\tau(X)$ from section 8. Let us mention that quantum trees, in the setting of the quantum Cayley graphs of the discrete quantum groups, were studied by Vergnioux \cite{ver}. Also, the number of components, as the nullity of the Laplacian, and a notion of tree given by the condition $Tr(L)=2\,rank(L)$, appear in the work of Bravo Hern\'andez, Hern\'andez Palomares and Viales Sol\'is \cite{bhv}. In our setting, for $X$ simple, real, undirected and without loops, we have $Tr(L)=\psi(d(1))-Tr(d)=2E$, because $Tr(d)=\psi((1\circ d)(1))=0$, by Proposition \ref{prop:tracehadamard}, and $rank(L)=N-c$, so this condition is $\beta_1=0$, as checked by {\tt cycles.py}. We will see that, in the quantum case, the various classical characterizations of the trees diverge, and that the cycles become very rigid. Let us begin with the case $V=M_n$, where everything can be made explicit. Here we use the formula from Lemma \ref{lem:adab}, which holds, with the same proof, for any $A,B\in M_n(\mathbb C)$: $$Ad_{A,A}\circ Ad_{B,B}=\frac{Tr(A^*B)}{n}\,Ad_{A,B}$$ We call 2 quantum graphs $(V,d)$ and $(V,d')$ isomorphic when $d'=\theta d\theta^{-1}$, for some automorphism $\theta$ of the algebra $C(V)$, which for $V=M_n$ means $\theta=Ad_W$, with $W\in U_n$. We have: \begin{proposition}\label{prop:mnsimple} The simple, undirected, positively weighted quantum graphs without loops over $V=M_n$ are the maps of the form $$d=\sum_{i=1}^kAd_{W_i}$$ with $W_1,\ldots,W_k$ being an orthonormal basis, with respect to $=Tr(AB^*)/n$, of a self-adjoint subspace $\mathcal S\subset M_n(\mathbb C)$ of traceless matrices. Moreover, $d$ depends only on $\mathcal S$, its number of edges is $E=n^2k/2$, and $\ker L=\mathcal S'$, so $X$ is connected precisely when $\mathcal S$ generates $M_n(\mathbb C)$. \end{proposition} \begin{proof} Consider a Kraus decomposition $d=\sum_iAd_{W_i}$, with the $W_i$ linearly independent. By the above formula, we have $d\circ d=\sum_{ij}Ad_{W_i,W_j}$, and since the maps $Ad_{W_i,W_j}$ are linearly independent, $d\circ d=d$ means that the $W_i$ are orthonormal. Next, we have $Ad_W^*=Ad_{W^*}$, and the span of the Kraus operators does not depend on the decomposition, so $d=d^*$ means $\mathcal S=\mathcal S^*$. Also, $d\circ1=\sum_iTr(W_i^*)/n\cdot Ad_{W_i,1}$, so the absence of loops means $Tr(W_i)=0$. Conversely, all these maps have the properties in the statement, and are real, because $Ad_W(x^*)^*=Ad_W(x)$. The orthonormal bases of $\mathcal S$ differ by unitary matrices, which leave $\sum_iAd_{W_i}$ invariant. Finally, $\psi(d(1))=n\sum_iTr(W_iW_i^*)=n^2k$, and the harmonic elements are those commuting with the $W_i$, by section 6. \end{proof} Since $\mathcal S$ is self-adjoint, we can always choose the $W_i$ to be self-adjoint. As a first consequence, there are no quantum trees over $M_n$, and more precisely, every connected quantum graph over $M_n$ has at least one cycle, in the sense $\beta_1\geq1$. Regarding the cycles themselves, we have the following result, which is the main result of this section: \begin{theorem}\label{thm:quantumcycles} Let $X$ be a connected, simple, undirected, positively weighted quantum graph without loops over $V=M_n$, with $n\geq2$. \begin{enumerate} \item $X$ has $E\geq N$ edges, so there are no quantum trees over $M_n$. \item If $X$ is regular of valence $2$, then $n=2$, and $X$ is isomorphic to the quantum square. \end{enumerate} \end{theorem} \begin{proof} (1) A single self-adjoint matrix generates a commutative algebra, so connectivity forces $k\geq2$, and so $E=n^2k/2\geq n^2=N$, by Proposition \ref{prop:mnsimple}. (2) Since $\psi(d(1))=n^2k$, the valence is $k$, so $k=2$, and $d=Ad_A+Ad_B$, with $A,B$ self-adjoint, traceless, orthonormal, generating $M_n(\mathbb C)$, and with $A^2+B^2=2$. Consider the matrix $Z=A+iB$. We have $Z^*Z+ZZ^*=2(A^2+B^2)=4$, so with $T=Z^*Z$ we have $ZZ^*=4-T$, and so: $$ZT=ZZ^*Z=(4-T)Z$$ Thus $Z$ maps the eigenspace $E_t$ of $T$ into $E_{4-t}$, and the same holds for $Z^*$. It follows that $E_t+E_{4-t}$ is invariant under $A,B$, so by irreducibility, $\mathbb C^n=E_t+E_{4-t}$. If $t=2$ then $Z$ is normal, so $A,B$ commute, which contradicts $n\geq2$. Thus $t\neq2$, and we can write $Z$ as an off-diagonal block matrix, with respect to $\mathbb C^n=E_t\oplus E_{4-t}$: $$Z=\begin{pmatrix}0&X\\Y&0\end{pmatrix}$$ The conditions $Z^*Z=t$ on $E_t$ and $Z^*Z=4-t$ on $E_{4-t}$ give $Y^*Y=t$ and $X^*X=4-t$. For $0,magenta,line width=1.3pt] (0.00,0)--(0.62,0.62) node[above right,text=magenta] {$a$}; \draw[->,qgold,line width=1.3pt] (0.00,0)--(-0.75,0.45) node[above left,text=qgold] {$b$}; \draw[->,black!60,line width=1pt] (1.35,0)--(2.35,0) node[midway,above] {$SO_3$}; \shade[ball color=qblue!10,opacity=.6] (3.70,0) circle[radius=0.95]; \draw[black!45] (3.70,0) circle[radius=0.95]; \draw[black!35,dashed] (3.70,0) ellipse[x radius=0.95,y radius=0.28]; \draw[->,qgold,line width=1.3pt] (3.70,0)--(3.70,0.95) node[above,text=qgold] {$\sigma_z$}; \draw[->,magenta,line width=1.3pt] (3.70,0)--(3.10,-0.42) node[below left,text=magenta] {$\sigma_x$}; \end{tikzpicture} \caption{The last step in the proof of Theorem \ref{thm:quantumcycles}. The Pauli vectors $a,b\in\mathbb R^3$ of the Kraus operators $A,B$ are orthonormal, and a rotation brings them to the vectors of $\sigma_x,\sigma_z$.}\label{fig:rotate} \end{figure} Thus, the quantum square from the introduction, which has the spectrum of the usual square $C_4$, is the unique quantum cycle over a matrix algebra. The operator-theoretic step in the proof of (2) is known: $A/\sqrt2$ and $B/\sqrt2$ satisfy the relation $x^2+y^2=1$ of the free real circle, and the irreducible representations of this relation on $\mathbb C^n$ have $n\leq2$, by \cite{cte} and \cite{fba}. The new point here is the graph-theoretic application. Observe that for $n=2$ the regularity is automatic, because $A^2=B^2=1$. For $n\geq3$ there are connected quantum graphs with $E=N$, which are therefore quantum analogues of the graphs having exactly one cycle, but these are not regular. For instance, over $M_3$, we can take $d=Ad_A+Ad_B$ with: $$A=\sqrt{\frac{3}{2}}\begin{pmatrix}1&0&0\\0&-1&0\\0&0&0\end{pmatrix}\quad,\quad B=\frac{\sqrt3}{2}\begin{pmatrix}0&1&0\\1&0&1\\0&1&0\end{pmatrix}$$ Here $A,B$ are self-adjoint, traceless, orthonormal, and generate $M_3(\mathbb C)$, so this quantum graph is connected, with $E=9=N$, but $A^2+B^2$ is not a scalar. Regarding the Weyl cycle from section 2, this is the Weyl-Cayley graph from section 4 with $S=\{\pm(1,0)\}$, which is regular of valence 2, and in agreement with the above, it is not connected: \begin{proposition} The Weyl cycle $d(x)=UxU^*+U^*xU$ on $M_n$, with $n\geq3$, is simple, real, undirected, positively weighted and without loops, regular of valence $2$. Its spectrum is that of $n$ disjoint copies of the $n$-cycle, and $\pi_0(X)=\{1,\ldots,n\}$. \end{proposition} \begin{proof} Everything follows from section 4, except for $\pi_0(X)$, which follows from section 6, the harmonic elements being the matrices commuting with $U$. \end{proof} Thus, the Weyl cycle is not a quantum analogue of the cycle, but rather of $n$ copies of it. The connected Weyl-Cayley graphs are those with $S$ generating $\mathbb Z_n^2$, because $\ker L$ is spanned by the $U_h$ with $\sigma(g,h)=0$ for any $g\in S$, and the simplest choice is $S=\{\pm(1,0),\pm(0,1)\}$, which is a quantum torus, with the spectrum of the $n\times n$ discrete torus. For instance, the Weyl cycle over $M_4$ is given by $d(e_{ab})=e_{a+1,b+1}+e_{a-1,b-1}$, and so its picture consists of 4 squares, indexed by $b-a$ modulo 4, as checked by {\tt pictures.py}, and as shown in Figure \ref{fig:weylcycle}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.1pt] (-0.46,0.46)--(0.46,0.46)--(0.46,-0.46)--(-0.46,-0.46)--cycle; \fill[qgold] (-0.46,0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (-0.71,0.71) {$e_{11}$}; \fill[qgold] (0.46,0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (0.71,0.71) {$e_{22}$}; \fill[qgold] (0.46,-0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (0.71,-0.71) {$e_{33}$}; \fill[qgold] (-0.46,-0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (-0.71,-0.71) {$e_{44}$}; \node[font=\small] at (0.00,-1.25) {$b-a=0$}; \draw[qblue,line width=1.1pt] (2.54,0.46)--(3.46,0.46)--(3.46,-0.46)--(2.54,-0.46)--cycle; \fill[black!75] (2.54,0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (2.29,0.71) {$e_{12}$}; \fill[black!75] (3.46,0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (3.71,0.71) {$e_{23}$}; \fill[black!75] (3.46,-0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (3.71,-0.71) {$e_{34}$}; \fill[black!75] (2.54,-0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (2.29,-0.71) {$e_{41}$}; \node[font=\small] at (3.00,-1.25) {$b-a=1$}; \draw[qblue,line width=1.1pt] (5.54,0.46)--(6.46,0.46)--(6.46,-0.46)--(5.54,-0.46)--cycle; \fill[black!75] (5.54,0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (5.29,0.71) {$e_{13}$}; \fill[black!75] (6.46,0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (6.71,0.71) {$e_{24}$}; \fill[black!75] (6.46,-0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (6.71,-0.71) {$e_{31}$}; \fill[black!75] (5.54,-0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (5.29,-0.71) {$e_{42}$}; \node[font=\small] at (6.00,-1.25) {$b-a=2$}; \draw[qblue,line width=1.1pt] (8.54,0.46)--(9.46,0.46)--(9.46,-0.46)--(8.54,-0.46)--cycle; \fill[black!75] (8.54,0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (8.29,0.71) {$e_{14}$}; \fill[black!75] (9.46,0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (9.71,0.71) {$e_{21}$}; \fill[black!75] (9.46,-0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (9.71,-0.71) {$e_{32}$}; \fill[black!75] (8.54,-0.46) circle[radius=2.4pt]; \node[font=\scriptsize] at (8.29,-0.71) {$e_{43}$}; \node[font=\small] at (9.00,-1.25) {$b-a=3$}; \end{tikzpicture} \caption{The Weyl cycle over $M_4$, made of $4$ disjoint squares, the one formed by the diagonal points, in gold, and $3$ squares formed by off-diagonal points. Its space of connected components is $\pi_0(X)=\{1,2,3,4\}$, coming from the eigenspaces of the shift $U$, in agreement with the number of squares.}\label{fig:weylcycle} \end{figure} \medskip\noindent\textbf{Quantum trees.} Let us discuss now the trees, over more general quantum spaces. The simplest examples come from the complete bipartite graphs. Given finite quantum spaces $V,W$, the complete bipartite quantum graph $K_{V,W}$ is the quantum graph over $V\sqcup W$ given by $$d(x,y)=(\psi_W(y)1,\psi_V(x)1)$$ that is, $d$ is the part of $J_{V\sqcup W}$ which connects $V$ and $W$. We have: \begin{proposition} The complete bipartite quantum graph $K_{V,W}$ is simple, undirected, real, positively weighted, without loops, connected and bipartite, it has $E=|V|\cdot|W|$ edges, and its Laplacian has the spectrum of the usual complete bipartite graph $K_{|V|,|W|}$, so that $\tau(K_{V,W})=|V|^{|W|-1}|W|^{|V|-1}$. In particular, for $V$ being a point, the quantum star $K_{1,W}$ is a quantum tree, being connected, with $E=N-1$ and $\tau=1$, and with the spectrum of the star $K_{1,N-1}$. \end{proposition} \begin{proof} With $p=|V|$ and $q=|W|$, we have $d(1)=(q,p)$, so $L(x,y)=(qx-\psi_W(y)1,py-\psi_V(x)1)$. Thus $L$ equals $q$ on the elements $(x,0)$ with $\psi_V(x)=0$, and $p$ on the elements $(0,y)$ with $\psi_W(y)=0$, and on the span of $(1,0),(0,1)$ it is given by a $2\times2$ matrix, with eigenvalues $0$ and $p+q$. This is the spectrum of $K_{p,q}$, and the formula of $\tau$ follows. The other assertions are clear, the bipartition being given by the projection $(1,0)$, and $d$ being the sum of the corresponding blocks of $J$, which are $\circ$-projections. \end{proof} For $V$ a point and $W=M_2$, the quantum star $K_{1,M_2}$ is a quantum version of the star $K_{1,4}$, and its picture is as in Figure \ref{fig:star}, the off-diagonal points $e_{12},e_{21}$ being isolated, as for the complete graph with loops in section 2. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.1pt] (0.00,0.60)--(0.60,1.20); \draw[qblue,line width=1.1pt] (0.00,0.60)--(-0.60,1.20); \draw[qblue,line width=1.1pt] (0.00,0.60)--(-0.60,-0.00); \draw[qblue,line width=1.1pt] (0.00,0.60)--(0.60,-0.00); \fill[black!75] (0.00,0.60) circle[radius=2.2pt]; \fill[black!75] (0.60,1.20) circle[radius=2.2pt]; \fill[black!75] (-0.60,1.20) circle[radius=2.2pt]; \fill[black!75] (-0.60,-0.00) circle[radius=2.2pt]; \fill[black!75] (0.60,-0.00) circle[radius=2.2pt]; \node at (0,-0.65) {$K_{1,4}$}; \draw[->,magenta,line width=.9pt,shorten >=3pt,shorten <=3pt] (2.40,0.60) to[bend left=16] node[pos=0.55,fill=white,inner sep=1pt,font=\scriptsize] {$1$} (4.60,1.30); \draw[->,qblue,line width=.9pt,shorten >=3pt,shorten <=3pt] (4.60,1.30) to[bend left=16] node[pos=0.45,fill=white,inner sep=1pt,font=\scriptsize] {$2$} (2.40,0.60); \draw[->,magenta,line width=.9pt,shorten >=3pt,shorten <=3pt] (2.40,0.60) to[bend left=16] node[pos=0.55,fill=white,inner sep=1pt,font=\scriptsize] {$1$} (5.80,-0.10); \draw[->,qblue,line width=.9pt,shorten >=3pt,shorten <=3pt] (5.80,-0.10) to[bend left=16] node[pos=0.45,fill=white,inner sep=1pt,font=\scriptsize] {$2$} (2.40,0.60); \fill[qgold] (2.40,0.60) circle[radius=2.8pt]; \fill[qgold] (4.60,1.30) circle[radius=2.8pt]; \node[font=\scriptsize,above] at (4.60,1.35) {$e_{11}$}; \draw[qblue,fill=white,line width=.8pt] (5.80,1.30) circle[radius=2.5pt]; \node[font=\scriptsize,above] at (5.80,1.35) {$e_{12}$}; \draw[qblue,fill=white,line width=.8pt] (4.60,-0.10) circle[radius=2.5pt]; \node[font=\scriptsize,below] at (4.60,-0.15) {$e_{21}$}; \fill[qgold] (5.80,-0.10) circle[radius=2.8pt]; \node[font=\scriptsize,below] at (5.80,-0.15) {$e_{22}$}; \node at (4.1,-0.75) {$K_{1,M_2}$}; \end{tikzpicture} \caption{The star $K_{1,4}$, and the quantum star $K_{1,M_2}$, in the multimatrix basis, as computed by {\tt pictures.py}. The point is connected to $e_{11},e_{22}$, with weight $1$ towards $M_2$ and $2$ backwards, and both stars have the Laplacian spectrum $\{0,1,1,1,5\}$.}\label{fig:star} \end{figure} In general, however, the classical characterizations of the trees diverge. Classically, a connected graph has at least $N-1$ edges, and its Kirchhoff number is a positive integer. In the quantum case, a single quantum edge between 2 blocks can tie them together much more strongly than a classical edge, and we have: \begin{proposition} The classical characterizations of the trees diverge in the quantum case: \begin{enumerate} \item Over $V=M_2\oplus M_2$, there are connected simple undirected positively weighted quantum graphs without loops having $E=N-2$ edges, and $\tau<1$. \item Over $V=M_3$, the quantum graph $Ad_h$, with $h=\sqrt{3/2}\,diag(1,-1,0)$, is simple, undirected, positively weighted, without loops, and has $\beta_1=-3/2$. \end{enumerate} \end{proposition} \begin{proof} (1) Take $d$ to consist of a quantum edge $x_1\to K^*x_1K$ from the first block to the second one, with $K=diag(1,2)$, of its adjoint, and of $Ad_{\sigma_x}$ on the first block, all normalized to be $\circ$-projections. The harmonic elements satisfy $x_1K=Kx_2$, $x_2K^*=K^*x_1$ and $[x_1,\sigma_x]=0$, so $x_1$ commutes with $KK^*$ and with $\sigma_x$, so it is a scalar, and so is $x_2=K^{-1}x_1K$. Thus $X$ is connected, and a direct computation, with exact rational arithmetic, gives $E=6=N-2$, and $\tau=4248/15625=0.271872$. Observe that we have $\beta_1=6-8+1=-1$. (2) This is a particular case of Proposition \ref{prop:mnsimple}, with $k=1$, so $E=9/2$, and since $\ker L$ is the commutant of $h$, which is the diagonal algebra, we have $c=3$, and so $\beta_1=9/2-9+3=-3/2$. \end{proof} Observe that in the second example, the cyclomatic number is not even an integer, and this shows that the quantum graphs can be quite far from the classical ones, even when they look harmless, with a single quantum edge. Summarizing, we have the following table, with the data computed by {\tt pictures.py} and {\tt cycles.py}, where $K_{1,M_2}$ is the quantum star, and where the last 2 lines are the examples from the above proposition: \begin{center} \begin{tabular}{|l|c|c|c|c|c|} \hline quantum graph&$N$&$E$&$c$&$\beta_1$&$\tau$\\ \hline quantum square&$4$&$4$&$1$&$1$&$4$\\ \hline simplex over $M_2$&$4$&$6$&$1$&$3$&$16$\\ \hline quantum star $K_{1,M_2}$&$5$&$4$&$1$&$0$&$1$\\ \hline $K_{M_2,M_2}$&$8$&$16$&$1$&$9$&$4096$\\ \hline Weyl cycle over $M_3$&$9$&$9$&$3$&$3$&$-$\\ \hline quantum torus over $M_3$&$9$&$18$&$1$&$10$&$11664$\\ \hline example over $M_2\oplus M_2$&$8$&$6$&$1$&$-1$&$4248/15625$\\ \hline $Ad_h$ over $M_3$&$9$&$9/2$&$3$&$-3/2$&$-$\\ \hline \end{tabular} \end{center} \medskip The quantum torus over $M_3$ has the same invariants as the rook's graph $K_3\,\square\,K_3$, in agreement with section 4. The program {\tt cycles.py} checks all the above: Proposition \ref{prop:mnsimple} for random subspaces $\mathcal S$ over $M_2,M_3,M_4$, the quantum square, the above connected non-regular graph over $M_3$, the fact that random pairs $A,B$ over $M_3,M_4$ never give $A^2+B^2$ scalar, the complete bipartite quantum graphs over various spaces, and the examples showing the divergence. This suggests: \begin{question} What is the right notion of quantum tree, among the above ones? Which quantum spaces $V$, besides the classical ones and $M_2$, carry quantum cycles, that is, connected simple undirected positively weighted quantum graphs without loops, regular of valence $2$? \end{question} \medskip\noindent\textbf{Circuits.} Let us also mention that, classically, the cycles of a graph can be studied via the non-backtracking walks, and the Ihara zeta function, as developed by Hashimoto \cite{has}, and the extension of this to the quantum case is an interesting question as well. Regarding finally the Euler and Hamilton circuits, these do not seem to transfer to the quantum case in an obvious way. The Euler theorem states that a connected graph has an Euler circuit, using each edge exactly once, precisely when all its degrees are even, and both the notion of circuit, and the parity of the degrees, involve the edges one by one. As for the Hamilton circuits, visiting each vertex exactly once, there is no simple criterion for their existence, this being an NP-complete problem. For instance, the bowtie has an Euler circuit, while the square with a diagonal does not, as in Figure \ref{fig:euler}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[->,qblue,line width=1.1pt,shorten >=3pt,shorten <=3pt] (0.00,0.00)--(-1.10,0.65); \node[font=\scriptsize,text=magenta] at (-0.69,0.56) {$1$}; \draw[->,qblue,line width=1.1pt,shorten >=3pt,shorten <=3pt] (-1.10,0.65)--(-1.10,-0.65); \node[font=\scriptsize,text=magenta] at (-1.38,0.12) {$2$}; \draw[->,qblue,line width=1.1pt,shorten >=3pt,shorten <=3pt] (-1.10,-0.65)--(0.00,0.00); \node[font=\scriptsize,text=magenta] at (-0.69,-0.56) {$3$}; \draw[->,qblue,line width=1.1pt,shorten >=3pt,shorten <=3pt] (0.00,0.00)--(1.10,0.65); \node[font=\scriptsize,text=magenta] at (0.69,0.56) {$4$}; \draw[->,qblue,line width=1.1pt,shorten >=3pt,shorten <=3pt] (1.10,0.65)--(1.10,-0.65); \node[font=\scriptsize,text=magenta] at (1.38,0.12) {$5$}; \draw[->,qblue,line width=1.1pt,shorten >=3pt,shorten <=3pt] (1.10,-0.65)--(0.00,0.00); \node[font=\scriptsize,text=magenta] at (0.69,-0.56) {$6$}; \fill[black!75] (0.00,0.00) circle[radius=2.2pt]; \fill[black!75] (-1.10,0.65) circle[radius=2.2pt]; \fill[black!75] (-1.10,-0.65) circle[radius=2.2pt]; \fill[black!75] (1.10,0.65) circle[radius=2.2pt]; \fill[black!75] (1.10,-0.65) circle[radius=2.2pt]; \node at (0,-1.2) {all degrees even}; \draw[qblue,line width=1.1pt] (4.20,0.65)--(5.50,0.65); \draw[qblue,line width=1.1pt] (5.50,0.65)--(5.50,-0.65); \draw[qblue,line width=1.1pt] (5.50,-0.65)--(4.20,-0.65); \draw[qblue,line width=1.1pt] (4.20,-0.65)--(4.20,0.65); \draw[qblue,line width=1.1pt] (4.20,0.65)--(5.50,-0.65); \fill[magenta] (4.20,0.65) circle[radius=2.8pt]; \fill[black!75] (5.50,0.65) circle[radius=2.8pt]; \fill[magenta] (5.50,-0.65) circle[radius=2.8pt]; \fill[black!75] (4.20,-0.65) circle[radius=2.8pt]; \node at (4.85,-1.2) {$2$ odd degrees}; \end{tikzpicture} \caption{The bowtie, whose degrees are all even, with an Euler circuit, and the square with a diagonal, which has $2$ vertices of odd degree, in magenta, and no Euler circuit.}\label{fig:euler} \end{figure} In the quantum case, the edges come as subspaces of operators, as above, and the degree $d(1)$ is an element of $C(V)$, not necessarily a scalar, so these notions would require some new ideas. \section{Spectral theory, bounds} For an undirected quantum graph $X=(V,d)$ the matrix $d$ is self-adjoint on $L^2(V)$, so it has real eigenvalues. The basic spectral bounds hold verbatim: \begin{theorem}\label{thm:spectralbounds} For a positively weighted undirected quantum graph $X=(V,d)$, with largest eigenvalue $\lambda_{max}$, we have $$\frac{\psi(d(1))}{N}\leq\lambda_{max}\leq||d(1)||$$ that is, the average degree is smaller than $\lambda_{max}$, which is smaller than the maximal degree. In the regular case of valence $k$, we have $\lambda_{max}=k$. \end{theorem} \begin{proof} The lower bound is the Rayleigh quotient of $1$. For the upper bound, $d$ being completely positive, its norm on $C(V)$ is $||d(1)||$, and the same holds for its norm on $L^1(V)$, by duality and $d^*=d$, so by interpolation the norm on $L^2(V)$ is at most $||d(1)||$. \end{proof} As a classical illustration, for the star $K_{1,3}$, which is not regular, the bounds in Theorem \ref{thm:spectralbounds} are as in Figure \ref{fig:degreebounds}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.2pt] (0.00,0.55)--(0.00,1.30); \draw[qblue,line width=1.2pt] (0.00,0.55)--(-0.65,0.17); \draw[qblue,line width=1.2pt] (0.00,0.55)--(0.65,0.17); \fill[black!75] (0.00,0.55) circle[radius=2.2pt]; \fill[black!75] (0.00,1.30) circle[radius=2.2pt]; \fill[black!75] (-0.65,0.17) circle[radius=2.2pt]; \fill[black!75] (0.65,0.17) circle[radius=2.2pt]; \draw[black!50] (1.6,0.55)--(7.4,0.55); \draw[black!50] (1.90,0.49)--(1.90,0.61); \node[below,font=\scriptsize] at (1.90,0.47) {$0$}; \draw[black!50] (3.60,0.49)--(3.60,0.61); \node[below,font=\scriptsize] at (3.60,0.47) {$1$}; \draw[black!50] (5.30,0.49)--(5.30,0.61); \node[below,font=\scriptsize] at (5.30,0.47) {$2$}; \draw[black!50] (7.00,0.49)--(7.00,0.61); \node[below,font=\scriptsize] at (7.00,0.47) {$3$}; \fill[qgold] (4.45,0.55) circle[radius=3pt]; \node[above left,font=\scriptsize,text=qgold] at (4.45,0.65) {average $1.5$}; \fill[magenta] (4.84,0.55) circle[radius=3pt]; \node[above right,font=\scriptsize,text=magenta] at (4.84,0.65) {$\lambda_{max}=\sqrt3$}; \fill[qblue] (7.00,0.55) circle[radius=3pt]; \node[above,font=\scriptsize,text=qblue] at (7.00,0.65) {maximal $3$}; \end{tikzpicture} \caption{The star $K_{1,3}$, with average degree $1.5$, maximal degree $3$, and largest eigenvalue $\sqrt3$ in between, as computed by {\tt pictures.py}.}\label{fig:degreebounds} \end{figure} Figure \ref{fig:spectra} shows the spectra of some of our regular quantum graphs, as computed by {\tt pictures.py}, with the largest eigenvalue, which is the valence, in magenta, and with the multiplicities indicated. More generally, the Perron-Frobenius theory for positive maps on finite dimensional $C^*$-algebras, developed by Evans and H\o egh-Krohn \cite{ehk}, applies to the positively weighted quantum graphs, as already seen in section 5. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[black!50] (-2.45,0.35)--(6.05,0.35); \draw[black!50] (-2.16,0.29)--(-2.16,0.41); \node[font=\scriptsize] at (-2.16,0.62) {$-3$}; \draw[black!50] (-1.44,0.29)--(-1.44,0.41); \node[font=\scriptsize] at (-1.44,0.62) {$-2$}; \draw[black!50] (-0.72,0.29)--(-0.72,0.41); \node[font=\scriptsize] at (-0.72,0.62) {$-1$}; \draw[black!50] (0.00,0.29)--(0.00,0.41); \node[font=\scriptsize] at (0.00,0.62) {$0$}; \draw[black!50] (0.72,0.29)--(0.72,0.41); \node[font=\scriptsize] at (0.72,0.62) {$1$}; \draw[black!50] (1.44,0.29)--(1.44,0.41); \node[font=\scriptsize] at (1.44,0.62) {$2$}; \draw[black!50] (2.16,0.29)--(2.16,0.41); \node[font=\scriptsize] at (2.16,0.62) {$3$}; \draw[black!50] (2.88,0.29)--(2.88,0.41); \node[font=\scriptsize] at (2.88,0.62) {$4$}; \draw[black!50] (3.60,0.29)--(3.60,0.41); \node[font=\scriptsize] at (3.60,0.62) {$5$}; \draw[black!50] (4.32,0.29)--(4.32,0.41); \node[font=\scriptsize] at (4.32,0.62) {$6$}; \draw[black!50] (5.04,0.29)--(5.04,0.41); \node[font=\scriptsize] at (5.04,0.62) {$7$}; \draw[black!50] (5.76,0.29)--(5.76,0.41); \node[font=\scriptsize] at (5.76,0.62) {$8$}; \draw[black!12] (-2.45,-0.00)--(6.05,-0.00); \node[left,font=\footnotesize] at (-2.52,-0.00) {quantum square}; \fill[qblue] (-1.44,-0.00) circle[radius=2.6pt]; \fill[qblue] (0.00,-0.00) circle[radius=2.9pt]; \node[font=\tiny,above right] at (0.00,-0.00) {$2$}; \fill[magenta] (1.44,-0.00) circle[radius=2.6pt]; \draw[black!12] (-2.45,-0.55)--(6.05,-0.55); \node[left,font=\footnotesize] at (-2.52,-0.55) {simplex over $M_2$}; \fill[qblue] (-0.72,-0.55) circle[radius=3.2pt]; \node[font=\tiny,above right] at (-0.72,-0.55) {$3$}; \fill[magenta] (2.16,-0.55) circle[radius=2.6pt]; \draw[black!12] (-2.45,-1.10)--(6.05,-1.10); \node[left,font=\footnotesize] at (-2.52,-1.10) {Weyl cycle over $M_3$}; \fill[qblue] (-0.72,-1.10) circle[radius=4.3pt]; \node[font=\tiny,above right] at (-0.72,-1.10) {$6$}; \fill[magenta] (1.44,-1.10) circle[radius=3.2pt]; \node[font=\tiny,above right] at (1.44,-1.10) {$3$}; \draw[black!12] (-2.45,-1.65)--(6.05,-1.65); \node[left,font=\footnotesize] at (-2.52,-1.65) {quantum torus over $M_3$}; \fill[qblue] (-1.44,-1.65) circle[radius=3.6pt]; \node[font=\tiny,above right] at (-1.44,-1.65) {$4$}; \fill[qblue] (0.72,-1.65) circle[radius=3.6pt]; \node[font=\tiny,above right] at (0.72,-1.65) {$4$}; \fill[magenta] (2.88,-1.65) circle[radius=2.6pt]; \draw[black!12] (-2.45,-2.20)--(6.05,-2.20); \node[left,font=\footnotesize] at (-2.52,-2.20) {$J-3E$ over $M_3$}; \fill[qblue] (-2.16,-2.20) circle[radius=2.9pt]; \node[font=\tiny,above right] at (-2.16,-2.20) {$2$}; \fill[qblue] (0.00,-2.20) circle[radius=4.3pt]; \node[font=\tiny,above right] at (0.00,-2.20) {$6$}; \fill[magenta] (4.32,-2.20) circle[radius=2.6pt]; \draw[black!12] (-2.45,-2.75)--(6.05,-2.75); \node[left,font=\footnotesize] at (-2.52,-2.75) {simplex over $M_3$}; \fill[qblue] (-0.72,-2.75) circle[radius=5.0pt]; \node[font=\tiny,above right] at (-0.72,-2.75) {$8$}; \fill[magenta] (5.76,-2.75) circle[radius=2.6pt]; \end{tikzpicture} \caption{The spectra of $6$ regular quantum graphs. Those of the quantum square, of the simplex over $M_2$, and of the quantum torus over $M_3$ are those of $C_4$, of $K_4$, and of the rook's graph, and the Weyl cycle over $M_3$ has the spectrum of $3$ copies of $K_3$.}\label{fig:spectra} \end{figure} Regarding the Laplacian, the Kirchhoff matrix-tree theorem \cite{kir} states that the number of spanning trees of a connected graph is $\frac{1}{N}$ times the product of the nonzero eigenvalues of $L$, or equivalently, any diagonal cofactor of $L$. In the quantum case we do not have spanning trees to start with, so we use this formula as a definition: \begin{definition} The Kirchhoff number of a connected positively weighted undirected quantum graph $X$ is $\tau(X)=\frac{1}{N}\prod_{\lambda\neq0}\lambda$, the product being over the nonzero eigenvalues of $L$, counted with multiplicity. \end{definition} For instance, the square $C_4$ has 4 spanning trees, as in Figure \ref{fig:c4trees}, and the quantum square, which has the same Laplacian spectrum, has $\tau=4$ too. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[black!25,dashed,line width=.8pt] (0.00,0.90)--(0.90,0.90); \draw[qblue,line width=1.3pt] (0.90,0.90)--(0.90,0.00); \draw[qblue,line width=1.3pt] (0.90,0.00)--(0.00,0.00); \draw[qblue,line width=1.3pt] (0.00,0.00)--(0.00,0.90); \fill[black!75] (0.00,0.90) circle[radius=2.2pt]; \fill[black!75] (0.90,0.90) circle[radius=2.2pt]; \fill[black!75] (0.90,0.00) circle[radius=2.2pt]; \fill[black!75] (0.00,0.00) circle[radius=2.2pt]; \draw[qblue,line width=1.3pt] (1.60,0.90)--(2.50,0.90); \draw[black!25,dashed,line width=.8pt] (2.50,0.90)--(2.50,0.00); \draw[qblue,line width=1.3pt] (2.50,0.00)--(1.60,0.00); \draw[qblue,line width=1.3pt] (1.60,0.00)--(1.60,0.90); \fill[black!75] (1.60,0.90) circle[radius=2.2pt]; \fill[black!75] (2.50,0.90) circle[radius=2.2pt]; \fill[black!75] (2.50,0.00) circle[radius=2.2pt]; \fill[black!75] (1.60,0.00) circle[radius=2.2pt]; \draw[qblue,line width=1.3pt] (3.20,0.90)--(4.10,0.90); \draw[qblue,line width=1.3pt] (4.10,0.90)--(4.10,0.00); \draw[black!25,dashed,line width=.8pt] (4.10,0.00)--(3.20,0.00); \draw[qblue,line width=1.3pt] (3.20,0.00)--(3.20,0.90); \fill[black!75] (3.20,0.90) circle[radius=2.2pt]; \fill[black!75] (4.10,0.90) circle[radius=2.2pt]; \fill[black!75] (4.10,0.00) circle[radius=2.2pt]; \fill[black!75] (3.20,0.00) circle[radius=2.2pt]; \draw[qblue,line width=1.3pt] (4.80,0.90)--(5.70,0.90); \draw[qblue,line width=1.3pt] (5.70,0.90)--(5.70,0.00); \draw[qblue,line width=1.3pt] (5.70,0.00)--(4.80,0.00); \draw[black!25,dashed,line width=.8pt] (4.80,0.00)--(4.80,0.90); \fill[black!75] (4.80,0.90) circle[radius=2.2pt]; \fill[black!75] (5.70,0.90) circle[radius=2.2pt]; \fill[black!75] (5.70,0.00) circle[radius=2.2pt]; \fill[black!75] (4.80,0.00) circle[radius=2.2pt]; \end{tikzpicture} \caption{The $4$ spanning trees of the square $C_4$, obtained by removing one edge, as enumerated by {\tt pictures.py}. The Laplacian eigenvalues are $0,2,2,4$, and the Kirchhoff formula gives $\tau=2\cdot2\cdot4/4=4$.}\label{fig:c4trees} \end{figure} In the classical case, this is the number of spanning trees, by the Kirchhoff theorem, and more generally, for a weighted graph, this is the sum over the spanning trees $T$ of the products $\prod_{e\in T}d_e$ of the weights of their edges. In the quantum case, $\tau(X)$ need not be an integer, as seen in section 7, so it does not count trees in the usual sense. However, the proof of the Kirchhoff theorem, via the Cauchy-Binet formula, extends to the quantum case, and shows that $\tau(X)$ is a weighted count of certain quantum spanning trees. To be more precise, given a Kraus decomposition $d(x)_s=\sum_{r,k}K_{rsk}^*x_rK_{rsk}$, consider the edge space $H_E=\oplus_{r,s,k}M_{n_r\times n_s}(\mathbb C)$, with the scalar product $=Tr(AB^*)$, and the following map: $$B:L^2(V)\to H_E\quad,\quad B(x)=\left(\sqrt{\frac{n_s}{2}}\,(x_rK_{rsk}-K_{rsk}x_s)\right)_{rsk}$$ In the classical case, with one orientation chosen for each edge, the incidence matrix and the Laplacian are related as in Figure \ref{fig:incidence}, and our map $B$ is a quantum, and symmetrized, version of this. We call $B$ the quantum incidence map. By Theorem \ref{thm:dirichlet} we have $=||Bx||^2$, and so $L=B^*B$. In the classical case, $B$ is the usual incidence matrix, with each edge appearing twice, once for each orientation, and with a factor $1/\sqrt2$. We use the orthonormal basis $f_j=e_j/\sqrt{n_j}$ of $L^2(V)$, and the basis of $H_E$ formed by the matrix units of its blocks, and we call an index $i$ diagonal when $e_i$ is a diagonal matrix unit $e^r_{aa}$. With these conventions, we have: \begin{theorem}\label{thm:matrixtree} Let $X$ be connected, positively weighted and undirected, and let $i$ be a diagonal index, with $n_i$ being the size of the corresponding block. \begin{enumerate} \item $\tau(X)=\det(L_{(i)})/n_i$, where $L_{(i)}$ is the matrix of $L$, with row and column $i$ removed. \item $\tau(X)=\frac{1}{n_i}\sum_S|\det B_{S,(i)}|^2$, where the sum is over the subsets $S$ of $N-1$ basis elements of $H_E$, and $B_{S,(i)}$ is the matrix of $B$, with rows in $S$, and column $i$ removed. \end{enumerate} \end{theorem} \begin{proof} (1) In the basis $\{f_j\}$, $L$ is a positive matrix, whose kernel is spanned by the vector $v$ having coordinates $v_j=<1,f_j>$, which are $\sqrt{n_j}$ for $j$ diagonal, and $0$ otherwise, so that $||v||^2=\psi(1)=N$. For such a matrix, the adjugate is given by the following formula, with $\det'(L)$ being the product of the nonzero eigenvalues: $$adj(L)=\det{}'(L)\frac{vv^*}{||v||^2}$$ Thus the diagonal cofactors are $\det(L_{(i)})=adj(L)_{ii}=\det'(L)n_i/N=n_i\tau(X)$. (2) Since $L=B^*B$, we have $L_{(i)}=B_{(i)}^*B_{(i)}$, with $B_{(i)}$ being $B$ with column $i$ removed, and the Cauchy-Binet formula gives $\det(L_{(i)})=\sum_S|\det B_{S,(i)}|^2$. \end{proof} In the classical case, the subsets $S$ with $\det B_{S,(i)}\neq0$ come from the spanning trees $T$, together with a choice of orientation for each edge, and each contributes $\prod_{e\in T}d_e/2^{N-1}$, so we recover the weighted Kirchhoff theorem. In the quantum case, we call quantum spanning trees the subsets $S$ with $\det B_{S,(i)}\neq0$. Their weights $|\det B_{S,(i)}|^2/n_i$ are arbitrary positive numbers, and this explains why $\tau(X)$ need not be an integer. These quantum spanning trees depend on the Kraus decomposition, and on the chosen bases, so the content of Theorem \ref{thm:matrixtree} is this explicit incidence realization, the underlying identity $\det(L_{(i)})=\sum_S|\det B_{S,(i)}|^2$ holding for any factorization $L=B^*B$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (0.00,1.10)--(1.10,1.10); \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (1.10,1.10)--(1.10,0.00); \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (1.10,0.00)--(0.00,0.00); \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (0.00,0.00)--(0.00,1.10); \fill[black!75] (0.00,1.10) circle[radius=2.2pt]; \node[font=\scriptsize] at (-0.25,1.30) {$1$}; \fill[black!75] (1.10,1.10) circle[radius=2.2pt]; \node[font=\scriptsize] at (1.35,1.30) {$2$}; \fill[black!75] (1.10,0.00) circle[radius=2.2pt]; \node[font=\scriptsize] at (1.35,-0.20) {$3$}; \fill[black!75] (0.00,0.00) circle[radius=2.2pt]; \node[font=\scriptsize] at (-0.25,-0.20) {$4$}; \fill[qgold!60] (2.40,0.90) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (2.625,1.125) {$1$}; \fill[magenta!50] (2.85,0.90) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.075,1.125) {$-1$}; \fill[white] (3.30,0.90) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.525,1.125) {$0$}; \fill[white] (3.75,0.90) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.975,1.125) {$0$}; \fill[white] (2.40,0.45) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (2.625,0.675) {$0$}; \fill[qgold!60] (2.85,0.45) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.075,0.675) {$1$}; \fill[magenta!50] (3.30,0.45) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.525,0.675) {$-1$}; \fill[white] (3.75,0.45) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.975,0.675) {$0$}; \fill[white] (2.40,0.00) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (2.625,0.225) {$0$}; \fill[white] (2.85,0.00) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.075,0.225) {$0$}; \fill[qgold!60] (3.30,0.00) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.525,0.225) {$1$}; \fill[magenta!50] (3.75,0.00) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.975,0.225) {$-1$}; \fill[magenta!50] (2.40,-0.45) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (2.625,-0.225) {$-1$}; \fill[white] (2.85,-0.45) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.075,-0.225) {$0$}; \fill[white] (3.30,-0.45) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.525,-0.225) {$0$}; \fill[qgold!60] (3.75,-0.45) rectangle ++(0.45,0.45); \node[font=\scriptsize] at (3.975,-0.225) {$1$}; \draw[black!25,step=0.45] (2.4,-0.45) grid (4.2,1.35); \draw[black!60] (2.4,-0.45) rectangle (4.2,1.35); \node[right] at (4.5,0.45) {$L=B^tB=\begin{pmatrix}2&-1&0&-1\\-1&2&-1&0\\0&-1&2&-1\\-1&0&-1&2\end{pmatrix}$}; \end{tikzpicture} \caption{The square with an orientation of its edges, its incidence matrix $B$, with rows indexed by the edges and columns by the vertices, and its Laplacian $L=B^tB$, as checked by {\tt pictures.py}.}\label{fig:incidence} \end{figure} For instance, for the quantum square, with Kraus operators $\sigma_x,\sigma_z$, there are 10 quantum spanning trees, 8 of weight $1/4$ and 2 of weight $1$, giving $\tau=4$, which is the number of spanning trees of the usual square. For the quantum star over $\mathbb C\oplus M_2$, there are 16 quantum spanning trees, each of weight $1/16$, giving $\tau=1$. Observe that the quantum spanning trees depend on the choice of the Kraus decomposition, and of the bases, while their weighted count $\tau(X)$ does not. The program {\tt trees.py} checks Theorem \ref{thm:matrixtree} on the complete graph $K_4$, where it finds $16\times2^3=128$ subsets of weight $1/8$, on the quantum square, the quantum star, a random quantum graph over $\mathbb C\oplus M_2$, and the connected quantum graph over $M_2\oplus M_2$ from section 7, which has 72 quantum spanning trees, of small weights, summing up to $\tau\simeq0.272$. Here is a summary: \begin{center} \begin{tabular}{|l|c|c|c|} \hline quantum graph&quantum spanning trees&weights&$\tau$\\ \hline $K_4$&$128$&$1/8$&$16$\\ \hline quantum square&$10$&$1/4$, and $1$&$4$\\ \hline quantum star over $\mathbb C\oplus M_2$&$16$&$1/16$&$1$\\ \hline example over $M_2\oplus M_2$&$72$&$\in[0.0014,0.0058]$&$0.272\ldots$\\ \hline \end{tabular} \end{center} \medskip For $K_4$, the 128 subsets come from the 16 spanning trees, with $2^3$ choices of orientations, each of weight $1/2^3$. As a basic application, we have the following quantum analogue of the Cayley formula \cite{cay}, stating that the complete graph has $N^{N-2}$ spanning trees: \begin{theorem} For the simplex $K_V=(V,J-1)$ on any finite quantum space $V$ we have $$L=N-J\quad,\quad\tau(K_V)=N^{N-2}$$ with $N=|V|$. In particular, $K_V$ is connected. \end{theorem} \begin{proof} We have $d(1)=(N-1)1$, and so the Laplacian is given by: $$L=(N-1)-(J-1)=N-J$$ Since $J$ is $N$ times the orthogonal projection onto $\mathbb C1$, the eigenvalues of $L$ are $0$, with multiplicity 1, and $N$, with multiplicity $N-1$. Thus $\tau(K_V)=N^{N-1}/N=N^{N-2}$. \end{proof} The program {\tt pictures.py} checks this formula, by computing the spectrum of the Laplacian, on several quantum spaces, with the following results: \begin{center} \begin{tabular}{|c|c|c|c|c|c|} \hline $V$&$\mathbb C^3$&$M_2$&$\mathbb C\oplus M_2$&$M_2\oplus M_2$&$M_3$\\ \hline $N$&$3$&$4$&$5$&$8$&$9$\\ \hline $\tau(K_V)$&$3$&$16$&$125$&$262144$&$4782969$\\ \hline \end{tabular} \end{center} \medskip Classically, for $N=4$, the 16 spanning trees of $K_4$ are as in Figure \ref{fig:k4trees}, and the formula $\tau(K_V)=16$ for $V=M_2$ is the quantum analogue of this. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.3pt] (0.00,0.62)--(0.62,0.62); \draw[qblue,line width=1.3pt] (0.00,0.62)--(0.62,0.00); \draw[qblue,line width=1.3pt] (0.00,0.62)--(0.00,0.00); \draw[black!12,line width=0.6pt] (0.62,0.62)--(0.62,0.00); \draw[black!12,line width=0.6pt] (0.62,0.62)--(0.00,0.00); \draw[black!12,line width=0.6pt] (0.62,0.00)--(0.00,0.00); \fill[black!75] (0.00,0.62) circle[radius=1.8pt]; \fill[black!75] (0.62,0.62) circle[radius=1.8pt]; \fill[black!75] (0.62,0.00) circle[radius=1.8pt]; \fill[black!75] (0.00,0.00) circle[radius=1.8pt]; \draw[qblue,line width=1.3pt] (1.05,0.62)--(1.67,0.62); \draw[qblue,line width=1.3pt] (1.05,0.62)--(1.67,0.00); \draw[black!12,line width=0.6pt] (1.05,0.62)--(1.05,0.00); \draw[black!12,line width=0.6pt] (1.67,0.62)--(1.67,0.00); \draw[qblue,line width=1.3pt] (1.67,0.62)--(1.05,0.00); \draw[black!12,line width=0.6pt] (1.67,0.00)--(1.05,0.00); \fill[black!75] (1.05,0.62) circle[radius=1.8pt]; \fill[black!75] (1.67,0.62) circle[radius=1.8pt]; \fill[black!75] (1.67,0.00) circle[radius=1.8pt]; \fill[black!75] (1.05,0.00) circle[radius=1.8pt]; \draw[qblue,line width=1.3pt] (2.10,0.62)--(2.72,0.62); \draw[qblue,line width=1.3pt] (2.10,0.62)--(2.72,0.00); \draw[black!12,line width=0.6pt] (2.10,0.62)--(2.10,0.00); \draw[black!12,line width=0.6pt] (2.72,0.62)--(2.72,0.00); \draw[black!12,line width=0.6pt] (2.72,0.62)--(2.10,0.00); \draw[qblue,line width=1.3pt] (2.72,0.00)--(2.10,0.00); \fill[black!75] (2.10,0.62) circle[radius=1.8pt]; \fill[black!75] (2.72,0.62) circle[radius=1.8pt]; \fill[black!75] (2.72,0.00) circle[radius=1.8pt]; \fill[black!75] (2.10,0.00) circle[radius=1.8pt]; \draw[qblue,line width=1.3pt] (3.15,0.62)--(3.77,0.62); \draw[black!12,line width=0.6pt] (3.15,0.62)--(3.77,0.00); \draw[qblue,line width=1.3pt] (3.15,0.62)--(3.15,0.00); \draw[qblue,line width=1.3pt] (3.77,0.62)--(3.77,0.00); \draw[black!12,line width=0.6pt] (3.77,0.62)--(3.15,0.00); \draw[black!12,line width=0.6pt] (3.77,0.00)--(3.15,0.00); \fill[black!75] (3.15,0.62) circle[radius=1.8pt]; \fill[black!75] (3.77,0.62) circle[radius=1.8pt]; \fill[black!75] (3.77,0.00) circle[radius=1.8pt]; \fill[black!75] (3.15,0.00) circle[radius=1.8pt]; \draw[qblue,line width=1.3pt] (4.20,0.62)--(4.82,0.62); \draw[black!12,line width=0.6pt] (4.20,0.62)--(4.82,0.00); \draw[qblue,line width=1.3pt] (4.20,0.62)--(4.20,0.00); \draw[black!12,line width=0.6pt] (4.82,0.62)--(4.82,0.00); \draw[black!12,line width=0.6pt] (4.82,0.62)--(4.20,0.00); \draw[qblue,line width=1.3pt] (4.82,0.00)--(4.20,0.00); \fill[black!75] (4.20,0.62) circle[radius=1.8pt]; \fill[black!75] (4.82,0.62) circle[radius=1.8pt]; \fill[black!75] (4.82,0.00) circle[radius=1.8pt]; \fill[black!75] (4.20,0.00) circle[radius=1.8pt]; \draw[qblue,line width=1.3pt] (5.25,0.62)--(5.87,0.62); \draw[black!12,line width=0.6pt] (5.25,0.62)--(5.87,0.00); \draw[black!12,line width=0.6pt] (5.25,0.62)--(5.25,0.00); \draw[qblue,line width=1.3pt] (5.87,0.62)--(5.87,0.00); \draw[qblue,line width=1.3pt] (5.87,0.62)--(5.25,0.00); \draw[black!12,line width=0.6pt] (5.87,0.00)--(5.25,0.00); \fill[black!75] (5.25,0.62) circle[radius=1.8pt]; \fill[black!75] (5.87,0.62) circle[radius=1.8pt]; \fill[black!75] (5.87,0.00) circle[radius=1.8pt]; \fill[black!75] (5.25,0.00) circle[radius=1.8pt]; \draw[qblue,line width=1.3pt] (6.30,0.62)--(6.92,0.62); \draw[black!12,line width=0.6pt] (6.30,0.62)--(6.92,0.00); \draw[black!12,line width=0.6pt] (6.30,0.62)--(6.30,0.00); \draw[qblue,line width=1.3pt] (6.92,0.62)--(6.92,0.00); \draw[black!12,line width=0.6pt] (6.92,0.62)--(6.30,0.00); \draw[qblue,line width=1.3pt] (6.92,0.00)--(6.30,0.00); \fill[black!75] (6.30,0.62) circle[radius=1.8pt]; \fill[black!75] (6.92,0.62) circle[radius=1.8pt]; \fill[black!75] (6.92,0.00) circle[radius=1.8pt]; \fill[black!75] (6.30,0.00) circle[radius=1.8pt]; \draw[qblue,line width=1.3pt] (7.35,0.62)--(7.97,0.62); \draw[black!12,line width=0.6pt] (7.35,0.62)--(7.97,0.00); \draw[black!12,line width=0.6pt] (7.35,0.62)--(7.35,0.00); \draw[black!12,line width=0.6pt] (7.97,0.62)--(7.97,0.00); \draw[qblue,line width=1.3pt] (7.97,0.62)--(7.35,0.00); \draw[qblue,line width=1.3pt] (7.97,0.00)--(7.35,0.00); \fill[black!75] (7.35,0.62) circle[radius=1.8pt]; \fill[black!75] (7.97,0.62) circle[radius=1.8pt]; \fill[black!75] (7.97,0.00) circle[radius=1.8pt]; \fill[black!75] (7.35,0.00) circle[radius=1.8pt]; \draw[black!12,line width=0.6pt] (0.00,-0.38)--(0.62,-0.38); \draw[qblue,line width=1.3pt] (0.00,-0.38)--(0.62,-1.00); \draw[qblue,line width=1.3pt] (0.00,-0.38)--(0.00,-1.00); \draw[qblue,line width=1.3pt] (0.62,-0.38)--(0.62,-1.00); \draw[black!12,line width=0.6pt] (0.62,-0.38)--(0.00,-1.00); \draw[black!12,line width=0.6pt] (0.62,-1.00)--(0.00,-1.00); \fill[black!75] (0.00,-0.38) circle[radius=1.8pt]; \fill[black!75] (0.62,-0.38) circle[radius=1.8pt]; \fill[black!75] (0.62,-1.00) circle[radius=1.8pt]; \fill[black!75] (0.00,-1.00) circle[radius=1.8pt]; \draw[black!12,line width=0.6pt] (1.05,-0.38)--(1.67,-0.38); \draw[qblue,line width=1.3pt] (1.05,-0.38)--(1.67,-1.00); \draw[qblue,line width=1.3pt] (1.05,-0.38)--(1.05,-1.00); \draw[black!12,line width=0.6pt] (1.67,-0.38)--(1.67,-1.00); \draw[qblue,line width=1.3pt] (1.67,-0.38)--(1.05,-1.00); \draw[black!12,line width=0.6pt] (1.67,-1.00)--(1.05,-1.00); \fill[black!75] (1.05,-0.38) circle[radius=1.8pt]; \fill[black!75] (1.67,-0.38) circle[radius=1.8pt]; \fill[black!75] (1.67,-1.00) circle[radius=1.8pt]; \fill[black!75] (1.05,-1.00) circle[radius=1.8pt]; \draw[black!12,line width=0.6pt] (2.10,-0.38)--(2.72,-0.38); \draw[qblue,line width=1.3pt] (2.10,-0.38)--(2.72,-1.00); \draw[black!12,line width=0.6pt] (2.10,-0.38)--(2.10,-1.00); \draw[qblue,line width=1.3pt] (2.72,-0.38)--(2.72,-1.00); \draw[qblue,line width=1.3pt] (2.72,-0.38)--(2.10,-1.00); \draw[black!12,line width=0.6pt] (2.72,-1.00)--(2.10,-1.00); \fill[black!75] (2.10,-0.38) circle[radius=1.8pt]; \fill[black!75] (2.72,-0.38) circle[radius=1.8pt]; \fill[black!75] (2.72,-1.00) circle[radius=1.8pt]; \fill[black!75] (2.10,-1.00) circle[radius=1.8pt]; \draw[black!12,line width=0.6pt] (3.15,-0.38)--(3.77,-0.38); \draw[qblue,line width=1.3pt] (3.15,-0.38)--(3.77,-1.00); \draw[black!12,line width=0.6pt] (3.15,-0.38)--(3.15,-1.00); \draw[qblue,line width=1.3pt] (3.77,-0.38)--(3.77,-1.00); \draw[black!12,line width=0.6pt] (3.77,-0.38)--(3.15,-1.00); \draw[qblue,line width=1.3pt] (3.77,-1.00)--(3.15,-1.00); \fill[black!75] (3.15,-0.38) circle[radius=1.8pt]; \fill[black!75] (3.77,-0.38) circle[radius=1.8pt]; \fill[black!75] (3.77,-1.00) circle[radius=1.8pt]; \fill[black!75] (3.15,-1.00) circle[radius=1.8pt]; \draw[black!12,line width=0.6pt] (4.20,-0.38)--(4.82,-0.38); \draw[qblue,line width=1.3pt] (4.20,-0.38)--(4.82,-1.00); \draw[black!12,line width=0.6pt] (4.20,-0.38)--(4.20,-1.00); \draw[black!12,line width=0.6pt] (4.82,-0.38)--(4.82,-1.00); \draw[qblue,line width=1.3pt] (4.82,-0.38)--(4.20,-1.00); \draw[qblue,line width=1.3pt] (4.82,-1.00)--(4.20,-1.00); \fill[black!75] (4.20,-0.38) circle[radius=1.8pt]; \fill[black!75] (4.82,-0.38) circle[radius=1.8pt]; \fill[black!75] (4.82,-1.00) circle[radius=1.8pt]; \fill[black!75] (4.20,-1.00) circle[radius=1.8pt]; \draw[black!12,line width=0.6pt] (5.25,-0.38)--(5.87,-0.38); \draw[black!12,line width=0.6pt] (5.25,-0.38)--(5.87,-1.00); \draw[qblue,line width=1.3pt] (5.25,-0.38)--(5.25,-1.00); \draw[qblue,line width=1.3pt] (5.87,-0.38)--(5.87,-1.00); \draw[qblue,line width=1.3pt] (5.87,-0.38)--(5.25,-1.00); \draw[black!12,line width=0.6pt] (5.87,-1.00)--(5.25,-1.00); \fill[black!75] (5.25,-0.38) circle[radius=1.8pt]; \fill[black!75] (5.87,-0.38) circle[radius=1.8pt]; \fill[black!75] (5.87,-1.00) circle[radius=1.8pt]; \fill[black!75] (5.25,-1.00) circle[radius=1.8pt]; \draw[black!12,line width=0.6pt] (6.30,-0.38)--(6.92,-0.38); \draw[black!12,line width=0.6pt] (6.30,-0.38)--(6.92,-1.00); \draw[qblue,line width=1.3pt] (6.30,-0.38)--(6.30,-1.00); \draw[qblue,line width=1.3pt] (6.92,-0.38)--(6.92,-1.00); \draw[black!12,line width=0.6pt] (6.92,-0.38)--(6.30,-1.00); \draw[qblue,line width=1.3pt] (6.92,-1.00)--(6.30,-1.00); \fill[black!75] (6.30,-0.38) circle[radius=1.8pt]; \fill[black!75] (6.92,-0.38) circle[radius=1.8pt]; \fill[black!75] (6.92,-1.00) circle[radius=1.8pt]; \fill[black!75] (6.30,-1.00) circle[radius=1.8pt]; \draw[black!12,line width=0.6pt] (7.35,-0.38)--(7.97,-0.38); \draw[black!12,line width=0.6pt] (7.35,-0.38)--(7.97,-1.00); \draw[qblue,line width=1.3pt] (7.35,-0.38)--(7.35,-1.00); \draw[black!12,line width=0.6pt] (7.97,-0.38)--(7.97,-1.00); \draw[qblue,line width=1.3pt] (7.97,-0.38)--(7.35,-1.00); \draw[qblue,line width=1.3pt] (7.97,-1.00)--(7.35,-1.00); \fill[black!75] (7.35,-0.38) circle[radius=1.8pt]; \fill[black!75] (7.97,-0.38) circle[radius=1.8pt]; \fill[black!75] (7.97,-1.00) circle[radius=1.8pt]; \fill[black!75] (7.35,-1.00) circle[radius=1.8pt]; \end{tikzpicture} \caption{The $16=4^2$ spanning trees of $K_4$, as enumerated by {\tt pictures.py}, in agreement with the Cayley formula. In Theorem \ref{thm:matrixtree}, each of them gives $2^3$ subsets $S$, one for each choice of orientations, of weight $1/8$ each.}\label{fig:k4trees} \end{figure} Let us point out that, exactly as in the classical case, this proof is a one-liner once the Kirchhoff theorem is available, the long proofs of the Cayley formula being those which avoid the Kirchhoff theorem, such as the Pr\"ufer codes. In the quantum case, the content of the above result is that, by Theorem \ref{thm:matrixtree}, the quantum spanning trees of $K_V$ have total weight $N^{N-2}$, for any finite quantum space $V$, and it would be interesting to have a direct combinatorial understanding of this fact. \medskip\noindent\textbf{Cheeger inequality.} Next, we have the Cheeger inequality, in the graph setting of Alon and Milman \cite{ami}. For a projection $p\in C(V)$, define its cut, and the Cheeger constant of $X$, by: $$cut(p)=\quad,\quad h(X)=\inf_{\psi(p)\leq N/2}\frac{cut(p)}{\psi(p)}$$ Here the infimum is over the nonzero projections $p\in C(V)$ with $\psi(p)\leq N/2$. We have: \begin{theorem} For a positively weighted undirected quantum graph, $cut(p)=$ for any projection $p$, and the second eigenvalue of the Laplacian satisfies $\lambda_2\leq2h(X)$. \end{theorem} \begin{proof} By traciality of $\psi$, we have the following computation: $$=\psi(d(1)p)-==cut(p)$$ Now with $x=p-\frac{\psi(p)}{N}1$ we have $x\perp1$, as well as the following formulas: $$=cut(p)\quad,\quad||x||^2=\psi(p)\left(1-\frac{\psi(p)}{N}\right)\geq\frac{\psi(p)}{2}$$ Thus the Rayleigh principle gives the result. \end{proof} As an illustration, for 2 triangles joined by an edge, the projection $p$ onto one of the triangles has $cut(p)=1$ and $\psi(p)=3$, and this gives $h(X)=1/3$, while $\lambda_2=(5-\sqrt{17})/2\simeq0.438$, as computed by {\tt pictures.py}, see Figure \ref{fig:cheeger}. This is the easy half of the Cheeger inequality, and as in the classical case, its proof is just a Rayleigh quotient computation. The other half, which is the hard one, classically uses the level sets of an eigenvector. In the quantum case we can still proceed in this way, by diagonalizing the eigenvector, and we obtain: \begin{theorem}\label{thm:cheeger} For a positively weighted undirected quantum graph $X=(V,d)$, with $N\geq2$, we have $$h(X)\leq\sqrt{2||d(1)||\lambda_2}$$ and so $\lambda_2/2\leq h(X)\leq\sqrt{2||d(1)||\lambda_2}$, exactly as in the classical case. \end{theorem} \begin{proof} Since $L$ commutes with the involution, we can choose a self-adjoint eigenvector $f\perp1$ for $\lambda_2$. Diagonalize $f$ in each block, let $e_i$ be the resulting minimal projections, summing up to $1$, and set $m_i=\psi(e_i)$ and $a_{ij}=\psi(e_id(e_j))\geq0$, which is symmetric in $i,j$. On the diagonal algebra $D=span(e_i)$, which contains $f$, we have: $$=\frac{1}{2}\sum_{ij}a_{ij}|x_i-x_j|^2\quad,\quad||x||^2=\sum_im_i|x_i|^2$$ Thus $L$ compresses on $D$ to the Laplacian of the classical graph with vertex weights $m_i$ and edge weights $a_{ij}$, whose second eigenvalue is $\lambda_2$, by the variational principle, and because $f\in D$. The rates of this graph are $\sum_ja_{ij}/m_i=\psi(e_id(1))/\psi(e_i)\leq||d(1)||$, so the classical weighted Cheeger inequality gives $h_D\leq\sqrt{2||d(1)||\lambda_2}$, and since the cuts of this graph are cuts of projections $p=\sum_{i\in S}e_i$, we have $h(X)\leq h_D$. \end{proof} The program {\tt laplacian.py} checks the ingredients of this proof, on random positively weighted undirected quantum graphs, namely the formula for the compression of $L$ to $D$, the equality of the second eigenvalues, and the inequalities $\lambda_2/2\leq h_D\leq\sqrt{2||d(1)||\lambda_2}$, with $h_D$ computed by brute force over the subsets $S$. For related inequalities for quantum channels, see Temme et al. \cite{tkr}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[qgold!15,rounded corners=8pt] (-0.45,-0.85) rectangle (1.55,0.85); \coordinate (a) at (0,0.55); \coordinate (b) at (0,-0.55); \coordinate (c) at (1.1,0); \coordinate (d) at (2.6,0); \coordinate (e) at (3.7,0.55); \coordinate (f) at (3.7,-0.55); \draw[qblue,line width=1.1pt] (a)--(b)--(c)--cycle (d)--(e)--(f)--cycle; \draw[magenta,line width=1.6pt] (c)--(d) node[midway,above] {$cut(p)=1$}; \foreach \p in {a,b,c,d,e,f}{\fill[black!75] (\p) circle[radius=2.3pt];} \node[text=qgold!80!black] at (0.55,-1.1) {$p$, with $\psi(p)=3$}; \end{tikzpicture} \caption{The Cheeger constant of $2$ triangles joined by an edge is $h=1/3$, and the spectral gap $\lambda_2\simeq0.438$ satisfies $\lambda_2\leq2h$.}\label{fig:cheeger} \end{figure} Other questions concern the interlacing results, the Hoffman bound, to be discussed in section 9, and the Alon-Boppana bound for the regular quantum graphs. \section{Colorings, independence} Classically, a set of vertices $S$ is independent when $d_{ij}=0$ for $i,j\in S$, and a coloring is a partition into independent sets. In the quantum case, we use projections: \begin{definition} A projection $p\in C(V)$ is called independent in $X=(V,d)$ when the compression of $d$ to the corner $pC(V)p$ vanishes, $p\,d(pxp)\,p=0$ for any $x$. A coloring of $X$ is a family of independent projections $p_1,\ldots,p_c$ with $\sum_ip_i=1$, and the chromatic number $\chi(X)$ is the smallest $c$ for which a coloring exists, or $\infty$. \end{definition} In the classical case, the projections are the indicator functions of subsets, and we recover the usual notions. We also define the independence number $\alpha(X)$ as the maximum of $\psi(p)$, over the independent projections. In the quantum case, a new phenomenon appears: \begin{theorem}\label{thm:simplexindep} A nonzero projection $p\in C(V)$ is independent in the simplex $X=(V,J-1)$ precisely when $p$ is a minimal projection of a block of size $1$. Thus the simplex can be colored precisely when $V$ is classical, and in this case $\chi(X)=N$. \end{theorem} \begin{proof} We have the following formula, for any $x\in C(V)$: $$p(J-1)(pxp)p=\psi(pxp)p-pxp$$ If this vanishes for any $x$, then $pC(V)p=\mathbb Cp$, so $p$ is minimal, of rank 1 in a block of size $n$, and then $\psi(p)=n$ forces $n=1$. The converse is clear, and the coloring statement follows. \end{proof} Thus the colorings of the simplex behave quite differently in the quantum case, as illustrated in Figure \ref{fig:chiclass}, the reason being that the quantum points of the blocks of size $n\geq2$ are not independent. In the framework of the quantum adjacency matrices, this obstruction for the complete quantum graphs is due to Brannan, Ganesan and Harris \cite{bgh}, our colorings being the classical, or local, ones in their quantum-to-classical coloring game. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[black!40,line width=1.0pt] (0.00,1.10)--(1.10,1.10); \draw[black!40,line width=1.0pt] (0.00,1.10)--(1.10,0.00); \draw[black!40,line width=1.0pt] (0.00,1.10)--(0.00,0.00); \draw[black!40,line width=1.0pt] (1.10,1.10)--(1.10,0.00); \draw[black!40,line width=1.0pt] (1.10,1.10)--(0.00,0.00); \draw[black!40,line width=1.0pt] (1.10,0.00)--(0.00,0.00); \fill[qblue] (0.00,1.10) circle[radius=3.2pt]; \fill[qgold] (1.10,1.10) circle[radius=3.2pt]; \fill[magenta] (1.10,0.00) circle[radius=3.2pt]; \fill[black!80] (0.00,0.00) circle[radius=3.2pt]; \node at (0.55,-0.5) {$K_4$, $\chi=4$}; \draw[black!40,line width=1.0pt] (3.00,1.10)--(4.10,1.10); \draw[black!40,line width=1.0pt] (4.10,1.10)--(4.10,0.00); \draw[black!40,line width=1.0pt] (4.10,0.00)--(3.00,0.00); \draw[black!40,line width=1.0pt] (3.00,0.00)--(3.00,1.10); \fill[qblue] (3.00,1.10) circle[radius=3.2pt]; \fill[qgold] (4.10,1.10) circle[radius=3.2pt]; \fill[qblue] (4.10,0.00) circle[radius=3.2pt]; \fill[qgold] (3.00,0.00) circle[radius=3.2pt]; \node at (3.55,-0.5) {$C_4$, $\chi=2$}; \end{tikzpicture} \caption{Classically, the simplex $K_N$ needs $N$ colors, one for each vertex, while the square needs only $2$. Over $M_2$, the simplex cannot be colored at all, while the quantum square still has $\chi=2$.}\label{fig:chiclass} \end{figure} The computation shows more: for a rank one projection $p\in M_n(\mathbb C)\subset C(V)$ we have $p(J-1)(p)p=(n-1)p$. That is, inside the simplex, a quantum point of a block of size $n$ behaves like a clique with $n$ vertices. This is in agreement with $\psi(p)=n$, and with the picture of $V$ from section 1, where the block $M_n$ has $n^2$ points, that is, $n$ quantum points of size $n$. \medskip\noindent\textbf{Sizes of projections.} An alternative definition of the size of a projection $p$ would be the dimension of the corner $pC(V)p$, instead of $\psi(p)$. For a projection of rank $r$ in a block of size $n$, these are $r^2$ and $nr$, so in general $\psi(p)-\dim(pC(V)p)=\sum r(n-r)$, the sum being over the blocks. Thus the 2 sizes agree precisely when $p$ is central, and they agree for all projections precisely when $V$ is classical, as checked by {\tt colorings.py}. The Hoffman bounds suggest that $\psi(p)$ is the right one. The quantum Lov\'asz number of Duan, Severini and Winter \cite{dsw}, extending the Lov\'asz number \cite{lov}, uses a different framework, the operator systems, further developed by Stahlke \cite{sta}, and the relation with the present setting is to be clarified. Observe that, by section 5, a positively weighted quantum graph satisfies $\chi(X)\leq2$ precisely when it is bipartite, and that for the connected undirected ones, this happens precisely when the spectrum is symmetric. More generally, the spectrum gives lower bounds for $\chi(X)$, and upper bounds for $\alpha(X)$, as in the classical theory of Hoffman \cite{hof}. The classical proofs are based on interlacing, see Haemers \cite{hae}, and they extend to the quantum case, as follows: \begin{theorem}\label{thm:hoffman} Let $X=(V,d)$ be positively weighted, undirected, and regular of valence $k>0$, with smallest eigenvalue $\lambda_{min}<0$. Then we have the following estimates: $$\chi(X)\geq1-\frac{k}{\lambda_{min}}\quad,\quad\alpha(X)\leq\frac{-N\lambda_{min}}{k-\lambda_{min}}$$ In addition, both estimates only use the fact that $p\,d(p)\,p=0$, for the projections involved. \end{theorem} \begin{proof} For the first estimate, let $p_1,\ldots,p_c$ be a coloring. The elements $w_i=p_i/\sqrt{\psi(p_i)}$ are orthonormal in $L^2(V)$, because $=\psi(p_jp_i)$, so we have an isometry $S:\mathbb C^c\to L^2(V)$ given by $S(e_i)=w_i$, and we can consider the following $c\times c$ matrix: $$C=S^*dS$$ By independence and traciality we have $C_{ii}=\psi(p_id(p_i))/\psi(p_i)=\psi(p_id(p_i)p_i)/\psi(p_i)=0$, so $Tr(C)=0$. Also, with $v=(\sqrt{\psi(p_i)})_i$ we have $Sv=\sum_ip_i=1$ and $S^*1=v$, so $Cv=S^*d(1)=kv$, and $k$ is an eigenvalue of $C$. Since $C$ is a compression of $d$, its eigenvalues are at least $\lambda_{min}$, and so: $$0=Tr(C)\geq k+(c-1)\lambda_{min}$$ Thus $c\geq1-k/\lambda_{min}$, as claimed. For the second estimate, let $p$ be independent, with $s=\psi(p)$, and consider the element $x=p-\frac{s}{N}1$. By using $=\psi(pd(p)p)=0$, and $==ks$, we obtain: $$=0-\frac{2ks^2}{N}+\frac{ks^2}{N}=-\frac{ks^2}{N}$$ On the other hand, we have $||x||^2=s(1-s/N)$, and so $-ks^2/N\geq\lambda_{min}s(1-s/N)$. Thus $s(k-\lambda_{min})\leq-N\lambda_{min}$, which gives the second estimate. \end{proof} As an illustration, for the square and its 2-coloring, the matrix $C$ from the above proof is as in Figure \ref{fig:interlacing}, with $Tr(C)=0$ and with eigenvalues $2,-2$, which forces $c\geq1-2/(-2)=2$. As for the independence bound, this gives $\alpha\leq-4\cdot(-2)/(2+2)=2$, and both bounds are attained, the optimal coloring and the maximal independent sets being given by the bipartition. In the regular case we have $\lambda_{max}=k$, by Theorem \ref{thm:spectralbounds}, so these are exactly the classical Hoffman bounds. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \node[left] at (0.2,-0.00) {$d$, square}; \draw[black!50] (0.5,-0.00)--(5.7,-0.00); \fill[qblue] (0.90,-0.00) circle[radius=3.0pt]; \fill[qblue] (3.10,-0.00) circle[radius=3.6pt]; \node[above,font=\tiny] at (3.10,0.05) {$2$}; \fill[qblue] (5.30,-0.00) circle[radius=3.0pt]; \node[left] at (0.2,-0.70) {$C=S^*dS$}; \draw[black!50] (0.5,-0.70)--(5.7,-0.70); \fill[magenta] (0.90,-0.70) circle[radius=3.0pt]; \fill[magenta] (5.30,-0.70) circle[radius=3.0pt]; \node[below,font=\scriptsize] at (0.90,-0.8) {$-2$}; \node[below,font=\scriptsize] at (2.00,-0.8) {$-1$}; \node[below,font=\scriptsize] at (3.10,-0.8) {$0$}; \node[below,font=\scriptsize] at (4.20,-0.8) {$1$}; \node[below,font=\scriptsize] at (5.30,-0.8) {$2$}; \draw[->,black!40] (0.9,-0.15)--(0.9,-0.55); \end{tikzpicture} \caption{The spectrum of the square, and that of the $2\times2$ matrix $C$ from the proof of Theorem \ref{thm:hoffman}, for the coloring $\{1,3\},\{2,4\}$, which has rows $(0,2)$ and $(2,0)$, as computed by {\tt pictures.py}. The eigenvalues of $C$ interlace those of $d$.}\label{fig:interlacing} \end{figure} Here are these bounds for some of our regular quantum graphs, along with the true values of $\chi$ and $\alpha$, when known, as computed by {\tt pictures.py}. The columns $\chi\geq$ and $\alpha\leq$ give the Hoffman bounds $1-k/\lambda_{min}$ and $-N\lambda_{min}/(k-\lambda_{min})$, and the bounds are sharp in the first 3 cases: \begin{center} \begin{tabular}{|l|c|c|c|c|c|c|} \hline quantum graph&$k$&$\lambda_{min}$&$\chi\geq$&$\alpha\leq$&$\chi$&$\alpha$\\ \hline quantum square&$2$&$-2$&$2$&$2$&$2$&$2$\\ \hline $J-3E$ over $M_3$&$6$&$-3$&$3$&$3$&$3$&$3$\\ \hline quantum torus over $M_3$&$4$&$-2$&$3$&$3$&$3$&$3$\\ \hline simplex over $M_2$&$3$&$-1$&$4$&$1$&$\infty$&$0$\\ \hline simplex over $M_3$&$8$&$-1$&$9$&$1$&$\infty$&$0$\\ \hline \end{tabular} \end{center} \medskip For the simplices over $M_n$, Theorem \ref{thm:simplexindep} shows that there are no nonzero independent projections, so $\chi=\infty$ and $\alpha=0$, and the Hoffman bounds are far from optimal. For the quantum torus, which has the same bounds as the rook's graph, we have $\chi=\alpha=3$ too. Indeed, $U$ and $\Lambda$ commute with $W=U\Lambda$ up to nontrivial cube roots of unity, so they permute cyclically the 3 eigenspaces of $W$, and the corresponding rank one projections $p_j$ satisfy $p_jU^{\pm1}p_j=p_j\Lambda^{\pm1}p_j=0$. Thus the $p_j$ are independent, with $\psi(p_j)=3$, and they form a coloring, as checked by {\tt colorings.py}, and as pictured in Figure \ref{fig:toruscoloring}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small,>={Stealth[length=1.8mm]}] \node[circle,draw=black!60,fill=qblue!12,inner sep=1pt,minimum size=7mm] (p1) at (0.00,1.25) {$p_1$}; \node[circle,draw=black!60,fill=qblue!12,inner sep=1pt,minimum size=7mm] (p2) at (-1.08,-0.63) {$p_2$}; \node[circle,draw=black!60,fill=qblue!12,inner sep=1pt,minimum size=7mm] (p3) at (1.08,-0.63) {$p_3$}; \draw[->,qgold,line width=1.1pt] (p1) to[bend right=35] node[midway,font=\scriptsize,text=qgold!80!black,auto=right] {$U$} (p2); \draw[->,magenta,line width=1.1pt] (p2) to[bend right=10] node[midway,font=\scriptsize,text=magenta,auto=right,inner sep=1pt] {$\Lambda$} (p1); \draw[->,qgold,line width=1.1pt] (p2) to[bend right=35] node[midway,font=\scriptsize,text=qgold!80!black,auto=right] {$U$} (p3); \draw[->,magenta,line width=1.1pt] (p3) to[bend right=10] node[midway,font=\scriptsize,text=magenta,auto=right,inner sep=1pt] {$\Lambda$} (p2); \draw[->,qgold,line width=1.1pt] (p3) to[bend right=35] node[midway,font=\scriptsize,text=qgold!80!black,auto=right] {$U$} (p1); \draw[->,magenta,line width=1.1pt] (p1) to[bend right=10] node[midway,font=\scriptsize,text=magenta,auto=right,inner sep=1pt] {$\Lambda$} (p3); \end{tikzpicture} \caption{The $3$ eigenspaces of $W=U\Lambda$ over $M_3$, which are permuted cyclically by $U$, in gold, and by $\Lambda$, in magenta, in opposite directions. The corresponding projections $p_1,p_2,p_3$ color the quantum torus, so $\chi=\alpha=3$, as checked by {\tt pictures.py}.}\label{fig:toruscoloring} \end{figure} \medskip\noindent\textbf{Examples.} For the quantum square we have $k=2$ and $\lambda_{min}=-2$, so $\chi\geq2$ and $\alpha\leq2$, and both are equalities, with the coloring given by the quantum points $(1\pm\sigma_y)/2$, from section 5. For the simplex over $V$, the bounds are $\chi\geq N$ and $\alpha\leq1$, in agreement with Theorem \ref{thm:simplexindep}. As a more interesting example, consider the Weyl-Cayley graph over $M_n$ from section 4 with $S=\{g\in\mathbb Z_n^2|g_1\neq0\}$. By the twirling formula, this is given by $$d=J-nE$$ with $E$ being the conditional expectation onto the diagonal matrices, because $\sum_b\Lambda^bx\Lambda^{-b}=nE(x)$. This quantum graph has the spectrum of the complete multipartite graph with $n$ parts of size $n$, and we have: \begin{proposition} The above Weyl-Cayley graph over $M_n$ has $\chi=n$ and $\alpha=n$, with both Hoffman bounds being equalities, the optimal coloring being given by the diagonal matrix units $e_{aa}$. \end{proposition} \begin{proof} The eigenvalues of $d=J-nE$ are $n(n-1)$ on $1$, $-n$ on the traceless diagonal matrices, and $0$ on the off-diagonal ones, so $k=n(n-1)$, $\lambda_{min}=-n$, and the Hoffman bounds are $\chi\geq n$ and $\alpha\leq n$. On the other hand, we have $e_{aa}U_ge_{aa}=0$ for $g_1\neq0$, so the projections $e_{aa}$ are independent, with $\psi(e_{aa})=n$, and they form a coloring. \end{proof} For $n=3$, the optimal coloring is pictured in Figure \ref{fig:coloring}. Classically, the twin graph, the complete multipartite graph with $n$ parts of size $n$, has $\chi=n$ and $\alpha=n$ too, the color classes being the parts, so the quantum graph $J-nE$ behaves exactly as its classical twin, at the level of colorings. The program {\tt colorings.py} checks Theorem \ref{thm:hoffman}, by computing the matrix $C$ from the proof, for the quantum square, for the complete bipartite quantum graphs $K_{V,V}$ from section 7, for random regular bipartite quantum graphs over $M_4$, for the above Weyl-Cayley graphs over $M_3,M_4$, and for the simplex, as well as the coloring of the quantum torus over $M_3$ by the spectral projections of $U\Lambda$. Classically, the chromatic bound holds without regularity, with $k$ replaced by $\lambda_{max}$, the proof using the Perron-Frobenius eigenvector $h$ instead of $1$, and its restrictions to the color classes. \begin{figure}[H] \centering \begin{tikzpicture}[x=8mm,y=8mm,font=\small] \foreach \a/\c in {1/qblue,2/qgold,3/magenta}{ \fill[\c!12,rounded corners=5pt] (0.55,-\a-0.4) rectangle (3.45,-\a+0.4); \foreach \b in {1,2,3}{\ifnum\a=\b \fill[\c] (\b,-\a) circle[radius=3.4pt]; \else \draw[\c,fill=white,line width=1pt] (\b,-\a) circle[radius=3.2pt]; \fi} \node[right,text=\c] at (3.6,-\a) {$e_{\a\a}M_3(\mathbb C)$, of size $\psi(e_{\a\a})=3$};} \node at (2,-4.1) {$M_3$}; \end{tikzpicture} \caption{The optimal coloring of the quantum graph $J-3E$ over $M_3$, by the $3$ independent projections $e_{11},e_{22},e_{33}$, pictured via the rows $e_{aa}M_3(\mathbb C)$ of the picture of $M_3$. Each color class is a quantum point of size $3$, and $\chi=\alpha=3$.}\label{fig:coloring} \end{figure} In the quantum case, the corresponding elements $p_ihp_i$ do not sum up to $h$, unless $h$ commutes with the $p_i$. However, the chromatic bound still holds, via a different argument, using pinching. This is due to Ganesan \cite{gan}, in the framework of the quantum adjacency matrices, and even for the quantum chromatic number, and in our setting, the statement and proof are as follows: \begin{theorem}\label{thm:hoffman2} For a positively weighted undirected quantum graph $X=(V,d)$, with $d\neq0$, having a coloring with $c$ colors, we have $\lambda_{min}<0$, and the Hoffman bound $$\chi(X)\geq1-\frac{\lambda_{max}}{\lambda_{min}}$$ holds, without regularity assumption. \end{theorem} \begin{proof} Let $p_1,\ldots,p_c$ be a coloring, and $Q_j$ be the left multiplication by $p_j$ on $L^2(V)$, which is an orthogonal projection. As in the proof of Proposition \ref{prop:bipsym}, independence gives $p_jK_kp_j=0$ for the Kraus operators, so $Q_jdQ_j=0$. With $U=\sum_je^{2\pi ij/c}Q_j$, which is unitary, we obtain: $$\sum_{m=0}^{c-1}U^mdU^{-m}=c\sum_jQ_jdQ_j=0$$ By evaluating on a top eigenvector of $d$, this gives $\lambda_{max}\leq-(c-1)\lambda_{min}$, so $d\neq0$ forces $\lambda_{min}<0$, and we obtain $c\geq1-\lambda_{max}/\lambda_{min}$, as claimed. \end{proof} The program {\tt colorings.py} checks this on random non-regular graphs over $M_3,M_4,M_5$, having prescribed colorings by projections of various ranks, by verifying the pinching identity, and the bound. In the regular case, this is the first bound in Theorem \ref{thm:hoffman}, while the independence bound there uses the regularity, via the element $p-\frac{s}{N}1$. Regarding the upper bounds for $\chi(X)$, such as the Wilf bound $\chi\leq1+\lambda_{max}$, or the Brooks theorem, these are classically proved via greedy colorings, which use the vertices one by one, and their quantum versions would require some new ideas. \section{Planarity and embeddings} Classically, there are several approaches to planarity: the Kuratowski theorem \cite{kur}, via subdivisions, and its version by Wagner \cite{wag}, via minors, the Euler formula $V-E+F=2$, via embeddings, and the Colin de Verdi\`ere invariant $\mu(X)$ \cite{cdv}, via matrices. Recall also that, by the Euler formula, a planar graph with $N\geq3$ vertices has $E\leq3N-6$ edges, so the complete graph $K_N$ can be planar only for $N\leq4$. In the quantum case, let us first look at the simplest quantum space, namely $V=M_2$, where all the quantum graphs can be listed, and turn out to be quantum analogues of planar graphs: \begin{theorem}\label{thm:m2graphs} The simple, undirected, positively weighted quantum graphs without loops over $V=M_2$ are, up to isomorphism, the following ones: \begin{enumerate} \item The empty graph, with quantum automorphism group $SO_3$. \item $d=Ad_{\sigma_x}$, with the spectrum of $2K_2$, and quantum automorphism group $O_2$. \item $d=Ad_{\sigma_x}+Ad_{\sigma_z}$, the quantum square, with the spectrum of $C_4$, and group $O_2$. \item $d=Ad_{\sigma_x}+Ad_{\sigma_y}+Ad_{\sigma_z}=J-1$, the simplex, with the spectrum of $K_4$, and group $SO_3$. \end{enumerate} \end{theorem} \begin{proof} By Proposition \ref{prop:mnsimple}, these quantum graphs correspond to the subspaces $\mathcal S$ of the space of traceless self-adjoint matrices, which is $\mathbb R^3$, with basis $\sigma_x,\sigma_y,\sigma_z$. The automorphisms $Ad_W$ of $M_2(\mathbb C)$ act on $\mathbb R^3$ via $PU_2=SO_3$, which is transitive on the subspaces of given dimension, and this gives the list. The Pauli matrices are eigenvectors of each $Ad_{\sigma_i}$, with eigenvalue $1$ for $\sigma_i$, and $-1$ for the other 2, which gives the spectra. Finally, since $S_{M_2}^+=SO_3$ is classical, $G^+(X)$ consists of the rotations commuting with $d$, which are those stabilizing $\mathcal S$, and the stabilizer of a line, or of a plane, is $O_2$. \end{proof} In pictures, the 4 quantum graphs over $M_2$, and their classical twins, having the same spectra, the same numbers of edges, and the same values of $\beta_1$, are as in Figure \ref{fig:m2graphs}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[black!75] (0.00,4.20) circle[radius=2.2pt]; \fill[black!75] (1.30,4.20) circle[radius=2.2pt]; \fill[black!75] (0.00,2.90) circle[radius=2.2pt]; \fill[black!75] (1.30,2.90) circle[radius=2.2pt]; \node at (0.65,2.45) {$\emptyset$}; \fill[black!75] (0.00,1.30) circle[radius=2.2pt]; \fill[black!75] (1.30,1.30) circle[radius=2.2pt]; \fill[black!75] (0.00,0.00) circle[radius=2.2pt]; \fill[black!75] (1.30,0.00) circle[radius=2.2pt]; \node at (0.65,-1.05) {empty}; \draw[qblue,line width=1pt] (3.30,4.20)--(4.60,2.90); \draw[qblue,line width=1pt] (4.60,4.20)--(3.30,2.90); \fill[black!75] (3.30,4.20) circle[radius=2.2pt]; \fill[black!75] (4.60,4.20) circle[radius=2.2pt]; \fill[black!75] (3.30,2.90) circle[radius=2.2pt]; \fill[black!75] (4.60,2.90) circle[radius=2.2pt]; \node at (3.95,2.45) {$2K_2$}; \draw[magenta,line width=1pt] (3.30,1.30)--(4.60,0.00); \draw[magenta,line width=1pt] (4.60,1.30)--(3.30,0.00); \fill[black!75] (3.30,1.30) circle[radius=2.2pt]; \fill[black!75] (4.60,1.30) circle[radius=2.2pt]; \fill[black!75] (3.30,0.00) circle[radius=2.2pt]; \fill[black!75] (4.60,0.00) circle[radius=2.2pt]; \node at (3.95,-1.05) {$Ad_{\sigma_x}$}; \draw[qblue,line width=1pt] (6.60,4.20)--(7.90,4.20); \draw[qblue,line width=1pt] (7.90,4.20)--(7.90,2.90); \draw[qblue,line width=1pt] (7.90,2.90)--(6.60,2.90); \draw[qblue,line width=1pt] (6.60,2.90)--(6.60,4.20); \fill[black!75] (6.60,4.20) circle[radius=2.2pt]; \fill[black!75] (7.90,4.20) circle[radius=2.2pt]; \fill[black!75] (6.60,2.90) circle[radius=2.2pt]; \fill[black!75] (7.90,2.90) circle[radius=2.2pt]; \node at (7.25,2.45) {$C_4$}; \draw[magenta,line width=1pt] (6.60,1.30)--(7.90,0.00); \draw[magenta,line width=1pt] (7.90,1.30)--(6.60,0.00); \draw[qgold,line width=.8pt] (6.60,1.30) .. controls +(60:0.6) and +(120:0.6) .. (6.60,1.30); \node[font=\scriptsize,text=qgold!80!black] at (6.60,1.96) {$1$}; \draw[qgold,line width=.8pt] (7.90,1.30) .. controls +(60:0.6) and +(120:0.6) .. (7.90,1.30); \node[font=\scriptsize,text=qgold!80!black] at (7.90,1.96) {$-1$}; \draw[qgold,line width=.8pt] (6.60,0.00) .. controls +(240:0.6) and +(300:0.6) .. (6.60,0.00); \node[font=\scriptsize,text=qgold!80!black] at (6.60,-0.66) {$-1$}; \draw[qgold,line width=.8pt] (7.90,0.00) .. controls +(240:0.6) and +(300:0.6) .. (7.90,0.00); \node[font=\scriptsize,text=qgold!80!black] at (7.90,-0.66) {$1$}; \fill[black!75] (6.60,1.30) circle[radius=2.2pt]; \fill[black!75] (7.90,1.30) circle[radius=2.2pt]; \fill[black!75] (6.60,0.00) circle[radius=2.2pt]; \fill[black!75] (7.90,0.00) circle[radius=2.2pt]; \node at (7.25,-1.05) {quantum square}; \draw[qblue,line width=1pt] (9.90,4.20)--(11.20,4.20); \draw[qblue,line width=1pt] (11.20,4.20)--(11.20,2.90); \draw[qblue,line width=1pt] (11.20,2.90)--(9.90,2.90); \draw[qblue,line width=1pt] (9.90,2.90)--(9.90,4.20); \draw[qblue,line width=1pt] (9.90,4.20)--(11.20,2.90); \draw[qblue,line width=1pt] (11.20,4.20)--(9.90,2.90); \fill[black!75] (9.90,4.20) circle[radius=2.2pt]; \fill[black!75] (11.20,4.20) circle[radius=2.2pt]; \fill[black!75] (9.90,2.90) circle[radius=2.2pt]; \fill[black!75] (11.20,2.90) circle[radius=2.2pt]; \node at (10.55,2.45) {$K_4$}; \draw[magenta,line width=1pt] (9.90,1.30)--(11.20,0.00); \node[font=\scriptsize,above] at (10.55,0.73) {$2$}; \draw[qgold,line width=.8pt] (9.90,1.30) .. controls +(60:0.6) and +(120:0.6) .. (9.90,1.30); \node[font=\scriptsize,text=qgold!80!black] at (9.90,1.96) {$1$}; \draw[qgold,line width=.8pt] (11.20,1.30) .. controls +(60:0.6) and +(120:0.6) .. (11.20,1.30); \node[font=\scriptsize,text=qgold!80!black] at (11.20,1.96) {$-1$}; \draw[qgold,line width=.8pt] (9.90,0.00) .. controls +(240:0.6) and +(300:0.6) .. (9.90,0.00); \node[font=\scriptsize,text=qgold!80!black] at (9.90,-0.66) {$-1$}; \draw[qgold,line width=.8pt] (11.20,0.00) .. controls +(240:0.6) and +(300:0.6) .. (11.20,0.00); \node[font=\scriptsize,text=qgold!80!black] at (11.20,-0.66) {$1$}; \fill[black!75] (9.90,1.30) circle[radius=2.2pt]; \fill[black!75] (11.20,1.30) circle[radius=2.2pt]; \fill[black!75] (9.90,0.00) circle[radius=2.2pt]; \fill[black!75] (11.20,0.00) circle[radius=2.2pt]; \node at (10.55,-1.05) {simplex}; \end{tikzpicture} \caption{The simple quantum graphs without loops over $M_2$, in the multimatrix basis, with edge weights $1$ unless indicated, and above them their classical twins with $4$ vertices. These have $E=0,2,4,6$, and the quantum ones are the subspaces $\mathcal S\subset\mathbb R^3$ of dimension $0,1,2,3$.}\label{fig:m2graphs} \end{figure} Up to rotation, there is one subspace $\mathcal S\subset\mathbb R^3$ of each dimension $k=0,1,2,3$, as in Figure \ref{fig:subspaces}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[->,black!45] (0.00,0)--(0.00,0.95) node[above,font=\scriptsize] {$\sigma_z$}; \draw[->,black!45] (0.00,0)--(0.95,0) node[right,font=\scriptsize] {$\sigma_y$}; \draw[->,black!45] (0.00,0)--(-0.65,-0.5) node[below left,font=\scriptsize] {$\sigma_x$}; \fill[magenta] (0.00,0) circle[radius=2.2pt]; \node at (0.00,-1.15) {empty}; \draw[->,black!45] (2.90,0)--(2.90,0.95) node[above,font=\scriptsize] {$\sigma_z$}; \draw[->,black!45] (2.90,0)--(3.85,0) node[right,font=\scriptsize] {$\sigma_y$}; \draw[->,black!45] (2.90,0)--(2.25,-0.5) node[below left,font=\scriptsize] {$\sigma_x$}; \draw[magenta,line width=1.6pt] (3.45,0.4)--(2.35,-0.4); \fill[magenta] (2.90,0) circle[radius=2.2pt]; \node at (2.90,-1.15) {$Ad_{\sigma_x}$}; \fill[qgold!35,opacity=.8] (4.85,-0.55)--(6.25,-0.55)--(6.75,0.55)--(5.35,0.55)--cycle; \draw[->,black!45] (5.80,0)--(5.80,0.95) node[above,font=\scriptsize] {$\sigma_z$}; \draw[->,black!45] (5.80,0)--(6.75,0) node[right,font=\scriptsize] {$\sigma_y$}; \draw[->,black!45] (5.80,0)--(5.15,-0.5) node[below left,font=\scriptsize] {$\sigma_x$}; \draw[magenta,line width=1.6pt] (6.35,0.4)--(5.25,-0.4); \fill[magenta] (5.80,0) circle[radius=2.2pt]; \node at (5.80,-1.15) {quantum square}; \fill[qgold!25] (8.70,0) circle[radius=0.75]; \draw[->,black!45] (8.70,0)--(8.70,0.95) node[above,font=\scriptsize] {$\sigma_z$}; \draw[->,black!45] (8.70,0)--(9.65,0) node[right,font=\scriptsize] {$\sigma_y$}; \draw[->,black!45] (8.70,0)--(8.05,-0.5) node[below left,font=\scriptsize] {$\sigma_x$}; \draw[magenta,line width=1.6pt] (9.25,0.4)--(8.15,-0.4); \fill[magenta] (8.70,0) circle[radius=2.2pt]; \node at (8.70,-1.15) {simplex}; \end{tikzpicture} \caption{The subspaces $\mathcal S$ of $\mathbb R^3=span(\sigma_x,\sigma_y,\sigma_z)$ of dimension $0,1,2,3$, up to rotation, corresponding to the $4$ simple quantum graphs without loops over $M_2$.}\label{fig:subspaces} \end{figure} This classification is due to Matsuda \cite{mat} and Gromada \cite{gr2}, in the framework of the quantum adjacency matrices, and the above proof is a quick application of Proposition \ref{prop:mnsimple}. Observe that the 3 nonempty graphs are quantum analogues of $2K_2$, of the square, and of the tetrahedron $K_4$, which are all planar, and that they have $E=2,4,6$, so they satisfy the Euler bound $E\leq3N-6$, with equality for the simplex. Observe also that the graphs (2) and (3) are complementary, in agreement with $G^+(X)=G^+(X^c)$. \medskip\noindent\textbf{Colin de Verdi\`ere invariant.} Let us discuss now the Colin de Verdi\`ere invariant. Classically, this is defined as follows: \begin{definition} The Colin de Verdi\`ere invariant $\mu(X)$ of a graph is the maximal corank of a symmetric matrix $M$ with $M_{ij}<0$ for $i\sim j$, $M_{ij}=0$ for $i\neq j$, $i\not\sim j$, having exactly one negative eigenvalue, and satisfying the strong Arnold hypothesis. \end{definition} The invariant $\mu(X)$ grows with the complexity of $X$, as illustrated in Figure \ref{fig:cdv}, and its key feature is that it is minor-monotone. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.2pt] (0.00,0.50)--(0.35,0.50); \draw[qblue,line width=1.2pt] (0.35,0.50)--(0.70,0.50); \draw[qblue,line width=1.2pt] (0.70,0.50)--(1.05,0.50); \fill[black!75] (0.00,0.50) circle[radius=2.2pt]; \fill[black!75] (0.35,0.50) circle[radius=2.2pt]; \fill[black!75] (0.70,0.50) circle[radius=2.2pt]; \fill[black!75] (1.05,0.50) circle[radius=2.2pt]; \node at (0.52,-0.55) {$P_4$, $\mu=1$}; \draw[qblue,line width=1.2pt] (2.60,1.10)--(2.03,0.69); \draw[qblue,line width=1.2pt] (2.03,0.69)--(2.25,0.01); \draw[qblue,line width=1.2pt] (2.25,0.01)--(2.95,0.01); \draw[qblue,line width=1.2pt] (2.95,0.01)--(3.17,0.69); \draw[qblue,line width=1.2pt] (3.17,0.69)--(2.60,1.10); \fill[black!75] (2.60,1.10) circle[radius=2.2pt]; \fill[black!75] (2.03,0.69) circle[radius=2.2pt]; \fill[black!75] (2.25,0.01) circle[radius=2.2pt]; \fill[black!75] (2.95,0.01) circle[radius=2.2pt]; \fill[black!75] (3.17,0.69) circle[radius=2.2pt]; \node at (2.6,-0.55) {$C_5$, $\mu=2$}; \draw[qblue,line width=1.2pt] (4.90,1.05)--(4.34,0.07); \draw[qblue,line width=1.2pt] (4.90,1.05)--(5.46,0.07); \draw[qblue,line width=1.2pt] (4.90,1.05)--(4.90,0.40); \draw[qblue,line width=1.2pt] (4.34,0.07)--(5.46,0.07); \draw[qblue,line width=1.2pt] (4.34,0.07)--(4.90,0.40); \draw[qblue,line width=1.2pt] (5.46,0.07)--(4.90,0.40); \fill[black!75] (4.90,1.05) circle[radius=2.2pt]; \fill[black!75] (4.34,0.07) circle[radius=2.2pt]; \fill[black!75] (5.46,0.07) circle[radius=2.2pt]; \fill[black!75] (4.90,0.40) circle[radius=2.2pt]; \node at (4.9,-0.55) {$K_4$, $\mu=3$}; \draw[magenta,line width=1.0pt] (7.20,1.10)--(6.58,0.65); \draw[magenta,line width=1.0pt] (7.20,1.10)--(6.82,-0.08); \draw[magenta,line width=1.0pt] (7.20,1.10)--(7.58,-0.08); \draw[magenta,line width=1.0pt] (7.20,1.10)--(7.82,0.65); \draw[magenta,line width=1.0pt] (6.58,0.65)--(6.82,-0.08); \draw[magenta,line width=1.0pt] (6.58,0.65)--(7.58,-0.08); \draw[magenta,line width=1.0pt] (6.58,0.65)--(7.82,0.65); \draw[magenta,line width=1.0pt] (6.82,-0.08)--(7.58,-0.08); \draw[magenta,line width=1.0pt] (6.82,-0.08)--(7.82,0.65); \draw[magenta,line width=1.0pt] (7.58,-0.08)--(7.82,0.65); \fill[black!75] (7.20,1.10) circle[radius=2.2pt]; \fill[black!75] (6.58,0.65) circle[radius=2.2pt]; \fill[black!75] (6.82,-0.08) circle[radius=2.2pt]; \fill[black!75] (7.58,-0.08) circle[radius=2.2pt]; \fill[black!75] (7.82,0.65) circle[radius=2.2pt]; \node at (7.2,-0.55) {$K_5$, $\mu=4$}; \end{tikzpicture} \caption{Some classical values of the Colin de Verdi\`ere invariant: $1$ for a path, $2$ for a cycle, which is outerplanar, $3$ for $K_4$, which is planar, and $4$ for $K_5$, which is not planar, but is linklessly embeddable. In general, $\mu(K_N)=N-1$.}\label{fig:cdv} \end{figure} The main results here, from \cite{cdv} and subsequent work, state that $\mu(X)\leq1$ for the disjoint unions of paths, $\mu(X)\leq2$ for the outerplanar graphs, $\mu(X)\leq3$ for the planar graphs, and $\mu(X)\leq4$ for the linklessly embeddable graphs \cite{lsc}. In the quantum case, the sign conditions on $M$ can be written via the Hadamard product, which leads to the following definition, for $X$ simple, real, undirected and without loops, so that $d$ is a $\circ$-projection: \begin{definition} The Colin de Verdi\`ere invariant $\mu(X)$ is the maximal corank of a matrix $M\in M_N(\mathbb C)$, with $M=M^*=M^\#$, satisfying the following conditions: \begin{enumerate} \item $M\circ(J-1-d)=0$. \item $-M\circ d$ is positive and invertible, in the $C^*$-algebra $d\circ M_N(\mathbb C)\circ d$. \item $M$ has exactly one negative eigenvalue. \item If $Y=Y^*=Y^\#$ satisfies $Y\circ(1+d)=0$ and $MY=0$, then $Y=0$. \end{enumerate} \end{definition} In the classical case, (1) means that $M_{ij}=0$ for $i\neq j$ not adjacent, (2) means that $M_{ij}<0$ for $i\sim j$, and (4) is the strong Arnold hypothesis, so we recover the usual invariant. We have the following result, which shows that $K_V$ behaves as $K_N$, with respect to planarity: \begin{proposition} The Colin de Verdi\`ere invariants of our basic examples are as follows: \begin{enumerate} \item For the simplex $K_V$ over any $V$ with $N\geq2$ we have $\mu(K_V)=N-1$. In particular, $K_V$ is planar, in the sense $\mu\leq3$, precisely when $N\leq4$. \item For the quantum square we have $\mu=2=\mu(C_4)$. \end{enumerate} \end{proposition} \begin{proof} (1) Since $M$ must have a negative eigenvalue, its corank is at most $N-1$. Conversely, $M=-J$ is self-adjoint and real, condition (1) is empty because $d=J-1$, we have $-M\circ d=J\circ d=d$, which is the unit of the corner, its eigenvalues are $-N$ and $0$, with multiplicity $N-1$, and (4) holds because $Y\circ(1+d)=Y\circ J=Y$. (2) Here we can take $M=-d$, with $d=Ad_{\sigma_x}+Ad_{\sigma_z}$. Conditions (1) and (2) hold because $d$ is a $\circ$-projection, and the eigenvalues of $M$ are $-2,0,0,2$. As for (4), since $Y^\#=Y$, the condition $Y\circ(1+d)=0$ gives as well $(1+d)\circ Y=0$, so $Y$ lives in the corner of $J-1-d=Ad_{\sigma_y}$, which is a minimal $\circ$-projection. Thus $Y=cAd_{\sigma_y}$, and $MY=-c\,dAd_{\sigma_y}=-cd$ forces $c=0$. Conversely, a matrix $M$ of corank 3 with one negative eigenvalue is of the form $-t\theta_{v,v}$, with $t>0$ and $v\in M_2(\mathbb C)$, and in $(M_N(\mathbb C),\circ,\#)\simeq M_2(\mathbb C)\otimes M_2(\mathbb C)^{op}$ this is $-tv\otimes v^*$, of rank $rank(v)^2$. If $rank(v)=2$ this is invertible, contradicting (1), because $J-1-d\neq0$, and if $rank(v)=1$ then $M\circ d$ has rank at most 1, while $d$ has rank 2, contradicting (2). Thus $\mu=2$. \end{proof} Classically, by the Kuratowski theorem, the planar graphs are those which do not contain a subdivision of $K_5$ or $K_{3,3}$, and by the Wagner theorem, these are the graphs which do not have $K_5$ or $K_{3,3}$ as minors. These 2 graphs, together with the planar graph $K_4$, are pictured in Figure \ref{fig:kuratowski}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1pt] (0.90,1.50)--(0.00,0.00); \draw[qblue,line width=1pt] (0.90,1.50)--(1.80,0.00); \draw[qblue,line width=1pt] (0.90,1.50)--(0.90,0.55); \draw[qblue,line width=1pt] (0.00,0.00)--(1.80,0.00); \draw[qblue,line width=1pt] (0.00,0.00)--(0.90,0.55); \draw[qblue,line width=1pt] (1.80,0.00)--(0.90,0.55); \fill[black!75] (0.90,1.50) circle[radius=2.2pt]; \fill[black!75] (0.00,0.00) circle[radius=2.2pt]; \fill[black!75] (1.80,0.00) circle[radius=2.2pt]; \fill[black!75] (0.90,0.55) circle[radius=2.2pt]; \node at (0.9,-0.6) {$K_4$, planar}; \draw[magenta,line width=1pt] (3.40,1.50)--(3.40,0.00); \draw[magenta,line width=1pt] (3.40,1.50)--(4.30,0.00); \draw[magenta,line width=1pt] (3.40,1.50)--(5.20,0.00); \draw[magenta,line width=1pt] (4.30,1.50)--(3.40,0.00); \draw[magenta,line width=1pt] (4.30,1.50)--(4.30,0.00); \draw[magenta,line width=1pt] (4.30,1.50)--(5.20,0.00); \draw[magenta,line width=1pt] (5.20,1.50)--(3.40,0.00); \draw[magenta,line width=1pt] (5.20,1.50)--(4.30,0.00); \draw[magenta,line width=1pt] (5.20,1.50)--(5.20,0.00); \fill[black!75] (3.40,1.50) circle[radius=2.2pt]; \fill[black!75] (4.30,1.50) circle[radius=2.2pt]; \fill[black!75] (5.20,1.50) circle[radius=2.2pt]; \fill[black!75] (3.40,0.00) circle[radius=2.2pt]; \fill[black!75] (4.30,0.00) circle[radius=2.2pt]; \fill[black!75] (5.20,0.00) circle[radius=2.2pt]; \node at (4.3,-0.6) {$K_{3,3}$}; \draw[magenta,line width=1pt] (8.00,1.57)--(7.19,0.98); \draw[magenta,line width=1pt] (8.00,1.57)--(7.50,0.03); \draw[magenta,line width=1pt] (8.00,1.57)--(8.50,0.03); \draw[magenta,line width=1pt] (8.00,1.57)--(8.81,0.98); \draw[magenta,line width=1pt] (7.19,0.98)--(7.50,0.03); \draw[magenta,line width=1pt] (7.19,0.98)--(8.50,0.03); \draw[magenta,line width=1pt] (7.19,0.98)--(8.81,0.98); \draw[magenta,line width=1pt] (7.50,0.03)--(8.50,0.03); \draw[magenta,line width=1pt] (7.50,0.03)--(8.81,0.98); \draw[magenta,line width=1pt] (8.50,0.03)--(8.81,0.98); \fill[black!75] (8.00,1.57) circle[radius=2.2pt]; \fill[black!75] (7.19,0.98) circle[radius=2.2pt]; \fill[black!75] (7.50,0.03) circle[radius=2.2pt]; \fill[black!75] (8.50,0.03) circle[radius=2.2pt]; \fill[black!75] (8.81,0.98) circle[radius=2.2pt]; \node at (8.0,-0.6) {$K_5$}; \end{tikzpicture} \caption{The planar graph $K_4$, and the $2$ Kuratowski graphs $K_{3,3}$ and $K_5$, which are not planar, their minimal genus being $1$. Over $M_2$, the values of $hom(F,X)$ for the drawings of $K_4$ of genus $0$ coincide, while for the drawings of $K_{3,3}$ and $K_5$ of genus $1$ they do not.}\label{fig:kuratowski} \end{figure} Thus the simplices $K_V$ with $N\geq5$, such as those over $\mathbb C\oplus M_2$ or $M_3$, are not planar, exactly as $K_5$, while the simplex over $M_2$ is planar, as $K_4$. However, the above definition has a drawback: the corner of $1$ in $(M_N(\mathbb C),\circ,\#)$, which plays the role of the diagonal matrices, has dimension the number of blocks of $V$, instead of $N$, so the diagonal entries of $M$ have less freedom than in the classical case. For instance, for $d=Ad_{\sigma_x}$ over $M_2$ the matrices satisfying (1) and (2) are of the form $a-tAd_{\sigma_x}$, because $1$ and $d$ are minimal $\circ$-projections, with eigenvalues $a\pm t$, each with multiplicity 2, so condition (3) cannot hold, while $\mu(2K_2)=1$. Thus the set of admissible matrices is empty, and $\mu$ is only partially defined, for instance not for this graph. The program {\tt planarity.py} checks the matrices used in the above proof, including the rank argument for the quantum square. We are led in this way to: \begin{question} What is the right quantum version of the Colin de Verdi\`ere invariant, defined for all the quantum graphs? Is it equal, over $M_2$, to that of $2K_2,C_4,K_4$? Is there a quantum Kuratowski theorem, with $K_V$ for $N=5$ playing the role of $K_5$? \end{question} \medskip\noindent\textbf{Planar algebras.} There is another, deeper connection with planarity. The representation theory of $S_V^+$ is given by the Temperley-Lieb algebra, which is planar \cite{ba1}, and more generally, as explained in section 3, the spaces $End(u^{\otimes k})$ form a planar algebra. For the classical graphs, Man\v cinska and Roberson \cite{mro} proved that 2 graphs are quantum isomorphic precisely when they have the same number of homomorphisms from any planar graph. In our setting, we have the quantities $hom(F,X)$ from section 5, which are defined for the drawings of $F$ on surfaces. The program {\tt planarity.py} computes $hom(F,X)$ for all the drawings of $K_4$, $K_{3,3}$ and $K_5$, obtained by choosing the cyclic orders around the vertices, for random undirected real quantum graphs $X$ over 4 points, and over $M_2$, and finds the following numbers of distinct complex values, by genus of the drawing, with the graphs being those in Figure \ref{fig:kuratowski}: \begin{center} \begin{tabular}{|l|l|l|l|} \hline $V$&$K_4$&$K_{3,3}$&$K_5$\\ \hline $\{1,2,3,4\}$&$g=0:1$, $g=1:1$&$g=1:1$, $g=2:1$&$g=1:1$, $g=2:1$, $g=3:1$\\ \hline $M_2$&$g=0:1$, $g=1:2$&$g=1:2$, $g=2:1$&$g=1:9$, $g=2:45$, $g=3:24$\\ \hline \end{tabular} \end{center} \medskip Thus, classically the drawing does not matter, while over $M_2$ it does. In fact, the program also counts the drawings up to relabeling, by the automorphisms of $F$, and finds exactly the above numbers. Up to complex conjugation, the numbers of values over $M_2$ become $1,2$ for $K_4$, then $2,1$ for $K_{3,3}$, and $6,31,13$ for $K_5$, and these are exactly the numbers of drawings up to relabeling and reflection, as in Figure \ref{fig:k5drawings}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[black!50] (0,0)--(6.2,0); \draw[black!50] (0,0)--(0,2.5); \draw[black!50] (-0.06,0.00)--(0,0.00) node[left,font=\scriptsize] {$0$}; \draw[black!50] (-0.06,0.50)--(0,0.50) node[left,font=\scriptsize] {$10$}; \draw[black!50] (-0.06,1.00)--(0,1.00) node[left,font=\scriptsize] {$20$}; \draw[black!50] (-0.06,1.50)--(0,1.50) node[left,font=\scriptsize] {$30$}; \draw[black!50] (-0.06,2.00)--(0,2.00) node[left,font=\scriptsize] {$40$}; \fill[qblue] (0.58,0) rectangle (0.98,0.45); \node[above,font=\scriptsize] at (0.78,0.45) {$9$}; \fill[qgold] (1.02,0) rectangle (1.42,0.30); \node[above,font=\scriptsize] at (1.22,0.30) {$6$}; \node[below,font=\scriptsize] at (1.00,0) {$g=1$}; \fill[qblue] (2.58,0) rectangle (2.98,2.25); \node[above,font=\scriptsize] at (2.78,2.25) {$45$}; \fill[qgold] (3.02,0) rectangle (3.42,1.55); \node[above,font=\scriptsize] at (3.22,1.55) {$31$}; \node[below,font=\scriptsize] at (3.00,0) {$g=2$}; \fill[qblue] (4.58,0) rectangle (4.98,1.20); \node[above,font=\scriptsize] at (4.78,1.20) {$24$}; \fill[qgold] (5.02,0) rectangle (5.42,0.65); \node[above,font=\scriptsize] at (5.22,0.65) {$13$}; \node[below,font=\scriptsize] at (5.00,0) {$g=3$}; \fill[qblue] (6.7,1.9) rectangle ++(0.3,0.2); \node[right,font=\footnotesize] at (7.05,2.0) {up to relabeling}; \fill[qgold] (6.7,1.4) rectangle ++(0.3,0.2); \node[right,font=\footnotesize] at (7.05,1.5) {up to relabeling and reflection}; \end{tikzpicture} \caption{The drawings of $K_5$ on surfaces of genus $g=1,2,3$, up to relabeling, in blue, and up to relabeling and reflection, in gold, as counted by {\tt planarity.py}. Over $M_2$, these are the numbers of distinct values of $hom(K_5,X)$, and of these values up to conjugation, for a random $X$.}\label{fig:k5drawings} \end{figure} The same happens for the small graphs from section 5, as checked by {\tt diagrams.py}, including the tree there, and a prism, having in genus 2 a pair of mirror drawings, which give the same real value. However, the quantum graphs over $M_2$ do not see the drawings completely, and this already happens for the trees, whose drawings are all planar: \begin{theorem}\label{thm:spiders} Let $F$ be the tree having a vertex of degree $12$, with $6$ pendant paths of length $1$, and $6$ pendant paths of length $2$, and consider its $2$ plane drawings in which the lengths of the paths, in cyclic order around the center, are as follows: $$w_1=121221122121\quad,\quad w_2=212112211212$$ These drawings are not related by a relabeling and a reflection, but $hom(F,X)$ takes the same value on them, for any undirected real quantum graph $X$ over $M_2$. \end{theorem} \begin{proof} The center is the only vertex of degree 12, and the automorphisms of $F$ permute the paths of the same length, so 2 drawings are related by a relabeling and a reflection precisely when their words are related by a rotation and a reversal. The smallest words obtained in this way from $w_1,w_2$ are $112122112212$ and $112122121122$, so our drawings are not related. As for the values, contracting the paths as for the tree with paths of lengths $1,1,2,2$, we obtain $\psi$ of the product of the letters, with $1\to a=d(1)$ and $2\to b=d^2(1)$. With $U=ab$ and $V=ba$, the words become $UUVUVV$ and $VVUVUU$, so the values are $\psi(U^2VUV^2)$ and $\psi(V^2UVU^2)$. Over $M_2$ we have $\psi=2Tr$, and $U^2=uU-s$, $V^2=vV-t$, by Cayley-Hamilton, with $u,v$ being the traces, and $s,t$ the determinants. Thus, by cyclicity of the trace, both values are given by: $$\frac{1}{2}\,hom(F,X)=uv\,Tr(UVUV)-ut\,Tr(U^2V)-sv\,Tr(UV^2)+st\,Tr(UV)$$ Thus the 2 values coincide, as claimed. \end{proof} In general, for $2\times2$ matrices, the trace of a product of copies of $U$ and $V$ does not change when reversing the order of the factors, by a result of Greene \cite{gre}, and our 2 words are reverse to each other, as words in $U,V$, while being palindromes, as words in $a,b$. The program {\tt diagrams.py} checks the above identity with exact polynomial arithmetic, and finds that among the spiders, namely the trees made of paths attached to a center, with at most 12 paths of lengths 1 and 2, this is the only coincidence over $M_2$. Over $M_3$ the 2 values differ, for instance for $d(x)=pxp+2qxq+3rxr$, with $p,q,r$ being the projections onto $(1,0,0)$, $(1,1,1)$, $(1,2,0)$. The 2 drawings are as in Figure \ref{fig:spiders}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.1pt] (0.00,0.00)--(0.00,0.62); \fill[black!75] (0.00,0.62) circle[radius=2.0pt]; \draw[magenta,line width=1.1pt] (0.00,0.00)--(0.31,0.54); \draw[magenta,line width=1.1pt] (0.31,0.54)--(0.62,1.07); \fill[black!75] (0.31,0.54) circle[radius=2.0pt]; \fill[black!75] (0.62,1.07) circle[radius=2.0pt]; \draw[qblue,line width=1.1pt] (0.00,0.00)--(0.54,0.31); \fill[black!75] (0.54,0.31) circle[radius=2.0pt]; \draw[magenta,line width=1.1pt] (0.00,0.00)--(0.62,0.00); \draw[magenta,line width=1.1pt] (0.62,0.00)--(1.24,0.00); \fill[black!75] (0.62,0.00) circle[radius=2.0pt]; \fill[black!75] (1.24,0.00) circle[radius=2.0pt]; \draw[magenta,line width=1.1pt] (0.00,-0.00)--(0.54,-0.31); \draw[magenta,line width=1.1pt] (0.54,-0.31)--(1.07,-0.62); \fill[black!75] (0.54,-0.31) circle[radius=2.0pt]; \fill[black!75] (1.07,-0.62) circle[radius=2.0pt]; \draw[qblue,line width=1.1pt] (0.00,-0.00)--(0.31,-0.54); \fill[black!75] (0.31,-0.54) circle[radius=2.0pt]; \draw[qblue,line width=1.1pt] (0.00,-0.00)--(0.00,-0.62); \fill[black!75] (0.00,-0.62) circle[radius=2.0pt]; \draw[magenta,line width=1.1pt] (0.00,-0.00)--(-0.31,-0.54); \draw[magenta,line width=1.1pt] (-0.31,-0.54)--(-0.62,-1.07); \fill[black!75] (-0.31,-0.54) circle[radius=2.0pt]; \fill[black!75] (-0.62,-1.07) circle[radius=2.0pt]; \draw[magenta,line width=1.1pt] (0.00,-0.00)--(-0.54,-0.31); \draw[magenta,line width=1.1pt] (-0.54,-0.31)--(-1.07,-0.62); \fill[black!75] (-0.54,-0.31) circle[radius=2.0pt]; \fill[black!75] (-1.07,-0.62) circle[radius=2.0pt]; \draw[qblue,line width=1.1pt] (0.00,-0.00)--(-0.62,-0.00); \fill[black!75] (-0.62,-0.00) circle[radius=2.0pt]; \draw[magenta,line width=1.1pt] (0.00,0.00)--(-0.54,0.31); \draw[magenta,line width=1.1pt] (-0.54,0.31)--(-1.07,0.62); \fill[black!75] (-0.54,0.31) circle[radius=2.0pt]; \fill[black!75] (-1.07,0.62) circle[radius=2.0pt]; \draw[qblue,line width=1.1pt] (0.00,0.00)--(-0.31,0.54); \fill[black!75] (-0.31,0.54) circle[radius=2.0pt]; \fill[black!75] (0.00,0.00) circle[radius=2.6pt]; \node at (0.00,-1.75) {$\psi(U^2VUV^2)$}; \draw[magenta,line width=1.1pt] (5.60,0.00)--(5.60,0.62); \draw[magenta,line width=1.1pt] (5.60,0.62)--(5.60,1.24); \fill[black!75] (5.60,0.62) circle[radius=2.0pt]; \fill[black!75] (5.60,1.24) circle[radius=2.0pt]; \draw[qblue,line width=1.1pt] (5.60,0.00)--(5.91,0.54); \fill[black!75] (5.91,0.54) circle[radius=2.0pt]; \draw[magenta,line width=1.1pt] (5.60,0.00)--(6.14,0.31); \draw[magenta,line width=1.1pt] (6.14,0.31)--(6.67,0.62); \fill[black!75] (6.14,0.31) circle[radius=2.0pt]; \fill[black!75] (6.67,0.62) circle[radius=2.0pt]; \draw[qblue,line width=1.1pt] (5.60,0.00)--(6.22,0.00); \fill[black!75] (6.22,0.00) circle[radius=2.0pt]; \draw[qblue,line width=1.1pt] (5.60,-0.00)--(6.14,-0.31); \fill[black!75] (6.14,-0.31) circle[radius=2.0pt]; \draw[magenta,line width=1.1pt] (5.60,-0.00)--(5.91,-0.54); \draw[magenta,line width=1.1pt] (5.91,-0.54)--(6.22,-1.07); \fill[black!75] (5.91,-0.54) circle[radius=2.0pt]; \fill[black!75] (6.22,-1.07) circle[radius=2.0pt]; \draw[magenta,line width=1.1pt] (5.60,-0.00)--(5.60,-0.62); \draw[magenta,line width=1.1pt] (5.60,-0.62)--(5.60,-1.24); \fill[black!75] (5.60,-0.62) circle[radius=2.0pt]; \fill[black!75] (5.60,-1.24) circle[radius=2.0pt]; \draw[qblue,line width=1.1pt] (5.60,-0.00)--(5.29,-0.54); \fill[black!75] (5.29,-0.54) circle[radius=2.0pt]; \draw[qblue,line width=1.1pt] (5.60,-0.00)--(5.06,-0.31); \fill[black!75] (5.06,-0.31) circle[radius=2.0pt]; \draw[magenta,line width=1.1pt] (5.60,-0.00)--(4.98,-0.00); \draw[magenta,line width=1.1pt] (4.98,-0.00)--(4.36,-0.00); \fill[black!75] (4.98,-0.00) circle[radius=2.0pt]; \fill[black!75] (4.36,-0.00) circle[radius=2.0pt]; \draw[qblue,line width=1.1pt] (5.60,0.00)--(5.06,0.31); \fill[black!75] (5.06,0.31) circle[radius=2.0pt]; \draw[magenta,line width=1.1pt] (5.60,0.00)--(5.29,0.54); \draw[magenta,line width=1.1pt] (5.29,0.54)--(4.98,1.07); \fill[black!75] (5.29,0.54) circle[radius=2.0pt]; \fill[black!75] (4.98,1.07) circle[radius=2.0pt]; \fill[black!75] (5.60,0.00) circle[radius=2.6pt]; \node at (5.60,-1.75) {$\psi(V^2UVU^2)$}; \end{tikzpicture} \caption{The $2$ plane drawings of the spider with $6$ pendant paths of length $1$, in blue, and $6$ of length $2$, in magenta, read clockwise from the top. They are not related by a relabeling and a reflection, but over $M_2$ they give the same value, with $U=ab$ and $V=ba$, as checked by {\tt diagrams.py}.}\label{fig:spiders} \end{figure} Thus the quantum graphs over $M_2$ see a lot of the drawing of $F$, but not everything, the obstruction coming from the trace identities of the $2\times2$ matrices. Over $M_3$, a random undirected real quantum graph separates the 224 drawings, up to relabeling and reflection, of the spiders with 12 paths of lengths 1 and 2, as checked by {\tt diagrams.py}. Observe also that Question \ref{ques:hom}, where $X$ is fixed and the plane graph $F$ varies, is not affected by the above. We are led to: \begin{question} Which graphs $F$ have the property that, for a generic undirected real quantum graph $X$ over $M_2$, $2$ drawings of $F$ give the same value of $hom(F,X)$, up to complex conjugation, precisely when they are related by a relabeling and a reflection? Do all graphs $F$ have this property, over $M_3$? \end{question} In other words, the quantum graphs over $M_n$ with $n\geq3$ might see not only the graph $F$, as the classical graphs do, but its drawings on surfaces. This would show that the drawings, and planarity in particular, enter into the theory of the quantum graphs in an essential way, in agreement with the planar algebra structure from section 3, and with the work of Man\v cinska and Roberson, for classical targets. \section{Extremal and random graphs} The basic results of extremal graph theory are the Mantel theorem \cite{man}, stating that a triangle-free graph on $N$ vertices has at most $N^2/4$ edges, its generalization by Tur\'an \cite{tur}, stating that a graph without $K_{r+1}$ subgraphs has at most $(1-\frac{1}{r})\frac{N^2}{2}$ edges, and the Ramsey theorem \cite{ram}, stating that a large enough graph contains a clique, or an independent set, of a given size. The equality in the Mantel theorem is attained by the complete bipartite graphs $K_{N/2,N/2}$, and we will see that some quantum graphs, such as the quantum square, are extremal too, as in Figure \ref{fig:mantel}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \foreach \i in {0,1,2}\foreach \j in {0,1,2}{\draw[qblue,line width=1pt] (0.9*\i,1.5)--(0.9*\j,0);} \foreach \i in {0,1,2}{\fill[qgold] (0.9*\i,1.5) circle[radius=2.6pt]; \fill[magenta] (0.9*\i,0) circle[radius=2.6pt];} \node at (0.9,-0.6) {$K_{3,3}$, with $E=9=6^2/4$}; \begin{scope}[shift={(5.6,0)}] \coordinate (e11) at (0,1.5); \coordinate (e12) at (1.5,1.5); \coordinate (e21) at (0,0); \coordinate (e22) at (1.5,0); \draw[qblue,line width=1pt] (e11)--(e22) (e12)--(e21); \draw[qgold,line width=.8pt] (e11) .. controls +(60:0.6) and +(120:0.6) .. (e11); \draw[qgold,line width=.8pt] (e12) .. controls +(60:0.6) and +(120:0.6) .. (e12); \draw[qgold,line width=.8pt] (e21) .. controls +(240:0.6) and +(300:0.6) .. (e21); \draw[qgold,line width=.8pt] (e22) .. controls +(240:0.6) and +(300:0.6) .. (e22); \foreach \p in {e11,e12,e21,e22}{\fill[black!75] (\p) circle[radius=2.3pt];} \node at (0.75,-0.75) {quantum square, $E=4=4^2/4$}; \end{scope} \end{tikzpicture} \caption{A pair of extremal triangle-free graphs, the classical complete bipartite graph $K_{3,3}$, and the quantum square over $M_2$, for which $Tr(d^3)=0$ and $E=N^2/4$.}\label{fig:mantel} \end{figure} The Mantel theorem has a spectral proof, due to Nosal \cite{nos}, which extends to the quantum case. We first need the following formula, which is of independent interest: \begin{proposition}\label{prop:tracehadamard} For any $A,B\in M_N(\mathbb C)$ we have the formula $$\psi((A\circ B)(1))=Tr(A^tB)$$ where $A^t=(A^*)^\#$ is the transpose, or rotation by $180^\circ$, from section 3. \end{proposition} \begin{proof} Let $\beta(x,y)=\psi(xy)$, and write $\mu^*(1)=\sum c_1\otimes c_2$, which is the dual basis element of $\beta$, in the sense that $Tr(T)=\sum\beta(c_1,Tc_2)$ for any $T$. Since $\psi\mu=\beta$, and $\beta(x,Ay)=\beta(A^tx,y)$ by the proof of Theorem \ref{thm:twobox}, we obtain, by using the symmetry of $\beta$: $$\psi((A\circ B)(1))=\sum\beta(Ac_1,Bc_2)=\sum\beta(A^tBc_2,c_1)=Tr(A^tB)$$ Here we have used at the end the trace formula, along with the symmetry of $\beta$. \end{proof} In the classical case, this is the formula $\sum_{ij}A_{ij}B_{ij}=Tr(A^tB)$. As consequences, we have the quantum analogues of the formulas $Tr(d^2)=2E$, and of the fact that the closed walks are counted with positive weights, as follows: \begin{corollary}\label{cor:traces} The traces of the powers of $d$ are as follows: \begin{enumerate} \item For $X$ simple, real and undirected, $Tr(d^2)=\psi(d(1))=2E$. \item For $X$ positively weighted, and $k\geq1$, $Tr(d^k)=\sum_W|Tr(W)|^2\geq0$, the sum being over the words $W=K_{i_1}\ldots K_{i_k}$ in the Kraus operators of $d$, regarded as elements of $B(H)$. \end{enumerate} \end{corollary} \begin{proof} (1) Since $d$ is real and undirected we have $d^t=d$, and since $d\circ d=d$, Proposition \ref{prop:tracehadamard} gives $Tr(d^2)=\psi(d(1))$. (2) We have $d^k(x)=\sum_WW^*xW$, as in section 5, and the trace of the map $x\to W^*xW$ on $C(V)$ is $|Tr(W)|^2$, because the trace of $x\to AxB$ on $M_n(\mathbb C)$ is $Tr(A)Tr(B)$, and the words $W$ not living in a diagonal block of $B(H)$ contribute $0$. For $k=0$ we have of course $Tr(1)=\dim C(V)$. \end{proof} Classically, the closed walks of length 3 are the triangles, each counted 6 times, as in Figure \ref{fig:triangles} for $K_4$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[magenta,line width=1.5pt] (0.60,1.15)--(0.00,0.00); \draw[magenta,line width=1.5pt] (0.60,1.15)--(1.20,0.00); \draw[black!20,line width=0.8pt] (0.60,1.15)--(0.60,0.42); \draw[magenta,line width=1.5pt] (0.00,0.00)--(1.20,0.00); \draw[black!20,line width=0.8pt] (0.00,0.00)--(0.60,0.42); \draw[black!20,line width=0.8pt] (1.20,0.00)--(0.60,0.42); \fill[black!75] (0.60,1.15) circle[radius=2.4pt]; \fill[black!75] (0.00,0.00) circle[radius=2.4pt]; \fill[black!75] (1.20,0.00) circle[radius=2.4pt]; \fill[black!75] (0.60,0.42) circle[radius=2.4pt]; \draw[magenta,line width=1.5pt] (2.70,1.15)--(2.10,0.00); \draw[black!20,line width=0.8pt] (2.70,1.15)--(3.30,0.00); \draw[magenta,line width=1.5pt] (2.70,1.15)--(2.70,0.42); \draw[black!20,line width=0.8pt] (2.10,0.00)--(3.30,0.00); \draw[magenta,line width=1.5pt] (2.10,0.00)--(2.70,0.42); \draw[black!20,line width=0.8pt] (3.30,0.00)--(2.70,0.42); \fill[black!75] (2.70,1.15) circle[radius=2.4pt]; \fill[black!75] (2.10,0.00) circle[radius=2.4pt]; \fill[black!75] (3.30,0.00) circle[radius=2.4pt]; \fill[black!75] (2.70,0.42) circle[radius=2.4pt]; \draw[black!20,line width=0.8pt] (4.80,1.15)--(4.20,0.00); \draw[magenta,line width=1.5pt] (4.80,1.15)--(5.40,0.00); \draw[magenta,line width=1.5pt] (4.80,1.15)--(4.80,0.42); \draw[black!20,line width=0.8pt] (4.20,0.00)--(5.40,0.00); \draw[black!20,line width=0.8pt] (4.20,0.00)--(4.80,0.42); \draw[magenta,line width=1.5pt] (5.40,0.00)--(4.80,0.42); \fill[black!75] (4.80,1.15) circle[radius=2.4pt]; \fill[black!75] (4.20,0.00) circle[radius=2.4pt]; \fill[black!75] (5.40,0.00) circle[radius=2.4pt]; \fill[black!75] (4.80,0.42) circle[radius=2.4pt]; \draw[black!20,line width=0.8pt] (6.90,1.15)--(6.30,0.00); \draw[black!20,line width=0.8pt] (6.90,1.15)--(7.50,0.00); \draw[black!20,line width=0.8pt] (6.90,1.15)--(6.90,0.42); \draw[magenta,line width=1.5pt] (6.30,0.00)--(7.50,0.00); \draw[magenta,line width=1.5pt] (6.30,0.00)--(6.90,0.42); \draw[magenta,line width=1.5pt] (7.50,0.00)--(6.90,0.42); \fill[black!75] (6.90,1.15) circle[radius=2.4pt]; \fill[black!75] (6.30,0.00) circle[radius=2.4pt]; \fill[black!75] (7.50,0.00) circle[radius=2.4pt]; \fill[black!75] (6.90,0.42) circle[radius=2.4pt]; \end{tikzpicture} \caption{The $4$ triangles of $K_4$, each of them being counted $6$ times by $c_3=Tr(d^3)$, once for each starting vertex and orientation, so that $c_3=24$, as computed by {\tt pictures.py}, and as in the table from section 5.}\label{fig:triangles} \end{figure} In particular $c_3=Tr(d^3)\geq0$, and since classically $c_3$ is 6 times the number of triangles, we call a positively weighted quantum graph triangle-free when $Tr(d^3)=0$, which means that $Tr(K_iK_jK_l)=0$, for any Kraus operators. Other notions of triangle-free quantum graphs were proposed by Weaver \cite{wtf}, via compressions of operator systems, and by Bravo Hern\'andez, Hern\'andez Palomares and Viales Sol\'is \cite{bhv}, via a planar triangle operator. Weaver's notion is different from ours, being for instance automatically satisfied by the operator systems of dimension at most 8, and so over $M_2$, while the simplex over $M_2$ has $Tr(d^3)=24$. With our convention, we have: \begin{theorem}[Quantum Mantel theorem] Let $X$ be a simple, real, undirected, positively weighted quantum graph, which is triangle-free. Then $\lambda_{max}^2\leq E$, and so $E\leq N^2/4$. \end{theorem} \begin{proof} We follow Nosal \cite{nos}. By the Perron-Frobenius theory of Evans and H\o egh-Krohn \cite{ehk}, the spectral radius of $d$ is an eigenvalue, so $|\lambda|\leq\lambda_{max}$ for any eigenvalue $\lambda$. For $d=0$ there is nothing to prove, so assume $d\neq0$, and write the eigenvalues, with multiplicities, as $\lambda_1=\lambda_{max}>0$, and $\lambda_2,\ldots,\lambda_N$. By Corollary \ref{cor:traces} we have $\sum_j\lambda_j^2=2E$ and $\sum_j\lambda_j^3=0$, and so, by deleting one copy of $\lambda_{max}$: $$\lambda_{max}^3=-\sum_{j\geq2}\lambda_j^3\leq\lambda_{max}\sum_{j\geq2}\lambda_j^2=\lambda_{max}(2E-\lambda_{max}^2)$$ Thus $\lambda_{max}^2\leq E$. Now since the average degree is $\psi(d(1))/N=2E/N\leq\lambda_{max}$, by Theorem \ref{thm:spectralbounds}, we obtain $4E^2/N^2\leq E$, and so $E\leq N^2/4$. \end{proof} The equality cases include the quantum square, with $E=4=N^2/4$, and the complete bipartite quantum graphs $K_{V,W}$ from section 7 with $|V|=|W|$, which have $E=|V|^2=N^2/4$, these being triangle-free because their spectrum is symmetric, as in Figure \ref{fig:mantel} above. In fact, we can determine all the equality cases, as follows: \begin{theorem}\label{thm:mantelequality} The quantum graphs in the quantum Mantel theorem having $E=N^2/4>0$ are $$d(x)=\psi(qx)p+\psi(px)q$$ with $p\in C(V)$ being a projection with $\psi(p)=N/2$, and with $q=1-p$, and their spectrum is $N/2,-N/2,0,\ldots,0$. In particular, these are the complete bipartite graphs $K_{N/2,N/2}$, in the classical case. \end{theorem} \begin{proof} If $E=N^2/4$, all the inequalities in the above proof are equalities. Thus $\lambda_{max}=N/2$, and $1$ is an eigenvector, so $d$ is regular. Also, $\lambda_j^2(\lambda_{max}+\lambda_j)=0$ for $j\geq2$, and $\sum_j\lambda_j^2=2\lambda_{max}^2$, so the spectrum is $N/2,-N/2,0,\ldots,0$. Thus $X$ is connected, and by Theorem \ref{thm:bipartite} there is a symmetry $s=2p-1$ with $d(s)=-\frac{N}{2}s$. Since $s\perp1$ we have $\psi(p)=N/2$, and the spectral decomposition of $d$ reads: $$d(x)=\frac{1}{2}\big(\psi(x)1-\psi(sx)s\big)=\psi(qx)p+\psi(px)q$$ Conversely, the maps $x\to\psi(qx)p$ and $x\to\psi(px)q$ are $\theta_{p,q}$ and $\theta_{q,p}$, which are orthogonal $\circ$-projections, adjoint to each other, real, and completely positive, so $d$ has all the properties, and its spectrum is as stated. \end{proof} Thus the extremal graphs are parametrized by the balanced cuts $p+q=1$, with $p$ and $q$ giving the same graph, and these include the noncentral cuts, such as $p=(1+\sigma_y)/2$ for the quantum square. The program {\tt extremal.py} checks Proposition \ref{prop:tracehadamard}, Corollary \ref{cor:traces}, the quantum Mantel theorem on these examples, and on 2 copies of the quantum square, where $\lambda_{max}$ has multiplicity 2, and the above equality cases, over $M_2,M_4,M_2\oplus M_2,\mathbb C^2\oplus M_2,M_3\oplus M_3$. \medskip\noindent\textbf{Cliques.} Regarding the Tur\'an theorem, this can be proved classically via the Motzkin-Straus theorem \cite{mst}, stating that the maximum of $$ over the probability vectors $x$ is $1-1/\omega$, with $\omega$ being the clique number. The extremal graphs are the complete multipartite graphs with $r$ equal parts, such as the octahedron in Figure \ref{fig:octahedron}, for $N=6$ and $r=3$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.0pt] (0.00,1.45)--(-1.08,-0.43); \draw[qblue,line width=1.0pt] (-0.00,-0.30)--(0.43,0.45); \draw[qblue,line width=1.0pt] (-0.00,-0.30)--(-1.08,-0.43); \draw[qblue,line width=1.0pt] (-0.00,-0.30)--(1.08,-0.43); \draw[qblue,line width=1.0pt] (-1.08,-0.43)--(1.08,-0.43); \draw[qblue,line width=1.0pt] (0.43,0.45)--(-0.43,0.45); \draw[qblue,line width=1.0pt] (0.43,0.45)--(0.00,1.45); \draw[qblue,line width=1.0pt] (0.43,0.45)--(1.08,-0.43); \draw[qblue,line width=1.0pt] (1.08,-0.43)--(0.00,1.45); \draw[qblue,line width=1.0pt] (-0.43,0.45)--(-0.00,-0.30); \draw[qblue,line width=1.0pt] (-0.43,0.45)--(0.00,1.45); \draw[qblue,line width=1.0pt] (-0.43,0.45)--(-1.08,-0.43); \fill[qgold] (0.00,1.45) circle[radius=3pt]; \fill[qgold] (-0.00,-0.30) circle[radius=3pt]; \fill[magenta] (-1.08,-0.43) circle[radius=3pt]; \fill[magenta] (0.43,0.45) circle[radius=3pt]; \fill[black!80] (1.08,-0.43) circle[radius=3pt]; \fill[black!80] (-0.43,0.45) circle[radius=3pt]; \end{tikzpicture} \caption{The octahedron $K_{2,2,2}$, with its $3$ parts in different colors. It has no $K_4$, and has $12=(1-\frac{1}{3})\frac{6^2}{2}$ edges, as checked by {\tt pictures.py}, which is the maximum allowed by the Tur\'an theorem.}\label{fig:octahedron} \end{figure} In the quantum case, the cliques can be defined as follows: \begin{definition} A projection $p\in C(V)$ is a clique in $X=(V,d)$ when the compression of $d$ to the corner $pC(V)p$ equals that of $J-1$, that is, when we have $$p\,d(pxp)\,p=\psi(pxp)p-pxp$$ for any $x\in C(V)$. The clique number $\omega(X)$ is the maximum of $\psi(p)$, over the cliques. \end{definition} In the simplex every projection is a clique, so $\omega=N$, and by section 9 the independent projections are the minimal projections of the blocks of size 1. Symmetrically, in the empty graph every projection is independent, and the cliques are the minimal projections of the blocks of size 1, so for $V=M_n$ with $n\geq2$ the empty graph has $\omega=0$. In the quantum square, the rank one projections whose Bloch vector is orthogonal to $\sigma_y$ are cliques, of size 2, while those given by $\pm\sigma_y$ are independent, of size 2. Regarding Motzkin-Straus, the easy half holds: for a clique $p$, the density $\rho=p/\psi(p)$ satisfies, by taking $x=1$ in the definition: $$\psi(\rho\,d(\rho))=\frac{\psi(p)^2-\psi(p)}{\psi(p)^2}=1-\frac{1}{\psi(p)}$$ Thus, when $\omega(X)>0$, the maximum of $\psi(\rho\,d(\rho))$ over the densities is at least $1-1/\omega(X)$. However, the reverse inequality fails, and so does the Tur\'an bound, already for a connected graph over $M_4$: \begin{proposition}\label{prop:cliques} Over $V=M_4$, with $\psi=4Tr$ and $N=16$, consider the matrix $h=diag(1,1,1,-3)/\sqrt3$, and the quantum graph $d=J-1-Ad_h$. Then $X$ is simple, real, undirected, positively weighted, without loops and connected, with $E=112$, and its cliques are the projections $p$ with $php=0$, so that $\omega(X)=4$. In particular, for the uniform density $\rho=1/16$ we have $$\psi(\rho\,d(\rho))=\frac{7}{8}>\frac{3}{4}=1-\frac{1}{\omega(X)}$$ and also $E=112$, exceeding the value $(1-1/\omega(X))N^2/2=96$ of the classical Tur\'an bound. \end{proposition} \begin{proof} We have $Tr(h)=0$ and $Tr(h^2)=4$, so by Proposition \ref{prop:mnsimple}, $d$ is the graph of the orthogonal complement $\mathcal S$ of $h$ in the traceless matrices, which is self-adjoint, of dimension 14. Thus $X$ has the stated properties, with $E=16\cdot14/2=112$, and it is connected, because $\mathcal S$ contains the matrix units $e_{ab}$ with $a\neq b$, which generate $M_4(\mathbb C)$. Since $d(y)=\psi(y)1-y-hyh$, the projection $p$ is a clique precisely when $(php)x(php)=0$ for any $x$, and with $x=1$ this means $php=0$. Thus the range of $p$ is isotropic for the Hermitian form given by $h$, which has signature $(3,1)$, so $rank(p)\leq1$, and $\psi(p)\leq4$. Conversely, $v=(\sqrt3/2,0,0,1/2)$ satisfies $=0$, so the projection onto $\mathbb Cv$ is a clique, and $\omega(X)=4$. Finally, $\psi(\rho\,d(\rho))=\psi(d(1))/N^2=2E/N^2=7/8$. \end{proof} Thus the clique number does not control the number of edges as in the classical case, and the triangle-free condition used in the quantum Mantel theorem, which is a trace condition, is of a different nature. The program {\tt extremal.py} checks this example, including the description of the cliques, on random projections, and the isotropic cone is pictured in Figure \ref{fig:cone}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \fill[qgold!15] (0,0)--(-2.08,1.2)--(2.08,1.2)--cycle; \fill[qgold!15] (0,0)--(-2.08,-1.2)--(2.08,-1.2)--cycle; \draw[->,black!50] (-2.7,0)--(2.7,0) node[right] {$x_1,x_2,x_3$}; \draw[->,black!50] (0,-1.6)--(0,1.7) node[above] {$x_4$}; \draw[qblue,line width=1pt] (-2.08,1.2)--(2.08,-1.2); \draw[qblue,line width=1pt] (-2.08,-1.2)--(2.08,1.2); \draw[qblue,line width=0.8pt] (0,1.2) ellipse (2.08 and 0.28); \draw[qblue,line width=0.8pt] (0,-1.2) ellipse (2.08 and 0.28); \draw[magenta,line width=1.8pt] (-1.30,-0.75)--(1.30,0.75); \fill[magenta] (1.30,0.75) circle[radius=2.3pt]; \node[right,text=magenta] at (1.36,0.66) {$v$}; \node[font=\scriptsize] at (-1.15,1.72) {$<0$}; \node[font=\scriptsize] at (2.05,-0.42) {$>0$}; \end{tikzpicture} \caption{The isotropic cone of the Hermitian form $$, with $h=diag(1,1,1,-3)/\sqrt3$, in real coordinates. It contains lines, such as the one spanned by $v=(\sqrt3/2,0,0,1/2)$, in magenta, which give the cliques of $d=J-1-Ad_h$, but no planes, the signature being $(3,1)$, and so $\omega=4$.}\label{fig:cone} \end{figure} As for Ramsey, for $V=M_n$, with $X$ given by a subspace $\mathcal S$ as in Proposition \ref{prop:mnsimple}, a projection $p$ is independent precisely when $p\mathcal Sp=0$, and in particular it is a quantum anticlique for the operator system $\mathbb C1+\mathcal S$, in the sense of Weaver \cite{wra}, who proved a quantum Ramsey theorem for the operator systems. \begin{question} Find the quantum versions of the Motzkin-Straus, Tur\'an and Ramsey theorems, in our setting. Is there a notion of clique number for which the reverse Motzkin-Straus inequality holds? \end{question} \medskip\noindent\textbf{Random graphs.} Regarding random graphs, the Erd\H os-R\'enyi graph $G(N,p)$ \cite{err} has independent edges, each present with probability $p$, and its spectrum consists of an eigenvalue close to $pN$, and of a bulk following the Wigner semicircle law \cite{wig}, of radius $2\sqrt{p(1-p)N}$. In the quantum case, random quantum graphs in the operator system framework were studied by Chirvasitu and Wasilewski \cite{cwa}. In our framework, by Proposition \ref{prop:mnsimple}, the simple quantum graphs over $M_n$ correspond to the subspaces $\mathcal S$ of the real space of traceless self-adjoint matrices, of dimension $n^2-1$, and this suggests: \begin{definition} The random quantum graph $X(n,p)$ over $M_n$, with $0,black!60] (-5.28,0)--(5.50,0) node[right] {$x$}; \fill[qblue!30,draw=qblue,line width=.4pt] (-4.400,0) rectangle (-3.960,0.712); \fill[qblue!30,draw=qblue,line width=.4pt] (-3.960,0) rectangle (-3.520,1.288); \fill[qblue!30,draw=qblue,line width=.4pt] (-3.520,0) rectangle (-3.080,1.688); \fill[qblue!30,draw=qblue,line width=.4pt] (-3.080,0) rectangle (-2.640,2.000); \fill[qblue!30,draw=qblue,line width=.4pt] (-2.640,0) rectangle (-2.200,2.088); \fill[qblue!30,draw=qblue,line width=.4pt] (-2.200,0) rectangle (-1.760,2.360); \fill[qblue!30,draw=qblue,line width=.4pt] (-1.760,0) rectangle (-1.320,2.360); \fill[qblue!30,draw=qblue,line width=.4pt] (-1.320,0) rectangle (-0.880,2.448); \fill[qblue!30,draw=qblue,line width=.4pt] (-0.880,0) rectangle (-0.440,2.536); \fill[qblue!30,draw=qblue,line width=.4pt] (-0.440,0) rectangle (0.000,2.584); \fill[qblue!30,draw=qblue,line width=.4pt] (0.000,0) rectangle (0.440,2.536); \fill[qblue!30,draw=qblue,line width=.4pt] (0.440,0) rectangle (0.880,2.448); \fill[qblue!30,draw=qblue,line width=.4pt] (0.880,0) rectangle (1.320,2.488); \fill[qblue!30,draw=qblue,line width=.4pt] (1.320,0) rectangle (1.760,2.360); \fill[qblue!30,draw=qblue,line width=.4pt] (1.760,0) rectangle (2.200,2.272); \fill[qblue!30,draw=qblue,line width=.4pt] (2.200,0) rectangle (2.640,2.184); \fill[qblue!30,draw=qblue,line width=.4pt] (2.640,0) rectangle (3.080,1.912); \fill[qblue!30,draw=qblue,line width=.4pt] (3.080,0) rectangle (3.520,1.688); \fill[qblue!30,draw=qblue,line width=.4pt] (3.520,0) rectangle (3.960,1.248); \fill[qblue!30,draw=qblue,line width=.4pt] (3.960,0) rectangle (4.400,0.800); \draw[magenta,line width=1.3pt] plot[smooth] coordinates {(-4.400,0.000) (-4.180,0.792) (-3.960,1.112) (-3.740,1.344) (-3.520,1.528) (-3.300,1.688) (-3.080,1.816) (-2.860,1.936) (-2.640,2.040) (-2.420,2.128) (-2.200,2.208) (-1.980,2.272) (-1.760,2.336) (-1.540,2.384) (-1.320,2.432) (-1.100,2.464) (-0.880,2.496) (-0.660,2.520) (-0.440,2.536) (-0.220,2.544) (0.000,2.544) (0.220,2.544) (0.440,2.536) (0.660,2.520) (0.880,2.496) (1.100,2.464) (1.320,2.432) (1.540,2.384) (1.760,2.336) (1.980,2.272) (2.200,2.208) (2.420,2.128) (2.640,2.040) (2.860,1.936) (3.080,1.816) (3.300,1.688) (3.520,1.528) (3.740,1.344) (3.960,1.112) (4.180,0.792) (4.400,0.000)}; \draw[black!60] (-4.40,-0.08)--(-4.40,0.08); \node[below,font=\scriptsize] at (-4.40,-0.08) {$-2$}; \draw[black!60] (-2.20,-0.08)--(-2.20,0.08); \node[below,font=\scriptsize] at (-2.20,-0.08) {$-1$}; \draw[black!60] (0.00,-0.08)--(0.00,0.08); \node[below,font=\scriptsize] at (0.00,-0.08) {$0$}; \draw[black!60] (2.20,-0.08)--(2.20,0.08); \node[below,font=\scriptsize] at (2.20,-0.08) {$1$}; \draw[black!60] (4.40,-0.08)--(4.40,0.08); \node[below,font=\scriptsize] at (4.40,-0.08) {$2$}; \end{tikzpicture} \caption{The bulk of the spectrum of the random quantum graph $X(30,1/2)$ over $M_{30}$, with $N=900$, rescaled via $x\to(x+p)/\sqrt{p(1-p)N}$, as a histogram of the $899$ eigenvalues, and the semicircle law of radius $2$, in magenta, as computed by {\tt pictures.py}.}\label{fig:semicircle} \end{figure} Observe that $d$ is, up to normalization, the realignment of the orthogonal projection onto $\mathcal S\subset M_n(\mathbb C)\simeq\mathbb C^{n^2}$, because the rank one operator $\theta_{a,b}$ corresponds to $a\otimes b^*$ in the $\circ$-picture, and to $|a>==\psi(d(1)x)$, so $\psi(d(1)\,.)$ is stationary, as claimed. \end{proof} Classically, the stationary distribution is proportional to the degrees, as in Figure \ref{fig:stationary}, and the above result is the quantum analogue of this, with $\psi(d(1)\,.)$ playing the role of the degree measure. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[qblue,line width=1.1pt] (0.00,0.00)--(1.40,0.00); \draw[qblue,line width=1.1pt] (1.40,0.00)--(0.70,1.10); \draw[qblue,line width=1.1pt] (0.70,1.10)--(0.00,0.00); \draw[qblue,line width=1.1pt] (0.70,1.10)--(2.40,1.10); \fill[qgold] (0.00,0.00) circle[radius=8.5pt]; \node[font=\scriptsize,above right] at (0.12,0.10) {$2/8$}; \fill[qgold] (1.40,0.00) circle[radius=8.5pt]; \node[font=\scriptsize,above right] at (1.52,0.10) {$2/8$}; \fill[qgold] (0.70,1.10) circle[radius=11.2pt]; \node[font=\scriptsize,above right] at (0.82,1.20) {$3/8$}; \fill[qgold] (2.40,1.10) circle[radius=5.8pt]; \node[font=\scriptsize,above right] at (2.52,1.20) {$1/8$}; \end{tikzpicture} \caption{The stationary distribution of the random walk on a triangle with a pendant vertex, which is proportional to the degrees $2,2,3,1$, as checked by {\tt pictures.py}.}\label{fig:stationary} \end{figure} This is checked numerically by the program {\tt walks.py}, for random positively weighted undirected quantum graphs. Thus the random walk on a quantum graph is a quantum channel, whose stationary form is given by the degree, exactly as in the classical case. In the regular case, of valence $k>0$, we have $P=d/k$ and $L=k(1-P)$, so the continuous time version $e^{kt(P-1)}$ is the heat flow $e^{-tL}$ from section 6, while for general degrees these have different generators. In the connected regular case, the eigenvalues of $P$ are in $[-1,1]$, with $1$ being simple, and by Theorem \ref{thm:bipartite}, $-1$ is an eigenvalue precisely when $X$ is bipartite. Thus, when $X$ is not bipartite, $P^m(x)$ converges to $\psi(x)1/N$, exponentially fast, as illustrated in Figure \ref{fig:walks}. In the bipartite case the walk oscillates: for the quantum square we have $P(\sigma_y)=-\sigma_y$, and so $P^m(\sigma_y)=(-1)^m\sigma_y$, exactly as for the classical segment, and only the averages of the first $m$ powers converge, as checked by {\tt walks.py}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[->,black!60] (0,-3.30)--(7.20,-3.30) node[right] {$m$}; \draw[->,black!60] (0,-3.30)--(0,0.73); \draw[black!60] (-0.08,-3.300)--(0.08,-3.300) node[left,xshift=-1.5mm,font=\scriptsize] {$10^{-6}$}; \draw[black!60] (-0.08,-2.750)--(0.08,-2.750) node[left,xshift=-1.5mm,font=\scriptsize] {$10^{-5}$}; \draw[black!60] (-0.08,-2.200)--(0.08,-2.200) node[left,xshift=-1.5mm,font=\scriptsize] {$10^{-4}$}; \draw[black!60] (-0.08,-1.650)--(0.08,-1.650) node[left,xshift=-1.5mm,font=\scriptsize] {$10^{-3}$}; \draw[black!60] (-0.08,-1.100)--(0.08,-1.100) node[left,xshift=-1.5mm,font=\scriptsize] {$10^{-2}$}; \draw[black!60] (-0.08,-0.550)--(0.08,-0.550) node[left,xshift=-1.5mm,font=\scriptsize] {$10^{-1}$}; \draw[black!60] (-0.08,0.000)--(0.08,0.000) node[left,xshift=-1.5mm,font=\scriptsize] {$10^{0}$}; \node[below,font=\scriptsize] at (0.00,-3.35) {$0$}; \node[below,font=\scriptsize] at (1.70,-3.35) {$2$}; \node[below,font=\scriptsize] at (3.40,-3.35) {$4$}; \node[below,font=\scriptsize] at (5.10,-3.35) {$6$}; \node[below,font=\scriptsize] at (6.80,-3.35) {$8$}; \draw[qblue,line width=1.2pt] (0.00,0.049)--(0.85,-0.212)--(1.70,-0.475)--(2.55,-0.737)--(3.40,-1.000)--(4.25,-1.262)--(5.10,-1.525)--(5.95,-1.787)--(6.80,-2.049); \fill[qblue] (0.00,0.049) circle[radius=1.6pt]; \fill[qblue] (0.85,-0.212) circle[radius=1.6pt]; \fill[qblue] (1.70,-0.475) circle[radius=1.6pt]; \fill[qblue] (2.55,-0.737) circle[radius=1.6pt]; \fill[qblue] (3.40,-1.000) circle[radius=1.6pt]; \fill[qblue] (4.25,-1.262) circle[radius=1.6pt]; \fill[qblue] (5.10,-1.525) circle[radius=1.6pt]; \fill[qblue] (5.95,-1.787) circle[radius=1.6pt]; \fill[qblue] (6.80,-2.049) circle[radius=1.6pt]; \draw[qgold,line width=1.2pt] (0.00,0.161)--(0.85,-0.064)--(1.70,-0.250)--(2.55,-0.422)--(3.40,-0.589)--(4.25,-0.755)--(5.10,-0.921)--(5.95,-1.086)--(6.80,-1.252); \fill[qgold] (0.00,0.161) circle[radius=1.6pt]; \fill[qgold] (0.85,-0.064) circle[radius=1.6pt]; \fill[qgold] (1.70,-0.250) circle[radius=1.6pt]; \fill[qgold] (2.55,-0.422) circle[radius=1.6pt]; \fill[qgold] (3.40,-0.589) circle[radius=1.6pt]; \fill[qgold] (4.25,-0.755) circle[radius=1.6pt]; \fill[qgold] (5.10,-0.921) circle[radius=1.6pt]; \fill[qgold] (5.95,-1.086) circle[radius=1.6pt]; \fill[qgold] (6.80,-1.252) circle[radius=1.6pt]; \draw[black!60,line width=1.2pt] (0.00,0.161)--(0.85,-0.116)--(1.70,-0.281)--(2.55,-0.447)--(3.40,-0.612)--(4.25,-0.778)--(5.10,-0.943)--(5.95,-1.109)--(6.80,-1.274); \fill[black!60] (0.00,0.161) circle[radius=1.6pt]; \fill[black!60] (0.85,-0.116) circle[radius=1.6pt]; \fill[black!60] (1.70,-0.281) circle[radius=1.6pt]; \fill[black!60] (2.55,-0.447) circle[radius=1.6pt]; \fill[black!60] (3.40,-0.612) circle[radius=1.6pt]; \fill[black!60] (4.25,-0.778) circle[radius=1.6pt]; \fill[black!60] (5.10,-0.943) circle[radius=1.6pt]; \fill[black!60] (5.95,-1.109) circle[radius=1.6pt]; \fill[black!60] (6.80,-1.274) circle[radius=1.6pt]; \draw[magenta,line width=1.2pt] (0.00,0.161)--(0.85,-0.335)--(1.70,-0.832)--(2.55,-1.329)--(3.40,-1.825)--(4.25,-2.322)--(5.10,-2.819); \fill[magenta] (0.00,0.161) circle[radius=1.6pt]; \fill[magenta] (0.85,-0.335) circle[radius=1.6pt]; \fill[magenta] (1.70,-0.832) circle[radius=1.6pt]; \fill[magenta] (2.55,-1.329) circle[radius=1.6pt]; \fill[magenta] (3.40,-1.825) circle[radius=1.6pt]; \fill[magenta] (4.25,-2.322) circle[radius=1.6pt]; \fill[magenta] (5.10,-2.819) circle[radius=1.6pt]; \draw[qblue,line width=1.2pt] (7.70,0.25)--++(0.45,0) node[right,text=black,font=\footnotesize] {simplex over $M_2$, rate $1/3$}; \draw[qgold,line width=1.2pt] (7.70,-0.17)--++(0.45,0) node[right,text=black,font=\footnotesize] {quantum torus over $M_3$, rate $1/2$}; \draw[black!60,line width=1.2pt] (7.70,-0.59)--++(0.45,0) node[right,text=black,font=\footnotesize] {$J-3E$ over $M_3$, rate $1/2$}; \draw[magenta,line width=1.2pt] (7.70,-1.01)--++(0.45,0) node[right,text=black,font=\footnotesize] {simplex over $M_3$, rate $1/8$}; \end{tikzpicture} \caption{The convergence of the quantum random walks $P^m(x)\to\psi(x)1/N$, for a fixed $x$, on a logarithmic scale, as computed by {\tt pictures.py}. The rate is the second largest absolute value of an eigenvalue of $P$, which for these regular quantum graphs is $P=d/k$.}\label{fig:walks} \end{figure} For the regular graphs, the return probabilities of the random walk are the moments of the spectral measure, which for large girth is the Kesten-McKay law \cite{kes}, \cite{mck}, and the quantum version of this is a natural question. \medskip\noindent\textbf{Electrical networks.} Regarding electrical networks, classically the effective resistance between $i$ and $j$ is given by $R_{ij}=$, with $L^+$ being the pseudo-inverse of the Laplacian, and the commute time of the random walk between $i$ and $j$ is $\kappa_{ij}=(\sum_{kl}d_{kl})R_{ij}$, see Lyons and Peres \cite{lpe}. The effective resistances satisfy the Thomson principle, which characterizes them as minimal energies of flows, and the Rayleigh monotonicity, stating that adding edges decreases them. Also, the Foster theorem \cite{fos} states that $\sum_{i\sim j}d_{ij}R_{ij}=N-1$ for a connected graph, and the Kirchhoff theorem states that the probability for an edge $e$ to belong to a random spanning tree is $d_eR_e$, see Burton and Pemantle \cite{bpe}, and Lyons \cite{lyo}. As an illustration, for the square $a,b,c,d$ with the diagonal $ac$, and unit conductances, a unit current from $a$ to $c$ splits as in Figure \ref{fig:network}, with $R_{ac}=1/2$, and the other 4 edges having effective resistance $5/8$, so that the Foster sum is $4\cdot5/8+1/2=3=N-1$, as checked by {\tt pictures.py}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small,>={Stealth[length=2.2mm]}] \coordinate (a) at (0,1.5); \coordinate (b) at (2.4,1.5); \coordinate (c) at (2.4,0); \coordinate (d) at (0,0); \foreach \u/\v/\pos in {a/b/above,b/c/right,a/d/left,d/c/below}{\draw[qblue,line width=1.2pt] (\u)--(\v); \draw[->,qblue,line width=1.2pt] (\u)--($(\u)!0.6!(\v)$); \node[\pos] at ($(\u)!0.5!(\v)$) {$1/4$};} \draw[magenta,line width=1.6pt] (a)--(c); \draw[->,magenta,line width=1.6pt] (a)--($(a)!0.6!(c)$); \node[above right] at ($(a)!0.45!(c)$) {$1/2$}; \foreach \p/\l/\pos in {a/a/above left,b/b/above right,c/c/below right,d/d/below left}{\fill[black!75] (\p) circle[radius=2.5pt]; \node[\pos] at (\p) {$\l$};} \node[text=magenta] at (-1.4,1.5) {$+1$}; \node[text=magenta] at (3.8,0) {$-1$}; \end{tikzpicture} \caption{A unit current from $a$ to $c$. Half of it takes the diagonal, and the rest splits equally between the $2$ other paths, so that $R_{ac}=1/2$.}\label{fig:network} \end{figure} In the quantum case, we use the quantum incidence map $B:L^2(V)\to H_E$ from section 8, satisfying $L=B^*B$. The elements $\theta\in H_E$ can be thought of as quantum flows, with $B^*$ being the divergence, and $B$ being the gradient, exactly as for the incidence matrices of the classical graphs. With this picture in mind, we can formulate: \begin{definition} The effective resistance of an element $x\in L^2(V)$ with $x\perp\ker L$, regarded as a quantum distribution of charges, is $R(x)=$. \end{definition} In the connected case, the condition $x\perp\ker L$ means $\psi(x)=0$, and for $x=p-q$, with $p,q$ minimal projections of size 1 blocks, we recover the classical notion. We have: \begin{theorem}\label{thm:thomson} Let $X=(V,d)$ be positively weighted and undirected. \begin{enumerate} \item Thomson principle: for $x\perp\ker L$ we have $R(x)=\min\{||\theta||^2\,|\,\theta\in H_E,B^*\theta=x\}$, and the minimum is attained precisely at the current $\theta=BL^+x$. \item Rayleigh monotonicity: if $X$ is connected, and $d'$ is positively weighted and undirected, then the resistances of $X'=(V,d+d')$ satisfy $R_{X'}(x)\leq R_X(x)$, for any $x$ with $\psi(x)=0$. \end{enumerate} \end{theorem} \begin{proof} (1) Since $x\in(\ker L)^\perp=Im(L)$, the element $\theta_0=BL^+x$ satisfies $B^*\theta_0=LL^+x=x$. Also, $\theta_0\in Im(B)=(\ker B^*)^\perp$, so any $\theta$ with $B^*\theta=x$ is of the form $\theta=\theta_0+\eta$ with $\eta\perp\theta_0$, and so $||\theta||^2=||\theta_0||^2+||\eta||^2$. Finally, we have: $$||\theta_0||^2====R(x)$$ (2) The Laplacian depends linearly on $d$, so $L_{X'}=L_X+L_{d'}\geq L_X$, by Theorem \ref{thm:dirichlet} applied to $d'$. Both kernels are $\mathbb C1$, and for positive matrices with the same kernel, $L\leq L'$ implies $(L')^+\leq L^+$, which gives the result. \end{proof} In the classical case, the Thomson principle can be visualized as in Figure \ref{fig:thomson}, for the network from Figure \ref{fig:network}. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[-{Stealth[length=2.6mm,width=2.2mm]},qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (0.00,1.30)--(1.30,1.30); \draw[-{Stealth[length=2.6mm,width=2.2mm]},qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (1.30,1.30)--(1.30,0.00); \draw[-{Stealth[length=2.6mm,width=2.2mm]},qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (0.00,1.30)--(0.00,0.00); \draw[-{Stealth[length=2.6mm,width=2.2mm]},qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (0.00,0.00)--(1.30,0.00); \draw[-{Stealth[length=2.6mm,width=2.2mm]},magenta,line width=1.8pt,shorten >=3pt,shorten <=3pt] (0.00,1.30)--(1.30,0.00); \fill[black!75] (0.00,1.30) circle[radius=2.2pt]; \node[font=\scriptsize] at (-0.22,1.48) {$a$}; \fill[black!75] (1.30,1.30) circle[radius=2.2pt]; \node[font=\scriptsize] at (1.52,1.48) {$b$}; \fill[black!75] (1.30,0.00) circle[radius=2.2pt]; \node[font=\scriptsize] at (1.52,-0.18) {$c$}; \fill[black!75] (0.00,0.00) circle[radius=2.2pt]; \node[font=\scriptsize] at (-0.22,-0.18) {$d$}; \node at (0.65,-0.6) {current, energy $1/2$}; \draw[black!20,line width=.8pt] (4.00,1.30)--(5.30,1.30); \draw[black!20,line width=.8pt] (5.30,1.30)--(5.30,0.00); \draw[black!20,line width=.8pt] (4.00,1.30)--(4.00,0.00); \draw[black!20,line width=.8pt] (4.00,0.00)--(5.30,0.00); \draw[-{Stealth[length=2.6mm,width=2.2mm]},magenta,line width=3.0pt,shorten >=3pt,shorten <=3pt] (4.00,1.30)--(5.30,0.00); \fill[black!75] (4.00,1.30) circle[radius=2.2pt]; \node[font=\scriptsize] at (3.78,1.48) {$a$}; \fill[black!75] (5.30,1.30) circle[radius=2.2pt]; \node[font=\scriptsize] at (5.52,1.48) {$b$}; \fill[black!75] (5.30,0.00) circle[radius=2.2pt]; \node[font=\scriptsize] at (5.52,-0.18) {$c$}; \fill[black!75] (4.00,0.00) circle[radius=2.2pt]; \node[font=\scriptsize] at (3.78,-0.18) {$d$}; \node at (4.65,-0.6) {another flow, energy $1$}; \end{tikzpicture} \caption{A pair of unit flows from $a$ to $c$, with line widths proportional to the flows. The electrical current has energy $\sum_e\theta_e^2=1/2=R_{ac}$, and any other flow, such as the one through the diagonal, has bigger energy, as checked by {\tt pictures.py}.}\label{fig:thomson} \end{figure} Next, we have the quantum analogues of the Foster and Kirchhoff theorems, which connect the effective resistances to the quantum spanning trees from section 8: \begin{theorem}\label{thm:foster} Let $X$ be connected, positively weighted and undirected, and write $B$ in orthonormal bases, as in Theorem \ref{thm:matrixtree}, with $\varepsilon$ denoting the basis elements of $H_E$. \begin{enumerate} \item Foster theorem: we have $\sum_\varepsilon R(B^*\varepsilon)=N-1$. \item Transfer current theorem: if $S$ is a random quantum spanning tree, chosen with probability proportional to its weight, then $P(\varepsilon\in S)=R(B^*\varepsilon)$. \end{enumerate} \end{theorem} \begin{proof} Observe first that $B^*\varepsilon\in Im(B^*)=(\ker B)^\perp=(\ker L)^\perp$, so the resistances are defined. (1) We have $\sum_\varepsilon=Tr(BL^+B^*)=Tr(L^+B^*B)=Tr(L^+L)$, which is the rank of $L$, namely $N-1$. (2) With $C=B_{(i)}$ being $B$ with column $i$ removed, as in Theorem \ref{thm:matrixtree}, the probability of $S$ is $|\det C_S|^2/\det(C^*C)$, and this is a determinantal measure, whose kernel is the orthogonal projection $C(C^*C)^{-1}C^*$ onto $Im(C)$, see \cite{bpe}, \cite{lyo}. Thus $P(\varepsilon\in S)$ is the corresponding diagonal entry. But $Im(C)=Im(B)$, because $Bv=0$ with $v_i\neq0$, and the orthogonal projection onto $Im(B)$ is $BL^+B^*$, so $P(\varepsilon\in S)==R(B^*\varepsilon)$. Finally, observe that (1) follows from (2), because the quantum spanning trees have $N-1$ elements. \end{proof} Classically, these results can be checked by hand on small examples, such as the square in Figure \ref{fig:transfer}, where each edge $e$ is in parallel with a path of resistance 3, so that $R_e=1\cdot3/(1+3)=3/4$. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \draw[magenta,line width=1.4pt] (0.00,0.90)--(0.90,0.90); \draw[qblue,line width=1.4pt] (0.90,0.90)--(0.90,0.00); \draw[qblue,line width=1.4pt] (0.90,0.00)--(0.00,0.00); \draw[qblue,line width=1.4pt] (0.00,0.00)--(0.00,0.90); \fill[black!75] (0.00,0.90) circle[radius=2.2pt]; \fill[black!75] (0.90,0.90) circle[radius=2.2pt]; \fill[black!75] (0.90,0.00) circle[radius=2.2pt]; \fill[black!75] (0.00,0.00) circle[radius=2.2pt]; \node[above,text=magenta,font=\scriptsize] at (0.45,0.95) {$R_e=3/4$}; \draw[black!25,dashed,line width=.8pt] (2.20,0.90)--(3.10,0.90); \draw[qblue,line width=1.3pt] (3.10,0.90)--(3.10,0.00); \draw[qblue,line width=1.3pt] (3.10,0.00)--(2.20,0.00); \draw[qblue,line width=1.3pt] (2.20,0.00)--(2.20,0.90); \fill[black!75] (2.20,0.90) circle[radius=2.2pt]; \fill[black!75] (3.10,0.90) circle[radius=2.2pt]; \fill[black!75] (3.10,0.00) circle[radius=2.2pt]; \fill[black!75] (2.20,0.00) circle[radius=2.2pt]; \draw[magenta,line width=1.3pt] (3.70,0.90)--(4.60,0.90); \draw[black!25,dashed,line width=.8pt] (4.60,0.90)--(4.60,0.00); \draw[qblue,line width=1.3pt] (4.60,0.00)--(3.70,0.00); \draw[qblue,line width=1.3pt] (3.70,0.00)--(3.70,0.90); \fill[black!75] (3.70,0.90) circle[radius=2.2pt]; \fill[black!75] (4.60,0.90) circle[radius=2.2pt]; \fill[black!75] (4.60,0.00) circle[radius=2.2pt]; \fill[black!75] (3.70,0.00) circle[radius=2.2pt]; \draw[magenta,line width=1.3pt] (5.20,0.90)--(6.10,0.90); \draw[qblue,line width=1.3pt] (6.10,0.90)--(6.10,0.00); \draw[black!25,dashed,line width=.8pt] (6.10,0.00)--(5.20,0.00); \draw[qblue,line width=1.3pt] (5.20,0.00)--(5.20,0.90); \fill[black!75] (5.20,0.90) circle[radius=2.2pt]; \fill[black!75] (6.10,0.90) circle[radius=2.2pt]; \fill[black!75] (6.10,0.00) circle[radius=2.2pt]; \fill[black!75] (5.20,0.00) circle[radius=2.2pt]; \draw[magenta,line width=1.3pt] (6.70,0.90)--(7.60,0.90); \draw[qblue,line width=1.3pt] (7.60,0.90)--(7.60,0.00); \draw[qblue,line width=1.3pt] (7.60,0.00)--(6.70,0.00); \draw[black!25,dashed,line width=.8pt] (6.70,0.00)--(6.70,0.90); \fill[black!75] (6.70,0.90) circle[radius=2.2pt]; \fill[black!75] (7.60,0.90) circle[radius=2.2pt]; \fill[black!75] (7.60,0.00) circle[radius=2.2pt]; \fill[black!75] (6.70,0.00) circle[radius=2.2pt]; \end{tikzpicture} \caption{The square $C_4$ with unit conductances. An edge $e$, in magenta, has effective resistance $3/4$, and lies in $3$ of the $4$ spanning trees, as computed by {\tt pictures.py}, in agreement with the transfer current theorem. The Foster sum is $4\cdot3/4=3=N-1$.}\label{fig:transfer} \end{figure} In the classical case, each edge $e=\{i,j\}$ gives 2 coordinates $\varepsilon$, one for each orientation, with $B^*\varepsilon=\pm\sqrt{d_e/2}\,(e_i-e_j)$, so the 2 corresponding resistances sum up to $d_eR_e$, and we recover the Foster and Kirchhoff theorems. In the quantum case, the resistances $R(B^*\varepsilon)$ are the weights of the quantum edges, in the electrical sense. The program {\tt networks.py} checks Theorem \ref{thm:thomson} and Theorem \ref{thm:foster} on $K_4$, on the quantum square, and on random quantum graphs over $\mathbb C\oplus M_2$ and $M_2\oplus M_2$, by enumerating the quantum spanning trees. \medskip\noindent\textbf{Flows.} As for the flows, the max-flow min-cut theorem of Ford and Fulkerson \cite{ffu} states that the maximal value of a flow between 2 vertices, subject to capacity constraints on the edges, equals the minimal capacity of a cut separating them. For instance, in the network in Figure \ref{fig:maxflow}, the maximal flow and the minimal cut are both equal to 5. \begin{figure}[H] \centering \begin{tikzpicture}[font=\small] \coordinate (s) at (0,0); \coordinate (a) at (2.2,0.65); \coordinate (b) at (2.2,-0.65); \coordinate (t) at (4.4,0); \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (s)--(a) node[pos=0.6,above left,font=\scriptsize] {$3/3$}; \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (s)--(b) node[pos=0.6,below left,font=\scriptsize] {$2/2$}; \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (a)--(b) node[midway,right,font=\scriptsize] {$1/1$}; \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (a)--(t) node[midway,above right,font=\scriptsize] {$2/2$}; \draw[->,qblue,line width=1.2pt,shorten >=3pt,shorten <=3pt] (b)--(t) node[midway,below right,font=\scriptsize] {$3/3$}; \draw[magenta,dashed,line width=1pt] (0.55,0.95) .. controls (0.4,0) .. (0.55,-0.95); \node[text=magenta,font=\scriptsize] at (-0.2,-0.8) {cut $5$}; \foreach \p/\l/\pos in {s/s/left,a/a/above,b/b/below,t/t/right}{\fill[black!75] (\p) circle[radius=2.6pt]; \node[\pos] at (\p) {$\l$};} \end{tikzpicture} \caption{A maximal flow from $s$ to $t$, with each edge labeled flow/capacity. Its value $5$ is the capacity of the cut around $s$, which is minimal, as checked by {\tt pictures.py}.}\label{fig:maxflow} \end{figure} In the quantum case we have the flows $\theta\in H_E$, with divergence $B^*\theta$, the natural capacity constraints being bounds on the norms of the components $\theta_{rsk}$, and the cuts $cut(p)=$ from section 8, with $p\in C(V)$ projection. This suggests: \begin{question} Is there a quantum max-flow min-cut theorem, for the flows $\theta\in H_E$, and the cuts $cut(p)$? \end{question} Classically, the max-flow min-cut theorem is a linear programming duality, and in the quantum case the natural framework would be that of semidefinite programming, as for the quantum Lov\'asz number \cite{dsw}, with new quantities interpolating between cuts and flows. \begin{thebibliography}{99} \bibitem{ami}N. Alon and V.D. Milman, $\lambda_1$, isoperimetric inequalities for graphs, and superconcentrators, {\em J. Combin. Theory Ser. B} {\bf 38} (1985), 73--88. \bibitem{and}N. Andruskiewitsch, About finite dimensional Hopf algebras, {\em Contemp. Math.} {\bf 294} (2002), 1--57. \bibitem{adk}A.S. \'Arnad\'ottir, J. van Dobben de Bruyn, P.N. Kar, D.E. Roberson and P. Zeman, Quantum automorphism groups of lexicographic products of graphs, {\em J. Lond. Math. Soc.} {\bf 111} (2025), 1--24. \bibitem{ane}G. Aubrun and I. Nechita, Realigning random states, {\em J. Math. Phys.} {\bf 53} (2012), 102210. \bibitem{ba1}T. Banica, Symmetries of a generic coaction, {\em Math. Ann.} {\bf 314} (1999), 763--780. \bibitem{ba2}T. Banica, Quantum groups and Fuss-Catalan algebras, {\em Comm. Math. Phys.} {\bf 226} (2002), 221--232. \bibitem{ba3}T. Banica, Quantum automorphism groups of homogeneous graphs, {\em J. Funct. Anal.} {\bf 224} (2005), 243--280. \bibitem{ba4}T. Banica, The planar algebra of a coaction, {\em J. Operator Theory} {\bf 53} (2005), 119--158. \bibitem{bb1}T. Banica and J. Bichon, Free product formulae for quantum permutation groups, {\em J. Inst. Math. Jussieu} {\bf 6} (2007), 381--414. \bibitem{bb2}T. Banica and J. Bichon, Quantum automorphism groups of vertex-transitive graphs of order $\leq11$, {\em J. Algebraic Combin.} {\bf 26} (2007), 83--105. \bibitem{bbc}T. Banica, J. Bichon and S. Curran, Quantum automorphisms of twisted group algebras and free hypergeometric laws, {\em Proc. Amer. Math. Soc.} {\bf 139} (2011), 3961--3971. \bibitem{bve}T. Banica and R. Vergnioux, Fusion rules for quantum reflection groups, {\em J. Noncommut. Geom.} {\bf 3} (2009), 327--359. \bibitem{bi2}J. Bichon, Free wreath product by the quantum permutation group, {\em Algebr. Represent. Theory} {\bf 7} (2004), 343--362. \bibitem{bna}J. Bichon and S. Natale, Hopf algebra deformations of binary polyhedral groups, {\em Transform. Groups} {\bf 16} (2011), 339--374. \bibitem{bis}D. Bisch, A note on intermediate subfactors, {\em Pacific J. Math.} {\bf 163} (1994), 201--216. \bibitem{bjo}D. Bisch and V.F.R. Jones, Algebras associated to intermediate subfactors, {\em Invent. Math.} {\bf 128} (1997), 89--157. \bibitem{bj2}D. Bisch and V.F.R. Jones, Singly generated planar algebras of small dimension, {\em Duke Math. J.} {\bf 101} (2000), 41--75. \bibitem{bj3}D. Bisch and V.F.R. Jones, Singly generated planar algebras of small dimension, Part II, {\em Adv. Math.} {\bf 175} (2003), 297--318. \bibitem{bjl}D. Bisch, V.F.R. Jones and Z. Liu, Singly generated planar algebras of small dimension, Part III, {\em Trans. Amer. Math. Soc.} {\bf 369} (2017), 2461--2476. \bibitem{bce}M. Brannan, A. Chirvasitu, K. Eifler, S. Harris, V. Paulsen, X. Su and M. Wasilewski, Bigalois extensions and the graph isomorphism game, {\em Comm. Math. Phys.} {\bf 375} (2020), 1777--1809. \bibitem{bgh}M. Brannan, P. Ganesan and S.J. Harris, The quantum-to-classical graph homomorphism game, {\em J. Math. Phys.} {\bf 63} (2022), 112204. \bibitem{bgm}M. Brannan, D. Gromada, J. Matsuda, A. Skalski and M. Wasilewski, A quantum Frucht's theorem and quantum automorphisms of quantum Cayley graphs, arXiv:2503.11149 (2025). \bibitem{bhv}N. Bravo Hern\'andez, R. Hern\'andez Palomares and F. Viales Sol\'is, Quantum graphs and spin models, arXiv:2601.01246 (2026). \bibitem{bhe}A.E. Brouwer and W.H. Haemers, Spectra of graphs, Springer (2012). \bibitem{bpe}R. Burton and R. Pemantle, Local characteristics, entropy and limit theorems for spanning trees and domino tilings via transfer-impedances, {\em Ann. Probab.} {\bf 21} (1993), 1329--1371. \bibitem{cay}A. Cayley, A theorem on trees, {\em Quart. J. Pure Appl. Math.} {\bf 23} (1889), 376--378. \bibitem{cha}A. Chassaniol, Quantum automorphism group of the lexicographic product of finite regular graphs, {\em J. Algebra} {\bf 456} (2016), 23--45. \bibitem{csw}A. Chirvasitu, P.M. Soltan and M. Wasilewski, Quantum-rigid random quantum graphs, arXiv:2510.21503 (2025). \bibitem{cwa}A. Chirvasitu and M. Wasilewski, Random quantum graphs, {\em Trans. Amer. Math. Soc.} {\bf 375} (2022), 3061--3087. \bibitem{cho}M.D. Choi, A Schwarz inequality for positive linear maps on $C^*$-algebras, {\em Illinois J. Math.} {\bf 18} (1974), 565--574. \bibitem{ch2}M.D. Choi, Completely positive linear maps on complex matrices, {\em Linear Algebra Appl.} {\bf 10} (1975), 285--290. \bibitem{chu}F.R.K. Chung, Spectral graph theory, AMS (1997). \bibitem{cip}F. Cipriani, Dirichlet forms and Markovian semigroups on standard forms of von Neumann algebras, {\em J. Funct. Anal.} {\bf 147} (1997), 259--300. \bibitem{cte}Codex and Teo, The magic of free spheres, zenodo:24434373 (2026). \bibitem{cdv}Y. Colin de Verdi\`ere, Sur un nouvel invariant des graphes et un crit\`ere de planarit\'e, {\em J. Combin. Theory Ser. B} {\bf 50} (1990), 11--21. \bibitem{cgw}K. Courtney, P. Ganesan and M. Wasilewski, Connectivity for quantum graphs via quantum adjacency operators, arXiv:2505.22519 (2025). \bibitem{daw}M. Daws, Quantum graphs: different perspectives, homomorphisms and quantum automorphisms, {\em Commun. Am. Math. Soc.} {\bf 4} (2024), 117--181. \bibitem{doi}Y. Doi, Braided bialgebras and quadratic bialgebras, {\em Comm. Algebra} {\bf 21} (1993), 1731--1749. \bibitem{dsw}R. Duan, S. Severini and A. Winter, Zero-error communication via quantum channels, noncommutative graphs, and a quantum Lov\'asz number, {\em IEEE Trans. Inform. Theory} {\bf 59} (2013), 1164--1174. \bibitem{err}P. Erd\H os and A. R\'enyi, On random graphs I, {\em Publ. Math. Debrecen} {\bf 6} (1959), 290--297. \bibitem{ege}P. Etingof and S. Gelaki, A method of construction of finite-dimensional triangular semisimple Hopf algebras, {\em Math. Res. Lett.} {\bf 5} (1998), 551--561. \bibitem{ehk}D.E. Evans and R. H\o egh-Krohn, Spectral properties of positive maps on $C^*$-algebras, {\em J. London Math. Soc.} {\bf 17} (1978), 345--355. \bibitem{fba}C. Fable and T. Banica, Noncommutative curves and surfaces in small degree, zenodo:24425290 (2026). \bibitem{fgu}E. Farhi and S. Gutmann, Quantum computation and decision trees, {\em Phys. Rev. A} {\bf 58} (1998), 915--928. \bibitem{fpi}P. Fima and L. Pittau, The free wreath product of a compact quantum group by a quantum automorphism group, {\em J. Funct. Anal.} {\bf 271} (2016), 1996--2043. \bibitem{ffu}L.R. Ford and D.R. Fulkerson, Maximal flow through a network, {\em Canad. J. Math.} {\bf 8} (1956), 399--404. \bibitem{fos}R.M. Foster, The average impedance of an electrical network, in ``Contributions to applied mechanics'', Edwards Brothers (1949), 333--340. \bibitem{fru}R. Frucht, Herstellung von Graphen mit vorgegebener abstrakter Gruppe, {\em Compos. Math.} {\bf 6} (1939), 239--250. \bibitem{gna}C. Galindo and S. Natale, Simple Hopf algebras and deformations of finite groups, {\em Math. Res. Lett.} {\bf 14} (2007), 943--954. \bibitem{gan}P. Ganesan, Spectral bounds for the quantum chromatic number of quantum graphs, {\em Linear Algebra Appl.} {\bf 674} (2023), 351--376. \bibitem{gks}V. Gorini, A. Kossakowski and E.C.G. Sudarshan, Completely positive dynamical semigroups of N-level systems, {\em J. Math. Phys.} {\bf 17} (1976), 821--825. \bibitem{gre}J. Greene, Traces of matrix products, {\em Electron. J. Linear Algebra} {\bf 27} (2014), 716--734. \bibitem{gr2}D. Gromada, Some examples of quantum graphs, {\em Lett. Math. Phys.} {\bf 112} (2022), 122. \bibitem{gr3}D. Gromada, Quantum symmetries of Cayley graphs of abelian groups, {\em Glasg. Math. J.} {\bf 65} (2023), 655--686. \bibitem{hae}W.H. Haemers, Interlacing eigenvalues and graphs, {\em Linear Algebra Appl.} {\bf 226/228} (1995), 593--616. \bibitem{has}K. Hashimoto, Zeta functions of finite graphs and representations of p-adic groups, {\em Adv. Stud. Pure Math.} {\bf 15} (1989), 211--280. \bibitem{hof}A.J. Hoffman, On eigenvalues and colorings of graphs, in ``Graph theory and its applications'', Academic Press (1970), 79--91. \bibitem{jon}V.F.R. Jones, Index for subfactors, {\em Invent. Math.} {\bf 72} (1983), 1--25. \bibitem{jo2}V.F.R. Jones, The planar algebra of a bipartite graph, in ``Knots in Hellas '98'', World Sci. (2000), 94--117. \bibitem{jo3}V.F.R. Jones, Planar algebras I, {\em New Zealand J. Math.} {\bf 52} (2021), 1--107. \bibitem{kes}H. Kesten, Symmetric random walks on groups, {\em Trans. Amer. Math. Soc.} {\bf 92} (1959), 336--354. \bibitem{kir}G. Kirchhoff, \"Uber die Aufl\"osung der Gleichungen, auf welche man bei der Untersuchung der linearen Vertheilung galvanischer Str\"ome gef\"uhrt wird, {\em Ann. Phys. Chem.} {\bf 72} (1847), 497--508. \bibitem{kra}K. Kraus, General state changes in quantum theory, {\em Ann. Physics} {\bf 64} (1971), 311--335. \bibitem{kwe}G. Kuperberg and N. Weaver, A von Neumann algebra approach to quantum metrics, {\em Mem. Amer. Math. Soc.} {\bf 215} (2012). \bibitem{kur}K. Kuratowski, Sur le probl\`eme des courbes gauches en topologie, {\em Fund. Math.} {\bf 15} (1930), 271--283. \bibitem{lta}F. Lemeux and P. Tarrago, Free wreath product quantum groups: the monoidal category, approximation properties and free probability, {\em J. Funct. Anal.} {\bf 270} (2016), 3828--3883. \bibitem{lin}G. Lindblad, On the generators of quantum dynamical semigroups, {\em Comm. Math. Phys.} {\bf 48} (1976), 119--130. \bibitem{lov}L. Lov\'asz, On the Shannon capacity of a graph, {\em IEEE Trans. Inform. Theory} {\bf 25} (1979), 1--7. \bibitem{lgl}L. Lov\'asz, Large networks and graph limits, AMS (2012). \bibitem{lsc}L. Lov\'asz and A. Schrijver, A Borsuk theorem for antipodal links and a spectral characterization of linklessly embeddable graphs, {\em Proc. Amer. Math. Soc.} {\bf 126} (1998), 1275--1285. \bibitem{lyo}R. Lyons, Determinantal probability measures, {\em Publ. Math. Inst. Hautes \'Etudes Sci.} {\bf 98} (2003), 167--212. \bibitem{lpe}R. Lyons and Y. Peres, Probability on trees and networks, Cambridge Univ. Press (2016). \bibitem{mro}L. Man\v cinska and D.E. Roberson, Quantum isomorphism is equivalent to equality of homomorphism counts from planar graphs, in ``61st FOCS'' (2020), 661--672. \bibitem{man}W. Mantel, Problem 28, {\em Wiskundige Opgaven} {\bf 10} (1907), 60--61. \bibitem{mat}J. Matsuda, Classification of quantum graphs on $M_2$ and their quantum automorphism groups, {\em J. Math. Phys.} {\bf 63} (2022), 092201. \bibitem{ma2}J. Matsuda, Algebraic connectedness and bipartiteness of quantum graphs, {\em Comm. Math. Phys.} {\bf 405} (2024), 185. \bibitem{mck}B.D. McKay, The expected eigenvalue distribution of a large regular graph, {\em Linear Algebra Appl.} {\bf 40} (1981), 203--216. \bibitem{mst}T.S. Motzkin and E.G. Straus, Maxima for graphs and a new proof of a theorem of Tur\'an, {\em Canad. J. Math.} {\bf 17} (1965), 533--540. \bibitem{mrz}C. Mrozinski, Quantum automorphism groups and $SO(3)$-deformations, {\em J. Pure Appl. Algebra} {\bf 219} (2015), 1--32. \bibitem{mrv}B. Musto, D.J. Reutter and D. Verdon, A compositional approach to quantum functions, {\em J. Math. Phys.} {\bf 59} (2018), 081706. \bibitem{nos}E. Nosal, Eigenvalues of graphs, Master's thesis, University of Calgary (1970). \bibitem{pit}L. Pittau, The free wreath product of a discrete group by a quantum automorphism group, {\em Proc. Amer. Math. Soc.} {\bf 144} (2016), 1985--2001. \bibitem{ram}F.P. Ramsey, On a problem of formal logic, {\em Proc. London Math. Soc.} {\bf 30} (1930), 264--286. \bibitem{scb}P. Schauenburg, Hopf bigalois extensions, {\em Comm. Algebra} {\bf 24} (1996), 3797--3825. \bibitem{spe}S. Schmidt, The Petersen graph has no quantum symmetry, {\em Bull. Lond. Math. Soc.} {\bf 50} (2018), 395--400. \bibitem{sta}D. Stahlke, Quantum zero-error source-channel coding and non-commutative graph theory, {\em IEEE Trans. Inform. Theory} {\bf 62} (2016), 554--577. \bibitem{tw}P. Tarrago and J. Wahl, Free wreath product quantum groups and standard invariants of subfactors, {\em Adv. Math.} {\bf 331} (2018), 1--57. \bibitem{tkr}K. Temme, M.J. Kastoryano, M.B. Ruskai, M.M. Wolf and F. Verstraete, The $\chi^2$-divergence and mixing times of quantum Markov processes, {\em J. Math. Phys.} {\bf 51} (2010), 122201. \bibitem{tur}P. Tur\'an, On an extremal problem in graph theory, {\em Mat. Fiz. Lapok} {\bf 48} (1941), 436--452. \bibitem{ver}R. Vergnioux, Orientation of quantum Cayley trees and applications, {\em J. Reine Angew. Math.} {\bf 580} (2005), 101--138. \bibitem{vdn}D.V. Voiculescu, K.J. Dykema and A. Nica, Free random variables, AMS (1992). \bibitem{wag}K. Wagner, \"Uber eine Eigenschaft der ebenen Komplexe, {\em Math. Ann.} {\bf 114} (1937), 570--590. \bibitem{wa1}S. Wang, Quantum symmetry groups of finite spaces, {\em Comm. Math. Phys.} {\bf 195} (1998), 195--211. \bibitem{was}M. Wasilewski, On quantum Cayley graphs, {\em Doc. Math.} {\bf 29} (2024), 1281--1317. \bibitem{wra}N. Weaver, A ``quantum'' Ramsey theorem for operator systems, {\em Proc. Amer. Math. Soc.} {\bf 145} (2017), 4595--4605. \bibitem{wea}N. Weaver, Quantum graphs as quantum relations, {\em J. Geom. Anal.} {\bf 31} (2021), 9090--9112. \bibitem{wtf}N. Weaver, Triangle-free quantum graphs, arXiv:2509.17782 (2025). \bibitem{wig}E.P. Wigner, Characteristic vectors of bordered matrices with infinite dimensions, {\em Ann. of Math.} {\bf 62} (1955), 548--564. \bibitem{wo1}S.L. Woronowicz, Compact matrix pseudogroups, {\em Comm. Math. Phys.} {\bf 111} (1987), 613--665. \bibitem{wo2}S.L. Woronowicz, Tannaka-Krein duality for compact matrix pseudogroups. Twisted SU(N) groups, {\em Invent. Math.} {\bf 93} (1988), 35--76. \end{thebibliography} \end{document}