Расхождение между результатами logm из MATLAB и scipy.linalg - PullRequest
0 голосов
/ 03 августа 2020

Я получил разные матрицы после применения logm к унитарной матрице (H = i * logm (U)) из 2020 IBM-challenge 4 с использованием MATLAB и scipy.linalg. И я почти уверен, что результат MATLAB верен, потому что, если U - унитарная матрица, H (где H = iln (U)) должна быть эрмитовой матрицей. Но scipy результат не дает эрмитовой матрицы.

(я пробовал использовать scipy 1.4.0, 1.4.1, 1.5.0 и 1.5.1 и получил ту же проблему)

# ibm challenge
U = np.array([[-0.21338835+0.33838835j, -0.14016504-0.08838835j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, -0.08838835+0.14016504j, 0.33838835+0.21338835j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, 0.39016504+0.08838835j, -0.03661165+0.16161165j, 0.16161165+0.03661165j, 0.08838835-0.39016504j, 0.08838835-0.03661165j, -0.08838835-0.21338835j],
[-0.14016504-0.08838835j, -0.21338835+0.33838835j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.33838835+0.21338835j, -0.08838835+0.14016504j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.03661165+0.16161165j, 0.39016504+0.08838835j, 0.08838835-0.39016504j, 0.16161165+0.03661165j, -0.08838835-0.21338835j, 0.08838835-0.03661165j],
[ 0.21338835-0.08838835j, 0.03661165+0.08838835j, -0.21338835+0.33838835j, -0.14016504-0.08838835j, -0.08838835+0.14016504j, 0.33838835+0.21338835j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, 0.39016504+0.08838835j, -0.03661165+0.16161165j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, 0.16161165+0.03661165j, 0.08838835-0.39016504j],
[ 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.14016504-0.08838835j, -0.21338835+0.33838835j, 0.33838835+0.21338835j, -0.08838835+0.14016504j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, -0.03661165+0.16161165j, 0.39016504+0.08838835j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.08838835-0.39016504j, 0.16161165+0.03661165j],
[ 0.08838835-0.03661165j, -0.08838835-0.21338835j, -0.08838835+0.14016504j, 0.33838835+0.21338835j, -0.21338835+0.33838835j, -0.14016504-0.08838835j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, 0.16161165+0.03661165j, 0.08838835-0.39016504j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, 0.39016504+0.08838835j, -0.03661165+0.16161165j],
[-0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.33838835+0.21338835j, -0.08838835+0.14016504j, -0.14016504-0.08838835j, -0.21338835+0.33838835j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, 0.08838835-0.39016504j, 0.16161165+0.03661165j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.03661165+0.16161165j, 0.39016504+0.08838835j],
[-0.08838835+0.14016504j, 0.33838835+0.21338835j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, -0.21338835+0.33838835j, -0.14016504-0.08838835j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, 0.16161165+0.03661165j, 0.08838835-0.39016504j, 0.39016504+0.08838835j, -0.03661165+0.16161165j, 0.21338835-0.08838835j, 0.03661165+0.08838835j],
[ 0.33838835+0.21338835j, -0.08838835+0.14016504j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.14016504-0.08838835j, -0.21338835+0.33838835j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.08838835-0.39016504j, 0.16161165+0.03661165j, -0.03661165+0.16161165j, 0.39016504+0.08838835j, 0.03661165+0.08838835j, 0.21338835-0.08838835j],
[ 0.21338835-0.08838835j, 0.03661165+0.08838835j, 0.39016504+0.08838835j, -0.03661165+0.16161165j, 0.16161165+0.03661165j, 0.08838835-0.39016504j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, -0.21338835+0.33838835j, -0.14016504-0.08838835j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, -0.08838835+0.14016504j, 0.33838835+0.21338835j],
[ 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.03661165+0.16161165j, 0.39016504+0.08838835j, 0.08838835-0.39016504j, 0.16161165+0.03661165j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, -0.14016504-0.08838835j, -0.21338835+0.33838835j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.33838835+0.21338835j, -0.08838835+0.14016504j],
[ 0.39016504+0.08838835j, -0.03661165+0.16161165j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, 0.16161165+0.03661165j, 0.08838835-0.39016504j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, -0.21338835+0.33838835j, -0.14016504-0.08838835j, -0.08838835+0.14016504j, 0.33838835+0.21338835j, 0.08838835-0.03661165j, -0.08838835-0.21338835j],
[-0.03661165+0.16161165j, 0.39016504+0.08838835j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.08838835-0.39016504j, 0.16161165+0.03661165j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.14016504-0.08838835j, -0.21338835+0.33838835j, 0.33838835+0.21338835j, -0.08838835+0.14016504j, -0.08838835-0.21338835j, 0.08838835-0.03661165j],
[ 0.16161165+0.03661165j, 0.08838835-0.39016504j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, 0.39016504+0.08838835j, -0.03661165+0.16161165j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, -0.08838835+0.14016504j, 0.33838835+0.21338835j, -0.21338835+0.33838835j, -0.14016504-0.08838835j, 0.21338835-0.08838835j, 0.03661165+0.08838835j],
[ 0.08838835-0.39016504j, 0.16161165+0.03661165j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.03661165+0.16161165j, 0.39016504+0.08838835j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.33838835+0.21338835j, -0.08838835+0.14016504j, -0.14016504-0.08838835j, -0.21338835+0.33838835j, 0.03661165+0.08838835j, 0.21338835-0.08838835j],
[ 0.08838835-0.03661165j, -0.08838835-0.21338835j, 0.16161165+0.03661165j, 0.08838835-0.39016504j, 0.39016504+0.08838835j, -0.03661165+0.16161165j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, -0.08838835+0.14016504j, 0.33838835+0.21338835j, 0.08838835-0.03661165j, -0.08838835-0.21338835j, 0.21338835-0.08838835j, 0.03661165+0.08838835j, -0.21338835+0.33838835j, -0.14016504-0.08838835j],
[-0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.08838835-0.39016504j, 0.16161165+0.03661165j, -0.03661165+0.16161165j, 0.39016504+0.08838835j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, 0.33838835+0.21338835j, -0.08838835+0.14016504j, -0.08838835-0.21338835j, 0.08838835-0.03661165j, 0.03661165+0.08838835j, 0.21338835-0.08838835j, -0.14016504-0.08838835j, -0.21338835+0.33838835j]])

