class_docstr: Tests for the probs function
class_docstr_tok: ["Tests","for","the","probs","function"]
docstr: Test the rotated probability with a tensor observable.
code: def test_observable_tensor_prob(self, observable, init_state, tol):
      "Test the rotated probability with a tensor observable."
      dev = qml.device("default.qubit", wires=4)
  
      state = init_state(4)
  
      @qml.qnode(dev)
      def circuit():
          qml.StatePrep(state, wires=list(range(4)))
          qml.PauliX(wires=0)
          qml.PauliZ(wires=1)
          qml.PauliY(wires=2)
          qml.PauliZ(wires=3)
          return qml.probs(
              op=observable[0](wires=0) @ observable[1](wires=1)
          )
  
      res = circuit()
  
      def circuit_rotated():
          qml.PauliX(wires=0)
          qml.PauliZ(wires=1)
          qml.PauliY(wires=2)
          qml.PauliZ(wires=3)
          observable[0](wires=0).diagonalizing_gates()
          observable[1](wires=1).diagonalizing_gates()
  
      matrix = qml.matrix(circuit_rotated)()
      state = np.dot(matrix, state)
      expected = np.reshape(np.abs(state) ** 2, [2] * 4)
  
      expected = np.einsum("ijkl->ij", expected).flatten()
  
      assert np.allclose(res, expected, atol=tol, rtol=0)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.measurements import MeasurementProcess, Probability, ProbabilityMP, Shots
  from pennylane.queuing import AnnotatedQueue
label_desc: Use image node_id 29 for calling the TestProbs obj's underlying member method code with example usage: obj.test_observable_tensor_prob(observable, init_state, tol) and returns: qml