class_docstr: Apply an arbitrary fixed quantum channel.
  
  Kraus matrices that represent the fixed channel are provided
  as a list of NumPy arrays.
  
  **Details:**
  
  * Number of wires: Any (the operation can act on any number of wires)
  * Number of parameters: 1
  * Gradient recipe: None
  
  Args:
      K_list (list[array[complex]]): list of Kraus matrices
      wires (Union[Wires, Sequence[int], or int]): the wire(s) the operation acts on
      id (str or None): String representing the operation (optional)
class_docstr_tok: ["Apply","an","arbitrary","fixed","quantum","channel",".","Kraus","matrices","that","represent","the","fixed","channel","are","provided","as","a","list","of","NumPy","arrays",".","*","*","Details",":","*","*","*","Number","of","wires",":","Any","(","the","operation","can","act","on","any","number","of","wires",")","*","Number","of","parameters",":","1","*","Gradient","recipe",":","None","Args",":","K_list","(","list","[","array","[","complex","]","]",")",":","list","of","Kraus","matrices","wires","(","Union","[","Wires",",","Sequence","[","int","]",",","or","int","]",")",":","the","wire","(","s",")","the","operation","acts","on","id","(","str","or","None",")",":","String","representing","the","operation","(","optional",")"]
code: def __init__(self, K_list, wires=None, id=None):
      super().__init__(*K_list, wires=wires, id=id)
  
      # check all Kraus matrices are square matrices
      if not all(K.shape[0] == K.shape[1] for K in K_list):
          raise ValueError(
              "Only channels with the same input and output Hilbert space dimensions can be applied."
          )
  
      # check all Kraus matrices have the same shape
      if not all(K.shape == K_list[0].shape for K in K_list):
          raise ValueError(
              "All Kraus matrices must have the same shape."
          )
  
      # check the dimension of all Kraus matrices are valid
      if not all(K.ndim == 2 for K in K_list):
          raise ValueError(
              "Dimension of all Kraus matrices must be (2**num_wires, 2**num_wires)."
          )
  
      # check that the channel represents a trace-preserving map
      K_arr = np.array(K_list)
      Kraus_sum = np.einsum("ajk,ajl->kl", K_arr.conj(), K_arr)
      if not np.allclose(Kraus_sum, np.eye(K_list[0].shape[0])):
          raise ValueError(
              "Only trace preserving channels can be applied."
          )
  
imports: import warnings
  import pennylane.math
  from pennylane.operation import AnyWires, Channel
label_desc: Use image node_id 1 to create a new QubitChannel object from inherited base classes: Channel with example: obj = QubitChannel(K_list, wires, id)