CoCalc Public FileslatinSquareGraphs.sagews
Author: joshp112358 joshp112358
Views : 125
Compute Environment: Ubuntu 18.04 (Deprecated)
#A latin square is an nxn matrix with n symbols in each row and each column
#One can turn a latin square into an orthogonal array by making a 3 tuple(i,j,z)
#such that i is the row, j is the column, and z is the ijth entry
#Make

from sage.combinat.matrices.latin import *

K4 = LatinSquare(matrix(ZZ, [[0,1,2,3],
[1,0,3,2],
[2,3,0,1],
[3,2,1,0]]))
K4

[0 1 2 3] [1 0 3 2] [2 3 0 1] [3 2 1 0]
C4 = LatinSquare(matrix(ZZ, [[0,1,2,3],
[1,2,3,0],
[2,3,0,1],
[3,0,1,2]]))

C4

[0 1 2 3] [1 2 3 0] [2 3 0 1] [3 0 1 2]
#vertices are indices

def MakeOrthogonalArray(M):
if not M.is_latin_square(): # check M is a latin square
return False
n = M.nrows()#order of M
array = [(i,j) for i in range(n) for j in range(n)]
OA = []
for x in array:
OA.append(x+(M[x],))
return OA


MakeOrthogonalArray(C4)

[(0, 0, 0), (0, 1, 1), (0, 2, 2), (0, 3, 3), (1, 0, 1), (1, 1, 2), (1, 2, 3), (1, 3, 0), (2, 0, 2), (2, 1, 3), (2, 2, 0), (2, 3, 1), (3, 0, 3), (3, 1, 0), (3, 2, 1), (3, 3, 2)]

def LatinSquareGraph(M):
OA = MakeOrthogonalArray(M)
G = Graph()
edges = []
for u in OA:
for v in OA:
if u!= v:
if (v,u) not in edges:
if u[0] == v[0]:
edges.append((u,v))
elif u[1] == v[1]:
edges.append((u,v))
elif u[2] == v[2]:
edges.append((u,v))

return G


LatinSquareGraph(C4).show(figsize=3)

LatinSquareGraph(K4).show(figsize=3)

def checkLSGareIsomorphic(A,B):
return LatinSquareGraph(A).is_isomorphic(LatinSquareGraph(B))

checkLSGareIsomorphic(K4,C4)

False
from sage.combinat.designs.latin_squares import mutually_orthogonal_latin_squares

MOLS3 = mutually_orthogonal_latin_squares(2, 3)

checkLSGareIsomorphic(LatinSquare(MOLS3[0]),LatinSquare(MOLS3[1]))

True
from itertools import combinations

def CheckSetOfMOLSIsomorphic(n):
MOLS = mutually_orthogonal_latin_squares(n-1, n)
k = len(MOLS)
domain = combinations(range(k),2)
TruthTable = []
for x in domain:
boolean = checkLSGareIsomorphic(LatinSquare(MOLS[x[0]]),LatinSquare(MOLS[x[1]]))
if boolean == False:
break
else:
TruthTable.append(boolean)
return set(TruthTable)


l = [3,4,5,7,8,9,11,13]
for i in l:
CheckSetOfMOLSIsomorphic(i)

set([True]) set([True]) set([True]) set([True]) set([True]) set([True])
Error in lines 2-3 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1234, in execute flags=compile_flags), namespace, locals) File "", line 2, in <module> File "", line 7, in CheckSetOfMOLSIsomorphic File "", line 2, in checkLSGareIsomorphic File "", line 9, in LatinSquareGraph File "src/cysignals/signals.pyx", line 320, in cysignals.signals.python_check_interrupt KeyboardInterrupt
#i believe these were the latin squares reffered to
#https://www.sciencedirect.com/science/article/pii/0315086081900057

