class_docstr: Represents a quantum circuit as a directed acyclic graph.
  
  In this representation the :class:`~.Operator` instances are the nodes of the graph,
  and each directed edge represent a subsystem (or a group of subsystems) on which the two
  Operators act subsequently. This representation can describe the causal relationships
  between arbitrary quantum channels and measurements, not just unitary gates.
  
  Args:
      ops (Iterable[.Operator]): quantum operators constituting the circuit, in temporal order
      obs (Iterable[.MeasurementProcess]): terminal measurements, in temporal order
      wires (.Wires): The addressable wire registers of the device that will be executing this graph
      par_info (list[dict]): Parameter information. For each index, the entry is a dictionary containing an operation
      and an index into that operation's parameters.
      trainable_params (set[int]): A set containing the indices of parameters that support
          differentiability. The indices provided match the order of appearence in the
          quantum circuit.
class_docstr_tok: ["Represents","a","quantum","circuit","as","a","directed","acyclic","graph",".","In","this","representation","the",":","class",":","`","~.Operator","`","instances","are","the","nodes","of","the","graph",",","and","each","directed","edge","represent","a","subsystem","(","or","a","group","of","subsystems",")","on","which","the","two","Operators","act","subsequently",".","This","representation","can","describe","the","causal","relationships","between","arbitrary","quantum","channels","and","measurements",",","not","just","unitary","gates",".","Args",":","ops","(","Iterable","[",".Operator","]",")",":","quantum","operators","constituting","the","circuit",",","in","temporal","order","obs","(","Iterable","[",".MeasurementProcess","]",")",":","terminal","measurements",",","in","temporal","order","wires","(",".Wires",")",":","The","addressable","wire","registers","of","the","device","that","will","be","executing","this","graph","par_info","(","list","[","dict","]",")",":","Parameter","information",".","For","each","index",",","the","entry","is","a","dictionary","containing","an","operation","and","an","index","into","that","operation","'s","parameters",".","trainable_params","(","set","[","int","]",")",":","A","set","containing","the","indices","of","parameters","that","support","differentiability",".","The","indices","provided","match","the","order","of","appearence","in","the","quantum","circuit","."]
docstr: Serialize the quantum circuit graph based on the operations and
  observables in the circuit graph and the index of the variables
  used by them.
  
  The string that is produced can be later hashed to assign a unique value to the circuit graph.
  
  Returns:
      string: serialized quantum circuit graph
docstr_tok: ["Serialize","the","quantum","circuit","graph","based","on","the","operations","and","observables","in","the","circuit","graph","and","the","index","of","the","variables","used","by","them",".","The","string","that","is","produced","can","be","later","hashed","to","assign","a","unique","value","to","the","circuit","graph",".","Returns",":","string",":","serialized","quantum","circuit","graph"]
code: def serialize(self):
      """Serialize the quantum circuit graph based on the operations and
      observables in the circuit graph and the index of the variables
      used by them.
  
      The string that is produced can be later hashed to assign a unique value to the circuit graph.
  
      Returns:
          string: serialized quantum circuit graph
      """
      serialization_string = ""
      delimiter = "!"
  
      for op in self.operations_in_order:
          serialization_string += op.name
  
          for param in op.data:
              serialization_string += delimiter
              serialization_string += str(param)
              serialization_string += delimiter
  
          serialization_string += str(op.wires.tolist())
  
      # Adding a distinct separating string that could not occur by any combination of the
      # name of the operation and wires
      serialization_string += "|||"
  
      for mp in self.observables_in_order:
          obs = mp.obs or mp
          serialization_string += str(mp.return_type)
          serialization_string += delimiter
          serialization_string += str(obs.name)
          for param in obs.data:
              serialization_string += delimiter
              serialization_string += str(param)
              serialization_string += delimiter
  
          serialization_string += str(obs.wires.tolist())
      return serialization_string
  
imports: from numbers import Number
  from collections import namedtuple
  import numpy
  import rustworkx
  from pennylane.measurements import MeasurementProcess
  from pennylane.resource import ResourcesOperation
label_desc: Use image node_id 3 for calling the CircuitGraph obj's underlying member method code with example usage: obj.serialize() and returns: serialization_string