{"id":4120,"date":"2024-09-22T14:47:27","date_gmt":"2024-09-22T14:47:27","guid":{"rendered":"https:\/\/workhouse.sweetdishy.com\/?p=4120"},"modified":"2024-09-22T14:47:29","modified_gmt":"2024-09-22T14:47:29","slug":"qubit-repetition-code-for-bit-flips","status":"publish","type":"post","link":"https:\/\/workhouse.sweetdishy.com\/index.php\/2024\/09\/22\/qubit-repetition-code-for-bit-flips\/","title":{"rendered":"Qubit Repetition Code for Bit Flips"},"content":{"rendered":"\n<p>Classically, the repetition code is the simplest way of introducing redun-<\/p>\n\n\n\n<p>dancy to protect information. Assume that noise in the channel is modelled<\/p>\n\n\n\n<p>as a bit \ufb02ip with probability p (and hence 1 \u2212 p for not \ufb02ipping). This is<\/p>\n\n\n\n<p>schematised in Figure 10.2. This is known as the binary symmetric channel.<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>1\u2212p<\/p>\n\n\n\n<p>\/\/<\/p>\n\n\n\n<p>p<\/p>\n\n\n\n<p>&#8221;<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>1\u2212p<\/p>\n\n\n\n<p>\/\/<\/p>\n\n\n\n<p>p<\/p>\n\n\n\n<p>77<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>FIGURE 10.2: Binary symmetric channel for bit \ufb02ips.<\/p>\n\n\n\n<p>To protect against errors, each logical bit, indicated by the tilde, is encoded<\/p>\n\n\n\n<p>using three identical physical bits.<\/p>\n\n\n\n<p>0 \u2192<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>0 = 000, 1 \u2192<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>1 = 111. (10.1)<\/p>\n\n\n\n<p>If p is su\ufb03ciently small, then the majority value decides what the original bit<\/p>\n\n\n\n<p>was. The total probability of error is the sum of probability that 2 bits \ufb02ipped<\/p>\n\n\n\n<p>and that 3 bits \ufb02ipped which is 3p<\/p>\n\n\n\n<p>(<\/p>\n\n\n\n<p>1 \u2212p) + p<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>= 3p<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\u22122p<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>. If p &lt; 1\/2, this is<\/p>\n\n\n\n<p>much smaller than the probability of error without encoding, which is p.<\/p>\n\n\n\n<p>Now suppose we have a quantum channel that was susceptible to only<\/p>\n\n\n\n<p>qubit \ufb02ips. We can model such a channel by X acting with probability p on<\/p>\n\n\n\n<p>a state passing through the channel. The quantum equivalent of the 3-bit<\/p>\n\n\n\n<p>repetition code represents each basis state by 3 identical qubits in the same<\/p>\n\n\n\n<p>basis state:<\/p>\n\n\n\n<p>|0i \u2192 |<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>0i = |000i; |1i \u2192 |<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>1i = |111i (10.2)<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9781482238129\/files\/bge0.png\" width=\"222\" height=\"873\"><\/p>\n\n\n\n<p>Quantum Error Correction 199<\/p>\n\n\n\n<p>so that an arbitrary state is encoded as<\/p>\n\n\n\n<p>|\u03c8i = \u03b1|0i + \u03b2|1i \u2212\u2192 |<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i = \u03b1|000i + \u03b2|111i. (10.3)<\/p>\n\n\n\n<p>This encoding process is easily achieved by the circuit of Figure 10.3.<\/p>\n\n\n\n<p>|\u03c8i<\/p>\n\n\n\n<p>\u2022 \u2022<\/p>\n\n\n\n<p>|0i<\/p>\n\n\n\n<p>|<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i<\/p>\n\n\n\n<p>|0i<\/p>\n\n\n\n<p>\uf8fc<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8fd<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8fe<\/p>\n\n\n\n<p>FIGURE 10.3: Encoding circuit for the 3-qubit bit-\ufb02ip code.<\/p>\n\n\n\n<p>This does not make three copies of the original state, however, and neither<\/p>\n\n\n\n<p>can we try to measure the state after it passes through the noise to check how<\/p>\n\n\n\n<p>it has changed, as that would destroy the superposition. If we assume that<\/p>\n\n\n\n<p>the channel is capable of \ufb02ipping only one qubit, then the codeword state |<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i<\/p>\n\n\n\n<p>could have changed into four possible output states:<\/p>\n\n\n\n<p>S<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>: |<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i \u2192 |\u03c8<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>i = |<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i = \u03b1|000i + \u03b2|111i (10.4a)<\/p>\n\n\n\n<p>S<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>: |<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i \u2192 |\u03c8<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>i = X<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>|<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i = \u03b1|001i + \u03b2|110i (10.4b)<\/p>\n\n\n\n<p>S<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>: |<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i \u2192 |\u03c8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>i = X<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>|<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i = \u03b1|010i + \u03b2|101i (10.4c)<\/p>\n\n\n\n<p>S<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>: |<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i \u2192 |\u03c8<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>i = X<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>|<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i = \u03b1|100i + \u03b2|011i (10.4d)<\/p>\n\n\n\n<p>These states are known as syndromes, since we can diagnose the a\ufb04iction due<\/p>\n\n\n\n<p>to noise by detecting which one occurred! But how do we detect the syndrome<\/p>\n\n\n\n<p>without measuring or copying? The way out is to use ancillary qubits, with<\/p>\n\n\n\n<p>controlled gates acting on them and to measure the ancillaries. We have to<\/p>\n\n\n\n<p>ensure that we do not get any information about the original state by this<\/p>\n\n\n\n<p>measurement, but still detect the syndrome. Note that the four syndrome<\/p>\n\n\n\n<p>states are all mutually orthogonal. Therefore it is possible to distinguish them<\/p>\n\n\n\n<p>by measuring a 2-qubit ancilla. Consider the circuit in Figure 10.4. Each qubit<\/p>\n\n\n\n<p>of the input state is indicated by its label.<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>\u2022<\/p>\n\n\n\n<p>|<\/p>\n\n\n\n<p>\u00af<\/p>\n\n\n\n<p>\u03c8i<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>\u2022 \u2022<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>\u2022<\/p>\n\n\n\n<p>|0i<\/p>\n\n\n\n<p>x<\/p>\n\n\n\n<p>|0i<\/p>\n\n\n\n<p>y<\/p>\n\n\n\n<p>\uf8f1<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f2<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f3<\/p>\n\n\n\n<p>FIGURE 10.4: Syndrome measurement for the 3-qubit bit-\ufb02ip code<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"https:\/\/learning.oreilly.com\/api\/v2\/epubs\/urn:orm:book:9781482238129\/files\/bge1.png\" width=\"282\" height=\"910\"><\/p>\n\n\n\n<p>200 Introduction to Quantum Physics and Information Processing<\/p>\n\n\n\n<p>TABLE 10.1: Syndrome measurement: outcomes.<\/p>\n\n\n\n<p>Syndrome xy<\/p>\n\n\n\n<p>|\u03c8<\/p>\n\n\n\n<p>0<\/p>\n\n\n\n<p>i 00<\/p>\n\n\n\n<p>|\u03c8<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>i 01<\/p>\n\n\n\n<p>|\u03c8<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>i 11<\/p>\n\n\n\n<p>|\u03c8<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>i 10<\/p>\n\n\n\n<p>You can verify that the measured 2-bit number xy give you the syndrome<\/p>\n\n\n\n<p>as in Table 10.1.<\/p>\n\n\n\n<p>The information contained in the input state |<\/p>\n\n\n\n<p>\u02dc<\/p>\n\n\n\n<p>\u03c8i is not revealed by the<\/p>\n\n\n\n<p>measurements. It is easy to see that for each syndrome |\u03c8<\/p>\n\n\n\n<p>i<\/p>\n\n\n\n<p>i, the error can be<\/p>\n\n\n\n<p>corrected by applying X on the i<\/p>\n\n\n\n<p>th<\/p>\n\n\n\n<p>qubit. This action can be linked to the xy<\/p>\n\n\n\n<p>values, which control the action of X on the corresponding qubit: X<\/p>\n\n\n\n<p>x\u00afy<\/p>\n\n\n\n<p>on the<\/p>\n\n\n\n<p>\ufb01rst qubit, X<\/p>\n\n\n\n<p>xy<\/p>\n\n\n\n<p>on the second, and X<\/p>\n\n\n\n<p>\u00afxy<\/p>\n\n\n\n<p>on the last qubit of the codeword.<\/p>\n\n\n\n<p>The nice thing about expressing it as this controlled action is that the<\/p>\n\n\n\n<p>process can be automated, bypassing the need for measurement, by applying<\/p>\n\n\n\n<p>suitable controlled gates as in Figure 10.5.<\/p>\n\n\n\n<p>3<\/p>\n\n\n\n<p>SM<\/p>\n\n\n\n<p>|<\/p>\n\n\n\n<p>\u00af<\/p>\n\n\n\n<p>\u03c8i<\/p>\n\n\n\n<p>2<\/p>\n\n\n\n<p>1<\/p>\n\n\n\n<p>|0i<\/p>\n\n\n\n<p>\u2022 \u2022<\/p>\n\n\n\n<p>|0i<\/p>\n\n\n\n<p>\u2022 \u2022<\/p>\n\n\n\n<p>\uf8f1<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f2<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f4<\/p>\n\n\n\n<p>\uf8f3<\/p>\n\n\n\n<p>FIGURE 10.5: Error detection and correction for 3-qubit bit-\ufb02ip code. Here<\/p>\n\n\n\n<p>SM is the syndrome measurement circuit<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Classically, the repetition code is the simplest way of introducing redun- dancy to protect information. Assume that noise in the channel is modelled as a bit \ufb02ip with probability p (and hence 1 \u2212 p for not \ufb02ipping). This is schematised in Figure 10.2. This is known as the binary symmetric channel. 0 1\u2212p \/\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4044,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[499],"tags":[],"class_list":["post-4120","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-quantum-error-correction"],"jetpack_featured_media_url":"https:\/\/workhouse.sweetdishy.com\/wp-content\/uploads\/2024\/09\/error-state.png","_links":{"self":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/comments?post=4120"}],"version-history":[{"count":1,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4120\/revisions"}],"predecessor-version":[{"id":4121,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/posts\/4120\/revisions\/4121"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media\/4044"}],"wp:attachment":[{"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/media?parent=4120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/categories?post=4120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/workhouse.sweetdishy.com\/index.php\/wp-json\/wp\/v2\/tags?post=4120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}