class_docstr: Test the Snapshot instruction for simulators.
class_docstr_tok: ["Test","the","Snapshot","instruction","for","simulators","."]
docstr: Test that an error is (currently) raised on the lightning simulator.
docstr_tok: ["Test","that","an","error","is","(","currently",")","raised","on","the","lightning","simulator","."]
code: def test_lightning_qubit(self, method):
      """Test that an error is (currently) raised on the lightning simulator."""
      dev = qml.device("lightning.qubit", wires=2)
  
      @qml.qnode(dev, diff_method=method)
      def circuit():
          qml.Snapshot()
          qml.Hadamard(wires=0)
          qml.Snapshot("very_important_state")
          qml.CNOT(wires=[0, 1])
          qml.Snapshot()
          return qml.expval(qml.PauliX(0))
  
      # can run the circuit
      result = circuit()
      assert result == 0
  
      with pytest.raises(
          qml.DeviceError, match="Device does not support snapshots."
      ):
          qml.snapshots(circuit)()
  
file_path: pennylane/tests/test_debugging.py
imports: import pytest
  import numpy
  import pennylane
label_desc: Use image node_id 5 for calling the TestSnapshot obj's underlying member method code with example usage: obj.test_lightning_qubit(method) and returns: qml