# QuTip: How to multiply symbol with matrix

I am trying to multiply a symbol with a matrix which is defined by QuTip quantum object, but I got this error:

TypeError: Incompatible object for multiplication


I used:

from qutip import *
import sympy as sp
w0 = sp.Symbol('\omega_{0}')
w0*destroy(4)


Did I miss something?

well, you can either convert destroy(4) to a sympy matrix or a numpy array like that:

a = destroy(4)
destroy_ = sp.Matrix(a)
destroy_ = w0*destroy_
destroy_


And here is the result :

or try numpy array:

destroy = np.array(a)
result = w0*destroy


After you finished all stuff (like finding w0 or doing all computations), then, you can convert your final matrix to Qobj