Ron Cohen
21 ביוני 2022
.
This part is continuing the pocket guide for fundamentals that you need to know in order to understand Quantum Error Correction. The most important basic block of QEC is called Stabilizer and is explained at the end of this article.
Let's add more qubits
Once we are looking at more than 1 qubit, things are getting more interesting and complicated. For example, if we are looking at 2 qubits, they can be in a superposition (meaning those states simultaneously) of |00⟩, |01⟩, |10⟩, and |11⟩ (4x1 vector). Each of them, just like in the 1 qubit case, with a probability to happen and collapsing after we measure those 2 qubits together.
Here is an example of what happens to 3 qubits (8x1 vector), that start in |000⟩ states, and change to an equal superposition of all the possible 8 states when H gate is applied to each one of them:
notice that when each one of them is in the |0⟩+|1⟩ state (|0⟩ and |1⟩ at the same time), looking at the big picture of 3 qubits, means that they are all in the 8 combinations at the same time.
The Power of Quantum Computer
At this point, we can see how powerful quantum computer is. How many numbers do we need to save in a classical computer, to store the information about 3 qubits?
8 numbers to describe the information of 3 qubits! And for N qubits, we need 2^N numbers!
So, without knowing anything about quantum algorithms, we can already know that once we find a quantum algorithm solution to some problem, a classical computer will need 2^(The number of qubits that QC will need) numbers to solve it in the same way that we found.
Just to get some feeling, a problem that needs 100 qubits of QC, will need 2^100=1,267,650,600,228,229,401,496,703,205,376 numbers to implement on a classical computer.
2 Qubits Gate
In order to create algorithms, and error correction, in quantum computers, we need operations that create interactions between 2 qubits, and operate on both of them together at the same time. The big power of those operators is that they are acting simultaneously, on all the terms of the superpositions.
You can also think of it as a 4x4 matrix because it is acting on a 4x1 vector (2 qubits), and keeping it as a 4x1 vector (2 qubits).
For example, the CNOT gate is a 2Q gate that is X flipping the 2nd qubit (target qubit) in every term where the 1st qubit (control qubit) is in 1 state. Notice this is happening on each of the terms of the state and keeping the superposition of the state.
Entanglement
Entanglement is a very weird case where you can measure one qubit, and discover the state of another qubit (that was entangled with this qubit earlier) without measuring this other qubit. Think of a 2 qubits state |00⟩+|11⟩, if the first qubit was measured and found as 0, we know for sure that the second one must be measured as 0 too because the probability to |01⟩ in this state is zero (this term does not exist).
CNOT is useful to create such an entanglement:
Start from |00⟩ state
H on the first one, will put it in a superposition of |0⟩+|1⟩, so the whole system is in state |00⟩+|10⟩
Then using CNOT when the first is controlling the second, will force that |00⟩ will stay |00⟩ (the first said 0 - meaning not to flip the second).
And |10⟩ will force the second to flip since the first is 1.
Notice the second evidence of the power of QC. The operator acted on the 2 terms of the superposition at the same time! A classical computer had to save the 2 terms separately, and act with the operator separately one after another.
Eigen States of Operator
In the last article, we saw that one qubit gates operators like X and Z have eigenstates, why not having also eigenstates of 2Q gates? This tool will be very useful in understanding error correction.
For example, the eigenstates of the ZZ operator (Z on the first and on the second qubit) are states that have an even amount of 1s (the eigenvalue will be +1) or states that have an odd amount of 1s (the eigenvalue will be -1). This is because the Z operator is multiplying the state by -1 every time it meets a |1⟩ state.
Eigenstates of XX are demanding an equal superposition of the options. It makes sense since each of the Xs is flipping its qubit:
On the state |++⟩=(|0⟩+|1⟩)(|0⟩+|1⟩)=|00⟩+|01⟩+|10⟩+|11⟩, nothing will change! So it is an eigenstate with eigenvalue +1
On the state |+-⟩=(|0⟩+|1⟩)(|0⟩-|1⟩)=|00⟩-|01⟩+|10⟩-|11⟩, we will get the same up to minus: -|+-⟩! So it is an eigenstate with eigenvalue -1.
Try by yourself also the 2 other eigenstates |-+⟩ and |--⟩.
Stabilizer
The last and most important building block of Quantum Error Correction is the Stabilizer. What the stabilizer is doing, is :
Taking as input any general quantum state.
Collapsing this state to a chosen eigenstate of an operator that we choose.
Tells us if the collapsing happened to the -1 eigenstate or to the +1 eigenstate.
Let's see an example of a stabilizer that is collapsing the general 4 qubits state, to an eigenstate of the ZZZZ operator (Z on each of the 4 qubits). From the last example, we know that the 2 possible eigenstates are those with an even number of 1s (with +1 eigenvalue) or those with an odd number of 1s (with -1 eigenvalue):
Notice that in each of the terms of the state which might be in a superposition of 2^4=16 possible states (|0000⟩,...,|1111⟩):
Term with an odd amount of 1s - in |abcd⟩, will cause the state of the first (black dot) qubit which is initialized to |0⟩, to be flipped odd times, which will result in being |1⟩.
Term with an even amount of 1s - in |abcd⟩, will cause the state of the first qubit which is initialized to |0⟩, to be flipped even times, which will result in being |0⟩.
Once we measure the first qubit since the measurement must give a result of 0 or 1, in some probability, one of these 2 cases will happen:
A measurement result of 1 - All the terms with the even times of 1s in |abcd⟩ will vanish, which will leave us only with terms with an odd amount of 1s.
A measurement result of 0 - All the terms with the odd times of 1s in |abcd⟩ will vanish, which will leave us only with terms with an even amount of 1s.
Spoiler - this vanishing of terms will help us to remove errors!
This process is demonstrated here in a case of 2 qubits (instead of 4, for simplicity) where our state is represented by qubits a and b and the ancilla qubits (the one that helps us to measure the parity) called M:
The same process can be done using XXXX stabilizer, which is collapsing to states with an odd/even number of |-⟩ state. Try it by yourself:
Eigenstates of XXXX also mean that if we will try to apply XXXX on the state (flip each of the 4 qubits) the state will remain unchanged! (up to -1 multiply in the case of -1 eigenvalue). So a state like |0011⟩+|1100⟩ will remain the same after applying XXXX:
Great, we now have a pocket guide of all theory we need to know to finally learn how quantum error correction is done!
Please vote:
💡 If you learned anything new
🤔If it was all a piece of cake for you, but you still want to learn more about QEC
👍If you are professional ducks, that liked the explanation
Stay tuned...
References
"Surface codes: Towards practical large-scale quantum computation" arXiv:1208.0928 [quant-ph]