general_product Function

private function general_product(alpha, beta, n_orbs) result(basis)

Arguments

Type IntentOptional Attributes Name
integer(kind=n_int), intent(in) :: alpha
integer(kind=n_int), intent(in) :: beta
integer, intent(in) :: n_orbs

Return Value integer(kind=n_int)


Contents

Source Code


Source Code

    function general_product(alpha, beta, n_orbs) result(basis)
        ! this is a "general" tensor product of two spin basisfunctions.
        ! the ones in the alpha integer must be set at position 2*i
        ! and the beta at 2*j-1
        integer(n_int), intent(in) :: alpha, beta
        integer, intent(in) :: n_orbs
        integer(n_int) :: basis

        ! it should be as simple:
        basis = set_alpha_beta_spins(alpha, n_orbs, .false.)
        basis = xor(basis, set_alpha_beta_spins(beta, n_orbs, .true.))

    end function general_product