{ "metadata": { "name": "", "signature": "sha256:389a3295cb8e41366e5e1f24a6961e9da9e8dad1bfdfce337ca61a9e95fd89a8" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Lecture 9: Squeezed states of a quantum harmonic oscillator\n", "\n", "Author: J.R. Johansson, robert@riken.jp\n", "\n", "http://dml.riken.jp/~rob/\n", "\n", "Latest version of this ipython notebook lecture is available at: http://github.com/jrjohansson/qutip-lectures" ] }, { "cell_type": "code", "collapsed": false, "input": [ "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "import numpy as np" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "from IPython.display import HTML\n", "from matplotlib import animation" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "from qutip import *" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Introduction\n", "\n", "In quantum mechanics, each measurement of an observable (corresponding to an Hermitian operator) results in stochastic outcome that follows some probability distribution. The expectation value of the operator is the average of many measurement outcomes, and the standard deviation of the operator describes the uncertainty in the outcomes.\n", "\n", "This uncertainty is intrinsic in quantum mechanics, and cannot be eliminated. The Heisenberg uncertainty principle describes the minumum uncertainly for pairs of noncommuting operators. For example, the operators such $x$ and $p$, which satisfy the commutation relation $[x, p] = i\\hbar$, must always satisfy $(\\Delta x) (\\Delta p) >= \\hbar/2$ .\n", "\n", "A state that satisfies\n", "\n", "$(\\Delta x) (\\Delta p) = \\hbar/2$\n", "\n", "is called a minimum uncertainty state, and a state for which, for example, \n", "\n", "$(\\Delta x)^2 < \\hbar/2$ \n", "\n", "is called a squeezed state. Note that in this case $(\\Delta p)^2$ must be larger than $\\hbar/2(\\Delta x)^2$ for the Heisenberg relation to hold. Squeezing a quantum state so that the variance of one operator $x$ is reduced below the minimum uncertainty limit therefore necessarily amplify the variance of operators that do not commute with $x$, such as $p$.\n", "\n", "For harmonic modes, squeezing of $x$ or $p$ is called quadrature squeezing, and it is probably the most common form of squeezing. \n", "\n", "In this QuTiP notebook we look at how expectation values and variances of the quadrature operators $x$ or $p$ of a single harmonic mode evolve in time when initially in different kinds of squeezed states. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Parameters" ] }, { "cell_type": "code", "collapsed": false, "input": [ "N = 35\n", "w = 1 * 2 * np.pi # oscillator frequency\n", "tlist = np.linspace(0, 4, 101) # periods" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [ "# operators\n", "a = destroy(N)\n", "n = num(N)\n", "x = (a + a.dag())/np.sqrt(2)\n", "p = -1j * (a - a.dag())/np.sqrt(2)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 5 }, { "cell_type": "code", "collapsed": false, "input": [ "# the quantum harmonic oscillator Hamiltonian\n", "H = w * a.dag() * a" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 6 }, { "cell_type": "code", "collapsed": false, "input": [ "c_ops = []\n", "\n", "# uncomment to see how things change when disspation is included\n", "# c_ops = [np.sqrt(0.25) * a]" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 7 }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Functions for plotting\n", "\n", "Since we want to repeat the same kind of calculation and visualization for several different states, we first define a few functions that we can reuse for each state later on." ] }, { "cell_type": "code", "collapsed": false, "input": [ "def plot_expect_with_variance(N, op_list, op_title, states):\n", " \"\"\"\n", " Plot the expectation value of an operator (list of operators)\n", " with an envelope that describes the operators variance.\n", " \"\"\"\n", " \n", " fig, axes = plt.subplots(1, len(op_list), figsize=(14,3))\n", "\n", " for idx, op in enumerate(op_list):\n", " \n", " e_op = expect(op, states)\n", " v_op = variance(op, states)\n", "\n", " axes[idx].fill_between(tlist, e_op - np.sqrt(v_op), e_op + np.sqrt(v_op), color=\"green\", alpha=0.5);\n", " axes[idx].plot(tlist, e_op, label=\"expectation\")\n", " axes[idx].set_xlabel('Time')\n", " axes[idx].set_title(op_title[idx])\n", "\n", " return fig, axes" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 8 }, { "cell_type": "code", "collapsed": false, "input": [ "from base64 import b64encode\n", "\n", "def display_embedded_video(filename):\n", " video = open(filename, \"rb\").read()\n", " video_encoded = b64encode(video).decode(\"ascii\")\n", " video_tag = '