A change of basis
We learned in Chapter 4, Vector Spaces, that a vector can have different coordinates depending on the basis that was chosen, but we didn't tell you how to go back and forth between bases. In this section, we will.
We want to come up with a matrix – let's call it B for a change of basis – that takes us from one basis to another. In other words, we want this mathematical formula to work:
This matrix B will convert the coordinates of a vector according to a basis C to the coordinates for the vector in the basis F. Now, how do we find this matrix?
Let's look at an example. We will define the basis C as the computational basis and the basis F this way:
Now, let's look at a random vector, |v⟩, defined in the computational basis C:
...