{ "metadata": { "name": "", "signature": "sha256:6324cf0237529e348de10c4e42e223dc3e315eaa85d561847140d0a7ffa12f6a" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "
\n", "

## The Bell States

\n", "
\n", "

\n", "This notebook goes with section 8.8 of the notes.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

## Contents

\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "

## ^ Setup Cell

" ] }, { "cell_type": "code", "collapsed": false, "input": [ "%autosave 0\n", "%matplotlib inline\n", "from sglib import *" ], "language": "python", "metadata": {}, "outputs": [ { "javascript": [ "IPython.notebook.set_autosave_interval(0)" ], "metadata": {}, "output_type": "display_data" }, { "output_type": "stream", "stream": "stdout", "text": [ "Autosave disabled\n" ] } ], "prompt_number": 28 }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "

## ^ The four bell states

" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This is how Wikipedia defines them:\n", "

\n", "$|\\Phi^+\\rangle = \\frac{1}{\\sqrt{2}} (|0\\rangle_A \\otimes |0\\rangle_B + |1\\rangle_A \\otimes |1\\rangle_B)$\n", "\n", "$|\\Phi^-\\rangle = \\frac{1}{\\sqrt{2}} (|0\\rangle_A \\otimes |0\\rangle_B - |1\\rangle_A \\otimes |1\\rangle_B)$\n", "\n", "$|\\Psi^+\\rangle = \\frac{1}{\\sqrt{2}} (|0\\rangle_A \\otimes |1\\rangle_B + |1\\rangle_A \\otimes |0\\rangle_B)$\n", "\n", "$|\\Psi^-\\rangle = \\frac{1}{\\sqrt{2}} (|0\\rangle_A \\otimes |1\\rangle_B - |1\\rangle_A \\otimes |0\\rangle_B).$\n", "

\n", "See:\n", "http://en.wikipedia.org/wiki/Bell_basis#The_Bell_states" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, I'll create the same states here, using a combination of python libraries and code form our \"sglib.\" There are two things you're trying to\n", "accomplish by reading this: (1) learn about the Bell states, and (2) get familiar with how to do some things on the computer.\n", "

\n", "Remember that \"pZ\" and \"mZ\" are our computer codes for $|+z\\rangle$ and\n", "$|-z\\rangle$, and \"TP\" is the tensor product. So, for example, \n", "TP(pZ,pZ) is the tensor of two $+z$ states. This is the same as the tensor\n", "of two zero bits:\n", "

\n", "$$\n", "TP(pZ,pZ) = |+z\\rangle \\otimes |+z\\rangle = |00\\rangle\n", "$$\n", "

\n", "Make sure your really understand this equation!\n", "

" ] }, { "cell_type": "code", "collapsed": false, "input": [ "#\n", "# Note: pZ = |+z> = |0>, mZ = |-z> = |1> \n", "# TP() is short for Tensor Product\n", "#\n", "\n", "bell_1 = 1/sqrt(2)*TP(pZ,pZ) + 1/sqrt(2)*TP(mZ,mZ) # phi+\n", "bell_2 = 1/sqrt(2)*TP(pZ,pZ) - 1/sqrt(2)*TP(mZ,mZ) # phi-\n", "bell_3 = 1/sqrt(2)*TP(pZ,mZ) + 1/sqrt(2)*TP(mZ,pZ) # psi+ (Triplet)\n", "bell_4 = 1/sqrt(2)*TP(pZ,mZ) - 1/sqrt(2)*TP(mZ,pZ) # psi- (Singlet)\n", "\n", "# sg_format_state() creates a formatter. We are telling it that\n", "# we want the \"basis states\" for the formatter to be \"0\" and \"1\"\n", "fs = sg_format_state(basis=['0','1'], separator='').format\n", "# Then we use the formatter to print the states in a \"nice\" way.\n", "Print(r'$\\phi^+ = %s$' %fs(bell_1))\n", "Print(r'$\\phi^- = %s$' %fs(bell_2))\n", "Print(r'$\\psi^+ = %s$' %fs(bell_3))\n", "Print(r'$\\psi^- = %s$' %fs(bell_4))" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "$\\phi^+ = \\frac{1}{\\sqrt{2}}|00\\rangle+\\frac{1}{\\sqrt{2}}|11\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\phi^- = \\frac{1}{\\sqrt{2}}|00\\rangle-\\frac{1}{\\sqrt{2}}|11\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\psi^+ = \\frac{1}{\\sqrt{2}}|01\\rangle+\\frac{1}{\\sqrt{2}}|10\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\psi^- = \\frac{1}{\\sqrt{2}}|01\\rangle-\\frac{1}{\\sqrt{2}}|10\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] } ], "prompt_number": 29 }, { "cell_type": "code", "collapsed": false, "input": [ "# If we wanted to look at these as electron spins rather than\n", "# qbits, we could format them like this:\n", "fs = sg_format_state(basis=['+z','-z'], separator=',').format\n", "Print(r'$\\phi^+ = %s$' %fs(bell_1))\n", "Print(r'$\\phi^- = %s$' %fs(bell_2))\n", "Print(r'$\\psi^+ = %s$' %fs(bell_3))\n", "Print(r'$\\psi^- = %s$' %fs(bell_4))" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "$\\phi^+ = \\frac{1}{\\sqrt{2}}|+z,+z\\rangle+\\frac{1}{\\sqrt{2}}|-z,-z\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\phi^- = \\frac{1}{\\sqrt{2}}|+z,+z\\rangle-\\frac{1}{\\sqrt{2}}|-z,-z\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\psi^+ = \\frac{1}{\\sqrt{2}}|+z,-z\\rangle+\\frac{1}{\\sqrt{2}}|-z,+z\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\psi^- = \\frac{1}{\\sqrt{2}}|+z,-z\\rangle-\\frac{1}{\\sqrt{2}}|-z,+z\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] } ], "prompt_number": 30 }, { "cell_type": "code", "collapsed": false, "input": [ "# Or if we wanted \"heads\" and \"tails\" ...\n", "fs = sg_format_state(basis=['H','T'], separator='').format\n", "Print(r'$\\phi^+ = %s$' %fs(bell_1))\n", "Print(r'$\\phi^- = %s$' %fs(bell_2))\n", "Print(r'$\\psi^+ = %s$' %fs(bell_3))\n", "Print(r'$\\psi^- = %s$' %fs(bell_4))" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "$\\phi^+ = \\frac{1}{\\sqrt{2}}|HH\\rangle+\\frac{1}{\\sqrt{2}}|TT\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\phi^- = \\frac{1}{\\sqrt{2}}|HH\\rangle-\\frac{1}{\\sqrt{2}}|TT\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\psi^+ = \\frac{1}{\\sqrt{2}}|HT\\rangle+\\frac{1}{\\sqrt{2}}|TH\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\psi^- = \\frac{1}{\\sqrt{2}}|HT\\rangle-\\frac{1}{\\sqrt{2}}|TH\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] } ], "prompt_number": 31 }, { "cell_type": "markdown", "metadata": {}, "source": [ "

\n", "\n", "

## ^ The Bell states are entangled

" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The Bell states are all entangled states. There are two ways to see this.\n", "

\n", "(1) You should be able to see that there will be a correlation between the\n", "measurements of the two bits. There correlations are different for the different states. But if you know the result of measuring one bit, you automatically know what the result of measuring the other bit will be.\n", "This can only happen with entangled states. If two systems are not entangled, then measuring one of the reveals no information about the other one. In fact, since measuring one bit completely determines\n", "the outcome for the other bit, these states are called maximally\n", "entangled.\n", "

\n", "(2) Mathematically, you can see that they are entangled by the\n", "fact that\n", "they can't be factored. Product states (non-entangled states) can\n", "always be factored." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "

## ^ The Bell states form an orthonormal basis

\n", "

\n", "The four Bell states form an orthonormal basis for the \"two bit\"\n", "vector space.\n", "

\n", "Any system consisting of two qbits can be represented as a column vector\n", "with four components. Since the vectors that live in this space have 4\n", "components, the space has a dimension of 4 and it takes exactly\n", "4 vectors to form a basis for the state. (See section 1.8 of the notes.)\n", "Usually, we like to have an orthonormal basis. (See section 1.12.)\n", "

\n", "We'll now show that the four Bell states form an orthonormal basis\n", "\n", "Don't worry about the python code. Just look at what it prints out.\n", "" ] }, { "cell_type": "code", "collapsed": false, "input": [ "bell_states = [bell_1, bell_2, bell_3, bell_4]\n", "for m in range(4):\n", " string = ''\n", " for n in range(4):\n", " result = inner_product(bell_states[m],bell_states[n])\n", " if string != '': string += ', '\n", " string += r'$\\langle$Bell$_{%s}|$Bell$_{%s}\\rangle=%s$'\\\n", " %(m+1,n+1,result)\n", " Print(string)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "$\\langle$Bell$_{1}|$Bell$_{1}\\rangle=1$, $\\langle$Bell$_{1}|$Bell$_{2}\\rangle=0$, $\\langle$Bell$_{1}|$Bell$_{3}\\rangle=0$, $\\langle$Bell$_{1}|$Bell$_{4}\\rangle=0$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\langle$Bell$_{2}|$Bell$_{1}\\rangle=0$, $\\langle$Bell$_{2}|$Bell$_{2}\\rangle=1$, $\\langle$Bell$_{2}|$Bell$_{3}\\rangle=0$, $\\langle$Bell$_{2}|$Bell$_{4}\\rangle=0$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\langle$Bell$_{3}|$Bell$_{1}\\rangle=0$, $\\langle$Bell$_{3}|$Bell$_{2}\\rangle=0$, $\\langle$Bell$_{3}|$Bell$_{3}\\rangle=1$, $\\langle$Bell$_{3}|$Bell$_{4}\\rangle=0$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\langle$Bell$_{4}|$Bell$_{1}\\rangle=0$, $\\langle$Bell$_{4}|$Bell$_{2}\\rangle=0$, $\\langle$Bell$_{4}|$Bell$_{3}\\rangle=0$, $\\langle$Bell$_{4}|$Bell$_{4}\\rangle=1$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] } ], "prompt_number": 32 }, { "cell_type": "markdown", "metadata": {}, "source": [ "What the four lines above show is that:\n", "* Each Bell state has a length of 1 (it's normalized)\n", "* Each Bell state is orthogonal to the other three\n", "\n", "Also, see secion 4.2 for the length of a vector. Remember that the square\n", "root of 1 is 1 :-)\n", "Even after consulting the notes,\n", "I imagine that there may still be some questions about the sequence above.\n", "We'll talk about this on Sunday." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

\n", "\n", "

## ^ Entangled pairs in the Bell states

\n", "

\n", "Suppose that there\n", "are two electrons (for example) whose spin states are entangled in\n", "one of the Bell states.\n", "We work out the correlations for that situation.\n", "

\n", "\n", "You don't need to look at the \"code\" here. Just look at the correlations\n", "printed out below and notice the different relationships between\n", "correlations in different bases.\n", "" ] }, { "cell_type": "code", "collapsed": false, "input": [ "# Put all the bell states in an array\n", "bell = [bell_1, bell_2, bell_3, bell_4]\n", "# Define format for the different bases\n", "fz = sg_format_state(basis=['+z','-z'], separator=',').format\n", "fx = sg_format_state(basis=['+x','-x'], separator=',').format\n", "f45 = sg_format_state(basis=['+45','-45'], separator=',').format\n", "\n", "def work_out_stuff(which):\n", " Print('

')\n", " Print('For Bell %s'%(which+1))\n", " z_state = bell[which]\n", " Print('In the Z basis we have $%s$'%fz(z_state))\n", "\n", " IP = inner_product\n", " xb = x_basis_2bit\n", " a = IP(xb, z_state)\n", " b = IP(xb, z_state)\n", " c = IP(xb, z_state)\n", " d = IP(xb, z_state)\n", " x_state = col(a,b,c,d)\n", "\n", " Print('In the X basis we have: $%s$'%fx(x_state))\n", "\n", " # Measurement matrix for the vector halfway between x and z\n", " # See the electron spin notebook\n", " M45 = 1/sqrt(2)*mat(1,1,1,-1)\n", " #Print('The 45 degree operator is: $%s$'%myltx(M45))\n", "\n", " eval, evec = find_eigenvectors(M45)\n", " m45 = evec; p45 = evec\n", "\n", " b45 = []\n", " b45 += [ TP(p45, p45), ]\n", " b45 += [ TP(p45, m45), ]\n", " b45 += [ TP(m45, p45), ]\n", " b45 += [ TP(m45, m45), ]\n", "\n", " a = IP(b45, z_state)\n", " b = IP(b45, z_state)\n", " c = IP(b45, z_state)\n", " d = IP(b45, z_state)\n", " state_45 = col(a,b,c,d)\n", "\n", " # Do everything possible to simplify the state\n", " state_45 = megasimp(state_45)\n", "\n", " #Print('And in the 45 degree basis we have:')\n", " #sg_print(state_45, exact=True, ndigs=4)\n", " Print('In the $45^{\\circ}$ basis we have: $%s$'%f45(state_45))\n", " \n", "for n in range(4): work_out_stuff(n)\n", " \n", "# Do I need this ... ?\n", "#eflag = False\n", "#sg_print( IP(p45, pZ)*IP(p45, pZ).conjugate(), exact=eflag, ndigs=3)\n", "#sg_print( IP(p45, mZ)*IP(p45, mZ).conjugate(), exact=eflag, ndigs=3)\n", "#sg_print( IP(p45, pX)*IP(p45, pX).conjugate(), exact=eflag, ndigs=3)\n", "#sg_print( IP(p45, mX)*IP(p45, mX).conjugate(), exact=eflag, ndigs=3)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "For Bell 1" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the Z basis we have $\\frac{1}{\\sqrt{2}}|+z,+z\\rangle+\\frac{1}{\\sqrt{2}}|-z,-z\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the X basis we have: $\\frac{1}{\\sqrt{2}}|+x,+x\\rangle+\\frac{1}{\\sqrt{2}}|-x,-x\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the $45^{\\circ}$ basis we have: $\\frac{1}{\\sqrt{2}}|+45,+45\\rangle+\\frac{1}{\\sqrt{2}}|-45,-45\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "For Bell 2" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the Z basis we have $\\frac{1}{\\sqrt{2}}|+z,+z\\rangle-\\frac{1}{\\sqrt{2}}|-z,-z\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the X basis we have: $\\frac{1}{\\sqrt{2}}|+x,-x\\rangle+\\frac{1}{\\sqrt{2}}|-x,+x\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the $45^{\\circ}$ basis we have: $\\frac{1}{2}|+45,+45\\rangle-\\frac{1}{2}|+45,-45\\rangle-\\frac{1}{2}|-45,+45\\rangle-\\frac{1}{2}|-45,-45\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "For Bell 3" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the Z basis we have $\\frac{1}{\\sqrt{2}}|+z,-z\\rangle+\\frac{1}{\\sqrt{2}}|-z,+z\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the X basis we have: $\\frac{1}{\\sqrt{2}}|+x,+x\\rangle-\\frac{1}{\\sqrt{2}}|-x,-x\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the $45^{\\circ}$ basis we have: $\\frac{1}{2}|+45,+45\\rangle+\\frac{1}{2}|+45,-45\\rangle+\\frac{1}{2}|-45,+45\\rangle-\\frac{1}{2}|-45,-45\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "For Bell 4" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the Z basis we have $\\frac{1}{\\sqrt{2}}|+z,-z\\rangle-\\frac{1}{\\sqrt{2}}|-z,+z\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the X basis we have: $-\\frac{1}{\\sqrt{2}}|+x,-x\\rangle+\\frac{1}{\\sqrt{2}}|-x,+x\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "In the $45^{\\circ}$ basis we have: $\\frac{1}{\\sqrt{2}}|+45,-45\\rangle-\\frac{1}{\\sqrt{2}}|-45,+45\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] } ], "prompt_number": 33 }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "If you got this far, you're doing really well. Don't worry about the rest\n", "of the notebook!\n", "" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "
\n", "\n", "

## ^ Bell Basis Measurement Operator

\n", "

\n", "I'd like to see how this compares with the way it's done in\n", "the quantum teleportation scenaio." ] }, { "cell_type": "code", "collapsed": false, "input": [ "evals = (0, 1, 2, 3); evecs = (bell_1, bell_2, bell_3, bell_4)\n", "BBM = construct_measurement_operator(evals, evecs)\n", "print_eigenvectors(BBM)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "The operator is: $\\left[\\begin{matrix}\\frac{1}{2} & 0 & 0 & - \\frac{1}{2}\\\\0 & \\frac{5}{2} & - \\frac{1}{2} & 0\\\\0 & - \\frac{1}{2} & \\frac{5}{2} & 0\\\\- \\frac{1}{2} & 0 & 0 & \\frac{1}{2}\\end{matrix}\\right]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "eigenvalue: $0$, eigenvector: $\\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}1\\\\0\\\\0\\\\1\\end{matrix}\\right]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "eigenvalue: $1$, eigenvector: $\\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}-1\\\\0\\\\0\\\\1\\end{matrix}\\right]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "eigenvalue: $2$, eigenvector: $\\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}0\\\\1\\\\1\\\\0\\end{matrix}\\right]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "eigenvalue: $3$, eigenvector: $\\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}0\\\\-1\\\\1\\\\0\\end{matrix}\\right]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] } ], "prompt_number": 34 }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "

