class_docstr: Tests that the spectrum is returned as expected.
docstr: Test that the spectrum changes per call if a qnode argument changes the
  circuit architecture.
docstr_tok: ["Test","that","the","spectrum","changes","per","call","if","a","qnode","argument","changes","the","circuit","architecture","."]
code: def test_spectrum_changes_with_qnode_args(self):
      """Test that the spectrum changes per call if a qnode argument changes the
      circuit architecture."""
  
      dev = qml.device("default.qubit", wires=3)
  
      @qml.qnode(dev)
      def _circuit(last_gate):
          qml.RX(0.1, wires=0, id="x")
          qml.RX(0.2, wires=1, id="x")
          if last_gate:
              qml.RX(0.3, wires=2, id="x")
          return qml.expval(qml.PauliZ(wires=0))
  
      res_true = circuit_spectrum(_circuit)(True)
      assert np.allclose(res_true["x"], range(-3, 4))
  
      res_false = circuit_spectrum(_circuit)(False)
      assert np.allclose(res_false["x"], range(-2, 3))
  
file_path: pennylane/tests/fourier/test_circuit_spectrum.py
imports: import pytest
  import numpy
  import pennylane
  from pennylane import numpy
  from pennylane.fourier.circuit_spectrum import circuit_spectrum
label_desc: Use image node_id 3 for calling the TestCircuits obj's underlying member method code with example usage: obj.test_spectrum_changes_with_qnode_args() and returns: qml