  Unitary decomposition is a widely used method to map quantum algorithms to an
arbitrary set of quantum gates. Efficient implementation of this decomposition
allows for translation of bigger unitary gates into elementary quantum
operations, which is key to executing these algorithms on existing quantum
computers. The decomposition can be used as an aggressive optimization method
for the whole circuit, as well as to test part of an algorithm on a quantum
accelerator. For selection and implementation of the decomposition algorithm,
perfect qubits are assumed. We base our decomposition technique on Quantum
Shannon Decomposition which generates O((3/4)*4^n) controlled-not gates for an
n-qubit input gate. The resulting circuits are up to 10 times shorter than
other methods in the field. When comparing our implementation to Qubiter, we
show that our implementation generates circuits with half the number of CNOT
gates and a third of the total circuit length. In addition to that, it is also
up to 10 times as fast. Further optimizations are proposed to take advantage of
potential underlying structure in the input or intermediate matrices, as well
as to minimize the execution time of the decomposition.
