Direct Toffoli (DT) decomposition¶
Header: tweedledum/algorithms/decomposition/dt.hpp
Algorithm¶
-
template<typename
Network
>
Networktweedledum
::
dt_decomposition
(Network const &network, dt_params params = {})¶ Direct Toffoli (DT) decomposition.
Decomposes all Multiple-controlled Toffoli gates with 2, 3 or 4 controls into Clifford+T. Also decompose all Multiple-controlled Z gates with 2 controls into Clifford+T. This may introduce one additional helper qubit called ancilla.
These Clifford+T represetations were obtained using techniques inspired by [Mas16] and given in [AMMR13]
Required gate functions:
foreach_control
foreach_target
num_controls
Required network functions:
add_gate
foreach_qubit
foreach_gate
rewire
rewire_map