class_docstr: Tests for the sample integration
class_docstr_tok: ["Tests","for","the","sample","integration"]
docstr: Test the output of combining expval, var and sample
docstr_tok: ["Test","the","output","of","combining","expval",",","var","and","sample"]
code: def test_sample_combination(self):
      """Test the output of combining expval, var and sample"""
  
      n_sample = 10
  
      dev = DefaultQubit()
  
      @qnode(dev, diff_method="parameter-shift")
      def circuit():
          qml.RX(0.54, wires=0)
  
          return (
              qml.sample(qml.PauliZ(0)),
              qml.expval(qml.PauliX(1)),
              qml.var(qml.PauliY(2)),
          )
  
      result = circuit(shots=n_sample)
  
      assert isinstance(result, tuple)
      assert len(result) == 3
  
      assert np.array_equal(result[0].shape, (n_sample,))
      assert isinstance(result[1], (float, np.ndarray))
      assert isinstance(result[2], (float, np.ndarray))
      assert result[0].dtype == np.dtype("int")
  
imports: import autograd
  import autograd.numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane import qnode
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 3 for calling the TestSample obj's underlying member method code with example usage: obj.test_sample_combination() and returns: qml,  qml,  qml