#scipy
H = 1j*scipy.linalg.logm(U)
np.around(H,decimals=8)
#output from scipy
array([[-1.17809725+0.j        ,  0.38099484+0.00946823j,
         0.43661075-0.01263701j, -0.03220742+0.00316877j,
         0.03220742-0.00316877j, -0.04391167+0.012637j  ,
        -0.77369392-0.00946824j,  0.        -0.j        ,
         0.36049166+0.00316876j,  0.04391166-0.012637j  ,
        -0.01170425+0.00946824j, -0.78539816-0.j        ,
         0.78539816+0.j        ,  0.79710241-0.00946824j,
        -0.04391167+0.012637j  ,  0.03220742-0.00316877j],
       [ 0.39269909-0.j        , -1.06525495+0.06921355j,
        -0.23366775-0.32686554j,  0.51352453+0.257652j  ,
        -0.12082544-0.257652j  ,  0.23366774+0.32686554j,
        -0.1128423 -0.06921354j, -0.78539816+0.j        ,
         0.12082544+0.257652j  ,  0.15903134-0.32686555j,
        -0.67255586+0.06921354j, -0.        +0.j        ,
         0.78539816-0.j        ,  0.67255586-0.06921354j,
         0.23366774+0.32686554j, -0.12082544-0.257652j  ],
       [ 0.39269909-0.j        , -0.28325293+0.10409559j,
        -0.26318476+0.04375582j, -0.23896048-0.14785141j,
        -0.1537386 +0.14785141j, -0.91491249-0.04375582j,
         0.28325293-0.10409559j,  0.        -0.j        ,
        -0.63165957-0.1478514j ,  0.12951433+0.04375582j,
         0.10944616+0.10409558j, -0.        +0.j        ,
         0.        +0.j        ,  0.28325293-0.10409559j,
        -0.12951433-0.04375582j,  1.41705772+0.14785141j],
       [-0.        +0.j        ,  0.57481396-0.18277737j,
        -0.33245733+0.29574672j, -0.63505571-0.11296936j,
        -0.54304154+0.11296936j, -0.06024175-0.29574673j,
        -0.18211488+0.18277737j,  0.        +0.j        ,
        -0.24235662-0.11296936j, -0.72515642+0.29574673j,
         0.18211487-0.18277736j,  0.39269909-0.j        ,
         0.        -0.j        , -0.18211488+0.18277737j,
         1.51055458-0.29574673j,  0.24235663+0.11296936j],
       [-0.        +0.j        , -0.18211488+0.18277737j,
        -0.06024175-0.29574673j, -0.54304154+0.11296936j,
        -0.63505571-0.11296936j, -0.33245733+0.29574672j,
         0.57481396-0.18277737j, -0.        +0.j        ,
         0.24235663+0.11296936j,  1.51055458-0.29574673j,
        -0.18211488+0.18277737j,  0.        -0.j        ,
         0.39269909-0.j        ,  0.18211487-0.18277736j,
        -0.72515642+0.29574673j, -0.24235662-0.11296936j],
       [ 0.        +0.j        ,  0.28325293-0.10409559j,
        -0.91491249-0.04375582j, -0.1537386 +0.14785141j,
        -0.23896048-0.14785141j, -0.26318476+0.04375582j,
        -0.28325293+0.10409559j,  0.39269909-0.j        ,
         1.41705772+0.14785141j, -0.12951433-0.04375582j,
         0.28325293-0.10409559j,  0.        -0.j        ,
        -0.        +0.j        ,  0.10944616+0.10409558j,
         0.12951433+0.04375582j, -0.63165957-0.1478514j ],
       [-0.78539816-0.j        , -0.1128423 -0.06921354j,
         0.23366774+0.32686554j, -0.12082544-0.257652j  ,
         0.51352453+0.257652j  , -0.23366775-0.32686554j,
        -1.06525495+0.06921355j,  0.39269909-0.j        ,
        -0.12082544-0.257652j  ,  0.23366774+0.32686554j,
         0.67255586-0.06921354j,  0.78539816+0.j        ,
        -0.        +0.j        , -0.67255586+0.06921354j,
         0.15903134-0.32686555j,  0.12082544+0.257652j  ],
       [ 0.        +0.j        , -0.77369392-0.00946824j,
        -0.04391167+0.012637j  ,  0.03220742-0.00316877j,
        -0.03220742+0.00316877j,  0.43661075-0.01263701j,
         0.38099484+0.00946823j, -1.17809725+0.j        ,
         0.03220742-0.00316877j, -0.04391167+0.012637j  ,
         0.79710241-0.00946824j,  0.78539816+0.j        ,
        -0.78539816-0.j        , -0.01170425+0.00946824j,
         0.04391166-0.012637j  ,  0.36049166+0.00316876j],
       [ 0.39269909-0.j        ,  0.18211487-0.18277736j,
        -0.72515642+0.29574673j, -0.24235662-0.11296936j,
         0.24235663+0.11296936j,  1.51055458-0.29574673j,
        -0.18211488+0.18277737j, -0.        -0.j        ,
        -0.63505571-0.11296936j, -0.33245733+0.29574672j,
         0.57481396-0.18277737j, -0.        +0.j        ,
        -0.        +0.j        , -0.18211488+0.18277737j,
        -0.06024175-0.29574673j, -0.54304154+0.11296936j],
       [-0.        +0.j        ,  0.10944616+0.10409558j,
         0.12951433+0.04375582j, -0.63165957-0.1478514j ,
         1.41705772+0.14785141j, -0.12951433-0.04375582j,
         0.28325293-0.10409559j, -0.        +0.j        ,
        -0.23896048-0.14785141j, -0.26318476+0.04375582j,
        -0.28325293+0.10409559j,  0.39269909-0.j        ,
         0.        +0.j        ,  0.28325293-0.10409559j,
        -0.91491249-0.04375582j, -0.1537386 +0.14785141j],
       [-0.        +0.j        , -0.67255586+0.06921354j,
         0.15903134-0.32686555j,  0.12082544+0.257652j  ,
        -0.12082544-0.257652j  ,  0.23366774+0.32686554j,
         0.67255586-0.06921354j,  0.78539816-0.j        ,
         0.51352453+0.257652j  , -0.23366775-0.32686554j,
        -1.06525495+0.06921355j,  0.39269909-0.j        ,
        -0.78539816-0.j        , -0.1128423 -0.06921354j,
         0.23366774+0.32686554j, -0.12082544-0.257652j  ],
       [-0.78539816-0.j        , -0.01170425+0.00946824j,
         0.04391166-0.012637j  ,  0.36049166+0.00316876j,
         0.03220742-0.00316877j, -0.04391167+0.012637j  ,
         0.79710241-0.00946824j,  0.78539816-0.j        ,
        -0.03220742+0.00316877j,  0.43661075-0.01263701j,
         0.38099484+0.00946823j, -1.17809725+0.j        ,
         0.        +0.j        , -0.77369392-0.00946824j,
        -0.04391167+0.012637j  ,  0.03220742-0.00316877j],
       [ 0.78539816-0.j        ,  0.79710241-0.00946824j,
        -0.04391167+0.012637j  ,  0.03220742-0.00316877j,
         0.36049166+0.00316876j,  0.04391166-0.012637j  ,
        -0.01170425+0.00946824j, -0.78539816-0.j        ,
         0.03220742-0.00316877j, -0.04391167+0.012637j  ,
        -0.77369392-0.00946824j, -0.        -0.j        ,
        -1.17809725+0.j        ,  0.38099484+0.00946823j,
         0.43661075-0.01263701j, -0.03220742+0.00316877j],
       [ 0.78539816+0.j        ,  0.67255586-0.06921354j,
         0.23366774+0.32686554j, -0.12082544-0.257652j  ,
         0.12082544+0.257652j  ,  0.15903134-0.32686555j,
        -0.67255586+0.06921354j, -0.        +0.j        ,
        -0.12082544-0.257652j  ,  0.23366774+0.32686554j,
        -0.1128423 -0.06921354j, -0.78539816-0.j        ,
         0.39269909-0.j        , -1.06525495+0.06921355j,
        -0.23366775-0.32686554j,  0.51352453+0.257652j  ],
       [-0.        -0.j        ,  0.28325293-0.10409559j,
        -0.12951433-0.04375582j,  1.41705772+0.14785141j,
        -0.63165957-0.1478514j ,  0.12951433+0.04375582j,
         0.10944616+0.10409558j, -0.        +0.j        ,
        -0.1537386 +0.14785141j, -0.91491249-0.04375582j,
         0.28325293-0.10409559j,  0.        +0.j        ,
         0.39269909-0.j        , -0.28325293+0.10409559j,
        -0.26318476+0.04375582j, -0.23896048-0.14785141j],
       [-0.        +0.j        , -0.18211488+0.18277737j,
         1.51055458-0.29574673j,  0.24235663+0.11296936j,
        -0.24235662-0.11296936j, -0.72515642+0.29574673j,
         0.18211487-0.18277736j,  0.39269909-0.j        ,
        -0.54304154+0.11296936j, -0.06024175-0.29574673j,
        -0.18211488+0.18277737j, -0.        +0.j        ,
        -0.        +0.j        ,  0.57481396-0.18277737j,
        -0.33245733+0.29574672j, -0.63505571-0.11296936j]])