A = LatinSquare(matrix(ZZ,[[0,4,1,7,2,9,8,3,6,5],
[8,1,5,2,7,3,9,4,0,6],
[9,8,2,6,3,7,4,5,1,0],
[5,9,8,3,0,4,7,6,2,1],
[7,6,9,8,4,1,5,0,3,2],
[6,7,0,9,8,5,2,1,4,3],
[3,0,7,1,9,8,6,2,5,4],
[1,2,3,4,5,6,0,7,8,9],
[2,3,4,5,6,0,1,8,9,7],
[4,5,6,0,1,2,3,9,7,8]]))
B = LatinSquare(matrix(ZZ, [[0,7,8,6,9,3,5,4,1,2],
[6,1,7,8,0,9,4,5,2,3],
[5,0,2,7,8,1,9,6,3,4],
[9,6,1,3,7,8,2,0,4,5],
[3,9,0,2,4,7,8,1,5,6],
[8,4,9,1,3,5,7,2,6,0],
[7,8,5,9,2,4,6,3,0,1],
[4,5,6,0,1,2,3,7,8,9],
[1,2,3,4,5,6,0,9,7,8],
[2,3,4,5,6,0,1,8,9,7]]))
checkLSGareIsomorphic(A,B)

True


C4inverse = LatinSquare(matrix(ZZ, [[0,3,2,1],
[1,0,3,2],
[2,1,0,3],
[3,2,1,0]]))

checkLSGareIsomorphic(C4,C4inverse)

True
A = LatinSquare(matrix(ZZ,[[0,4,1,7,2,9,8,3,6,5],
[8,1,5,2,7,3,9,4,0,6],
[9,8,2,6,3,7,4,5,1,0],
[5,9,8,3,0,4,7,6,2,1],
[7,6,9,8,4,1,5,0,3,2],
[6,7,0,9,8,5,2,1,4,3],
[3,0,7,1,9,8,6,2,5,4],
[1,2,3,4,5,6,0,7,8,9],
[2,3,4,5,6,0,1,8,9,7],
[4,5,6,0,1,2,3,9,7,8]]))
B = LatinSquare(matrix(ZZ, [[0,7,8,6,9,3,5,4,1,2],
[6,1,7,8,0,9,4,5,2,3],
[5,0,2,7,8,1,9,6,3,4],
[9,6,1,3,7,8,2,0,4,5],
[3,9,0,2,4,7,8,1,5,6],
[8,4,9,1,3,5,7,2,6,0],
[7,8,5,9,2,4,6,3,0,1],
[4,5,6,0,1,2,3,7,8,9],
[1,2,3,4,5,6,0,9,7,8],
[2,3,4,5,6,0,1,8,9,7]]))
checkLSGareIsomorphic(A,B)

True
z3z3 = LatinSquare(matrix(ZZ, [[0,1,2,3,4,5,6,7,8],
[1,2,0,4,5,3,7,8,6],
[2,0,1,5,3,4,8,6,7],
[3,4,5,6,7,8,0,1,2],
[4,5,3,7,8,6,1,2,0],
[5,3,4,8,6,7,2,0,1],
[6,7,8,0,1,2,3,4,5],
[7,8,6,1,2,0,4,5,3],
[8,6,7,2,0,1,5,3,4]]))
patchedgalois = LatinSquare(matrix(ZZ,   [[0,1,2,3,4,5,6,7,8],
[2,0,1,6,8,7,3,5,4],
[3,6,0,4,7,1,8,2,5],
[4,8,7,0,2,3,5,6,1],
[5,7,1,3,0,8,2,4,6],
[6,3,8,5,2,0,4,1,7],
[7,5,2,6,4,1,0,8,3],
[8,4,5,1,6,7,3,0,2],
[8,4,5,1,6,7,3,0,2]]))
checkLSGareIsomorphic(z3z3,patchedgalois)

Error in lines 19-19 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1234, in execute flags=compile_flags), namespace, locals) File "", line 1, in <module> File "", line 2, in checkLSGareIsomorphic File "", line 4, in LatinSquareGraph File "/ext/sage/sage-8.9_1804/local/lib/python2.7/site-packages/sage/graphs/generic_graph.py", line 9962, in add_vertices return self._backend.add_vertices(vertices) File "sage/graphs/base/c_graph.pyx", line 1491, in sage.graphs.base.c_graph.CGraphBackend.add_vertices (build/cythonized/sage/graphs/base/c_graph.cpp:14300) for v in vertices: TypeError: 'bool' object is not iterable


LatinSquareGraph(z3z3)

