As noted in Tutorial 00, pygsti
can provide many reports or presentation slides.
In this tutorial, we look at how to customize some of the output of pygsti
's report generating module.
import matplotlib
matplotlib.use('Agg')
#Import the GST module -- you probably want this at the beginning of every notebook
import pygsti
import json
Creating reports is a method of the pygsti.report.Results
object. Below, we create such an object, and then initialize it with the appropriate fiducials, germs, maximum lengths, etc.
It's important to note that the pygsti.report.Results
object requires an argument to indicate which objective function you wish to score the estimate using. It's recommended that, if you ran MC2GST, you use the "chi2"
argument, while if you ran MLGST, you use "logL"
. Otherwise, you will score your estimate based on an objective function you weren't optimizing over, so your scores may be rather weird!
Creating reports is a method of the pygsti.report.Results
object. Below, we create such an object, and then initialize it with the appropriate fiducials, germs, maximum lengths, etc.
It's important to note that the pygsti.report.Results
object requires an argument to indicate which objective function you wish to score the estimate using. It's recommended that, if you ran MC2GST, you use the "chi2"
argument, while if you ran MLGST, you use "logL"
. Otherwise, you will score your estimate based on an objective function you weren't optimizing over, so your scores may be rather weird!
First, we'll make smaller reports that don't contain any confidence intervals for the estimates, nor any appendices.
NOTE: In order for you to create PowerPoint files, you'll have to have python-pptx
installed on your system.
# Follow Algorithm tutorial to generate LSGST gatesets
gs_target = pygsti.io.load_gateset("tutorial_files/Example_Gateset.txt")
gs_target.set_basis("gm",2)
ds = pygsti.io.load_dataset("tutorial_files/Example_Dataset.txt", cache=True)
fiducialList = pygsti.io.load_gatestring_list("tutorial_files/Example_FiducialList.txt")
#Run LGST to get an initial estimate for the gates in gs_target based on the data in ds
specs = pygsti.construction.build_spam_specs(fiducialGateStrings=fiducialList)
gs_lgst = pygsti.do_lgst(ds, specs, targetGateset=gs_target, svdTruncateTo=4, verbosity=1)
#Gauge optimize the result to match the target gateset
gs_lgst_after_gauge_opt = pygsti.gaugeopt_to_target(gs_lgst, gs_target)
#Contract the result to CPTP
gs_clgst = pygsti.contract(gs_lgst_after_gauge_opt, "CPTP")
#Get lists of gate strings for successive iterations of MC2GST to use
specs = pygsti.construction.build_spam_specs(fiducialGateStrings=fiducialList)
germList = pygsti.io.load_gatestring_list("tutorial_files/Example_GermsList.txt")
maxLengthList = json.load(open("tutorial_files/Example_maxLengths.json","r"))
lsgstListOfLists = [ pygsti.io.load_gatestring_list("tutorial_files/Example_LSGSTlist%d.txt" % l) for l in maxLengthList]
gs_lsgst_list = pygsti.do_iterative_mlgst(ds, gs_clgst, lsgstListOfLists, verbosity=2,
minProbClip=1e-6, probClipInterval=(-1e6,1e6),
returnAll=True )
go_gatesets = [ pygsti.gaugeopt_to_target(gs, gs_target,itemWeights={'gates': 1, 'spam': 0.001})
for gs in gs_lsgst_list]
Loading from cache file: tutorial_files/Example_Dataset.txt.cache --- LGST --- --- Iterative MLGST: Iter 01 of 10 92 gate strings ---: --- Minimum Chi^2 GST --- Created evaluation tree with 1 subtrees. Will divide 1 procs into 1 (subtree-processing) groups of ~1 procs each, to distribute over 56 params (taken as 1 param groups of ~56 params). Sum of Chi^2 = 40.9238 (92 data params - 40 model params = expected mean of 52; p-value = 0.866034) Completed in 0.1s 2*Delta(log(L)) = 41.1104 Iteration 1 took 0.1s --- Iterative MLGST: Iter 02 of 10 92 gate strings ---: --- Minimum Chi^2 GST --- Created evaluation tree with 1 subtrees. Will divide 1 procs into 1 (subtree-processing) groups of ~1 procs each, to distribute over 56 params (taken as 1 param groups of ~56 params). Sum of Chi^2 = 40.9238 (92 data params - 40 model params = expected mean of 52; p-value = 0.866034) Completed in 0.0s 2*Delta(log(L)) = 41.1104 Iteration 2 took 0.0s --- Iterative MLGST: Iter 03 of 10 168 gate strings ---: --- Minimum Chi^2 GST --- Created evaluation tree with 1 subtrees. Will divide 1 procs into 1 (subtree-processing) groups of ~1 procs each, to distribute over 56 params (taken as 1 param groups of ~56 params). Sum of Chi^2 = 124.56 (168 data params - 40 model params = expected mean of 128; p-value = 0.569533) Completed in 0.1s 2*Delta(log(L)) = 124.957 Iteration 3 took 0.2s --- Iterative MLGST: Iter 04 of 10 441 gate strings ---: --- Minimum Chi^2 GST --- Created evaluation tree with 1 subtrees. Will divide 1 procs into 1 (subtree-processing) groups of ~1 procs each, to distribute over 56 params (taken as 1 param groups of ~56 params). Sum of Chi^2 = 424.144 (441 data params - 40 model params = expected mean of 401; p-value = 0.204559) Completed in 0.3s 2*Delta(log(L)) = 425.013 Iteration 4 took 0.3s --- Iterative MLGST: Iter 05 of 10 817 gate strings ---: --- Minimum Chi^2 GST --- Created evaluation tree with 1 subtrees. Will divide 1 procs into 1 (subtree-processing) groups of ~1 procs each, to distribute over 56 params (taken as 1 param groups of ~56 params). Sum of Chi^2 = 772.131 (817 data params - 40 model params = expected mean of 777; p-value = 0.542548) Completed in 0.4s 2*Delta(log(L)) = 773.805 Iteration 5 took 0.5s --- Iterative MLGST: Iter 06 of 10 1201 gate strings ---: --- Minimum Chi^2 GST --- Created evaluation tree with 1 subtrees. Will divide 1 procs into 1 (subtree-processing) groups of ~1 procs each, to distribute over 56 params (taken as 1 param groups of ~56 params). Sum of Chi^2 = 1154.53 (1201 data params - 40 model params = expected mean of 1161; p-value = 0.548039) Completed in 0.6s 2*Delta(log(L)) = 1156.61 Iteration 6 took 0.7s --- Iterative MLGST: Iter 07 of 10 1585 gate strings ---: --- Minimum Chi^2 GST --- Created evaluation tree with 1 subtrees. Will divide 1 procs into 1 (subtree-processing) groups of ~1 procs each, to distribute over 56 params (taken as 1 param groups of ~56 params). Sum of Chi^2 = 1600.19 (1585 data params - 40 model params = expected mean of 1545; p-value = 0.160318) Completed in 0.7s 2*Delta(log(L)) = 1602.65 Iteration 7 took 0.8s --- Iterative MLGST: Iter 08 of 10 1969 gate strings ---: --- Minimum Chi^2 GST --- Created evaluation tree with 1 subtrees. Will divide 1 procs into 1 (subtree-processing) groups of ~1 procs each, to distribute over 56 params (taken as 1 param groups of ~56 params). Sum of Chi^2 = 2031.03 (1969 data params - 40 model params = expected mean of 1929; p-value = 0.0520584) Completed in 1.0s 2*Delta(log(L)) = 2033.99 Iteration 8 took 1.1s --- Iterative MLGST: Iter 09 of 10 2353 gate strings ---: --- Minimum Chi^2 GST --- Created evaluation tree with 1 subtrees. Will divide 1 procs into 1 (subtree-processing) groups of ~1 procs each, to distribute over 56 params (taken as 1 param groups of ~56 params). Sum of Chi^2 = 2422.69 (2353 data params - 40 model params = expected mean of 2313; p-value = 0.0550578) Completed in 1.5s 2*Delta(log(L)) = 2426.06 Iteration 9 took 1.7s --- Iterative MLGST: Iter 10 of 10 2737 gate strings ---: --- Minimum Chi^2 GST --- Created evaluation tree with 1 subtrees. Will divide 1 procs into 1 (subtree-processing) groups of ~1 procs each, to distribute over 56 params (taken as 1 param groups of ~56 params). Sum of Chi^2 = 2795.6 (2737 data params - 40 model params = expected mean of 2697; p-value = 0.0908381) Completed in 2.6s 2*Delta(log(L)) = 2799.4 Iteration 10 took 2.9s Switching to ML objective (last iteration) --- MLGST --- Created evaluation tree with 1 subtrees. Will divide 1 procs into 1 (subtree-processing) groups of ~1 procs each, to distribute over 56 params (taken as 1 param groups of ~56 params). Maximum log(L) = 1399.31 below upper bound of -4.60013e+06 2*Delta(log(L)) = 2798.62 (2737 data params - 40 model params = expected mean of 2697; p-value = 0.0844552) Completed in 2.5s 2*Delta(log(L)) = 2798.62 Final MLGST took 2.5s Iterative MLGST Total Time: 10.6s
res = pygsti.report.Results()
res.init_Ls_and_germs("logl", gs_target, ds, gs_clgst, maxLengthList, germList,
go_gatesets, lsgstListOfLists, fiducialList, fiducialList,
pygsti.construction.repeat_with_max_length, False)
#Make smaller reports (no confidence intervals or appendicies)
res.create_full_report_pdf(filename="tutorial_files/Example_reportB.pdf", verbosity=2, confidenceLevel=None,
debugAidsAppendix=False, gaugeOptAppendix=False,
pixelPlotAppendix=False, whackamoleAppendix=False)
res.create_brief_report_pdf(filename="tutorial_files/Example_briefB.pdf", verbosity=2, confidenceLevel=None)
res.create_presentation_pdf(filename="tutorial_files/Example_slidesB.pdf", verbosity=2, confidenceLevel=None,
debugAidsAppendix=False, pixelPlotAppendix=False, whackamoleAppendix=False)
res.create_presentation_ppt(filename="tutorial_files/Example_slidesB.ppt", verbosity=2, confidenceLevel=None,
debugAidsAppendix=False, pixelPlotAppendix=False, whackamoleAppendix=False)
res.create_general_report_pdf(filename="tutorial_files/Example_generalB.pdf", verbosity=2, confidenceLevel=None)
*** Generating tables *** Iter 01 of 17 : Generating table: targetSpamTable [0.0s] Iter 02 of 17 : Generating table: targetGatesTable [0.0s] Iter 03 of 17 : Generating table: datasetOverviewTable [0.0s] Iter 04 of 17 : Generating table: bestGatesetSpamTable [0.0s] Iter 05 of 17 : Generating table: bestGatesetSpamParametersTable [0.0s] Iter 06 of 17 : Generating table: bestGatesetGaugeOptParamsTable [0.0s] Iter 07 of 17 : Generating table: bestGatesetGatesTable [0.0s] Iter 08 of 17 : Generating table: bestGatesetChoiTable [0.0s] Iter 09 of 17 : Generating table: bestGatesetDecompTable [0.0s] Iter 10 of 17 : Generating table: bestGatesetRotnAxisTable [0.0s] Iter 11 of 17 : Generating table: bestGatesetVsTargetTable [0.2s] Iter 12 of 17 : Generating table: bestGatesetErrorGenTable [0.0s] Iter 13 of 17 : Generating table: fiducialListTable [0.0s] Iter 14 of 17 : Generating table: prepStrListTable [0.0s] Iter 15 of 17 : Generating table: effectStrListTable [0.0s] Iter 16 of 17 : Generating table: germListTable [0.0s] Iter 17 of 17 : Generating table: progressTable [0.8s] *** Generating plots *** LogL plots (2): Iter 1 of 3 : Generating figure: colorBoxPlotKeyPlot [0.8s] Iter 2 of 3 : Generating figure: bestEstimateColorBoxPlot [15.4s] Iter 3 of 3 : Generating figure: invertedBestEstimateColorBoxPlot [14.8s] *** Merging into template file *** Latex file(s) successfully generated. Attempting to compile with pdflatex... Initial output PDF tutorial_files/Example_reportB.pdf successfully generated. Final output PDF tutorial_files/Example_reportB.pdf successfully generated. Cleaning up .aux and .log files. *** Generating tables *** Retrieving cached table: bestGatesetSpamTable Retrieving cached table: bestGatesetSpamParametersTable Retrieving cached table: bestGatesetGatesTable Retrieving cached table: bestGatesetDecompTable Retrieving cached table: bestGatesetRotnAxisTable Retrieving cached table: bestGatesetVsTargetTable Retrieving cached table: bestGatesetErrorGenTable Retrieving cached table: progressTable *** Generating plots *** *** Merging into template file *** Latex file(s) successfully generated. Attempting to compile with pdflatex... Initial output PDF tutorial_files/Example_briefB.pdf successfully generated. Final output PDF tutorial_files/Example_briefB.pdf successfully generated. Cleaning up .aux and .log files. *** Generating tables *** Retrieving cached table: targetSpamTable Retrieving cached table: targetGatesTable Retrieving cached table: datasetOverviewTable Retrieving cached table: bestGatesetSpamTable Retrieving cached table: bestGatesetSpamParametersTable Retrieving cached table: bestGatesetGatesTable Retrieving cached table: bestGatesetChoiTable Retrieving cached table: bestGatesetDecompTable Retrieving cached table: bestGatesetRotnAxisTable Retrieving cached table: bestGatesetVsTargetTable Retrieving cached table: bestGatesetErrorGenTable Retrieving cached table: fiducialListTable Retrieving cached table: prepStrListTable Retrieving cached table: effectStrListTable Retrieving cached table: germListTable Retrieving cached table: progressTable *** Generating plots *** -- LogL plots (1): Iter 1 of 1 : Retrieving cached figure: bestEstimateColorBoxPlot *** Merging into template file *** Latex file(s) successfully generated. Attempting to compile with pdflatex... Initial output PDF tutorial_files/Example_slidesB.pdf successfully generated. Final output PDF tutorial_files/Example_slidesB.pdf successfully generated. Cleaning up .aux and .log files. *** Generating tables *** Iter 01 of 16 : Retrieving cached table: targetSpamTable Iter 02 of 16 : Retrieving cached table: targetGatesTable Iter 03 of 16 : Retrieving cached table: datasetOverviewTable Iter 04 of 16 : Retrieving cached table: bestGatesetSpamTable Iter 05 of 16 : Retrieving cached table: bestGatesetSpamParametersTable Iter 06 of 16 : Retrieving cached table: bestGatesetGatesTable Iter 07 of 16 : Retrieving cached table: bestGatesetChoiTable Iter 08 of 16 : Retrieving cached table: bestGatesetDecompTable Iter 09 of 16 : Retrieving cached table: bestGatesetRotnAxisTable Iter 10 of 16 : Retrieving cached table: bestGatesetVsTargetTable Iter 11 of 16 : Retrieving cached table: bestGatesetErrorGenTable Iter 12 of 16 : Retrieving cached table: fiducialListTable Iter 13 of 16 : Retrieving cached table: prepStrListTable Iter 14 of 16 : Retrieving cached table: effectStrListTable Iter 15 of 16 : Retrieving cached table: germListTable Iter 16 of 16 : Retrieving cached table: progressTable *** Generating plots *** -- LogL plots (1): Iter 1 of 1 : Retrieving cached figure: bestEstimateColorBoxPlot *** Assembling PPT file *** Latexing progressTable table... Latexing bestGatesetVsTargetTable table... Latexing bestGatesetErrorGenTable table... Latexing bestGatesetDecompTable table... Latexing bestGatesetRotnAxisTable table... Latexing bestGatesetGatesTable table... Latexing bestGatesetSpamTable table... Latexing bestGatesetSpamParametersTable table... Latexing bestGatesetChoiTable table... Latexing targetSpamTable table... Latexing targetGatesTable table... Latexing fiducialListTable table... Latexing germListTable table... Latexing datasetOverviewTable table... Final output PPT tutorial_files/Example_slidesB.pptx successfully generated. *** Generating tables *** (0.0s elapsed) Generating table: targetSpamBriefTable [0.0s] Generating table: bestGatesetSpamBriefTable [0.0s] Retrieving cached table: bestGatesetSpamParametersTable Retrieving cached table: bestGatesetVsTargetTable Generating table: bestGatesetSpamVsTargetTable [0.0s] Retrieving cached table: bestGatesetGaugeOptParamsTable Generating table: bestGatesetChoiEvalTable [1.8s] Retrieving cached table: datasetOverviewTable Generating table: bestGatesetEvalTable [0.6s] Generating table: bestGatesetRelEvalTable [0.6s] Generating table: targetGatesBoxTable [1.3s] Generating table: bestGatesetGatesBoxTable [2.6s] Generating table: bestGatesetErrGenBoxTable [3.9s] Retrieving cached table: fiducialListTable Retrieving cached table: prepStrListTable Retrieving cached table: effectStrListTable Generating table: germList2ColTable [0.0s] Retrieving cached table: progressTable *** Generating plots *** (16.6s elapsed) -- LogL plots: Iter 1 of 3 : Retrieving cached figure: colorBoxPlotKeyPlot Iter 2 of 3 : Generating figure: bestEstimateSummedColorBoxPlot [2.7s] Iter 3 of 3 : Generating special: bestEstimateColorBoxPlotPages [15.3s] *** Merging into template file *** (42.2s elapsed) Latex file(s) successfully generated. Attempting to compile with pdflatex... Initial output PDF tutorial_files/Example_generalB.pdf successfully generated. Final output PDF tutorial_files/Example_generalB.pdf successfully generated. Cleaning up .aux and .log files. Report generation complete! [total time 46s]
res.create_full_report_pdf(filename="tutorial_files/Example_report.pdf", verbosity=2, confidenceLevel=95,
debugAidsAppendix=True, gaugeOptAppendix=True,
pixelPlotAppendix=True, whackamoleAppendix=True)
res.create_brief_report_pdf(filename="tutorial_files/Example_brief.pdf", verbosity=2, confidenceLevel=95)
res.create_presentation_pdf(filename="tutorial_files/Example_slides.pdf", verbosity=2, confidenceLevel=95,
debugAidsAppendix=True, pixelPlotAppendix=True, whackamoleAppendix=True)
res.create_presentation_ppt(filename="tutorial_files/Example_slides.ppt", verbosity=2, confidenceLevel=95,
debugAidsAppendix=True, pixelPlotAppendix=True, whackamoleAppendix=True)
res.create_general_report_pdf(filename="tutorial_files/Example_generalB.pdf", verbosity=2, confidenceLevel=95)
--- Hessian Projector Optimization for gate CIs (L-BFGS-B) --- 203s 0.0264001138 219s 0.0260997631 226s 0.0257551198 234s 0.0256330228 242s 0.0254585068 250s 0.0254109392 258s 0.0253685639 266s 0.0253497042 274s 0.0253435862 282s 0.0253401520 290s 0.0253379820 298s 0.0253362146 306s 0.0253341328 314s 0.0253318189 322s 0.0253296326 330s 0.0253281099 338s 0.0253269177 346s 0.0253257997 353s 0.0253247547 361s 0.0253236837 369s 0.0253226634 The resulting min sqrt(sum(gateCIs**2)): 0.025322 *** Generating tables *** Iter 01 of 17 : Generating table: targetSpamTable (w/95% CIs) [0.0s] Iter 02 of 17 : Generating table: targetGatesTable (w/95% CIs) [0.0s] Iter 03 of 17 : Generating table: datasetOverviewTable (w/95% CIs) [0.0s] Iter 04 of 17 : Generating table: bestGatesetSpamTable (w/95% CIs) [0.0s] Iter 05 of 17 : Generating table: bestGatesetSpamParametersTable (w/95% CIs) [0.0s] Iter 06 of 17 : Generating table: bestGatesetGaugeOptParamsTable (w/95% CIs) [0.0s] Iter 07 of 17 : Generating table: bestGatesetGatesTable (w/95% CIs) [0.0s] Iter 08 of 17 : Generating table: bestGatesetChoiTable (w/95% CIs) [0.3s] Iter 09 of 17 : Generating table: bestGatesetDecompTable (w/95% CIs) [0.3s] Iter 10 of 17 : Generating table: bestGatesetRotnAxisTable (w/95% CIs) [0.3s] Iter 11 of 17 : Generating table: bestGatesetVsTargetTable (w/95% CIs) [1.6s] Iter 12 of 17 : Generating table: bestGatesetErrorGenTable (w/95% CIs) [0.0s] Iter 13 of 17 : Generating table: fiducialListTable (w/95% CIs) [0.0s] Iter 14 of 17 : Generating table: prepStrListTable (w/95% CIs) [0.0s] Iter 15 of 17 : Generating table: effectStrListTable (w/95% CIs) [0.0s] Iter 16 of 17 : Generating table: germListTable (w/95% CIs) [0.0s] Iter 17 of 17 : Generating table: progressTable (w/95% CIs) [0.8s] Generating special: gaugeOptAppendixTables (w/95% CIs) Generating special: gaugeOptAppendixTables Generating special: gaugeOptAppendixGatesets (w/95% CIs) Generating special: gaugeOptAppendixGatesets Performing gauge transforms for appendix... [0.0s] [38.9s] *** Generating plots *** LogL plots (10): Iter 1 of 3 : Generating figure: colorBoxPlotKeyPlot (w/95% CIs) Retrieving cached figure: colorBoxPlotKeyPlot Iter 2 of 3 : Generating figure: bestEstimateColorBoxPlot (w/95% CIs) Retrieving cached figure: bestEstimateColorBoxPlot Iter 3 of 3 : Generating figure: invertedBestEstimateColorBoxPlot (w/95% CIs) Retrieving cached figure: invertedBestEstimateColorBoxPlot Iter 2 of 9 : Generating figure: estimateForLIndex1ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex1ColorBoxPlot[1.0s] Iter 3 of 9 : Generating figure: estimateForLIndex2ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex2ColorBoxPlot[1.7s] Iter 4 of 9 : Generating figure: estimateForLIndex3ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex3ColorBoxPlot[4.1s] Iter 5 of 9 : Generating figure: estimateForLIndex4ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex4ColorBoxPlot[6.6s] Iter 6 of 9 : Generating figure: estimateForLIndex5ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex5ColorBoxPlot[7.7s] Iter 7 of 9 : Generating figure: estimateForLIndex6ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex6ColorBoxPlot[10.1s] Iter 8 of 9 : Generating figure: estimateForLIndex7ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex7ColorBoxPlot[12.1s] Iter 9 of 9 : Generating figure: estimateForLIndex8ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex8ColorBoxPlot[13.9s] -- Direct-X plots (2): Iter 1 of 2 : Generating figure: directLongSeqGSTColorBoxPlot (w/95% CIs) Generating figure: directLongSeqGSTColorBoxPlot Generating special: DirectLongSeqGatesets (w/95% CIs) Generating special: DirectLongSeqGatesets [13.6s] [16.8s] Iter 2 of 2 : Generating figure: directLongSeqGSTDeviationColorBoxPlot (w/95% CIs) Generating figure: directLongSeqGSTDeviationColorBoxPlot Retrieving cached special: DirectLongSeqGatesets (w/95% CIs) [2.9s] -- Error rate plots... Generating figure: smallEigvalErrRateColorBoxPlot (w/95% CIs) Generating figure: smallEigvalErrRateColorBoxPlot Retrieving cached special: DirectLongSeqGatesets (w/95% CIs) [1.7s] -- Whack-a-mole plots (6): Iter 1 of 3 : Generating figure: whackGxMoleBoxes (w/95% CIs) Generating figure: whackGxMoleBoxes [36.2s] Iter 2 of 3 : Generating figure: whackGyMoleBoxes (w/95% CIs) Generating figure: whackGyMoleBoxes
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/matplotlib-1.5.3-py3.5-macosx-10.6-intel.egg/matplotlib/pyplot.py:524: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`). max_open_warning, RuntimeWarning)
[36.5s] Iter 3 of 3 : Generating figure: whackGiMoleBoxes (w/95% CIs) Generating figure: whackGiMoleBoxes [35.9s] Iter 1 of 3 : Generating figure: whackGxMoleBoxesSummed (w/95% CIs) Generating figure: whackGxMoleBoxesSummed [22.4s] Iter 2 of 3 : Generating figure: whackGyMoleBoxesSummed (w/95% CIs) Generating figure: whackGyMoleBoxesSummed [22.4s] Iter 3 of 3 : Generating figure: whackGiMoleBoxesSummed (w/95% CIs) Generating figure: whackGiMoleBoxesSummed [22.0s] *** Merging into template file *** Latex file(s) successfully generated. Attempting to compile with pdflatex... Initial output PDF tutorial_files/Example_report.pdf successfully generated. Final output PDF tutorial_files/Example_report.pdf successfully generated. Cleaning up .aux and .log files. *** Generating tables *** Retrieving cached table: bestGatesetSpamTable (w/95% CIs) Retrieving cached table: bestGatesetSpamParametersTable (w/95% CIs) Retrieving cached table: bestGatesetGatesTable (w/95% CIs) Retrieving cached table: bestGatesetDecompTable (w/95% CIs) Retrieving cached table: bestGatesetRotnAxisTable (w/95% CIs) Retrieving cached table: bestGatesetVsTargetTable (w/95% CIs) Retrieving cached table: bestGatesetErrorGenTable (w/95% CIs) Retrieving cached table: progressTable (w/95% CIs) *** Generating plots *** *** Merging into template file *** Latex file(s) successfully generated. Attempting to compile with pdflatex... Initial output PDF tutorial_files/Example_brief.pdf successfully generated. Final output PDF tutorial_files/Example_brief.pdf successfully generated. Cleaning up .aux and .log files. *** Generating tables *** Retrieving cached table: targetSpamTable (w/95% CIs) Retrieving cached table: targetGatesTable (w/95% CIs) Retrieving cached table: datasetOverviewTable (w/95% CIs) Retrieving cached table: bestGatesetSpamTable (w/95% CIs) Retrieving cached table: bestGatesetSpamParametersTable (w/95% CIs) Retrieving cached table: bestGatesetGatesTable (w/95% CIs) Retrieving cached table: bestGatesetChoiTable (w/95% CIs) Retrieving cached table: bestGatesetDecompTable (w/95% CIs) Retrieving cached table: bestGatesetRotnAxisTable (w/95% CIs) Retrieving cached table: bestGatesetVsTargetTable (w/95% CIs) Retrieving cached table: bestGatesetErrorGenTable (w/95% CIs) Retrieving cached table: fiducialListTable (w/95% CIs) Retrieving cached table: prepStrListTable (w/95% CIs) Retrieving cached table: effectStrListTable (w/95% CIs) Retrieving cached table: germListTable (w/95% CIs) Retrieving cached table: progressTable (w/95% CIs) *** Generating plots *** -- LogL plots (9): Iter 1 of 1 : Retrieving cached figure: bestEstimateColorBoxPlot (w/95% CIs) Iter 2 of 9 : Retrieving cached figure: estimateForLIndex1ColorBoxPlot (w/95% CIs) Iter 3 of 9 : Retrieving cached figure: estimateForLIndex2ColorBoxPlot (w/95% CIs) Iter 4 of 9 : Retrieving cached figure: estimateForLIndex3ColorBoxPlot (w/95% CIs) Iter 5 of 9 : Retrieving cached figure: estimateForLIndex4ColorBoxPlot (w/95% CIs) Iter 6 of 9 : Retrieving cached figure: estimateForLIndex5ColorBoxPlot (w/95% CIs) Iter 7 of 9 : Retrieving cached figure: estimateForLIndex6ColorBoxPlot (w/95% CIs) Iter 8 of 9 : Retrieving cached figure: estimateForLIndex7ColorBoxPlot (w/95% CIs) Iter 9 of 9 : Retrieving cached figure: estimateForLIndex8ColorBoxPlot (w/95% CIs) -- Direct-X plots (2) Iter 1 of 2 : Retrieving cached figure: directLongSeqGSTColorBoxPlot (w/95% CIs) Iter 2 of 2 : Retrieving cached figure: directLongSeqGSTDeviationColorBoxPlot (w/95% CIs) -- Error rate plots... Retrieving cached figure: smallEigvalErrRateColorBoxPlot (w/95% CIs) -- Whack-a-mole plots (6): Iter 1 of 3 : Retrieving cached figure: whackGxMoleBoxes (w/95% CIs) Iter 2 of 3 : Retrieving cached figure: whackGyMoleBoxes (w/95% CIs) Iter 3 of 3 : Retrieving cached figure: whackGiMoleBoxes (w/95% CIs) Iter 1 of 3 : Retrieving cached figure: whackGxMoleBoxesSummed (w/95% CIs) Iter 2 of 3 : Retrieving cached figure: whackGyMoleBoxesSummed (w/95% CIs) Iter 3 of 3 : Retrieving cached figure: whackGiMoleBoxesSummed (w/95% CIs) *** Merging into template file *** Latex file(s) successfully generated. Attempting to compile with pdflatex... Initial output PDF tutorial_files/Example_slides.pdf successfully generated. Final output PDF tutorial_files/Example_slides.pdf successfully generated. Cleaning up .aux and .log files. *** Generating tables *** Iter 01 of 16 : Retrieving cached table: targetSpamTable (w/95% CIs) Iter 02 of 16 : Retrieving cached table: targetGatesTable (w/95% CIs) Iter 03 of 16 : Retrieving cached table: datasetOverviewTable (w/95% CIs) Iter 04 of 16 : Retrieving cached table: bestGatesetSpamTable (w/95% CIs) Iter 05 of 16 : Retrieving cached table: bestGatesetSpamParametersTable (w/95% CIs) Iter 06 of 16 : Retrieving cached table: bestGatesetGatesTable (w/95% CIs) Iter 07 of 16 : Retrieving cached table: bestGatesetChoiTable (w/95% CIs) Iter 08 of 16 : Retrieving cached table: bestGatesetDecompTable (w/95% CIs) Iter 09 of 16 : Retrieving cached table: bestGatesetRotnAxisTable (w/95% CIs) Iter 10 of 16 : Retrieving cached table: bestGatesetVsTargetTable (w/95% CIs) Iter 11 of 16 : Retrieving cached table: bestGatesetErrorGenTable (w/95% CIs) Iter 12 of 16 : Retrieving cached table: fiducialListTable (w/95% CIs) Iter 13 of 16 : Retrieving cached table: prepStrListTable (w/95% CIs) Iter 14 of 16 : Retrieving cached table: effectStrListTable (w/95% CIs) Iter 15 of 16 : Retrieving cached table: germListTable (w/95% CIs) Iter 16 of 16 : Retrieving cached table: progressTable (w/95% CIs) *** Generating plots *** -- LogL plots (9): Iter 1 of 1 : Retrieving cached figure: bestEstimateColorBoxPlot (w/95% CIs) Iter 2 of 9 : Retrieving cached figure: estimateForLIndex1ColorBoxPlot (w/95% CIs) Iter 3 of 9 : Retrieving cached figure: estimateForLIndex2ColorBoxPlot (w/95% CIs) Iter 4 of 9 : Retrieving cached figure: estimateForLIndex3ColorBoxPlot (w/95% CIs) Iter 5 of 9 : Retrieving cached figure: estimateForLIndex4ColorBoxPlot (w/95% CIs) Iter 6 of 9 : Retrieving cached figure: estimateForLIndex5ColorBoxPlot (w/95% CIs) Iter 7 of 9 : Retrieving cached figure: estimateForLIndex6ColorBoxPlot (w/95% CIs) Iter 8 of 9 : Retrieving cached figure: estimateForLIndex7ColorBoxPlot (w/95% CIs) Iter 9 of 9 : Retrieving cached figure: estimateForLIndex8ColorBoxPlot (w/95% CIs) -- Direct-X plots (2) Iter 1 of 2 : Retrieving cached figure: directLongSeqGSTColorBoxPlot (w/95% CIs) Iter 2 of 2 : Retrieving cached figure: directLongSeqGSTDeviationColorBoxPlot (w/95% CIs) -- Error rate plots... Retrieving cached figure: smallEigvalErrRateColorBoxPlot (w/95% CIs) -- Whack-a-mole plots (6): Iter 1 of 3 : Retrieving cached figure: whackGxMoleBoxes (w/95% CIs) Iter 2 of 3 : Retrieving cached figure: whackGyMoleBoxes (w/95% CIs) Iter 3 of 3 : Retrieving cached figure: whackGiMoleBoxes (w/95% CIs) Iter 1 of 3 : Retrieving cached figure: whackGxMoleBoxesSummed (w/95% CIs) Iter 2 of 3 : Retrieving cached figure: whackGyMoleBoxesSummed (w/95% CIs) Iter 3 of 3 : Retrieving cached figure: whackGiMoleBoxesSummed (w/95% CIs) *** Assembling PPT file *** Latexing progressTable table... Latexing bestGatesetVsTargetTable table... Latexing bestGatesetErrorGenTable table... Latexing bestGatesetDecompTable table... Latexing bestGatesetRotnAxisTable table... Latexing bestGatesetGatesTable table... Latexing bestGatesetSpamTable table... Latexing bestGatesetSpamParametersTable table... Latexing bestGatesetChoiTable table... Latexing targetSpamTable table... Latexing targetGatesTable table... Latexing fiducialListTable table... Latexing germListTable table... Latexing datasetOverviewTable table... Final output PPT tutorial_files/Example_slides.pptx successfully generated. *** Generating tables *** (0.0s elapsed) Generating table: targetSpamBriefTable (w/95% CIs) [0.0s] Generating table: bestGatesetSpamBriefTable (w/95% CIs) [0.0s] Retrieving cached table: bestGatesetSpamParametersTable (w/95% CIs) Retrieving cached table: bestGatesetVsTargetTable (w/95% CIs) Generating table: bestGatesetSpamVsTargetTable (w/95% CIs) [0.0s] Retrieving cached table: bestGatesetGaugeOptParamsTable (w/95% CIs) Generating table: bestGatesetChoiEvalTable (w/95% CIs)
/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/matplotlib-1.5.3-py3.5-macosx-10.6-intel.egg/matplotlib/pyplot.py:524: RuntimeWarning: More than 20 figures have been opened. Figures created through the pyplot interface (`matplotlib.pyplot.figure`) are retained until explicitly closed and may consume too much memory. (To control this warning, see the rcParam `figure.max_open_warning`). max_open_warning, RuntimeWarning)
[2.3s] Retrieving cached table: datasetOverviewTable (w/95% CIs) Generating table: bestGatesetEvalTable (w/95% CIs) [0.6s] Generating table: bestGatesetRelEvalTable (w/95% CIs) [0.6s] Generating table: targetGatesBoxTable (w/95% CIs) [1.3s] Generating table: bestGatesetGatesBoxTable (w/95% CIs) [2.7s] Generating table: bestGatesetErrGenBoxTable (w/95% CIs) [3.5s] Retrieving cached table: fiducialListTable (w/95% CIs) Retrieving cached table: prepStrListTable (w/95% CIs) Retrieving cached table: effectStrListTable (w/95% CIs) Generating table: germList2ColTable (w/95% CIs) [0.0s] Retrieving cached table: progressTable (w/95% CIs) *** Generating plots *** (16.5s elapsed) -- LogL plots: Iter 1 of 3 : Retrieving cached figure: colorBoxPlotKeyPlot (w/95% CIs) Iter 2 of 3 : Generating figure: bestEstimateSummedColorBoxPlot (w/95% CIs) Retrieving cached figure: bestEstimateSummedColorBoxPlot Iter 3 of 3 : Generating special: bestEstimateColorBoxPlotPages (w/95% CIs) Retrieving cached special: bestEstimateColorBoxPlotPages *** Merging into template file *** (25.5s elapsed) Latex file(s) successfully generated. Attempting to compile with pdflatex... Initial output PDF tutorial_files/Example_generalB.pdf successfully generated. Final output PDF tutorial_files/Example_generalB.pdf successfully generated. Cleaning up .aux and .log files. Report generation complete! [total time 30s]
#Results can be pickled after generating reports in order to save cached derived quantities
import pickle
pickle.dump(res, open("tutorial_files/example_results.pkl","wb"))
import pygsti.report.latex as LU
from imp import reload
reload(LU)
LU.latex_value(1.2e30,2)
'1\\e{30}'