#MATLAB input
U = [-0.21338835+0.33838835i -0.14016504-0.08838835i 0.21338835-0.08838835i 0.03661165+0.08838835i 0.08838835-0.03661165i -0.08838835-0.21338835i -0.08838835+0.14016504i 0.33838835+0.21338835i 0.21338835-0.08838835i 0.03661165+0.08838835i 0.39016504+0.08838835i -0.03661165+0.16161165i 0.16161165+0.03661165i 0.08838835-0.39016504i 0.08838835-0.03661165i -0.08838835-0.21338835i;
     -0.14016504-0.08838835i -0.21338835+0.33838835i 0.03661165+0.08838835i 0.21338835-0.08838835i -0.08838835-0.21338835i 0.08838835-0.03661165i 0.33838835+0.21338835i -0.08838835+0.14016504i 0.03661165+0.08838835i 0.21338835-0.08838835i -0.03661165+0.16161165i 0.39016504+0.08838835i 0.08838835-0.39016504i 0.16161165+0.03661165i -0.08838835-0.21338835i 0.08838835-0.03661165i;
     0.21338835-0.08838835i 0.03661165+0.08838835i -0.21338835+0.33838835i -0.14016504-0.08838835i -0.08838835+0.14016504i 0.33838835+0.21338835i 0.08838835-0.03661165i -0.08838835-0.21338835i 0.39016504+0.08838835i -0.03661165+0.16161165i 0.21338835-0.08838835i 0.03661165+0.08838835i 0.08838835-0.03661165i -0.08838835-0.21338835i 0.16161165+0.03661165i 0.08838835-0.39016504i]
