@@ -19,8 +19,8 @@ for k in range(n):
19
19
Aij = np .append (Aij , np .complex128 (complex ( 200. , 200. ))) # Casting value on append is MANDATORY or C++ won't get the expected type.
20
20
if l == k - 1 :
21
21
Aij = np .append (Aij , np .complex128 (complex (- 101. , - 101. ))) # Casting value on append is MANDATORY or C++ won't get the expected type.
22
- if l == k + 1 :
23
- Aij = np .append (Aij , np .complex128 (complex ( - 99 . , - 99 . ))) # Casting value on append is MANDATORY or C++ won't get the expected type.
22
+ if l == k + 1 : # Note: matrix must be hermitian.
23
+ Aij = np .append (Aij , np .complex128 (complex (- 101 . , 101 . ))) # Casting value on append is MANDATORY or C++ won't get the expected type.
24
24
for k , l , Akl in zip (i , j , Aij ):
25
25
print ("A[" , k , "," , l , "] =" , Akl )
26
26
A = (n , i , j , Aij ) # coo format: dimension, i 0-based indices, j 0-based indices, Aij values.
@@ -80,9 +80,9 @@ for k in range(n):
80
80
if l == k - 1 :
81
81
Aij = np .append (Aij , np .complex64 (complex (- 101. , - 101. ))) # Casting value on append is MANDATORY or C++ won't get the expected type.
82
82
Bij = np .append (Bij , np .complex64 (complex ( 16.6 , 16.6 ))) # Casting value on append is MANDATORY or C++ won't get the expected type.
83
- if l == k + 1 :
84
- Aij = np .append (Aij , np .complex64 (complex ( - 99 . , - 99 . ))) # Casting value on append is MANDATORY or C++ won't get the expected type.
85
- Bij = np .append (Bij , np .complex64 (complex ( 16.6 , 16.6 ))) # Casting value on append is MANDATORY or C++ won't get the expected type.
83
+ if l == k + 1 : # Note: matrix must be hermitian.
84
+ Aij = np .append (Aij , np .complex64 (complex (- 101 . , 101 . ))) # Casting value on append is MANDATORY or C++ won't get the expected type.
85
+ Bij = np .append (Bij , np .complex64 (complex ( 16.6 , - 16.6 ))) # Casting value on append is MANDATORY or C++ won't get the expected type.
86
86
for k , l , Akl in zip (i , j , Aij ):
87
87
print ("A[" , k , "," , l , "] =" , Akl )
88
88
for k , l , Bkl in zip (i , j , Bij ):
0 commit comments