Skip to content

Commit

Permalink
more exercises; terminology consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-at-topos committed Feb 13, 2024
1 parent 92dd722 commit e8e2e44
Show file tree
Hide file tree
Showing 2 changed files with 119 additions and 39 deletions.
14 changes: 7 additions & 7 deletions source/13-decoherence-and-recoherence.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -827,11 +827,11 @@ However, if three errors occur then the errors are not only impossible to correc
So the code that we have described has $n=3$, $k=1$, and $d=3$.

::: {.idea latex=""}
A code that encodes $k$ bits into $n$ bits and has a distance of $d$ is called an **$[n,k,d]$-code**.
The **rate** of an $[n,k,d]$-code is defined to be $R=k/n$.
A code that encodes $k$ bits into $n$ bits and has a distance of $d$ is called an **$[n,k,d]$ code**.
The **rate** of an $[n,k,d]$ code is defined to be $R=k/n$.
:::

In an $[n,k,d]$-code, the encoder divides the message into chunks of $k$ bits and encodes each $k$-bit string into a pre-determined $n$-bit codeword.
In an $[n,k,d]$ code, the encoder divides the message into chunks of $k$ bits and encodes each $k$-bit string into a pre-determined $n$-bit codeword.
There are $2^k$ distinct codewords among all $2^n$ binary strings of length $n$.
The recipient then applies the decoder, which takes chunks of $n$ bits, looks for the nearest codeword (in terms of Hamming distance), and then decodes the $n$-bit string into that $k$-bit codeword.
For example, in our $3$-bit repetition code, we have the two codewords $000$ and $111$, among all eight binary strings of length $3$, as shown in Figure \@ref(fig:313-all-3-bit-strings).
Expand Down Expand Up @@ -995,7 +995,7 @@ $$
$$
We draw the general circuit for bit-flip protection in Figure \@ref(single-bit-flip-complete-circuit), writing out this $U_c$ in full, denoting the error-syndrome measurement by $a,b$.

(ref:single-bit-flip-complete-circuit-caption) The quantised version of the classical $[3,1,3]$-code. If *at most one* bit-flip error occurs in the shaded region (which denotes the part where we transmit over a noisy channel), then this circuit perfectly corrects it, resulting in the successful transmission of the state $\alpha\ket{0}+\beta\ket{1}$.
(ref:single-bit-flip-complete-circuit-caption) The quantised version of the classical $[3,1,3]$ code. If *at most one* bit-flip error occurs in the shaded region (which denotes the part where we transmit over a noisy channel), then this circuit perfectly corrects it, resulting in the successful transmission of the state $\alpha\ket{0}+\beta\ket{1}$.

```{r single-bit-flip-complete-circuit,engine='tikz',engine.opts=list(template="latex/tikz2pdf.tex"),fig.width=8,fig.cap='(ref:single-bit-flip-complete-circuit-caption)'}
\definecolor{primary}{RGB}{177,98,78}
Expand Down Expand Up @@ -1093,12 +1093,12 @@ Note how the $+$ and $-$ results correspond to the binary labels $0$ and $1$, an

<div class="video" title="Three-qubit repetition code for phase-flip errors" data-videoid="az_JPhNpWFo"></div>

We have seen how the classical $[3,1,3]$-code can be adapted to detect and correct for a single quantum bit-flip, but in Section \@ref(digitising-quantum-errors) we said that there are three possible errors that we need to worry about: bit-flips, phase-flips, and bit-and-phase flips.
We have seen how the classical $[3,1,3]$ code can be adapted to detect and correct for a single quantum bit-flip, but in Section \@ref(digitising-quantum-errors) we said that there are three possible errors that we need to worry about: bit-flips, phase-flips, and bit-and-phase flips.
Having dealt with the first, we now deal with the second; finding a way to combine these two solutions to deal with the third is the subject of Section \@ref(the-shor-913-code).

It turns out that we really don't need to do much work in order to solve the problem of single phase-flip errors if we make use of the fact that $HZH=X$, i.e. phase-flips become bit-flips when sandwiched between Hadamards!

(ref:single-phase-flip-complete-circuit-caption) Using the quantised $[3,1,3]$-code to deal with phase-flips by sandwiching the transmission area between Hadamards.
(ref:single-phase-flip-complete-circuit-caption) Using the quantised $[3,1,3]$ code to deal with phase-flips by sandwiching the transmission area between Hadamards.

```{r single-phase-flip-complete-circuit,engine='tikz',engine.opts=list(template="latex/tikz2pdf.tex"),fig.width=8,fig.cap='(ref:single-phase-flip-complete-circuit-caption)'}
\definecolor{primary}{RGB}{177,98,78}
Expand Down Expand Up @@ -1629,7 +1629,7 @@ The subscript $1$ denotes that this is **one-way** distillation, where only Alic

### Composing quantum codes

Consider two quantum codes: $C_1$ is an $[[n_1,1,d_1]]$-code, and $C_2$ is an $[[n_2,1,d_2]]$-code.
Consider two quantum codes: $C_1$ is an $[[n_1,1,d_1]]$ code, and $C_2$ is an $[[n_2,1,d_2]]$ code.
We decide to encode a qubit $\ket{\psi}$ by first encoding it into $n_1$ qubits using $C_1$, and then encoding each of those resulting qubits into $n_2$ qubits using $C_2$.
The overall effect is an encoding into the composite code $C_2C_1$.

Expand Down
Loading

0 comments on commit e8e2e44

Please sign in to comment.