Synthesis of quantum logic circuits