Jump to content

Conjugate transpose: Difference between revisions

m
→‎{{header|J}}: format "FORTRAN verification" section
(→‎{{header|J}}: remove redundant definition ('mp' duplicates 'X'))
m (→‎{{header|J}}: format "FORTRAN verification" section)
Line 870:
| |1 0 1| 0 0 0j1|
+--------+-----+--------------------------+
NB. In J, PjQ is P + Q*i and the 0.7071... is sqrt(2)</lang>
 
'''Verify FORTRAN and provide testing verbs:<lang j> hermitian=: -: ct
hermitian=: -: ct
normal =: (X~ -: X) ct
unitary=: ct -: %.
 
(hermitian,normal,unitary)&.>HERMITIAN;NORMAL;UNITARY
+-----+-----+-----+
┌─────┬─────┬─────┐
│1|1 1 0│00|0 1 0│00|0 1 1│1|
+-----+-----+-----+</lang>
└─────┴─────┴─────┘</lang>
 
=={{header|Julia}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.