class_docstr: Test tensor expectation values
class_docstr_tok: ["Test","tensor","expectation","values"]
docstr: Test that when given a tensor observable the expectation value is the same regardless of the order of terms
  in the tensor observable, provided the wires each term acts on remain constant.
  
  eg:
  ob1 = qml.PauliZ(wires=0) @ qml.PauliY(wires=1)
  ob2 = qml.PauliY(wires=1) @ qml.PauliZ(wires=0)
  
  @qml.qnode(dev)
  def circ(obs):
      return qml.expval(obs)
  
  circ(ob1) == circ(ob2)
code: def test_wire_order_in_tensor_prod_observables(
      self, device, base_obs, permuted_obs, tol, skip_if
  ):
      """Test that when given a tensor observable the expectation value is the same regardless of the order of terms
      in the tensor observable, provided the wires each term acts on remain constant.
  
      eg:
      ob1 = qml.PauliZ(wires=0) @ qml.PauliY(wires=1)
      ob2 = qml.PauliY(wires=1) @ qml.PauliZ(wires=0)
  
      @qml.qnode(dev)
      def circ(obs):
          return qml.expval(obs)
  
      circ(ob1) == circ(ob2)
      """
      n_wires = 3
      dev = device(n_wires)
      skip_if(dev, {"supports_tensor_observables": False})
  
      @qml.qnode(dev)
      def circ(ob):
          sub_routine(label_map=range(3))
          return qml.expval(ob)
  
      assert np.allclose(
          circ(base_obs),
          circ(permuted_obs),
          atol=tol(dev.shots),
          rtol=0,
      )
  
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 3 for calling the TestTensorExpval obj's underlying member method code with example usage: obj.test_wire_order_in_tensor_prod_observables(device, base_obs, permuted_obs, tol, skip_if) and returns: qml