Barenco decomposition¶
Header: tweedledum/algorithms/decomposition/barenco.hpp
Algorithm¶
-
template <typename Network>
Networktweedledum::barenco_decomposition(Network const &src, barenco_params params = {})¶ Barenco decomposition.
Decomposes all Multiple-controlled Toffoli gates with more than
controls_thresholdcontrols into Toffoli gates with at mostcontrols_thresholdcontrols. This may introduce one additional helper qubit called ancilla.Required gate functions:
foreach_controlforeach_targetnum_controls
Required network functions:
add_gateforeach_cqubitforeach_cgaterewirerewire_map