ReCirq icon indicating copy to clipboard operation
ReCirq copied to clipboard

[loschmidt] Update analysis

Open mpharrigan opened this issue 2 years ago • 1 comments

  • include job timestamp
  • re-think aggregation strategy

Background: the analysis code extracts the results into a pandas dataframe. You need to aggregate the quantities to make plots and create fits.

Previously: I knew additional columns (i.e. fields) would be added over time to the results dataframe. I thought I could be clever with the aggregation to make the addition of new fields automatic. This was done with the groupby_all_except function which inverts the api of groupby.

Then: we actually need a custom aggregation for the job_finished_time field. Every time the dataframe gets aggregated down, I've chosen to pick the "last" time of the group. You can imagine choosing the first or average. In any event: the groupby_all_except approach didn't make this magically work. One still needs to plumb through the new field with care.

This PR: make our groupby columns and the aggregation functions / output columns explicit everywhere. Going forward, this shouldn't behave badly if a new field is added. Although if you want to actually have the new field show up after using the aggregation/fitting functions you have to add it to the [...]_y_cols mapping in each relevant function.

mpharrigan avatar May 13 '22 00:05 mpharrigan

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB