Example #1
0
    def mat_fn_offdiag(self, p1, p2):
        '''Calculate an off-diagonal matrix element.

:type p1: iterable of :class:`BasisFn` objects
:param p1: a Hartree product basis function, `|p_1\\rangle`
:type p2: iterable of :class:`BasisFn` objects
:param p2: a Hartree product basis function, `|p_2\\rangle`

:rtype: float
:returns:  `\langle p_1|H|p_2 \\rangle`
'''
        # <p|H|p'> = <ij|U|ab>

        # Matrix element non-zero if exactly two spin-orbitals differ.
        # Order matters in Hartree products, so the differing spin-orbitals
        # must appear in the same place.

        # Kinetic operator is diagonal in a plane-wave basis, so only have
        # Coulomb integrals.

        # No exchange integrals in a Hartree product basis, of course.

        (from_1, to_2) = hamil.hartree_excitation(p1, p2)

        hmatel = 0
        if len(from_1) == 2:
            if from_1[0].spin == to_2[0].spin and from_1[1].spin == to_2[1].spin:
                # Coulomb
                hmatel = self.sys.coulomb_int(from_1[0].kp - to_2[0].kp)

        return hmatel
Example #2
0
    def mat_fn_offdiag(self, p1, p2):
        '''Calculate an off-diagonal matrix element.

:type p1: iterable of :class:`BasisFn` objects
:param p1: a Hartree product basis function, `|p_1\\rangle`
:type p2: iterable of :class:`BasisFn` objects
:param p2: a Hartree product basis function, `|p_2\\rangle`

:rtype: float
:returns:  `\langle p_1|H|p_2 \\rangle`
'''
        # <p|H|p'> = <ij|U|ab>

        # Matrix element non-zero if exactly two spin-orbitals differ.
        # Order matters in Hartree products, so the differing spin-orbitals
        # must appear in the same place.

        # Kinetic operator is diagonal in a plane-wave basis, so only have
        # Coulomb integrals.

        # No exchange integrals in a Hartree product basis, of course.

        (from_1, to_2) = hamil.hartree_excitation(p1, p2)

        hmatel = 0
        if len(from_1) == 2:
            if from_1[0].spin == to_2[0].spin and from_1[1].spin == to_2[
                    1].spin:
                # Coulomb
                hmatel = self.sys.coulomb_int(from_1[0].kp - to_2[0].kp)

        return hmatel
Example #3
0
    def mat_fn_offdiag(self, bi, bj):
        '''Calculate an off-diagonal Hamiltonian matrix element.

:type bi: iterable of :class:`LatticeSite` objects
:param bi: a Hartree product basis function, `|b_i\\rangle`
:type bj: iterable of :class:`LatticeSite` objects
:param bj: a Hartree product basis function, `|b_j\\rangle`

:rtype: float
:returns: `\langle b_i|H|b_j \\rangle`.
'''
        # H = - \sum_{<ij>} (c_i^\dagger c_j + c_j^\dagger c_i - n_i n_j)
        # Coulomb operator is diagonal in this basis.
        # Kinetic term only if excitation involves moving a fermion from
        # a lattice site to a connected lattice site.

        (from_i, to_j) = hamil.hartree_excitation(bi, bj)

        if len(from_i) == 1:
            hmatel = self.sys.hopping_int(from_i[0], to_j[0])
        else:
            hmatel = 0

        return hmatel
Example #4
0
    def mat_fn_offdiag(self, bi, bj):
        '''Calculate an off-diagonal Hamiltonian matrix element.

:type bi: iterable of :class:`LatticeSite` objects
:param bi: a Hartree product basis function, `|b_i\\rangle`
:type bj: iterable of :class:`LatticeSite` objects
:param bj: a Hartree product basis function, `|b_j\\rangle`

:rtype: float
:returns: `\langle b_i|H|b_j \\rangle`.
'''
        # H = - \sum_{<ij>} (c_i^\dagger c_j + c_j^\dagger c_i - n_i n_j)
        # Coulomb operator is diagonal in this basis.
        # Kinetic term only if excitation involves moving a fermion from
        # a lattice site to a connected lattice site.

        (from_i, to_j) = hamil.hartree_excitation(bi, bj)

        if len(from_i) == 1:
            hmatel = self.sys.hopping_int(from_i[0], to_j[0])
        else:
            hmatel = 0

        return hmatel