class_docstr: Tests circuits with sample-based measurements
docstr: Test a simple circuit containing multiple measurements
docstr_tok: ["Test","a","simple","circuit","containing","multiple","measurements"]
code: def test_multi_measurements(self):
      """Test a simple circuit containing multiple measurements"""
      x, y = np.array(0.732), np.array(0.488)
      qs = qml.tape.QuantumScript(
          [
              qml.RX(x, wires=0),
              qml.CNOT(wires=[0, 1]),
              qml.RY(y, wires=1),
          ],
          [
              qml.expval(qml.PauliZ(0)),
              qml.probs(wires=range(2)),
              qml.sample(wires=range(2)),
          ],
          shots=10000,
      )
      result = simulate(qs)
  
      assert isinstance(result, tuple)
      assert len(result) == 3
      assert isinstance(result[0], np.float64)
      assert isinstance(result[1], np.ndarray)
      assert isinstance(result[2], np.ndarray)
  
      assert np.allclose(result[0], np.cos(x), atol=0.1)
  
      assert result[1].shape == (4,)
      assert np.allclose(
          result[1],
          [
              np.cos(x / 2) ** 2 * np.cos(y / 2) ** 2,
              np.cos(x / 2) ** 2 * np.sin(y / 2) ** 2,
              np.sin(x / 2) ** 2 * np.sin(y / 2) ** 2,
              np.sin(x / 2) ** 2 * np.cos(y / 2) ** 2,
          ],
          atol=0.1,
      )
  
      assert result[2].shape == (10000, 2)
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.devices.qubit import simulate, get_final_state, measure_final_state
label_desc: Use image node_id 4 for calling the TestSampleMeasurements obj's underlying member method code with example usage: obj.test_multi_measurements() without return types