Optimizing T gates in Clifford+T circuit as π/4 rotations around Paulis