class_docstr: Tests that the spectrum is returned as expected.
docstr: Test that the spectrum grows linearly with the number of
  encoding gates if we use Pauli rotation encoding.
docstr_tok: ["Test","that","the","spectrum","grows","linearly","with","the","number","of","encoding","gates","if","we","use","Pauli","rotation","encoding","."]
code: def test_spectrum_grows_with_gates(self, n_layers, n_qubits):
      """Test that the spectrum grows linearly with the number of
      encoding gates if we use Pauli rotation encoding."""
  
      dev = qml.device("default.qubit", wires=n_qubits)
  
      @qml.qnode(dev)
      def circuit(x):
          for _ in range(n_layers):
              for i in range(n_qubits):
                  qml.RX(x, wires=i)
                  qml.RY(0.4, wires=i)
          return qml.expval(qml.PauliZ(wires=0))
  
      res = qnode_spectrum(circuit)(0.1)
      expected_degree = n_qubits * n_layers
      assert list(res.keys()) == ["x"] and list(res["x"].keys()) == [()]
      assert np.allclose(
          res["x"][()], range(-expected_degree, expected_degree + 1)
      )
  
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 2 for calling the TestCircuits obj's underlying member method code with example usage: obj.test_spectrum_grows_with_gates(n_layers, n_qubits) and returns: qml