CNOT-Patel Synthesis for linear reversible functions¶
Header: tweedledum/algorithms/synthesis/cnot_patel.hpp
Algorithm¶
-
template <class Network, class Matrix>
Networktweedledum
::
cnot_patel
(Matrix const &matrix, cnot_patel_params params = {})¶ CNOT Patel synthesis for linear circuits.
This algorithm is based on the work in [PMH08].
The following code shows how to apply the algorithm to the example in the original paper.
std::vector<uint32_t> rows = {0b000011, 0b011001, 0b010010, 0b111111, 0b111011, 0b011100}; bit_matrix_rm matrix(6, rows); cnot_patel_params parameters; parameters.allow_rewiring = false; parameters.best_partition_size = false; parameters.partition_size = 2u; auto network = cnot_patel<netlist<mcst_gate>>(matrix, parameters);
- Parameters
matrix
: The square matrix representing a linear reversible circuit.params
: The parameters that configure the synthesis process. Seecnot_patel_params
for details.
Warning
doxygenfunction: Unable to resolve multiple matches for function “tweedledum::cnot_patel” with arguments (Network&, std::vector<uint32_t> const&, Matrix const&, cnot_patel_params) in doxygen xml output for project “tweedledum” from directory: doxyxml/xml. Potential matches:
- template <class Network, class Matrix>
Network tweedledum::cnot_patel(Matrix const&, cnot_patel_params)
- template <class Network, class Matrix>
void tweedledum::cnot_patel(Network&, std::vector<qubit_id> const&, Matrix const&, cnot_patel_params)