class_docstr: Tests for the custom_decomps argument for devices
class_docstr_tok: ["Tests","for","the","custom_decomps","argument","for","devices"]
docstr: Test that specifying a single custom decomposition works as expected.
docstr_tok: ["Test","that","specifying","a","single","custom","decomposition","works","as","expected","."]
code: def test_no_decomp_with_depth_zero(self, device_name):
      """Test that specifying a single custom decomposition works as expected."""
  
      custom_decomps = {
          "Hadamard": custom_hadamard,
          "CNOT": custom_cnot,
      }
      decomp_dev = qml.device(
          device_name,
          wires=2,
          custom_decomps=custom_decomps,
          decomp_depth=0,
      )
  
      @qml.qnode(decomp_dev, expansion_strategy="device")
      def circuit():
          qml.Hadamard(wires=0)
          qml.CNOT(wires=[0, 1])
          return qml.expval(qml.PauliZ(0))
  
      _ = circuit()
      decomp_ops = circuit.tape.operations
  
      assert len(decomp_ops) == 2
      assert decomp_ops[0].name == "Hadamard"
      assert decomp_ops[1].name == "CNOT"
  
imports: import pytest
  import numpy
  import pennylane
  from pennylane.wires import Wires
label_desc: Use image node_id 5 for calling the TestCreateCustomDecompExpandFn obj's underlying member method code with example usage: obj.test_no_decomp_with_depth_zero(device_name) and returns: qml