code: def get_string(self, betas: List[float], gammas: List[float], samples: int = 100):
          
          if samples <= 0 and not isinstance(samples, int):
              raise ValueError("samples variable must be positive integer")
          param_prog = self.get_parameterized_program()
          stacked_params = np.hstack((betas, gammas))
  
          sampling_prog = Program()
          ro = sampling_prog.declare('ro', 'BIT', len(self.qubits))
          sampling_prog += param_prog(stacked_params)
          sampling_prog += [MEASURE(qubit, r) for qubit, r in zip(self.qubits, ro)]
          sampling_prog.wrap_in_numshots_loop(samples)
          executable = self.qc.compile(sampling_prog)
          bitstring_samples = self.qc.run(executable)
          bitstring_tuples = list(map(tuple, bitstring_samples))
          freq = Counter(bitstring_tuples)
          most_frequent_bit_string = max(freq, key=lambda x: freq[x])
          return most_frequent_bit_string, freq
docs: Compute the most probable string.
  
          The method assumes you have passed init_betas and init_gammas with your
          pre-computed angles or you have run the VQE loop to determine the
          angles.  If you have not done this you will be returning the output for
          a random set of angles.
  
          :param betas: List of beta angles
          :param gammas: List of gamma angles
          :param samples: (Optional) number of samples to get back from the QuantumComputer.
          :returns: tuple representing the bitstring, Counter object from
                    collections holding all output bitstrings and their frequency.