{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Entanglement Distillation -- BBPSSW Protocol\n", "\n", "\n", " Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Overview\n", "\n", "Quantum entanglement plays a vital role in quantum communication, quantum computing, and many other quantum technologies. Therefore, detecting, transmitting, and distributing quantum entanglement reliably are essential tasks if we want to build real applications in those fields. However, errors are inevitable in the real world. They could come from imperfect equipment when we create entanglement (preparation errors), or the quantum channel used to transmit entanglement is noisy, and we gradually lose the degree of entanglement as the transmission distance increases. The aim of entanglement distillation is to compensate for those losses and restore a **maximally entangled state** at the cost of many noisy entangled states. In this sense, one could also refer entanglement distillation as a purification/error-correction protocol. This process often involves two remote parties Alice and Bob such that only Local Operations and Classical Communication (LOCC) are allowed [1]. The concept of entanglement distillation was first introduced by Bennett et al. [2] in 1996 and the original protocol is known as the **BBPSSW protocol** following the name of the authors." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "### The Bell states\n", "\n", "Many protocols in quantum information processing utilize the Bell states, including quantum teleportation [3], superdense coding [4] and quantum cryptography based on Bell’s theorem [5]. Such an enormous application range makes the four bell states an important subject of study. They are usually defined in the following bi-partite notation,\n", "\n", "$$ \n", "\\begin{align*}\n", "|\\Phi^{\\pm}\\rangle_{AB} &= \\frac{1}{\\sqrt{2}}(|0\\rangle_A\\otimes|0\\rangle_B \\pm |1\\rangle_A\\otimes|1\\rangle_B), \\\\\n", "|\\Psi^{\\pm}\\rangle_{AB} &= \\frac{1}{\\sqrt{2}}(|0\\rangle_A\\otimes|1\\rangle_B \\pm |1\\rangle_A\\otimes|0\\rangle_B). \n", "\\tag{1}\n", "\\end{align*}\n", "$$\n", "\n", "where $A$ (Alice) holds one qubit and $B$ (Bob) holds the other qubit. They could be physically separated. These states can not be decomposed as a single product state $|\\varphi\\rangle_A\\otimes |\\psi\\rangle_B$. **Note: This is a key feature of entangled pure states**. \n", "\n", "There is an interesting feature about Bell state that if trace out subsystem $A$, the reduced density operator $\\rho_B$ will become $I/2$. For example, let's take a look at the Bell state $|\\Phi^{+}\\rangle_{AB}$\n", "\n", "$$\n", "\\begin{align*}\n", "\\rho_B &\\equiv \\text{tr}_A(\\Phi^{+}_{AB}), \\\\\n", "& = \\text{tr}_A(|\\Phi^{+}\\rangle\\langle\\Phi^+|_{AB}), \\\\\n", "& = \\frac{1}{2}\\text{tr}_A\\big(|00\\rangle\\langle00|+|00\\rangle\\langle11|+|11\\rangle\\langle00|+|11\\rangle\\langle11|\\big),\\\\\n", "& = \\frac{1}{2} \\big(\\text{tr}_A(|0\\rangle\\langle0|_A)\\cdot|0\\rangle\\langle0|_B + \\text{tr}_A(|0\\rangle\\langle1|_A)\\cdot|0\\rangle\\langle1|_B \\\\\n", "& \\quad\\quad + \\text{tr}_A(|1\\rangle\\langle0|_A) \\cdot|1\\rangle\\langle0|_B+\n", "\\text{tr}_A(|1\\rangle\\langle1|_A)\\cdot|1\\rangle\\langle1|_B \\big), \\\\\n", "& = \\frac{1}{2} (|0\\rangle\\langle0|_B + |1\\rangle\\langle1|_B) = \\frac{1}{2} I.\n", "\\tag{2}\n", "\\end{align*}\n", "$$\n", "\n", "There exists a non-classical correlation between the entangled qubit pair. We cannot describe the whole system with side information about the sub-systems. One can create the Bell states $\\Phi^{+}_{AB}$ (density matrix) easily in Paddle Quantum by calling the function `bell_state()`." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2021-02-23T09:10:37.924098Z", "start_time": "2021-02-23T09:10:37.671533Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The generated state Phi = \n", " [[0.5+0.j 0. +0.j 0. +0.j 0.5+0.j]\n", " [0. +0.j 0. +0.j 0. +0.j 0. +0.j]\n", " [0. +0.j 0. +0.j 0. +0.j 0. +0.j]\n", " [0.5+0.j 0. +0.j 0. +0.j 0.5+0.j]]\n" ] } ], "source": [ "import paddle_quantum\n", "from paddle_quantum.state import bell_state\n", "\n", "# Change to density matrix mode\n", "paddle_quantum.set_backend('density_matrix')\n", "# Number of qubits\n", "N = 2\n", "rho = bell_state(N)\n", "print(\"The generated state Phi = \\n\", rho)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Entanglement quantification\n", "\n", "After having a taste of quantum entanglement qualitatively, we want to promote our understanding to a quantitative level. One should realize the validity of aforementioned quantum communication protocols, including quantum teleportation and superdense coding, depends on **the quality of the entanglement quantification**. Following the convention in quantum information community, the **negativity** $\\mathcal{N}(\\rho)$ and the **logarithmic negativity** $E_{N}(\\rho)$ are widely recognized metrics to quantify the amount of entanglement presented in a bi-partite system [6]. Specifically,\n", "\n", "$$\n", "\\mathcal{N}(\\rho) \\equiv \\frac{||\\rho^{T_B}||_1-1}{2},\n", "\\tag{3}\n", "$$\n", "\n", "and\n", "\n", "$$\n", "E_{N}(\\rho) \\equiv \\text{log}_2 ||\\rho^{T_B}||_1,\n", "\\tag{4}\n", "$$\n", "\n", "where $||\\cdot||_1$ denotes the trace norm, and $T_B$ stands for the partial transpose operation with respect to subsystem $B$ and can be defined as [7]\n", "\n", "$$\n", "\\rho_{A B}^{T_{B}}:=(I \\otimes T)(\\rho_{A B})=\\sum_{i, j}(I_{A} \\otimes|i\\rangle\\langle j|_{B}) \\rho_{A B}(I_{A} \\otimes|i\\rangle\\langle j|_{B}),\n", "\\tag{5}\n", "$$\n", "\n", "where $\\{|i\\rangle_B\\}$ is a basis of subsystem $B$. It is easy to connect these two metrics as $E_{N}(\\rho) = \\text{log}_2 (2\\mathcal{N}(\\rho)+1)$. They are all related to the PPT criterion for separability. \n", "\n", "> *A density matrix has a positive partial transpose (PPT) if its partial transposition has no negative eigenvalues (i.e. positive semidefinite). Otherwise, it's called NPT.*\n", "\n", "The reason why we introduce such metrics and criterion is not only helping us better understand quantum entanglement but also guiding us in distillation protocols. **Note: All PPT states are NOT distillable**. This means we can not use many copies of the same PPT states to reach a state closer to the maximally entangled state through LOCC in the asymptotic regime. So, it is always a good idea to check the PPT condition before we put the initial state into distillation protocols. For a detailed discussion on the relation between the positive map theory and separability, please refer to this review paper [8]. All these concepts are coded in Paddle Quantum by calling the functions `negativity()`,`logarithmic_negativity()`, and `partial_transpose()`.\n", "\n", "\n", "\n", "After introducing many new concepts, we provide a concrete example. For the specific Bell state $|\\Phi^{+}\\rangle_{AB}$, we have\n", "\n", "$$\n", "\\begin{align*}\n", "\\rho^{T_{B}} &= \\frac{1}{2}\n", "\\big(|00\\rangle\\langle00|+|01\\rangle\\langle10|+|10\\rangle\\langle01|+|11\\rangle\\langle11|\\big),\\\\\n", "& = \\frac{1}{2}\n", "\\begin{bmatrix}\n", "1 & 0 & 0 & 0\\\\\n", "0 & 0 & 1 & 0\\\\\n", "0 & 1 & 0 & 0\\\\\n", "0 & 0 & 0 & 1\n", "\\end{bmatrix}\n", "\\tag{6}\n", "\\end{align*}\n", "$$\n", "\n", "with a negative eigenvalue $\\lambda_{-}(\\rho^{T_{B}}) = -1/2$ and logarithmic negativity $E_{N}(\\rho) = 1$." ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2021-02-23T09:10:43.024928Z", "start_time": "2021-02-23T09:10:41.024088Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The transposed state is\n", " [[0.5+0.j 0. +0.j 0. +0.j 0. +0.j]\n", " [0. +0.j 0. +0.j 0.5+0.j 0. +0.j]\n", " [0. +0.j 0.5+0.j 0. +0.j 0. +0.j]\n", " [0. +0.j 0. +0.j 0. +0.j 0.5+0.j]]\n", "With negativity = 0.5 and logarithmic_negativity = 1.0\n", "The input state satisfies the PPT condition and hence not distillable? False\n" ] } ], "source": [ "from paddle_quantum.qinfo import negativity, logarithmic_negativity, partial_transpose, is_ppt\n", "\n", "input_state = bell_state(2)\n", "transposed_state = partial_transpose(input_state, 1) # 1 stands for the qubit number of system A\n", "print(\"The transposed state is\\n\", transposed_state.numpy())\n", "\n", "neg = negativity(input_state)\n", "log_neg = logarithmic_negativity(input_state)\n", "print(\"With negativity =\", neg.numpy()[0], \"and logarithmic_negativity =\", log_neg.numpy()[0])\n", "print(\"The input state satisfies the PPT condition and hence not distillable?\", is_ppt(input_state))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In the context of entanglement distillation, we usually use the **state fidelity** $F$ between the distilled state $\\rho_{out}$ and the Bell state $|\\Phi^+\\rangle$ to quantify the performance of a distillation protocol, where\n", "\n", "$$\n", "F(\\rho_{out}, \\Phi^+) \\equiv \\langle \\Phi^+|\\rho_{out}|\\Phi^+\\rangle.\n", "\\tag{7}\n", "$$\n", "\n", "Recall the target state in distillation task is $|\\Phi^+\\rangle$. It is natural to choose state fidelity as the metric to quantify the distance between the current state and the target state. To calculate state fidelity, we can call the function `state_fidelity(rho, sigma)`.\n", "\n", "$$\n", "F_s(\\rho,\\sigma) \\equiv \\text{tr}\\big( \\sqrt{\\sqrt{\\rho}\\sigma \\sqrt{\\rho}} \\big).\n", "\\tag{8}\n", "$$\n", "\n", "Notice they are differed by a square root $F=F_s^2$." ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2021-02-23T09:10:45.384306Z", "start_time": "2021-02-23T09:10:45.376793Z" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "The state fidelity between these two states are:\n", "F= 0.77500015\n" ] } ], "source": [ "from paddle_quantum.state import isotropic_state\n", "from paddle_quantum.qinfo import state_fidelity\n", "\n", "F = state_fidelity(bell_state(2), isotropic_state(2, 0.7))\n", "print(\"The state fidelity between these two states are:\\nF=\", (F**2).numpy()[0])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "With many preparations, we can finally discuss the famous BBPSSW protocol in the next section." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## BBPSSW protocol\n", "\n", "The BBPSSW protocol distills two identical quantum states $\\rho_{in}$ (2-copies) into a single final state $\\rho_{out}$ with a higher state fidelity $F$ (closer to the Bell state $|\\Phi^+\\rangle$). It is worth noting that BBPSSW was mainly designed to purify **isotropic states** (also known as Werner state), a parametrized family of mixed states consist of $|\\Phi^+\\rangle$ and the completely mixed state (white noise) $I/4$.\n", "\n", "$$\n", "\\rho_{\\text{iso}}(p) = p\\lvert\\Phi^+\\rangle \\langle\\Phi^+\\rvert + (1-p)\\frac{I}{4}, \\quad p \\in [0,1]\n", "\\tag{9}\n", "$$\n", "\n", "This state is PPT and hence not distillable when $p \\leq 1/3$. \n", "\n", "We have two remote parties, $A$ (Alice) and $B$ (Bob), involved in the BBPSSW distillation protocol. They share two qubit pairs $\\rho_{A_0B_0}$ and $\\rho_{A_1B_1}$. Each pair is initialized as $\\rho_{in} = \\rho_{\\text{iso}}(p)$. These states could come from last distillation process or previously distributed and stored in some memory registers of a quantum network. Alice holds two qubits $A_0, A_1$, and Bob also holds two qubits $B_0, B_1$. With these initial setups, Alice and Bob implement the following LOCC process:\n", "\n", "1. Alice and Bob firstly choose the qubit pair **they want to keep as the memory qubit pair to store entanglement resource after distillation**. Here, they choose $A_0$ and $B_0$. \n", "2. Alice and Bob both apply a CNOT gate on their qubits. Here, they choose $A_0,B_0$ as the control qubits and $A_1,B_1$ as the target qubits.\n", "3. Two remote parties measure the target qubits then use classical communication channel to exchange their measurement results $m_{A_1}, m_{B_1}$.\n", "4. If the measurement results of Alice and Bob are the same (00 or 11), the distillation is successful, and the qubit pair $A_0, B_0$ is stored as state $\\rho_{out}$; if the measurement results are different (01 or 10), they claim the distillation failed and the qubit pair $A_0, B_0$ will be discarded.\n", "\n", "