Graph on 81 vertices
LatinSquareGraph(patchedgalois)

Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1234, in execute flags=compile_flags), namespace, locals) File "", line 1, in <module> File "", line 4, in LatinSquareGraph File "/ext/sage/sage-8.9_1804/local/lib/python2.7/site-packages/sage/graphs/generic_graph.py", line 9962, in add_vertices return self._backend.add_vertices(vertices) File "sage/graphs/base/c_graph.pyx", line 1491, in sage.graphs.base.c_graph.CGraphBackend.add_vertices (build/cythonized/sage/graphs/base/c_graph.cpp:14300) for v in vertices: TypeError: 'bool' object is not iterable
# moore penrose inverse
#eigenvalues and eigenvectors

import numpy as np

k,v = np.linalg.eig(AC4)

k

array([ 9., 1., -3., -3., 1., 1., -3., -3., 1., 1., 1., -3., -3., 1., 1., 1.])
v[0]

array([-2.50000000e-01, -7.50000000e-01, 6.12372436e-01, 4.40872589e-02, 1.91979711e-02, 6.71717729e-02, 9.37929507e-02, -2.64791788e-02, 3.61791639e-04, -9.57753160e-03, -5.86698663e-02, -1.38229348e-01, -3.80950220e-02, 2.71419396e-02, -5.29406437e-02, 2.91543570e-02])
v[1]

array([-0.25 , -0.08333333, -0.20412415, -0.45918803, -0.4961923 , -0.31859765, 0.32875918, 0.07846665, -0.52640571, 0.07171299, -0.29373682, 0.16325583, 0.192765 , -0.01550074, 0.0108685 , -0.15387057])
import numpy as np


mpi = np.linalg.pinv(AC4)
9*mpi

array([[ 4., 1., 1., 1., 1., -2., -2., 1., 1., -2., 1., -2., 1., 1., -2., -2.], [ 1., 4., 1., 1., 1., 1., -2., -2., -2., 1., -2., 1., -2., 1., 1., -2.], [ 1., 1., 4., 1., -2., 1., 1., -2., 1., -2., 1., -2., -2., -2., 1., 1.], [ 1., 1., 1., 4., -2., -2., 1., 1., -2., 1., -2., 1., 1., -2., -2., 1.], [ 1., 1., -2., -2., 4., 1., 1., 1., 1., -2., -2., 1., 1., -2., 1., -2.], [-2., 1., 1., -2., 1., 4., 1., 1., 1., 1., -2., -2., -2., 1., -2., 1.], [-2., -2., 1., 1., 1., 1., 4., 1., -2., 1., 1., -2., 1., -2., 1., -2.], [ 1., -2., -2., 1., 1., 1., 1., 4., -2., -2., 1., 1., -2., 1., -2., 1.], [ 1., -2., 1., -2., 1., 1., -2., -2., 4., 1., 1., 1., 1., -2., -2., 1.], [-2., 1., -2., 1., -2., 1., 1., -2., 1., 4., 1., 1., 1., 1., -2., -2.], [ 1., -2., 1., -2., -2., -2., 1., 1., 1., 1., 4., 1., -2., 1., 1., -2.], [-2., 1., -2., 1., 1., -2., -2., 1., 1., 1., 1., 4., -2., -2., 1., 1.], [ 1., -2., -2., 1., 1., -2., 1., -2., 1., 1., -2., -2., 4., 1., 1., 1.], [ 1., 1., -2., -2., -2., 1., -2., 1., -2., 1., 1., -2., 1., 4., 1., 1.], [-2., 1., 1., -2., 1., -2., 1., -2., -2., -2., 1., 1., 1., 1., 4., 1.], [-2., -2., 1., 1., -2., 1., -2., 1., 1., -2., -2., 1., 1., 1., 1., 4.]])
AC4

[0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0] [1 0 1 1 1 1 0 0 0 1 0 1 0 1 1 0] [1 1 0 1 0 1 1 0 1 0 1 0 0 0 1 1] [1 1 1 0 0 0 1 1 0 1 0 1 1 0 0 1] [1 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0] [0 1 1 0 1 0 1 1 1 1 0 0 0 1 0 1] [0 0 1 1 1 1 0 1 0 1 1 0 1 0 1 0] [1 0 0 1 1 1 1 0 0 0 1 1 0 1 0 1] [1 0 1 0 1 1 0 0 0 1 1 1 1 0 0 1] [0 1 0 1 0 1 1 0 1 0 1 1 1 1 0 0] [1 0 1 0 0 0 1 1 1 1 0 1 0 1 1 0] [0 1 0 1 1 0 0 1 1 1 1 0 0 0 1 1] [1 0 0 1 1 0 1 0 1 1 0 0 0 1 1 1] [1 1 0 0 0 1 0 1 0 1 1 0 1 0 1 1] [0 1 1 0 1 0 1 0 0 0 1 1 1 1 0 1] [0 0 1 1 0 1 0 1 1 0 0 1 1 1 1 0]

