class_docstr: Pauli operator error channel for an arbitrary number of qubits.
  
  This channel is modelled by the following Kraus matrices:
  
  .. math::
      K_0 = \sqrt{1-p} * I
  
  .. math::
      K_1 = \sqrt{p} * (K_{w0} \otimes K_{w1} \otimes \dots K_{wn})
  
  Where :math:`I` is the Identity,
  and :math:`\otimes` denotes the Kronecker Product,
  and :math:`K_{wi}` denotes the Kraus matrix corresponding to the operator acting on wire :math:`wi`,
  and :math:`p` denotes the probability with which the channel is applied.
  
  .. warning::
  
      The size of the Kraus matrices for PauliError scale exponentially
      with the number of wires, the channel acts on. Simulations with
      PauliError can result in a significant increase in memory and
      computational usage. Use with caution!
  
  **Details:**
  
  * Number of wires: Any (the operation can act on any number of wires)
  * Number of parameters: 3
  
  Args:
      operators (str): The Pauli operators acting on the specified (groups of) wires
      p (float): The probability of the operator being applied
      wires (Sequence[int] or int): The wires the channel acts on
      id (str or None): String representing the operation (optional)
  
  **Example:**
  
  >>> pe = PauliError("X", 0.5, wires=0)
  >>> km = pe.kraus_matrices()
  >>> km[0]
  array([[0.70710678, 0.        ],
         [0.        , 0.70710678]])
  >>> km[1]
      array([[0.        , 0.70710678],
             [0.70710678, 0.        ]])
class_docstr_tok: ["Pauli","operator","error","channel","for","an","arbitrary","number","of","qubits",".","This","channel","is","modelled","by","the","following","Kraus","matrices",":","..","math",":",":","K_0","=","\\sqrt","{","1-p","}","*","I","..","math",":",":","K_1","=","\\sqrt","{","p","}","*","(","K_","{","w0","}","\\otimes","K_","{","w1","}","\\otimes","\\dots","K_","{","wn","}",")","Where",":","math",":","`","I","`","is","the","Identity",",","and",":","math",":","`","\\otimes","`","denotes","the","Kronecker","Product",",","and",":","math",":","`","K_","{","wi","}","`","denotes","the","Kraus","matrix","corresponding","to","the","operator","acting","on","wire",":","math",":","`","wi","`",",","and",":","math",":","`","p","`","denotes","the","probability","with","which","the","channel","is","applied",".","..","warning",":",":","The","size","of","the","Kraus","matrices","for","PauliError","scale","exponentially","with","the","number","of","wires",",","the","channel","acts","on",".","Simulations","with","PauliError","can","result","in","a","significant","increase","in","memory","and","computational","usage",".","Use","with","caution","!","*","*","Details",":","*","*","*","Number","of","wires",":","Any","(","the","operation","can","act","on","any","number","of","wires",")","*","Number","of","parameters",":","3","Args",":","operators","(","str",")",":","The","Pauli","operators","acting","on","the","specified","(","groups","of",")","wires","p","(","float",")",":","The","probability","of","the","operator","being","applied","wires","(","Sequence","[","int","]","or","int",")",":","The","wires","the","channel","acts","on","id","(","str","or","None",")",":","String","representing","the","operation","(","optional",")","*","*","Example",":","*","*",">",">",">","pe","=","PauliError","(","``","X","''",",","0.5",",","wires=0",")",">",">",">","km","=","pe.kraus_matrices","(",")",">",">",">","km","[","0","]","array","(","[","[","0.70710678",",","0",".","]",",","[","0.",",","0.70710678","]","]",")",">",">",">","km","[","1","]","array","(","[","[","0.",",","0.70710678","]",",","[","0.70710678",",","0",".","]","]",")"]
code: def __init__(self, operators, p, wires=None, id=None):
      super().__init__(operators, p, wires=wires, id=id)
  
      # check if the specified operators are legal
      if not set(operators).issubset({"X", "Y", "Z"}):
          raise ValueError(
              "The specified operators need to be either of 'X', 'Y' or 'Z'"
          )
  
      # check if probabilities are legal
      if not np.is_abstract(p) and not 0.0 <= p <= 1.0:
          raise ValueError("p must be in the interval [0,1]")
  
      # check if the number of operators matches the number of wires
      if len(self.wires) != len(operators):
          raise ValueError(
              "The number of operators must match the number of wires"
          )
  
      nq = len(self.wires)
  
      if nq > 20:
          warnings.warn(
              f"The resulting Kronecker matrices will have dimensions {2**(nq)} x {2**(nq)}.\nThis equals {2**nq*2**nq*8/1024**3} GB of physical memory for each matrix."
          )
  
imports: import warnings
  import pennylane.math
  from pennylane.operation import AnyWires, Channel
label_desc: Use image node_id 1 to create a new PauliError object from inherited base classes: Channel with example: obj = PauliError(operators, p, wires, id)