\n", "The operator produces the expected eigenvectors, except that the\n", "overall phase of the \"-\" states is different. I guess that's OK.\n", "
\n", "
" ] }, { "cell_type": "code", "collapsed": false, "input": [ "evals, evecs = find_eigenvectors(BBM)\n", "Print('Operator\\'s eigenvectors:')\n", "Print('$%s, %s, %s, %s$'\n", " %(myltx(evecs),myltx(evecs),myltx(evecs),myltx(evecs)))\n", "Print('Bell states:')\n", "Print('$%s, %s, %s, %s$'\n", " %(myltx(bell_1),myltx(bell_2),myltx(bell_3),myltx(bell_4)))" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "Operator's eigenvectors:" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}1\\\\0\\\\0\\\\1\\end{matrix}\\right], \\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}-1\\\\0\\\\0\\\\1\\end{matrix}\\right], \\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}0\\\\1\\\\1\\\\0\\end{matrix}\\right], \\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}0\\\\-1\\\\1\\\\0\\end{matrix}\\right]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "Bell states:" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}1\\\\0\\\\0\\\\1\\end{matrix}\\right], \\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}1\\\\0\\\\0\\\\-1\\end{matrix}\\right], \\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}0\\\\1\\\\1\\\\0\\end{matrix}\\right], \\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}0\\\\1\\\\-1\\\\0\\end{matrix}\\right]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] } ], "prompt_number": 35 }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "
\n", "Here they are as bits.\n", "
\n", "
" ] }, { "cell_type": "code", "collapsed": false, "input": [ "fs = sg_format_state(basis=['0','1'], separator='').format\n", "Print(r'$\\phi^+ = %s = %s$' %(fs(bell_1), fs(evecs)))\n", "Print(r'$\\phi^- = %s = %s$' %(fs(bell_2), fs(evecs)))\n", "Print(r'$\\psi^+ = %s = %s$' %(fs(bell_3), fs(evecs)))\n", "Print(r'$\\psi^- = %s = %s$' %(fs(bell_4), fs(evecs)))" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "$\\phi^+ = \\frac{1}{\\sqrt{2}}|00\\rangle+\\frac{1}{\\sqrt{2}}|11\\rangle = \\frac{1}{\\sqrt{2}}|00\\rangle+\\frac{1}{\\sqrt{2}}|11\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\phi^- = \\frac{1}{\\sqrt{2}}|00\\rangle-\\frac{1}{\\sqrt{2}}|11\\rangle = -\\frac{1}{\\sqrt{2}}|00\\rangle+\\frac{1}{\\sqrt{2}}|11\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\psi^+ = \\frac{1}{\\sqrt{2}}|01\\rangle+\\frac{1}{\\sqrt{2}}|10\\rangle = \\frac{1}{\\sqrt{2}}|01\\rangle+\\frac{1}{\\sqrt{2}}|10\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$\\psi^- = \\frac{1}{\\sqrt{2}}|01\\rangle-\\frac{1}{\\sqrt{2}}|10\\rangle = -\\frac{1}{\\sqrt{2}}|01\\rangle+\\frac{1}{\\sqrt{2}}|10\\rangle$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] } ], "prompt_number": 36 }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "
\n", "Note above how my version of $\\phi^1$ and $\\psi^-$ but they are numerically\n", "\"multiplied through\" by minus one. This is what I meant above when I said\n", "the the \"overall phase\" was different. But they will still yield the same\n", "probabilities.\n", "

