Rotates the dim x dim matrix 'mat' according to (rot)^dagger.mat.rot, where 'rot' is a unitary matrix. Computes only the diagonal elements of rotated matrix.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| complex(kind=dp) | :: | mat(dim,dim) | ||||
| complex(kind=dp) | :: | rot(dim,dim) | ||||
| integer | :: | dim |
function utility_rotate_diag(mat, rot, dim) !================================================! ! !! Rotates the dim x dim matrix 'mat' according to !! (rot)^dagger.mat.rot, where 'rot' is a unitary matrix. !! Computes only the diagonal elements of rotated matrix. ! !================================================! use w90_constants, only: dp integer :: dim complex(kind=dp) :: utility_rotate_diag(dim) complex(kind=dp) :: mat(dim, dim) complex(kind=dp) :: rot(dim, dim) complex(kind=dp) :: tmp(dim, dim) call utility_zgemm_new(rot, mat, tmp, 'C', 'N') utility_rotate_diag = utility_matmul_diag(tmp, rot, dim) end function utility_rotate_diag