class_docstr: Unit tests on ``qml.transforms.split_non_commuting()``
class_docstr_tok: ["Unit","tests","on","``","qml.transforms.split_non_commuting","(",")","``"]
docstr: Test that the measurements types of the split tapes are correct
docstr_tok: ["Test","that","the","measurements","types","of","the","split","tapes","are","correct"]
code: def test_different_measurement_types(self, meas_type):
      """Test that the measurements types of the split tapes are correct"""
      with qml.queuing.AnnotatedQueue() as q:
          qml.PauliZ(0)
          qml.Hadamard(0)
          qml.CNOT((0, 1))
          meas_type(op=qml.PauliZ(0) @ qml.PauliZ(1))
          meas_type(op=qml.PauliX(0) @ qml.PauliX(1))
          meas_type(op=qml.PauliZ(0))
          meas_type(op=qml.PauliX(0))
  
          # if the MP can also accept wires as arguments, add extra measurements to test
          if meas_type in wire_meas_fn:
              meas_type(wires=[0])
              meas_type(wires=[0, 1])
  
      tape = qml.tape.QuantumScript.from_queue(q)
      the_return_type = tape.measurements[0].return_type
      split, _ = split_non_commuting(tape)
      for new_tape in split:
          for meas in new_tape.measurements:
              assert meas.return_type == the_return_type
  
      qs = qml.tape.QuantumScript(tape.operations, tape.measurements)
      split, _ = split_non_commuting(qs)
      for new_tape in split:
          for meas in new_tape.measurements:
              assert meas.return_type == the_return_type
  
imports: import itertools
  import pytest
  import numpy
  import pennylane
  import pennylane.numpy
  from pennylane.transforms import split_non_commuting
label_desc: Use image node_id 6 for calling the TestUnittestSplitNonCommuting obj's underlying member method code with example usage: obj.test_different_measurement_types(meas_type) without return types