  Any unitary operation in quantum information processing can be implemented
via a sequence of simpler steps - quantum gates. However, actual implementation
of a quantum gate is always imperfect and takes a finite time. Therefore,
seeking for a short sequence of gates - efficient quantum circuit for a given
operation, is an important task. We contribute to this issue by proposing
optimization of the well-known universal procedure proposed by Barenco et.al
[1]. We also created a computer program which realizes both Barenco's
decomposition and the proposed optimization. Furthermore, our optimization can
be applied to any quantum circuit containing generalized Toffoli gates,
including basic quantum gate circuits.
