class_docstr: Tests for the custom_decomps argument for devices
class_docstr_tok: ["Tests","for","the","custom_decomps","argument","for","devices"]
docstr: Test that applying an adjoint in the circuit results in the adjoint
  undergoing the custom decomposition.
docstr_tok: ["Test","that","applying","an","adjoint","in","the","circuit","results","in","the","adjoint","undergoing","the","custom","decomposition","."]
code: def test_custom_decomp_with_adjoint(self, device_name):
      """Test that applying an adjoint in the circuit results in the adjoint
      undergoing the custom decomposition."""
  
      custom_decomps = {qml.RX: custom_rx}
      decomp_dev = qml.device(
          device_name, wires="a", custom_decomps=custom_decomps
      )
  
      @qml.qnode(decomp_dev, expansion_strategy="device")
      def circuit():
          # Adjoint is RX(-0.2), so expect RY(-0.2) H
          qml.adjoint(qml.RX, lazy=False)(0.2, wires="a")
          return qml.expval(qml.PauliZ("a"))
  
      _ = circuit()
      decomp_ops = circuit.tape.operations
  
      assert len(decomp_ops) == 2
  
      assert decomp_ops[0].name == "RY"
      assert decomp_ops[0].parameters[0] == -0.2
      assert decomp_ops[0].wires == Wires("a")
  
      assert decomp_ops[1].name == "Hadamard"
      assert decomp_ops[1].wires == Wires("a")
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.wires import Wires
label_desc: Use image node_id 11 for calling the TestCreateCustomDecompExpandFn obj's underlying member method code with example usage: obj.test_custom_decomp_with_adjoint(device_name) and returns: qml