\documentclass[11pt,a4paper]{article} \usepackage[a4paper,margin=25mm]{geometry} \usepackage[T1]{fontenc} \usepackage{lmodern,microtype,amsmath,amssymb,amsthm,xcolor} \usepackage[colorlinks=true,linkcolor=black,citecolor=magenta,urlcolor=black]{hyperref} \urlstyle{same} \newtheorem{thm}{Theorem}[section] \newtheorem{introthm}{Theorem} \renewcommand{\theintrothm}{\Alph{introthm}} \newtheorem{prop}[thm]{Proposition} \newtheorem{lem}[thm]{Lemma} \newtheorem{defn}[thm]{Definition} \setlength{\parskip}{1pt}\setlength{\emergencystretch}{2em} \raggedbottom \setcounter{tocdepth}{1} \title{Spin model unification of Hadamard matrix invariants} \author{Banica and Opus} \date{} \hypersetup{pdftitle={Spin model unification of Hadamard matrix invariants},pdfauthor={Banica and Opus}} \begin{document} \maketitle \begin{abstract} We unify the 5 types of invariants of the complex Hadamard matrices: (1) the algebraic invariants, coming from spin models, subfactors, planar algebras and quantum permutation groups, (2) the analytic invariants, coming from the glow of the Ising arrays and of the planar rotators, (3) the geometric invariants, such as the defect, (4) the combinatorial invariants, coming from the quantum isomorphisms and the closed diagrams in spiders, and (5) the arithmetic invariants, such as the trace, which live on the conjugacy class. The first 4 types are explicit functions of a single complete invariant, the partition function of the Jones spin model of the matrix on bicolored graphs, and the arithmetic invariants come from the same model on directed graphs. The meeting point of the algebraic and analytic invariants is the Jones transfer matrix $T_2$, whose top eigenspace is seen by the subfactor, while its traces twisted by a crossing, and squared, appear in the complex and real glow, at orders 8 and 16. The defect is the multiplicity of the eigenvalue 1 of the Berezin matrix, minus $2N-1$, and the flux harmonics are invariants of the strong quantum equivalence, the doubled rectangle $R_2$ being seen by the glow, at order 8, and by the defect of the McNulty-Weigert matrices. \end{abstract} \medskip \noindent {\em To the memory of Vaughan Jones} \medskip \begingroup \color{magenta}\hypersetup{linkcolor=magenta} \setlength{\parskip}{0pt} \makeatletter \renewcommand{\l@section}[2]{% \ifnum\c@tocdepth>\z@ \addpenalty{\@secpenalty} \addvspace{1pt} \setlength\@tempdima{1.8em} \begingroup \parindent\z@ \rightskip\@pnumwidth \parfillskip-\@pnumwidth \leavevmode\bfseries \advance\leftskip\@tempdima \hskip-\leftskip #1\nobreak\hfil\nobreak\hb@xt@\@pnumwidth{\hss #2}\par \endgroup \fi} \makeatother \tableofcontents \endgroup \section*{Introduction} \phantomsection\addcontentsline{toc}{section}{Introduction} A complex Hadamard matrix is a matrix $H\in M_N(\mathbb T)$ whose rows are pairwise orthogonal, that is, $HH^*=N1_N$. The equivalence of such matrices consists of the permutations of the rows and columns, and of the multiplications of the rows and columns by numbers in $\mathbb T$. The basic example is the Fourier matrix $F_N=(w^{ij})$, with $w=e^{2\pi i/N}$. The real ones go back to Sylvester \cite{syl} and Hadamard \cite{hdm}, and exist only in the orders $N=1,2$ and $N=0(4)$, the converse being the Hadamard conjecture. We refer to \cite{tz2} for the general theory. There are several types of invariants for this equivalence, and for the finer relation of conjugacy, coming from quite different points of view, and which have been developed quite independently. Being a bit loose, as these invariants can mean many things, the central ones are as follows: \begin{enumerate} \item The algebraic invariants. As found by Jones \cite{jo1}, a Hadamard matrix gives a spin model, and so a commuting square, a subfactor and a planar algebra \cite{jo3}, whose $k$-boxes are the fixed points $Fix(u^{\otimes k})$ of a quantum permutation group $G_H\subset S_N^+$ \cite{bvm,bbs}, the main question being whether $G_H=S_N^+$, a property called wildness. \item The analytic invariants. The glow is the law of the sum of entries of $D_aHD_b$, with $D_a,D_b$ random diagonal matrices, with signs or phases on the diagonal, and this is the density of states of a system of Ising spins, or of planar rotators, coupled through $H$ \cite{cot,ising}, with extensions to the almost Hadamard matrices and the block designs in \cite{ftp}. \item The geometric invariants. These include the defect of Tadej and Zyczkowski \cite{tzy}, which bounds the dimension of the manifold of Hadamard matrices around $H$, and whose vanishing means that $H$ is isolated \cite{tz2}, and more generally the local structure of this manifold, as described by the higher order deformations of $H$. \item The combinatorial invariants, coming from the quantum symmetries of $H$ and from the various notions of quantum equivalence, with quantum isomorphisms of graphs, closed diagrams in spiders and nonlocal games, as developed by Gromada \cite{gro}, by Chan and Martin \cite{cma}, and by Brannan, Gromada, Hern\'andez Palomares and Priebe \cite{bghp}. \item The arithmetic invariants, such as the trace, which for the Fourier matrix is the Gauss sum, and more generally the spectrum, which for the Butson matrices consists of Weil numbers \cite{cft}. These are not invariant under the equivalence, and live on the conjugacy class of $H$, being seen by the periodic chains having $H$ as transfer matrix. \end{enumerate} The purpose of this paper is to unify these invariants. The unifying object is the Jones spin model of $H$, with the $N$ spin states being the indices of $H$, and with $H$ itself as matrix of Boltzmann weights. For a bipartite multigraph $\Gamma$ with signed edges, balanced in the sense that each vertex has as many positive as negative edges, the partition function of this model on $\Gamma$ is \[ S_\Gamma(H)=\sum_{x,y}\prod_{e\in E_+}H_{x(e)y(e)}\prod_{e\in E_-}\bar H_{x(e)y(e)} \] the sum being over the labelings $x$ of the row vertices, and $y$ of the column vertices, by $1,\ldots,N$. Our first result is as follows: \begin{introthm}\label{intro:unification} The numbers $S_\Gamma(H)$ form a complete invariant for the equivalence of complex Hadamard matrices, and the algebraic, analytic, geometric and combinatorial invariants are explicit functions of them, as follows: \begin{enumerate} \item The dimensions of the planar algebra are the multiplicities of the eigenvalue $1$ of the Jones transfer matrices $T_k$, and so are the limits of their power traces, which are partition functions. \item The glow moments are sums over all bipartite graphs, weighted by the cumulants of the gauge group, real or complex. \item The defect is the multiplicity of the eigenvalue $1$ of the Berezin matrix $\Lambda_H$, minus $2N-1$, and the power traces of $\Lambda_H$ are partition functions on necklaces of rectangles. \item The closed diagrams in complementary spiders, which compute the combinatorial invariants, are the numbers $N^{-|E|/2}S_\Gamma(H)$. \end{enumerate} \end{introthm} The completeness is a general fact from the invariant theory of compact groups, and the point is in the explicit formulas. The graphs in (1) are not planar in general, as for $H$ real the planar graphs give universal values. The statement (3) is a reformulation of a result of Tadej, see \cite{bco}, and makes the defect an eigenvalue multiplicity, exactly as the dimensions of the planar algebra. The second one comes from a simple dictionary: the glow is the law of $\Omega=\langle Hb,a\rangle$, which is the partition function of the Jones model on a single edge, computed in the gauge $(a,b)$. Thus the arrays are the Jones model with its gauge made dynamical. Also, the Reidemeister II move, which is the Hadamard condition, becomes the maximal and uniform frustration of the arrays. The algebraic invariants occupy the first half of the paper. Their central object is the sequence $c_k=\dim Fix(u^{\otimes k})$, which is the sequence of moments of the main character of $G_H$, and whose computation is notoriously difficult. For the deformations of the Fourier matrices the quantum group can be computed \cite{bbr,tbc}, the numbers $c_k$ being then given by the blowup of the spectral measure over a compact abelian group \cite{bcf}, and for the other matrices the general expectation is that $G_H=S_N^+$, that is, $c_k=Cat_k$ for any $k$, which means that the standard invariant of the subfactor is Temperley-Lieb. This was checked numerically in \cite{tbc} for many matrices, up to $k=9$ in the best cases, and proved up to $k=18$ for the generic Karlsson matrices in \cite{abf}. The first proofs are due to Bisch and Nicoara \cite{bn1,bn2}, as follows: \begin{introthm}\label{intro:bisch} The subfactor associated to a complex Hadamard matrix $H$ of order $N>4$ has Temperley-Lieb standard invariant, and so $G_H=S_N^+$, in the following cases: \begin{enumerate} \item $H$ is real, and $N=4(8)$. \item $H$ has entries in $\mathbb Q(i)$, and $N=2(4)$. \item $H$ has cube roots of unity as entries, and $N=3(9)$ or $N=6(9)$. \item $H$ is a Petrescu matrix of order $7$, outside a countable set of algebraic parameters. \end{enumerate} \end{introthm} Observe that the conditions on $N$ exclude the Di\c t\u a matrices, which are never wild, as explained in Section 3. For instance a real Di\c t\u a matrix of order $N$ contains real Hadamard submatrices of orders $M$ and $N/M$, with $14$. In fact none of the matrices in Theorem B is of Di\c t\u a type, as shown in Section 5. This is from \cite{bn1,bn2}, the proof using a profile congruence, which forces the rotation to be trivial on the lowest weight spaces of the planar algebra, and the annular decomposition of Jones \cite{jo2}. We extend this to the generic Karlsson matrices, and to the matrices having an affine profile modulo some prime, which gives the wildness of $H_9,BN_{10},N_{11},N_{11}'$, of the generic members of the family $R_7^q$, and of 2 new Butson matrices. For the circulant matrices, such as $BF_6$, wildness can be decided on the shift-invariant part of the planar algebra, and we find many new wild circulant matrices, including one of order 8, the first wild matrix of order 8, as far as we know, and the Bj\"orck matrices of simple index 2, at all the primes $p\geq7$. The algebraic and analytic invariants meet at the transfer matrix $T_2\in M_{N^2}(\mathbb R)$ of Jones, whose entries are the squared moduli of the profile entries of $H$. In the real case we have: \begin{introthm}\label{intro:real} For a real Hadamard matrix $H$ of order $N$, $\dim P_2$ is the multiplicity of the eigenvalue $1$ of $T_2$, and \[ E(\Omega^{16})=V(N)+\frac{4}{9}\cdot16!\cdot N^6\,Tr(T_2^2) \] with $V$ a universal polynomial, the lower moments being universal. At $N=16$ we have $Tr(T_2^2)=7+9\cdot2^{4-r}$, with $r$ the $2$-rank, and $\dim P_2=16,7,4,3,3$ for the $5$ classes. At $N=20$, the $3$ classes have the same glow and Temperley-Lieb subfactors, but the spectra of their matrices $T_2$ are different. \end{introthm} Thus the sequence $m\to Tr(T_2^m)$ interpolates between the real glow, at $m=2$, and the subfactor, at $m=\infty$, and at $N=20$ both ends are blind, while the middle is not. In the complex case, the crossing $F$ of the 2 legs of $T_2$ enters, already at order 8: \begin{introthm}\label{intro:complex} For a complex Hadamard matrix $H$ of order $N$, the moments of the complex glow are universal up to order $6$, and \[ E(|\Omega|^8)=V(N)+18N^3\,Tr(T_2F) \] with $V$ a universal polynomial, where $N^3Tr(T_2F)=\sum_{jl}|\sum_kH_{jk}^2\bar H_{lk}^2|^2$ is the sum over the rectangles of the squared flux phases. This number is between $N^3$ and $N^4$, the value $N^4$ being attained precisely by the matrices which are equivalent to real ones. \end{introthm} So the real Hadamard matrices, that is, the Ising arrays, are the most Ising-like rotator arrays, all their fluxes being $0$ or $\pi$. As for the defect, it is universal on the real slice, as shown in \cite{bco}, just like the low glow moments, and for the McNulty-Weigert matrices it is determined by the same number $Tr(T_2F)$: \begin{introthm}\label{intro:defect} Every real Hadamard matrix of order $N$ has defect $(N-1)(N-2)/2$. In the complex case, the defect is the multiplicity of the eigenvalue $1$ of the Berezin matrix, minus $2N-1$, and for the McNulty-Weigert matrices of order $2p$, with outer matrix $F_2$, it is a function of $Tr(T_2F)$, and so of the moment $E(|\Omega|^8)$. \end{introthm} The last assertion is a reformulation of a result from \cite{bco}. Regarding now the arithmetic invariants, these are not functions of the numbers $S_\Gamma(H)$, because the equivalence changes for instance the trace, and they live on the conjugacy class of $H$. However, they come from the same Jones model, on the directed graphs with a single type of vertices, where the row and column spins are identified. In terms of the arrays, this amounts in gluing the 2 layers of spins, the energy becoming $-\langle Ha,a\rangle/\sqrt N$, and we have: \begin{introthm}\label{intro:arithmetic} The partition functions $S_\Gamma(H)$ on the balanced directed graphs form a complete invariant for the conjugation of $H$ by the monomial matrices, the bicolored graphs being particular cases, and the trace being the loop. For the glued arrays we have $E(\langle Ha,a\rangle)=Tr(H)$, and in the complex case $E(|\langle Ha,a\rangle|^2)=|Tr(H)|^2+N^2-N$. \end{introthm} For the Fourier matrix $F_N$ the trace is the quadratic Gauss sum, and for the Butson matrices the eigenvalues are Weil numbers, all their conjugates having modulus $\sqrt N$, which is where the arithmetic geometry of \cite{cft} enters. Together with the results of \cite{bghp,gro}, according to which all the real Hadamard matrices of a given size are quantum isomorphic, and all the complex ones are weakly quantum equivalent, this gives a hierarchy of blind regions for the 5 types of invariants, discussed at the end of the paper, the arithmetic invariants being the finest ones. We also show that the flux harmonics $R_k(H)=\|H^{\circ k}(H^{\circ k})^*\|_2^2$, with $H^{\circ k}$ being the entrywise power, which include the doubled rectangle $R_2$ of Theorem D, are invariants of the strong quantum equivalence of \cite{bghp}, so that in order 4 this is the usual equivalence, that for the Butson matrices the algebraic and geometric invariants are invariant under the Galois group, while the analytic and combinatorial ones are not, and that the numbers of points of the abelian varieties of \cite{cft} are supertraces of free fermion chains. \medskip \noindent {\em Motivation.} The main motivation for the present work comes from the coupling matrices of high-energy physics, along the lines of \cite{tbo}, with our work here, based on \cite{abf,bco,bcf,tbc,tbs,cgt,cot,cft,cbc,ftp,gpt,ising,tgp,tbg,tbo}, working out the mathematics for one of the several steps of the program mentioned in \cite{tbo}. In fact, modulo a substantial amount of conformal field theory, this was also the motivation of Vaughan Jones for studying such questions, from the spin models of \cite{jo1} to his later work on quantum spin chains and their continuum limits \cite{jth,jnt}, and we refer to \cite{eka,jsu} for the operator algebra side of this story. \medskip The paper is organized as follows. Sections 1-6 deal with the algebraic invariants: the spin models and subfactors, the quantum permutation groups, the deformed Fourier matrices, the Temperley-Lieb question, the work of Bisch and Nicoara, with Theorem B, and the spectral measures and their blowup. Sections 7-12 deal with the other invariants: the glow, the transfer matrices and fluxes, with Theorems C and D, the defect, with Theorem E, the combinatorial invariants, the arithmetic invariants, with Theorem F, and the unification, with Theorem A. \medskip \noindent {\em Acknowledgements.} We would like to thank our colleague and friend GPT for his heavy contribution to the work surveyed here, and notably to the papers \cite{abf,bco,bcf,cgt,cot,cbc,gpt,tgp,tbg}. \section{Spin models and subfactors}\label{sec:spin} The algebraic invariants of the Hadamard matrices come from the spin models of Jones, and from the commuting squares, subfactors, planar algebras and quantum groups associated to them. A spin model in the sense of Jones \cite{jo1} consists of $N$ spin states and of Boltzmann weights $w_\pm(a,b)$, and its partition function on a link diagram puts the spins on the shaded regions of the checkerboard coloring, with a weight at each crossing. The invariance under the 2nd Reidemeister move is guaranteed by the conditions \[ w_+(a,b)w_-(a,b)=1\quad,\quad\sum_xw_-(a,x)w_+(c,x)=N\delta_{ac} \] which for $w_+=H$ and $w_-=\bar H$ are exactly the conditions $H\in M_N(\mathbb T)$ and $HH^*=N1_N$. Thus, a Hadamard matrix is a spin model satisfying Reidemeister II. The 3rd move requires in addition the star-triangle relation, and the basic example is the Potts model, which for $n=2$ is the Ising model, and produces the Jones polynomial at $t=i$. Note that $F_2$ is the Ising weight $e^{K\sigma\sigma'}$ at the imaginary temperature $K=i\pi/4$, up to equivalence. Without the star-triangle relation there is no knot invariant, but there is still a subfactor. As observed by Popa \cite{pop0}, a unitary $U\in U_N$ is of the form $U=H/\sqrt N$, with $H$ Hadamard, precisely when the algebra $\Delta$ of diagonal matrices and its conjugate $U\Delta U^*$ are orthogonal, modulo the scalars, with respect to the trace. In other words, the Hadamard matrices are the commuting square case of the invariant of Connes for pairs of maximal abelian subalgebras, discussed in \cite{tbo} in relation with the mixing matrices of the Standard Model. Iterating the basic construction on the commuting square formed by $\Delta$ and $U\Delta U^*$ gives a hyperfinite subfactor of index $N$ \cite{jsu,nsh}, whose planar algebra is the planar algebra $P^H$ generated by $H$ inside the spin planar algebra \cite{jo3}. We recall that the possible indices of subfactors are the numbers $4\cos^2(\pi/n)$, and those in $[4,\infty)$ \cite{jin}, and that the principal graphs below index $4$ are of type ADE \cite{ghj}. In terms of quantum groups, consider the vectors and projections \[ \xi_{ij}=\frac{1}{\sqrt N}\cdot\frac{H_i}{H_j}\quad,\quad P_{ij}=Proj(\xi_{ij}) \] with $H_i$ being the rows of $H$, and the quotient being taken entrywise. The matrix $P=(P_{ij})$ is a magic unitary, in the sense of the quantum permutation group $S_N^+$ of Wang \cite{wa1}, a compact quantum group in the sense of Woronowicz \cite{wor}, and we have: \begin{defn} The quantum group $G_H\subset S_N^+$ of $H$ is the Hopf image of the representation $u_{ij}\to P_{ij}$ of $C(S_N^+)$, and the Jones transfer matrices of $H$ are the matrices $T_k\in M_{N^k}(\mathbb C)$ given by \[ (T_k)_{i_1\ldots i_k,j_1\ldots j_k}=tr(P_{i_1j_1}\ldots P_{i_kj_k}) \] with $tr$ being the normalized trace of $M_N(\mathbb C)$. \end{defn} The planar algebra of $H$ is then given by $P^H_k=Fix(u^{\otimes k})$, the fixed points of the $k$-th tensor power of the fundamental representation of $G_H$ \cite{bvm,bbs}. The numbers $\dim P^H_k$ are the moments of the main character of $G_H$, and we refer to \cite{tbs} for such dimensions viewed as Hamburger moments, to \cite{tbc} for their computation for many matrices, and to \cite{abf} for the generation questions, in the case of the Karlsson matrices. As observed by Jones in \cite{jo3}, $P_k^H$ is the top eigenspace of a transfer matrix having the profile of $H$ as Boltzmann weights, and in our normalization this matrix is $T_k$. The profile was recently used in \cite{bn1} for computing the standard invariant of the subfactors associated to the Hadamard matrices of Petrescu of order 7, and other families, and in \cite{bn2} for the real Hadamard matrices. Observe that \[ (T_2)_{i_1i_2,j_1j_2}=\frac{1}{N}|\langle\xi_{i_1j_1},\xi_{i_2j_2}\rangle|^2=\frac{1}{N^3}\Big|\sum_xH_{i_1x}\bar H_{j_1x}\bar H_{i_2x}H_{j_2x}\Big|^2 \] which are the squared moduli of the profile entries of $H$. More generally, as noted in \cite{tbc} and in \cite{bn1,bn2}, we have $T_k=N^{-k-1}AA^*$, where $A\in M_{N^k}(\mathbb C)$ is given by $A_{i,x}=\prod_s\bar H_{i_sx_s}H_{i_{s+1}x_s}$, with the indices taken modulo $k$, and this shows in particular that $T_k$ is positive, and that the matrices $T_k(H^t)=N^{-k-1}A^*A$ associated to the transpose have the same spectrum. Equivalence does not change any of these objects, because the lines spanned by the vectors $\xi_{ij}$ do not change, and so neither do the projections $P_{ij}$, up to a relabeling. Also, the power traces $Tr(T_k^m)=N^{-m(k+1)}Tr((AA^*)^m)$ are normalized partition functions $S_\Gamma(H)$, on the balanced bipartite graphs obtained by gluing cyclically $m$ copies of $A$ and $m$ copies of $A^*$, which are not planar in general. The algebra $P_2^H$ is closely related to the Nomura algebra of $H$, which is the algebra of the matrices having all the vectors $\xi_{ij}$ as eigenvectors \cite{jmn}, and in all our computations the dimensions coincide. In the real case, the real Hadamard matrices also produce genuine spin models, of size $4N$, satisfying the star-triangle relation, by a construction of Nomura \cite{nom}, whose link invariant is computed in \cite{jae}, and spin models also come from strongly regular graphs \cite{ja2}. When the entries of $H$ are roots of unity, $G_H$ can be finite, and we are then in the setting of the finite-dimensional Hopf algebras, for which we refer to \cite{asc,nat}. The first relative commutants were computed for many matrices of small order by Nicoara \cite{nsh}, by means of the commuting square tower, and the angle operator of the subfactor, whose spectrum detects infinite depth, was studied for the Hadamard subfactors by Montgomery \cite{mo1,mo2}. We have: \begin{thm}\label{thm:transfer} For a complex Hadamard matrix $H$, the following hold: \begin{enumerate} \item $\dim P^H_k$ is the multiplicity of the eigenvalue $1$ of $T_k$, and so $\dim P^H_k=\lim_mTr(T_k^m)$. \item $T_2$ is real, symmetric, doubly stochastic, and positive. \item $\dim P^H_2$ is the number of connected components of the graph on the pairs of indices in which $(i_1,i_2)$ and $(j_1,j_2)$ are joined when $\sum_xH_{i_1x}\bar H_{j_1x}\bar H_{i_2x}H_{j_2x}\neq0$. \end{enumerate} \end{thm} \begin{proof} (1) The Haar state of $G_H$ is the Ces\`aro limit of the convolution powers of $tr\circ\pi$, where $\pi:u_{ij}\to P_{ij}$ \cite{wan}, and the matrices of these convolution powers, on the products $u_{i_1j_1}\ldots u_{i_kj_k}$, are the powers of $T_k$. Thus the Ces\`aro averages of $T_k^r$ converge to the projection onto $Fix(u^{\otimes k})$. Also, $T_k=N^{-k-1}AA^*$ is positive, and is a contraction, being the slice $(id\otimes tr\circ\pi)(u^{\otimes k})$ of a unitary by a state, so its spectrum is in $[0,1]$, the Ces\`aro limit is the projection onto the eigenvalue $1$, and $Tr(T_k^m)$ converges to its multiplicity. (2) $T_2$ is the entrywise product of the Gram matrix of the vectors $\xi_{ij}$ with its conjugate, so it is positive, by the Schur product theorem. It is doubly stochastic because the vectors $\xi_{ij}$ with $i$ fixed form an orthonormal basis. (3) For a symmetric doubly stochastic matrix with entries $\geq0$ and positive spectrum, the multiplicity of the eigenvalue $1$ is the number of connected components of its support, by Perron--Frobenius. \end{proof} \section{Quantum permutation groups}\label{sec:qpg} Let us discuss now the quantum groups $G_H\subset S_N^+$ in more detail. Recall that $C(S_N^+)$ is the universal $C^*$-algebra generated by the entries of an $N\times N$ magic unitary, that is, a matrix of projections summing up to $1$ on each row and each column \cite{wa1}. Given a representation $\pi:C(S_N^+)\to B$, its Hopf image is the smallest quotient $C(S_N^+)\to C(G)$ through which $\pi$ factorizes, and for the Hadamard models $\pi:u_{ij}\to P_{ij}$ this produces the quantum groups $G_H$. In terms of the main character $\chi=\sum_iu_{ii}$, with law $\mu_H$ with respect to the Haar integration, we have \[ c_k=\dim Fix(u^{\otimes k})=\int_{G_H}\chi^k=\int_0^Nx^k\,d\mu_H(x) \] and so the sequence $(c_k)$ is a moment sequence. In particular its Hankel matrices $(c_{i+j})$ are positive, and we refer to \cite{tbs} for the general theory of such dimension sequences, and to \cite{tbc} for the use of the Hankel inequalities as lower bounds, as for instance $c_5\geq206$ for one of the matrices of order 16. The basic examples are the Fourier matrices, for which the situation is as follows, see \cite{bbs}: \begin{thm}\label{thm:classical} For a complex Hadamard matrix $H$, the following are equivalent: \begin{enumerate} \item $G_H$ is classical. \item $G_H$ is a group dual. \item $H$ is equivalent to a generalized Fourier matrix $F_G=F_{N_1}\otimes\ldots\otimes F_{N_k}$, with $G=\mathbb Z_{N_1}\times\ldots\times\mathbb Z_{N_k}$. \end{enumerate} In that case $G_H=G$, acting on itself by translations. \end{thm} \begin{proof} For $H=F_G$ we have $\xi_{ij}=\xi_{i-j,0}$, so the magic matrix is circulant over $G$, and its coefficients generate the algebra $C(G)$. The converse is from \cite{bbs}. \end{proof} The same characterization holds at the level of commuting squares, in a quite different form, as recently shown by Hall and Nicoara \cite{hn2}: the spin model commuting square of $H$ satisfies their spanning relative commutant condition precisely when $H$ is equivalent to the character table of a finite abelian group. In the opposite direction, the quantum groups $G_H$ can be used as seeds for generating $S_N^+$, in relation with the maximality of $S_N\subset S_N^+$, the joint quantum group $\langle S_N,G_H\rangle$ being computed there numerically for the regular matrices of order $N\leq7$, and shown to be $S_N^+$ for the generic deformations $F_A\otimes_QF_2$. An important feature of the construction $H\to G_H$ is its behavior under the symmetries of $H$. The conjugate $\bar H$ has the same quantum group, with the flipped comultiplication, and so $\mu_{\bar H}=\mu_H$. As for the transpose, the formula $T_k=N^{-k-1}AA^*$ from Section 1, and its version $T_k(H^t)=N^{-k-1}A^*A$, give the following result, from \cite{tbc}, refining the duality results of \cite{trd}: \begin{thm}\label{thm:transpose} For any complex Hadamard matrix $H$ we have $T_k(H)\simeq T_k(H^t)$, for any $k$, and so $c_k(H)=c_k(H^t)$, and $\mu_H=\mu_{H^t}$. Moreover, if $G_H$ is finite, then $G_{H^t}=\widehat{G}_H$. \end{thm} \begin{proof} The first assertion follows from $AA^*\simeq A^*A$, and the multiplicities of the eigenvalue $1$ are then the same, by Theorem \ref{thm:transfer}. The last assertion is from \cite{trd}. \end{proof} Thus the transposition is invisible at the level of the moments, but not at the level of the quantum groups, as shown in \cite{bcf} for the deformed Fourier matrices with $|X|\neq|Y|$. Another general principle, from \cite{tbc}, is an integrality statement. When $G_H$ is finite, its Hopf algebra is finite dimensional, and the corresponding fusion data has integer entries, and this gives: \begin{prop}\label{prop:integral} If $G_H$ is finite, there is a monic polynomial $p\in\mathbb Z[x]$ such that $p(NT_k)=0$, for any $k$. Thus, if some matrix $NT_k$ has an eigenvalue which is not an algebraic integer, then $G_H$ is infinite, and the subfactor has infinite depth. \end{prop} \begin{proof} This is from \cite{tbc}. With $\omega=Tr\circ\pi$ we have $NT_k=(id\otimes\omega)(u^{\otimes k})$, and $\varphi\to(id\otimes\varphi)(u^{\otimes k})$ is a unital morphism from the convolution algebra $C(G_H)^*$ to $M_{N^k}(\mathbb C)$. When $C(G_H)$ is finite dimensional, the $\mathbb Z$-span of the traces of its irreducible representations is a unital ring, which is a finitely generated $\mathbb Z$-module, and $\omega$ belongs to it, so it is integral over $\mathbb Z$. \end{proof} This principle was used in \cite{tbc} for proving infinite depth for several families of real matrices, as explained in Section 4 below, and recovers in particular the infinite depth results of Montgomery \cite{mo1,mo2}, obtained with the angle operator. Let us also mention that the construction $H\to G_H$ extends to the partial Hadamard matrices, with the Hopf image being replaced by a bialgebra image, giving quantum partial permutation semigroups, and with the components of Theorem \ref{thm:transfer} becoming the finest invariant coloring of the ordered pairs of rows. Summarizing, the basic structure is as follows: \begin{thm}\label{thm:qpgsummary} The quantum group $G_H\subset S_N^+$ is invariant under the equivalence, and satisfies $G_{\bar H}=G_H^\sigma$ and $\mu_{H^t}=\mu_H$. It is classical precisely in the generalized Fourier case, and when it is finite, the eigenvalues of all the matrices $NT_k$ are algebraic integers, from a finite set. \end{thm} \begin{proof} This follows by putting together the above results, from \cite{trd,bbs,tbc}. \end{proof} \section{Deformed Fourier matrices}\label{sec:dita} The main source of non-classical quantum groups $G_H$ with computable structure are the deformations of the Fourier matrices, introduced by Di\c t\u a \cite{dit}. Given 2 complex Hadamard matrices $H\in M_M(\mathbb T)$ and $K\in M_N(\mathbb T)$, and a matrix of parameters $Q\in M_{M\times N}(\mathbb T)$, the matrix $(H\otimes_QK)_{ia,jb}=Q_{ib}H_{ij}K_{ab}$ is complex Hadamard, of order $MN$. For $Q$ the all-one matrix we obtain $H\otimes K$, and the row and column phases of $Q$ do not change the equivalence class, so we can assume that $Q$ is dephased. The magic matrix of $H\otimes_QK$ decomposes into blocks, and its quantum group sits inside a free wreath product \cite{bfw}, as follows, see \cite{tbc}: \begin{prop}\label{prop:wreath} For any $H\in M_M(\mathbb T)$, $K\in M_N(\mathbb T)$ and $Q\in M_{M\times N}(\mathbb T)$, the representation $u_{ia,jb}\to P^{H\otimes_QK}_{ia,jb}$ factorizes through $C(S_N^+\wr_*S_M^+)$, and more precisely we have $G_{H\otimes_QK}\subset S_N^+\wr_*G_H$. \end{prop} \begin{proof} This is from \cite{tbc}, the factorization being given by the magic matrix of $H$, tensored with the identity, for the outer copy, and by the block sums $\sum_jP^{H\otimes_QK}_{ia,jb}$ for the inner copies. \end{proof} For the deformed Fourier matrices $F_X\otimes_QF_Y$, with $X,Y$ finite abelian groups, the quantum group was computed for generic $Q$ in \cite{bbr}, by using the group $\Gamma_{X,Y}=\mathbb Z^{(|X|-1)(|Y|-1)}\rtimes Y$, whose lattice part can be identified with $I_X\otimes I_Y$, the product of the augmentation ideals. The tools for the non-generic case were developed by Bichon \cite{bic}, see also Burstein \cite{bur}, and the general answer is as follows, from \cite{tbc}: \begin{thm}\label{thm:dita} For any $X,Y$ and any dephased $Q$, encoded into $\theta\in(\mathbb R/\mathbb Z)[X\times Y]$, the quantum group of $F_X\otimes_QF_Y$ is given by $C(G)=C^*(\Gamma_{X,Y}/N_Q)\rtimes_\Phi C(X)$, where \[ N_Q=\left\{r\in I_X\otimes I_Y\Big|r\theta\in(\mathbb R/\mathbb Z)^X+(\mathbb R/\mathbb Z)^Y\right\} \] and this quantum group is the generic one precisely when, for each Galois orbit of pairs of nontrivial characters of $X,Y$, the vector of character sums of the exponents of the parameters which are not roots of unity is nonzero. When $Q$ has roots of unity as entries, the quantum group is finite. \end{thm} \begin{proof} This is from \cite{tbc}, by using the crossed coproduct description from \cite{bbr}, which always maps onto the Hopf image, and the tools from \cite{bic}, the elements of $N_Q$ being those of the lattice which act by scalars on all the blocks. \end{proof} In the generic case, the law of the main character is $\mu=(1-1/N)\delta_0+(1/N)law(qq^*)$, where $q\in M_{M\times N}(\mathbb T)$ is a Haar distributed matrix of phases, and $N=|Y|$, which is a free Poisson type law of a random matrix with independent phases \cite{bbr}. The case of arbitrary $Q$ is the blowup result of \cite{bcf}, discussed in Section 6 below. At order 6 the theorem gives explicit descriptions of the generic loci of $F_2\otimes_QF_3$ and $F_3\otimes_QF_2$, which have a nontrivial structure even away from the roots of unity, and the relation subgroups of $F_2\otimes_QF_3$ are the ideals of the Eisenstein integers \cite{bcf}. In the real case, the theorem covers for instance the matrix $\mathrm{had}_{16.1}$ from the catalogue of McKay \cite{mck}, which is equivalent to $F_{\mathbb Z_2^2}\otimes_QF_{\mathbb Z_2^2}$, with a single entry $-1$ in $Q$, and whose quantum group is finite, of dimension 256 \cite{tbc}. For the Di\c t\u a matrices which are not of deformed Fourier type, the main examples studied in \cite{tbc} are the regular families $F_{8,5a},F_{8,5b},F_{8,5c}$ of order 8, built from 2 copies of the matrices $F_4^s$. Here the quantum groups are contained in the free wreath products $S_4^+\wr_*\mathbb Z_2$ and $H_2^+\wr_*\mathbb Z_2$, the latter being the quantum automorphism group of the binary tree \cite{dkr}, with equality at all the levels computed. The equality reduces to a freeness question for 2 copies of $S_4^+$, which can be formulated in terms of Pauli representations, and in subfactor terms, the question is whether the planar algebra is a free composition in the sense of Bisch and Jones \cite{bjo}. Let us also mention that the subfactors associated to the Di\c t\u a type matrices have intermediate subfactors, as shown by Nicoara \cite{nsh}, and so they are never Temperley-Lieb. In fact, we have the following result, which follows from the above, and from the definitions: \begin{thm}\label{thm:ditanotwild} For a Di\c t\u a deformation $H=K\otimes_QL$ of order $N=MN'$, with $M,N'\geq2$, we have $c_2\geq3$, and so $G_H\neq S_N^+$. For the deformed Fourier matrices $F_X\otimes_QF_Y$ the quantum group is described by Theorem \ref{thm:dita}, and it is infinite as soon as $Q$ is generic. \end{thm} \begin{proof} The partition of the indices into the $M$ blocks is preserved by $G_H$, by Proposition \ref{prop:wreath}, and its indicator is an extra fixed vector at level 2, on top of the 2 Temperley-Lieb ones. As for the second assertion, for generic $Q$ the group $\Gamma_{X,Y}$ contains the free abelian group $\mathbb Z^{(|X|-1)(|Y|-1)}$. \end{proof} \section{Temperley-Lieb and wildness}\label{sec:wild} The quantum group $G_H$ always contains, at the level of fixed points, the Temperley-Lieb algebra generated by the Jones projections, which at $N\geq4$ has dimension $Cat_k$ in degree $k$. The simplest possible answer is therefore $G_H=S_N^+$, and following \cite{tbc} we use the following terminology: \begin{defn} A complex Hadamard matrix $H\in M_N(\mathbb T)$ is called wild when $G_H=S_N^+$, or equivalently, when $c_k=Cat_k$ for any $k$, or equivalently, for $N>4$, when the standard invariant of its subfactor is Temperley-Lieb, with principal graph $A_\infty$. \end{defn} The equivalences here come from Tannaka duality \cite{wo2}, the fixed points of $S_N^+$ being the Temperley-Lieb ones, and from the fact that the closed walks of length $2k$ on $A_\infty$, based at the endpoint, are counted by $Cat_k$. The deformed Fourier matrices are not wild, by Theorem \ref{thm:ditanotwild}, and the conjecture, going back to \cite{bbs}, is that the matrices which are not of Di\c t\u a type, in a suitable general sense, are wild. The main computational tool is the following decomposition, from \cite{tbc}, based on the annular decomposition of Jones \cite{jo2}: \begin{thm}\label{thm:jw} For $H\in M_N(\mathbb T)$ with $N\geq5$, we have $T_k\simeq\bigoplus_sm_k(s)\Phi_s$, where $m_k(s)$ are the multiplicities of the irreducible corepresentations $r_s$ of $S_N^+$ in $u^{\otimes k}$, and $\Phi_s\simeq\Psi_2\oplus\ldots\oplus\Psi_s\oplus[s\ {\rm odd}]\cdot0_{N-1}$ for $s\geq1$, where $\Psi_t$ is the restriction of $T_t$ to the annular lowest weight space $\Lambda_t\subset(\mathbb C^N)^{\otimes t}$. In particular $G_H=S_N^+$ if and only if $\|\Psi_t\|<1$ for all $t\geq2$. \end{thm} \begin{proof} This is from \cite{tbc}. The first decomposition comes from the Jones-Wenzl decomposition of $u^{\otimes k}$ over $S_N^+$, with $\Phi_s=(id\otimes tr\circ\pi)(r_s)$, and the second one is the spectral version, for the tracial states $\psi$ with $\psi(u_{ij})=1/N$, of the annular decomposition of Jones \cite{jo2}. \end{proof} In practice, if $c_{k-1}=Cat_{k-1}$, then $c_k$ is $Cat_k$ plus the multiplicity of the eigenvalue 1 of $\Psi_k$, and this multiplicity is the annular multiplicity $a_k$ in degree $k$, which will be a key object in Section 5. In this way, the equalities $c_k=Cat_k$ were checked in \cite{tbc}, in floating point, up to the levels $k$ indicated below, for the matrices listed there, and here is the current status of these matrices, in view of the results in Section 5, the numerical range being indicated for the open cases: \[ \begin{array}{|l|l|l|}\hline N&{\rm matrices}&{\rm status}\\\hline 6&T_6&{\rm wild,\ Theorem\ \ref{thm:bn}}\\\hline 6&H_6^q,\ K_6,\ BN_6^q&{\rm wild\ for\ generic\ parameters,\ Section\ 5}\\\hline 6&BF_6&{\rm open,\ }k\leq9\\\hline 7&P_7^q,\ R_7^q&{\rm wild\ for\ generic\ }q{\rm,\ Section\ 5}\\\hline 8&F_{8,2},F_{8,4},K_{8,2},M_{8,1},I_{8,12},K_{8,30},L_{8,30}&{\rm open,\ }k\leq7\\\hline 9-11&BN_9,\ H_9,\ BN_{10},\ N_{11},\ N_{11}'&{\rm wild,\ Section\ 5}\\\hline 12,20&P_{12},\ P_{20}^1,\ P_{20}^2,\ {\rm had}_{20.1}&{\rm wild,\ Theorem\ \ref{thm:bn}}\\\hline 28&{\rm all\ the\ }487\ {\rm classes}&{\rm wild,\ Theorem\ \ref{thm:bn}}\\\hline 24&P_{24}^1,\ 45\ {\rm classes\ of\ order\ }24&{\rm open,\ }k\leq5,\ k\leq4\\\hline 32,48&P_{32}^1,\ P_{48}^1&{\rm open,\ }k\leq4\\\hline 36-108&P_{36}^2,\ P_{44}^1,\ P_{52}^2,\ P_{100}^2,\ P_{108}^1,\ P_{108}^2&{\rm wild,\ Theorem\ \ref{thm:bn}}\\\hline 104&P_{104}^1&{\rm open,\ }k\leq3\\\hline \end{array} \] Here $P^1_{q+1}$ and $P^2_{2(q+1)}$ are the Paley matrices of type I and II \cite{pal}, $H_6^q$ is the Di\c t\u a family through the Haagerup matrix, and $K_6$ is the 3-parameter family of Karlsson \cite{kar}. For the Karlsson matrices, consisting, up to equivalence, of the matrices which decompose into Hadamard blocks of size $2\times2$, the computations were pushed much further in \cite{abf}, by using a limit argument at the boundary points of the family, where the matrix becomes a Di\c t\u a deformation of $F_2\otimes F_3$. The fixed vectors at nearby parameters converge, along subsequences, to the fixed vectors of an overgroup of the quantum group at the boundary point, having 2 orbitals, and this leads to the following result, about quantum groups: \begin{thm}\label{thm:karlsson} Let $D$ be the quantum group of a generic Di\c t\u a deformation of $F_2\otimes F_3$, and let $D\subset G\subset S_6^+$, with $c_2(G)=2$. Then $c_k(G)=Cat_k$ for $k\leq18$, and the first level $k$ with $c_k(G)>Cat_k$, if any, satisfies $k=3(4)$ with $k\geq19$, or $k=1(4)$ with $k\geq37$. \end{thm} \begin{proof} This is from \cite{abf}. A first extra tensor of such an overgroup would give a probability measure on the closed walks on the kagome lattice, with prescribed local distributions, read from a Jones-Wenzl projection, and this is excluded at the even levels by a straight walk argument, and at the odd levels by staircase tests, and a certificate at level 15. \end{proof} The quantum group $D$ is contained in the free wreath product $S_3^+\wr_*S_2^+$, the quantum symmetry group of 2 disjoint triangles, and so the quantum groups $\langle G_H,S_3^+\wr_*S_2^+\rangle$, with $H$ of order 6 having $c_2=2$, are overgroups as above, having Catalan fixed space dimensions up to level 18 \cite{abf}. This is evidence for the maximality of $S_3^+\wr_*S_2^+$ in $S_6^+$, which is the free analogue of the maximality of $S_3\wr S_2$ in $S_6$, and the generic Karlsson matrices themselves are wild, at all levels, as explained in Section 5. Regarding the real matrices, the first step towards wildness is infinite depth, and here the integrality principle of Proposition \ref{prop:integral} gives the following results, from \cite{tbc}, recovering and extending the results of Montgomery \cite{mo1,mo2}: \begin{thm}\label{thm:paley} The matrices of order $2(q+1)$ built from symmetric conference matrices, including all the Paley II matrices, produce infinite depth subfactors, for any $q\geq5$. The same holds for the Paley I matrices $P^1_{q+1}$, for all the prime powers $q=3(4)$ with $11\leq q<10^5$. \end{thm} \begin{proof} This is from \cite{tbc}. In the conference case, an explicit eigenvector of $NT_2$ has eigenvalue $1+(2q+1)(q-3)^2/(q+1)^2$, which is not an algebraic integer for $q\geq5$, and for Paley I the matrices $X_\psi(x,y)=\psi(y-x)$, with $\psi$ a nontrivial character of $\mathbb F_q^*$ of odd order, are eigenvectors of $T_2$, with eigenvalues given by character sums, which are not algebraic integers. \end{proof} For the Paley II matrices, and for the Paley I matrices with $q=3(8)$, Theorem \ref{thm:paley} is superseded by Theorem B, which gives wildness, and proves the conjecture of Montgomery \cite{mo1}. For the Paley I matrices with $q=7(8)$, of order $0(8)$, infinite depth is all that is known. Let us also mention that the classification of the regular complex Hadamard matrices at $N=7,8$, and the partial results at $N=11$, as well as the characterization of the Fourier matrices of prime order from partial data, provide many more candidates for wildness, and that the Hadamard matrices of Petrescu \cite{pet}, of prime order, form the first continuous families of prime order, which makes them particularly interesting. \section{Congruences of the profile}\label{sec:bn} We explain here the work of Bisch and Nicoara \cite{bn1,bn2}, which provides the first proofs of wildness, for many matrices. We use the cyclic coordinates from Section 1. For $n\geq1$ consider the space $H_n=l^2(X^n)$, where $X=\{1,\ldots,N\}$ is the index set of $H$, the matrix $T_n$ acting on it, and the cyclic shift $(\rho f)(a_1,\ldots,a_n)=f(a_n,a_1,\ldots,a_{n-1})$. Also, let $U_n\subset H_n$ be the space of functions $f$ which vanish when 2 cyclically adjacent labels are equal, and whose sum over any coordinate is zero, when the other coordinates are fixed. We have then the following result, from \cite{bn1,bn2}, building on \cite{jo3,mo1}: \begin{prop}\label{prop:cyclic} For any $n\geq1$, the relative commutant $P_n$ is isomorphic to $F_n=\ker(1-T_n)$, with the $2$-click rotation of the planar algebra corresponding to the cyclic shift $\rho$, restricted to $F_n$. The common kernel $W_n\subset P_n$ of the cap maps corresponds to $F_n\cap U_n$, for $n\geq2$, and $W_1=0$. \end{prop} \begin{proof} The first assertion is the angle operator description of flatness, with $T_n=C_nC_n^*$, where $C_n$ is the matrix of scalar products between the bases of the 2 algebras whose intersection is the relative commutant, in the commuting square tower. The rotation is computed in the spin planar algebra, where it acts on the labels by a cyclic shift, and the 2 types of caps either sum over a label, or identify 2 adjacent labels. \end{proof} The spaces $W_n$ are the lowest weight spaces of the annular decomposition of Jones \cite{jo2}, and their dimensions $a_n=\dim W_n$ are the annular multiplicities, which are the numbers appearing in Theorem \ref{thm:jw}. With $b_n=\dim P_n$, and for an irreducible subfactor of index $>4$, the annular decomposition gives \[ b_n=Cat_n+\sum_{k=2}^n\binom{2n}{n-k}a_k \] and so the Temperley-Lieb property amounts in $a_n=0$ for any $n$. The first ingredient of \cite{bn1,bn2} is a congruence for the profile. Consider the numbers \[ S(a,b,c,d)=\sum_yH_{ay}\bar H_{by}\bar H_{cy}H_{dy} \] and call restricted the quadruples with $a\neq c$ and $b\neq d$. In the real case, we have the following congruence, recorded by Wallis \cite{wal}, and used by Montgomery \cite{mo2} for computing $\dim P_2$: \begin{lem}\label{lem:wallis} For a real Hadamard matrix of order $N$, and any $4$ distinct rows $a,b,c,d$, we have $S(a,b,c,d)=-N(8)$. In particular, when $N=4(8)$, the numbers $S/4$ satisfy \[ \frac{S(a,b,c,d)}{4}=1+\delta_{ab}+\delta_{cd}+\delta_{ad}+\delta_{bc}\ (2) \] on all the restricted quadruples. \end{lem} \begin{proof} After multiplying the columns by the entries of row $a$, the other 3 rows become $1-2x,1-2y,1-2z$, with $x,y,z$ being 0-1 vectors, and the orthogonality relations give $S=N-8\sum_jx_jy_jz_j$. For the restricted quadruples which are not formed by 4 distinct rows, the orthogonality gives $S=0$ or $S=N$, and this gives the second assertion. \end{proof} In the complex case, similar congruences hold modulo suitable primes, after dividing $S$ by a suitable number $\alpha$. For instance for Gaussian rational matrices of order $N=2m$, with $m$ odd, we have $S/2=1+D$ modulo $1-i$, where $D=\delta_{ab}+\delta_{cd}+\delta_{ad}+\delta_{bc}$, and for matrices with cube roots of unity as entries, of order $N=3m$, with $3\nmid m$, we have $S/3=-m(1-E)$ modulo $1-e^{2\pi i/3}$, where $E=\delta_{ab}+\delta_{cd}-\delta_{ad}-\delta_{bc}$ \cite{bn1}. The program \texttt{congruence.py} checks these congruences for the Paley matrices of orders 12 and 20, for the Haagerup and Tao matrices, and for the Petrescu matrix. The second ingredient is the following consequence, for the rotation: \begin{thm}\label{thm:rotation} Assume that $H$ is real, of order $N=4(8)$, with $N>4$. Then the $2$-click rotation $\rho$ acts as the identity on the lowest weight spaces $W_n$, for any $n$ odd. \end{thm} \begin{proof} This is from \cite{bn2}. On the words with no equal adjacent labels, the matrix $K_n=\prod_jS(a_j,b_j,a_{j+1},b_{j+1})/4^n$ satisfies $K_nf=N(N/4)^nf$ for $f\in W_n$, by flatness. On the other hand, expanding the product of the congruences in Lemma \ref{lem:wallis}, and using the cap equations, which kill the terms not involving all the input labels exactly once, gives $K_nf=(2+\rho+\rho^{-1})f$ modulo 2, on the integer valued vectors $f\in U_n$. As $N$ is even, we get $(\rho-1)^2f=0$ modulo 2 on a $\rho$-stable integral lattice of $W_n$, and since $\rho^n=1$ with $n$ odd, this forces $\rho=1$. \end{proof} The third ingredient is a uniform bound for the trace of the rotation, which holds for any complex Hadamard matrix, and uses the transfer matrix formula from \cite{trd}: \begin{prop}\label{prop:tracebound} For any complex Hadamard matrix $H$ of order $N$, and any $n\geq1$, we have \[ |Tr(\rho|P_n)|\leq N \] where $Tr$ is the usual trace, and $\rho$ is the $2$-click rotation. \end{prop} \begin{proof} This is from \cite{bn1,bn2}. With $Q_{ab}$ the projection on $\xi_{ab}$, the block matrix $V=(Q_{ab})\in M_N(\mathbb C)\otimes M_N(\mathbb C)$ is unitary, and with $V^{[r]}=V_{01}V_{02}\ldots V_{0r}$, the formula $T_n(a,b)=tr(Q_{a_1b_1}\ldots Q_{a_nb_n})$, and its version for $T_n^r$ from \cite{trd}, give $Tr(\rho T_n^r)=(Tr\otimes tr)((V^{[r]})^n)$, whose absolute value is at most $N$. Letting $r\to\infty$, we obtain the result. \end{proof} The bound is sharp, as shown by $W_8$ at $n=2$, where $Tr(\rho|P_2)=8$. Now since the rotation permutes the annular basis diagrams, and since for $n$ odd the only rotation invariant Temperley-Lieb diagrams are the 2 alternating ones, and no lower weight diagram is invariant, we have $Tr(\rho|P_n)=2+Tr(\rho|W_n)$ for any $n\geq3$ odd \cite{bn2}. The program \texttt{congruence.py} computes the spaces $F_n$ and $W_n$ for small $n$, and checks this formula, and the bound in Proposition \ref{prop:tracebound}, for the above matrices, and for $F_6$ and $W_8$. Together with Theorem \ref{thm:rotation}, this gives $a_n\leq N-2$, for any $n$ odd. Thus the annular multiplicities are bounded along the odd levels, and the point is that this is enough, together with $\dim P_2=2$, for having a Temperley-Lieb standard invariant, by the following general result, from \cite{bn1,bn2}: \begin{prop}\label{prop:norm} Let $P$ be the planar algebra of an irreducible subfactor of index $\delta^2>4$, with rooted law $\mu$, the spectral measure at the root of the square of the adjacency operator of the principal graph. Then \[ a_n=\int q_n(x)\,d\mu(x) \] for any $n\geq2$, where $q_0=2$, $q_1=x-2$ and $q_{n+1}=(x-2)q_n-q_{n-1}$. Thus, if the annular multiplicities are bounded along a subsequence, then $\mu$ is supported by $[0,4]$, the principal graph has norm at most $2$, and if moreover $\dim P_2=2$, the principal graph is $A_\infty$. \end{prop} \begin{proof} The polynomials $q_n$ are rescaled Chebyshev polynomials, $q_n(2+2\cos\theta)=2\cos(n\theta)$, and the expansion $x^n=\binom{2n}{n}+\sum_{k\geq1}\binom{2n}{n-k}q_k(x)$, integrated against $\mu$, compared with the annular formula above, gives the formula for $a_n$. Since $q_n\geq-2$ on $[0,4]$, and $q_n$ grows exponentially on $(4,\infty)$, the boundedness forces $\mu$ to be supported by $[0,4]$, and the norm bound follows by counting closed walks. Finally, the infinite graphs of norm $\leq2$ having a root of degree one are $A_\infty$ and $D_\infty$, and $D_\infty$ is excluded by $\dim P_2=2$, as well as by the theorem of Popa on the graphs with an $A_\infty$ tail \cite{pop2}. \end{proof} Putting everything together, we obtain the following result, which is Theorem B in the introduction, and whose real case solves the conjecture of Montgomery \cite{mo1} for the Paley II matrices: \begin{thm}\label{thm:bn} The subfactor associated to a complex Hadamard matrix $H$ of order $N>4$ has Temperley-Lieb standard invariant, and so $G_H=S_N^+$, in the following cases: \begin{enumerate} \item $H$ is real, and $N=4(8)$. \item $H$ has entries in $\mathbb Q(i)$, and $N=2(4)$. \item $H$ has cube roots of unity as entries, and $N=3(9)$ or $N=6(9)$. \item $H$ has an algebraic representative with unit entries at a prime of odd residue characteristic $p$, reducing to $J_N-2I_N$, with $N=4(p)$. \item $H$ is the Petrescu matrix of order 7, or a member of its family outside a countable set of algebraic parameters. \end{enumerate} \end{thm} \begin{proof} This is from \cite{bn1,bn2}. In all cases the congruence of the profile forces $\rho=1$ on $W_n$ for the odd $n$ prime to the residue characteristic, and so $a_n\leq N-2$ along a subsequence, and the same congruence shows that the off-diagonal block of $T_2$ has connected support, so $\dim P_2=2$, and Proposition \ref{prop:norm} applies. For the families, at a fixed degree $n$ the dimension of $P_n$ is given by the rank of a matrix with Laurent polynomial entries, which is maximal at the base point, and so outside a finite set of algebraic parameters. \end{proof} The hypotheses of Theorem \ref{thm:bn} exclude the Di\c t\u a matrices, which have $c_2\geq3$ by Theorem \ref{thm:ditanotwild}, and this can be seen directly, as follows. We say that $H\in M_N(\mathbb T)$ is of Di\c t\u a type when it is equivalent to a matrix of the form $D_{ia,jb}=K_{ij}(L_i)_{ab}$, with $K\in M_M(\mathbb T)$ and $L_1,\ldots,L_M\in M_{N/M}(\mathbb T)$ being complex Hadamard, and $12$, which is impossible, and if both are 2 then $N=4$. Thus $N=4(8)$ with $N>4$ is excluded. (2) If $H$ has entries in $\mathbb Q(i)$, so do the matrices in (a) and (b), and since $N=2(4)$, one of their orders $M,N'$ is odd, and $>1$. But there is no complex Hadamard matrix of odd order $n>1$ with entries in $\mathbb Q(i)$. Indeed, such an entry is of the form $z=(a+ib)/c$, with $a,b,c\in\mathbb Z$ satisfying $a^2+b^2=c^2$ and having no common divisor, so $c$ is odd, and exactly one of $a,b$ is odd. Thus $z$ belongs to the local ring of $\mathbb Z[i]$ at the prime $1+i$, whose residue field is $\mathbb F_2$, and $z=1$ modulo $1+i$, because $i=1$ modulo $1+i$. It follows that the scalar product of 2 rows is $n=1$ modulo $1+i$, and so cannot vanish. (3) If $H$ has cube roots of unity as entries, so do the matrices in (a) and (b). For such a matrix of order $n$, the scalar product of 2 rows is $n_0+n_1w+n_2w^2$, with $w=e^{2\pi i/3}$ and $n_0+n_1+n_2=n$, which vanishes only for $n_0=n_1=n_2$, so $3|n$. Thus $3|M,N'$, so $9|N$, which is excluded. (4) Assume that $H$ has a representative with unit entries at a prime $P$ of odd residue characteristic, reducing to $J_N-2I_N$. This representative is of the above form too, with other numbers $x_{ia},y_{jb}$, and by (c), for $j\neq j'$ and $b$ fixed, the reductions of the columns $(j,b)$ and $(j',b)$ have a constant ratio on each row block $\{(i,a)|a\}$, of size $N'\geq2$. On the other hand, each column of $J_N-2I_N$ has exactly one entry $-1$, and 2 different columns have ratio $-1$, which is different from $1$ in odd characteristic, exactly on the 2 rows where these entries $-1$ sit, and ratio 1 elsewhere. Thus the row block containing the entry $-1$ of the column $(j,b)$ consists of this row, and of the row containing the entry $-1$ of the column $(j',b)$. Since there are $M-1$ choices for $j'$, leading to different rows, we obtain $M=2$ and $N'=2$, so $N=4$, which is excluded. (5) For the Petrescu matrices, $N=7$ is prime, so there is no decomposition $N=MN'$ with $M,N'\geq2$. \end{proof} At $N=0(8)$ the situation is different, the real Di\c t\u a matrices, such as the Walsh matrices, existing there, and the method of Theorem \ref{thm:bn} cannot apply to them, since they are not wild. By the same specialization argument, the Temperley-Lieb property holds at all the transcendental phases in the Di\c t\u a family through the Haagerup matrix, at the algebraically independent pairs of phases in a 2-parameter Karlsson family, and at many algebraic parameters in the affine families of orders 10, 12, 14 of \cite{los}, and in the families of Sz\"oll\H{o}si through the real matrices of order $4(8)$ \cite{bn1}. The method fails as such for the real matrices of order $N=0(8)$, where no congruence of the above type holds, as shown for instance by the Paley matrix $P^1_{24}$, whose numbers $S/8$ take both parities on the quadruples of distinct rows, as computed by \texttt{congruence.py}, and in fact the numbers $S$ themselves vanish somewhere, as explained at the end of this section. The specialization argument applies as well to the 3-parameter Karlsson family. We use the parametrization of \cite{abf}, where the $2\times2$ blocks are $H_{ij}=X_i\Omega^{ij}Y_j$, for $i,j\in\{0,1,2\}$. Here $\Omega=-\frac{1}{2}+\frac{i\sqrt3}{2}\Lambda$, where $\Lambda$ is the reflection having first row $(\cos\theta,e^{i\varphi}\sin\theta)$, and $X_i,Y_j$ depend on 4 phases $z_1,z_2,z_3,z_4$, with $z_1=e^{i\psi}$, the other ones being determined by their squares, as $z_3^2=M_A(z_1^2)$, $z_4^2=M_B(z_1^2)$ and $z_2^2=M_A^{-1}(z_4^2)$, where $M_A,M_B$ are the M\"obius maps of the unit circle associated to the matrices $A=F_2\Omega$ and $B=F_2\Omega^2$. \begin{thm}\label{thm:karlssonwild} The generic Karlsson matrices are wild. That is, outside a countable union of nowhere dense real analytic subsets of the parameter space, the members $H$ of the Karlsson family $K_6$ have $c_k=Cat_k$ for any $k$, and so $G_H=S_6^+$. \end{thm} \begin{proof} Fix $k$, and set $m=6^k-Cat_k$. Since $c_k\geq Cat_k$, we have $rank(1-T_k)\leq m$, with equality precisely when $c_k=Cat_k$. Let $U$ be the set of parameters where $M_A,M_B$ are nondegenerate, and the above formulas are regular, whose complement is contained in a proper real algebraic subset. On $U$ the entries of $H$ are rational in the parameters and in $z_2,z_3,z_4$, and the sign choices for these square roots only permute rows or columns, or multiply them by $-1$, so they change $T_k$ at most by a conjugation with a permutation matrix. Thus the sum $\Delta_k$ of the squared moduli of the minors of size $m$ of $1-T_k$ does not depend on these choices, and is a rational function of the parameters, whose numerator is a real analytic function on the connected parameter space, and which is nonzero precisely when $c_k=Cat_k$. Now the Di\c t\u a family through the Haagerup matrix consists of Karlsson matrices, at the angles $\theta=\arccos(1/\sqrt3)$, $\varphi=\pi/4$, and at $\psi=0$ we obtain the matrix in $BH(6,4)$, which has entries in $\mathbb Q(i)$, with $N=6=2(4)$, and so is wild, by Theorem \ref{thm:bn} (2). At these angles $M_A$ degenerates, but near this point the matrix is still given by regular formulas, with $z_2^2=M_B^{-1}(z_3^2)$, as for the degenerate limits in \cite[Appendix 1]{kar}. By lower semicontinuity of the rank, $\Delta_k\neq0$ at the points of $U$ close to it, so the zero set of the numerator of $\Delta_k$, together with the complement of $U$, is contained in a nowhere dense real analytic subset, and the union over $k$ gives the result. \end{proof} In particular the Catalan values up to level 18 for the generic Karlsson matrices, obtained in \cite{abf} by using Theorem \ref{thm:karlsson}, hold at all levels. The program \texttt{specialization.py} checks the ingredients of the proof, namely that the matrices given by both formulas are Hadamard, that the Di\c t\u a family through the Haagerup matrix is the above curve, with all the Haagerup invariants being 4th roots of unity at $\psi=0$, and that the family is continuous at this point, and computes $c_2,c_3,c_4=2,5,14$ there, and at random parameters. Summarizing, the main open cases are the real matrices of order $0(8)$, the matrices with cube roots of unity of order divisible by 9, the Gaussian rational matrices of order $0(4)$, and some of the matrices in the table in Section 4, discussed at the end of this section. The method of \cite{bn1,bn2} extends in fact to a general class of matrices, as follows. Assume that the entries of $H$ belong to a number field $K$, and let $P$ be a prime of $K$, with local ring $R$ and residue field $k$, such that the entries of $H$ are units of $R$. We say that the profile of $H$ is affine at $P$ when the numbers $\sigma(a,b,c,d)=S(a,b,c,d)/N$ belong to $R$, for all the restricted quadruples, and when there are $X,Y\in k$ such that \[ \sigma(a,b,c,d)=-1+\delta_{ab}+\delta_{cd}+X\delta_{ad}+Y\delta_{bc}\ (P) \] for all the restricted quadruples. By orthogonality, this holds automatically when $a=b$ or $c=d$, so the condition concerns the quadruples of distinct indices, where $\sigma=-1(P)$, and those with $a=d$ or $b=c$. The condition depends on the representative of $H$, the row phases multiplying $S(a,b,c,d)$ by $\lambda_a\bar\lambda_b\bar\lambda_c\lambda_d$, the column phases leaving it invariant. We have: \begin{lem}\label{lem:xy} If the profile of $H$ is affine at $P$, and $N\geq5$, then $X+Y=N-2$ and $XY=1$ in $k$. \end{lem} \begin{proof} By orthogonality we have \[ \sum_xS(a,b,c,x)S(c,x,e,f)=NS(a,b,e,f) \] that is, $\sum_x\sigma(a,b,c,x)\sigma(c,x,e,f)=\sigma(a,b,e,f)$. Take $a,b,c,e,f$ distinct. The terms with $x\notin\{a,b,c,e,f\}$ are products of 2 values at quadruples of distinct indices, so they are $1$ modulo $P$, and there are $N-5$ of them. The terms with $x=b,c,f$ vanish, by orthogonality, and those with $x=a,e$ are $-(X-1)$ and $-(Y-1)$ modulo $P$. Thus $N-5+1-X+1-Y=-1$ in $k$, which gives the first formula. Also, for $a,b,c$ distinct, the vector $S(a,b,c,\cdot)$ is the image by $H$ of the vector with entries $H_{ay}\bar H_{by}\bar H_{cy}$, of norm $\sqrt N$, so $\sum_x|S(a,b,c,x)|^2=N^2$, and since $\bar S(a,b,c,x)=S(b,a,x,c)$, this reads $\sum_x\sigma(a,b,c,x)\sigma(b,a,x,c)=1$. The $N-3$ terms with $x\notin\{a,b,c\}$ are $1$ modulo $P$, those with $x=b,c$ vanish, and the term with $x=a$ is $(X-1)(Y-1)$ modulo $P$. Thus $N-3+(X-1)(Y-1)=1$ in $k$, which with the first formula gives $XY=1$. \end{proof} In the real case of Lemma \ref{lem:wallis} we have $X=Y=1$, in the cube root case we have $X=Y=-1$, and for a reduction to $J_N-2I_N$ we have $X=Y=1$, and so the lemma explains the conditions on $N$ in Theorem \ref{thm:bn}. Also, $X$ and $Y$ are the roots of $t^2-(N-2)t+1$, and in particular they are nonzero. In general, we have the following result, which contains the cases (1)-(4) of Theorem \ref{thm:bn}: \begin{thm}\label{thm:affine} Assume that $N\geq6$, and that some representative of $H$ has an affine profile at a prime $P$. Then the subfactor associated to $H$ has Temperley-Lieb standard invariant, and so $G_H=S_N^+$. \end{thm} \begin{proof} Let $\Omega_n\subset X^n$ be the set of words with no equal cyclically adjacent labels. With $P_{ab}=\xi_{ab}\xi_{ab}^*$, the flatness equations for $f\in W_n$ involve $\bar\sigma$, and so the conjugate space $\bar W_n$ satisfies $\sum_b\prod_j\sigma(a_j,b_j,a_{j+1},b_{j+1})f(b)=Nf(a)$. Since the cap equations and the rotation are real, $\bar W_n$ satisfies the cap equations, and $\rho=1$ on $W_n$ if and only if $\rho=1$ on $\bar W_n$. Let $L_n=\bar W_{n,K}\cap R^{\Omega_n}$, where $\bar W_{n,K}$ is the solution space over $K$ of the equations defining $\bar W_n$. This is a free $R$-module, saturated in $R^{\Omega_n}$, stable under $\rho$, and spanning $\bar W_n$. For $f\in L_n$, expand the product of the congruences. A term using fewer than $n$ different labels $b_j$ vanishes after summation, by the cap equations, and since each factor involves $b_j$ or $b_{j+1}$, the terms using all of them correspond to the 2 cyclic matchings of the factors with the labels. For each matching, a change between the 2 local choices forces 2 cyclically adjacent labels $b_j,b_{j+1}$ to coincide, which kills the term, and the 4 surviving terms give $2+X^n\rho+Y^n\rho^{-1}$. With lifts $x,y\in R$ of $X,Y$ we obtain $(2-N+x^n\rho+y^n\rho^{-1})L_n\subset PL_n$, by saturation. Now take $n$ a prime with $n=1(|k|-1)$ and $n>|k|$, and there are infinitely many such primes, by Dirichlet. Then $X^n=X$ and $Y^n=Y$, so by Lemma \ref{lem:xy} the reduction $\bar\rho$ of $\rho$ to $L_n/PL_n$ satisfies $(\bar\rho-1)(X-Y\bar\rho^{-1})=0$. Since $\bar\rho^n=1$ with $n$ prime to $p$, $\bar\rho$ is diagonalizable, and an eigenvalue $\lambda\neq1$ would satisfy $\lambda=Y/X\in k^*$, so its order would divide both $n$ and $|k|-1$, which are coprime, so $\lambda=1$. Thus $\bar\rho=1$, so the idempotent $e=(1/n)\sum_j\rho^j$ satisfies $(1-e)L_n\subset PL_n$, hence $(1-e)L_n\subset P^rL_n$ for any $r$, so $e=1$, and $\rho=1$ on $\bar W_n$, and on $W_n$. By Proposition \ref{prop:tracebound} we conclude that $a_n\leq N-2$ for these $n$. Finally, since $\sigma=-1(P)$ on the quadruples of distinct indices, the corresponding entries of $T_2$ are nonzero, and since $N\geq6$, any 2 ordered pairs of distinct indices are both joined to a pair disjoint from their union, so the off-diagonal block of $T_2$ has connected support, $\dim P_2=2$, and Proposition \ref{prop:norm} applies. \end{proof} As a first application, the case of Theorem \ref{thm:bn} where the matrix reduces to $J_N-2I_N$ extends to arbitrary diagonal values, as follows, with the program \texttt{affine.py} testing the affine condition at the primes not dividing $N$, for the Butson matrices, recovering the Petrescu matrix at $p=3$: \begin{thm}\label{thm:lambda} Assume that $N\geq6$, and that $H$ has a representative whose entries are units at a prime $P$ not dividing $N$, and which reduces modulo $P$ to $J_N+(\lambda-1)I_N$, for some $\lambda\in k^*$. Then $\lambda+\lambda^{-1}=2-N$ in $k$, and the subfactor associated to $H$ has Temperley-Lieb standard invariant. \end{thm} \begin{proof} With $M=J_N+(\lambda-1)I_N$, the orthogonality of the rows modulo $P$ gives $N-2+\lambda+\lambda^{-1}=0$, and the profile of $M$ is $N-4+2\lambda+2\lambda^{-1}=-N$ on the quadruples of distinct indices, $N-3+\lambda^2+2\lambda^{-1}$ when $a=d$, and $N-3+\lambda^{-2}+2\lambda$ when $b=c$. Thus the profile of $H$ is affine at $P$, with $NX=2N-3+\lambda^2+2\lambda^{-1}=(\lambda-1)^2$, by using $2N=4-2\lambda-2\lambda^{-1}$, and since $N=-(\lambda-1)^2/\lambda$, this gives $X=-\lambda$, and similarly $Y=-\lambda^{-1}$. Thus Theorem \ref{thm:affine} applies. \end{proof} For $\lambda=-1$ this is the reduction to $J_N-2I_N$, with $N=4(p)$, and for $p=2$ and $\lambda$ a primitive cube root of unity in $\mathbb F_4$, the condition $\lambda+\lambda^{-1}=2-N$ reads $N=1(2)$, so this applies to the Butson matrices with sixth roots of unity, of odd order, whose reduction modulo 2 has this form. The program \texttt{screen.py} tests the affine condition, at the primes dividing $Nq$, for the matrices of the catalogue of Butson matrices of Lampio, \"Osterg\aa rd and Sz\"oll\H{o}si \cite{los20}, which is to be downloaded separately, from the Zenodo record 2585766, and the program \texttt{classify.py} classifies the results. Here $BH(N,q)$ denotes the set of $N\times N$ Hadamard matrices having as entries $q$-th roots of unity, and the catalogue contains 6815561 matrices with $N\geq6$, including the large files $BH(12,12)$ and $BH(16,4)$, which are screened by the programs \texttt{conor.py} and \texttt{ronda.py}, with the same test. Up to the embeddings $BH(N,q)\subset BH(N,qr)$, the matrices having an affine profile at a prime dividing $Nq$ are the 844 representatives found in \cite{bn1}, which are real at $N=12,20$, with entries in $\mathbb Q(i)$ at $N=6,10,14$, with cube roots of unity at $N=6,12,21$, and with sixth roots of unity at $N=7$, plus 2 more matrices, in $BH(9,10)$ and $BH(10,6)$, whose reductions modulo the primes above 5 and 3 are equivalent to $J_9-2I_9$ and $J_{10}-2I_{10}$. These 2 matrices are thus wild, by Theorem \ref{thm:bn} (4), and the first one, which is the only matrix in $BH(9,10)$ up to equivalence, is the matrix $BN_9$ from the table in Section 4, which is therefore a wild matrix of order 9. All the affine profiles found on the catalogue have $X=Y=\pm1$, so there Theorem \ref{thm:affine} gives nothing new, and its further applications have to come from other constructions, such as the algebraic families. Let us go back now to the table in Section 4. The matrices $H_9,BN_{10}$ there have entries in $\mathbb Q(\sqrt{-15})$, and $N_{11},N_{11}'$ have entries in $\mathbb Q(\sqrt{-7})$, with the formulas from \cite{tbc}, and the family $R_7^q$ passes through a Butson matrix. As for the family $BN_6^q$, which is defined on the arc formed by the numbers $q\in\mathbb T$ with $q+\bar q\leq\sqrt3-1$, and is real analytic in its interior, for a suitable choice of the square root in its formula, its generic members are wild by \cite{bn1}, by specialization at the interior point $q=i$, where the entries are $\pm1,\pm i$, the paper \cite{bn1} covering as well some algebraic parameters. We have the following result: \begin{thm}\label{thm:table} The matrices $H_9,BN_{10},N_{11},N_{11}'$ are wild, and so are the members of the family $R_7^q$, outside a countable set of parameters. \end{thm} \begin{proof} For $H_9$ and $BN_{10}$ the entries are units at the primes above 5 and 3, which ramify in $\mathbb Q(\sqrt{-15})$, with residue fields $\mathbb F_5$ and $\mathbb F_3$, and for $N_{11},N_{11}'$ the same holds at the prime above 7, in $\mathbb Q(\sqrt{-7})$. The entries reduce to $\pm1$, and the reduced matrices are equivalent to $J_N-2I_N$, with $N=9,10,11,11$ satisfying $N=4(p)$, for $p=5,3,7,7$, so Theorem \ref{thm:bn} (4) applies. The matrix $R_7^1$ is one of the 2 matrices of $BH(7,6)$, which have sixth roots of unity as entries, and modulo the prime above 3 of $\mathbb Q(e^{2\pi i/3})$ we have $e^{2\pi i/3}=1$, so the entries reduce to $\pm1$, and the reduced matrix is equivalent to $J_7-2I_7$, with $7=4(3)$, as noted in \cite{bn1}. Thus $R_7^1$ is wild, and since the entries of $R_7^q$ are Laurent polynomials in $q$, the specialization argument in the proof of Theorem \ref{thm:bn} gives the result for $R_7^q$. \end{proof} The program \texttt{opencases.py} checks all this, in exact arithmetic, as well as the above facts about $BN_6^q$, the arc being checked numerically. As for the other open cases of the table, they are beyond the reach of Theorem \ref{thm:affine}, for a simple reason. Observe first that the numbers $|S(a,b,c,d)|$ do not depend on the representative of $H$, up to a relabeling of the indices, and that an affine profile forces $\sigma=-1(P)$ on the quadruples of distinct indices. Thus, we have: \begin{prop}\label{prop:zeros} If $S(a,b,c,d)=0$ for some quadruple of distinct indices, then no representative of $H$ has an affine profile, at any prime. For a real Hadamard matrix of order $N=0(8)$, with $N\leq56$, such a quadruple always exists. \end{prop} \begin{proof} The first assertion is clear from the above. For the second one, the proof of Lemma \ref{lem:wallis} gives $S=N-8\sum_jx_jy_jz_j$, so $S\in8\mathbb Z$ on the quadruples of distinct rows. On the other hand, as in the proof of Lemma \ref{lem:xy}, for $a,b,c$ distinct we have $\sum_dS(a,b,c,d)^2=N^2$, and the terms with $d=b,c$ vanish, as does the term with $d=a$, which is $\sum_yH_{by}H_{cy}=0$. Thus the $N-3$ numbers $S(a,b,c,d)$ with $d\notin\{a,b,c\}$ are multiples of 8, whose squares sum up to $N^2$, and if they were all nonzero, we would get $64(N-3)\leq N^2$. With $N=8m$ this reads $m^2-8m+3\geq0$, which fails for $1\leq m\leq7$. \end{proof} At $N=4(8)$ the same proof gives $S=4(8)$, so $S\neq0$, in agreement with Theorem \ref{thm:bn} (1). The program \texttt{opencases.py} computes the zeros of $S$ on the quadruples of distinct indices, in exact arithmetic. For $BF_6$ there are 96 zeros, out of 360 quadruples, and for $L_{8,30}$ there are 384, out of 1680. For the families $F_{8,2},F_{8,4},K_{8,2},M_{8,1}$ the numbers $S$ vanish identically in the parameters, on respectively 288, 576, 384, 384 quadruples, so no member of these families can be treated, and the specialization argument is of no help. For $P^1_{104}$ the program finds a quadruple of distinct rows with $S=0$, and for $P^1_{24},P^1_{32},P^1_{48}$ and the 45 classes of order 24, Proposition \ref{prop:zeros} applies directly. The same holds for the transposes, which have zeros too. The 2 remaining matrices, $I_{8,12}$ and $K_{8,30}$, have profiles with no zeros, but they fail a necessary condition, coming from the fact that the numbers $|\sigma(a,b,c,d)|^2=\sigma(a,b,c,d)\sigma(b,a,d,c)$ do not depend on the row phases. Since these numbers must be $1$ modulo $P$ on the quadruples of distinct indices, the prime $P$ must contain all the numbers $|S(a,b,c,d)|^2-N^2$, and \texttt{opencases.py} finds that there is no such prime for $K_{8,30}$, and that for $I_{8,12}$ only the primes above 2 remain, where the full test, carried out by \texttt{screen.py} on $BH(8,12)$, fails. The program also sweeps over the residues of the parameters of $F_{8,2},K_{8,2},R_7^q$ in some small finite fields, finding only the affine members of $R_7^q$ above 3, and checks the relations of Lemma \ref{lem:xy} on them. Summarizing, after Theorem \ref{thm:table}, the open cases of the table are $BF_6$, the matrices of order 8, and the real matrices of orders 24, 32, 48, 104, and Theorem \ref{thm:affine} cannot apply to any of them. Among these open cases, the circulant ones, of the form $H_{ij}=h(j-i)$, with $h:\mathbb Z_N\to\mathbb T$, have some extra structure. The simplest one is the Bj\"orck-Fr\"oberg matrix $BF_6$, which is the circulant matrix with first row $(1,ia,-a,-i,-\bar a,i\bar a)$, where $a=(1-\sqrt3+i\sqrt{2\sqrt3})/2$, coming from the cyclic 6-roots \cite{bjf}. By \cite{bjk}, a circulant matrix $H$ is Hadamard precisely when its eigenvalues $\lambda_k=\sum_th(t)w^{kt}$, with $w=e^{2\pi i/N}$, all have modulus $\sqrt N$, that is, when the Fourier transform of $h$ is unimodular too, up to normalization, and we refer to \cite{haa} for the circulant matrices of prime order. The profile takes a simple form in terms of the eigenvalues: \begin{prop}\label{prop:circprofile} For a circulant Hadamard matrix $H$, with eigenvalues $\lambda_k$, the profile is given by $S(a,b,c,d)=N^{-3}\sum_{k+n=l+m}\lambda_k\bar\lambda_l\bar\lambda_m\lambda_nw^{ka-lb-mc+nd}$, the sum being over $k,l,m,n\in\mathbb Z_N$. Thus the Fourier transform of the profile is supported by the quadruples with $k+n=l+m$, where it has constant modulus $1/N$. \end{prop} \begin{proof} We have $H_{ay}=h(y-a)$, with $h(t)=\frac{1}{N}\sum_k\lambda_kw^{-kt}$, and inserting this in the definition of $S$, the sum over $y$ gives $N$ when $k+n=l+m$, and $0$ otherwise, which gives the formula. The second assertion follows from $|\lambda_k|^2=N$. \end{proof} Thus the zeros of the profile of $BF_6$, which block Theorem \ref{thm:affine}, are cancellations in sums of unimodular numbers, and disappear in the Fourier basis. The other feature of the circulant matrices is the symmetry under the cyclic shift $\sigma(i)=i+1$. Indeed, with $U$ the cyclic shift of the coordinates, we have $\xi_{\sigma(i)\sigma(j)}=U\xi_{ij}$, so $P_{\sigma(i)\sigma(j)}=UP_{ij}U^*$, and by the trace property $T_k$ commutes with $\sigma^{\otimes k}$, acting on $(\mathbb C^N)^{\otimes k}$. Thus $P^H_k$ is invariant under $\sigma^{\otimes k}$, and we have: \begin{thm}\label{thm:circulant} Let $H$ be circulant, with $N\geq4$, and let $G'\subset S_N^+$ be the quantum group generated by $G_H$ and by the cyclic group $\mathbb Z_N$, acting by cyclic shifts. Then $G_H=S_N^+$ if and only if $G'=S_N^+$, that is, if and only if the shift-invariant vectors of $P^H_k$ are Temperley-Lieb, for any $k$. \end{thm} \begin{proof} By Tannakian duality \cite{wo2}, the fixed vectors of $G'$ are the shift-invariant vectors of $P^H_k$, which gives the second equivalence, and one implication in the first one is clear. Conversely, assume $G'=S_N^+$, and let $x\in P^H_k$ be an eigenvector of $\sigma^{\otimes k}$. The rank one operator $R=xx^*$ intertwines the representation $u^{\otimes k}$ of $G_H$ with itself, because $x$ is fixed, and commutes with $\sigma^{\otimes k}$, so it belongs to $End_{G'}(u^{\otimes k})$, which is $End_{S_N^+}(u^{\otimes k})$, by the Frobenius isomorphism with $Fix(u^{\otimes2k})$. Thus the line spanned by $x$ is invariant under $S_N^+$, and so is a corepresentation of dimension $1$. But for $N\geq4$ the irreducible corepresentations of $S_N^+$ other than the trivial one have dimension at least $N-1$, so $x$ is fixed by $S_N^+$, and so is Temperley-Lieb. Since $P^H_k$ is spanned by such eigenvectors, we obtain $G_H=S_N^+$. \end{proof} The proof works more generally for any abelian group of permutations $\sigma$ of the indices satisfying $P_{\sigma(i)\sigma(j)}=U_\sigma P_{ij}U_\sigma^*$, for some unitaries $U_\sigma$. The point is that the obstruction coming from the 1-dimensional corepresentations, which in the classical case comes for instance from $A_N\subset S_N$, is absent for $S_N^+$. In practice, the shift-invariant vectors are determined by their values on the words starting with $0$, so they form a space of dimension $N^{k-1}$. More generally, $T_k$ decomposes over the characters $t\to w^{ct}$ of $\mathbb Z_N$, into $N$ blocks $T_k^{(c)}$ of size $N^{k-1}$, and so do the Jones-Wenzl pieces $\Phi_k$ from Theorem \ref{thm:jw}, which are the restrictions of $T_k$ to the vectors whose leg sums vanish, and which vanish on the words with 2 equal adjacent letters \cite{tbc}. By Theorem \ref{thm:circulant}, a circulant matrix $H$ is wild precisely when $\|\Phi_k^{(0)}\|<1$ for any $k$. The program \texttt{circulant.py} implements this, checks Proposition \ref{prop:circprofile}, and computes the block norms for $BF_6$: \[ \begin{array}{|l|l|l|l|l|}\hline k&c=0&c=1,5&c=2,4&c=3\\\hline 2&0.27897&0.63350&0.51414&0.30940\\\hline 3&0.40192&0.63350&0.51414&0.50952\\\hline 4&0.66084&0.66666&0.66619&0.59734\\\hline 5&0.66084&0.66666&0.66619&0.59734\\\hline 6&0.66516&0.66666&0.66619&0.66163\\\hline \end{array} \] The maximum over the blocks is the norm $\|\Phi_k\|$ computed in \cite{tbc}, and the relevant block $c=0$ stays below the other ones, while approaching $2/3$ as well. The program \texttt{charles.py}, run on a laptop, extends these computations up to level 10, in dimension $6^9$ for each block, and finds norms between $0.6660$ and $0.6667$ at the levels 7 to 10, these values being lower bounds, coming from 40 Lanczos steps, so this is only numerical evidence for $c_k=Cat_k$ with $k\leq10$, extending \cite{tbc} by one level. The same program computes the blocks for the 2 circulant matrices of order 7 discussed below, up to level 9, with norms below $4/7$. The question is then whether the Fourier form of the profile, which has no zeros, and the reduction to the block $c=0$, can be used for proving that these norms stay below 1, at all levels. The circulant matrices can also be searched for directly. By \cite{bjk}, these are given by the vectors $h\in\mathbb T^N$ whose Fourier transform has constant modulus, which are the common points of 2 tori, and can be found by alternating projections between them, followed by Newton's method. The program \texttt{fury.py}, run on a laptop, does this from random starting points, for $N=6,\ldots,13$, and sorts the results by the spectrum of $T_2$, which is invariant under equivalence, transposition and conjugation, and the program \texttt{liston.py} does the same for $N=14,\ldots,20$. The numbers of spectra with $c_2=2$ found in this way, which are lower bounds for the numbers of classes, all these matrices being numerically isolated among the circulant ones, are as follows: \[ \begin{array}{|l|l|l|l|l|l|l|l|l|}\hline N&6&7&8&9&10&11&12&13\\\hline {\rm classes}&1&2&3&2&8&12&19&23\\\hline\hline N&14&15&16&17&18&19&20&\\\hline {\rm classes}&50&69&93&121&365&371&821&\\\hline \end{array} \] At $N=6$ this is $BF_6$, which is however not isolated among all the matrices of order 6, by \cite{cw2}, and at $N=7$ these are the circulant matrices coming from the cyclic 7-roots of simple index 2 and 3 \cite{bjk,haa}, denoted $C_{7A}$ and $C_{7C}$ in \cite{tz2}, the first one, which has 2 distinct entries, being the matrix of the Fano plane from \cite{bn1}. For all these matrices with $N\leq13$, \texttt{fury.py} computes the norms of the blocks $\Phi_k^{(c)}$ up to the level 7, 6 or 5, depending on $N$, and finds them all smaller than 1, so the computed values support $c_k=Cat_k$ at these levels, and \texttt{liston.py} does the same up to level 4, for the matrices of order $N\geq14$ whose profile has no zeros, and whose first row takes at most 8 values, up to the characters. In most cases the norms approach $4/N$, from below, which is the upper edge of the support of the free Poisson law, rescaled by $1/N$, in agreement with the main character being free Poisson, and the value $2/3$ for $BF_6$ is of this type, while some matrices have norms above $4/N$. Also, at the prime orders 7, 11, 13 all the matrices found have profiles with no zeros, and at the orders 8, 10, 12 some of them do too, so for them Theorem \ref{thm:affine} can apply, and we have: \begin{thm}\label{thm:c8} The circulant matrices $C_8$ and $C_{10}$ having as first rows \[ (1,z,z,-1,z,1,1,-1)\quad,\quad(1,a,1,-i,ia,a,ia,a,ia,-i) \] with $z=(-1-2i\sqrt2)/3$ and $a=(\sqrt5+2i)/3$ are complex Hadamard matrices, and are wild. \end{thm} \begin{proof} For $C_8$ the entries are in $\mathbb Q(i\sqrt2)$, and $z=\bar\pi/\pi$, with $\pi=1+i\sqrt2$ of norm 3, so the entries are units at the prime $P=(i\sqrt2)$ above 2, which has residue field $\mathbb F_2$, and with $v_P(8)=6$. A direct computation shows that $v_P(S)=6$ on the quadruples of distinct indices, and $v_P(S)\geq7$ on the restricted quadruples with $a=d$ or $b=c$, but not both. Thus $\sigma=S/8$ belongs to the local ring, and is $1=-1$ modulo $P$ in the first case, and $0$ modulo $P$ in the second case, and $1$ modulo $P$ when $a=d$ and $b=c$, which is the affine condition with $X=Y=1$. Thus Theorem \ref{thm:affine} applies. For $C_{10}$ the entries are in $\mathbb Q(i,\sqrt5)$, whose ring of integers is $\mathbb Z[i,f]$, with $f=(1+\sqrt5)/2$, and they are units at the prime $P=(1+i)$, the only prime above 2, with residue field $\mathbb F_4$, the reduction being given by $i\to1$ and $f\to w$, with $w^2=w+1$. The computation shows that $\sigma=S/10$ belongs to the local ring, is $1$ modulo $P$ on the quadruples of distinct indices, $0$ modulo $P$ on the restricted quadruples with $a=d$ or $b=c$, but not both, and $1$ modulo $P$ when $a=d$ and $b=c$, so again $X=Y=1$, and Theorem \ref{thm:affine} applies. \end{proof} The program \texttt{circwild.py} checks all this, in exact arithmetic. Both congruences take place at the prime above 2, with $X=Y=1$, as in the real case of Lemma \ref{lem:wallis}, but at $N=0(8)$ for $C_8$, an order where no real matrix can work, by Proposition \ref{prop:zeros}. At the orders 14 and 15, the search finds circulant matrices with 3 distinct entries, of the form $1,z,z^2$, with $z$ quadratic, and here the congruence takes place at a ramified prime dividing $N$, with $X=Y=-1$, as in the cube root case of Theorem \ref{thm:bn}: \begin{thm}\label{thm:c14} The circulant matrices $C_{14}$ and $C_{15}$ having as first rows \[ (1,1,z,z^2,z,z^2,z^2,z,z,1,z^2,1,z^2,z^2)\quad,\quad(1,1,1,1,y,y^2,y^2,1,y^2,y,1,1,y^2,1,y) \] with $z=(-3-i\sqrt7)/4$ and $y=(-1+i\sqrt{15})/4$ are complex Hadamard matrices, and are wild. \end{thm} \begin{proof} For $C_{14}$ the entries are in $\mathbb Q(i\sqrt7)$, and since they have modulus 1, and denominators powers of 2, they are units at the primes not above 2, and in particular at the prime $P=(i\sqrt7)$ above 7, which is ramified, with local ring $\mathbf Z_7[i\sqrt7]$ and residue field $\mathbb F_7$. The computation shows that $\sigma=S/14$ belongs to the local ring, and that modulo $P$ it is $-1$ on the quadruples of distinct indices, $-2$ on the restricted quadruples with $a=d$ or $b=c$, but not both, and $-3$ when $a=d$ and $b=c$, which is the affine condition with $X=Y=-1$. Thus Theorem \ref{thm:affine} applies. For $C_{15}$ the same holds at the prime above 5 of $\mathbb Q(i\sqrt{15})$, with the same residues $-1,-2,-3$. \end{proof} These matrices are checked by \texttt{circwild.py} too. Note that $z=(-3-i\sqrt7)/4$ is, up to conjugation, the entry of the 2-valued circulant matrix $C_{7A}$ of order 7, and that the 2-valued circulant matrix of order 15 found by the search, which has entries $1,y^2$, is one of the matrices treated in \cite{bn1}. The other circulant matrices with no zeros in the profile can be treated in the same way, once their entries are known exactly, and the simplest case is that of the matrix $C_{7C}$ of order 7, of simple index 3, which turns out to be accessible via Theorem \ref{thm:bn} (4). Its first row is $(1,A,B,C,C,B,A)$, with $A,B,C\in\mathbb T$ subject to the 3 equations expressing the orthogonality of the rows, and we have: \begin{thm}\label{thm:c7c} The numbers $A+\bar A$, $B+\bar B$, $C+\bar C$ are roots of the polynomial \[ f(u)=u^6-12u^5+18u^4+64u^3-96u^2-45u+43 \] and $C_{7C}$ reduces modulo any prime above $3$ to a matrix equivalent to $J_7-2I_7$. Thus $C_{7C}$ is wild, and so is its conjugate $C_{7D}$. \end{thm} \begin{proof} With $u=A+\bar A$ and $s=A-\bar A$, we have $s^2=u^2-4$, and the numbers $B+\bar B$, $C+\bar C$, as well as the products of the imaginary parts of $A$ with those of $B$ and $C$, are polynomials in $u$, with rational coefficients, so the entries live in the field $\mathbb Q(u,s)$, where the orthogonality equations can be checked exactly. Since $f$ is monic with integer coefficients, $u$ is an algebraic integer, and so is $A$, which is a root of $x^2-ux+1$, and similarly for $B,C$, so the entries are algebraic integers, of modulus 1, and units. Now $f=(u-1)^6$ modulo 3, so for any prime $P$ above 3 we have $u=1(P)$, and so $(A+1)^2=(u+2)A=0(P)$, that is, $A=-1(P)$, and similarly $B=C=-1(P)$. Thus $C_{7C}$ reduces modulo $P$ to the circulant matrix $2I_7-J_7$, which is equivalent to $J_7-2I_7$, and since $7=4(3)$, Theorem \ref{thm:bn} (4) applies. \end{proof} The polynomial $f$, and the expressions in terms of $u$ used in the proof, were found by integer relations, from a solution computed with 120 digits, and the program \texttt{circwild.py} checks exactly that they define a solution of the orthogonality equations, matching the numerical one. The next candidate is the matrix of order 13 having 3 distinct entries, coming from the cyclic 13-roots of simple index 2, whose profile has no zeros as well, and which is wild by Theorem \ref{thm:index2} below, and many more candidates come from the following searches. Most of the matrices above are of multiplier type, in the sense that, up to equivalence, their first row is constant on the orbits of a subgroup $U$ of the group of units of $\mathbb Z_N$, acting by multiplication. This is the case for $C_{7A}$, $C_{7C}$, $C_8$, $C_{10}$, $C_{14}$ and $C_{15}$, and at a prime order $p$, with $U$ of index $d$, these are the cyclic $p$-roots of simple index $d$ of Bj\"orck \cite{bjk}. The program \texttt{joshua.py}, run on a laptop, searches for such matrices, for $N=6,\ldots,32$, and for all the subgroups $U$ generated by at most 2 elements, with 2 to 12 orbits, by solving the orthogonality equations for the phases on the orbits, by Gauss-Newton, from random starting points. At the singular points the solutions are only accurate to about 7 digits, and the program \texttt{blocks.py} snaps them to exact Butson matrices, and recomputes $\dim P_2$. The numbers of classes with $c_2=2$ found in this way are as follows: \[ \begin{array}{|l|l|l|l|l|l|l|l|l|l|}\hline N&6&7&8&9&10&11&12&13&14\\\hline {\rm classes}&1&2&3&2&8&12&16&16&18\\\hline\hline N&15&16&17&18&19&20&21&22&23\\\hline {\rm classes}&43&26&33&28&43&41&60&29&19\\\hline\hline N&24&25&26&27&28&29&30&31&32\\\hline {\rm classes}&36&7&31&0&11&22&9&39&0\\\hline \end{array} \] At the prime orders all these matrices have profiles with no zeros, and for all of them, the norms of the blocks $\Phi_k^{(0)}$ computed by \texttt{joshua.py}, at the levels $k\leq4$ for $N\leq20$ and $k\leq3$ beyond, are smaller than 1, the largest one being $0.974$, at $N=24$. As for the matrices with $c_2>2$, their orbitals always produce block systems, as for the matrices of Di\c t\u a type, except for 4 matrices of orders 24 and 28, where the search for block systems is too long. Conversely, the program \texttt{dempsey.py} searches for the circulant matrices whose first row takes at most $m$ values, up to the characters, for $m=2,\ldots,5$ and $N=9,\ldots,24$, with no symmetry assumed, by Gerchberg-Saxton iterations alternating with a quantization step, followed by Gauss-Newton on the $m$ phases. All the matrices with $c_2=2$ found in this way are of multiplier type, in an affine sense, the only other matrices being 51 classes at $N=16$, with $c_2=3$, coming from a continuous family. Thus, the few-valued circulant candidates for wildness all have the multiplier structure, and so explicit algebraic entries. At prime order the multiplier circulants can be followed further. The program \texttt{ali.py} computes them for the primes $5\leq p\leq127$ and the indices $d=2,\ldots,6$, and finds 250 classes, 246 of them with $c_2=2$, all having profiles with no zeros, and all being isolated, numerically, the defect being computed in floating point via the Berezin matrix of Section 9, and checked by a singular value computation in the doubtful cases, with an exact certificate for the 2-valued ones, explained below. The norms of the blocks $\Phi_k^{(0)}$ are all smaller than 1, at the levels up to $8,7,6,5,4,3$, for $p$ up to $7,11,13,19,47,127$, the largest value at $p=7$ and level 8 being $0.5712$, close to $4/7$. Curiously, at $p=71$ the linearized orthogonality equations of the 2-valued matrix have singular values of size $10^{-10}$, instead of $10^{-2}$ at the neighboring primes. However, the defect is exactly 0 there, as certified by \texttt{isolated.py}, which reduces the Berezin matrix modulo a prime above 569, where $\sqrt{-71}\to92$, and splits it, over the characters of the translations, into 71 blocks of size 71, whose nullities over $\mathbb F_{569}$ are $1,2,\ldots,2$, so that the nullity over $\mathbb C$ is at most $141=2p-1$. The same holds for all the 2-valued matrices with $p=3(4)$ and $7\leq p\leq127$. Among these matrices there are, for $p=3(4)$, the 2-valued matrices coming from the quadratic residues, and these, and more generally those coming from the difference sets with parameters $(4n-1,2n-1,n-1)$, are wild by \cite{bn1}. In our setting, this follows from Theorem \ref{thm:affine}, as follows: \begin{prop}\label{prop:designs} Let $D$ be a difference set with parameters $(v,k,\lambda)=(4n-1,2n-1,n-1)$ in an abelian group $G$, and $h=1+(z-1)\chi_D$, with $z=(1-2n+i\sqrt v)/2n$. Then $H=(h(j-i))_{i,j\in G}$ is a complex Hadamard matrix, and for any prime $q$ with $v_q(v)$ odd, the profile of $H$ is affine at the prime above $q$ of $\mathbb Q(i\sqrt v)$, with $X=Y=-1$. Thus $H$ is wild, for $v\geq7$. \end{prop} \begin{proof} Let $\varepsilon=z-1=i\sqrt v(1+i\sqrt v)/2n$. Since $|z|=1$ we have $\varepsilon+\bar\varepsilon=-|\varepsilon|^2$, and $|\varepsilon|^2=v/n$. For $s\neq0$ the autocorrelation is $\sum_xh(x+s)\bar h(x)=v+k(\varepsilon+\bar\varepsilon)+\lambda|\varepsilon|^2=v-(k-\lambda)v/n=0$, so $H$ is Hadamard. Now let $P$ be the prime above $q$, which is ramified, and $e=v_q(v)$, so that $v_P(v)=2e$ and $v_P(\varepsilon)=e$, the numbers $1+i\sqrt v$ and $2n$ being units at $P$, because $4n=v+1$. Expanding $S(a,b,c,d)=\sum_xh(x-a)\bar h(x-b)\bar h(x-c)h(x-d)$ in powers of $\varepsilon,\bar\varepsilon$, the terms of degree at least 3 vanish in $\sigma=S/v$ modulo $P$. Modulo $P$ we have $n=1/4$, $\varepsilon^2/v=\bar\varepsilon^2/v=-1/4n^2=-4$, $\varepsilon\bar\varepsilon/v=1/n=4$ and $k(\varepsilon+\bar\varepsilon)/v=-k/n=2$, and with $A_{xy}=|(D+x)\cap(D+y)|$, which is $\lambda=-3/4$ for $x\neq y$ and $k=-1/2$ for $x=y$, we obtain \[ \sigma=5-4A_{ad}-4A_{bc}+4(A_{ab}+A_{ac}+A_{bd}+A_{cd})\ (P) \] This is $5+8\lambda=-1$ on the quadruples of distinct indices, $5-4k+12\lambda=-2$ when $a=d$ or $b=c$, but not both, and $5-8k+16\lambda=-3$ when $a=d$ and $b=c$, which is the affine condition with $X=Y=-1$, and Theorem \ref{thm:affine} applies. \end{proof} Since $v=3(4)$ is not a square, there is always a prime $q$ as above. This covers the quadratic residues modulo a prime $p=3(4)$, which give the Bj\"orck matrices of simple index 2 at these primes, the Singer difference sets in $\mathbb Z_{2^m-1}$, and the twin prime difference sets in $\mathbb Z_p\times\mathbb Z_{p+2}$, and in particular the matrix $C_{7A}$ of the Fano plane, and the 2-valued matrix of order 15, which comes from the cyclic $(15,7,3)$ difference set. The program \texttt{designs.py} checks the residues $-1,-2,-3$ in exact arithmetic, for the quadratic residues modulo $7,11,19,23$, the Singer difference sets of orders 15 and 31, and the twin prime difference set of order 35, at all the relevant primes. At the primes $p=1(4)$ the Bj\"orck matrices of simple index 2 have 3 distinct entries, and the mechanism is a reduction to $2I_p-J_p$. The rows of $2I_p-J_p$ have scalar products $p-4$, so such a reduction can only happen modulo the primes above the prime divisors $q$ of $p-4$, as needed for Theorem \ref{thm:bn} (4). With $w=e^{2\pi i/p}$, the Gauss periods are the sums $\eta_0,\eta_1$ of the numbers $w^x$ over the nonzero squares, and over the non-squares, and for $p=1(4)$ these are $(-1\pm\sqrt p)/2$. We have: \begin{thm}\label{thm:index2} Let $p=1(4)$ be a prime, $s=\pm1$, $c=1/(1-s\sqrt p)$ and $a=c+i\sqrt{1-c^2}$. The circulant matrix $H$ of order $p$ with first row $h(0)=1$, $h(x)=a$ for the nonzero squares $x$, and $h(x)=\bar a$ for the non-squares $x$, is a complex Hadamard matrix. For $p\geq13$, and any prime $q$ dividing $p-4$, the matrix $H$ reduces modulo some prime above $q$ to $2I_p-J_p$, and so $H$ is wild. \end{thm} \begin{proof} The eigenvalues of $H$ are the numbers $\widehat h(k)=\sum_xh(x)w^{kx}$, and $H$ is Hadamard when they all have modulus $\sqrt p$. We have $\widehat h(0)=1+(p-1)c$, and for $k\neq0$ a square, $\widehat h(k)=1+a\eta_0+\bar a\eta_1=1-c+i\sqrt{p(1-c^2)}$, while for $k$ a non-square we obtain the conjugate. Since $1-c=-s\sqrt p\,c$ and $1+(p-1)c=-s\sqrt p$, we get $|\widehat h(k)|^2=pc^2+p(1-c^2)=p$, and $|\widehat h(0)|^2=p$. Also, $|c|<1$, because $\sqrt p-1>1$, so $|a|=1$. For the second assertion, observe that $p-4\geq9$ is odd, so it has odd prime divisors $q$, and since $(\sqrt p-2s)(\sqrt p+2s)=p-4$, there is a prime $P$ of $\mathbb Q(\sqrt p)$ above $q$ containing $\sqrt p-2s$. Modulo $P$ we have $\sqrt p=2s$, so $1-s\sqrt p=-1$ is a unit, and $2-s\sqrt p=0$, and so $1+c=(2-s\sqrt p)/(1-s\sqrt p)$ is in the local ring, and vanishes modulo $P$. Now $a$ is a root of $x^2-2cx+1$, so it is a unit at any prime $P'$ above $P$ of the field of $H$, and from $(a+1)^2=2(1+c)a$ we obtain $a=-1(P')$, and so $\bar a=2c-a=-1(P')$ too. Thus $H$ reduces modulo $P'$ to $2I_p-J_p$, which is equivalent to $J_p-2I_p$, and since $p=4(q)$, Theorem \ref{thm:bn} (4) applies. \end{proof} At $p=5$, where $p-4=1$, we have $a=e^{4\pi i/5}$ for $s=1$, and $a=e^{2\pi i/5}$ for $s=-1$, so $h(x)=w^{2x^2}$ and $h(x)=w^{x^2}$, and in both cases $H$ is equivalent to $F_5$. The program \texttt{simpleindex.py} checks Theorem \ref{thm:index2} in exact arithmetic, in the field $\mathbb Q(\sqrt p,a)$, for the primes $13\leq p\leq127$, and compares with \texttt{ali.py}, which finds exactly these 2 classes of simple index 2 at each prime $p=1(4)$. Together with Proposition \ref{prop:designs}, this shows that the Bj\"orck matrices of simple index 2 are all wild, at the primes $p\geq7$. For the simple index 3, where $p=1(3)$, the entries were found explicitly by Bj\"orck and Haagerup \cite{bha}, in terms of the numbers $A,B$ with $4p=A^2+27B^2$, the 12 unimodular solutions of their equations forming 2 orbits under the rotations of the cosets and the conjugation. Here we compute these matrices exactly, as for $C_{7C}$, and the same mechanism works, with $q=3$ always available, because $3|p-4$. The first row is $h(0)=1$ and $h(x)=x_j$ on the $j$-th coset of the group of cubes, for $j=0,1,2$, and we set $u_j=x_j+\bar x_j$. We have: \begin{thm}\label{thm:index3} At the primes $p=1(3)$ with $13\leq p\leq127$, the Bj\"orck matrices of simple index $3$ found by \texttt{ali.py} form $2$ classes, up to equivalence and conjugation, and all of them, except for one class at $p=61$, reduce to $2I_p-J_p$ modulo some prime above a prime divisor of $p-4$, and so are wild. \end{thm} \begin{proof} For each class, the program \texttt{indexthree.py} refines the solution of \texttt{ali.py} to 600 digits, finds by integer relations the minimal polynomial $f$ of $u_0$, which has degree 3 or 6, and the expressions of $u_1,u_2$, and of the products of the imaginary parts of $x_0,x_1,x_2$, as polynomials in $u_0$ with rational coefficients, and then checks in exact arithmetic, in the field $K=\mathbb Q(u_0,x_0)$, that they define a complex Hadamard matrix, and that $f$ is irreducible, from its factorizations modulo small primes. It also checks that $u_1=g(u_0)$, $u_2=g(u_1)$ and $u_0=g(u_2)$, for a polynomial $g$. Now if $u_0,u_1,u_2$ are integral and equal to $-2$ at a prime $P$ of $K$ above $q$, then $(x_j+1)^2=(u_j+2)x_j$ gives $x_j=-1(P)$, so $H$ reduces modulo $P$ to $2I_p-J_p$, and Theorem \ref{thm:bn} (4) applies, because $p=4(q)$. As for the existence of $P$, consider the roots $\theta$ of $f$ in an algebraic closure of $\mathbb Q_q$ which are integral and congruent to $-2$, whose number $m$ is the multiplicity of $-2$ as a root of $f$ modulo $q$. An embedding of $K$ sending $u_0$ to such a root $\theta$ gives a prime $P$ as above, as soon as $g(\theta)$ and $g(g(\theta))$ are among these $m$ roots too. The program computes the number of roots $\theta$ having each of these 2 properties, from the Newton polygons of the characteristic polynomials of $g(u)+2$ and $g(g(u))+2$ on the part of $\mathbb Q_q[u]/(f)$ corresponding to these $m$ roots, which is cut by an idempotent, obtained by Hensel lifting. For all the classes but one, there is a prime $q$ dividing $p-4$ for which these numbers are both equal to $m$, so that all the $m$ roots are suitable. The $q$-adic computations are done with 90 digits, and the precision is certified, with a margin of at least 70 digits, by the Newton identities applied to integral elements. \end{proof} In each pair, one class has $u_0,u_1,u_2$ equal to the 3 roots of a cubic polynomial, and reduces modulo all the primes above the prime divisors $q\neq3$ of $p-4$, and modulo those above 3 for $p=13,31$, where $p-4$ is a power of 3, and the other class has $u_0,u_1,u_2$ equal to 3 of the 6 roots of a sextic polynomial, and reduces modulo a prime above 3. In the notation of \cite{bha}, the cubic class is the orbit of the solution $c^{(1)}$, and the sextic class is that of $c^{(2)}$, as checked numerically by \texttt{indexthree.py}, which also gives an interval isolating $u_0$ among the roots of $f$, and the sign of $Im(x_0)$, which determine the class. At $p=7$ the 2 classes are $F_7$ and $C_{7C}$, and the program recovers Theorem \ref{thm:c7c}. The exception is the sextic class at $p=61$, where $f=3u^6-158u^5+180u^4+4034u^3-1720u^2-9177u+6109$, which has 4 roots congruent to $-2$, and 1 root which is not integral, at the primes above 3, and where only 2 of these 4 roots are sent by $g$ to roots congruent to $-2$, so that, the roots being permuted by $g$ in cycles of length 3, no prime above 3 is suitable. The prime 19, which is the other divisor of $p-4=57$, is not suitable either. As for a reduction to $J_p+(\lambda-1)I_p$, as in Theorem \ref{thm:lambda}, in the above normalization, this would require $u_0,u_1,u_2$ to be congruent to $2-p$. But $f(2-p)=3^4\cdot61^2\cdot799091$, with 799091 prime, and $2-p$ is a simple root of $f$ modulo 799091, so the 3 distinct roots $u_0,u_1,u_2$ cannot all be congruent to $2-p$ at a prime above it, and since $2-p=-2(3)$, the primes above 3 are excluded as well. Thus the wildness of this class remains open. For the indices $d\geq4$ the fields are larger, the degree of $u_0$ being for instance above 24 at $p=13$ and $d=4$, and these matrices remain open. Coming back to $BF_6$, whose profile has zeros, its profile on the Fourier side is given by the phase function $\Phi(k,l,m)=\lambda_k\bar\lambda_l\bar\lambda_m\lambda_{l+m-k}/N^2$ appearing in Proposition \ref{prop:circprofile}, and this function turns out to be very simple, arithmetically. The field of $BF_6$ is $K=\mathbb Q(i,a)$, of degree 8, and above 2 and 3 there is a single prime, with uniformizer $b=a+1$, which satisfies the Eisenstein equation $b^4-6b^3+12b^2-12b+6=0$ at both primes, the residue fields being $\mathbb F_4$ and $\mathbb F_9$. We have: \begin{prop}\label{prop:bf6fourier} For $BF_6$, the norms of the eigenvalues $\lambda_k$ have the same valuations at $2$ and $3$ as $\sqrt6$, so the phase function $\Phi$ is a unit at all primes. Moreover, $\Phi=1$ modulo the prime above $2$, and $\Phi=(-1)^{(k-l)(k-m)}$ modulo the prime above $3$. \end{prop} \begin{proof} Since $\lambda_k\bar\lambda_k=6$, the eigenvalues are units outside 2 and 3, and the valuations follow from the norms, there being a single prime above 2 and 3. The congruences are checked in exact arithmetic, by writing the elements of $K$ in terms of $i$ and $b$, and reducing modulo $b$. \end{proof} The program \texttt{fourierside.py} does these computations. Thus, modulo both primes dividing $N$, the profile of $BF_6$ on the Fourier side is congruent to phase functions of group type, as for the Fourier matrices, so its subfactor cannot be seen by congruences of order 0 at these primes. The deviations from these models have valuation 1 exactly when $k-l$ and $k-m$ are both nonzero modulo 3, at the prime above 2, and when $k-l$ and $k-m$ are nonzero, and not both even, at the prime above 3, the shadows of the 2 factors of $\mathbb Z_6=\mathbb Z_2\times\mathbb Z_3$. Thus the wildness of $BF_6$, if true, should come from these first order terms, suggesting a first order version of Theorem \ref{thm:affine}. \section{Spectral measures and blowup}\label{sec:blowup} The rooted law $\mu$ of a subfactor, appearing in Proposition \ref{prop:norm}, is the spectral measure at the root of the square of the adjacency operator of the principal graph, whose moments are the dimensions $b_n=\dim P_n$. For a Hadamard subfactor, this is the law $\mu_H$ of the main character of $G_H$, from Section 2. For the subfactors of index $\leq4$ the rooted law has a circular lift, which is the image by $u\to(u+u^{-1})^2$ of a probability measure on the unit circle, see \cite{arh}, and we refer to Evans and Pugh \cite{evp} for the joint spectral measures of the $SU(3)$ nimreps. Above index 4 there is no circular lift in general, but the rooted law still determines the annular multiplicities, summed over the rotation eigenvalues, as explained by Arhancet \cite{arh}, and this is precisely the formula in Proposition \ref{prop:norm}. The rooted law does not determine the standard invariant, as shown for instance by the group subfactors of $\mathbb Z_4$ and $\mathbb Z_2^2$, which have the same principal graph, and different fusion rules. For the canonical Lagrangian inclusions associated to a unitary fusion category $C$, the rooted law was computed in \cite{arh}, in terms of the formal codegrees $f_E$ of Ostrik, the result being \[ \mu_C=\left(1-\sum_E\frac{1}{f_E^2}\right)\delta_0+\sum_E\frac{1}{f_E^2}\,\delta_{\dim(E)f_E} \] with $E$ ranging over the irreducible representations of the complexified fusion ring, and this explains why the extensions associated to the Haagerup categories have the same moments. The paper \cite{bcf} starts with 2 preliminary computations. First, at small index above 4 the rooted laws still come from finite graphs, and for the Haagerup, Asaeda-Haagerup, 3311 and 2221 subfactors \cite{ahs,hgr,jms} they can be computed from the moment recurrences, which give their atoms and their annular multiplicities, the scalar lift coming from the annular theory of Jones \cite{jo2} having now in its support a reciprocal pair on the positive half-line. Second, the exceptional diagrams, whose ternary indices $2,3,5$ are the inverses of the Deligne parameters of $E_6,E_7,E_8$ \cite{dl1}, lead to the signed root measures of Deligne and de Man \cite{dl2}, whose atoms have a uniform description along the exceptional series, for the Cartan powers of the adjoint representation. On the general side, the numbers $c_k=\dim Fix(u^{\otimes k})$ are the moments of a probability measure, and as shown in \cite{tbs}, for a self-dual object in a complex tensor category the invariant tensor dimensions are Hamburger moments precisely when a Cauchy-Schwarz inequality holds for the sums of tensor powers. This is automatic in the unitary setting, and fails for some non-semisimple categories, with for instance a $6$-dimensional representation whose doubled sequence is represented by a measure with 42 atoms up to degree 83, and is not a moment sequence at degree 84. The Hankel determinants of the sequence $c_k$, giving the Jacobi parameters of $\mu$, are the natural tool for comparing 2 such sequences. The question of spectral measure blowup is that of realizing the moments of $\mu$ on a space where the measure becomes simpler, as for the free Poisson law, which is the law of $cc^*$, with $c$ a circular variable. For the deformed Fourier matrices, the following answer was found in \cite{bcf}, by extending the generic formula from Section 3 to arbitrary parameters, the blowup space being a compact abelian group: \begin{thm}\label{thm:blowup} For $H=F_X\otimes_QF_Y$, with $|X|=M$, $|Y|=N$ and $Q$ dephased, let $K_Q\subset\mathbb T^{X\times Y}$ be the closed subgroup generated by the dephasings of the matrices $W^{k,e}_{ij}=Q_{i+k,j+e}Q_{ij}/(Q_{i+k,j}Q_{i,j+e})$, with $k\in X$ and $e\in Y$. Then, with $Z\in K_Q$ Haar distributed, we have \[ \mu_H=\left(1-\frac{1}{N}\right)\delta_0+\frac{1}{N}\,law(ZZ^*) \] with respect to the normalized trace of $M_M(\mathbb C)$, and so $\dim P_n=\frac{1}{MN}\int_{K_Q}Tr((ZZ^*)^n)dZ$, for any $n\geq1$. \end{thm} \begin{proof} This is from \cite{bcf}, the proof using the crossed coproduct descriptions of \cite{bbr,tbc,bic}, and the fact that the dephased second differences of $Q$ are the fluxes of the rectangles. \end{proof} The group $K_Q$ is the whole dephased torus for generic $Q$, and is finite when the entries of $Q$ are roots of unity. Geometrically, the lattice $I_X\otimes I_Y$ is the first homology of the complete bipartite graph $K_{X,Y}$, and $K_Q$ is the group of flat connections which are trivial on the relations, giving an abelian covering \cite{bcf}. The generic moments are lower bounds for all the rooted moments, with equality precisely in the generic case, and with $d=\dim K_Q$ we have $\dim P_n\sim C(MN)^nn^{-d/2}$, so the rooted law determines the dimension of $K_Q$. More precisely, the first strict inequality between the rooted moments and the generic ones occurs at the length of the shortest nontrivial relation between the crossed coproduct generators \cite{bcf}. On the other hand, the rooted law loses information: transposition preserves it for any complex Hadamard matrix \cite{tbc}, while for generic parameters with $M\neq N$ it changes the isomorphism class of the quantum group \cite{bcf}. At index 6 the relation subgroups of $F_2\otimes_QF_3$ are the ideals of the Eisenstein integers, the finite cases giving the coset graphs of the torus maps $\{6,3\}_{b,c}$, which include the cube, the Heawood graph and the Pappus graph, and the generic law is \[ \mu=\frac{2}{3}\,\delta_0+\frac{1}{6}\,p_3(|x-3|)dx \] with $p_3$ being the density of the length of the 3-step planar random walk. At index 8 the diamond lattice appears, with arbitrarily delayed exceptional moments, at index 9 the triangular lattice appears, and the circulant families at square index give planar random walk laws as well. Following \cite{tbs}, the first Jacobi defect can be located, and there are finite depth laws with arbitrarily long generic truncations \cite{bcf}. In the generic case, the blowup can be reformulated in terms of lattice walks, as follows. Let $\Gamma_{MN}$ be the maximal abelian cover of the complete bipartite graph $K_{M,N}$, which is the topological crystal of $K_{M,N}$ in the sense of Sunada \cite{sun}, with deck group $\mathbb Z^{(M-1)(N-1)}$. At $M=2$ this is the subdivision of the maximal abelian cover of the graph having 2 vertices and $N$ edges between them, which is the honeycomb lattice at $N=3$, and the diamond lattice at $N=4$. The vertices of degree 2, sitting on the edges of these lattices, form their line graphs, which are the kagome lattice and the pyrochlore lattice. \begin{thm}\label{thm:crystal} For $H=F_X\otimes_QF_Y$ with $|X|=M$, $|Y|=N$ and $Q$ generic, and $k\geq1$, $\dim P_k$ is $1/M$ times the number of closed walks of length $2k$ on $\Gamma_{MN}$, based at a vertex of degree $M$. In particular, at index $6$, respectively $8$, the number $\dim P_k$ is half the number of closed walks of length $k$ on the kagome, respectively pyrochlore lattice, having $2$ loops added at each vertex. \end{thm} \begin{proof} For $Q$ generic the group $K_Q$ is the dephased torus, and $Z\in K_Q$ is the matrix having 1 on the first row and column, and free phases elsewhere. This is the Bloch form of the incidence matrix of $\Gamma_{MN}$, the free phases being the characters of the deck group, evaluated on the edges outside the spanning tree formed by the edges of the first row and column. Thus $\int_{K_Q}Tr((Z^*Z)^k)dZ$ is $N$ times the number of closed walks of length $2k$ based at a vertex of degree $M$, all these vertices being equivalent, and since $Tr((ZZ^*)^k)=Tr((Z^*Z)^k)$, Theorem \ref{thm:blowup} gives the first assertion. At $M=2$, the walks of length 2 between vertices of degree 2 are the moves to the $2(N-1)$ neighbors in the line graph, together with 2 returns, through the 2 endpoints, so $Z^*Z$ is the Bloch form of the adjacency matrix of the line graph, plus 2, which gives the second assertion. \end{proof} For the kagome and pyrochlore lattices, the first values of these numbers are as follows, as computed by \texttt{crystal.py}, which checks them against the direct computation of $\dim P_k$ for $k\leq4$, respectively $k\leq3$: \[ 1,4,18,86,426,2164,11208,\ldots\qquad\qquad 1,5,28,167,1036,6608,43072,\ldots \] The flat bands of these 2 lattices, which make them frustrated, and the pyrochlore lattice the lattice of spin ice \cite{brg}, contribute to the atom of $\mu$ at 0. Indeed, we have $\mu=(1-1/M)\delta_0+(1/M)\nu$, where $\nu$ is the spectral measure of $Z^*Z$, which for $M\leq N$ has at least $N-M$ eigenvalues 0 at each point, with equality at the generic points, and at $M=2$ these are the flat bands of the line graph at $-2$, namely 1 band for kagome, and 2 bands for pyrochlore. For non-generic $Q$ the same holds with $\Gamma_{MN}$ replaced by its quotient by the annihilator of $K_Q$, the parameters playing the role of twisted boundary conditions, and at roots of unity we obtain finite abelian covers of $K_{M,N}$, such as the kagome lattices on the torus maps $\{6,3\}_{b,c}$. The kagome lattice also appears in \cite{abf}, through the closed words in the generators of the generic Di\c t\u a quantum group at index 6, and Theorem \ref{thm:crystal} explains this, the moments of this quantum group being kagome walk counts. By combining the blowup with Proposition \ref{prop:norm}, the annular multiplicities of the deformed Fourier matrices can be computed explicitly. Since $q_n(0)=2(-1)^n$, we obtain, for $MN>4$ and $n\geq2$: \[ a_n=2\left(1-\frac{1}{N}\right)(-1)^n+\frac{1}{MN}\int_{K_Q}Tr(q_n(ZZ^*))dZ \] In particular, for the generalized Fourier matrices, where $K_Q$ is trivial and $ZZ^*$ has eigenvalues $MN$ and $0$, we obtain the following formula, which is checked against the direct computation of the spaces $W_n$ by \texttt{congruence.py}, for $F_6$ and $W_8$: \begin{thm}\label{thm:annularfourier} For a generalized Fourier matrix $F_G$, with $|G|=N>4$, the annular multiplicities are given, for $n\geq2$, by \[ a_n=\frac{q_n(N)+2(N-1)(-1)^n}{N} \] and grow like $\lambda^n/N$, where $\lambda=(N-2+\sqrt{N(N-4)})/2$. For the deformed Fourier matrices $F_X\otimes_QF_Y$, the annular multiplicities are given by the above integral over $K_Q$, and are unbounded. \end{thm} \begin{proof} For $F_G$ the rooted law is $(1-1/N)\delta_0+(1/N)\delta_N$, because $\dim P_n=N^{n-1}$ for $n\geq1$, and Proposition \ref{prop:norm} gives the formula, with the growth coming from $q_n(x)=\lambda(x)^n+\lambda(x)^{-n}$ for $x>4$. In the deformed case, the formula is the one above, and since $K_Q$ contains the all-one matrix, for which $ZZ^*$ has the eigenvalue $MN>4$, and the Haar measure has full support, $\mu_H$ charges $(4,\infty)$, and the proof of Proposition \ref{prop:norm} shows that the numbers $a_n$ grow exponentially. \end{proof} Summarizing, the rooted laws of the main classes of complex Hadamard matrices are as follows, with the wild matrices, where $c_k=Cat_k$, having as rooted law the free Poisson law of parameter 1, also called Marchenko-Pastur law, which is the law of the main character of $S_N^+$: \[ \begin{array}{|l|l|l|}\hline H&G_H&\mu_H\\\hline F_G,\ |G|=N&G&(1-1/N)\delta_0+(1/N)\delta_N\\\hline F_X\otimes_QF_Y&{\rm crossed\ coproduct}&(1-1/N)\delta_0+(1/N)law(ZZ^*),\ Z\in K_Q\\\hline F_2\otimes_QF_3,\ Q\ {\rm generic}&\mbox{generic Di\c t\u a}&(2/3)\delta_0+(1/6)p_3(|x-3|)dx\\\hline {\rm wild}&S_N^+&(2\pi)^{-1}\sqrt{4x^{-1}-1}\,dx\ {\rm on\ }[0,4]\\\hline \end{array} \] Thus the wild matrices are at the opposite end from the Fourier matrices, whose rooted law is supported by $\{0,N\}$, the deformed Fourier matrices interpolating between these 2 extremes. \section{Gauge fields and the glow}\label{sec:gauge} The analytic invariants come from the statistical mechanics of the arrays of spins coupled through $H$, studied in \cite{cot,ftp,ising}. Consider 2 layers of $N$ parallel wires, crossing each other, with a spin $a_j$ on each wire of the first layer, and a spin $b_k$ on each wire of the second layer, the junction at the crossing $(j,k)$ coupling these 2 spins with strength $H_{jk}/\sqrt N$. With $\Omega=\langle Hb,a\rangle=\sum_{jk}H_{jk}\bar a_jb_k$, the energy of a configuration is $-\Omega/\sqrt N$, or its real part. The law of $\Omega$, with $a,b$ uniform, is the glow of $H$, which is the central analytic invariant of $H$, being the density of states of the array, the thermodynamic functions being functions of it. The glow is determined by its moments, which are sums of partition functions, as explained below, and in the real case $\Omega$ takes finitely many values, so its law is determined by finitely many moments. For the real matrices of order 16 and 20 the law itself can be compared directly, by enumerating the spins $b$, conditional on which $\Omega$ is a sum of independent symmetric signs, as in Section 8. There are 3 versions of this model, studied so far as follows: \begin{enumerate} \item The Ising arrays \cite{ising}, with $H$ real, and spins $a_j,b_k=\pm1$. This is the switching game of Gale and Berlekamp \cite{fsl} at finite temperature, and a deterministic instance of the random orthogonal model of Marinari, Parisi and Ritort \cite{mp1,mp2}. The moments are universal polynomials in $N$ up to order 14, the first correction being given by the 4-profile, and at $N=16$ the 5 densities of states form a 1-parameter family, the parameter being the number $2^{14-r}-128$ of crystalline ground states, with $r$ the 2-rank. \item The planar rotators \cite{cot}, with $H$ complex, and spins $a_j,b_k\in\mathbb T$. This is an array of $2N$ superconducting wires, coupled by Josephson junctions, the matrix $H$ being the pattern of fluxes, and the Fourier matrix giving the uniform field of Chandra, Ioffe and Sherrington \cite{cis}. The moments are computed through order 12, in terms of flux harmonics, and the ground states correspond to the bistochastic forms with positive line sums. \item The design arrays \cite{ftp}, with $H=\sqrt NU$ being an almost Hadamard matrix, that is, with $U$ being a local maximizer of the 1-norm on $O_N$, as for the matrices coming from the block designs. These arrays have crystalline states at any order, such as the hyperovals, the unitals and the Baer subplanes of the projective plane of order 4, and in the complex case there is a circulant matrix of order 16 contradicting the almost Hadamard conjecture, which is supported by numerical evidence at $N=4,5$ \cite{cgt}. \end{enumerate} On the moving side, the matrix being now a particle on $U_N$, or on the phase torus, the geometry meets the defect, the Hessian of the trace norm at a Hadamard matrix being given by the Berezin matrix, as explained in Section 9. Back to the frozen arrays, the dictionary with the Jones model is as follows. The gauge transformations $H\to D_aHD_b$, with $D_a,D_b$ diagonal, are part of the equivalence, and do not change the invariants of Section 1. But $\Omega(a,b)=\sum_{\sigma\sigma'}\bar a_\sigma H_{\sigma\sigma'}b_{\sigma'}$ is the partition function of the Jones model on the simplest open diagram, a single edge with free ends, computed in the gauge $(a,b)$, and this quantity is not gauge invariant. Thus: \begin{enumerate} \item The glow is the law of the single edge partition function over the gauge group, and the arrays are the Jones model with the gauge made dynamical, with Boltzmann weight $e^{\beta\Omega/\sqrt N}$. The spins of the arrays are the gauge transformations of the Jones model, real for the Ising arrays, and complex for the planar rotators. \item The crystalline states of the arrays are the gauges in which $H$ is bistochastic. In the complex case such gauges always exist, by the Idel--Wolf theorem \cite{iwo}, and in the real case they exist precisely for the regular Hadamard matrices. \item The gauge invariant quantities are the fluxes. For the rectangle on the rows $a,b$ and the columns $j,l$, the flux phase is $e^{i\Phi}=H_{aj}\bar H_{bj}H_{bl}\bar H_{al}$, and in the real case the rectangle is frustrated in the sense of Toulouse \cite{tou} when $\Phi=\pi$. \end{enumerate} The 3rd point gives the following interpretation of Reidemeister II, which in the real case is the result of \cite{ising} stating that a real Hadamard matrix has the maximal number $N^2/4$ of frustrated rectangles, on any 2 rows: \begin{prop}\label{prop:frustration} A matrix $H\in M_N(\mathbb T)$ is Hadamard precisely when, for any $2$ rows $a\neq b$, the flux phases of the $N^2$ rectangles on these rows sum up to $0$, the degenerate rectangles included. \end{prop} \begin{proof} With $d_j=H_{aj}\bar H_{bj}$, the sum of the flux phases is $\sum_{jl}d_j\bar d_l=|\sum_jd_j|^2=|\langle H_a,H_b\rangle|^2$. \end{proof} Thus Reidemeister II for the Jones model is the same as maximal and uniform frustration for the arrays. Regarding now the moments, for a uniform sign $u$ the cumulants are the numbers $c_m$ given by $\log\cosh t=\sum_mc_mt^m/m!$, namely $c_2=1$, $c_4=-2$, $c_6=16$, $c_8=-272$. For a uniform phase $u$, the nonzero joint cumulants of $u,\bar u$ are those of $k$ copies of $u$ and $k$ copies of $\bar u$, given by $\log\sum_kx^k/k!^2=\sum_kc'_kx^k/k!^2$, namely $c'_1=1$, $c'_2=-1$, $c'_3=4$. Consider the $2p$ factors of $\Omega^{2p}$, or of $\Omega^p\bar\Omega^p$, as $2p$ positions, and 2 partitions $\pi,\rho$ of these positions, for the row and column indices. This gives a bipartite multigraph $D_{\pi\rho}$, whose vertices are the blocks of $\pi$ and $\rho$, with an edge for each position, signed according to $\Omega$ or $\bar\Omega$. The gauge average glues the copies of the open edge into such graphs, planar or not, and only the gauge invariant graphs survive, namely the balanced ones in the complex case, and those with even degrees in the real case, which become balanced, with the same weight, after signing the edges alternately along an Euler circuit of each component. We have: \begin{thm}\label{thm:moments} The moments of the glow are the following sums of Jones partition functions, \[ E(\Omega^{2p})=\sum_{\pi\rho}c_\pi c_\rho S_{D_{\pi\rho}}(H)\quad,\quad E(|\Omega|^{2p})=\sum_{\pi\rho}c'_\pi c'_\rho S_{D_{\pi\rho}}(H) \] in the real and complex case, where $c_\pi=\prod_{B\in\pi}c_{|B|}$, and where $c'_\pi=\prod_{B\in\pi}c'_{|B|/2}$, the product being zero when a block is not balanced. \end{thm} \begin{proof} For fixed labels, the moment-cumulant formula gives $E(a_{x_1}\ldots a_{x_{2p}})=\sum_\pi\prod_{B\in\pi}c_{|B|}$, the sum being over the partitions $\pi$ such that $x$ is constant on the blocks, because the joint cumulants of independent variables vanish, unless all the variables coincide. Doing the same for $b$, and summing over the labels, gives the first formula, and the complex case is similar. \end{proof} \section{Transfer matrices and fluxes}\label{sec:real} Let $H$ be a real Hadamard matrix. The graphs of Theorem \ref{thm:moments} can be reduced with the Jones relations: a vertex of degree 2 is removed by $HH^t=H^tH=N1_N$, which is Reidemeister II, and a pair of parallel edges is removed by $H_{jk}^2=1$. A graph which cannot be reduced has all degrees even and at least 4, and so at least 4 vertices on each side, and at least 16 edges, with equality only for $K_{4,4}$, which is not planar. In fact, the reductions preserve the planarity, and a simple planar bipartite graph has a vertex of degree at most 3, by the Euler formula, so the planar graphs reduce completely, and their values are universal. This gives in particular the universality of the moments up to order 14, and the formula $E(\Omega^{16})=U_8(N)+\frac{32}{3}\cdot16!\cdot P_4(H)$, where $P_4(H)$ is the sum over the sets $I$ of 4 rows of $(\sum_k\prod_{j\in I}H_{jk})^4$, as explained in \cite{ising}. In terms of the transfer matrix $T_2$, this reads: \begin{prop}\label{prop:k44} For a real Hadamard matrix $H$ of order $N$ we have $Tr(T_2^2)=N^{-6}S_{K_{4,4}}(H)$, and \[ E(\Omega^{16})=V(N)+\frac{4}{9}\cdot16!\cdot N^6\,Tr(T_2^2) \] with $V$ a universal polynomial. \end{prop} \begin{proof} We have $Tr(T_2^2)=N^{-6}\sum_{abcd}(\sum_xH_{ax}H_{bx}H_{cx}H_{dx})^4$, which is the contraction along $K_{4,4}$. The terms with $a,b,c,d$ distinct give $4!P_4(H)$, and the other terms are universal, because a repeated row index can be removed with $H_{jk}^2=1$, and then the orthogonality applies. \end{proof} Thus the sequence $m\to Tr(T_2^m)$ goes from the real glow, at $m=2$, to the subfactor, at $m=\infty$, because $Tr(T_2^m)\to\dim P_2^H$. The program \texttt{subfactor.py} computes all these objects for the matrices of order $N\leq20$, taken from the catalogue of McKay \cite{mck}, and converted by \texttt{convert.py}, the traces being computed exactly from the integer matrix $N^3T_2$, and $\dim P_3$ exactly too, from the integer matrix $N^4(T_3-1)$, whose blocks have zero row sums, and a nonzero principal minor of size one less, checked modulo a prime. The spectra of $T_2$ are computed in floating point, and the program also computes the sizes of the components for the transposes, which are used below. This gives the following table, where $r$ is the 2-rank, and $c_H$ the number of crystalline states, from \cite{ising}: \[ \begin{array}{|l|c|c|c|l|c|c|}\hline H&r&c_H&Tr(T_2^2)&{\rm spectrum\ of\ }T_2&\dim P_2&\dim P_3\\\hline \mathrm{had}_{16.0}&4&896&16&1^{16}&16&256\\\hline \mathrm{had}_{16.1}&5&384&23/2&1^7,(1/2)^{18}&7&58\\\hline \mathrm{had}_{16.2}&6&128&37/4&1^4,(3/4)^2,(1/2)^{12},(1/4)^{18}&4&21\\\hline \mathrm{had}_{16.3},\mathrm{had}_{16.4}&7&0&65/8&1^3,(1/2\pm\sqrt2/8)^6,(1/4)^{28}&3&11\\\hline \mathrm{had}_{20.0},\mathrm{had}_{20.1},\mathrm{had}_{20.2}&18&0&17356/3125&{\rm different}&2&5\\\hline \end{array} \] The traces of the minimal projections of $P_2^H$ are proportional to the sizes of the components in Theorem \ref{thm:transfer}, as in \cite{nsh}, and for $\mathrm{had}_{16.3}$ these sizes are $128,112,16$, while for its transpose, as for $\mathrm{had}_{16.4}$, they are $224,16,16$. Thus the subfactor, with its trace, separates $\mathrm{had}_{16.3}$ from its transpose, while their glows and the moments of their subfactors coincide, as explained below. We should mention that \cite{jo3} reports the dimensions $\dim P_2=16,8,5,3,3$ for the 5 classes of order 16, these relative commutants being used in \cite{bhj} for distinguishing the 5 classes, and the subfactors of the real Hadamard matrices, and their symmetries, are studied in \cite{bn2}. Our computations, done in 3 independent ways, with the eigenvalue $1$ of $T_2$, with the Nomura algebra, and with the components of Theorem \ref{thm:transfer}, give $16,7,4,3,3$. Summarizing, we have: \begin{thm}\label{thm:real} At $N=16$ we have $Tr(T_2^2)=7+9\cdot2^{4-r}$, with $r$ the $2$-rank, and the dimensions of $P_2,P_3$ are as above. At $N=20$, the $3$ classes have the same glow, and Temperley-Lieb subfactors, but the spectra of their matrices $T_2$ are different, with $Tr(T_2^3)=230644/78125$, $1116356/390625$, $219124/78125$. \end{thm} \begin{proof} The first formula is the formula of \cite{ising} for the 4-profile, rewritten with Proposition \ref{prop:k44}, and the rest is the computation done by \texttt{subfactor.py}, in exact arithmetic, together with Theorem \ref{thm:bn} at $N=20$, which is $4$ modulo $8$. As for the glow, conditional on $b$ the variable $\Omega$ is a sum of independent symmetric signs, with coefficients $|(Hb)_j|$, and the program \texttt{isinglaw.py} finds that the histograms of the sorted lists of these numbers, over the $2^{19}$ vectors $b$ with $b_1=1$, coincide for the 3 classes. \end{proof} In the complex case, the situation is different, the crossing of the 2 legs of $T_2$ entering already at order 8. Let now $H\in M_N(\mathbb T)$ be a complex Hadamard matrix. In Theorem \ref{thm:moments}, a vertex with one positive and one negative edge is removed by $HH^*=H^*H=N1_N$, and a pair of parallel edges of opposite signs is removed by $|H_{jk}|=1$. However, parallel edges of the same sign stay, since $H_{jk}^2\neq1$ in general. A graph which cannot be reduced has at least 2 edges of each sign at each vertex, and at least 2 vertices on each side, because a single row would produce a pair of parallel edges of opposite signs. So it has at least 8 edges, and with 8 edges the only one is the doubled rectangle, whose contraction is \[ R_2(H)=\sum_{jlkm}\left(H_{jk}\bar H_{jm}H_{lm}\bar H_{lk}\right)^2=\sum_{jl}\Big|\sum_kH_{jk}^2\bar H_{lk}^2\Big|^2 \] which is the sum over the rectangles of the squared flux phases $e^{2i\Phi}$. In terms of the transfer matrix $T_2$, since $\sum_kH_{jk}^2\bar H_{lk}^2=N\langle\xi_{jl},\xi_{lj}\rangle$, we have $R_2(H)=N^3Tr(T_2F)$, where $F$ is the flip of the 2 legs of $T_2$, that is, a crossing. For $H$ real we have $Tr(T_2F)=N$, so the crossing is invisible there. \begin{prop}\label{prop:harmonics} The flux harmonics $R_k(H)=\|H^{\circ k}(H^{\circ k})^*\|_2^2$, with $H^{\circ k}$ being the entrywise power, satisfy \[ N^3\leq R_k(H)\leq N^4 \] with $R_1(H)=N^3$, and with equality at right precisely when $H$ is equivalent to a Butson matrix with entries in the $k$-th roots of unity. Also, $R_k(H)=N^3$ precisely when $H^{\circ k}$ is Hadamard. \end{prop} \begin{proof} With $K=H^{\circ k}$, the matrix $KK^*\geq0$ has diagonal entries $N$, so $R_k(H)\geq N\cdot N^2$, with equality when $KK^*$ is diagonal, that is, $K$ Hadamard, and $R_k(H)\leq(Tr\,KK^*)^2=N^4$, with equality when $K$ has rank 1, that is, $H_{jl}^k=x_jy_l$, which means that $H$ has entries in the $k$-th roots of unity, up to equivalence \cite{but}. \end{proof} The numbers $R_k(H)/N^4$ are the moments of the flux distribution of $H$, which is the law of the flux phase of a random ordered rectangle, the degenerate ones included. For the Fourier matrices we have $R_k(F_N)=N^3gcd(k,N)$, as noted in \cite{bco}, where the flux sums of the McNulty-Weigert matrices are computed as well, and these numbers will reappear in Section 10, as closed diagrams separating some Fourier matrices, up to quantum equivalence. The program \texttt{glowmoments.py} computes the moments of the complex glow exactly, as $E(|\Omega|^{2m})=\sum_{\alpha\beta}|C_m(\alpha,\beta)|^2$, where $C_m(\alpha,\beta)$ is the coefficient of $x^\alpha y^\beta$ in $(\sum_{ij}H_{ij}x_iy_j)^m$, computed by the recurrence $C_{m+1}(\alpha,\beta)=\sum_{ij}H_{ij}C_m(\alpha-e_i,\beta-e_j)$, in cyclotomic arithmetic. It finds the universal parts by exact interpolation on the Fourier matrices $F_N$ with $N\leq9$, and checks them at $N=10,11$, and for the matrices of Haagerup and Tao, and $W_8$. We obtain: \begin{thm}\label{thm:complex} For a complex Hadamard matrix $H$ of order $N$, the moments \[ E(|\Omega|^2)=N^2\quad,\quad E(|\Omega|^4)=2N^4-2N^3+N^2\quad,\quad E(|\Omega|^6)=6N^6-18N^5+33N^4-36N^3+16N^2 \] are universal, and $E(|\Omega|^8)=V(N)+18R_2(H)$, where \[ V(N)=24N^8-144N^7+528N^6-1368N^5+2434N^4-2580N^3+1089N^2 \] In particular, $E(|\Omega|^8)\leq V(N)+18N^4$, with equality precisely when $H$ is equivalent to a real Hadamard matrix. \end{thm} \begin{proof} The form of the moments is the above graph argument, with the coefficient 18 counting the positions of the 4 factors $H$ and of the 4 factors $\bar H$ on the doubled rectangle, and the universal parts come from the exact interpolation. The last assertion follows from Proposition \ref{prop:harmonics}, with $k=2$. \end{proof} So the real Hadamard matrices, that is, the Ising arrays, are the most Ising-like rotator arrays, maximizing the squared fluxes. Here are some examples, computed by \texttt{complexglow.py}, which does the above in floating point, and \texttt{defect.py}, with $d$ denoting the defect, discussed in Section 9: \[ \begin{array}{|l|c|c|c|c|c|c|}\hline H&N&R_2&R_3&\dim P_2&\dim P_3&d\\\hline F_2\otimes_qF_2,\ q=e^{i\theta}&4&192+64\cos2\theta&64&3+\delta_{q^4,1}&10\ {\rm or}\ 16&1\ {\rm or}\ 3\\\hline F_5&5&125&125&5&25&0\\\hline F_6&6&432&648&6&36&4\\\hline F_3\otimes_QF_2,\ Q_{ad}=e^{0.4iad}&6&432&648&4&18&4\\\hline {\rm Haagerup}&6&336&216&2&5&4\\\hline {\rm Tao}&6&216&1296&2&5&0\\\hline \end{array} \] For the deformations $F_2\otimes_qF_2$ the glow varies continuously with $q$, while the rooted law of the subfactor only depends on the order of $q^4$ \cite{bcf}. More generally, for the deformations $F_X\otimes_QF_Y$ of Di\c t\u a \cite{dit}, the rooted law is a Gram law over the closed group generated by the second differences of $Q$, which are fluxes \cite{bcf}, while the glow sees the actual fluxes of $H$, through $R_2$ at order 8, the recovery of the whole flux distribution being open. Closure versus distribution, that is, arithmetic versus analysis. However, the glow can see the deformations quite late: for the curve $H(q)_{ab,cd}=w^{ac}(-1)^{bd}q^{ad}$ of Di\c t\u a deformations of $F_6=H(1)$, with $a,c\in\mathbb Z_3$ and $b,d\in\mathbb Z_2$, the program \texttt{glowmoments.py} finds that the moments at $q=1$ and $q=i$ coincide up to order 14, while at order 16 they are $3380149012050756$ and $3380146268677956$. Summarizing, we have: \begin{thm}\label{thm:examples} Neither the glow nor the subfactor determines the other. More precisely, the matrices $F_2\otimes_qF_2$ with $q=e^{\pi i/5},e^{3\pi i/5}$ produce isomorphic subfactors, and the matrices of Haagerup \cite{haa} and Tao \cite{tao} are both wild, but in both cases the values of $R_2$, and so the glows, are different, while $\mathrm{had}_{16.3}$ and its transpose have the same glow, real and complex, but different standard invariants, and the same rooted law. \end{thm} \begin{proof} The Haagerup matrix has entries in $\mathbb Q(i)$, and the Tao matrix has cube roots of unity as entries, so both are wild, by Theorem \ref{thm:bn}, and their values of $R_2$ are $336,216$, so their glows are different, by Theorem \ref{thm:complex}. For $F_2\otimes_qF_2$, in the above normalization, the subfactor depends only on the smallest $l$ with $q^{4l}=1$, and on the sign of $q^{2l}$, by Burstein \cite{bur}, and here $l=5$ and $q^{2l}=1$ in both cases, while $R_2=192+64\cos2\theta=176\pm16\sqrt5$. As for $H=\mathrm{had}_{16.3}$, we have $\Omega_{H^t}(a,b)=\langle H^tb,a\rangle=\langle H\bar a,\bar b\rangle=\Omega_H(\bar b,\bar a)$, and $(\bar b,\bar a)$ has the same law as $(a,b)$, so the glows of $H,H^t$ coincide, in the real and complex case, and the traced algebras $P_2$ are different, the traces of their minimal projections being proportional to $128,112,16$ and $224,16,16$, as explained above. Finally, the rooted laws coincide, by Theorem \ref{thm:transpose}. \end{proof} \section{The defect, as deformations}\label{sec:defect} The geometric invariants concern the manifold of Hadamard matrices around $H$, the basic one being the defect of Tadej and Zyczkowski \cite{tzy}: \begin{defn} The defect of a complex Hadamard matrix $H\in M_N(\mathbb T)$ is the number $d(H)=\dim E_H-(2N-1)$, where $E_H$ is the space of real matrices $A\in M_N(\mathbb R)$ satisfying \[ \sum_kH_{ik}\bar H_{jk}(A_{ik}-A_{jk})=0 \] for any $i,j$. \end{defn} The space $E_H$ consists of the first order deformations $H_{ik}\to H_{ik}e^{itA_{ik}}$ preserving the Hadamard condition, and the matrices $A_{ik}=\alpha_i+\beta_k$, which are the infinitesimal gauge transformations, form a subspace of dimension $2N-1$. Thus, in the language of Jones, the defect is the dimension of the space of first order deformations of the Boltzmann weights preserving Reidemeister II, modulo gauge. Equivalently, $d(H)$ is the dimension of the space of solutions $A$ having 0 on the first row and column, and this shows that $d(H)$ is invariant under equivalence. The basic properties of the defect, as discussed in \cite{bco,tzy}, are as follows: \begin{enumerate} \item The local dimension of the manifold of dephased Hadamard matrices at $H$ is at most $d(H)$, so $d(H)=0$ implies that $H$ is isolated, and the defect can jump, as for $F_2\otimes_qF_2$, with defect 1 for $q\neq\pm1$ and 3 for $q=\pm1$, and local dimension 1 \cite{bco}. \item Every real Hadamard matrix of order $N\geq4$ belongs to an affine family $H_{ik}e^{itA_{ik}}$, of dimension at least 1, by a construction in the spirit of Sz\"oll\H{o}si \cite{szo}. \item For the Fourier matrix of a finite abelian group $G$ we have $d(F_G)=\sum_gN/ord(g)-2N+1$, as found by Tadej and Zyczkowski for $G$ cyclic \cite{tzy}, and by Tadej in general \cite{bco}. \item The defect has a differential interpretation, going back to Karabegov \cite{krb}: $E_H$ identifies with the full kernel of the differential at $U=H/\sqrt N$ of the map $V\to(|V_{ik}|^2)_{ik}$ on $U_N$, and its quotient by the $2N-1$ row and column phase directions has dimension $d(H)$. \end{enumerate} Beyond the first order, a direction $A\in E_H$ extends to order 2 when there is a real matrix $B$ such that $i\sum_kH_{ik}\bar H_{jk}(B_{ik}-B_{jk})=\sum_kH_{ik}\bar H_{jk}(A_{ik}-A_{jk})^2$, for any $i\neq j$. For the Fourier matrices $F_N$, the analytic curves of Nicoara and White span the first order deformations \cite{nwh}, every first order direction extends to order 2 \cite{nw2}, and when $N$ is a prime power the defect is attained by an affine family \cite{tzy}. However, when $N$ is neither a prime power nor twice a prime, some first order directions cannot be realized by sequential deformations, as shown by Hopkins and Nicoara \cite{hon}, so the local dimension at $F_N$ is then strictly smaller than the defect, and numerically, an obstruction at order 11 was detected at $F_{10}$ by Barros e S\'a and Bengtsson \cite{bsb}, who also found evidence at $F_{12}$ for 2 families of dimension 13 meeting along a family of dimension 9. In the other direction, isolation does not imply zero defect, as shown by Hall and Nicoara \cite{hn1}, who found a matrix in $BH(13,6)$ which is isolated, with defect 1, disproving the square case of the conjecture from \cite{bop}, the proof using the second order condition of Nicoara for the directions of convergence of sequences of Hadamard matrices. A related finiteness result for the commuting squares is due to Nicoara \cite{nic}. In the language of Jones, the key object is the following matrix, which is the Berezin matrix of Karabegov \cite{krb}, in the normalization of \cite{bco,cft}, and whose entries are the flux phases of the rectangles, from Section 7: \begin{defn} The Berezin matrix of $H\in M_N(\mathbb T)$ is the matrix $\Lambda_H\in M_{N^2}(\mathbb C)$, indexed by the pairs (row, column), given by \[ (\Lambda_H)_{ij,kl}=\frac{1}{N}\,H_{ij}\bar H_{kj}H_{kl}\bar H_{il} \] for any rows $i,k$ and any columns $j,l$. \end{defn} For a Hadamard matrix this matrix is unitary and symmetric, and the defect becomes the multiplicity of an eigenvalue, exactly as the dimensions of the planar algebra, with respect to the transfer matrices $T_k$. To be more precise, let us call necklace of $r$ rectangles the balanced bipartite graph $C_r$ obtained by gluing cyclically $r$ rectangles, the $s$-th one being on the rows $i_s,i_{s+1}$ and the columns $j_s,j_{s+1}$, with $s\in\mathbb Z_r$, so that $C_2$ is the doubled rectangle of Section 8. We have: \begin{thm}\label{thm:berezin} For a complex Hadamard matrix $H\in M_N(\mathbb T)$, the Berezin matrix $\Lambda_H$ is unitary and symmetric, and \[ d(H)=\dim\ker(\Lambda_H-1)-(2N-1) \] Moreover, we have $Tr(\Lambda_H^r)=N^{-r}S_{C_r}(H)$ for any $r\geq1$, and so the defect is a function of the partition functions of $H$ on the necklaces $C_r$, with $r\leq N^2$. \end{thm} \begin{proof} Since $|H_{kl}|=1$, we have $\sum_{kl}(\Lambda_H)_{ij,kl}(\bar\Lambda_H)_{ab,kl}=N^{-2}H_{ij}\bar H_{ab}\sum_k\bar H_{kj}H_{kb}\sum_lH_{al}\bar H_{il}=\delta_{ia}\delta_{jb}$, by orthogonality of the columns and of the rows, and the symmetry is clear. For $A$ real, let $V=(H\circ A)H^*$, where $\circ$ is the entrywise product. The equations of $E_H$ state that $V=V^*$, and we have $Tr(VV^*)=N\sum_{ij}A_{ij}^2$ and $Tr(V^2)=N\langle\Lambda_HA,A\rangle$, with $A$ viewed as a vector indexed by the pairs, so that \[ \|V-V^*\|_2^2=2N\langle(1-Re\Lambda_H)A,A\rangle \] Now $\Lambda_H$ being unitary and symmetric, we have $\bar\Lambda_H=\Lambda_H^*=\Lambda_H^{-1}$, so $Re\Lambda_H=(\Lambda_H+\Lambda_H^*)/2$ is a real symmetric matrix, whose eigenvalues are the numbers $\cos\theta$, with $e^{i\theta}$ being the eigenvalues of $\Lambda_H$. Thus $1-Re\Lambda_H$ is positive, and $E_H$ is its real kernel, whose dimension is the multiplicity of the eigenvalue 1 of $\Lambda_H$. As for the traces, $Tr(\Lambda_H^r)$ is the sum over the pairs $(i_s,j_s)$, with $s\in\mathbb Z_r$, of the products of the flux phases of the rectangles on the rows $i_s,i_{s+1}$ and the columns $j_s,j_{s+1}$, divided by $N^r$, and this is the partition function on $C_r$. Finally, $\Lambda_H$ being diagonalizable, the multiplicity of the eigenvalue 1 is determined by the characteristic polynomial, and so by the traces $Tr(\Lambda_H^r)$ with $r\leq N^2$. \end{proof} The formula for the defect is due to Tadej, see \cite{bco}, and the program \texttt{berezin.py} checks it, together with the necklace formula for $r\leq3$, for the Fourier matrices $F_N$ with $N\leq12$, the matrices of Haagerup and Tao, the deformations $F_2\otimes_qF_2$ and $F_3\otimes_QF_2$, and the real matrices of orders 2, 4, 8, 12. Observe that $Tr(\Lambda_H^2)=R_2(H)/N^2$ is the doubled rectangle, which appears in the complex glow, by Theorem \ref{thm:complex}. Also, as shown in \cite{bco}, the Hessian at $H$ of the trace norm $S\to Tr|S|$ on the torus $M_N(\mathbb T)$, which is maximal at the Hadamard matrices, with value $N\sqrt N$, and which is the energy of the dual model in \cite{ftp}, is $(Re\Lambda_H-1)/2\sqrt N$, in the phase coordinates. Thus the defect counts the flat directions of this energy, modulo gauge, and the higher traces see more: the McNulty-Weigert matrices $K_{11}(3),K_{11}(5)$ of order 22 from \cite{bco} have the same flux distribution and the same defect 20, but different values of $Tr(\Lambda_H^3)$, and so different Hessians. For the real matrices, the defect is always the same, as follows: \begin{thm}\label{thm:defect} Every real Hadamard matrix of order $N$ has defect \[ d(H)=\frac{(N-1)(N-2)}{2} \] so the defect is universal on the real slice, just like the moments of the real glow up to order $14$. \end{thm} \begin{proof} This is from \cite{bco}, and here is a short proof. For $H$ real the coefficients are real, so $E_H$ is the kernel of $N(N-1)/2$ real equations, one for each pair $i0$ the matrix lies on the analytic families of positive dimension constructed in \cite{bco}. \end{proof} \section{Quantum groups and categories}\label{sec:categories} The classical symmetries of $H$ are the pairs $(P,Q)$ of monomial matrices with $PHQ=H$, and these are exactly the symmetries of the arrays of Section 7, mapping a configuration $(a,b)$ to $(P^*a,Qb)$, which preserves $\langle Hb,a\rangle$, as used in \cite{ising} for computing the ground states. With $G$ being the group of monomial matrices, this group is $G\cap HGH^{-1}$, and its quantum versions, for $G$ being a quantum reflection group, are the quantum automorphism groups of $H$, introduced by Gromada in the real case \cite{gro}, and by Brannan, Gromada, Hern\'andez Palomares and Priebe in general \cite{bghp}. Thus, the combinatorial invariants concern the quantum symmetries of the arrays. The quantum reflection groups involved are the free wreath products $H_N^{s+}=\mathbb Z_s\wr_*S_N^+$ of Bichon \cite{bfw}, with $s\in\{2,3,\ldots,\infty\}$ and $\mathbb Z_\infty=\mathbb T$, and the free complexification $K_N^+$ of $H_N^+=H_N^{2+}$, and we refer to \cite{cbc} for a recent look at the quantum reflection groups between $H_N$ and $H_N^+$. We have: \begin{defn} Let $G\subset U_N^+$ be a quantum reflection group, with $C(G)$ given by relations on the entries of its fundamental corepresentation. Two complex Hadamard matrices $H,K$ of order $N$ are called $G$-quantum equivalent when the universal algebra generated by the entries of a matrix $p$, such that $p$ and $K^{-1}pH$ both satisfy the relations of $C(G)$, is nonzero. For $G=H_N^{s+},H_N^{\infty+},K_N^+$ we speak of $s$-quantum, strong quantum, and weak quantum equivalence. \end{defn} At $K=H$ the above algebra is the algebra of functions on the quantum automorphism group $G\cap HGH^{-1}$, and in general it is the linking algebra between the quantum automorphism groups of $H$ and $K$. As shown in \cite{bghp}, $s$-quantum equivalence implies strong quantum equivalence, which implies weak quantum equivalence, and these notions are of combinatorial nature, being related to the quantum isomorphisms of graphs, and to the nonlocal games of quantum information, as well as to the quantum association schemes of Gromada \cite{gr2}. In the real case, the main results of Gromada \cite{gro} are as follows: \begin{enumerate} \item The quantum automorphism group $H_N^+\cap H^{-1}H_N^+H$ has as representation category the image of the category of the planar bipartite graphs with even degrees, generated by 2 spiders and a cup, whose dimensions are the squares $Cat_{(k+l)/2}^2$ of the Catalan numbers. This category is isomorphic, but not monoidally, to a twisted product of 2 Temperley-Lieb categories, at $\delta=\sqrt N$. \item For $N\geq4$ there are no negligible morphisms, and the quantum automorphism group is not classical, even when the classical automorphism group is $\mathbb Z_2$, and for $N=4$ it is the anticommutative twist $SO_4^{-1}$. \item All the real Hadamard matrices of a given order are quantum isomorphic, and the same holds for the Hadamard graphs, as obtained independently in \cite{cma}. There are also quantum Hadamard matrices acting on finite quantum spaces, the transposition of $M_n(\mathbb C)$ being an example. \end{enumerate} Observe that (3) is in agreement with the reduction argument of Section 8, according to which the planar graphs, which are those of the category in (1), give universal values on the real slice. In the complex case, the main results of \cite{bghp}, obtained with the graphical calculus of complementary spiders, are as follows: \begin{enumerate} \item All the complex Hadamard matrices of a given order are weakly quantum equivalent, the corresponding category being pure, in the sense that all its closed diagrams are universal. \item For $N=mp^2$ the Fourier matrices $F_N$ and $F_{mp}\otimes F_p$ are not strongly quantum equivalent, and nor are some Butson matrices of order 14, with entries in the 7-th roots of unity, taken from \cite{los20}, with computer evidence for the Butson matrices of order $2p$ coming from the construction of Butson, at the primes $7\leq p\leq47$, and the conjecture that for any $s>2$ there are Butson matrices with entries in the $s$-th roots of unity which are not $s$-quantum equivalent. \item The $s$-quantum equivalence is modeled by a synchronous nonlocal game, the perfect quantum commuting strategies corresponding to quantum $s$-equivalence, and the quantum automorphism group of a Butson matrix embeds into that of its Hadamard graph, the inclusion being strict in general. \item The finite quantum groups have only classical symmetries, as found by Kasprzak, Soltan and Woronowicz \cite{ksw}, and all the finite quantum groups of a given dimension are quantum affinely equivalent. \end{enumerate} The closed diagrams in these categories are built from complementary spiders, as follows: \begin{defn} The spiders of $H$ are the tensors $\delta_{i_1\ldots i_m}$ on $\mathbb C^N$ in the standard basis $\{e_i\}$, and the same tensors in the orthonormal basis $\{f_k\}$ given by $(f_k)_i=\bar H_{ik}/\sqrt N$. A closed diagram is a graph whose vertices are spiders of the 2 types, with each edge joining 2 spiders of different types, and oriented. \end{defn} Here we use the fact that 2 spiders of the same type, joined by an edge, fuse into a single spider, so we can assume that the edges join spiders of different types. The 2 bases are complementary, or mutually unbiased, which is the Hadamard condition. We have $\langle e_i,f_k\rangle=H_{ik}/\sqrt N$, which gives: \begin{prop}\label{prop:spiders} A closed diagram in the spiders of $H$ evaluates to $N^{-|E|/2}S_\Gamma(H)$, with $\Gamma$ being the underlying bicolored graph, with the edges signed by their orientation. \end{prop} \begin{proof} Expanding each spider in its basis, the diagram becomes a sum over the labels of the spiders, with each edge contributing a factor $\langle e_i,f_k\rangle$ or its conjugate. \end{proof} Thus the combinatorial invariants are again partition functions of the Jones model, with the class of graphs being dictated by the category. For the representation categories of quantum groups the diagrams are planar, and we obtain: \begin{thm}\label{thm:categories} If a unitary monoidal equivalence maps the generating spiders of $H$ to those of $K$, then $S_\Gamma(H)=S_\Gamma(K)$, for any graph $\Gamma$ appearing as a closed diagram in the category. In particular, for the weak quantum equivalence, which relates all the Hadamard matrices of a given size, the closed diagrams of the corresponding category are universal. \end{thm} \begin{proof} A monoidal equivalence preserves compositions and tensor products, and acts as the identity on the scalars, so it preserves the values of the closed diagrams, and Proposition \ref{prop:spiders} gives the first assertion. The second one follows from the first one, and from \cite{bghp}. \end{proof} The closed diagram used in \cite{bghp} for separating the Fourier matrices $F_N$ and $F_{mp}\otimes F_p$ is the doubled rectangle with $p$-fold edges, that is, the flux harmonic $R_p$ of Section 8, and its values there, $N^3p$ and $N^3p^2$, are those given by the formula $R_k(F_N)=N^3gcd(k,N)$ and by multiplicativity. In general, we have: \begin{thm}\label{thm:strong} The flux harmonics $R_k(H)$, with $k\geq1$, and so the flux distribution of $H$, are invariants of the strong quantum equivalence, and so of the $s$-quantum equivalence, for any $s$. In particular: \begin{enumerate} \item In order $4$, the strong quantum equivalence coincides with the equivalence. \item The matrices $F_6$, Haagerup and Tao are pairwise not strongly quantum equivalent. \item The moment $E(|\Omega|^8)$ of the complex glow is an invariant of the strong quantum equivalence. \end{enumerate} \end{thm} \begin{proof} Consider the closed diagram having 2 spiders $i,i'$ of the first type, and 2 spiders $j,j'$ of the second type, with $k$ parallel edges joining $i$ to each of $j,j'$, and $i'$ to each of $j,j'$, with the orientations chosen such that the corresponding product is $H_{ij}^k\bar H_{i'j}^kH_{i'j'}^k\bar H_{ij'}^k$. This diagram is planar, and each spider has $k$ legs of each orientation, placed consecutively, so it belongs to the category of $H_N^{\infty+}$, whose intertwiners are given by the noncrossing partitions having in each block as many legs of each color, this being the case for the spiders of both types. By Proposition \ref{prop:spiders} its value is $N^{-2k}R_k(H)$, and Theorem \ref{thm:categories} gives the invariance of $R_k$, and so of the flux distribution, which is determined by its moments $R_k(H)/N^4$, with $R_{-k}=\bar R_k=R_k$. In order 4 the matrices are the deformations $F_2\otimes_qF_2$ with $q=e^{i\theta}$ and $\theta\in[0,\pi/2]$, up to equivalence \cite{tz2}, and $R_2=192+64\cos2\theta$ separates them, which gives (1). For (2) we use the values $432,336,216$ of $R_2$, and (3) follows from Theorem \ref{thm:complex}. \end{proof} The program \texttt{berezin.py} checks the formula $R_k(F_N)=N^3gcd(k,N)$ for $N\leq12$ and $k\leq6$, the values $N^3p$ and $N^3p^2$ of \cite{bghp} for $(m,p)=(2,2),(3,2),(2,3)$, and the formula for $R_2(F_2\otimes_qF_2)$, along with the equivalence of $F_2\otimes_qF_2$ with its versions at $\bar q$ and $-q$, used in the proof. On the real slice we have $R_k(H)=N^4$ for $k$ even, and $R_k(H)=N^3$ for $k$ odd, in agreement with the fact that all the real Hadamard matrices of a given order are quantum isomorphic \cite{gro}, and the first non-universal moment of the real glow, at order 16, comes from the graph $K_{4,4}$, which is not planar. As for the weak quantum equivalence, since $R_2$ is not universal, the doubled rectangle is not a closed diagram there. We will see in Section 11 that $R_2$ is not invariant under the Galois group either, so the Galois conjugation of the Butson matrices, which is part of the Hadamard equivalence considered in \cite{bghp}, does not preserve the strong quantum equivalence classes. \section{Traces and conjugacy classes}\label{sec:arithmetic} The arithmetic invariants of a complex Hadamard matrix $H$ are those of its conjugacy class, under the monomial matrices, or even under the whole unitary group, the basic ones being the trace, and more generally the spectrum. These are not invariant under the equivalence. For instance, consider the Fourier matrix $F_N=(w^{jk})$, with $w=e^{2\pi i/N}$ and $j,k=0,\ldots,N-1$. Its trace is the quadratic Gauss sum, and the computation of Gauss gives $Tr(F_N)=\sum_kw^{k^2}=(1+i)(1+i^{-N})\sqrt N/2$, while with $b_k=w^{-k^2}$ we have $Tr(F_ND_b)=N$. In terms of the Jones model, the trace is the partition function of the model on a loop, with the row and column spins being identified, and this suggests the following definition: \begin{defn} A balanced directed graph is a directed multigraph $\Gamma$ with signed edges, such that at each vertex, the number of positive outgoing edges plus negative incoming edges equals the number of positive incoming edges plus negative outgoing edges. The partition function of the Jones model on $\Gamma$ is \[ S_\Gamma(H)=\sum_x\prod_{e\in E_+}H_{x(s(e))x(t(e))}\prod_{e\in E_-}\bar H_{x(s(e))x(t(e))} \] with the sum over the labelings $x$ of the vertices by $1,\ldots,N$, and with $s(e),t(e)$ being the source and target of $e$. \end{defn} The bicolored graphs of the introduction are particular cases, with all the edges going from the row vertices to the column vertices. The trace is the loop, and the power traces $Tr(H^n)$ are the oriented cycles, that is, the partition functions of the periodic chains of length $n$, with $H$ as transfer matrix. As a first arithmetic fact, we have, from \cite{cft}: \begin{prop}\label{prop:weil} Let $H\in M_N(\mathbb Z[w])$ be a Butson matrix, with $w=e^{2\pi i/l}$. Then the eigenvalues of $H$ are Weil numbers, in the sense that they are algebraic integers, all of whose conjugates have modulus $\sqrt N$. \end{prop} \begin{proof} The eigenvalues are algebraic integers, being roots of a monic polynomial with coefficients in $\mathbb Z[w]$. If $\tau$ is an automorphism of the normal closure, and $\sigma$ is its restriction to $\mathbb Q(w)$, then $\tau(\lambda)$ is an eigenvalue of $\sigma(H)$, which is Hadamard, because $\sigma$ commutes with the complex conjugation, $\mathbb Q(w)$ being abelian, and so $|\tau(\lambda)|=\sqrt N$. \end{proof} The arithmetic behind this was developed in \cite{cft}, and the main findings there are as follows. For a Butson matrix $H$ of prime order $p$, with entries in $\mathbb Z[w]$, $w=e^{2\pi i/l}$, $l\geq3$, and not having $\pm\sqrt p$ as eigenvalues, there is an abelian variety $A_H$ over $\mathbb F_p$, of dimension $p\varphi(l)/2$, with multiplication by $\mathbb Z[w]$, whose lattice in the sense of Centeleghe and Stix \cite{cst} is $\mathbb Z[w]^p$, with Frobenius map $H$ and Verschiebung $H^*$. This variety depends only on the conjugacy class of $H$, and its number of points over $\mathbb F_{p^n}$ is $|N_{K/\mathbb Q}\det(1-H^n)|$, with $K=\mathbb Q(w)$. In order 2 this gives, as simple factors, all the simple abelian varieties over $\mathbb F_2$ having a single rational point, as classified by Madan and Pal \cite{mpa}, and Robinson \cite{rob}. In general, the Hodge polygons, coming from the Smith normal form, are invariant under equivalence, while the Newton polygons, coming from the valuations of the eigenvalues, are invariant only under conjugation, and lie above the Hodge ones, and a Butson matrix has finite order, in the sense that a power of $H/\sqrt N$ is the identity, precisely when its Newton polygons are straight lines. In the equivalence class of $F_p$ there are the Clifford matrices, which have finite order, the matrix $G_p=(w^{i/j})$, whose eigenvalues are $\pm\sqrt p$ and the nontrivial Gauss sums, with Newton slopes given by the Stickelberger theorem, and exotic matrices of finite order, with a criterion analogous to that of Shioda and Katsura for the Fermat varieties \cite{ska}. For the Maiorana-McFarland matrices $(w^{if(j)+g(j)})$, with $f$ a permutation polynomial of degree $2\leq d\leq p-2$, the eigenvalues of $H/\sqrt p$ become equidistributed, as $p\to\infty$, by the bounds of Deligne \cite{cft}. In physical terms, $H$ is here a transfer matrix, acting on a single set of spins. The Clifford matrices are the quantizations of the linear maps of the torus, or quantum cat maps, of Hannay and Berry \cite{hbe}, whose power traces are given exactly by sums over the periodic orbits \cite{kea}, the equidistribution questions for them being studied by Kurlberg and Rudnick \cite{kru}. Thus, the finite order matrices correspond to chains with perfect revivals, while the Maiorana-McFarland matrices have equidistributed spectra. The relation between the chains and the abelian varieties of \cite{cft} is as follows: \begin{thm}\label{thm:fermions} Let $H$ be a Butson matrix of prime order $p$, with entries in $\mathbb Z[w]$, $w=e^{2\pi i/l}$, $l\geq3$, not having $\pm\sqrt p$ as eigenvalues, and let $A_H$ be its abelian variety over $\mathbb F_p$. Then, with $\sigma$ ranging over the Galois group of $\mathbb Q(w)$: \begin{enumerate} \item The traces of the powers of the Frobenius map of $A_H$, on its first cohomology, are the sums $\sum_\sigma Tr(\sigma(H)^n)$ of partition functions of periodic chains, with transfer matrices $\sigma(H)$. \item The numbers of points are $|A_H(\mathbb F_{p^n})|=|\prod_\sigma Str(\Gamma(\sigma(H))^n)|$, where $\Gamma(X)=\oplus_k\Lambda^kX$ is the free fermion transfer matrix on the Fock space $\Lambda\mathbb C^p$, and $Str$ is the supertrace, with sign $(-1)^k$ on $\Lambda^k\mathbb C^p$. \item The Riemann hypothesis of Weil for $A_H$, stating that the eigenvalues of the Frobenius map have modulus $\sqrt p$, comes from the unitarity of the transfer matrices $\sigma(H)/\sqrt p$, which is the Hadamard condition, that is, Reidemeister II for the Jones models of the matrices $\sigma(H)$. \end{enumerate} \end{thm} \begin{proof} By \cite{cft}, the lattice of $A_H$ is $\mathbb Z[w]^p$, with Frobenius map $H$, so the Frobenius map on the rational lattice $K^p$, which is a vector space over $\mathbb Q$ of dimension $p\varphi(l)=2\dim A_H$, has as eigenvalues the numbers $\sigma(\lambda)$, with $\lambda$ being the eigenvalues of $H$, and this gives (1). For (2), we have $|A_H(\mathbb F_{p^n})|=|N_{K/\mathbb Q}\det(1-H^n)|=|\prod_\sigma\det(1-\sigma(H)^n)|$, and $\det(1-X)=\sum_k(-1)^kTr(\Lambda^kX)=Str(\Gamma(X))$, with $\Gamma(X^n)=\Gamma(X)^n$. As for (3), the matrices $\sigma(H)$ are Hadamard, as in the proof of Proposition \ref{prop:weil}. \end{proof} In other words, the characteristic polynomial of the Frobenius map is $\prod_\sigma\det(t-\sigma(H))$, the points of $A_H$ are counted by fermionic chains, and the Verschiebung $H^*=pH^{-1}$ is the transfer matrix of the time-reversed chain. In the language of spin models, the trace is well-defined for the spin models of Jones in the strict sense, satisfying the star-triangle relation, being $N$ times the modulus of the model. For the cyclic models $W=(tw^{c(i-j)^2})$ of Goldschmidt and Jones \cite{gjo}, see also \cite{bba}, with $p$ an odd prime, $w=e^{2\pi i/p}$ and $c\in\mathbb F_p^*$, the matrix $W$ is Hadamard, with trace $pt$, and it is a spin model precisely when $t^2=\bar G(c)/\sqrt p$, where $G(c)$ is the quadratic Gauss sum, so that the modulus of the model encodes the sign of the Gauss sum \cite{cft}. Also, the modular invariance equation $(PT)^3$ scalar of Bannai and Bannai \cite{bba}, with $P=F_N$ and $T$ diagonal, is a finite order condition, placing the corresponding matrices in the supersingular case \cite{cft}. As noted in \cite{cft}, a Hadamard matrix has 2 possible physical roles: coupling matrix between 2 sets of spins, as for the arrays, where only its equivalence class matters, and transfer matrix acting on a single set of spins, where its conjugacy class matters. In terms of the arrays, identifying the row and column spins amounts in gluing the 2 layers, with energy $-\langle Ha,a\rangle/\sqrt N$. The law of $\langle Ha,a\rangle$ is invariant under the conjugation by the monomial matrices, because $\langle QHQ^*a,a\rangle=\langle HQ^*a,Q^*a\rangle$, and $Q^*a$ has the same law as $a$, with $Q$ being a signed permutation matrix in the real case. The program \texttt{arithmetic.py} checks the formulas below, and the Gauss formula, for $F_N$ with $N\leq12$, and for the Haagerup and Tao matrices. We have: \begin{thm}\label{thm:arithmetic} The numbers $S_\Gamma(H)$, over the balanced directed graphs $\Gamma$, form a complete invariant for the conjugation of complex Hadamard matrices by the monomial matrices, and the arithmetic invariants are functions of them. For the glued arrays we have $E(\langle Ha,a\rangle)=Tr(H)$, with $a$ uniform on $\mathbb T^N$, or on $\{\pm1\}^N$, as well as $E(|\langle Ha,a\rangle|^2)=|Tr(H)|^2+N^2-N$, with $a$ uniform on $\mathbb T^N$, and, for $H$ real and $a$ uniform on $\{\pm1\}^N$, $E(\langle Ha,a\rangle^2)=Tr(H)^2+Tr(H^2)+N^2-2N$. \end{thm} \begin{proof} The completeness is as in the proof of Theorem \ref{thm:unification}, with the compact group $S_N\ltimes\mathbb T^N$ acting by conjugation: the averaging over $\mathbb T^N$ kills the monomials in $H,\bar H$ which are not balanced, in the above sense, the averaging over $S_N$ produces sums over the injective labelings, and the M\"obius inversion gives the numbers $S_\Gamma(H)$. The spectrum is determined by the power traces $Tr(H^k)$ with $k\leq N$, which are cycles. As for the moments, in the complex case we have $\langle Ha,a\rangle=\sum_{jk}H_{jk}a_k\bar a_j$, and $E(a_k\bar a_j)=\delta_{jk}$ gives the first formula. For the second one, $E(a_ka_l\bar a_j\bar a_m)$ is $1$ when $\{k,l\}=\{j,m\}$, and $0$ otherwise, and the 2 pairings give $|Tr(H)|^2$ and $\sum_{jk}|H_{jk}|^2=N^2$, the $N$ terms with $j=k=l=m$ being counted twice. In the real case there are 3 pairings, giving $Tr(H)^2$, $\sum_{jk}H_{jk}^2=N^2$ and $Tr(H^2)$, and the $N$ diagonal terms, with $H_{jj}^2=1$, are counted 3 times. \end{proof} More generally, the moments of the glued arrays are sums of partition functions on balanced directed graphs, weighted by cumulants, exactly as in Theorem \ref{thm:moments}, with a single type of vertices. Some arithmetic invariants are however functions of the equivalence class only, such as the Hodge polygons, and by Theorem A they are then functions of the numbers $S_\Gamma(H)$ on the bicolored graphs. A remarkable instance of this is the 2-rank, which is a piece of the Hodge polygon \cite{cft}, and which determines the density of states of the Ising arrays at $N=16$ \cite{ising}. Also, the crystalline states of the array of $F_p\otimes F_p$ include the vectors $(t_iw^{ij})$, with $t\in\mathbb T^p$ arbitrary, and those having $p$-th roots of unity as entries are the vectors $(w^{f(i,j)})$ with $f$ a bent function, and the matrices $F_pPD$ of the equivalence class of $F_p$, with $P$ a permutation matrix and $D$ diagonal with $p$-th roots of unity as entries, are such crystalline states \cite{cft}. As for the Galois group, its action produces a clear separation between the various types of invariants, as follows: \begin{thm}\label{thm:galois} Let $H$ be a Butson matrix, with entries in $\mathbb Q(w)$, $w=e^{2\pi i/l}$, and $\sigma$ be in the Galois group of $\mathbb Q(w)$. Then $\sigma(H)$ is a Butson matrix, with $S_\Gamma(\sigma(H))=\sigma(S_\Gamma(H))$ for any $\Gamma$, and: \begin{enumerate} \item The algebraic and geometric invariants are Galois invariant, in the sense that $\dim P_k^{\sigma(H)}=\dim P_k^H$ for any $k$, and $d(\sigma(H))=d(H)$. \item The analytic and combinatorial invariants are not: for $q=e^{\pi i/5}$ the matrices $F_2\otimes_qF_2$ and $F_2\otimes_{q^3}F_2$ are Galois conjugate, and have $\dim P_2=3$ and defect $1$, but have $R_2=176\pm16\sqrt5$, and so different complex glows, and are not strongly quantum equivalent. \end{enumerate} \end{thm} \begin{proof} The Galois group of $\mathbb Q(w)$ being abelian, $\sigma$ commutes with the complex conjugation, and this gives the first assertions. (1) We have $T_k=N^{-k-1}AA^*$, with the entries of $A$ being products of entries of $H$ and $\bar H$, so $T_k(\sigma(H))=\sigma(T_k(H))$, entrywise. Now $\dim P_k^H$ is the multiplicity of the eigenvalue 1 of the Hermitian matrix $T_k(H)$, which is $N^k-rank(T_k(H)-1)$, and the rank is preserved by $\sigma$. The same argument works for the Berezin matrix, with $\Lambda_{\sigma(H)}=\sigma(\Lambda_H)$, by using Theorem \ref{thm:berezin}. (2) Here $\sigma:w\to w^3$, with $w=q$, maps $F_2\otimes_qF_2$ to $F_2\otimes_{q^3}F_2$, and the values $\dim P_2=3$ and $d=1$ come from the table in Section 8, while $R_2=192+64\cos2\theta$, with $\theta=\pi/5,3\pi/5$, gives $176\pm16\sqrt5$. Theorem \ref{thm:complex} and Theorem \ref{thm:strong} give the last assertions. \end{proof} The program \texttt{berezin.py} checks these values, and in particular, the 2 matrices in (2) are not equivalent, while being Galois conjugate, and so equivalent in the sense of the Hadamard equivalence of \cite{bghp}. Observe that the values of $R_2$ there are Galois conjugate, in agreement with $R_2(\sigma(H))=\sigma(R_2(H))$. Thus, the algebraic and geometric invariants only see the Galois orbit of $H$, while the glow and the strong quantum equivalence see the matrix itself. \section{Unification of the invariants}\label{sec:unification} Let us summarize. The raw object is the Jones spin model of $H$, that is, the collection of its partition functions $S_\Gamma(H)$, or equivalently the model $\pi:u_{ij}\to P_{ij}$ and its transfer matrices $T_k$. Each type of invariants uses a class of graphs, and an operation: \[ \begin{array}{|l|l|l|l|}\hline {\rm invariants}&{\rm graphs}&{\rm operation}&{\rm blind\ region}\\\hline {\rm algebraic}&{\rm gluings\ of\ }A,A^*&{\rm eigenvalue\ 1\ of\ }T_k&{\rm wild\ matrices},\ {\rm as\ at\ }N=20\\\hline {\rm analytic}&{\rm all\ bipartite}&{\rm gauge\ average}&{\rm orders}\leq14,\ {\rm or}\leq6\\\hline {\rm geometric}&{\rm necklaces\ of\ rectangles}&{\rm eigenvalue\ 1\ of\ }\Lambda_H&{\rm the\ real\ slice}\\\hline {\rm combinatorial}&{\rm planar,\ spiders}&{\rm monoidal\ equivalence}&{\rm weak\ equivalence,\ real\ slice}\\\hline {\rm arithmetic}&{\rm directed}&{\rm traces,\ Galois}&{\rm none,\ finer}\\\hline \end{array} \] The first place where the theories meet is the transfer matrix $T_2$, through $Tr(T_2^\infty)$ for the subfactor, and through $Tr(T_2F)$ and $Tr(T_2^2)$ for the complex and real glow. The second one is the doubled rectangle $R_2=N^3Tr(T_2F)=N^2Tr(\Lambda_H^2)$, which is seen by the complex glow, at order 8, and by the defect of the McNulty-Weigert matrices, and more generally the flux harmonics $R_k$, which are invariants of the strong quantum equivalence. In fact, there are 3 transfer matrices around: the matrices $T_k$, whose eigenvalue 1 gives the algebraic invariants, the Berezin matrix $\Lambda_H$, whose eigenvalue 1 gives the defect, and $H$ itself, as transfer matrix of the chains, whose eigenvalues are Weil numbers in the Butson case, where the multiplicities of the eigenvalue 1 of the first 2 only depend on the Galois orbit of $H$, while the matrices themselves do not. The arithmetic invariants are of a different nature, being finer than the equivalence, and they are seen by the glued arrays, whose first moment is the trace. As for the old question of Jones on the statistical mechanical meaning of the Hadamard matrices \cite{jin,jo1}, a Hadamard matrix has 2 dual meanings: $N$-state Boltzmann weights satisfying Reidemeister II, and couplings of a magnet made of 2-state spins, or of planar rotators, which are the gauge transformations, and Reidemeister II becomes maximal frustration. For the circulant matrices of Section 5, $H_{ij}=h(j-i)$, with eigenvalues $\lambda_m=\sum_th(t)w^{mt}$, all these objects take a simple Fourier form. The transfer matrices $T_k$ and the Berezin matrix $\Lambda_H$ commute with the cyclic shifts, and decompose into $N$ blocks, the subfactor being seen by the shift-invariant block, by Theorem \ref{thm:circulant}. The entrywise powers $H^{\circ k}$ are circulant too, so $R_k(H)=\sum_m|\widehat{h^k}(m)|^4$, with $\widehat{h^k}$ being the Fourier transform of $h^k$, the glow is the law of $\Omega=\frac{1}{N}\sum_m\lambda_{-m}\overline{\widehat a}(m)\widehat b(m)$, and the spectrum consists of the numbers $\lambda_m$, all of modulus $\sqrt N$, with $Tr(H)=Nh(0)$. As for the dichotomy between the Di\c t\u a type and the wildness, from Section 4, the matrices which are not wild should be of Fourier or Di\c t\u a type, and in particular their quantum group should preserve a partition of the indices into blocks, these blocks being unions of orbitals, in the sense of Theorem \ref{thm:transfer}. At prime order there are no such partitions, so the matrices which are not wild should be equivalent to the Fourier matrix. The program \texttt{royce.py}, run on a laptop, tests this at the primes $p=7,11,13,17$, by finding complex Hadamard matrices from random starting points, and computing their defect, $\dim P_2$ and $\dim P_3$, and finds 7265 classes, all having $\dim P_2=2$ and $\dim P_3=5$, except for $F_7$. The program \texttt{wladimir.py} does the same at the orders $N=6,8,9,10,12$, with 33116 classes, the matrices having $\dim P_2=2$ always having $\dim P_3=5$, and those with $\dim P_2>2$ always having block systems, the only exceptions being near-degenerate points of continuous families. There are many questions left, and regarding the subfactors, we have for instance: \begin{enumerate} \item Is there a version of the method of Section 5 allowing zeros in the profile, as needed for $BF_6$, $L_{8,30}$, the families of order 8, and the real matrices of order $0(8)$? Can a finer congruence deal with $I_{8,12}$ and $K_{8,30}$, and a Fourier one with $BF_6$, using Proposition \ref{prop:bf6fourier}? Which other circulants, such as the Bj\"orck matrices of simple index $d\geq4$, or the one of order 61 in Theorem \ref{thm:index3}, have an affine profile, and which of the matrices of \cite{bha} are wild? \item Is the free wreath product $S_3^+\wr_*S_2^+$ maximal in $S_6^+$, and can the kagome walks of Theorem \ref{thm:karlsson} be pushed beyond level 18? \end{enumerate} As for the relations between the invariants, and the dichotomy, we have: \begin{enumerate} \item Do the traces $Tr(T_k^m)$ appear in the glow at higher orders, as $Tr(T_2^3)$ at order 24, and does the rooted law determine the real glow, or the converse? \item Does $R_k$ appear in the complex glow at order $4k$, with coefficient $((2k)!/k!^2)^2(c_k')^4/2$, which is 18 at $k=2$, and does the complex glow determine the flux distribution? \item What is the glow of the spin models of Nomura \cite{nom}, and of the spin models in general \cite{jae}? \item What is the law of $\langle Ha,a\rangle$ for the Fourier matrices, whose first moment is the Gauss sum, and do the higher moments of the glued arrays see the Weil numbers of \cite{cft}? \item Is the flux distribution a complete invariant for the strong quantum equivalence in order 6, as in order 4, in view of \cite{cw1}, and are the traces $Tr(\Lambda_H^r)$ seen by the glow, as $Tr(\Lambda_H^2)$ is? \item Is a complex Hadamard matrix whose quantum group preserves no partition of the indices into blocks either equivalent to $F_p$, at prime order $p$, or wild, as supported by Section 5 and by \texttt{royce.py}, \texttt{wladimir.py}? \item Is the Hodge polygon determined by the glow, as the 2-rank is at $N=16$, and is there a physical meaning for the Newton strata of \cite{cft}? \end{enumerate} Finally, here is the unification statement, which includes Theorem A: \begin{thm}\label{thm:unification} Two complex Hadamard matrices $H,K$ of the same order are equivalent precisely when $S_\Gamma(H)=S_\Gamma(K)$ for any balanced bipartite multigraph $\Gamma$ with signed edges. Moreover, the algebraic, analytic, geometric and combinatorial invariants are the explicit functions of the numbers $S_\Gamma(H)$ given by Theorems \ref{thm:transfer}, \ref{thm:moments}, \ref{thm:berezin} and \ref{thm:categories}, and the arithmetic invariants are functions of the numbers $S_\Gamma(H)$ on the balanced directed graphs, which separate the conjugacy classes, by Theorem \ref{thm:arithmetic}. \end{thm} \begin{proof} The equivalence is the action of the compact group $(S_N\ltimes\mathbb T^N)\times(S_N\ltimes\mathbb T^N)$ on $M_N(\mathbb C)$, by left and right multiplication with monomial matrices, whose orbits are separated by the invariant polynomials. The averaging over $\mathbb T^N\times\mathbb T^N$ kills the unbalanced monomials in $H,\bar H$, and the averaging over $S_N\times S_N$ turns a balanced monomial into a sum over the injective labelings of a graph $\Gamma$. By M\"obius inversion, these sums are combinations of the numbers $S_{\Gamma'}(H)$, with $\Gamma'$ obtained from $\Gamma$ by identifying vertices of the same type, giving the first assertion. The rest follows from Sections 1, 7, 9, 10, 11. \end{proof} \begin{thebibliography}{99} \small\raggedright\setlength{\itemsep}{1pt}\setlength{\parsep}{0pt} \phantomsection\addcontentsline{toc}{section}{References} \bibitem{asc} N. Andruskiewitsch and H.J. Schneider, On the classification of finite-dimensional pointed Hopf algebras, \emph{Ann. of Math.} \textbf{171} (2010), 375--417. \bibitem{arh} C. Arhancet, Spectral measures for subfactors and Lie groups, hexagon:2611.00592 (2026). \bibitem{ahs} M. Asaeda and U. Haagerup, Exotic subfactors of finite depth with Jones indices $(5+\sqrt{13})/2$ and $(5+\sqrt{17})/2$, \emph{Comm. Math. Phys.} \textbf{202} (1999), 1--63. \bibitem{abf} Astra, Banica and Fable, Karlsson matrices and the kagome lattice, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24221202}{zenodo:24221202}} (2026). \bibitem{bhj} R. Bacher, P. de la Harpe and V.F.R. Jones, Carr\'es commutatifs et invariants de structures combinatoires, \emph{C. R. Acad. Sci. Paris S\'er. I Math.} \textbf{320} (1995), 1049--1054. \bibitem{bvm} T. Banica, Hopf algebras and subfactors associated to vertex models, \emph{J. Funct. Anal.} \textbf{159} (1998), 243--266. \bibitem{trd} T. Banica, Truncation and duality results for Hopf image algebras, \emph{Bull. Pol. Acad. Sci. Math.} \textbf{62} (2014), 161--179. \bibitem{bco} Banica and Codex, On deformations of McNulty-Weigert and other matrices, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24618197}{zenodo:24618197}} (2026). \bibitem{bcf} Banica, Codex and Fable, Spectral measure blowup for Hadamard subfactors, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24353496}{zenodo:24353496}} (2026). \bibitem{bbr} T. Banica and J. Bichon, Random walk questions for linear quantum groups, \emph{Int. Math. Res. Not. IMRN} \textbf{2015} (2015), 13406--13436. \bibitem{bbs} T. Banica, J. Bichon and J.M. Schlenker, Representations of quantum permutation algebras, \emph{J. Funct. Anal.} \textbf{257} (2009), 2864--2910. \bibitem{tbc} T. Banica and C. Opus, Higher invariants of complex Hadamard matrices, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24185801}{zenodo:24185801}} (2026). \bibitem{bop} T. Banica, D. \"Ozteke and L. Pittau, Isolated partial Hadamard matrices, and related topics, \emph{Open Syst. Inf. Dyn.} \textbf{25} (2018), 1--27. \bibitem{tbs} T. Banica and S. Palcoux, Invariant tensor dimensions as Hamburger moments, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24348893}{zenodo:24348893}} (2026). \bibitem{bba} E. Bannai and E. Bannai, Spin models on finite cyclic groups, \emph{J. Algebraic Combin.} \textbf{3} (1994), 243--259. \bibitem{bsb} N. Barros e S\'a and I. Bengtsson, Families of complex Hadamard matrices, \emph{Linear Algebra Appl.} \textbf{438} (2013), 2929--2957. \bibitem{bfw} J. Bichon, Free wreath product by the quantum permutation group, \emph{Algebr. Represent. Theory} \textbf{7} (2004), 343--362. \bibitem{bic} J. Bichon, Quotients and Hopf images of a smash coproduct, \emph{Tsukuba J. Math.} \textbf{39} (2015), 285--310. \bibitem{bjo} D. Bisch and V.F.R. Jones, Algebras associated to intermediate subfactors, \emph{Invent. Math.} \textbf{128} (1997), 89--157. \bibitem{bn1} D. Bisch and R. Nicoara, Invariants of subfactors associated to Petrescu's Hadamard matrices of order 7, {\hypersetup{allcolors=black}\href{https://arxiv.org/pdf/2611.25638}{arXiv:2611.25638}} (2026). \bibitem{bn2} D. Bisch and R. Nicoara, Subfactor symmetries of real Hadamard matrices, {\hypersetup{allcolors=black}\href{https://arxiv.org/pdf/2611.25616}{arXiv:2611.25616}} (2026). \bibitem{bjk} G. Bj\"orck, Functions of modulus 1 on $\mathbb Z_n$ whose Fourier transforms have constant modulus, and cyclic $n$-roots, \emph{NATO Adv. Sci. Inst. Ser. C Math. Phys. Sci.} \textbf{315} (1990), 131--140. \bibitem{bjf} G. Bj\"orck and R. Fr\"oberg, A faster way to count the solutions of inhomogeneous systems of algebraic equations, with applications to cyclic $n$-roots, \emph{J. Symbolic Comput.} \textbf{12} (1991), 329--336. \bibitem{bha} G. Bj\"orck and U. Haagerup, All cyclic $p$-roots of index 3, found by symmetry-preserving calculations, {\hypersetup{allcolors=black}\href{https://arxiv.org/pdf/0803.2506}{arXiv:0803.2506}} (2008). \bibitem{brg} S.T. Bramwell and M.J.P. Gingras, Spin ice state in frustrated magnetic pyrochlore materials, \emph{Science} \textbf{294} (2001), 1495--1501. \bibitem{bghp} M. Brannan, D. Gromada, R. Hern\'andez Palomares and N. Priebe, Complex Hadamard matrices: quantum symmetries, equivalence and non-local games, {\hypersetup{allcolors=black}\href{https://arxiv.org/pdf/2608.14858}{arXiv:2608.14858}} (2026). \bibitem{bur} R.D. Burstein, Group-type subfactors and Hadamard matrices, \emph{Trans. Amer. Math. Soc.} \textbf{367} (2015), 6783--6807. \bibitem{but} A.T. Butson, Generalized Hadamard matrices, \emph{Proc. Amer. Math. Soc.} \textbf{13} (1962), 894--898. \bibitem{cw1} M. C\'ardenes Wuttig and J. Tindall, A complete classification of complex Hadamard matrices of order six, {\hypersetup{allcolors=black}\href{https://arxiv.org/pdf/2608.18053}{arXiv:2608.18053}} (2026). \bibitem{cw2} M. C\'ardenes Wuttig and J. Tindall, Using topology to reveal all mutually unbiased bases in dimension six, {\hypersetup{allcolors=black}\href{https://arxiv.org/pdf/2611.06917}{arXiv:2611.06917}} (2026). \bibitem{cst} T.G. Centeleghe and J. Stix, Categories of abelian varieties over finite fields, I: Abelian varieties over $\mathbb F_p$, \emph{Algebra Number Theory} \textbf{9} (2015), 225--265. \bibitem{cma} A. Chan and W.J. Martin, Quantum isomorphism of graphs from association schemes, \emph{J. Combin. Theory Ser. B} \textbf{164} (2024), 340--363. \bibitem{cis} P. Chandra, L.B. Ioffe and D. Sherrington, Possible glassiness in a periodic long-range Josephson array, \emph{Phys. Rev. Lett.} \textbf{75} (1995), 713--716. \bibitem{cgt} Chat, Grok and Teo, Numerical evidence for the almost Hadamard conjecture, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24357392}{zenodo:24357392}} (2026). \bibitem{cot} Chat, Opus and Teo, Planar rotators with Hadamard couplings, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24408089}{zenodo:24408089}} (2026). \bibitem{cft} Claude F and Teo B, Arithmetic aspects of complex Hadamard matrices, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24572638}{zenodo:24572638}} (2026). \bibitem{cbc} Codex, Banica and Claude, Crossing distances and quantum reflection groups, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24576319}{zenodo:24576319}} (2026). \bibitem{dl1} P. Deligne, La s\'erie exceptionnelle de groupes de Lie, \emph{C. R. Acad. Sci. Paris S\'er. I Math.} \textbf{322} (1996), 321--326. \bibitem{dl2} P. Deligne and R. de Man, La s\'erie exceptionnelle de groupes de Lie II, \emph{C. R. Acad. Sci. Paris S\'er. I Math.} \textbf{323} (1996), 577--582. \bibitem{dit} P. Di\c t\u a, Some results on the parametrization of complex Hadamard matrices, \emph{J. Phys. A} \textbf{37} (2004), 5355--5374. \bibitem{dkr} J. van Dobben de Bruyn, P.N. Kar, D.E. Roberson, S. Schmidt and P. Zeman, Quantum automorphism groups of trees, \emph{J. Noncommut. Geom.} \textbf{20} (2026), 489--505. \bibitem{eka} D.E. Evans and Y. Kawahigashi, Quantum symmetries on operator algebras, Oxford University Press (1998). \bibitem{evp} D.E. Evans and M. Pugh, Spectral measures and generating series for nimrep graphs in subfactor theory, \emph{Comm. Math. Phys.} \textbf{295} (2010), 363--413. \bibitem{ftp} Fable and Teo, A thermodynamic promenade through design theory, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24613338}{zenodo:24613338}} (2026). \bibitem{fsl} P.C. Fishburn and N.J.A. Sloane, The solution to Berlekamp's switching game, \emph{Discrete Math.} \textbf{74} (1989), 263--290. \bibitem{gjo} D.M. Goldschmidt and V.F.R. Jones, Metaplectic link invariants, \emph{Geom. Dedicata} \textbf{31} (1989), 165--191. \bibitem{ghj} F.M. Goodman, P. de la Harpe and V.F.R. Jones, Coxeter graphs and towers of algebras, Springer (1989). \bibitem{gpt} GPT and Teo, Regular complex Hadamard matrices of order 7,8, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/23934849}{zenodo:23934849}} (2026). \bibitem{gro} D. Gromada, Quantum symmetries of Hadamard matrices, \emph{Trans. Amer. Math. Soc.} \textbf{377} (2024), 6341--6377. \bibitem{gr2} D. Gromada, Quantum association schemes, {\hypersetup{allcolors=black}\href{https://arxiv.org/pdf/2404.06157}{arXiv:2404.06157}} (2024). \bibitem{hgr} U. Haagerup, Principal graphs of subfactors in the index range $4<[M:N]<3+\sqrt2$, in \emph{Subfactors}, World Sci. Publ. (1994), 1--38. \bibitem{haa} U. Haagerup, Orthogonal maximal abelian $*$-subalgebras of the $n\times n$ matrices and cyclic $n$-roots, in \emph{Operator algebras and quantum field theory}, International Press (1997), 296--322. \bibitem{hdm} J. Hadamard, R\'esolution d'une question relative aux d\'eterminants, \emph{Bull. Sci. Math.} \textbf{17} (1893), 240--246. \bibitem{hn1} S. Hall and R. Nicoara, An isolated complex Hadamard matrix with nonzero defect, {\hypersetup{allcolors=black}\href{https://arxiv.org/pdf/2611.20136}{arXiv:2611.20136}} (2026). \bibitem{hn2} S. Hall and R. Nicoara, A finiteness result for commuting squares and quantitative Ocneanu rigidity, {\hypersetup{allcolors=black}\href{https://arxiv.org/pdf/2611.29535}{arXiv:2611.29535}} (2026). \bibitem{hbe} J.H. Hannay and M.V. Berry, Quantization of linear maps on a torus - Fresnel diffraction by a periodic grating, \emph{Phys. D} \textbf{1} (1980), 267--290. \bibitem{hon} S. Hopkins and R. Nicoara, Obstructions to Hadamard deformations of Fourier matrices, {\hypersetup{allcolors=black}\href{https://arxiv.org/pdf/2611.21871}{arXiv:2611.21871}} (2026). \bibitem{iwo} M. Idel and M.M. Wolf, Sinkhorn normal form for unitary matrices, \emph{Linear Algebra Appl.} \textbf{471} (2015), 76--84. \bibitem{ja2} F. Jaeger, Strongly regular graphs and spin models for the Kauffman polynomial, \emph{Geom. Dedicata} \textbf{44} (1992), 23--52. \bibitem{jae} F. Jaeger, New constructions of models for link invariants, \emph{Pacific J. Math.} \textbf{176} (1996), 71--116. \bibitem{jmn} F. Jaeger, M. Matsumoto and K. Nomura, Bose--Mesner algebras related to type II matrices and spin models, \emph{J. Algebraic Combin.} \textbf{8} (1998), 39--72. \bibitem{jin} V.F.R. Jones, Index for subfactors, \emph{Invent. Math.} \textbf{72} (1983), 1--25. \bibitem{jo1} V.F.R. Jones, On knot invariants related to some statistical mechanical models, \emph{Pacific J. Math.} \textbf{137} (1989), 311--334. \bibitem{jo2} V.F.R. Jones, The annular structure of subfactors, \emph{Monogr. Enseign. Math.} \textbf{38} (2001), 401--463. \bibitem{jth} V.F.R. Jones, Some unitary representations of Thompson's groups $F$ and $T$, \emph{J. Comb. Algebra} \textbf{1} (2017), 1--44. \bibitem{jnt} V.F.R. Jones, A no-go theorem for the continuum limit of a periodic quantum spin chain, \emph{Comm. Math. Phys.} \textbf{357} (2018), 295--317. \bibitem{jo3} V.F.R. Jones, Planar algebras, I, \emph{New Zealand J. Math.} \textbf{52} (2021), 1--107. \bibitem{jms} V.F.R. Jones, S. Morrison and N. Snyder, The classification of subfactors of index at most 5, \emph{Bull. Amer. Math. Soc.} \textbf{51} (2014), 277--327. \bibitem{jsu} V.F.R. Jones and V.S. Sunder, Introduction to subfactors, \emph{London Math. Soc. Lecture Note Ser.} \textbf{234}, Cambridge University Press (1997). \bibitem{krb} A. Karabegov, The reconstruction of a unitary matrix from the moduli of its elements and symbols on a finite phase space, preprint YERPHI-1194(71)-89 (1989). \bibitem{kar} B.R. Karlsson, Three-parameter complex Hadamard matrices of order 6, \emph{Linear Algebra Appl.} \textbf{434} (2011), 247--258. \bibitem{ksw} P. Kasprzak, P.M. Soltan and S.L. Woronowicz, Quantum automorphism groups of finite quantum groups are classical, \emph{J. Geom. Phys.} \textbf{89} (2015), 32--37. \bibitem{kea} J.P. Keating, The cat maps: quantum mechanics and classical motion, \emph{Nonlinearity} \textbf{4} (1991), 309--341. \bibitem{kru} P. Kurlberg and Z. Rudnick, Hecke theory and equidistribution for the quantization of linear maps of the torus, \emph{Duke Math. J.} \textbf{103} (2000), 47--77. \bibitem{los} P.H.J. Lampio, F. Sz\"oll\H{o}si and P.R.J. \"Osterg\aa rd, The quaternary complex Hadamard matrices of orders 10, 12, and 14, \emph{Discrete Math.} \textbf{313} (2013), 189--206. \bibitem{los20} P.H.J. Lampio, P.R.J. \"Osterg\aa rd and F. Sz\"oll\H{o}si, Orderly generation of Butson Hadamard matrices, \emph{Math. Comp.} \textbf{89} (2020), 313--331. \bibitem{mpa} M.L. Madan and S. Pal, Abelian varieties and a conjecture of R.M. Robinson, \emph{J. Reine Angew. Math.} \textbf{291} (1977), 78--91. \bibitem{mp1} E. Marinari, G. Parisi and F. Ritort, Replica field theory for deterministic models: binary sequences with low autocorrelation, \emph{J. Phys. A} \textbf{27} (1994), 7615--7646. \bibitem{mp2} E. Marinari, G. Parisi and F. Ritort, Replica field theory for deterministic models II: a non-random spin glass with glassy behaviour, \emph{J. Phys. A} \textbf{27} (1994), 7647--7668. \bibitem{mck} B.D. McKay, Hadamard matrices, {\hypersetup{allcolors=black}\href{https://users.cecs.anu.edu.au/~bdm/data/hadamard.html}{users.cecs.anu.edu.au/\textasciitilde bdm/data/hadamard.html}}. \bibitem{mwi} D. McNulty and S. Weigert, Isolated Hadamard matrices from mutually unbiased product bases, \emph{J. Math. Phys.} \textbf{53} (2012), 1--21. \bibitem{mo1} M. Montgomery, The spectrum of spin model angle operators, {\hypersetup{allcolors=black}\href{https://arxiv.org/pdf/2110.06720}{arXiv:2110.06720}} (2021). \bibitem{mo2} M. Montgomery, Angle operators of commuting square subfactors, PhD thesis, Vanderbilt University (2022). \bibitem{nat} S. Natale, Semisolvability of semisimple Hopf algebras of low dimension, \emph{Mem. Amer. Math. Soc.} \textbf{186} (2007), no. 874. \bibitem{nic} R. Nicoara, A finiteness result for commuting squares of matrix algebras, \emph{J. Operator Theory} \textbf{55} (2006), 295--310. \bibitem{nsh} R. Nicoara, Subfactors and Hadamard matrices, \emph{J. Operator Theory} \textbf{64} (2010), 453--468. \bibitem{nwh} R. Nicoara and J. White, Analytic deformations of group commuting squares and complex Hadamard matrices, \emph{J. Funct. Anal.} \textbf{272} (2017), 3486--3505. \bibitem{nw2} R. Nicoara and J. White, Second order deformations of group commuting squares and Hadamard matrices, \emph{Proc. Amer. Math. Soc.} \textbf{148} (2020), 3967--3974. \bibitem{nom} K. Nomura, Spin models constructed from Hadamard matrices, \emph{J. Combin. Theory Ser. A} \textbf{68} (1994), 251--261. \bibitem{ising} Opus and Teo, Ising spins with Hadamard couplings, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24546490}{zenodo:24546490}} (2026). \bibitem{pal} R.E.A.C. Paley, On orthogonal matrices, \emph{J. Math. Phys.} \textbf{12} (1933), 311--320. \bibitem{pet} M. Petrescu, Existence of continuous families of complex Hadamard matrices of certain prime dimensions and related results, PhD thesis, UCLA (1997). \bibitem{pop0} S. Popa, Orthogonal pairs of $*$-subalgebras in finite von Neumann algebras, \emph{J. Operator Theory} \textbf{9} (1983), 253--268. \bibitem{pop2} S. Popa, Some ergodic properties for infinite graphs associated with subfactors, \emph{Ergodic Theory Dynam. Systems} \textbf{15} (1995), 993--1003. \bibitem{rob} R.M. Robinson, Conjugate algebraic units in a special interval, \emph{Math. Z.} \textbf{154} (1977), 31--40. \bibitem{ska} T. Shioda and T. Katsura, On Fermat varieties, \emph{Tohoku Math. J.} \textbf{31} (1979), 97--115. \bibitem{sun} T. Sunada, Topological crystallography, Springer (2013). \bibitem{syl} J.J. Sylvester, Thoughts on inverse orthogonal matrices, simultaneous sign-successions, and tessellated pavements in two or more colours, with applications to Newton's rule, ornamental tile-work, and the theory of numbers, \emph{Phil. Mag.} \textbf{34} (1867), 461--475. \bibitem{szo} F. Sz\"oll\H{o}si, Parametrizing complex Hadamard matrices, \emph{European J. Combin.} \textbf{29} (2008), 1219--1234. \bibitem{tz2} W. Tadej and K. Zyczkowski, A concise guide to complex Hadamard matrices, \emph{Open Syst. Inf. Dyn.} \textbf{13} (2006), 133--177. \bibitem{tzy} W. Tadej and K. Zyczkowski, Defect of a unitary matrix, \emph{Linear Algebra Appl.} \textbf{429} (2008), 447--481. \bibitem{tao} T. Tao, Fuglede's conjecture is false in 5 and higher dimensions, \emph{Math. Res. Lett.} \textbf{11} (2004), 251--258. \bibitem{tgp} Teo and GPT, Report on regular Hadamard matrices of order 11, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24536895}{zenodo:24536895}} (2026). \bibitem{tbg} Teo B and Chat GPT, On Fourier and Hadamard matrices of prime order, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24061004}{zenodo:24061004}} (2026). \bibitem{tbo} Teo Banica and Claude Opus, Quantum permutations and the Standard Model algebra, {\hypersetup{allcolors=black}\href{https://zenodo.org/records/24403549}{zenodo:24403549}} (2026). \bibitem{tou} G. Toulouse, Theory of the frustration effect in spin glasses: I, \emph{Commun. Phys.} \textbf{2} (1977), 115--119. \bibitem{wal} W.D. Wallis, On the zeroes of profiles, \emph{J. Austral. Math. Soc. Ser. A} \textbf{47} (1989), 424--429. \bibitem{wa1} S. Wang, Quantum symmetry groups of finite spaces, \emph{Comm. Math. Phys.} \textbf{195} (1998), 195--211. \bibitem{wan} S. Wang, $L_p$-improving convolution operators on finite quantum groups, \emph{Indiana Univ. Math. J.} \textbf{65} (2016), 1609--1637. \bibitem{wor} S.L. Woronowicz, Compact matrix pseudogroups, \emph{Comm. Math. Phys.} \textbf{111} (1987), 613--665. \bibitem{wo2} S.L. Woronowicz, Tannaka-Krein duality for compact matrix pseudogroups. Twisted $SU(N)$ groups, \emph{Invent. Math.} \textbf{93} (1988), 35--76. \end{thebibliography} \end{document}