We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c25b43 commit 0837a45Copy full SHA for 0837a45
cirq-core/cirq/ops/pauli_string.py
@@ -1134,11 +1134,8 @@ def qubit(self) -> raw_types.Qid:
1134
assert len(self.qubits) == 1
1135
return self.qubits[0]
1136
1137
- def _as_pauli_string(self) -> PauliString:
1138
- return PauliString(qubit_pauli_map={self.qubit: self.pauli})
1139
-
1140
def __neg__(self):
1141
- return -self._as_pauli_string()
+ return -_try_interpret_as_pauli_string(self)
1142
1143
def _json_dict_(self) -> dict[str, Any]:
1144
return protocols.obj_to_dict_helper(self, ['pauli', 'qubit'])
0 commit comments