{ "cells": [ { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Performing Quantum Measurements in QuTiP\n", "\n", "* EuroSciPy 2019\n", "* Simon Cross" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "### Outline\n", "\n", "* Why this weird quantum mechanics anyway?\n", "* Simulating a simple classical system.\n", "* What is a classical bit?\n", "* What is a qubit?\n", "* Measuring a qubit.\n", "* Simulating a simple quantum experiment in QuTiP." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "### Meta goals\n", "\n", "* Use QuTiP to try things out.\n", "* Try understand what we're doing!" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# Imports: Our tools" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "slideshow": { "slide_type": "subslide" } }, "outputs": [], "source": [ "%matplotlib inline\n", "\n", "from collections import namedtuple\n", "\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import qutip\n", "from qutip import Qobj, Bloch, basis, ket, tensor" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "QuTiP: Quantum Toolbox in Python\n", "================================\n", "Copyright (c) QuTiP team 2011 and later.\n", "Original developers: R. J. Johansson & P. D. Nation.\n", "Current admin team: Alexander Pitchford, Paul D. Nation, Nathan Shammah, Shahnawaz Ahmed, Neill Lambert, and Eric Giguère.\n", "Project Manager: Franco Nori.\n", "Currently developed through wide collaboration. See https://github.com/qutip for details.\n", "\n", "QuTiP Version: 4.4.1\n", "Numpy Version: 1.17.1\n", "Scipy Version: 1.2.0\n", "Cython Version: 0.29.13\n", "Matplotlib Version: 3.1.1\n", "Python Version: 3.6.8\n", "Number of CPUs: 2\n", "BLAS Info: OPENBLAS\n", "OPENMP Installed: False\n", "INTEL MKL Ext: False\n", "Platform Info: Linux (x86_64)\n", "Installation path: /home/simon/venvs/qutip-measurements-euroscipy-2019/lib/python3.6/site-packages/qutip\n", "==============================================================================\n", "Please cite QuTiP in your publication.\n", "==============================================================================\n", "For your convenience a bibtex reference can be easily generated using `qutip.cite()`\n" ] } ], "source": [ "qutip.about()" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "Define LaTeX commands:\n", "* $\\newcommand{\\ket}[1]{\\left|{#1}\\right\\rangle}$ $\\ket{0}$\n", "* $\\newcommand{\\bra}[1]{\\left\\langle{#1}\\right|}$ $\\bra{1}$\n", "* $\\newcommand{\\abs}[1]{\\lvert{#1}\\rvert}$ $\\abs{x}$" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "# The Stern-Gerlach Experiment\n", "\n", "Why this weird quantum mechanics anyway?" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "### Apparatus\n", "\n", "