Rotates the dim x dim matrix 'mat' according to (rot)^dagger.mat.rot, where 'rot' is a unitary matrix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
complex(kind=dp) | :: | mat(dim,dim) | ||||
complex(kind=dp) | :: | rot(dim,dim) | ||||
integer | :: | dim |
function utility_rotate(mat, rot, dim)
!==========================================================!
! !
!! Rotates the dim x dim matrix 'mat' according to
!! (rot)^dagger.mat.rot, where 'rot' is a unitary matrix
! !
!===========================================================!
use w90_constants, only: dp
integer :: dim
complex(kind=dp) :: utility_rotate(dim, dim)
complex(kind=dp) :: mat(dim, dim)
complex(kind=dp) :: rot(dim, dim)
utility_rotate = matmul(matmul(transpose(conjg(rot)), mat), rot)
end function utility_rotate