Tables of explicit tensor networks #
Tables for the vertices of an ExplicitTensorNetwork, and two contraction identities for
networks assembled from them.
A bounded table lists the values f 0, …, f (2 ^ w - 1) of a function on the words of length
w, by keeping the numbers below 2 ^ w among the first 2 ^ B for a bound w ≤ B
(ExplicitTensorNetwork.boundedTable), so that a network with degrees at most B is computed
from constant-length lists. Looking it up at a word evaluates f at the value of the word
(ExplicitTensorNetwork.entry_boundedTable). The equality table on two ports
(ExplicitTensorNetwork.eqTable) joins two edges into one bit: equality vertices on consecutive
pairs of edges reduce the contraction to a sum over one bit per pair
(ExplicitTensorNetwork.contraction_append_pairs). Mapping every table entry by a semiring
homomorphism maps the contraction (ExplicitTensorNetwork.map_contraction).
Main definitions #
Cslib.Circuits.Frontier.ExplicitTensorNetwork.boundedTable: the table of a function on the words of lengthw, for a boundw ≤ B.Cslib.Circuits.Frontier.ExplicitTensorNetwork.eqTable: the equality table on two ports.Cslib.Circuits.Frontier.ExplicitTensorNetwork.mapTables: maps of the table entries.
Main results #
Cslib.Circuits.Frontier.ExplicitTensorNetwork.boundedTable_eq,Cslib.Circuits.Frontier.ExplicitTensorNetwork.length_boundedTable,Cslib.Circuits.Frontier.ExplicitTensorNetwork.entry_boundedTable: bounded tables.Cslib.Circuits.Frontier.ExplicitTensorNetwork.contraction_append_pairs: equality vertices on consecutive pairs of edges reduce the contraction to a sum over one bit per pair.Cslib.Circuits.Frontier.ExplicitTensorNetwork.map_contraction: the contraction commutes with maps of semirings applied to the tables.
Bounded tables #
For w ≤ B, the bounded table is the table of f on 0, …, 2 ^ w - 1.
Equality vertices and maps of tables #
Equality vertices on pairs of edges. If the last vertices of a network with 2 W edges are
W equality vertices, vertex w joining the edges 2 w and 2 w + 1, then the contraction is the
sum over one bit y w per pair of the product of the other entries, where edge e carries
y (e / 2).
The network with every table entry mapped by ψ.
The contraction commutes with maps of semirings applied to the tables.