class_docstr: Test the Snapshot instruction for simulators.
class_docstr_tok: ["Test","the","Snapshot","instruction","for","simulators","."]
docstr: Test that an exception is raised when an unsupported measurement is provided to the snapshot.
docstr_tok: ["Test","that","an","exception","is","raised","when","an","unsupported","measurement","is","provided","to","the","snapshot","."]
code: def test_unsupported_snapshot_measurement(self):
      """Test that an exception is raised when an unsupported measurement is provided to the snapshot."""
      dev = qml.device("default.qubit")
  
      @qml.qnode(dev)
      def circuit():
          qml.Hadamard(0)
          with pytest.raises(
              ValueError,
              match="The measurement PauliZ is not supported as it is not an instance "
              "of <class 'pennylane.measurements.measurements.StateMeasurement'>",
          ):
              qml.Snapshot(measurement=qml.PauliZ(0))
          return qml.expval(qml.PauliZ(0))
  
      qml.snapshots(circuit)()
  
file_path: pennylane/tests/test_debugging.py
imports: import pytest
  import numpy
  import pennylane
label_desc: Use image node_id 13 for calling the TestSnapshot obj's underlying member method code with example usage: obj.test_unsupported_snapshot_measurement() and returns: qml