class_docstr: Test tensor expectation values
class_docstr_tok: ["Test","tensor","expectation","values"]
docstr: Test that a tensor product involving PauliZ and Identity works correctly
docstr_tok: ["Test","that","a","tensor","product","involving","PauliZ","and","Identity","works","correctly"]
code: def test_pauliz_tensor_identity(
      self, shots, theta, phi, varphi, tolerance
  ):
      """Test that a tensor product involving PauliZ and Identity works correctly"""
      dev = qml.device("default.qubit", wires=3, shots=shots)
  
      @qml.qnode(dev)
      def circuit(a, b, c):
          ansatz(a, b, c)
          return expval(qml.PauliZ(0) @ qml.Identity(1) @ qml.PauliZ(2))
  
      res = circuit(theta, phi, varphi)
      expected = np.cos(varphi) * np.cos(phi)
  
      assert np.allclose(res, expected, **tolerance)
  
imports: import functools
  import pytest
  import numpy
  import pennylane
  from pennylane import expval, var, sample
label_desc: Use image node_id 6 for calling the TestTensorExpval obj's underlying member method code with example usage: obj.test_pauliz_tensor_identity(shots, theta, phi, varphi, tolerance) and returns: expval