class_docstr: Tests that the template defines the correct decomposition.
class_docstr_tok: ["Tests","that","the","template","defines","the","correct","decomposition","."]
docstr: Test that the QPE adjoint works.
docstr_tok: ["Test","that","the","QPE","adjoint","works","."]
code: def test_adjoint(self):
      """Test that the QPE adjoint works."""
      dev = qml.device("default.qubit", wires=3)
  
      @qml.qnode(dev)
      def qpe_circuit():
          qml.Hadamard(wires=0)
          qml.PauliX(wires=1)
          qml.QuantumPhaseEstimation(
              qml.PauliX.compute_matrix(),
              target_wires=[0],
              estimation_wires=[1, 2],
          )
  
          qml.adjoint(qml.QuantumPhaseEstimation)(
              qml.PauliX.compute_matrix(),
              target_wires=[0],
              estimation_wires=[1, 2],
          )
          qml.Hadamard(wires=0)
          qml.PauliX(wires=1)
  
          return qml.state()
  
      assert qml.math.isclose(qpe_circuit()[0], 1)
  
file_path: pennylane/tests/templates/test_subroutines/test_qpe.py
imports: import pytest
  import numpy
  from scipy.stats import unitary_group
  import pennylane
label_desc: Use image node_id 8 for calling the TestDecomposition obj's underlying member method code with example usage: obj.test_adjoint() and returns: qml