From 16555851b6514a736c5c9d8e73de7da7fc9b6288 Mon Sep 17 00:00:00 2001 From: Prefetch Date: Thu, 20 Oct 2022 18:25:31 +0200 Subject: Migrate from 'jekyll-katex' to 'kramdown-math-sskatex' --- source/know/concept/repetition-code/index.md | 88 ++++++++++++++-------------- 1 file changed, 44 insertions(+), 44 deletions(-) (limited to 'source/know/concept/repetition-code/index.md') diff --git a/source/know/concept/repetition-code/index.md b/source/know/concept/repetition-code/index.md index 31181bb..99ac630 100644 --- a/source/know/concept/repetition-code/index.md +++ b/source/know/concept/repetition-code/index.md @@ -8,7 +8,7 @@ layout: "concept" --- A **repetition code** is a simple approach to error correction: -to protect a bit $x$, make two copies: +to protect a bit $$x$$, make two copies: $$\begin{aligned} 0 \to 000 @@ -16,7 +16,7 @@ $$\begin{aligned} 1 \to 111 \end{aligned}$$ -If a single-bit error occurs, e.g. $000 \to 100$, +If a single-bit error occurs, e.g. $$000 \to 100$$, a majority vote resets the minority bit. Clearly, this does not protect against multi-bit errors, but that is usually not necessary. @@ -30,7 +30,7 @@ as discussed below. ## Bit flip code Suppose that we want to detect errors in -the following arbitrary qubit state $\Ket{\psi}$: +the following arbitrary qubit state $$\Ket{\psi}$$: $$\begin{aligned} \Ket{\psi} @@ -38,7 +38,7 @@ $$\begin{aligned} \end{aligned}$$ For now, let us limit ourselves to detecting **bit flips**, -where $\alpha$ and $\beta$ get switched: +where $$\alpha$$ and $$\beta$$ get switched: $$\begin{aligned} \alpha \Ket{0} + \beta \Ket{1} @@ -56,7 +56,7 @@ $$\begin{aligned} = \alpha \Ket{000} + \beta \Ket{111} \end{aligned}$$ -In other words, a *logical* $\Ket{0}$ (written $\ket{\overline{0}}$) +In other words, a *logical* $$\Ket{0}$$ (written $$\ket{\overline{0}}$$) is represented by 3 *physical* qubits, and vice versa: $$\begin{aligned} @@ -80,7 +80,7 @@ of [quantum gates](/know/concept/quantum-gate/): -So, a little while after encoding the state $\Ket{\psi}$ like that, +So, a little while after encoding the state $$\Ket{\psi}$$ like that, a bit flip occurs on the 2nd qubit: $$\begin{aligned} @@ -94,8 +94,8 @@ We could measure the state, but that would make it collapse, which is probably not what we want. The trick is to use operators called **stabilizers**, -in this case for example $ZZI = Z_1 \otimes Z_2 \otimes I_3$, -where $I$ is identity and $Z$ is the Pauli-$Z$ gate. +in this case for example $$ZZI = Z_1 \otimes Z_2 \otimes I_3$$, +where $$I$$ is identity and $$Z$$ is the Pauli-$$Z$$ gate. The 3-qubit basis states are its eigenvectors: $$\begin{alignedat}{2} @@ -124,13 +124,13 @@ $$\begin{alignedat}{2} &&= + \Ket{111} \end{alignedat}$$ -We could measure $ZZI$ for $\ket{\overline{\psi}}$, -and if the eigenvalue is $-1$, +We could measure $$ZZI$$ for $$\ket{\overline{\psi}}$$, +and if the eigenvalue is $$-1$$, we know that a bit flip has occurred, -whereas if the eigenvalue is $+1$, -there is *maybe* no error ($\Ket{001}$ and $\Ket{110}$ are false negatives). +whereas if the eigenvalue is $$+1$$, +there is *maybe* no error ($$\Ket{001}$$ and $$\Ket{110}$$ are false negatives). -These false negatives are fixed by including another stabilizer $IZZ$, +These false negatives are fixed by including another stabilizer $$IZZ$$, with these eigenvectors: $$\begin{alignedat}{2} @@ -159,56 +159,56 @@ $$\begin{alignedat}{2} &&= + \Ket{111} \end{alignedat}$$ -In which case $\Ket{100}$ and $\Ket{011}$ are false negatives. -In other words, $IZZ$ cannot detect if the 1st qubit was flipped, -while $ZZI$ cannot protect the 3rd qubit. +In which case $$\Ket{100}$$ and $$\Ket{011}$$ are false negatives. +In other words, $$IZZ$$ cannot detect if the 1st qubit was flipped, +while $$ZZI$$ cannot protect the 3rd qubit. But by using both, we know exactly which qubit was flipped thanks to the eigenvalues: - - + + - - - + + + - - - + + + - - - + + + - - - + + +
Error$ZZI$$IZZ$$$ZZI$$$$IZZ$$
$I$$+1$$+1$$$I$$$$+1$$$$+1$$
$X_1$$-1$$+1$$$X_1$$$$-1$$$$+1$$
$X_2$$-1$$-1$$$X_2$$$$-1$$$$-1$$
$X_1$$+1$$-1$$$X_1$$$$+1$$$$-1$$
-Where e.g. $X_3$ denotes that the 3rd qubit was flipped. +Where e.g. $$X_3$$ denotes that the 3rd qubit was flipped. The measurement outcomes on the last three rows are called **error syndromes**, and are obtained by a **syndrome measurement**. -Fortunately, we can measure $ZZI$ and $IZZ$ -without affecting $\ket{\overline{\psi}}$ itself, -by applying $\mathrm{CNOT}$s to some ancillary qubits +Fortunately, we can measure $$ZZI$$ and $$IZZ$$ +without affecting $$\ket{\overline{\psi}}$$ itself, +by applying $$\mathrm{CNOT}$$s to some ancillary qubits and then measuring those: -The two measurements, respectively representing $ZZI$ and $IZZ$, -yield $\Ket{1}$ if a bit flip definitely occurred, -and $\Ket{0}$ otherwise. +The two measurements, respectively representing $$ZZI$$ and $$IZZ$$, +yield $$\Ket{1}$$ if a bit flip definitely occurred, +and $$\Ket{0}$$ otherwise. There is no entanglement, so the input is untouched. @@ -228,7 +228,7 @@ $$\begin{aligned} How to detect that? If we want to protect against phase flips *instead of* bit flips, we can simply do the same as before, -but along the $X$-axis intead of the $Z$-axis: +but along the $$X$$-axis intead of the $$Z$$-axis: $$\begin{aligned} \boxed{ @@ -244,7 +244,7 @@ $$\begin{aligned} } \end{aligned}$$ -Such that an arbitrary state $\Ket{\psi}$ is encoded as follows, +Such that an arbitrary state $$\Ket{\psi}$$ is encoded as follows, by the circuit shown below: $$\begin{aligned} @@ -258,9 +258,9 @@ $$\begin{aligned} -A phase flip along the $Z$-axis -corresponds to a bit flip along the $X$-axis $\Ket{+} \to \Ket{-}$. -In this case, the stabilizers are $XXI$ and $IXX$, +A phase flip along the $$Z$$-axis +corresponds to a bit flip along the $$X$$-axis $$\Ket{+} \to \Ket{-}$$. +In this case, the stabilizers are $$XXI$$ and $$IXX$$, and the error detection circuit is as follows: @@ -314,7 +314,7 @@ followed by 3 copies of the bit flip encoder: We thus use 9 physical qubits to store 1 logical qubit. Fortunately, more efficient schemes exist. -The bit flip stabilizers $ZZI$ and $IZZ$ +The bit flip stabilizers $$ZZI$$ and $$IZZ$$ are applied on a per-block basis, like so: $$\begin{aligned} @@ -323,7 +323,7 @@ $$\begin{aligned} IZZ \: III \: III \qquad\quad III \: IZZ \: III \qquad\quad III \: III \: IZZ \end{aligned}$$ -Whereas the phase flip stabilizers $XXI$ and $IXX$ +Whereas the phase flip stabilizers $$XXI$$ and $$IXX$$ are applied to entire blocks at once: $$\begin{aligned} -- cgit v1.2.3