class_docstr: Integration tests for ``qml.transforms.split_non_commuting()``
class_docstr_tok: ["Integration","tests","for","``","qml.transforms.split_non_commuting","(",")","``"]
docstr: Test output is correct when using shots, counts and expval measurements
docstr_tok: ["Test","output","is","correct","when","using","shots",",","counts","and","expval","measurements"]
code: def test_shot_vector_support_counts(self):
      """Test output is correct when using shots, counts and expval measurements"""
  
      dev = qml.device("default.qubit", wires=2, shots=(10, 20))
  
      @qml.qnode(dev)
      def circuit():
          qml.PauliZ(0)
          return (qml.counts(wires=[0, 1]), qml.expval(qml.PauliZ(0)))
  
      res = split_non_commuting(circuit)()
      assert isinstance(res, tuple)
      assert len(res) == 2
      assert all(isinstance(shot_res, tuple) for shot_res in res)
      assert all(len(shot_res) == 2 for shot_res in res)
      # pylint:disable=not-an-iterable
      assert all(
          isinstance(shot_res[0], dict)
          and isinstance(shot_res[1], np.ndarray)
          for shot_res in res
      )
  
      assert all(shot_res[1].shape == () for shot_res in res)
  
      # check all the wire counts are as expected
      assert all(shot_res[0]["00"] in [10, 20] for shot_res in res)
  
      expval_res = qml.math.stack([shot_res[1] for shot_res in res])
      assert np.allclose(expval_res, np.array([1.0, 1.0]), atol=0.05)
  
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 TestIntegration obj's underlying member method code with example usage: obj.test_shot_vector_support_counts() and returns: qml,  qml