class_docstr: Tests for the state function
class_docstr_tok: ["Tests","for","the","state","function"]
docstr: Test that the shape is correct for qml.state.
docstr_tok: ["Test","that","the","shape","is","correct","for","qml.state","."]
code: def test_shape(self, shots):
      """Test that the shape is correct for qml.state."""
      dev = qml.device("default.qubit.legacy", wires=3, shots=shots)
      res = qml.state()
      assert res.shape(dev, Shots(shots)) == (2**3,)
  
imports: import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.devices import DefaultQubitLegacy
  from pennylane.measurements import State, Shots, density_matrix, expval, state
label_desc: Use image node_id 17 for calling the TestState obj's underlying member method code with example usage: obj.test_shape(shots) without return types