similarity_transform Function

public function similarity_transform(H, t_mat_opt) result(trans_H)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: H(:,:)
real(kind=dp), intent(in), optional :: t_mat_opt(:,:)

Return Value real(kind=dp), (size(H,1),size(H,2))


Contents

Source Code


Source Code

    function similarity_transform(H, t_mat_opt) result(trans_H)
        HElement_t(dp), intent(in) :: H(:, :)
        HElement_t(dp), intent(in), optional :: t_mat_opt(:, :)
        real(dp) :: trans_H(size(H, 1), size(H, 2))

        HElement_t(dp) :: t_mat(size(H, 1), size(H, 2))

        if (present(t_mat_opt)) then
            t_mat = t_mat_opt
        else
            ! otherwise assume the on-site correlation factor is used
            t_mat = get_tranformation_matrix(H, nOccAlpha * nOccBeta)
        end if

        trans_H = blas_matmul(blas_matmul(matrix_exponential(-t_mat), H), matrix_exponential(t_mat))

    end function similarity_transform