{ "cells": [ { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [], "source": [ "# EPR Paradox Example\n", "\n", "# A neutral pi meson (pi0) decays into an electron/positron (e-/e+) \n", "# pair.\n", "\n", "# pi0 --> e+ + e- (electron-positron pair)\n", "# pi0 has angular momentum l = s = 0\n", "\n", "# Align electron and positron detectors in opposite directions.\n", "\n", "# | pi0 |\n", "# |e- <------ ------> e+|\n", "\n", "# Where hbar = 1, the measurement of the spin in some direction is \n", "# +/-1 with spin state [1 0] (up) or [0 1] (down).\n", "\n", "# The Pauli exclusion principle with conserved angular momentum 0\n", "# dictates this system must be in the singlet state \n", "# chi = [1/sqrt(2) (|up+>|down-> - |down+>|up->)].\n", "\n", "# In this state, if the positron is measured to have spin [1 0], the \n", "# electron must have spin [0 1], or vice versa. There is an equal \n", "# probability to find either state during the first measurement.\n", "\n", "# This view is consistent with the realist view. The realist view could \n", "# hold that the electron and position had those angular momenta \n", "# from creation.\n", "\n", "# EPR assumes influences cannot propagate faster than the speed of \n", "# light. \"Wave function collapse\" is apparently instantaneous, however.\n", "\n", "\n", "import numpy as np\n", "import matplotlib\n", "import matplotlib.pyplot as plt\n", "import matplotlib.patches as mpatches\n", "%matplotlib inline " ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEXCAYAAACu1P9TAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAHHpJREFUeJzt3XmcXGWd7/FPZZlAJsYEZgaDBvFCCIsOizDIIjQgAqMEZIIRGIcEr5gL6Au3GTalEwcUGZhhE4aLGRhFL6g4kHEQBGmILMFhuyJkuQoGEtaYQDbI1veP3yn69Mmp7qpOVyrN83m/XvWqruc8p+qp6lPfc85znnMKJEmSJEmSJEmSJEmSJEmSJKkubcB64PwWt6NRzwLPtLoRBe3EZ3lwi9uhPhjU6gaobm3EF+2eHupsn9XZ3EJic9G5kfNPJj7fkze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DPrM5O2eN24ov0BHAycCQxlPZl4lyJRt1D92sjQfmX6nng6uy9/iNxbOe0Pryems9l02VT/exhYoRS3rV0fal2IRa8T+emV4Df0P1M5oV0nYx2CvDfwAPA57KyLxBbYVXt2Wu05cp2z8o+2of30UF9X6ri2dfXEl80bX5cNl027dLpR0OIrZtbC+U/zf29D/Elyu+SdgI/pvsu7izgw9nfBwH3Zbd82a8Kr7Oa7lc1q5709p5630Af/LTk8bZNfk01zmXTZRMw8PvTnxF9my8XyvOPxxB9oG8U6rxE9J8OzR7/iq4v2YeJL1T+i3Zg9jhvWeHx6ux+i/qa3ye13muxb1it5bLpsgnUd7VM1edVYpf4Lwrl+ccvEGcVb0H3L9Y2xLkJa7LHs4CtiF3e7bPH64mfmDw8e87il6o/rSLOoM4ru6Jprff6Qr+3SBvDZdNlE3ALvz+tBR4Dji2UH5f7+2FiN/n4XFkFmEj3L8lviJEO5xC7v4uJy0g/SfyU5LLstZrlebr/lgGU97ceV/J4EfaVbm5cNl021QTHEls73yEWwguIH3nJj4T4PvAaMWLgSGIkxJvEL4flzcw9V9UVlB+QaieGvhWtp28jE/46m/dS4CPZ+/g9Gx4Yew64hniv1ZEQp/fh9dR8Lpsum2qC04mFbQXwn8Ru7jq6vlRb0jXW+Q02HOtc9ffZfJ/KlX0yKzuvUPd8NuyzhL5/qSCuj7SAGKb378DR2WsXxzr/gK6xzuf38bW0abhsSmrY9sSX6q9b3A6paHtcNmuyD1+SEmHgq686W90AqQaXTUmSJEmSJEmSJEmSJEmSJDXT/wfOeFvlQA6EogAAAABJRU5ErkJggg==\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# If information about the measurement of the wave function propagated\n", "# at a finite speed, the particles could conceivably be measured such\n", "# that both are equally likely to hold either spin up or spin down.\n", "\n", "# What would happen if the measurements were uncorrelated?\n", "\n", "plt.hist(np.random.randint(0,2,1000),bins=4)\n", "plt.hist(np.random.randint(3,5,1000),bins=4)\n", "elepatch = mpatches.Patch(color='blue', label='e-')\n", "pospatch = mpatches.Patch(color='orange', label='e+')\n", "#plt.legend(handles=[elepatch,pospatch])\n", "plt.text(0.5,565,\"e-\",size=20)\n", "plt.text(3.5,565,\"e+\",size=20)\n", "\n", "plt.suptitle(\"Uncorrelated Spins\",fontsize=20)\n", "plt.ylim([400,600])\n", "plt.xlim([-1,5])\n", "plt.xticks([0.125,0.85,3.125,3.85],[\"down\",\"up\",\"down\",\"up\"])\n", "plt.tick_params(axis='both',labelsize=15)\n", "plt.show()" ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEXCAYAAACu1P9TAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAHv9JREFUeJzt3XmYHVWZ+PFvk7DFkIWgyGoElEBQcGQcYX5CIyIybA4KQXBpcFgGR+Wn4gCyNCrKIoiKDuACbjNs4gLIImgDCgii7AQZoNmCrEkgC4SEnj/ec+261XW7773pzna+n+fpp/ueOlV1bvXtt06951Q1SJIkSZIkSZIkSZIkSZIkSVLTeoGHl3YjhkEvi/8+JgOvAucubmOG0JX287ER3o+atNLSbsAKbArwLeBuYDbwMvAEcBlwILDK0mvaCqmHCC6N9KWvZcGJRFtPbqLuOanup9Pr4Xwfi7udTqJtxw+y/WXpuEsj4jhgEfHH8HvgDOBLwHeB+1P5rUutdSumHuKYN/LG9LUsmEy0dQYwepB6rwFeAOYBE1LZcLyPycRn8AeLuZ3OtJ3jGiwfB7w5fZdWSEcTfwS9wD82qLMzcM2SalAmehg84C9rriI+J/86SJ2Ppzo/HuZ9T2Z4A36jHr60QpsMLABeAjYfom5VSmcf4HoiBTQPuBM4skHdXiKXOwY4FXg07fcB4PMN9rkHcC3wZKr7BBEo/72i7prAV4H7UltmESepnSrqdtGfq31f2ubsVLYuEYj/3KBNAFekusV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xT5JmAd3AN4A3ADcQJ8Y3E4P2ew2xfUlL0Y+JHuuJpfKqu0PfTeTj5xOX82dS//iNzrSt4iydDxNzvucBNxIDneXZN28kAs0s6ufhl+tB9OjvJKZHPkpMDSxOTOii+rEgVdsaysZEj3cOMTvmc8RJ5+lCne2JefgvAX8m0irN3GnbycBjtQoRTB8g3t+TxEm5OBd/sPfxaeDu1Jan036LM3eabcdqxP0PtfsBHiKOc9H+RAdhHnFyvgk4vEG7JEmSJEmSJEmSJEmSJEmSJEmSJEmSJGmE/R+XIAMb09n0qQAAAABJRU5ErkJggg==\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "# How many violations of angular momentum would be measured?\n", "\n", "# From running several simulations, it's evident a violation in the \n", "# conservation of angular momentum would be measured half of the time.\n", "# We can conclude that the information that the entangled particles are in\n", "# orthogonal spin states is instantaneously agreed once a measurement\n", "# is made.\n", "\n", "violations = 0\n", "\n", "for trial in range(0,1000):\n", " elespin = np.random.randint(0,2)\n", " posspin = np.random.randint(0,2)\n", " if elespin == 0:\n", " elespin = np.matrix('0 1')\n", " else:\n", " elespin = np.matrix('1 0')\n", " if posspin == 0:\n", " posspin = np.matrix('0 1')\n", " else:\n", " posspin = np.matrix('1 0')\n", " \n", " elespin.transpose()\n", " posspin.transpose()\n", " chi_squared = elespin*np.matrix('1; 0')*posspin*np.matrix('0; 1') - posspin*np.matrix('1; 0')*elespin*np.matrix('0; 1')\n", " \n", " if chi_squared == 0:\n", " violations = violations + 1\n", "\n", "zeroes = np.zeros(violations,dtype=int)\n", "ones = np.full((1000-violations),1,dtype=int)\n", "result = np.concatenate((ones,zeroes))\n", "\n", "plt.ylim([400,600])\n", "plt.xlim([-1,2])\n", "plt.xticks([0.125,0.85],[\"violation\",\"adherence\"])\n", "plt.tick_params(axis='both',labelsize=15)\n", "plt.suptitle(\"Conservation Violations\",fontsize=20)\n", "plt.hist([result],bins=4)\n", "plt.figure()" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# Bell's Experiment took this a step further, to rule out locality \n", "# completely. Establish the detectors to \"float\" such that they \n", "# measure the components of the spins of the electron and positron \n", "# along a unit vector a or b, with angles phi_a and phi_b, \n", "# respectively. Compute a product P of the spins in units of hbar/2. \n", "# This will give +/-1. \n", "\n", "# / pi0 \\\n", "# /e- <------ ------> e+\\\n", "\n", "# QM predicts P(a,b) = -a dot b, the expectation value of the product \n", "# of the spins.\n", "\n", "# In 1964, Bell derived the Bell inequality for a local hidden variable\n", "# theory: abs(P(a,b) - P(a,c)) <= 1 + P(b,c)\n", "\n", "# For any local hidden variable theory, the Bell inequality must hold. \n", "# It introduces a third unit vector c, which is any other unit vector \n", "# than a or b.\n", "\n", "# Does the quantum mechanical prediction violate the Bell inequality?\n", "# Testing several detector configurations in a plane, systematically \n", "# from 0 to pi, we determine whether the QM prediction is consistent \n", "# with a local hidden variable theory.\n", "\n", "violations = 0\n", "trials = 0\n", "for step_a in range(0,6):\n", " for step_b in range (0,6):\n", " phi_a = step_a/6*np.pi\n", " phi_b = step_b/6*np.pi\n", " phi_c = phi_a - 0.5*phi_b\n", " P_ab = -1 * np.cos(phi_a - phi_b)\n", " P_ac = -1 * np.cos(phi_a - phi_c)\n", " P_bc = -1 * np.cos(phi_b - phi_c)\n", " \n", " bell_lhs = np.abs(P_ab - P_ac)\n", " bell_rhs = 1 + P_bc\n", " \n", " if bell_lhs > bell_rhs:\n", " violations = violations + 1\n", " \n", " trials = trials + 1\n", " \n", "zeroes = np.zeros(violations,dtype=int)\n", "ones = np.full((trials-violations),1,dtype=int)\n", "result = np.concatenate((ones,zeroes))\n", "\n", "plt.ylim([trials/2-10,trials/2+10])\n", "plt.xlim([-1,2])\n", "plt.xticks([0.125,0.85],[\"violation\",\"adherence\"])\n", "plt.tick_params(axis='both',labelsize=15)\n", "plt.suptitle(\"Hidden Locality Violations\",fontsize=20)\n", "plt.hist([result],bins=4)\n", "plt.figure()" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# It is seen that the QM prediction disagrees with a local hidden \n", "# variable theory in a significant number of configurations.\n", "\n", "# On average, for random orientations between 0 and pi, how often? \n", "# After running several trials, it appears to be about half of the, \n", "# which is what one would expect from the quantum mechanical\n", "# prediction.\n", "\n", "violations = 0\n", "trials = 0\n", "for rand_a in range(0,10):\n", " for rand_b in range (0,10):\n", " phi_a = np.random.rand(1)*np.pi\n", " phi_b = np.random.rand(1)*np.pi\n", " phi_c = phi_a - 0.5*phi_b\n", " P_ab = -1 * np.cos(phi_a - phi_b)\n", " P_ac = -1 * np.cos(phi_a - phi_c)\n", " P_bc = -1 * np.cos(phi_b - phi_c)\n", " \n", " bell_lhs = np.abs(P_ab - P_ac)\n", " bell_rhs = 1 + P_bc\n", " \n", " if bell_lhs > bell_rhs:\n", " violations = violations + 1\n", " \n", " trials = trials + 1\n", "\n", "zeroes = np.zeros(violations,dtype=int)\n", "ones = np.full((trials-violations),1,dtype=int)\n", "result = np.concatenate((ones,zeroes))\n", "\n", "plt.ylim([trials/2-10,trials/2+10])\n", "plt.xlim([-1,2])\n", "plt.xticks([0.125,0.85],[\"violation\",\"adherence\"])\n", "plt.tick_params(axis='both',labelsize=15)\n", "plt.suptitle(\"Hidden Locality Violations\",fontsize=20)\n", "plt.hist([result],bins=4)\n", "plt.figure()" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "# The prediction (Bell's inequality) made by assuming a local hidden\n", "# variable is violated by a significant number of the possibile \n", "# bborientations. This simulation cannot determine which theory is\n", "# correct, but the QM prediction has been confirmed through experiment.\n", "# No hidden local variable holds actionable information about the \n", "# state. Entangled states retain their entanglement in a non-local \n", "# nature." ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [], "source": [ "plt.show()" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.4.3" } }, "nbformat": 4, "nbformat_minor": 2 }