I.7 Universal gate sets. Codercise 1.7.3

I wonder if anyone could help me with this exercise?

From the hints I take it that there are three H gates and 3 T gates and that they must alternate. This seems to give two possibilities - THTHTH or HTHTHT. I assume that in each case T may either be itself or its adjoint.

However, I can’t reproduce the unitary matrix. It is the third term in each case with the i factored out that I can’t reproduce.

I believe that I will be able to follow the steps if set out, but my linear algebra is rusty - in particular with multiplying out the terms with e to the power i, so I am unlikely to get there on my own.

Any help would be greatly appreciated.

Hi @SimonPRichards,
You are right to assume that given that the Hadamard is its own inverse, we cannot have consecutive Hadamard gates, and that because of the common denominator we must have three Hadamard gates. But no one said that you cannot have consecutive T gates :wink:. You can have an idea of the number of consecutive T gates by analysing the phases, or you can consider that at this point you don’t really have many options. :smiley:
Let me know if you have any more questions.

Many thanks once again!

It was straightforward to implement the gates after your suggestion.

It was also easier to check the matrix multiplication using HTHSH!

1 Like

Let us know if you have any other questions!