def as_dict(self) -> dict[str, Any]:
        """Return the contents of this class as a dictionary.

        This makes records suitable for construction of a Pandas dataframe. The circuit parameters
        are flattened into the top-level of this dictionary.
        """
        record = dataclasses.asdict(self)
        del record['circuit_params']
        del record['setting']
        record['init_state'] = self.init_state
        record['observable'] = self.observable

        circuit_param_dict = {f'param.{k}': v for k, v in self.circuit_params.items()}
        record.update(**circuit_param_dict)
        return record
Return the contents of this class as a dictionary.

        This makes records suitable for construction of a Pandas dataframe. The circuit parameters
        are flattened into the top-level of this dictionary.
        
cirq-core/cirq/work/observable_measurement_data.py