class_docstr: Integration tests for ``qml.transforms.split_non_commuting()``
class_docstr_tok: ["Integration","tests","for","``","qml.transforms.split_non_commuting","(",")","``"]
docstr: Test expval with multiple non-commuting operators
docstr_tok: ["Test","expval","with","multiple","non-commuting","operators"]
code: def test_expval_non_commuting_observables(self):
      """Test expval with multiple non-commuting operators"""
      dev = qml.device("default.qubit", wires=6)
  
      @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.PauliX(1) @ qml.PauliX(4)),
              qml.expval(qml.PauliX(3)),
              qml.expval(qml.PauliY(5)),
          )
  
      res = circuit()
      assert isinstance(res, tuple)
      assert len(res) == 6
      assert all(isinstance(r, np.ndarray) for r in res)
      assert all(r.shape == () for r in res)
  
      res = qml.math.stack(res)
  
      assert all(
          np.isclose(
              res, np.array([0.0, -1.0, 0.0, 0.0, 1.0, 1 / np.sqrt(2)])
          )
      )
  
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 1 for calling the TestIntegration obj's underlying member method code with example usage: obj.test_expval_non_commuting_observables() and returns: qml,  qml,  qml,  qml,  qml,  qml