class_docstr: Test tensor variance measurements.
class_docstr_tok: ["Test","tensor","variance","measurements","."]
docstr: Test that a tensor product involving PauliX and PauliY works correctly
code: def test_paulix_pauliy(self, device, tol, skip_if):
      """Test that a tensor product involving PauliX and PauliY works correctly"""
      n_wires = 3
      dev = device(n_wires)
      skip_if(dev, {"supports_tensor_observables": False})
  
      theta = 0.432
      phi = 0.123
      varphi = -0.543
  
      @qml.qnode(dev)
      def circuit():
          qml.RX(theta, wires=[0])
          qml.RX(phi, wires=[1])
          qml.RX(varphi, wires=[2])
          qml.CNOT(wires=[0, 1])
          qml.CNOT(wires=[1, 2])
          return qml.var(qml.PauliX(wires=[0]) @ qml.PauliY(wires=[2]))
  
      res = circuit()
  
      expected = (
          8 * np.sin(theta) ** 2 * np.cos(2 * varphi) * np.sin(phi) ** 2
          - np.cos(2 * (theta - phi))
          - np.cos(2 * (theta + phi))
          + 2 * np.cos(2 * theta)
          + 2 * np.cos(2 * phi)
          + 14
      ) / 16
      assert np.allclose(res, expected, atol=tol(dev.shots))
  
imports: import pytest
  from flaky import flaky
  from scipy.sparse import csr_matrix
  import pennylane
  from pennylane import numpy
  from pennylane.measurements import ClassicalShadowMP, MeasurementTransform, SampleMeasurement, SampleMP, StateMeasurement, StateMP
label_desc: Use image node_id 1 for calling the TestTensorVar obj's underlying member method code with example usage: obj.test_paulix_pauliy(device, tol, skip_if) and returns: qml