X = 81*mpi*AC4*mpi
X

array([[0., 1., 1., 1., 1., 0., 0., 1., 1., 0., 1., 0., 1., 1., 0., 0.], [1., 0., 1., 1., 1., 1., 0., 0., 0., 1., 0., 1., 0., 1., 1., 0.], [1., 1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 0., 0., 0., 1., 1.], [1., 1., 1., 0., 0., 0., 1., 1., 0., 1., 0., 1., 1., 0., 0., 1.], [1., 1., 0., 0., 0., 1., 1., 1., 1., 0., 0., 1., 1., 0., 1., 0.], [0., 1., 1., 0., 1., 0., 1., 1., 1., 1., 0., 0., 0., 1., 0., 1.], [0., 0., 1., 1., 1., 1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 0.], [1., 0., 0., 1., 1., 1., 1., 0., 0., 0., 1., 1., 0., 1., 0., 1.], [1., 0., 1., 0., 1., 1., 0., 0., 0., 1., 1., 1., 1., 0., 0., 1.], [0., 1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 1., 1., 1., 0., 0.], [1., 0., 1., 0., 0., 0., 1., 1., 1., 1., 0., 1., 0., 1., 1., 0.], [0., 1., 0., 1., 1., 0., 0., 1., 1., 1., 1., 0., 0., 0., 1., 1.], [1., 0., 0., 1., 1., 0., 1., 0., 1., 1., 0., 0., 0., 1., 1., 1.], [1., 1., 0., 0., 0., 1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 1.], [0., 1., 1., 0., 1., 0., 1., 0., 0., 0., 1., 1., 1., 1., 0., 1.], [0., 0., 1., 1., 0., 1., 0., 1., 1., 0., 0., 1., 1., 1., 1., 0.]])
X

array([[0., 1., 1., 1., 1., 0., 0., 1., 1., 0., 1., 0., 1., 1., 0., 0.], [1., 0., 1., 1., 1., 1., 0., 0., 0., 1., 0., 1., 0., 1., 1., 0.], [1., 1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 0., 0., 0., 1., 1.], [1., 1., 1., 0., 0., 0., 1., 1., 0., 1., 0., 1., 1., 0., 0., 1.], [1., 1., 0., 0., 0., 1., 1., 1., 1., 0., 0., 1., 1., 0., 1., 0.], [0., 1., 1., 0., 1., 0., 1., 1., 1., 1., 0., 0., 0., 1., 0., 1.], [0., 0., 1., 1., 1., 1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 0.], [1., 0., 0., 1., 1., 1., 1., 0., 0., 0., 1., 1., 0., 1., 0., 1.], [1., 0., 1., 0., 1., 1., 0., 0., 0., 1., 1., 1., 1., 0., 0., 1.], [0., 1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 1., 1., 1., 0., 0.], [1., 0., 1., 0., 0., 0., 1., 1., 1., 1., 0., 1., 0., 1., 1., 0.], [0., 1., 0., 1., 1., 0., 0., 1., 1., 1., 1., 0., 0., 0., 1., 1.], [1., 0., 0., 1., 1., 0., 1., 0., 1., 1., 0., 0., 0., 1., 1., 1.], [1., 1., 0., 0., 0., 1., 0., 1., 0., 1., 1., 0., 1., 0., 1., 1.], [0., 1., 1., 0., 1., 0., 1., 0., 0., 0., 1., 1., 1., 1., 0., 1.], [0., 0., 1., 1., 0., 1., 0., 1., 1., 0., 0., 1., 1., 1., 1., 0.]])
D = Graph(X, format='adjacency_matrix')

