- 2

Как транспонировать и возвести в степень матрицу?

23rd May 2021, 8:33 PM
Sting
Sting - avatar
1 Antwort
+ 3
use numpy and scipy libraries for it. a snippet for exponentiation import numpy as np from scipy import linalg hamiltonian = np.mat('[1,0,0,0;0,-1,0,0;0,0,-1,0;0,0,0,1]') t_list = np.linspace(0,1,10) unitary = [linalg.expm(-(1j)*t*hamiltonian) for t in t_list] to learn more , have a look at this https://www.tutorialspoint.com/numpy/numpy_matrix_library.htm
14th Jun 2021, 6:24 PM
Prashanth Kumar
Prashanth Kumar - avatar