# The nonabelian nice error basis Z^a X^b J^s (x) Z^s X^t of M_4(C), with a,b,s,t in F_2: orthonormality, # the group law of the labels, the center, and the Hopf image of the Weyl type models P^x_rs = Proj(U_r x U_s^*), x = U_k. import numpy as np, itertools out = open("thuram-output.txt", "w") def say(s): print(s, flush=True); out.write(s + "\n"); out.flush() Z = np.diag([1, -1]).astype(complex); X = np.array([[0, 1], [1, 0]], complex); J = np.array([[1, 1], [1, -1]], complex) / np.sqrt(2) mp = np.linalg.matrix_power labels = list(itertools.product(range(2), repeat=4)) U = {l: np.kron(mp(Z, l[0]) @ mp(X, l[1]) @ mp(J, l[2]), mp(Z, l[2]) @ mp(X, l[3])) for l in labels} gram = np.array([[np.trace(U[a].conj().T @ U[b]) / 4 for b in labels] for a in labels]) say("orthonormal basis of M_4(C): %s" % np.allclose(gram, np.eye(16))) def label_of(M): for l in labels: c = np.trace(U[l].conj().T @ M) / 4 if abs(abs(c) - 1) < 1e-9: return l return None mult = {(a, b): label_of(U[a] @ U[b]) for a in labels for b in labels} say("nice error basis, U_a U_b proportional to some U_c: %s" % all(v is not None for v in mult.values())) assoc = all(mult[(mult[(a, b)], c)] == mult[(a, mult[(b, c)])] for a in labels for b in labels for c in labels) say("induced label law is associative (a group F of order 16): %s" % assoc) comm = sum(1 for a, b in itertools.product(labels, labels) if mult[(a, b)] != mult[(b, a)]) center = [z for z in labels if all(mult[(z, b)] == mult[(b, z)] for b in labels)] say("F nonabelian: %s, |Z(F)| = %d" % (comm > 0, len(center))) # models with x = U_k: the vectors U_i U_k U_j^* are proportional to basis elements, so the Hopf image is the # classical group generated by the permutations i -> g^-1 i k, i.e. left and right translations of F inv = {a: [b for b in labels if mult[(a, b)] == (0, 0, 0, 0)][0] for a in labels} perms = set() for g in labels: for k in labels: perms.add(tuple(labels.index(mult[(mult[(inv[g], i)], k)]) for i in labels)) def closure(gens): S = set(gens); frontier = list(gens) while frontier: nf = [] for p in frontier: for q in gens: r = tuple(p[q[i]] for i in range(len(q))) if r not in S: S.add(r); nf.append(r) frontier = nf return S grp = closure(perms) say("Hopf image: classical group of order %d, and |F|^2/|Z(F)| = %d" % (len(grp), 16 * 16 // len(center))) say("done")