Hello everybody,
I have found that the function XFmolecules.Xstate can return a basis which apparently does not correspond to the way in which the states are actually ordered. For example, I tried the following code:
H0_X, Bq_X, U_X, Xbasis = pylcp.hamiltonians.XFmolecules.Xstate(
N=1, I=1/2, B=1, b=5, c=1, gamma=1, q0=0, q2=0, gI=0., muB=0, return_basis=True)
print(np.diag(H0_X))
print(Xbasis)
This returns the following:
[-4.09807621e+00 -4.09807621e+00 -4.09807621e+00 5.55111512e-17
1.09807621e+00 1.09807621e+00 1.09807621e+00 1.80000000e+00
1.80000000e+00 1.80000000e+00 1.80000000e+00 1.80000000e+00]
[(0, 1, 0.5, 0., -0., -1) (0, 1, 0.5, 1., -1., -1)
(0, 1, 0.5, 1., 0., -1) (0, 1, 0.5, 1., 1., -1)
(0, 1, 1.5, 1., -1., -1) (0, 1, 1.5, 1., 0., -1)
(0, 1, 1.5, 1., 1., -1) (0, 1, 1.5, 2., -2., -1)
(0, 1, 1.5, 2., -1., -1) (0, 1, 1.5, 2., 0., -1)
(0, 1, 1.5, 2., 1., -1) (0, 1, 1.5, 2., 2., -1)]
If I understand correctly, the first three energies actually corresponds to the three mF sublevels of F=1, and the fourth one corresponds to F=0. However, the basis as returned by the function itself suggests that F=0 should be the first one. Looking at the code, it seems like the Hamiltonian is constructed such that the states are ordered by energy, but the basis is always sorted with the lowest F levels first.
Is this intended behavior? If so, it may be a good idea to clearly point that out somewhere, because it caused me quite some confusion over the past few days.
Best
Roman Bause