class_docstr: A class representing unknown measurement outcomes in the qubit model.
  
  Measurements on a single qubit in the computational basis are assumed.
  
  Args:
      measurements (list[.MidMeasureMP]): The measurement(s) that this object depends on.
      processing_fn (callable): A lazily transformation applied to the measurement values.
class_docstr_tok: ["A","class","representing","unknown","measurement","outcomes","in","the","qubit","model",".","Measurements","on","a","single","qubit","in","the","computational","basis","are","assumed",".","Args",":","measurements","(","list","[",".MidMeasureMP","]",")",":","The","measurement","(","s",")","that","this","object","depends","on",".","processing_fn","(","callable",")",":","A","lazily","transformation","applied","to","the","measurement","values","."]
docstr: Merge two measurement values
docstr_tok: ["Merge","two","measurement","values"]
code: def _merge(self, other: "MeasurementValue"):
      """Merge two measurement values"""
  
      # create a new merged list with no duplicates and in lexical ordering
      merged_measurements = list(
          set(self.measurements).union(set(other.measurements))
      )
      merged_measurements.sort(key=lambda m: m.id)
  
      # create a new function that selects the correct indices for each sub function
      def merged_fn(*x):
          sub_args_1 = (
              x[i]
              for i in [
                  merged_measurements.index(m)
                  for m in self.measurements
              ]
          )
          sub_args_2 = (
              x[i]
              for i in [
                  merged_measurements.index(m)
                  for m in other.measurements
              ]
          )
  
          out_1 = self.processing_fn(*sub_args_1)
          out_2 = other.processing_fn(*sub_args_2)
  
          return out_1, out_2
  
      return MeasurementValue(merged_measurements, merged_fn)
  
imports: import uuid
  from typing import Generic, TypeVar, Optional
  import numpy
  import pennylane
  from pennylane.wires import Wires
  from .measurements import MeasurementProcess, MidMeasure
label_desc: Use image node_id 25 for calling the MeasurementValue obj's underlying member method code with example usage: obj._merge(other) and returns: MeasurementValue, out_1,  out_2