class_docstr: Unit tests for the counts.process_samples method
docstr: Test that the counts output is correct when all_outcomes is passed
docstr_tok: ["Test","that","the","counts","output","is","correct","when","all_outcomes","is","passed"]
code: def test_counts_all_outcomes_obs(self):
      """Test that the counts output is correct when all_outcomes is passed"""
      shots = 1000
      samples = np.zeros((shots, 2)).astype(np.int64)
  
      result1 = qml.counts(
          qml.PauliZ(0), all_outcomes=False
      ).process_samples(samples, wire_order=[0])
  
      assert len(result1) == 1
      assert set(result1.keys()) == {1}
      assert result1[1] == shots
  
      result2 = qml.counts(
          qml.PauliZ(0), all_outcomes=True
      ).process_samples(samples, wire_order=[0])
  
      assert len(result2) == 2
      assert set(result2.keys()) == {1, -1}
      assert result2[1] == shots
      assert result2[-1] == 0
  
imports: import copy
  import numpy
  import pytest
  import pennylane
  from pennylane.measurements import AllCounts, Counts, CountsMP
  from pennylane.wires import Wires
label_desc: Use image node_id 11 for calling the TestProcessSamples obj's underlying member method code with example usage: obj.test_counts_all_outcomes_obs() without return types