class_docstr: Tests that the spectrum is returned as expected.
docstr: Test that the spectrum is computed for the arguments specified by ``argnum``.
docstr_tok: ["Test","that","the","spectrum","is","computed","for","the","arguments","specified","by","``","argnum","``","."]
code: def test_argnum(self):
      """Test that the spectrum is computed for the arguments specified by ``argnum``."""
      dev = qml.device("default.qubit", wires=2)
  
      @qml.qnode(dev)
      def circuit(x, y):
          qml.RX(x, wires=0)
          qml.RY(0.2 * y, wires=0)
          qml.RY(3 * y, wires=1)
          return qml.expval(qml.PauliZ(wires=0))
  
      x, y = pnp.array([0.2, 0.1], requires_grad=True)
      y_freq = [-3.2, -3.0, -2.8, -0.2, 0.0, 0.2, 2.8, 3.0, 3.2]
  
      res = qnode_spectrum(circuit, argnum=[0])(x, y)
      assert res == {"x": {(): [-1.0, 0.0, 1.0]}}
  
      res = qnode_spectrum(circuit, argnum=[0, 1])(x, y)
      assert res == {"x": {(): [-1.0, 0.0, 1.0]}, "y": {(): y_freq}}
  
      res = qnode_spectrum(circuit)(x, y)
      assert res == {"x": {(): [-1.0, 0.0, 1.0]}, "y": {(): y_freq}}
  
imports: from collections import OrderedDict
  import numpy
  import pytest
  import pennylane
  from pennylane import numpy
  from pennylane.fourier.qnode_spectrum import _process_ids, qnode_spectrum
  from pennylane.measurements import SampleMP, StateMP, VarianceMP
label_desc: Use image node_id 3 for calling the TestCircuits obj's underlying member method code with example usage: obj.test_argnum() and returns: qml