class_docstr: Test inputs and pre-processing.
class_docstr_tok: ["Test","inputs","and","pre-processing","."]
docstr: Tests if errors are thrown for invalid permutations with QNodes.
docstr_tok: ["Tests","if","errors","are","thrown","for","invalid","permutations","with","QNodes","."]
code: def test_invalid_inputs_qnodes(
      self, permutation_order, expected_error_message
  ):
      """Tests if errors are thrown for invalid permutations with QNodes."""
  
      dev = qml.device("default.qubit", wires=4)
  
      @qml.qnode(dev)
      def permute_qubits():
          qml.Permute(permutation_order, wires=dev.wires)
          return qml.expval(qml.PauliZ(0))
  
      with pytest.raises(ValueError, match=expected_error_message):
          permute_qubits()
  
imports: import pytest
  import numpy
  import pennylane
label_desc: Use image node_id 1 for calling the TestInputs obj's underlying member method code with example usage: obj.test_invalid_inputs_qnodes(permutation_order, expected_error_message) and returns: qml