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')
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$$ |