\n", "And, we see below that measurements appear to work.\n", "

\n", "
" ] }, { "cell_type": "code", "collapsed": false, "input": [ "Print('$%s, %s, %s, %s$'\n", " %(myltx(evecs),myltx(evecs),myltx(evecs),myltx(evecs)))\n", "foo = analyze_measurement(BBM, bell_1)\n", "Print('$%s$'%foo)\n", "foo = analyze_measurement(BBM, bell_2)\n", "Print('$%s$'%foo)\n", "foo = analyze_measurement(BBM, bell_3)\n", "Print('$%s$'%foo)\n", "foo = analyze_measurement(BBM, bell_4)\n", "Print('$%s$'%foo)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "$\\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}1\\\\0\\\\0\\\\1\\end{matrix}\\right], \\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}1\\\\0\\\\0\\\\1\\end{matrix}\\right], \\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}1\\\\0\\\\0\\\\1\\end{matrix}\\right], \\frac{1}{\\sqrt{2}}\\left[\\begin{matrix}1\\\\0\\\\0\\\\1\\end{matrix}\\right]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$[1, 0, 0, 0]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$[0, 1, 0, 0]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$[0, 0, 1, 0]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "html": [ "$[0, 0, 0, 1]$" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] } ], "prompt_number": 37 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 37 } ], "metadata": {} } ] }