Relocating raw circuit fragments -- definitions #
A raw fragment whose incoming wires begin at zero can be mounted after an arbitrary prefix by adding the prefix width to every wire reference. Gate order, negation flags, and operations are unchanged.
Add a fixed offset to both input references of a raw gate.
Equations
Instances For
Relocate every reference in a raw circuit by the same wire offset.
Equations
- Complexity.CircuitCode.RawCircuit.shift offset circuit = List.map (Complexity.CircuitCode.RawGate.shift offset) circuit