Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Conjugate-transpose/J/conjugate-transpose-1.j
Normal file
1
Task/Conjugate-transpose/J/conjugate-transpose-1.j
Normal file
|
|
@ -0,0 +1 @@
|
|||
ct =: +@|: NB. Conjugate transpose (ct A is A_ct)
|
||||
13
Task/Conjugate-transpose/J/conjugate-transpose-2.j
Normal file
13
Task/Conjugate-transpose/J/conjugate-transpose-2.j
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
X =: +/ . * NB. Matrix Multiply (x)
|
||||
|
||||
HERMITIAN =: 3 2j1 ,: 2j_1 1
|
||||
(-: ct) HERMITIAN NB. A_ct = A
|
||||
1
|
||||
|
||||
NORMAL =: 1 1 0 , 0 1 1 ,: 1 0 1
|
||||
((X~ -: X) ct) NORMAL NB. A_ct x A = A x A_ct
|
||||
1
|
||||
|
||||
UNITARY =: (-:%:2) * 1 1 0 , 0j_1 0j1 0 ,: 0 0 0j1 * %:2
|
||||
(ct -: %.) UNITARY NB. A_ct = A^-1
|
||||
1
|
||||
16
Task/Conjugate-transpose/J/conjugate-transpose-3.j
Normal file
16
Task/Conjugate-transpose/J/conjugate-transpose-3.j
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
HERMITIAN;NORMAL;UNITARY
|
||||
+--------+-----+--------------------------+
|
||||
| 3 2j1|1 1 0| 0.707107 0.707107 0|
|
||||
|2j_1 1|0 1 1|0j_0.707107 0j0.707107 0|
|
||||
| |1 0 1| 0 0 0j1|
|
||||
+--------+-----+--------------------------+
|
||||
NB. In J, PjQ is P + Q*i and the 0.7071... is sqrt(2)
|
||||
|
||||
hermitian=: -: ct
|
||||
normal =: (X~ -: X) ct
|
||||
unitary=: ct -: %.
|
||||
|
||||
(hermitian,normal,unitary)&.>HERMITIAN;NORMAL;UNITARY
|
||||
+-----+-----+-----+
|
||||
|1 1 0|0 1 0|0 1 1|
|
||||
+-----+-----+-----+
|
||||
Loading…
Add table
Add a link
Reference in a new issue