class_docstr: Tests for the sum_expand transform
docstr: Test that even if the observables are on the same wires, if they are different operations, they are separated.
  This is testing for a case that gave rise to a bug that occured due to a problem in MeasurementProcess.hash.
docstr_tok: ["Test","that","even","if","the","observables","are","on","the","same","wires",",","if","they","are","different","operations",",","they","are","separated",".","This","is","testing","for","a","case","that","gave","rise","to","a","bug","that","occured","due","to","a","problem","in","MeasurementProcess.hash","."]
code: def test_observables_on_same_wires(self):
      """Test that even if the observables are on the same wires, if they are different operations, they are separated.
      This is testing for a case that gave rise to a bug that occured due to a problem in MeasurementProcess.hash.
      """
      obs1 = qml.prod(qml.PauliX(0), qml.PauliX(1))
      obs2 = qml.prod(qml.PauliX(0), qml.PauliY(1))
  
      circuit = QuantumScript(
          measurements=[qml.expval(obs1), qml.expval(obs2)]
      )
      batch, _ = sum_expand(circuit)
      assert len(batch) == 2
      assert qml.equal(batch[0][0], qml.expval(obs1))
      assert qml.equal(batch[1][0], qml.expval(obs2))
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.queuing import AnnotatedQueue
  from pennylane.tape import QuantumScript
  from pennylane.transforms import hamiltonian_expand, sum_expand
label_desc: Use image node_id 1 for calling the TestSumExpand obj's underlying member method code with example usage: obj.test_observables_on_same_wires() without return types