class_docstr: Tests for the qubit reuse/reset functionality of `qml.measure`.
docstr: Test that a new wire is added if there are multiple mid-circuit measurements
  on the same wire.
docstr_tok: ["Test","that","a","new","wire","is","added","if","there","are","multiple","mid-circuit","measurements","on","the","same","wire","."]
code: def test_new_wire_for_multiple_measurements(self):
      """Test that a new wire is added if there are multiple mid-circuit measurements
      on the same wire."""
      dev = qml.device("default.qubit", wires=4)
  
      @qml.qnode(dev)
      @qml.defer_measurements
      def circ(x, y):
          qml.RX(x, 0)
          qml.measure(0)
          qml.RY(y, 1)
          qml.measure(0)
          qml.RZ(x + y, 1)
          qml.measure(0)
          return qml.expval(qml.PauliZ(1))
  
      _ = circ(1.0, 2.0)
  
      expected = [
          qml.RX(1.0, 0),
          qml.CNOT([0, 2]),
          qml.RY(2.0, 1),
          qml.CNOT([0, 3]),
          qml.RZ(3.0, 1),
      ]
  
      assert circ.qtape.operations == expected
  
imports: import math
  import pytest
  import pennylane
  from pennylane.measurements import MidMeasureMP, MeasurementValue
  import pennylane.numpy
  from pennylane.devices import DefaultQubit
label_desc: Use image node_id 1 for calling the TestQubitReuseAndReset obj's underlying member method code with example usage: obj.test_new_wire_for_multiple_measurements() and returns: qml