Abstract¶
The bit-flip and phase-flip quantum repetition codes.
The Quantum Repetition Code comes in two flavours, one protects against bit-flip errors and the other protects against phase-flip errors. As with the classical repetition code, the code works increasing the size of the Hilbert space, allowing logical qubits to be encoded in multiple physical qubits.
The 2-Qubit Bit-flip Repetition Code¶
This code encodes one logical qubit in two physical qubits and is able to detect a single bit-flip error.
The code-words of the code are
such that an arbitrary qubit can be encoded as
The part of the expanded Hilbert space in which the logical information is encoded is called the code space, given here by
The aim of the code is to detect if an error on the physical qubits have caused the state to leave the code space without disturbing the encoded information.
Consider measuring the following operator on the state,
where in the final line has been written in its eigenbasis, namely the Bell basis 💭.
Firstly, it can be seen that measuring on any state supported only within always gives a measurement outcome of and returns the state unchanged,
Consider now that an -error occurs on the first qubit,
where the notation has been used. A measurement of on this state would give an outcome of . Likewise, if an -error occurs on the second qubit,
a measurement of would also give an outcome of . If, instead, an -error occurs on both qubits,
then a measurement of would give an outcome of .
The outcome of measuring can therefore be used as a syndrome. If a single error occurs, then a measurement of is enough to detect that an error has occurred. Although, it is not enough to know if that error occurred on the first or the second qubit as both of these errors lead to the same measurement outcome. Therefore, the error cannot be corrected, only detected, as its location is not known. If, on the other hand, an -error has occurred on both qubits, a measurement of is not enough to determine if an error has occurred. This is a result of the qubit remaining in under an error and therefore leading to a measurement result of . This situation is therefore indistinguishable from no error having occurred.
In addition to not being able to detect a error, the 2-qubit bit-flip repetition code is also unable to protect against phase errors -errors. For example, consider the error
A measurement of would give an outcome of as this state remains in . Hence, a error is also indistinguishable from no error having occurred and hence cannot be detected using . The same if true of a error.
The 2-qubit bit-flip repetition code is therefore only useful for detecting errors in the set . In summary, and using the notation (with the eigenvalue +1 mapped to 0 and the eigenvalue -1 mapped to 1), the errors and corresponding syndromes of the code are
Code Distance¶
To find the code distance of the 2-qubit bit-flip repetition code, one must find the minimum number of physical qubits upon which an error must act in order to change one logical code word to another. When considering -errors above, this looks to be 2 as
However, quantum systems are also susceptible to -errors. To see the effect of these, consider now the logical basis of the operator,
Any logical qubit can be written in this basis, with and now being the code words. However, a single -error can move one between these code words
Hence, the code distance is 1, not 2.
Alternatively, the distance of a code is the minimum number of errors that will go undetected. Therefore, from above, one can see that the code distance is 1 as a single error went undetected due to it not mapping the state outside of .
The 3-Qubit Bit-flip Repetition Code¶
The 3-qubit bit-flip repetition code functions very similarly to the 2-qubit version, however, with one logical qubit instead encoded into three physical qubits. As a result, the 3-qubit bit-flip repetition code is able to correct one bit-flip error and detect up to two bit-flip errors.
The code-words of the code are
such that an arbitrary qubit can be encoded as
with code space then
The following operators are then measured,
where the operators on the and qubits respectively are as above in the 2-qubit bit-flip repetition code.
Once again, a measurement of either or on any state supported only within always gives a measurement outcome of and returns the state unchanged,
Label the measurement outcome of as and as , such that the syndrome is . The following error/syndrome relationship can then be shown
Therefore, if only a single qubit bit-flip occurs, a measurement of these operators is enough to not only detected that an error has occurred, but also uniquely identify where it occurred such that it can be corrected. To correct the error, one just applies on the qubit in which they identified the error occurred.
If one also considers the possibility of 2 qubit -errors also occurring then the syndromes become non-unique,
If a three qubit -error occurs, the state remains in , giving
which is indistinguishable from no error having occurred.
The 3-qubit bit-flip repetition code is therefore able to correct errors in the set , it is able to detect errors in the set