J.R. Johansson and P.D. Nation
For more information about QuTiP see http://qutip.org
In [1]:
from numpy import pi
In [2]:
from qutip import *
In [3]:
omega = 1.0
es1 = eseries(sigmax(), 1j * omega)
In [4]:
es1
Out[4]:
In [5]:
omega = 1.0
es2 = eseries(0.5 * sigmax(), 1j * omega) + eseries(0.5 * sigmax(), -1j * omega)
In [6]:
es2
Out[6]:
In [7]:
esval(es2, 0.0)
Out[7]:
In [8]:
tlist = [0.0, 1.0 * pi, 2.0 * pi]
esval(es2, tlist)
Out[8]:
In [9]:
es2
Out[9]:
In [10]:
expect(sigmax(), es2)
Out[10]:
In [11]:
es1 = eseries(sigmax(), 1j * omega)
es1
Out[11]:
In [12]:
es2 = eseries(sigmax(), -1j * omega)
es2
Out[12]:
In [13]:
es1 + es2
Out[13]:
In [14]:
es1 - es2
Out[14]:
In [15]:
es1 * es2
Out[15]:
In [16]:
(es1 + es2) * (es1 - es2)
Out[16]:
In [17]:
es3 = eseries([0.5*sigmaz(), 0.5*sigmaz()], [1j, -1j]) + eseries([-0.5j*sigmax(),
0.5j*sigmax()], [1j, -1j])
es3
Out[17]:
In [18]:
es3.value(0.0)
Out[18]:
In [19]:
es3.value(pi/2)
Out[19]:
In [20]:
rho = fock_dm(2, 1)
es3_expect = expect(rho, es3)
es3_expect
Out[20]:
In [21]:
es3_expect.value([0.0, pi/2])
Out[21]:
In [22]:
from qutip.ipynbtools import version_table
version_table()
Out[22]: