# :code:`e` and eignvectors :code:`v` where eigenvalue :code:`e[i]` corresponds # to eigenvector :code:`v[:,i]`. e, v = scipy.linalg.eigh(H) print("{} eignvalues and {} eigvenvectors {} elements long.".format( len(e), v.shape[1], v.shape[0])) ################################################################################ # Computing expectation values # ------------------------------------------------------------------------------ # To interpret the results, it is informative to compute the expectations values # related to the spin :math:`\mathbf{S}`, orbital :math:`\mathbf{L}`, # and total :math:`\mathbf{J}`, angular momentum. We first load the relevant # matrices for these quantities for a `p` atomic shell. We need to specifiy # that we would like to include spin when loading the orbital operator. orb_mom = edrixs.get_orb_momentum(l, ispin=True) spin_mom = edrixs.get_spin_momentum(l) tot_mom = orb_mom + spin_mom ################################################################################ # We again transform these matrices to our Fock basis to build the operators n_fermion = 2 opL, opS, opJ = edrixs.build_opers(n_fermion, [orb_mom, spin_mom, tot_mom], basis) ################################################################################ # Recall that quantum mechanics forbids us from knowing all three Cartesian # components of angular momentum at once, so we want to compute the squares of # these operators i.e. # # .. math:: # \mathbf{S}^2 = S^2_x + S^2_y + S^2_z\\
# The 4-rank tensor is in the complex spherical Harmonics basis umat = edrixs.get_umat_slater('t2g', F0, F2, F4) # Fock basis in the complex spherical Harmonics basis with the orbital ordering: # |-1,up>, |-1,dn>, |0,up>, |0,dn>, |+1,up>, |+1,dn> # basis: 2d list of integers with 1 or 0, the shape is (15, 6) in this case # where, 15=6*5/2 is the total number of Fock basis and 6 is the total number of # single-particle orbitals basis = edrixs.get_fock_bin_by_N(norb, noccu) # quantum number of orbital angular momentum for t2g: l=1 ll = 1 # Matrices of lx,ly,lz,sx,sy,sz,jx,jy,jz in the single-particle basis # lx: l_orb[0], ly: l_orb[1], lz: l_orb[2] l_orb = edrixs.get_orb_momentum(ll, True) # sx: s_spin[0], sy: s_spin[1], sz: s_spin[2] s_spin = edrixs.get_spin_momentum(ll) # jx: j_so[0], jy: j_so[1], jz: j_so[2] j_so = l_orb + s_spin # very small Zeeman splitting along z-direction emat_zeeman = (l_orb[2] + s_spin[2]) * 1e-10 # many-body operators of L^2, Lz Lxyz = edrixs.build_opers(2, l_orb, basis) L2 = np.dot(Lxyz[0], Lxyz[0]) + np.dot(Lxyz[1], Lxyz[1]) + np.dot( Lxyz[2], Lxyz[2]) Lz = Lxyz[2] # many-body operators of S^2, Sz Sxyz = edrixs.build_opers(2, s_spin, basis) S2 = np.dot(Sxyz[0], Sxyz[0]) + np.dot(Sxyz[1], Sxyz[1]) + np.dot( Sxyz[2], Sxyz[2])
e, v = scipy.linalg.eigh(H) return e, v ################################################################################ # The large :math:`U` limit # ------------------------------------------------------------------------------ # Let us see what happens with :math:`U \gg t`. e, v = diagonalize(1000, 1) print("Energies are") print(e) ################################################################################ # To analyze what is going on we can determine the spin expectation values # of the cluster. Building the operators follows the same form as the # Hamiltonian and the previous example. spin_mom_one_site = edrixs.get_spin_momentum(ll) spin_mom = np.zeros((3, norb, norb), dtype=np.complex128) spin_mom[:, :2, :2] = spin_mom[:, 2:, 2:] = spin_mom_one_site opS = edrixs.build_opers(2, spin_mom, basis) opS_squared = (np.dot(opS[0], opS[0]) + np.dot(opS[1], opS[1]) + np.dot(opS[2], opS[2])) ################################################################################ # This time let us include a tiny magnetic field along the :math:`z`-axis, so # that we have a well-defined measurement axis and print out the expectation # values. zeeman = np.zeros((norb, norb), dtype=np.complex128) zeeman[:2, :2] = zeeman[2:, 2:] = 1e-8*spin_mom_one_site[2] e, v = diagonalize(1000, 1, extra_emat=zeeman)