make matrix shape check shorter
remove unwanted instantiation of quantum gate