Update all new Tasks
This commit is contained in:
parent
00a190b0a6
commit
91df62d461
5697 changed files with 93386 additions and 804 deletions
14
Task/Conjugate-transpose/Factor/conjugate-transpose.factor
Normal file
14
Task/Conjugate-transpose/Factor/conjugate-transpose.factor
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
USING: kernel math.functions math.matrices sequences ;
|
||||
IN: rosetta.hermitian
|
||||
|
||||
: conj-t ( matrix -- conjugate-transpose )
|
||||
flip [ [ conjugate ] map ] map ;
|
||||
|
||||
: hermitian-matrix? ( matrix -- ? )
|
||||
dup conj-t = ;
|
||||
|
||||
: normal-matrix? ( matrix -- ? )
|
||||
dup conj-t [ m. ] [ swap m. ] 2bi = ;
|
||||
|
||||
: unitary-matrix? ( matrix -- ? )
|
||||
[ dup conj-t m. ] [ length identity-matrix ] bi = ;
|
||||
Loading…
Add table
Add a link
Reference in a new issue