class_docstr: Tests for the qubit reuse/reset functionality of `qml.measure`.
docstr: Test that a wire is reset to the |0> state without any local phases
  after measurement if reset is requested.
docstr_tok: ["Test","that","a","wire","is","reset","to","the","|0",">","state","without","any","local","phases","after","measurement","if","reset","is","requested","."]
code: def test_wire_is_reset(self):
      """Test that a wire is reset to the |0> state without any local phases
      after measurement if reset is requested."""
      dev = qml.device("default.qubit", wires=3)
  
      @qml.qnode(dev)
      @qml.defer_measurements
      def qnode(x):
          qml.Hadamard(0)
          qml.PhaseShift(np.pi / 4, 0)
          m = qml.measure(0, reset=True)
          qml.cond(m, qml.RX)(x, 1)
          return qml.density_matrix(wires=[0])
  
      # Expected reduced density matrix on wire 0
      expected_mat = np.array([[1, 0], [0, 0]])
      assert np.allclose(qnode(0.123), expected_mat)
  
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 4 for calling the TestQubitReuseAndReset obj's underlying member method code with example usage: obj.test_wire_is_reset() and returns: qml