Barenco decomposition

Header: tweedledum/algorithms/decomposition/barenco.hpp

Parameters

struct barenco_params

Parameters for barenco_decomposition.

Algorithm

template<typename Network>
Network tweedledum::barenco_decomposition(Network const &network, barenco_params params = {})

Barenco decomposition.

Decomposes all Multiple-controlled Toffoli gates with more than controls_threshold controls into Toffoli gates with at most controls_threshold controls. This may introduce one additional helper qubit called ancilla.

Required gate functions:

  • foreach_control

  • foreach_target

  • num_controls

Required network functions:

  • add_gate

  • foreach_qubit

  • foreach_gate

  • rewire

  • rewire_map