File: z2mctm.f90

package info (click to toggle)
elkcode 5.4.24-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 12,840 kB
  • sloc: f90: 48,415; fortran: 22,457; perl: 965; makefile: 384; sh: 369; python: 105; ansic: 67
file content (33 lines) | stat: -rw-r--r-- 975 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

! Copyright (C) 2007 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
! This file is distributed under the terms of the GNU Lesser General Public
! License. See the file COPYING for license details.

!BOP
! !ROUTINE: z2mctm
! !INTERFACE:
subroutine z2mctm(a,b,c)
! !INPUT/OUTPUT PARAMETERS:
!   a : input matrix 1 (in,complex(2,2))
!   b : input matrix 2 (in,complex(2,2))
!   c : output matrix (out,complex(2,2))
! !DESCRIPTION:
!   Multiplies the conjugate transpose of one complex $2\times 2$ matrix with
!   another. Note that the output matrix cannot be one of the input matrices.
!
! !REVISION HISTORY:
!   Created October 2007 (JKD)
!EOP
!BOC
implicit none
! arguments
complex(8), intent(in) :: a(2,2),b(2,2)
complex(8), intent(out) :: c(2,2)
c(1,1)=conjg(a(1,1))*b(1,1)+conjg(a(2,1))*b(2,1)
c(2,1)=conjg(a(1,2))*b(1,1)+conjg(a(2,2))*b(2,1)
c(1,2)=conjg(a(1,1))*b(1,2)+conjg(a(2,1))*b(2,2)
c(2,2)=conjg(a(1,2))*b(1,2)+conjg(a(2,2))*b(2,2)
return
end subroutine
!EOC