code: def ctrl_decomp_zyz(target_operation: Operator, control_wires: Wires):
      """Decompose the controlled version of a target single-qubit operation
  
      This function decomposes a controlled single-qubit target operation using the
      decomposition defined in section 5 of
      `Barenco et al. (1995) <https://arxiv.org/abs/quant-ph/9503016>`_.
  
      .. warning:: This method will add a global phase for target operations that do not
          belong to the SU(2) group.
  
      Args:
          target_operation (~.operation.Operator): the target operation to decompose
          control_wires (~.wires.Wires): the control wires of the operation
  
      Returns:
          list[Operation]: the decomposed operations
  
      Raises:
          ValueError: if ``target_operation`` is not a single-qubit operation
  
      **Example**
  
      We can create a controlled operation using `qml.ctrl`, or by creating the
      decomposed controlled version of using `qml.ctrl_decomp_zyz`.
  
      .. code-block:: python
  
          dev = qml.device("default.qubit", wires=3)
  
          @qml.qnode(dev)
          def expected_circuit(op):
              qml.Hadamard(wires=0)
              qml.Hadamard(wires=1)
              qml.ctrl(op, [0,1])
              return qml.probs()
  
          @qml.qnode(dev)
          def decomp_circuit(op):
              qml.Hadamard(wires=0)
              qml.Hadamard(wires=1)
              qml.ops.ctrl_decomp_zyz(op, [0,1])
              return qml.probs()
  
      Measurements on both circuits will give us the same results:
  
      >>> op = qml.RX(0.123, wires=2)
      >>> expected_circuit(op)
      tensor([0.25      , 0.        , 0.25      , 0.        , 0.25      ,
          0.        , 0.24905563, 0.00094437], requires_grad=True)
      >>> decomp_circuit(op)
      tensor([0.25      , 0.        , 0.25      , 0.        , 0.25      ,
          0.        , 0.24905563, 0.00094437], requires_grad=True)
  
      """
      if len(target_operation.wires) != 1:
          raise ValueError(
              "The target operation must be a single-qubit operation, instead "
              f"got {target_operation.__class__.__name__}."
          )
  
      target_wire = target_operation.wires
  
      try:
          phi, theta, omega = target_operation.single_qubit_rot_angles()
      except NotImplementedError:
          with qml.QueuingManager.stop_recording():
              zyz_decomp = qml.ops.one_qubit_decomposition(
                  qml.matrix(target_operation), target_wire
              )
          phi, theta, omega = [
              gate.parameters[0] for gate in zyz_decomp
          ]
  
      decomp = []
  
      if not qml.math.isclose(phi, 0.0, atol=1e-8, rtol=0):
          decomp.append(qml.RZ(phi, wires=target_wire))
      if not qml.math.isclose(theta / 2, 0.0, atol=1e-8, rtol=0):
          decomp.extend(
              [
                  qml.RY(theta / 2, wires=target_wire),
                  qml.MultiControlledX(
                      wires=control_wires + target_wire
                  ),
                  qml.RY(-theta / 2, wires=target_wire),
              ]
          )
      else:
          decomp.append(
              qml.MultiControlledX(wires=control_wires + target_wire)
          )
      if not qml.math.isclose(
          -(phi + omega) / 2, 0.0, atol=1e-6, rtol=0
      ):
          decomp.append(qml.RZ(-(phi + omega) / 2, wires=target_wire))
      decomp.append(
          qml.MultiControlledX(wires=control_wires + target_wire)
      )
      if not qml.math.isclose(
          (omega - phi) / 2, 0.0, atol=1e-8, rtol=0
      ):
          decomp.append(qml.RZ((omega - phi) / 2, wires=target_wire))
  
      return decomp
  
file_path: pennylane/pennylane/ops/op_math/controlled_decompositions.py
imports: from copy import copy
  import numpy
  import numpy.linalg
  import pennylane
  from pennylane.operation import Operator
  from pennylane.wires import Wires
  from pennylane import math
label_desc: Use image node_id 6 for calling a global function with example usage: ctrl_decomp_zyz(target_operation, control_wires) and returns: decomp