general_decomposer
decompose(ir, decomposer)
Applies decomposer
to every gate in the circuit, replacing each gate by the output of decomposer
.
When decomposer
decides to not decomposer a gate, it needs to return a list with the intact gate as single
element.
Source code in opensquirrel\decomposer\general_decomposer.py
replace(ir, gate_generator, f)
Does the same as decomposer, but only applies to a given gate.