class_docstr: Observable corresponding to the state projector :math:`P=\ket{\phi}\bra{\phi}`, where
  :math:`\phi` denotes a basis state.
class_docstr_tok: ["Observable","corresponding","to","the","state","projector",":","math",":","`","P=\\ket","{","\\phi","}","\\bra","{","\\phi","}","`",",","where",":","math",":","`","\\phi","`","denotes","a","basis","state","."]
docstr: A customizable string representation of the operator.
  
  Args:
      decimals=None (int): If ``None``, no parameters are included. Else,
          specifies how to round the parameters.
      base_label=None (str): overwrite the non-parameter component of the label.
      cache=None (dict): dictionary that caries information between label calls
          in the same drawing.
  
  Returns:
      str: label to use in drawings.
  
  **Example:**
  
  >>> BasisStateProjector([0, 1, 0], wires=(0, 1, 2)).label()
  '|010⟩⟨010|'
docstr_tok: ["A","customizable","string","representation","of","the","operator",".","Args",":","decimals=None","(","int",")",":","If","``","None","``",",","no","parameters","are","included",".","Else",",","specifies","how","to","round","the","parameters",".","base_label=None","(","str",")",":","overwrite","the","non-parameter","component","of","the","label",".","cache=None","(","dict",")",":","dictionary","that","caries","information","between","label","calls","in","the","same","drawing",".","Returns",":","str",":","label","to","use","in","drawings",".","*","*","Example",":","*","*",">",">",">","BasisStateProjector","(","[","0",",","1",",","0","]",",","wires=","(","0",",","1",",","2",")",")",".label","(",")","'|010\u27e9\u27e8010|","'"]
code: def label(self, decimals=None, base_label=None, cache=None):
      r"""A customizable string representation of the operator.
  
      Args:
          decimals=None (int): If ``None``, no parameters are included. Else,
              specifies how to round the parameters.
          base_label=None (str): overwrite the non-parameter component of the label.
          cache=None (dict): dictionary that caries information between label calls
              in the same drawing.
  
      Returns:
          str: label to use in drawings.
  
      **Example:**
  
      >>> BasisStateProjector([0, 1, 0], wires=(0, 1, 2)).label()
      '|010⟩⟨010|'
  
      """
  
      if base_label is not None:
          return base_label
      basis_string = "".join(str(int(i)) for i in self.parameters[0])
      return f"|{basis_string}⟩⟨{basis_string}|"
  
imports: from copy import copy
  from collections.abc import Sequence
  import numpy
  from scipy.sparse import csr_matrix
  import pennylane
  from pennylane.operation import AnyWires, Observable, Operation
  from pennylane.wires import Wires
  from .matrix_ops import QubitUnitary
label_desc: Use image node_id 3 for calling the BasisStateProjector obj's underlying member method code with example usage: obj.label(decimals, base_label, cache) and returns: str, basis_string, str, basis_string, str, base_label