Problem substituting numpy arrays into qsymm.Model
When trying to specify numpy.ndarray types (basis matrices) in the locals parameter of qsymm.Model, there is an error. Below is an example of this.
#make a function to generate the appropriate 8*8 basis matrix
def basis4(x,y,sigma):
#the x indicates the row position and the y the column position of the 1 in the otherwise 4x4 zero matrix
sv=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]]
sv[x][y]=1
S=[[[0,1],[1,0]],[[0,-1j],[1j,0]],[[1,0],[0,-1]]]
return np.kron(sv,S[sigma])
subs={'b400x': basis4(0,0,0),'b400y': basis4(0,0,1),'b400z': basis4(0,0,2),'b411x': basis4(1,1,0),'b411y': basis4(1,1,1),'b411z': basis4(1,1,2),'b422x': basis4(2,2,0),'b422y': basis4(2,2,1),'b422z': basis4(2,2,2),'b433x': basis4(3,3,0),'b433y': basis4(3,3,1),'b433z': basis4(3,3,2)}
ham="""
(mu+t2)*b400z + 1j*t1*((4*k_x**3-3*k_x)*b400x+(3*k_y-4*k_y**3)*b400y)
+ (mu1+t21)*b411z + 1j*t11*(k_x*b411x+k_y*b411y)
+ (mu2+t22)*b422z + 1j*t12*(k_x*b422x+k_y*b422y)
+ (mu3+t23)*b433z + 1j*t13*(k_x*b433x+k_y*b433y)
"""
qsymm.Model(ham, momenta=['k_x', 'k_y'], locals=subs)