Gate addresses for Boolean matrix squaring #
The circuit for one square puts the gates for an output entry consecutively. Its first N
gates test two-step walks through the possible intermediate vertices, and its last gate takes
their disjunction. The address formulas identify the wires that a serialized circuit generator
must emit.
Main results #
code_squareCircuit_compgives the native gate and output code of a squaring after an arbitrary input circuit.code_iterate_squareCircuitgives the gate list and all output addresses after any number of squarings.
References #
The matrix-powering construction is Arora and Barak, Chapter 6, Exercise 9(b–c), 2007 draft. The address formulas describe this library’s serialization.
Gate list of one Boolean square. The numerical address offset is the first fresh wire
and input names the wires carrying the entries of the input matrix. Blocks are in row-major
order and intermediate vertices within a block occur in numerical order.
Appending a matrix squaring uses the current output wire addresses as its inputs. Its output wires are the disjunctions at the ends of the successive blocks.
Address of a matrix entry after t squarings, with N * N input wires. At zero the entry
is still an input. At positive t its wire is the final disjunction of its last block.
All gates and designated output wires in the native serialization of iterated squaring.
The gate list concatenates one block of N²(N+1) gates per round.