Section3.4Cubelike Graphs
A cubelike graph is a Cayley graph for \(\ints_2^d\). The connection set of such a graph can be encoded by a \(d\times m\) matrix with distinct columns. If \(M\) is such a matrix then we can get a list of its columns with cols = M.columns() and we can recover \(M\) with M = Matrix(cols).transpose().
The natural choice for the vertices of a cubelike graph are the elements of
but these are not hashable. We can make a vector v hashable with v.set_immutable() and use vectors as vertices, or work as follows. Suppose that vls is a list of vectors from a vector space V.
For humans it can be convenient to encode binary vectors of length \(d\) as integers between 0 and \(2^{d-1}\). With \(G\) as just defined, its connection set will be the correct set of integers.