In [1]:
from numpy import sqrt
from qutip import *
In [18]:
N = 10 # pick a size for our state-space
a = destroy(N)
n = a.dag()*a
In [19]:
a*a.dag() - a.dag()*a
Out[19]:
In [20]:
n*a.dag() - a.dag()*n
Out[20]:
In [21]:
n*a.dag() - a.dag()*n == a.dag()
Out[21]:
In [22]:
psi = basis(N,2)
In [ ]:
In [ ]:
In [ ]:
X=
P=
In [92]:
psi = 1/sqrt(2)*(basis(N,1)+basis(N,2))
In [ ]:
In [10]:
psi = 1/sqrt(2)*(basis(N,2)+basis(N,4))
In [ ]: