class_docstr: Unit tests for the preprocessing method.
class_docstr_tok: ["Unit","tests","for","the","preprocessing","method","."]
docstr: Test that preprocessing validates wires on the circuits being executed.
docstr_tok: ["Test","that","preprocessing","validates","wires","on","the","circuits","being","executed","."]
code: def test_circuit_wire_validation(self):
      """Test that preprocessing validates wires on the circuits being executed."""
      dev = DefaultQubit(wires=3)
      circuit_valid_0 = qml.tape.QuantumScript([qml.PauliX(0)])
      program, _ = dev.preprocess()
      circuits, _ = program([circuit_valid_0])
      assert circuits[0].circuit == circuit_valid_0.circuit
  
      circuit_valid_1 = qml.tape.QuantumScript([qml.PauliX(1)])
      program, _ = dev.preprocess()
      circuits, _ = program([circuit_valid_0, circuit_valid_1])
      assert circuits[0].circuit == circuit_valid_0.circuit
      assert circuits[1].circuit == circuit_valid_1.circuit
  
      invalid_circuit = qml.tape.QuantumScript([qml.PauliX(4)])
      with pytest.raises(
          qml.wires.WireError, match=r"Cannot run circuit\(s\) on"
      ):
          program, _ = dev.preprocess()
          program(
              [
                  invalid_circuit,
              ]
          )
  
      with pytest.raises(
          qml.wires.WireError, match=r"Cannot run circuit\(s\) on"
      ):
          program, _ = dev.preprocess()
          program([circuit_valid_0, invalid_circuit])
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.devices import DefaultQubit, ExecutionConfig
  from pennylane.devices.default_qubit import stopping_condition
label_desc: Use image node_id 4 for calling the TestPreprocessing obj's underlying member method code with example usage: obj.test_circuit_wire_validation() without return types