class_docstr: Tests for the probs function
class_docstr_tok: ["Tests","for","the","probs","function"]
docstr: Test that `qml.probs` can be used in the computational basis with other commuting observables.
docstr_tok: ["Test","that","`","qml.probs","`","can","be","used","in","the","computational","basis","with","other","commuting","observables","."]
code: def test_commuting_probs_in_computational_basis(self):
      """Test that `qml.probs` can be used in the computational basis with other commuting observables."""
      dev = qml.device("default.qubit.legacy", wires=5)
  
      @qml.qnode(dev)
      def circuit(x, y):
          qml.RX(x, wires=[0])
          qml.RY(y, wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0)), qml.probs(wires=[0, 1])
  
      res = circuit(1, 2)
  
      @qml.qnode(dev)
      def circuit2(x, y):
          qml.RX(x, wires=[0])
          qml.RY(y, wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0))
  
      @qml.qnode(dev)
      def circuit3(x, y):
          qml.RX(x, wires=[0])
          qml.RY(y, wires=[1])
          qml.CNOT(wires=[0, 1])
          return qml.probs(wires=[0, 1])
  
      res2 = circuit2(1, 2)
      res3 = circuit3(1, 2)
  
      assert res[0] == res2
      assert qml.math.allequal(res[1:], res3)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.measurements import ProbabilityMP, Shots
  from pennylane.devices.qubit.measure import flatten_state
label_desc: Use image node_id 24 for calling the TestProbs obj's underlying member method code with example usage: obj.test_commuting_probs_in_computational_basis() and returns: qml,  qml, qml, qml