Skip to content

Commit 45417f8

Browse files
author
Corey Ostrove
committed
Checkpoint changes to tvd plot
Checkpoint the implementation of a new TVD plot for reports.
1 parent 4f2a270 commit 45417f8

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Diff for: pygsti/report/section/summary.py

+9
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ def final_model_fit_histogram(workspace, switchboard=None, linlog_percentile=5,
3333
linlg_pcntle=linlog_percentile / 100,
3434
typ='histogram', comm=comm, bgcolor=bgcolor
3535
)
36+
37+
@_Section.figure_factory()
38+
def final_tvd_histogram(workspace, switchboard=None, comm=None, bgcolor='white',
39+
**kwargs):
40+
return workspace.ColorBoxPlot(
41+
'tvd', switchboard.circuits_final,
42+
switchboard.modvi_ds, switchboard.mdl_current_modvi,
43+
typ='histogram', comm=comm, bgcolor=bgcolor
44+
)
3645

3746
@_Section.figure_factory()
3847
def final_gates_vs_target_table_insummary(workspace, switchboard=None, confidence_level=None, ci_brevity=1,

Diff for: pygsti/report/templates/standard_html_report/tabs/Summary.html

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ <h1>Summary</h1>
1616
{{ final_model_fit_histogram|render }}
1717
</figure>
1818

19+
<figure id="final_tvd_histogram">
20+
<figcaption><span class="captiontitle">Histogram of per-circuit TVD.</span> <span class="captiondetail">This figure is about goodness-of-fit. When the estimate doesn't fit the data perfectly, we can quantify how well it fails to predict each individual circuit in the dataset, using the excess loglikelihood (<span class="math">-2\log\mathrm{Pr}(\mathrm{data}|\mathrm{gateset})</span>) above and beyond the minimum value (<span class="math">-2 \log \mathrm{Pr}(\mathrm{data}|\mathrm{observed\ frequencies})</span>). This plot shows a histogram of the those values for all the circuits in the dataset. Ideally, they should have the <span class="math">\chi^2</span> distribution shown by the solid line. Red indicates data that are inconsistent with the model at the 0.95 confidence level, as shown in more detail in the Model Violation tab.</span> </figcaption>
21+
{{ final_tvd_histogram|render }}
22+
</figure>
23+
1924
<figure id="final_gates_vs_target_table_insummary" class='tbl'>
2025
<figcaption><span class="captiontitle">Comparison of estimated gates to targets.</span> <span class="captiondetail">This table is about gate error metrics (fidelity). The metrics in this table compare the estimated gates to their ideal counterparts, and can generally be interpreted as some kind of error rate (per gate use). Entanglement (process) fidelity and 1/2-diamond norm are the best known of these; they are the same for purely stochastic errors, but coherent errors contribute much more to diamond norm. 1/2-trace-distance is a proxy for diamond norm that doesn't require cvxPy to be installed. The Eigenvalue metrics are gauge-invariant versions of fidelity and diamond-norm that only depend on the gate itself (not its relationship to other gates). Hovering the pointer over a heading will pop up a description.</span></figcaption>
2126
{{ final_gates_vs_target_table_insummary|render }}

0 commit comments

Comments
 (0)