sandialabs / pyGSTi

A python implementation of Gate Set Tomography
http://www.pygsti.info
Apache License 2.0
132 stars 55 forks source link

Faster Report Generation #319

Open coreyostrove opened 1 year ago

coreyostrove commented 1 year ago

HTML report generation is known to take a fairly long time, something that is compounded when working with either very large experiment designs or ones that go out to very long maximum depths. A significant contributor to this is the reconstruction in the report generation code of ModelDatasetCircuitStore objects during the calculations of objective functions (done as part of reporting). The key bottleneck within this construction is rebuilding from scratch a bunch of COPA layouts (it has always seemed to me that COPA layout generation ought be able to be done significantly faster but that is another problem).

These MDC stores are already being created during the course of the GST fitting, and we actually have some partial plumbing already built into results objects to store the MDC stores, but these fields aren't always being populated and aren't being properly plumbed into the report generation. With some plumbing fixes we should be able to avoid this extra overhead and significantly speed up report generation. This is currently under development on the branch feature-faster-reports.

nemill commented 1 year ago

Text issue in the HTML report "Help" page - issue seen on Windows 11 in Chrome, Firefox and Edge

In multiple spots, some character in the text is not being properly parsed and is showing up as a black-diamond question mark (�). A few examples are copied below. This does not include all of the errors, but hopefully should give an idea of what character or formatting string is causing the issue as a whole.

In "Background" section: "You can inspect the raw estimated gateset too, but if you want to do your own calculations with it � e.g., to simulate experiments or calculate interesting quantities that the pyGSTi authors haven't thought of � then the best way to do that is by using pyGSTi itself in a Jupyter or iPython notebook."

In "This report's structure" section: "The tables and figures in the main panel are also somewhat interactive (see �Interacting with content� below)."

In Interacting with content" section: "Each tab presents a (hopefully manageable) amount of content arranged into objects � figures and tables � that have some interactive properties. Here are some general tips and rules."

pcwysoc commented 7 months ago

Adding reminder here about more verbose output (i.e. progress reporting) during HTML (and possibly other report format) report generation. Also, we should make sure my branch qiskit-feature-mcm is merged into your branch as my model violation fixes are definitely not optimized for speed.

coreyostrove commented 2 months ago

Text issue in the HTML report "Help" page - issue seen on Windows 11 in Chrome, Firefox and Edge

In multiple spots, some character in the text is not being properly parsed and is showing up as a black-diamond question mark (�). A few examples are copied below. This does not include all of the errors, but hopefully should give an idea of what character or formatting string is causing the issue as a whole.

In "Background" section: "You can inspect the raw estimated gateset too, but if you want to do your own calculations with it � e.g., to simulate experiments or calculate interesting quantities that the pyGSTi authors haven't thought of � then the best way to do that is by using pyGSTi itself in a Jupyter or iPython notebook."

In "This report's structure" section: "The tables and figures in the main panel are also somewhat interactive (see �Interacting with content� below)."

In Interacting with content" section: "Each tab presents a (hopefully manageable) amount of content arranged into objects � figures and tables � that have some interactive properties. Here are some general tips and rules."

Only took a year, but this is now fixed on the feature-report-tweaks branch.

Also commenting to indicate that I have integrated the changes alluded to in this issue on the feature-report-tweaks branch, as well as building out additional plumbing to make better use of pre-computed MDC stores. Initial testing indicates a notable speed up from this change.