The 9-qubit Shor code
このページはまだ翻訳されていません。英語の原文を表示しています。
Now we turn to the 9-qubit Shor code, which is a quantum error correcting code obtained by combining together the two codes considered in the previous section: the 3-bit repetition code for qubits, which allows for the correction of a single bit-flip error, and the modified version of that code, which allows for the correction of a single phase-flip error.
Code description
The 9-qubit Shor code is the code we obtain by concatenating the two codes from the previous section. This means that we first apply one encoding, which encodes one qubit into three, and then we apply the other encoding to each of the three qubits used for the first encoding, resulting in nine qubits in total.
To be more precise, while we could apply the two codes in either order in this particular case, we'll make the choice to first apply the modified version of the 3-bit repetition code (which detects phase-flip errors), and then we'll encode each of the resulting three qubits independently using the original 3-bit repetition code (which detects bit-flip errors). Here is a circuit diagram representation of this encoding.
As the figure suggests, we'll think about the nine qubits of the Shor code as being grouped into three blocks of three qubits, where each block is obtained from the second encoding step (which is the ordinary 3-bit repetition code). The ordinary 3-bit repetition code, which here is applied three times independently, is called the inner code in this context, whereas the outer code is the code used for the first encoding step, which is the modified version of the 3-bit repetition code that detects phase-flip errors.
We can alternatively specify the code by describing how the two standard basis states for our original qubit get encoded.
Once we know this, we can determine by linearity how an arbitrary qubit state vector is encoded.
Correcting bit-flip and phase-flip errors
Errors and CNOT gates
To analyze how and errors affect encodings of qubits, both for the 9-qubit Shor code as well as other codes, it will be helpful to observe a few simple relationships between these errors and CNOT gates. As we begin to analyze the 9-qubit Shor code, this is a reasonable moment to pause to do this.
The following circuit diagrams illustrate three basic relationships among gates and CNOT gates. Specifically, applying an gate to the target qubit prior to a CNOT is equivalent to swapping the order and performing the CNOT first, but applying an gate to the control qubit prior to a CNOT is equivalent to applying gates to both qubits after the CNOT. Finally, applying gates to both qubits prior to a CNOT is equivalent to applying the CNOT first and then applying an gate to the control qubit. These relationships can be verified by performing the required matrix multiplications or computing the effect of the circuits on standard basis states.
The situation is similar for gates, except that the roles of the control and target qubits switch. In particular, we have the three relationships depicted by the following quantum circuits.
Correcting bit-flip errors
Now we'll consider how errors can be detected and corrected using the 9-qubit Shor code, starting with bit-flip errors — which we'll generally refer to as errors hereafter for the sake of brevity.
To detect and correct errors, we can simply treat each of the three blocks in the encoding separately. Each block is an encoding of a qubit using the 3-bit repetition code, which protects against errors — so by performing the syndrome measurements and error corrections described previously to each block, we can detect and correct up to one error per block. In particular, if there is at most one error on the nine qubits of the encoding, this error will be detected and corrected by this procedure.
In short, correcting bit-flip errors is a simple matter for this code, due to the fact that the inner code corrects bit-flip errors.
Correcting phase-flip errors
Next we'll consider phase-flip errors, or errors for brevity. This time it's not quite as clear what we should do because the outer code is the one that detects errors, but the inner code seems to be somehow "in the way," making the detection and correction of these errors slightly more difficult.
Suppose that a error occurs on one of the 9 qubits of the Shor code, such as the one indicated in this diagram.
We've already observed what happens when a error occurs when we're using the 3-bit repetition code — it's equivalent to a error occurring prior to encoding. In the context of the 9-qubit Shor code, this means that a error on any one of the three qubits within a block always has the same effect, which is equivalent to a error occurring on the corresponding qubit prior to the inner code being applied.
For example, the circuit diagram above is equivalent to the following diagram. This can be reasoned using the relationships between and CNOT gates described above, or by simply evaluating the circuits on an arbitrary qubit state
This suggests one option for detecting and correcting errors, which is to decode the inner code, leaving us with the three qubits used for the outer encoding along with six initialized workspace qubits. We can then check these three qubits of the outer code for errors, and then finally we can re-encode using the inner code, to bring us back to the 9-qubit encoding we get from the Shor code. If we do detect a error, we can either correct it prior to re-encoding with the inner code, or we can correct it after re-encoding, by applying a gate to any of the qubits in that block.
Here's a circuit diagram that includes the encoding circuit and the error suggested above together with the steps just described (but not the actual correction step).
In this particular example, the syndrome measurement is which locates the error as having occurred on one of the qubits in the middle block.
One advantage of correcting errors after the re-encoding step rather than before is that we can simplify the circuit above. The following circuit is equivalent, but requires four fewer CNOT gates.
Once again, the syndrome doesn't indicate which qubit has been affected by a error, but rather which block has experienced a error, with the effect being the same regardless of which qubit within the block was affected. We can then correct the error by applying a gate to any of the three qubits of whichever block was affected.
As an aside, here we see an example of degeneracy in a quantum error-correcting code, where we're able to correct certain errors ( errors in this case) without being able to identify them uniquely.
Simultaneous bit- and phase-flip errors
We've now seen how both and errors can be detected and corrected using the 9-qubit Shor code, and in particular how at most one error or at most one error can be detected and corrected. Now let's suppose that both a bit-flip and a phase-flip error occur, possibly on the same qubit. As it turns out, nothing different needs to be done in this situation from what has already been discussed — the code is able to detect and correct up to one error and one error simultaneously, without further modification.
To be more specific, errors are detected by applying the ordinary 3-bit repetition code syndrome measurement, which is performed separately on each of the three blocks of three qubits; and errors are detected through the procedure described just above, which is equivalent to decoding the inner code, performing the syndrome measurement for the modified 3-bit repetition code for phase-flips, and then re-encoding. These two error detection steps — as well as the corresponding corrections — can be performed completely independently of one another, and in fact it doesn't matter in which order they're performed.
To see why this is, consider the example depicted in the following circuit diagram, where both an and a error have affected the bottom qubit of the middle block.
Let's first observe that the ordering of the errors doesn't matter, in the sense that reversing the position of the and errors yields an equivalent circuit. To be clear, and do not commute, they anti-commute: