Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Conjugate-transpose/Racket/conjugate-transpose-1.rkt
Normal file
16
Task/Conjugate-transpose/Racket/conjugate-transpose-1.rkt
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
#lang racket
|
||||
(require math)
|
||||
(define H matrix-hermitian)
|
||||
|
||||
(define (normal? M)
|
||||
(define MH (H M))
|
||||
(equal? (matrix* MH M)
|
||||
(matrix* M MH)))
|
||||
|
||||
(define (unitary? M)
|
||||
(define MH (H M))
|
||||
(and (matrix-identity? (matrix* MH M))
|
||||
(matrix-identity? (matrix* M MH))))
|
||||
|
||||
(define (hermitian? M)
|
||||
(equal? (H M) M))
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
(define M (matrix [[3.000+0.000i +2.000+1.000i]
|
||||
[2.000-1.000i +1.000+0.000i]]))
|
||||
(H M)
|
||||
(normal? M)
|
||||
(unitary? M)
|
||||
(hermitian? M)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(array #[#[3.0-0.0i 2.0+1.0i] #[2.0-1.0i 1.0-0.0i]])
|
||||
#t
|
||||
#f
|
||||
#f
|
||||
Loading…
Add table
Add a link
Reference in a new issue