• 熊孩子不小心把弟弟锁进快递柜 消防5分钟破拆 2019-08-20
  • 春运首日 追忆那些年我们坐过的绿皮车 2019-08-20
  • 推动乡村振兴的重要举措(新知新觉) 2019-08-16
  • 中国民生投资集团获第十二届人民企业社会责任奖年度企业奖 2019-08-12
  • 蓝天下的河北—波光潋滟衡水湖 2019-08-10
  • 美对500亿美元中国商品征税 外媒美做法很不体面 2019-08-09
  • 栗战书主持召开十三届全国人大常委会第五次委员长会议 决定十三届全国人大常委会第三次会议6月19日至22日举行 2019-08-09
  • 受“闰月”影响今年端午节比去年“晚”了19天 2019-07-28
  • 海淀创业园双创文化:工艺师传播纸制花艺术与花道 2019-07-28
  • 朝韩将军级会谈时隔11年后在板门店重启 2019-07-23
  • Conférence de presse du Premier ministre chinois 2019-07-09
  • 大观园举办“古琴雅集” 市民感受“古韵端午” 2019-06-30
  • 文脉颂中华——黄河新闻网 2019-06-30
  • 水费欠账竟“穿越”16年?用户质疑:为何没见催缴过? 2019-06-21
  • 买房怎么看风水这个真的实在是太重要了 ——凤凰网房产北京 2019-06-11
  • 11选5赚钱方法:QuTiP lecture: Vacuum Rabi oscillations in the Jaynes-Cummings model

    500元 倍投方案 稳赚 www.gvqn.net Author: J. R. Johansson ([email protected]), //dml.riken.jp/~rob/

    The latest version of this IPython notebook lecture is available at //github.com/jrjohansson/qutip-lectures.

    The other notebooks in this lecture series are indexed at //jrjohansson.github.com.

    In [1]:
    # setup the matplotlib graphics library and configure it to show 
    # figures inline in the notebook
    %matplotlib inline
    import matplotlib.pyplot as plt
    import numpy as np
    
    In [2]:
    # make qutip available in the rest of the notebook
    from qutip import *
    

    Introduction

    The Jaynes-Cumming model is the simplest possible model of quantum mechanical light-matter interaction, describing a single two-level atom interacting with a single electromagnetic cavity mode. The Hamiltonian for this system is (in dipole interaction form)

    $H = \hbar \omega_c a^\dagger a + \frac{1}{2}\hbar\omega_a\sigma_z + \hbar g(a^\dagger + a)(\sigma_- + \sigma_+)$

    or with the rotating-wave approximation

    $H_{\rm RWA} = \hbar \omega_c a^\dagger a + \frac{1}{2}\hbar\omega_a\sigma_z + \hbar g(a^\dagger\sigma_- + a\sigma_+)$

    where $\omega_c$ and $\omega_a$ are the frequencies of the cavity and atom, respectively, and $g$ is the interaction strength.

    Problem parameters

    Here we use units where $\hbar = 1$:

    In [4]:
    wc = 1.0  * 2 * pi  # cavity frequency
    wa = 1.0  * 2 * pi  # atom frequency
    g  = 0.05 * 2 * pi  # coupling strength
    kappa = 0.005       # cavity dissipation rate
    gamma = 0.05        # atom dissipation rate
    N = 15              # number of cavity fock states
    n_th_a = 0.0        # avg number of thermal bath excitation
    use_rwa = True
    
    tlist = np.linspace(0,25,101)
    

    Setup the operators, the Hamiltonian and initial state

    In [5]:
    # intial state
    psi0 = tensor(basis(N,0), basis(2,1))    # start with an excited atom
    
    # operators
    a  = tensor(destroy(N), qeye(2))
    sm = tensor(qeye(N), destroy(2))
    
    # Hamiltonian
    if use_rwa:
        H = wc * a.dag() * a + wa * sm.dag() * sm + g * (a.dag() * sm + a * sm.dag())
    else:
        H = wc * a.dag() * a + wa * sm.dag() * sm + g * (a.dag() + a) * (sm + sm.dag())
    

    Create a list of collapse operators that describe the dissipation

    In [6]:
    c_ops = []
    
    # cavity relaxation
    rate = kappa * (1 + n_th_a)
    if rate > 0.0:
        c_ops.append(sqrt(rate) * a)
    
    # cavity excitation, if temperature > 0
    rate = kappa * n_th_a
    if rate > 0.0:
        c_ops.append(sqrt(rate) * a.dag())
    
    # qubit relaxation
    rate = gamma
    if rate > 0.0:
        c_ops.append(sqrt(rate) * sm)
    

    Evolve the system

    Here we evolve the system with the Lindblad master equation solver, and we request that the expectation values of the operators $a^\dagger a$ and $\sigma_+\sigma_-$ are returned by the solver by passing the list [a.dag()*a, sm.dag()*sm] as the fifth argument to the solver.

    In [7]:
    output = mesolve(H, psi0, tlist, c_ops, [a.dag() * a, sm.dag() * sm])
    

    Visualize the results

    Here we plot the excitation probabilities of the cavity and the atom (these expectation values were calculated by the mesolve above). We can clearly see how energy is being coherently transferred back and forth between the cavity and the atom.

    In [8]:
    n_c = output.expect[0]
    n_a = output.expect[1]
    
    fig, axes = plt.subplots(1, 1, figsize=(10,6))
    
    axes.plot(tlist, n_c, label="Cavity")
    axes.plot(tlist, n_a, label="Atom excited state")
    axes.legend(loc=0)
    axes.set_xlabel('Time')
    axes.set_ylabel('Occupation probability')
    axes.set_title('Vacuum Rabi oscillations')
    
    Out[8]:
    <matplotlib.text.Text at 0x7f8f0b8c3908>

    Cavity wigner function

    In addition to the cavity's and atom's excitation probabilities, we may also be interested in for example the wigner function as a function of time. The Wigner function can give some valuable insight in the nature of the state of the resonators.

    To calculate the Wigner function in QuTiP, we first recalculte the evolution without specifying any expectation value operators, which will result in that the solver return a list of density matrices for the system for the given time coordinates.

    In [9]:
    output = mesolve(H, psi0, tlist, c_ops, [])
    

    Now, output.states contains a list of density matrices for the system for the time points specified in the list tlist:

    In [10]:
    output
    
    Out[10]:
    Odedata object with mesolve data.
    ---------------------------------
    states = True
    num_collapse = 0
    In [11]:
    type(output.states)
    
    Out[11]:
    list
    In [12]:
    len(output.states)
    
    Out[12]:
    101
    In [13]:
    output.states[-1] # indexing the list with -1 results in the last element in the list
    
    Out[13]:
    Quantum object: dims = [[15, 2], [15, 2]], shape = [30, 30], type = oper, isherm = True\begin{equation*}\left(\begin{array}{*{11}c}0.496 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 4.811\times10^{-04} & -0.015j & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.015j & 0.503 & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\\vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \vdots & \vdots & \vdots & \vdots & \vdots\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\0.0 & 0.0 & 0.0 & 0.0 & 0.0 & \cdots & 0.0 & 0.0 & 0.0 & 0.0 & 0.0\\\end{array}\right)\end{equation*}

    Now let's look at the Wigner functions at the point in time when atom is in its ground state: $t = \\{5, 15, 25\\}$ (see the plot above).

    For each of these points in time we need to:

    1. Find the system density matrix for the points in time that we are interested in.
    2. Trace out the atom and obtain the reduced density matrix for the cavity.
    3. Calculate and visualize the Wigner function fo the reduced cavity density matrix.
    In [14]:
    # find the indices of the density matrices for the times we are interested in
    t_idx = where([tlist == t for t in [0.0, 5.0, 15.0, 25.0]])[1]
    tlist[t_idx]
    
    Out[14]:
    array([  0.,   5.,  15.,  25.])
    In [15]:
    # get a list density matrices
    rho_list = array(output.states)[t_idx]
    
    In [17]:
    # loop over the list of density matrices
    
    xvec = np.linspace(-3,3,200)
    
    fig, axes = plt.subplots(1,len(rho_list), sharex=True, figsize=(3*len(rho_list),3))
    
    for idx, rho in enumerate(rho_list):
    
        # trace out the atom from the density matrix, to obtain
        # the reduced density matrix for the cavity
        rho_cavity = ptrace(rho, 0)
        
        # calculate its wigner function
        W = wigner(rho_cavity, xvec, xvec)
        
        # plot its wigner function
        axes[idx].contourf(xvec, xvec, W, 100, norm=mpl.colors.Normalize(-.25,.25), cmap=plt.get_cmap('RdBu'))
    
        axes[idx].set_title(r"$t = %.1f$" % tlist[t_idx][idx], fontsize=16)
        
    

    At $t =0$, the cavity is in it's ground state. At $t = 5, 15, 25$ it reaches it's maxium occupation in this Rabi-vacuum oscillation process. We can note that for $t=5$ and $t=15$ the Wigner function has negative values, indicating a truely quantum mechanical state. At $t=25$, however, the wigner function no longer has negative values and can therefore be considered a classical state.

    Alternative view of the same thing

    In [22]:
    t_idx = where([tlist == t for t in [0.0, 5.0, 10, 15, 20, 25]])[1]
    rho_list = array(output.states)[t_idx]
    
    fig_grid = (2, len(rho_list)*2)
    fig = plt.figure(figsize=(2.5*len(rho_list),5))
    
    for idx, rho in enumerate(rho_list):
        rho_cavity = ptrace(rho, 0)
        W = wigner(rho_cavity, xvec, xvec)
        ax = plt.subplot2grid(fig_grid, (0, 2*idx), colspan=2)
        ax.contourf(xvec, xvec, W, 100, norm=mpl.colors.Normalize(-.25,.25), cmap=plt.get_cmap('RdBu'))
        ax.set_title(r"$t = %.1f$" % tlist[t_idx][idx], fontsize=16)
    
    # plot the cavity occupation probability in the ground state
    ax = plt.subplot2grid(fig_grid, (1, 1), colspan=(fig_grid[1]-2))
    ax.plot(tlist, n_c, label="Cavity")
    ax.plot(tlist, n_a, label="Atom excited state")
    ax.legend()
    ax.set_xlabel('Time')
    ax.set_ylabel('Occupation probability');
    

    Software versions

    In [23]:
    from qutip.ipynbtools import version_table
    
    version_table()
    
    Out[23]:
    SoftwareVersion
    SciPy0.13.3
    OSposix [linux]
    Cython0.20.1post0
    QuTiP3.0.0.dev-5a88aa8
    matplotlib1.3.1
    IPython2.0.0
    Python3.4.1 (default, Jun 9 2014, 17:34:49) [GCC 4.8.3]
    Numpy1.8.1
    Thu Jun 26 13:57:53 2014 JST
  • 熊孩子不小心把弟弟锁进快递柜 消防5分钟破拆 2019-08-20
  • 春运首日 追忆那些年我们坐过的绿皮车 2019-08-20
  • 推动乡村振兴的重要举措(新知新觉) 2019-08-16
  • 中国民生投资集团获第十二届人民企业社会责任奖年度企业奖 2019-08-12
  • 蓝天下的河北—波光潋滟衡水湖 2019-08-10
  • 美对500亿美元中国商品征税 外媒美做法很不体面 2019-08-09
  • 栗战书主持召开十三届全国人大常委会第五次委员长会议 决定十三届全国人大常委会第三次会议6月19日至22日举行 2019-08-09
  • 受“闰月”影响今年端午节比去年“晚”了19天 2019-07-28
  • 海淀创业园双创文化:工艺师传播纸制花艺术与花道 2019-07-28
  • 朝韩将军级会谈时隔11年后在板门店重启 2019-07-23
  • Conférence de presse du Premier ministre chinois 2019-07-09
  • 大观园举办“古琴雅集” 市民感受“古韵端午” 2019-06-30
  • 文脉颂中华——黄河新闻网 2019-06-30
  • 水费欠账竟“穿越”16年?用户质疑:为何没见催缴过? 2019-06-21
  • 买房怎么看风水这个真的实在是太重要了 ——凤凰网房产北京 2019-06-11
  • 财神捕鱼技巧 安徽时时直播 广东时时11选5 腾讯时时彩计划软件下载 江西时时投注点 北京时时软件 天津时时彩全天在线计划 赛車pk10中奖奖金 快乐赛官网 2015开奖号 天津11选5开奖号结果查询 江苏11选5推荐专家预测 时时彩被骗去哪报警 赛车pk开奖直播盛世开奖记录 一分赛车开奖记录 四川快乐12早上开始时间