H = i*logm(U)

#output from MATLAB
H =

  Columns 1 through 5

  -0.0000 + 0.0000i   0.0000 - 0.0000i   0.0000 - 0.0000i  -0.3927 + 0.0000i   0.3927 + 0.0000i
   0.0000 - 0.0000i  -0.0000 + 0.0000i  -0.3927 + 0.0000i   0.0000 - 0.0000i   0.3927 - 0.0000i
   0.0000 - 0.0000i  -0.3927 + 0.0000i  -0.0000 + 0.0000i   0.0000 - 0.0000i  -0.3927 - 0.0000i
  -0.3927 + 0.0000i   0.0000 - 0.0000i   0.0000 - 0.0000i  -0.0000 + 0.0000i  -1.1781 + 0.0000i
   0.3927 - 0.0000i   0.3927 - 0.0000i  -0.3927 - 0.0000i  -1.1781 + 0.0000i  -0.0000 + 0.0000i
   0.3927 - 0.0000i   0.3927 - 0.0000i  -1.1781 + 0.0000i  -0.3927 + 0.0000i   0.0000 - 0.0000i
  -0.3927 - 0.0000i  -1.1781 - 0.0000i   0.3927 + 0.0000i   0.3927 + 0.0000i   0.0000 - 0.0000i
  -1.1781 + 0.0000i  -0.3927 - 0.0000i   0.3927 - 0.0000i   0.3927 + 0.0000i  -0.3927 + 0.0000i
   0.0000 - 0.0000i  -0.3927 + 0.0000i  -0.3927 + 0.0000i   0.3927 - 0.0000i  -0.3927 - 0.0000i
  -0.3927 + 0.0000i   0.0000 - 0.0000i   0.3927 - 0.0000i  -0.3927 + 0.0000i   1.1781 - 0.0000i
  -0.3927 + 0.0000i   0.3927 - 0.0000i   0.0000 - 0.0000i  -0.3927 + 0.0000i   0.3927 + 0.0000i
   0.3927 - 0.0000i  -0.3927 + 0.0000i  -0.3927 + 0.0000i   0.0000 - 0.0000i   0.3927 + 0.0000i
  -0.3927 + 0.0000i   1.1781 - 0.0000i   0.3927 - 0.0000i   0.3927 + 0.0000i   0.0000 - 0.0000i
   1.1781 - 0.0000i  -0.3927 - 0.0000i   0.3927 - 0.0000i   0.3927 - 0.0000i  -0.3927 + 0.0000i
   0.3927 - 0.0000i   0.3927 + 0.0000i  -0.3927 + 0.0000i   1.1781 - 0.0000i  -0.3927 + 0.0000i
   0.3927 - 0.0000i   0.3927 + 0.0000i   1.1781 - 0.0000i  -0.3927 - 0.0000i   0.3927 - 0.0000i

  Columns 6 through 10

   0.3927 + 0.0000i  -0.3927 + 0.0000i  -1.1781 - 0.0000i   0.0000 - 0.0000i  -0.3927 + 0.0000i
   0.3927 - 0.0000i  -1.1781 + 0.0000i  -0.3927 - 0.0000i  -0.3927 + 0.0000i   0.0000 - 0.0000i
  -1.1781 - 0.0000i   0.3927 - 0.0000i   0.3927 - 0.0000i  -0.3927 + 0.0000i   0.3927 - 0.0000i
  -0.3927 + 0.0000i   0.3927 - 0.0000i   0.3927 + 0.0000i   0.3927 - 0.0000i  -0.3927 + 0.0000i
   0.0000 - 0.0000i   0.0000 - 0.0000i  -0.3927 + 0.0000i  -0.3927 + 0.0000i   1.1781 - 0.0000i
  -0.0000 + 0.0000i  -0.3927 + 0.0000i   0.0000 - 0.0000i   1.1781 - 0.0000i  -0.3927 - 0.0000i
  -0.3927 + 0.0000i  -0.0000 + 0.0000i   0.0000 - 0.0000i   0.3927 + 0.0000i   0.3927 + 0.0000i
   0.0000 - 0.0000i   0.0000 - 0.0000i  -0.0000 + 0.0000i   0.3927 - 0.0000i   0.3927 - 0.0000i
   1.1781 - 0.0000i   0.3927 - 0.0000i   0.3927 + 0.0000i  -0.0000 + 0.0000i   0.0000 - 0.0000i
  -0.3927 - 0.0000i   0.3927 - 0.0000i   0.3927 + 0.0000i   0.0000 - 0.0000i  -0.0000 + 0.0000i
   0.3927 - 0.0000i  -0.3927 - 0.0000i   1.1781 + 0.0000i   0.0000 - 0.0000i  -0.3927 + 0.0000i
   0.3927 + 0.0000i   1.1781 + 0.0000i  -0.3927 - 0.0000i  -0.3927 + 0.0000i   0.0000 - 0.0000i
  -0.3927 + 0.0000i  -0.3927 + 0.0000i   0.3927 - 0.0000i   0.3927 - 0.0000i   0.3927 + 0.0000i
   0.0000 - 0.0000i   0.3927 - 0.0000i  -0.3927 + 0.0000i   0.3927 - 0.0000i   0.3927 - 0.0000i
   0.3927 - 0.0000i   0.0000 - 0.0000i  -0.3927 + 0.0000i  -0.3927 - 0.0000i  -1.1781 - 0.0000i
  -0.3927 + 0.0000i  -0.3927 + 0.0000i   0.0000 - 0.0000i  -1.1781 + 0.0000i  -0.3927 + 0.0000i

  Columns 11 through 15

  -0.3927 + 0.0000i   0.3927 - 0.0000i  -0.3927 - 0.0000i   1.1781 + 0.0000i   0.3927 + 0.0000i
   0.3927 - 0.0000i  -0.3927 + 0.0000i   1.1781 - 0.0000i  -0.3927 - 0.0000i   0.3927 - 0.0000i
   0.0000 - 0.0000i  -0.3927 + 0.0000i   0.3927 - 0.0000i   0.3927 + 0.0000i  -0.3927 + 0.0000i
  -0.3927 + 0.0000i   0.0000 - 0.0000i   0.3927 + 0.0000i   0.3927 - 0.0000i   1.1781 + 0.0000i
   0.3927 + 0.0000i   0.3927 + 0.0000i   0.0000 - 0.0000i  -0.3927 + 0.0000i  -0.3927 + 0.0000i
   0.3927 + 0.0000i   0.3927 + 0.0000i  -0.3927 + 0.0000i   0.0000 - 0.0000i   0.3927 - 0.0000i
  -0.3927 - 0.0000i   1.1781 - 0.0000i  -0.3927 + 0.0000i   0.3927 - 0.0000i   0.0000 - 0.0000i
   1.1781 + 0.0000i  -0.3927 - 0.0000i   0.3927 - 0.0000i  -0.3927 + 0.0000i  -0.3927 + 0.0000i
   0.0000 - 0.0000i  -0.3927 + 0.0000i   0.3927 + 0.0000i   0.3927 - 0.0000i  -0.3927 + 0.0000i
  -0.3927 + 0.0000i   0.0000 - 0.0000i   0.3927 + 0.0000i   0.3927 - 0.0000i  -1.1781 - 0.0000i
  -0.0000 + 0.0000i   0.0000 - 0.0000i  -0.3927 + 0.0000i  -1.1781 - 0.0000i   0.3927 - 0.0000i
   0.0000 - 0.0000i  -0.0000 + 0.0000i  -1.1781 - 0.0000i  -0.3927 + 0.0000i   0.3927 + 0.0000i
  -0.3927 + 0.0000i  -1.1781 - 0.0000i  -0.0000 + 0.0000i   0.0000 - 0.0000i   0.0000 - 0.0000i
  -1.1781 - 0.0000i  -0.3927 - 0.0000i   0.0000 - 0.0000i  -0.0000 + 0.0000i  -0.3927 + 0.0000i
   0.3927 - 0.0000i   0.3927 - 0.0000i   0.0000 - 0.0000i  -0.3927 + 0.0000i  -0.0000 + 0.0000i
   0.3927 - 0.0000i   0.3927 - 0.0000i  -0.3927 + 0.0000i   0.0000 - 0.0000i   0.0000 - 0.0000i

  Column 16

   0.3927 - 0.0000i
   0.3927 + 0.0000i
   1.1781 - 0.0000i
  -0.3927 - 0.0000i
   0.3927 - 0.0000i
  -0.3927 + 0.0000i
  -0.3927 + 0.0000i
   0.0000 - 0.0000i
  -1.1781 - 0.0000i
  -0.3927 + 0.0000i
   0.3927 - 0.0000i
   0.3927 + 0.0000i
  -0.3927 + 0.0000i
   0.0000 - 0.0000i
   0.0000 - 0.0000i
  -0.0000 + 0.0000i

