def _obs_data(self):
    'Extracts the data from a Observable or Tensor and serializes it in an order-independent fashion.\n\n        This allows for comparison between observables that are equivalent, but are expressed\n        in different orders. For example, `qml.PauliX(0) @ qml.PauliZ(1)` and\n        `qml.PauliZ(1) @ qml.PauliX(0)` are equivalent observables with different orderings.\n\n        **Example**\n\n        >>> tensor = qml.PauliX(0) @ qml.PauliZ(1)\n        >>> print(tensor._obs_data())\n        {("PauliZ", <Wires = [1]>, ()), ("PauliX", <Wires = [0]>, ())}\n        '
    obs = Tensor(self).non_identity_obs
    tensor = set()
    for ob in obs:
        parameters = tuple((param.tostring() for param in ob.parameters))
        tensor.add((ob.name, ob.wires, parameters))
    return tensor
Extracts the data from a Observable or Tensor and serializes it in an order-independent fashion.

This allows for comparison between observables that are equivalent, but are expressed
in different orders. For example, `qml.PauliX(0) @ qml.PauliZ(1)` and
`qml.PauliZ(1) @ qml.PauliX(0)` are equivalent observables with different orderings.

**Example**

>>> tensor = qml.PauliX(0) @ qml.PauliZ(1)
>>> print(tensor._obs_data())
{("PauliZ", <Wires = [1]>, ()), ("PauliX", <Wires = [0]>, ())}
def _obs_data(self):
    'Extracts the data from a Observable or Tensor and serializes it in an order-independent fashion.\n\n        This allows for comparison between observables that are equivalent, but are expressed\n        in different orders. For example, `qml.PauliX(0) @ qml.PauliZ(1)` and\n        `qml.PauliZ(1) @ qml.PauliX(0)` are equivalent observables with different orderings.\n\n        **Example**\n\n        >>> tensor = qml.PauliX(0) @ qml.PauliZ(1)\n        >>> print(tensor._obs_data())\n        {("PauliZ", <Wires = [1]>, ()), ("PauliX", <Wires = [0]>, ())}\n        '
    obs = Tensor(self).non_identity_obs
    tensor = set()
    for ob in obs:
        parameters = tuple((param.tostring() for param in ob.parameters))
        tensor.add((ob.name, ob.wires, parameters))
    return tensor