A quantum computer stores its quantum data in one or more quantum registers. They can store data in quantum superposition, the first key in understanding the advantage of quantum computers.
As we just saw with classical data, a register holds a small number of bits. In classical computers, we have a set of registers that are of a fixed size, but in a quantum computer we generally have a single, undifferentiated register that we split up to hold different pieces of data as necessary. First, though, let’s talk about our register as a single entity.
Quantum State Space
The set of possible states for our register is our state space. For a register with qubits, there are a total of possible states, just as a classical register has possible values. If our quantum register could hold only a single value, a four-qubit register might, for example, have the value .
However, our ability to put a quantum state into superposition means that we need a total of of our dials to represent our state. Equivalently, we can say that our state vector requires entries to write out in its entirety.
For example, our 000, 001, 010 and 111 states we would write as
Fortunately, much of the time, most of those are zero, and so we don’t have to explicitly draw them or write them down – that’s why the Dirac ket notation (on the left) is so much more compact. When we have a superposition, you only need to write down the kets for elements that aren’t zero. For example, the 50/50 superposition of and is written using the full vector, and the much easier to read in the ket notation. If it’s not 50/50, we might write since only the (first) and (last) entries in the state vector aren’t zero.
This set of states is called a Hilbert space (named after the mathematician David Hilbert). We are used to dealing with two or three dimensions in our everyday lives, but this Hilbert space is dimensions. This doesn’t mean that our qubits are accessing some fourth or higher spatial dimension, like in a science fiction movie, just that completely describing their behavior requires us to use more elements in our state vector: 8 dials or numbers for three qubits, 16 for four qubits, and so on.
You can think of the set of entries as separate vectors, if you like, but in reality this set forms a single vector of length 1 in the Hilbert space.
This Hilbert space – our ability to use quantum superposition – is the first important factor in the power of quantum computers.
We saw with one qubit that the probability of being in the zero state plus the probability of being in the one state must sum to one. We can write that down as .
The same is true with our multi-qubit states, but the number of states is larger so calculating it is a little bit more complicated. If we have a register with three qubits, there are possible states. If is the probability that we will find the state when we measure the register, then .
We always get something when we measure our register!
This is known as the normalization condition, and it holds for quantum probabilities the same as it does for classical probabilities. The only difference is that calculating the quantum probabilities involves taking the absolute value of the square of the probability amplitude. If our three-qubit state is , then the probability of finding 000 is , the probability of finding 001 is , the probability of finding 010 is , etc., and so .
Measuring multi-qubit states
The multiple dials view of a quantum state can be a little confusing, but it’s a help when thinking about measurement. If we measure all of the qubits in a register, the probability of finding each state is calculated by taking each vector and squaring its length, just as we did for a single qubit.
To measure only one qubit in a multi-qubit state, calculate the probability of each state, and sum up all of the states with zero in the appropriate position to get the probability of finding zero.
But what happens to the state afterwards? Completely measuring a register results in the state completely collapsing, but if we measure part of the register, it may partially collapse. Consider the state . If we measure the whole register, there is a 1/3 probability of finding each of the states 000, 011, and 101.
But if we measure only the qubit on the left, we have a 2/3 probability of finding it is zero, and a 1/3 probability of finding that it is one. Interestingly, if we find 1, then the state of the other two qubits is definitely , but if we find 0, then the other two qubits are still left in the state .
Measuring a qubit also results in the destruction of quantum entanglement for that qubit, a topic we will take up next.
© Keio University