#output from MATLAB in numpy array
array([[-0.        +0.j,  0.        +0.j,  0.        +0.j,
        -0.39269908+0.j,  0.39269908+0.j,  0.39269908+0.j,
        -0.39269908+0.j, -1.17809725+0.j,  0.        +0.j,
        -0.39269908+0.j, -0.39269908+0.j,  0.39269908+0.j,
        -0.39269908+0.j,  1.17809725+0.j,  0.39269908+0.j,
         0.39269908+0.j],
       [ 0.        +0.j, -0.        +0.j, -0.39269908+0.j,
         0.        +0.j,  0.39269908+0.j,  0.39269908+0.j,
        -1.17809725+0.j, -0.39269908+0.j, -0.39269908+0.j,
         0.        +0.j,  0.39269908+0.j, -0.39269908+0.j,
         1.17809725+0.j, -0.39269908+0.j,  0.39269908+0.j,
         0.39269908+0.j],
       [ 0.        +0.j, -0.39269908+0.j, -0.        +0.j,
         0.        +0.j, -0.39269908+0.j, -1.17809725+0.j,
         0.39269908+0.j,  0.39269908+0.j, -0.39269908+0.j,
         0.39269908+0.j,  0.        +0.j, -0.39269908+0.j,
         0.39269908+0.j,  0.39269908+0.j, -0.39269908+0.j,
         1.17809725+0.j],
       [-0.39269908+0.j,  0.        +0.j,  0.        +0.j,
        -0.        +0.j, -1.17809725+0.j, -0.39269908+0.j,
         0.39269908+0.j,  0.39269908+0.j,  0.39269908+0.j,
        -0.39269908+0.j, -0.39269908+0.j,  0.        +0.j,
         0.39269908+0.j,  0.39269908+0.j,  1.17809725+0.j,
        -0.39269908+0.j],
       [ 0.39269908+0.j,  0.39269908+0.j, -0.39269908+0.j,
        -1.17809725+0.j, -0.        +0.j,  0.        +0.j,
         0.        +0.j, -0.39269908+0.j, -0.39269908+0.j,
         1.17809725+0.j,  0.39269908+0.j,  0.39269908+0.j,
         0.        +0.j, -0.39269908+0.j, -0.39269908+0.j,
         0.39269908+0.j],
       [ 0.39269908+0.j,  0.39269908+0.j, -1.17809725+0.j,
        -0.39269908+0.j,  0.        +0.j, -0.        +0.j,
        -0.39269908+0.j,  0.        +0.j,  1.17809725+0.j,
        -0.39269908+0.j,  0.39269908+0.j,  0.39269908+0.j,
        -0.39269908+0.j,  0.        +0.j,  0.39269908+0.j,
        -0.39269908+0.j],
       [-0.39269908+0.j, -1.17809725+0.j,  0.39269908+0.j,
         0.39269908+0.j,  0.        +0.j, -0.39269908+0.j,
        -0.        +0.j,  0.        +0.j,  0.39269908+0.j,
         0.39269908+0.j, -0.39269908+0.j,  1.17809725+0.j,
        -0.39269908+0.j,  0.39269908+0.j,  0.        +0.j,
        -0.39269908+0.j],
       [-1.17809725+0.j, -0.39269908+0.j,  0.39269908+0.j,
         0.39269908+0.j, -0.39269908+0.j,  0.        +0.j,
         0.        +0.j, -0.        +0.j,  0.39269908+0.j,
         0.39269908+0.j,  1.17809725+0.j, -0.39269908+0.j,
         0.39269908+0.j, -0.39269908+0.j, -0.39269908+0.j,
         0.        +0.j],
       [ 0.        +0.j, -0.39269908+0.j, -0.39269908+0.j,
         0.39269908+0.j, -0.39269908+0.j,  1.17809725+0.j,
         0.39269908+0.j,  0.39269908+0.j, -0.        +0.j,
         0.        +0.j,  0.        +0.j, -0.39269908+0.j,
         0.39269908+0.j,  0.39269908+0.j, -0.39269908+0.j,
        -1.17809725+0.j],
       [-0.39269908+0.j,  0.        +0.j,  0.39269908+0.j,
        -0.39269908+0.j,  1.17809725+0.j, -0.39269908+0.j,
         0.39269908+0.j,  0.39269908+0.j,  0.        +0.j,
        -0.        +0.j, -0.39269908+0.j,  0.        +0.j,
         0.39269908+0.j,  0.39269908+0.j, -1.17809725+0.j,
        -0.39269908+0.j],
       [-0.39269908+0.j,  0.39269908+0.j,  0.        +0.j,
        -0.39269908+0.j,  0.39269908+0.j,  0.39269908+0.j,
        -0.39269908+0.j,  1.17809725+0.j,  0.        +0.j,
        -0.39269908+0.j, -0.        +0.j,  0.        +0.j,
        -0.39269908+0.j, -1.17809725+0.j,  0.39269908+0.j,
         0.39269908+0.j],
       [ 0.39269908+0.j, -0.39269908+0.j, -0.39269908+0.j,
         0.        +0.j,  0.39269908+0.j,  0.39269908+0.j,
         1.17809725+0.j, -0.39269908+0.j, -0.39269908+0.j,
         0.        +0.j,  0.        +0.j, -0.        +0.j,
        -1.17809725+0.j, -0.39269908+0.j,  0.39269908+0.j,
         0.39269908+0.j],
       [-0.39269908+0.j,  1.17809725+0.j,  0.39269908+0.j,
         0.39269908+0.j,  0.        +0.j, -0.39269908+0.j,
        -0.39269908+0.j,  0.39269908+0.j,  0.39269908+0.j,
         0.39269908+0.j, -0.39269908+0.j, -1.17809725+0.j,
        -0.        +0.j,  0.        +0.j,  0.        +0.j,
        -0.39269908+0.j],
       [ 1.17809725+0.j, -0.39269908+0.j,  0.39269908+0.j,
         0.39269908+0.j, -0.39269908+0.j,  0.        +0.j,
         0.39269908+0.j, -0.39269908+0.j,  0.39269908+0.j,
         0.39269908+0.j, -1.17809725+0.j, -0.39269908+0.j,
         0.        +0.j, -0.        +0.j, -0.39269908+0.j,
         0.        +0.j],
       [ 0.39269908+0.j,  0.39269908+0.j, -0.39269908+0.j,
         1.17809725+0.j, -0.39269908+0.j,  0.39269908+0.j,
         0.        +0.j, -0.39269908+0.j, -0.39269908+0.j,
        -1.17809725+0.j,  0.39269908+0.j,  0.39269908+0.j,
         0.        +0.j, -0.39269908+0.j, -0.        +0.j,
         0.        +0.j],
       [ 0.39269908+0.j,  0.39269908+0.j,  1.17809725+0.j,
        -0.39269908+0.j,  0.39269908+0.j, -0.39269908+0.j,
        -0.39269908+0.j,  0.        +0.j, -1.17809725+0.j,
        -0.39269908+0.j,  0.39269908+0.j,  0.39269908+0.j,
        -0.39269908+0.j,  0.        +0.j,  0.        +0.j,
        -0.        +0.j]])
...