<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def unperturbed_hamiltonian(states):
 r"""Return the unperturbed atomic hamiltonian for given states. We calcualte the atomic hamiltonian in the basis of the ground states of \ rubidium 87 (in GHz). [-4.2717+0.j -4.2717+0.j -4.2717+0.j 2.563 +0.j 2.563 +0.j 2.563 +0.j 2.563 +0.j 2.563 +0.j] """

    Ne = len(states)
    H0 = np.zeros((Ne, Ne), complex)
    for i in range(Ne):
        H0[i, i] = hbar*states[i].omega
    return H0