def measurement_dict(self, circuit_index=0) -> dict[str, Sequence[int]]:
        """Returns a dictionary of measurement keys to target qubit index."""
        measurement_dict: dict[str, Sequence[int]] = {}
        if 'metadata' in self._job:
            measurement_matadata = None
            if 'measurements' in self._job['metadata'].keys():
                measurements = json.loads(self._job['metadata']['measurements'])
                for index, measurement in enumerate(measurements):
                    if index == circuit_index:
                        measurement_matadata = measurement
                        break
            else:
                measurement_matadata = self._job['metadata']

            if measurement_matadata is not None:
                full_str = ''.join(
                    value
                    for key, value in measurement_matadata.items()
                    if key.startswith('measurement')
                )
                if full_str == '':
                    return measurement_dict
                for key_value in full_str.split(chr(30)):
                    key, value = key_value.split(chr(31))
                    measurement_dict[key] = [int(t) for t in value.split(',')]

        return measurement_dict
Returns a dictionary of measurement keys to target qubit index.
cirq-ionq/cirq_ionq/job.py