class_docstr: Tests that the spectrum is returned as expected.
docstr: Test that the spectrum changes per call if a qnode keyword argument
  changes the circuit architecture.
docstr_tok: ["Test","that","the","spectrum","changes","per","call","if","a","qnode","keyword","argument","changes","the","circuit","architecture","."]
code: def test_spectrum_changes_with_qnode_args(self):
      """Test that the spectrum changes per call if a qnode keyword argument
      changes the circuit architecture."""
  
      dev = qml.device("default.qubit", wires=3)
  
      @qml.qnode(dev)
      def circuit(x, last_gate=False):
          qml.RX(x, wires=0)
          qml.RX(x, wires=1)
          if last_gate:
              qml.RX(x, wires=2)
          return qml.expval(qml.PauliZ(wires=0))
  
      x = 0.9
      res_true = qnode_spectrum(circuit, argnum=[0])(x, last_gate=True)
      assert np.allclose(res_true["x"][()], range(-3, 4))
  
      res_false = qnode_spectrum(circuit, argnum=[0])(
          x, last_gate=False
      )
      assert np.allclose(res_false["x"][()], range(-2, 3))
  
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 5 for calling the TestCircuits obj's underlying member method code with example usage: obj.test_spectrum_changes_with_qnode_args() and returns: qml