A quantum compiler design method by using linear combinations of permutations