Euler's Identity With Matrices

In this post, I wanted to share some of the progress I made on Exercise 11.165 of the book Quantum Computing: An Applied Approach, which in my copy is on page 244, Chapter 11 section 4. This question comes up when you’re working through a section on matrices, and draws on earlier knowledge developed in the previous section. I needed additional resources and help to get through this problem, so this post is meant to share what I learned for anyone else who might be having trouble with it.

This post and my work on this problem are in no way affiliated with the official book, the author, or the publishers. Also, please do not use this to cheat on your homework. I am primarily posting this for other individuals learning through independent study, who might otherwise get stuck on this problem and might not have a professor/TA/mentor/etc. to turn to.

I am also posting it because this particular textbook doesn’t come with an answer key for the problems. From my understanding, this is something that is currently being worked on, but it’s unclear whether independent study students will have access to the answer key when it’s ready.


The Problem

"Verify that for any operator A such that A2 = I, the following identity holds: $$ e^{i \theta A} = \cos{(\theta)}I + i\sin{(\theta)}A $$
For this exercise, it will be useful to recall the Taylor series for cosine and sine. Use this expression for the Pauli matrices X, Y and Z."

* momentary font switch for readability of problem, but we’re back now *


the solution

Here are some photos of my dog, in case you happened upon this page not expecting to see a solution to this problem, and don’t want spoilers. If you do want the solution, enjoy the puppy photos and keep scrolling.

Screen Shot 2020-12-30 at 2.20.07 PM.png
Screen Shot 2017-09-03 at 3.45.52 PM.png
Screen Shot 2020-12-30 at 2.19.58 PM.png
Screen Shot 2020-12-30 at 2.20.47 PM.png

the Solution FOR real this time

First, let’s do what the text suggests and “recall the Taylor series for cosine and sine”.

$$ \cos(x) = 1 - \frac{x^2}{2!} + \frac{x^4}{4!} - \frac{x^6}{6!} + \frac{x^8}{8!} - ... $$ $$ \sin(x) = x - \frac{x^3}{3!} + \frac{x^5}{5!} - \frac{x^7}{7!} + \frac{x^9}{9!} - ... $$

Now, let’s isolate just this part of the identity we’re examining:

$$ e^{i \theta A} $$

What we’re looking at is the natural number e to the power of “something”. The “something” is a matrix called A multiplied by two scalars: the imaginary number i and the angle theta. The result of this is a complex matrix, because some elements of the resulting matrix will be complex numbers on account of the i being involved.

It’s helpful now to look at another power series:

$$ e^x = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!} + \frac{x^4}{4!} + \frac{x^5}{5!} + ... $$

Also expressed as:

$$ e^x = \sum_{n=0}^{\infty} \frac{x^n}{n!} $$

In our problem though, x is the isolated part of the equation we just looked at, so:

$$ e^{i \theta A} = \sum_{n=0}^{\infty} \frac{(i \theta A)^n}{n!} $$

If we expand this out through the first several terms, it looks like this:

$$ e^{i \theta A} = \frac{(i \theta A)^0}{0!} + \frac{(i \theta A)^1}{1!} + \frac{(i \theta A)^2}{2!} + \frac{(i \theta A)^3}{3!} + \frac{(i \theta A)^4}{4!} + \frac{(i \theta A)^5}{5!} + ... $$ $$ e^{i \theta A} = \frac{A^0}{0!} + \frac{(i \theta A)}{1!} + \frac{i^2 \theta^2 A^2}{2!} + \frac{i^3 \theta^3 A^3}{3!} + \frac{i^4 \theta^4 A^4}{4!} + \frac{i^5 \theta^5 A^5}{5!} + ... $$

Remembering that:

$$ i^2 = -1 $$ $$ i = \sqrt{-1} $$ $$ A^2 = I $$ $$ A^0 = I $$

That last one is just true by the way - any matrix to the power of 0 is just the identity operator (with the appropriate dimensions).

Now we can simplify like so:

$$ e^{i \theta A} = I + i \theta A - \frac{\theta^2 I}{2!} - \frac{i \theta^3 A}{3!} + \frac{\theta^4 I}{4!} + \frac{i \theta^5 A}{5!} - ... $$ $$ e^{i \theta A} = (I - \frac{\theta^2 I}{2!} + \frac{\theta^4 I}{4!} - ...) + (i \theta A - \frac{i \theta^3 A}{3!} + \frac{i \theta^5 A}{5!} - ...) $$ $$ e^{i \theta A} = I(1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - ...) + iA( \theta - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} - ...) $$

If you look closely, you’ll see the power series for cos(x) in the first set of parentheses and the power series for sin(x) in the second set. So now we have:

$$ e^{i \theta A} = \cos{(\theta)}I + i\sin{(\theta)}A $$

And that’s exactly where we expected to end up.


Plugging in the pauli X MAtrix

The X operator, also known as the Pauli X operator, is a matrix with the following form:

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

If we plug this in to the power series from above, we get:

$$ e^{i \theta X} = \frac{(i \theta X)^0}{0!} + \frac{(i \theta X)^1}{1!} + \frac{(i \theta X)^2}{2!} + \frac{(i \theta X)^3}{3!} + \frac{(i \theta X)^4}{4!} + \frac{(i \theta X)^5}{5!} + ... $$ $$ e^{i \theta X} = \frac{X^0}{0!} + \frac{(i \theta X)}{1!} + \frac{i^2 \theta^2 X^2}{2!} + \frac{i^3 \theta^3 X^3}{3!} + \frac{i^4 \theta^4 X^4}{4!} + \frac{i^5 \theta^5 X^5}{5!} + ... $$
Now, let’s confirm that X2 is equal to the identity operator.
$$ XX = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}$$ $$ X^2 = \begin{pmatrix} 0+1 & 0+0 \\ 0+0 & 1+0 \end{pmatrix} $$ $$ X^2 = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} $$

Which is in fact the matrix for the identity operator:

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

So now we know the following is true:

$$ X^2 = I $$

Now we can simplify the above, which gives us:

$$ e^{i \theta X} = I(1 - \frac{\theta^2}{2!} + \frac{\theta^4}{4!} - ...) + iX( \theta - \frac{\theta^3}{3!} + \frac{\theta^5}{5!} - ...) $$ $$ e^{i \theta X} = \cos{(\theta)}I + i\sin{(\theta)}X $$

acknowledgements

I’d like to shout out a big thank you to Hannah Sim for graciously answering my questions about Euler’s formula - her help was instrumental to my understanding of these concepts and I am very grateful!

Also thank you to Jack Hidary for writing the book and the problem, and giving us something to discuss.