fixed bug in matrix multiplication, qubit gate support added