0
$\begingroup$

In section 2.5 of the Qiskit textbook, it states that $X$, $Y$, $Z$ and $H$ are examples of unitary Hermitian matrices. As I understand it, this means that the following rule applies: $$UU^\dagger=U^\dagger U=1$$ I can't get the second part of this to work. Taking $X$ as an example: $$\begin{bmatrix}0 & 1\\1 & 0\end{bmatrix}.\begin{bmatrix}0 & 1\\1 & 0\end{bmatrix}$$ We can immediately see that $U U^ \dagger=U^\dagger U$ (as they're the same), but when I do an inner product, I get: $$(0\times0)+(1\times1)+(1\times1)+(0\times0)=2$$ Am I doing my matrix multiplication wrong, or am I forgetting something?

$\endgroup$
4
  • 2
    $\begingroup$ Why are you doing an inner product? (and what are you doing it of?) You should be doing matrix multiplication and getting the answer of a $2\times 2$ matrix. $\endgroup$
    – DaftWullie
    Mar 2, 2021 at 12:24
  • $\begingroup$ I was trying to get to a single scalar value, as that's what the equation says in the textbook. I think I was confusing my approach with the mechanism for calculating the probability of reading a qubit in a specific state. @ie-irodov 's answer below makes sense if I read the "1" as an "I". $\endgroup$ Mar 2, 2021 at 18:42
  • $\begingroup$ It's one of the ways that people end up writing identity when writing for the web and using mathjax for latex rendering, which doesn't have the full set of Latex symbols we might otherwise be used to. It's just a shame it's not consistent with elsewhere in the book where they use I. $\endgroup$
    – DaftWullie
    Mar 3, 2021 at 8:00
  • $\begingroup$ Yes - I think if the book had been habitually using "1" everywhere, I'd have been more comfortable! Thanks again. $\endgroup$ Mar 3, 2021 at 8:06

1 Answer 1

2
$\begingroup$

$UU^{\dagger}=I$ rather than $1$. Simply multiply $U$ and $U^{\dagger}$ as follows:

$$ \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \times \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} (0\times0) + (1\times1) & (0\times1)+(1\times0) \\ (1\times0) + (0\times1) & (1\times1) + (0\times0)\end{pmatrix}$$

$$ = \begin{pmatrix} 1 & 0 \\ 0 & 1\end{pmatrix}$$

It'll make more sense if you remember that appending $U$ and $U^{\dagger}$ one after the other in a circuit will make them equivalent to an identity gate, i.e. the net effect is cancelled out. For example, $H|0\rangle=|+\rangle$ and $H|+\rangle=|0\rangle$

$\endgroup$
1
  • $\begingroup$ This makes total sense, and I've marked it as the correct answer, but the textbook (qiskit.org/textbook/ch-gates/…) clearly uses the number 1, rather than the letter I for "identity". If we're saying that's a typo in the text, I can get past it, but wouldn't have been confident enough to say so! $\endgroup$ Mar 2, 2021 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.