class_docstr: Class for partitioning a list of Pauli words according to some binary symmetric relation.
  
  Partitions are defined by the binary symmetric relation of interest, e.g., all Pauli words in a
  partition being mutually commuting. The partitioning is accomplished by formulating the list of
  Pauli words as a graph where nodes represent Pauli words and edges between nodes denotes that
  the two corresponding Pauli words satisfy the symmetric binary relation.
  
  Obtaining the fewest number of partitions such that all Pauli terms within a partition mutually
  satisfy the binary relation can then be accomplished by finding a partition of the graph nodes
  such that each partition is a fully connected subgraph (a "clique"). The problem of finding the
  optimal partitioning, i.e., the fewest number of cliques, is the minimum clique cover (MCC)
  problem. The solution of MCC may be found by graph colouring on the complementary graph. Both
  MCC and graph colouring are NP-Hard, so heuristic graph colouring algorithms are employed to
  find approximate solutions in polynomial time.
  
  Args:
      observables (list[Observable]): a list of Pauli words to be partitioned according to a
          grouping strategy
      grouping_type (str): the binary relation used to define partitions of
          the Pauli words, can be ``'qwc'`` (qubit-wise commuting), ``'commuting'``, or
          ``'anticommuting'``.
      graph_colourer (str): the heuristic algorithm to employ for graph
          colouring, can be ``'lf'`` (Largest First) or ``'rlf'`` (Recursive
          Largest First)
  
  Raises:
      ValueError: if arguments specified for ``grouping_type`` or
          ``graph_colourer`` are not recognized
code: def __init__(
      self, observables, grouping_type="qwc", graph_colourer="rlf"
  ):
      if grouping_type.lower() not in GROUPING_TYPES:
          raise ValueError(
              f"Grouping type must be one of: {GROUPING_TYPES}, instead got {grouping_type}."
          )
  
      self.grouping_type = grouping_type.lower()
  
      if graph_colourer.lower() not in GRAPH_COLOURING_METHODS:
          raise ValueError(
              f"Graph colouring method must be one of: {list(GRAPH_COLOURING_METHODS)}, "
              f"instead got {graph_colourer}."
          )
  
      self.graph_colourer = GRAPH_COLOURING_METHODS[
          graph_colourer.lower()
      ]
      self.observables = observables
      self._wire_map = None
      self._n_qubits = None
      self.binary_observables = None
      self.adj_matrix = None
      self.grouped_paulis = None
  
file_path: pennylane/pennylane/pauli/grouping/group_observables.py
imports: from copy import copy
  import numpy
  import pennylane
  from pennylane.pauli.utils import are_identical_pauli_words, binary_to_pauli, observables_to_binary_matrix, qwc_complement_adj_matrix
  from pennylane.wires import Wires
  from .graph_colouring import largest_first, recursive_largest_first
label_desc: Use image node_id 1 to create a new PauliGroupingStrategy object  with example: obj = PauliGroupingStrategy(observables, grouping_type, graph_colourer)