From the course: Quantum Computing Fundamentals

Represent multiple qubits

- So far, we've learned how to describe the state of a single qubit, which can exist in a superposition of our computational basis states: 0 and 1. It may be interesting, but a quantum computer with only 1-qubit is not very useful. To build a useful quantum program, we'll need to use multiple qubits. - If we expand our quantum system to 2-qubits, now there are four possible basis states. Both of our qubits could be 0, they could both be 1, or they could be different, and there are two ways that could happen. Those four states are shown here using Dirac notation. Although we'll verbally describe these states by reading the digits from left to right, keep in mind that they're written with the first bit- or least significant bit- in the rightmost position. So, for example, in the state we'll refer to as 01, 1 is in the first position. Now, to represent these four states in a vector space, we'll need four dimensions. |00⟩ can be written as a four dimensional vector with a 1 in the first position and zeros elsewhere. In the next state, |01⟩, that 1 is shifted down into the second position. |10⟩ has it in the third position. And the |11⟩ state vector has the 1 in the last position. These are the four computational basis states for a 2-qubit system written in both direct notation and the corresponding column vectors. - If we grow our system from 2-qubits to 3, that gives us eight basis states shown here. Having eight states means we need eight dimensions to represent our set of orthonormal basis vectors. We won't go through all of those vectors here but as an example, the state represented by |011⟩ would be an eight dimensional vector with a 1 in the fourth position and zeros everywhere else. Expanding our quantum system again from 3 to 4-qubits grows our number of basis vectors from 8 to 16. Representing a 5-qubit system requires 32 basis states and so on. You may be recognizing a pattern here. The number of qubits in the system means it will have two to that number of states. So, for example, in a system with nine qubits, each individual qubit can be in one of two possible basis states, which is two to the power of nine or 512 states. Those represent all the possible outcomes we could get when measuring those 9-qubits. - If you've worked with classical computers in the past, this should seem familiar. Because at the end of it all, when we measure quantum bits, we get back classical bits of information, ones and zeros. But when we have a system with multiple qubits in superposition, they represent a linear combination of those however many basis states. For example, to mathematically represent a superposition of 2-qubits, which have four basis states, we need four complex coefficients. Instead of adding more Greek letters to the mix, we've simply used the Latin alphabet here labeling these variables as a, b, c, and d. As an example, consider the quantum state where each of those variables is 1/2. Represented as a vector, that would look something like this. If we calculate the probability of measuring those 2-qubits and getting an outcome of 0 for both of them, we see that the probability of that is 1/4. Similarly, the probability of measuring the first bit as 1 and the second bit as 0, is 1/4. The opposite of that outcome has a probability of 1/4, as does the probability of measuring both qubits as being in the 1 state. That example represents what's called a uniform superposition, where every possible outcome has an equal probability when you measure that set of qubits. It's like flipping a pair of coins. (coins clanging) - Now, let's look at another system of 2-qubits in a non-uniform superposition. We've used a slightly different notation here to show that this superposition, |ψ⟩, is the sum of the basis states 00 and 01 both divided by the square root of two. In vector notation, that corresponds to the first two positions being 1 over the square root of 2 and the last two positions being 0. The probability of measuring this system of qubits and seeing both the zeros, is 1/2. As is the probability of measuring the first qubit as 1 and the second qubit as 0. The probability of observing these 2-qubits in any other combination, is 0. So in this particular superposition of 2-qubits, we will always measure the second- or left qubit- as 0 and the outcome of measuring the first or rightmost qubit, will have a 50/50 chance of being 0 or 1.

Contents