I am learning from a code, and two of its module are matrix_alg and raveler, I have searched online, but didn’t come up something. Where can I download these modules? I am running python 2.6.
Here is part of the code
from numpy import *
from matrix_alg import commutator, lindblad
from raveler import *
lower_a = zeros((3,3))
lower_b = zeros((3,3))
HA = Delta_a * dot(lower_a.T, lower_a)
What does lower_a.T dot T actually do? I’m so confused.
The two modules are probably supposed to come along with the program that you quote. (I was not able to find them on the web either.)
lower_a.Tis simply the transpose of thelower_aarray. For more information, you should check out NumPy, where thezeros()function is defined.I am not sure that using code that does
from numpy import *andfrom raveler import *is a convenient way of learning from code: functions not defined in the program might come from either NumPy or raveler, so you will spend some time checking where they are defined. My opinion is that this program does not follow the customary recommendations for good Python programming style. I would advise to look for some other, better code; I read that the standard library is a good example of good coding practices.