Hello everybody,
I am using QuTiP 4.6.2. I created the Hamiltonian for a harmonic oscillator in terms of
1) the momentum and position operator
2) the number operators
The first case runs into trouble always whereas the second does not.
The issue: When I use the momentum and position operator to create the Hamiltonian, the eigenvalues of two states in the middle of the series of states come out to be equal. this happens no matter how many Hilbert space levels I use. This issue is not there when I use the creation and annihilation operators. I should be getting identical results in both cases. Can someone point out where have I gone wrong? The code below is copied from my interpreter to show the results.
>>> import qutip as qt
>>> N = 10
# no. of states
>>> om = 1
>>> p = qt.momentum(N)
>>> x = qt.position(N)
>>> H = 0.5*(p*p+ om*om*x*x)
>>> evals, evecs = H.eigenstates()
>>> print("evals: ",evals)
evals: [0.5 1.5 2.5 3.5 4.5 4.5 5.5 6.5 7.5 8.5]
>>> # evals[4] and evals[5] are equal (Why?) <<< The error
>>> evecs[4]==evecs[5]
False
>>> # now let us use the creation and annihilation operators to create the Hamiltonian
>>> ad = qt.create(N)
>>> a = ad.dag()
>>> H1 = (ad*a + 0.5)*om
>>> evals1, evecs1 = H1.eigenstates()
>>> print("evals1: ",evals1) # <<< No trouble here
evals1: [0.5 1.5 2.5 3.5 4.5 5.5 6.5 7.5 8.5 9.5]
>>>
I would appreciate all inputs.
With my best regards
Subimal Deb