def _eval_commutator(self, other, **hints):
if isinstance(other, OneQubitGate):
if self.targets != other.targets or self.__class__ == other.__class__:
return Integer(0)
return Operator._eval_commutator(self, other, **hints)
评论列表
文章目录