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 shot vectors
docstr_tok: ["Test","output","is","correct","when","using","shot","vectors"]
code: def test_shot_vector_support(self):
      """Test output is correct when using shot vectors"""
  
      dev = qml.device(
          "default.qubit", wires=6, shots=(10000, (20000, 2), 30000)
      )
  
      @qml.qnode(dev)
      def circuit():
          qml.Hadamard(1)
          qml.Hadamard(0)
          qml.PauliZ(0)
          qml.Hadamard(3)
          qml.Hadamard(5)
          qml.T(5)
          return (
              qml.expval(qml.PauliZ(0) @ qml.PauliZ(1)),
              qml.expval(qml.PauliX(0)),
              qml.expval(qml.PauliZ(1)),
              qml.expval(
                  qml.PauliY(0)
                  @ qml.PauliY(1)
                  @ qml.PauliZ(3)
                  @ qml.PauliY(4)
                  @ qml.PauliX(5)
              ),
              qml.expval(qml.PauliX(1) @ qml.PauliX(4)),
              qml.expval(qml.PauliX(3)),
              qml.expval(qml.PauliY(5)),
          )
  
      res = circuit()
      assert isinstance(res, tuple)
      assert len(res) == 4
      assert all(isinstance(shot_res, tuple) for shot_res in res)
      assert all(len(shot_res) == 7 for shot_res in res)
      # pylint:disable=not-an-iterable
      assert all(
          all(
              list(
                  isinstance(r, np.ndarray) and r.shape == ()
                  for r in shot_res
              )
          )
          for shot_res in res
      )
  
      res = qml.math.stack([qml.math.stack(r) for r in res])
  
      assert np.allclose(
          res,
          np.array([0.0, -1.0, 0.0, 0.0, 0.0, 1.0, 1 / np.sqrt(2)]),
          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 4 for calling the TestIntegration obj's underlying member method code with example usage: obj.test_shot_vector_support() and returns: qml,  qml,  qml,  qml,  qml,  qml,  qml