""" rigidity.py -- checks the hypotheses of the no quantum symmetry result for the Weyl-Cayley graphs X_S over M_n, from section 4. For the sets S given below, it computes d_S, and checks directly on its eigenspaces in M_n(C) that: the eigenspaces of U and Lambda are spanned by U, U^* and Lambda, Lambda^*; 1 is not in the eigenspaces of U^2, Lambda^2; U^* is not in the eigenspace of U^3, and Lambda^* not in that of Lambda^3; U Lambda^* is not in the eigenspace of U Lambda. It also checks Lambda U = omega U Lambda, and counts, for small n, the sets S with S = -S and at most k pairs satisfying the hypotheses. For the examples satisfying them, it checks that the Weyl translations Ad_{U_k} and the parity Ad_P, with P e_a = e_{-a}, commute with d_S and generate a group of 2n^2 automorphisms, the group Z_n^2 x| Z_2. Finally, it checks the quantum Cayley graph material of section 4: for the groups Z_2^2 and S_3, with generic colors phi, the maps d_phi and their adjoints generate the whole algebra of the maps d_nu, of dimension |G|, and the classical automorphisms of the colored Cayley graph are the |G| right translations, while for Z_2^2 acting on itself, no single graph on 4 vertices, directed and with loops allowed, has automorphism group Z_2^2, and that the graphs on 4 vertices whose automorphism group is Z_2^2, acting by 2 independent flips, have quantum symmetry, the flips being replaceable by quantum flips. Thus no single graph on 4 vertices has quantum symmetry group Z_2^2. Results are written to rigidity.log. """ import itertools import numpy as np from qspace import QSpace, Logger, close, weyl, ad log = Logger("rigidity.log") TOL = 1e-8 def eigenspace_of(qs, d, x): """orthonormal basis (in coordinates) of the eigenspace of d containing x, or None""" S = np.sqrt(qs.G) @ d @ np.sqrt(qs.Ginv) w, v = np.linalg.eigh((S + S.conj().T) / 2) y = np.sqrt(qs.G) @ x for lam in w: cols = v[:, np.abs(w - lam) < TOL] if np.linalg.norm(y - cols @ (cols.conj().T @ y)) < 1e-7: return cols return None def contains(qs, cols, x): y = np.sqrt(qs.G) @ x return np.linalg.norm(y - cols @ (cols.conj().T @ y)) < 1e-7 def hypotheses(n, S): qs = QSpace([n]) d = sum(ad(qs, weyl(n, g)) for g in S) vec = lambda g: qs.to_vec([weyl(n, g)]) out = {} for name, g in [("U", (1, 0)), ("Lambda", (0, 1))]: E = eigenspace_of(qs, d, vec(g)) out[f"E({name}) = span({name}, {name}^*)"] = E.shape[1] == 2 and contains(qs, E, vec((-g[0], -g[1]))) E2 = eigenspace_of(qs, d, vec((2 * g[0], 2 * g[1]))) out[f"1 not in E({name}^2)"] = not contains(qs, E2, vec((0, 0))) E3 = eigenspace_of(qs, d, vec((3 * g[0], 3 * g[1]))) out[f"{name}^* not in E({name}^3)"] = (n == 3) or not contains(qs, E3, vec((-g[0], -g[1]))) E = eigenspace_of(qs, d, vec((1, 1))) out["U Lambda^* not in E(U Lambda)"] = not contains(qs, E, vec((1, -1))) return out U, Lam = weyl(5, (1, 0)), weyl(5, (0, 1)) log(f"Lambda U = omega U Lambda, n = 5: {close(Lam @ U, np.exp(2j * np.pi / 5) * U @ Lam)}") examples = [(5, [(1, 0), (0, 1), (0, 2), (1, 1), (2, 4)]), (7, [(1, 0), (0, 1), (0, 2), (2, 1)]), (7, [(1, 0), (0, 1), (1, 1)]), (5, [(1, 0), (0, 1), (1, 1)])] for n, T in examples: S = sorted(set(T) | {((-a) % n, (-b) % n) for a, b in T}) h = hypotheses(n, S) log(f"=== n = {n}, S = +-{T}: all hypotheses {all(h.values())}") for k, v in h.items(): log(f" {k}: {v}") if all(h.values()): qs = QSpace([n]) dS = sum(ad(qs, weyl(n, g)) for g in S) Par = np.zeros((n, n)) for a in range(n): Par[(-a) % n, a] = 1 maps = [ad(qs, weyl(n, k) @ Pk) for k in itertools.product(range(n), repeat=2) for Pk in [np.eye(n), Par]] comm = all(close(M @ dS, dS @ M) for M in maps) flat = np.array([M.flatten() for M in maps]) distinct = len({tuple(np.round(r, 6)) for r in flat}) == len(maps) log(f" Ad_(U_k) and Ad_(U_k P) commute with d_S: {comm}, and are {len(maps)} = 2n^2 distinct maps: {distinct}") def F(n, S): w = np.exp(2j * np.pi / n) return {(h1, h2): sum(w ** ((g[1] * h1 - g[0] * h2) % n) for g in S).real for h1 in range(n) for h2 in range(n)} def fast_ok(n, S): """the same hypotheses, via the eigenvalues F(h) = sum_{g in S} omega^{sigma(g,h)}""" v, m = F(n, S), lambda h: ((-h[0]) % n, (-h[1]) % n) e = lambda x, y: abs(x - y) < 1e-9 for h in [(1, 0), (0, 1)]: if any(e(v[k], v[h]) and k not in (h, m(h)) for k in v): return False if e(v[(2 % n, 0)], v[(0, 0)]) or e(v[(0, 2 % n)], v[(0, 0)]): return False if n != 3 and (e(v[(3 % n, 0)], v[(1, 0)]) or e(v[(0, 3 % n)], v[(0, 1)])): return False return not e(v[(1, 1)], v[(1, n - 1)]) for n, kmax in [(5, 5), (6, 4), (7, 4)]: reps = [] for a in range(n): for b in range(n): if (a, b) != (0, 0) and ((-a) % n, (-b) % n) not in reps: reps.append((a, b)) counts = [] for k in range(1, kmax + 1): c = 0 for T in itertools.combinations(reps, k): S = set(T) | {((-a) % n, (-b) % n) for a, b in T} c += fast_ok(n, S) counts.append(c) log(f"n = {n}: number of sets S = -S with k = 1..{kmax} pairs satisfying the hypotheses: {counts}") # quantum Cayley graphs of finite groups: d_phi f(h) = sum_g phi(g) f(gh) log("=== colored Cayley graphs X_phi of finite groups, with generic colors phi") rng = np.random.default_rng(11) def group_closure(gens): els = [tuple(range(len(gens[0])))] frontier = list(els) while frontier: new = [] for x in frontier: for g in gens: z = tuple(g[i] for i in x) if z not in els and z not in new: new.append(z) els += new frontier = new return els def algebra_dim(mats): basis = [] def add(M): v = M.flatten() for b in basis: v = v - np.vdot(b, v) * b if np.linalg.norm(v) > 1e-7: basis.append(v / np.linalg.norm(v)) return True return False for M in mats: add(M) grown = True while grown: grown = False Ms = [b.reshape(mats[0].shape) for b in basis] for A in Ms: for B in Ms: grown |= add(A @ B) return len(basis) for name, gens in [("Z_2^2", [(1, 0, 3, 2), (2, 3, 0, 1)]), ("S_3", [(1, 0, 2), (1, 2, 0)])]: if len(gens[0]) == 3: G = list(itertools.permutations(range(3))) else: G = group_closure(gens) m = len(G) idx = {g: i for i, g in enumerate(G)} mul = lambda g, h: tuple(g[h[i]] for i in range(len(h))) phi = rng.normal(size=m) + 1j * rng.normal(size=m) d = np.zeros((m, m), dtype=complex) # d_phi(e_k) = sum_{g h = k} phi(g) e_h for g in G: for h in G: d[idx[h], idx[mul(g, h)]] += phi[idx[g]] dim = algebra_dim([d, d.conj().T]) full = algebra_dim([np.array([[1.0 if mul(g, h) == k else 0 for k in G] for h in G]) for g in G]) auts = [p for p in itertools.permutations(range(m)) if np.allclose(d[np.ix_(p, p)], d)] rights = {tuple(idx[mul(G[i], g)] for i in range(m)) for g in G} log(f" {name}: the algebra generated by d_phi and d_phi^* has dimension {dim}, the maps d_nu " f"span dimension {full}, classical automorphisms {len(auts)}, all right translations " f"{set(auts) == rights}") # Z_2^2 acting on itself: the invariant graphs are the unions of the 4 orbitals G = group_closure([(1, 0, 3, 2), (2, 3, 0, 1)]) sizes = [] for bits in itertools.product([0, 1], repeat=16): A = np.array(bits).reshape(4, 4) if all((A[np.ix_(g, g)] == A).all() for g in G): sizes.append(sum(1 for p in itertools.permutations(range(4)) if (A[np.ix_(p, p)] == A).all())) log(f" Z_2^2 on itself: {len(sizes)} invariant graphs on 4 vertices, with automorphism group orders " f"{sorted(sizes)}, none equal to 4: {4 not in sizes}") # all the graphs on 4 vertices, directed and with loops allowed: the ones with automorphism group # Z_2^2 have it acting by independent flips of 2 pairs, and these flips can be made quantum perms = list(itertools.permutations(range(4))) allA = np.array(list(itertools.product([0, 1], repeat=16))).reshape(-1, 4, 4) fixed = np.array([(allA[:, p][:, :, p] == allA).all(axis=(1, 2)) for p in perms]).T orders = fixed.sum(axis=1) regular = {(0, 1, 2, 3), (1, 0, 3, 2), (2, 3, 0, 1), (3, 2, 1, 0)} kinds, quantum = {}, True P = np.array([[1, 0], [0, 0]], dtype=complex) v = np.array([1, 1j]) / np.sqrt(2) Q = np.outer(v, v.conj()) for i in np.where(orders == 4)[0]: Aut = {perms[k] for k in np.where(fixed[i])[0]} invol = all(tuple(g[g[x]] for x in range(4)) == (0, 1, 2, 3) for g in Aut) kind = "regular" if Aut == regular else ("2 flips" if invol else "Z_4") kinds[kind] = kinds.get(kind, 0) + 1 if kind == "2 flips": flips = [g for g in Aut if sum(g[x] != x for x in range(4)) == 2] pairs = [tuple(x for x in range(4) if g[x] != x) for g in flips] u = np.zeros((8, 8), dtype=complex) # magic unitary with entries in M_2 for (a, b), R in zip(pairs, [P, Q]): for x, y, M in [(a, a, R), (b, b, R), (a, b, np.eye(2) - R), (b, a, np.eye(2) - R)]: u[2 * x:2 * x + 2, 2 * y:2 * y + 2] = M A2 = np.kron(allA[i], np.eye(2)) quantum &= np.allclose(u @ A2, A2 @ u) and not np.allclose(P @ Q, Q @ P) log(f" all {len(allA)} graphs on 4 vertices, directed, with loops allowed: automorphism groups of order 4 " f"{kinds}; for the Klein ones, acting by 2 independent flips, the flips can be replaced by quantum " f"flips with noncommuting coefficients, so G^+(X) is not classical: {quantum}") colored = np.array([[0, 1, 2, 3], [1, 0, 3, 2], [2, 3, 0, 1], [3, 2, 1, 0]]) nc = sum(1 for p in itertools.permutations(range(4)) if (colored[np.ix_(p, p)] == colored).all()) log(f" K_4 with its 3 perfect matchings colored 1, 2, 3: {nc} automorphisms, eigenvalues of d_phi " f"{[int(round(x)) for x in np.linalg.eigvalsh(colored.astype(float))]}, distinct, so d_phi generates") log.save()