Binarizing a tensor network #
A tensor network whose edges carry letters of a finite alphabet U becomes a Boolean tensor
network once every letter is written in m bits. Fix an injective code
code : U → (Fin m → Bool). The binarization TensorNetwork.binarize replaces every edge e
by the m parallel Boolean edges (e, 0), …, (e, m - 1) between the same two vertices. A vertex
decodes the m bits on each of its edges and evaluates its old tensor on the decoded letters; if
the bits on one of its edges are not the code of any letter, its tensor is zero.
The contraction is unchanged (TensorNetwork.contraction_binarize): assignments of bits in which
every edge carries a code word correspond exactly to assignments of letters, and every other
assignment of bits has an edge with an invalid code word, whose source tensor vanishes. Every edge
becomes m edges, so vertex degrees are multiplied by m
(TensorNetwork.maxDegreeLE_binarize). Every tensor entry of the binarization is zero or an entry
of the original network (TensorNetwork.tensor_binarize_eq_zero_or). Loops and bipartiteness are
preserved.
This lets a construction use a structured alphabet, such as words over a machine's tape alphabet, and then pass to the Boolean networks of [OAI26k], Appendix D.
Main definitions #
Cslib.Circuits.Frontier.TensorNetwork.binarize: the binarization by a code.Cslib.Circuits.Frontier.TensorNetwork.bitsOn: the bits on the copies of an edge.
Main results #
Cslib.Circuits.Frontier.TensorNetwork.contraction_binarize: binarization by an injective code preserves the contraction.Cslib.Circuits.Frontier.TensorNetwork.maxDegreeLE_binarize: degrees are multiplied by the code length.Cslib.Circuits.Frontier.TensorNetwork.loopless_binarize,Cslib.Circuits.Frontier.TensorNetwork.isBipartite_binarize: loops and bipartiteness are preserved.Cslib.Circuits.Frontier.TensorNetwork.tensor_binarize_eq_zero_or: binarized entries are zero or original entries.
References #
- OpenAI, The Exponential Time Hypothesis is False, Appendix D.1 (p. 53).
The binarization of a tensor network by a code code : U → (Fin m → Bool). Every edge e
becomes the m Boolean edges (e, j) between the same two vertices. A vertex whose edges all
carry code words evaluates its old tensor on the decoded letters (Function.invFun code); a
vertex with an edge carrying a word that is not a code word has tensor zero.
Every tensor entry of the binarization is zero or an entry of the original network at some assignment of letters.
Binarization keeps a network bipartite, with the same sides.
Binarization multiplies degrees by the code length.
Binarization preserves the contraction. Assignments of bits in which every edge carries a code word are the codes of the assignments of letters, and every other assignment of bits has an edge with an invalid word, at whose source the tensor vanishes.