def test_is_commute_4(self): """test 'is_commute' ("XYZ", "Z") => commute """ pp_0 = PauliProduct(pauli_str="XYZ", qid=[2, 1, 0]) pp_1 = PauliProduct(pauli_str="ZX", qid=[7, 10]) ans = pp_0.is_commute(pp_1) self.assertEqual(ans, True)
def test_tenspro_0(self): """test 'is_commute' ("I", "XYZ") => commute """ pp_0 = PauliProduct(pauli_str="I") pp_1 = PauliProduct(pauli_str="XYZ", qid=[3, 2, 1]) ans = pp_0.is_commute(pp_1) self.assertEqual(ans, True)