{ "cells": [ { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "pmm5uV8cQQN6" }, "source": [ "# Exercise 4" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 1. Shor Code\n", "\n", "The Shor (or 9 Qubit) code is a method for quantum error correction based on the classical repetition code. Here we will consider the version where a logical qubit is first stored in three physical qubits using the encoding\n", "$$\n", "|+\\rangle_3 = |+++\\rangle, \\,\\,\\, |-\\rangle_3 = |---\\rangle.\n", "$$\n", "This protects against errors that try to flip $|+\\rangle_3$ to $|-\\rangle_3$, and vice-versa. But the corresponding errors for the $Z$ basis states\n", "\n", "\n", "$$\n", "|0\\rangle_3 = \\frac{1}{\\sqrt{2}} (|+++\\rangle+|---\\rangle), \\,\\,\\, |1\\rangle_3 = \\frac{1}{\\sqrt{2}} (|+++\\rangle-|---\\rangle)\n", "$$\n", "\n", "become more likely. To deal with this we take three of these logical qubits and use them (like the original physical qubits) to encode a single logical qubit. This uses the encoding:\n", "\n", "$$\n", "|0\\rangle_9 = |0\\rangle_3 \\otimes |0\\rangle_3 \\otimes |0\\rangle_3, \\,\\,\\, |1\\rangle_9 = |1\\rangle_3 \\otimes |1\\rangle_3 \\otimes |1\\rangle_3.\n", "$$\n", "\n", "The end result is then a code that stores one logical qubit in 9 physical qubits, with stabilizer states\n", "\n", "$$\n", "|0\\rangle_9 = \\left\\lbrack \\frac{1}{\\sqrt{2}} \\left(|+++\\rangle +|---\\rangle \\right) \\right\\rbrack^{\\otimes 3}, \\,\\,\\, |1\\rangle_9 = \\left\\lbrack\\frac{1}{\\sqrt{2}}\\left(|+++\\rangle-|---\\rangle\\right) \\right\\rbrack^{\\otimes 3}\n", "$$\n", "\n", "a) Find operators that act as $X$ and $Z$ on the logical qubit. What are the minimal number of qubits these act on?\n", "\n", "b) Suppose $\\sigma_x$ errors occur independently on each qubit with probability $p_x$. What is the probability $P_x$ that a logical $X$ occurs after syndrome measurement and error correction? For simplicity you can determine this only up to lowest order in $p_x$.\n", "\n", "c) Similarly, what is the probability $P_z$ of $Z$ errors, given that $\\sigma_z$ errors occur with probability $p_z$? For simplicity you can determine this only up to lowest order in $p_z$." ] }, { "cell_type": "markdown", "metadata": { "colab_type": "text", "id": "CJyxxSDUQQN9" }, "source": [ "## 2. Concatenated Shor Code\n", "\n", "In order to increase the performance of a code we can use the concept of concatenation. We will now consider this process for the Shor code.\n", "\n", "Let us describe physical qubits as level-0 qubits, and suppose we have $n$ of them. We can use these to encode $n/9$ logical qubits, which we call level-1 qubits. These will have lower probabilities for noise than the level-0 qubits, but maybe not as low as we require. We can then use the level-1 qubits as if they were physical qubits, using them to encode $n/9^2$ level-2 qubits. This procedure can then be continued as many times as required, with the level-$(l-1)$ qubits always used as the physical qubits of the Shor codes that encode the level-$l$ qubits.\n", "\n", "a) In order to encode a single level-$l$ qubit, for arbitrary $l$, what is the number $n(l)$ of level-0 qubits required?\n", "\n", "b) The standard Shor code has distance $d=3$. What is the distance of a level-$l$ concatenated Shor code?\n", "\n", "c) We will use $p_x^{(l)}$ to denote the bit flip error probility at level-$l$. The level-0 error rate is that of the phyical qubit errors: $p_x^{(0)}=p_x$. The level-1 error rate is that of the logical qubits of the 9 qubit code: $p_x^{(1)}=P_x$. Use your result from question 1(b) to show that $p_x^{(l-1)}$ and $p_x^{(l)}$ are related by\n", "$$\n", "p_x^{(l)} < 27 \\left( p_x^{(l-1)} \\right)^2.\n", "$$\n", "\n", "d) Show that $p_x^{(l)}$ decays exponentially with $n(l)^\\beta$ when $p_x < 1/27$, and find $\\beta$.\n", "\n", "This is a proof of the `threshold theorem' for this code and error model. As long as the physical noise rate $p_x$ is below the threshold value of $1/27$ ( and $p_z$ is below its threshold of $1/9$), concatenation of the Shor code can achieve arbitrarily low error rates.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 3. The Toric Code\n", "\n", "The surface code is defined on a plane with rough and smooth boundary conditions.\n", "But we could instead wrap the $L \\times L$ square lattice around a torus and have periodic\n", "boundary conditions. Then the code would be translationally invariant, and all $A_s$\n", "and $B_p$ stabilizers would be four qubit operators.\n", "\n", "* (a) The parameter $L$ counts the number of plaquettes along each direction. Show that\n", "$n = 2L^2$, where $n$ is the number of qubits.\n", "* (b) Show that the number of plaquette operators is $L^2$, but that the number of independent plaquette operators is $L^2-1$. Show the same thing for the vertex operators.\n", "* (c) How many logical qubits, $k$, can be stored in the stabilizer space?\n", "* (d) Define logical $X$ and $Z$ operators for these logical qubits. Note that these are not\n", "uniquely defined. However, as with any stabilizer code, you will know that your logical\n", "operators are a valid choice if they satisfy the following conditions.\n", " 1. Logical Pauli operators must commute with all stabilizers.\n", " 2. Logical Pauli operators for the same logical qubit anticommute: $\\left[ X_j, Z_j \\right] = 0$.\n", " 3. Logical Pauli operators for different logical qubits commute: $\\{ X_j, Z_j \\} = 0$." ] } ], "metadata": { "colab": { "collapsed_sections": [], "name": "Exercise_4.ipynb", "provenance": [], "version": "0.3.2" }, "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.4" } }, "nbformat": 4, "nbformat_minor": 1 }