function get_tranformation_matrix(hamil, n_pairs) result(t_matrix)
! n_pairs is actually also a global system dependent quantitiy..
! which actually might be helpful.. but input it here!
HElement_t(dp), intent(in) :: hamil(:, :)
integer, intent(in) :: n_pairs
real(dp) :: t_matrix(size(hamil, 1), size(hamil, 2))
integer :: i, j
t_matrix = 0.0_dp
do i = 1, size(hamil, 1)
do j = 1, size(hamil, 1)
if (i == j) then
t_matrix(i, i) = n_pairs
else
if (abs(hamil(i, j)) > EPS) then
t_matrix(i, j) = sign(1.0_dp, real(hamil(i, j), dp))
end if
end if
end do
end do
t_matrix = trans_corr_param_2body / omega * t_matrix
end function get_tranformation_matrix