# orbits.py -- orbits of the bistochastic forms of had16.3 under its symmetry group: a form b (|Hb| = 4) is mapped to # Q b by each symmetry (P,Q), since H Q b = P^{-1} H b. Canonical form as in poirier.py / wanderlei.py: # b/b_1, phases rounded to 1e-6 of a turn, min with the complex conjugate. import numpy as np H=np.loadtxt('had163.txt'); Qs=np.load('aut.npy') reps=np.exp(2j*np.pi*np.loadtxt('had163reps.txt')) def canon(B): t=np.round(((np.angle(B/B[:,:1])/(2*np.pi))%1)*1e6).astype(np.int64)%1000000 tc=(-t)%1000000 return [min(' '.join(map(str,x)),' '.join(map(str,y))) for x,y in zip(t,tc)] known=[43008,43008,21504,21504,21504,21504,21504,"21504?",5376,5376] for c,b in enumerate(reps): for it in range(2000): u=H@b; u/=abs(u); b=H.T@u; b/=abs(b) QB=np.einsum('qij,j->qi',Qs,b) assert np.abs(np.abs(QB@H.T)-4).max()<1e-9 orb=set(canon(QB)) print(f"class {c}: orbit of size {len(orb):6d} (class size found by the searches: {known[c]}) stabilizer order {len(Qs)//len(orb)}",flush=True) if c==7: open('class7orbit.txt','w').write('\n'.join(sorted(orb))+'\n')