Error in lines 1-1 Traceback (most recent call last): File "/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py", line 1234, in execute flags=compile_flags), namespace, locals) File "", line 1, in <module> File "/ext/sage/sage-8.9_1804/local/lib/python2.7/site-packages/sage/graphs/graph.py", line 1147, in __init__ from_adjacency_matrix(self, data, loops=loops, multiedges=multiedges, weighted=weighted) File "/ext/sage/sage-8.9_1804/local/lib/python2.7/site-packages/sage/graphs/graph_input.py", line 242, in from_adjacency_matrix assert is_Matrix(M) AssertionError
k,v = np.linalg.eig(X)

v

array([[ 0.25 +0.j , -0.5528346 +0.j , -0.05502842+0.j , 0.02658607+0.j , 0.02833791-0.04265418j, 0.02833791+0.04265418j, -0.10478156+0.j , 0.08898718+0.11514002j, 0.08898718-0.11514002j, -0.03048058+0.j , -0.10393666+0.08032238j, -0.10393666-0.08032238j, 0.20169396+0.j , 0.65562259+0.j , -0.00995683+0.06938734j, -0.00995683-0.06938734j], [ 0.25 +0.j , 0.27399859+0.j , -0.11954801+0.j , 0.30626774+0.j , -0.41120219+0.14435661j, -0.41120219-0.14435661j, 0.4793877 +0.j , 0.01756286+0.08331392j, 0.01756286-0.08331392j, -0.0152493 +0.j , -0.07180713+0.30566742j, -0.07180713-0.30566742j, 0.23544988+0.j , 0.18623384+0.j , -0.22791527-0.05253595j, -0.22791527+0.05253595j], [ 0.25 +0.j , 0.28135196+0.j , 0.35553444+0.j , -0.0758409 +0.j , 0.11704115-0.04393424j, 0.11704115+0.04393424j, -0.29920979+0.j , 0.25740895+0.26203276j, 0.25740895-0.26203276j, 0.33480118+0.j , 0.08266917-0.06338336j, 0.08266917+0.06338336j, 0.47055999+0.j , 0.25751352+0.j , -0.19146326+0.16419951j, -0.19146326-0.16419951j], [ 0.25 +0.j , -0.00251594+0.j , -0.18095801+0.j , -0.25701292+0.j , 0.26582313-0.05776819j, 0.26582313+0.05776819j, -0.07539634+0.j , -0.14626332+0.28421727j, -0.14626332-0.28421727j, 0.01002729+0.j , -0.0118146 +0.07579985j, -0.0118146 -0.07579985j, -0.16518175+0.j , 0.04863275+0.j , -0.1149015 +0.01778415j, -0.1149015 -0.01778415j], [ 0.25 +0.j , 0.24059138+0.j , 0.42264589+0.j , -0.22275277+0.j , 0.20538549-0.04680866j, 0.20538549+0.04680866j, -0.02056505+0.j , 0.03876603-0.13523597j, 0.03876603+0.13523597j, 0.09295925+0.j , -0.20236834+0.2608729j , -0.20236834-0.2608729j , 0.02997361+0.j , -0.16718181+0.j , -0.01279156+0.21785072j, -0.01279156-0.21785072j], [ 0.25 +0.j , -0.36724235+0.j , -0.23496759+0.j , -0.21624365+0.j , 0.19738457+0.05405028j, 0.19738457-0.05405028j, -0.0060579 +0.j , 0.13085386-0.08865955j, 0.13085386+0.08865955j, -0.21696347+0.j , 0.15618811+0.15827733j, 0.15618811-0.15827733j, -0.03692162+0.j , -0.13997726+0.j , -0.19668274+0.20623699j, -0.19668274-0.20623699j], [ 0.25 +0.j , -0.04129833+0.j , -0.29596659+0.j , 0.55960159+0.j , -0.47274391+0.j , -0.47274391-0.j , 0.1816379 +0.j , 0.00345656-0.06718655j, 0.00345656+0.06718655j, 0.36069698+0.j , -0.00178186+0.01715739j, -0.00178186-0.01715739j, -0.39537288+0.j , -0.38503936+0.j , -0.00981881+0.0919384j , -0.00981881-0.0919384j ], [ 0.25 +0.j , 0.1679493 +0.j , 0.1082883 +0.j , -0.12060517+0.j , 0.06997384-0.00724162j, 0.06997384+0.00724162j, -0.15501496+0.j , -0.26191204+0.14935521j, -0.26191204-0.14935521j, -0.50669942+0.j , -0.26979783-0.0624155j , -0.26979783+0.0624155j , -0.16362303+0.j , -0.0054136 +0.j , -0.32291397+0.10188381j, -0.32291397-0.10188381j], [ 0.25 +0.j , 0.12413503+0.j , -0.3686363 +0.j , 0.1819835 +0.j , -0.13694694-0.06500981j, -0.13694694+0.06500981j, -0.0487734 +0.j , 0.0593419 -0.20618867j, 0.0593419 +0.20618867j, 0.02229283+0.j , 0.38095652-0.12533526j, 0.38095652+0.12533526j, 0.23064232+0.j , 0.1455483 +0.j , 0.29520019+0.05353887j, 0.29520019-0.05353887j], [ 0.25 +0.j , -0.14429392+0.j , 0.47590577+0.j , -0.31677187+0.j , 0.30369725-0.09670446j, 0.30369725+0.09670446j, -0.28036156+0.j , -0.21581366-0.31685807j, -0.21581366+0.31685807j, -0.06001991+0.j , 0.4270667 +0.j , 0.4270667 -0.j , -0.42981428+0.j , -0.14358892+0.j , 0.26172093-0.28910893j, 0.26172093+0.28910893j], [ 0.25 +0.j , 0.14734762+0.j , 0.06813028+0.j , -0.13272868+0.j , -0.00843213+0.15159823j, -0.00843213-0.15159823j, 0.45276475+0.j , -0.20490728-0.10102783j, -0.20490728+0.10102783j, -0.02498198+0.j , 0.09556452-0.35987603j, 0.09556452+0.35987603j, 0.07922606+0.j , 0.1998555 +0.j , 0.05892793-0.24704675j, 0.05892793+0.24704675j], [ 0.25 +0.j , -0.12718872+0.j , -0.17539975+0.j , 0.26751704+0.j , -0.15831819+0.01011604j, -0.15831819-0.01011604j, -0.12362979+0.j , -0.40484833+0.j , -0.40484833-0.j , -0.25221183+0.j , -0.0128999 -0.12068305j, -0.0128999 +0.12068305j, 0.13769683+0.j , -0.18927678+0.j , -0.04898948-0.17273761j, -0.04898948+0.17273761j], [ 0.25 +0.j , 0.18810819+0.j , 0.00101883+0.j , 0.0141832 +0.j , -0.09677647+0.15447265j, -0.09677647-0.15447265j, 0.17412001+0.j , 0.23292099-0.15250725j, 0.23292099+0.15250725j, 0.34065241+0.j , 0.01004153+0.0712066j , 0.01004153-0.0712066j , -0.36119406+0.j , -0.15446761+0.j , 0.46451839+0.j , 0.46451839-0.j ], [ 0.25 +0.j , 0.23753769+0.j , -0.12139016+0.j , 0.22674778+0.j , -0.08987963-0.10170243j, -0.08987963+0.10170243j, -0.19296824+0.j , 0.09606911-0.06881942j, 0.09606911+0.06881942j, -0.28428285+0.j , -0.11738049-0.02221424j, -0.11738049+0.02221424j, -0.15415906+0.j , 0.14490169+0.j , 0.04138221-0.18628702j, 0.04138221+0.18628702j], [ 0.25 +0.j , -0.38740124+0.j , -0.12769813+0.j , -0.35103201+0.j , 0.36413489-0.10766398j, 0.36413489+0.10766398j, -0.33519286+0.j , 0.17240304+0.0314969j , 0.17240304-0.0314969j , 0.39092163+0.j , -0.28933113-0.0633244j , -0.28933113+0.0633244j , 0.18160221+0.j , -0.28041193+0.j , 0.04376696-0.07986111j, 0.04376696+0.07986111j], [ 0.25 +0.j , -0.03824464+0.j , 0.24806946+0.j , 0.11010104+0.j , -0.17747878+0.05489377j, -0.17747878-0.05489377j, 0.35404109+0.j , 0.13597415+0.21092724j, 0.13597415-0.21092724j, -0.16146223+0.j , -0.07136862-0.15207203j, -0.07136862+0.15207203j, 0.13942183+0.j , -0.17295092+0.j , -0.0300832 +0.10475759j, -0.0300832 -0.10475759j]])
X = X.astype(int)
X


array([[0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0], [0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0], [0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0], [0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0], [0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], [0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0], [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0], [0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], [0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1], [0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 0, 0]])