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 tutorial_files/Example_Dataset.txt: 100% Writing cache file (to speed future loads): 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.3s 2*Delta(log(L)) = 41.1104 Iteration 1 took 0.3s --- 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.1s 2*Delta(log(L)) = 41.1104 Iteration 2 took 0.1s --- 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.5s 2*Delta(log(L)) = 124.957 Iteration 3 took 0.5s --- 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.9s 2*Delta(log(L)) = 425.013 Iteration 4 took 1.0s --- 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 1.4s 2*Delta(log(L)) = 773.805 Iteration 5 took 1.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 1.6s 2*Delta(log(L)) = 1156.61 Iteration 6 took 1.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 = 1601.67 (1585 data params - 40 model params = expected mean of 1545; p-value = 0.154051) Completed in 2.2s 2*Delta(log(L)) = 1604.17 Iteration 7 took 2.4s --- 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 = 2034.53 (1969 data params - 40 model params = expected mean of 1929; p-value = 0.046511) Completed in 2.8s 2*Delta(log(L)) = 2037.54 Iteration 8 took 3.0s --- 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 = 2426.32 (2353 data params - 40 model params = expected mean of 2313; p-value = 0.0495274) Completed in 4.3s 2*Delta(log(L)) = 2429.74 Iteration 9 took 4.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 = 2797.88 (2737 data params - 40 model params = expected mean of 2697; p-value = 0.085984) Completed in 7.1s 2*Delta(log(L)) = 2801.7 Iteration 10 took 7.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) = 1400.46 below upper bound of -4.60013e+06 2*Delta(log(L)) = 2800.93 (2737 data params - 40 model params = expected mean of 2697; p-value = 0.0798162) Completed in 7.1s 2*Delta(log(L)) = 2800.93 Final MLGST took 7.1s Iterative MLGST Total Time: 30.1s
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 19 : Generating table: targetSpamTable [0.0s] Iter 02 of 19 : Generating table: targetGatesTable [0.0s] Iter 03 of 19 : Generating table: datasetOverviewTable [0.1s] Iter 04 of 19 : Generating table: bestGatesetSpamTable [0.0s] Iter 05 of 19 : Generating table: bestGatesetSpamParametersTable [0.0s] Iter 06 of 19 : Generating table: bestGatesetGaugeOptParamsTable [0.0s] Iter 07 of 19 : Generating table: bestGatesetGatesTable [0.0s] Iter 08 of 19 : Generating table: bestGatesetChoiTable [0.0s] Iter 09 of 19 : Generating table: bestGatesetDecompTable [0.0s] Iter 10 of 19 : Generating table: bestGatesetRotnAxisTable [0.0s] Iter 11 of 19 : Generating table: bestGatesetVsTargetTable [0.4s] Iter 12 of 19 : Generating table: bestGatesetErrorGenTable [0.0s] Iter 13 of 19 : Generating table: metadataTable [0.0s] Iter 14 of 19 : Generating table: softwareEnvTable [0.3s] Iter 15 of 19 : Generating table: fiducialListTable [0.0s] Iter 16 of 19 : Generating table: prepStrListTable [0.0s] Iter 17 of 19 : Generating table: effectStrListTable [0.0s] Iter 18 of 19 : Generating table: germListTable [0.0s] Iter 19 of 19 : Generating table: progressTable [2.2s] *** Generating plots *** LogL plots (2): Iter 1 of 3 : Generating figure: colorBoxPlotKeyPlot [2.1s] Iter 2 of 3 : Generating figure: bestEstimateColorBoxPlot [38.5s] Iter 3 of 3 : Generating figure: invertedBestEstimateColorBoxPlot [35.6s] *** 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... *** 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
ERROR: pdflatex returned code 1 Check Example_slidesB.log to see details.
*** 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...
ERROR: b'system returned with code 256\n' ERROR: pdflatex returned code 1 trying to render standalone datasetOverviewTable. Check datasetOverviewTable.log to see details.
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 [3.5s] Retrieving cached table: datasetOverviewTable Generating table: bestGatesetEvalTable [1.2s] Generating table: bestGatesetRelEvalTable [1.1s] Generating table: targetGatesBoxTable [2.4s] Generating table: bestGatesetGatesBoxTable [4.8s] Generating table: bestGatesetErrGenBoxTable [6.5s] Retrieving cached table: metadataTable Retrieving cached table: softwareEnvTable Retrieving cached table: fiducialListTable Retrieving cached table: prepStrListTable Retrieving cached table: effectStrListTable Generating table: germList2ColTable [0.0s] Retrieving cached table: progressTable *** Generating plots *** (29.8s elapsed) -- LogL plots: Iter 1 of 3 : Retrieving cached figure: colorBoxPlotKeyPlot Iter 2 of 3 : Generating figure: bestEstimateSummedColorBoxPlot [3.6s] Iter 3 of 3 : Generating special: bestEstimateColorBoxPlotPages [25.6s] *** Merging into template file *** (71.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 78s]
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) --- 29s 0.0263698971 57s 0.0260672654 71s 0.0257208064 85s 0.0255807596 98s 0.0254232097 113s 0.0253751581 124s 0.0253332390 133s 0.0253177722 143s 0.0253115074 153s 0.0253083183 162s 0.0253060050 171s 0.0253042819 181s 0.0253029233 191s 0.0253010474 199s 0.0252997419 207s 0.0252988645 The resulting min sqrt(sum(gateCIs**2)): 0.0252989 *** Generating tables *** Iter 01 of 19 : Generating table: targetSpamTable (w/95% CIs) [0.0s] Iter 02 of 19 : Generating table: targetGatesTable (w/95% CIs) [0.0s] Iter 03 of 19 : Generating table: datasetOverviewTable (w/95% CIs) [0.0s] Iter 04 of 19 : Generating table: bestGatesetSpamTable (w/95% CIs) [0.0s] Iter 05 of 19 : Generating table: bestGatesetSpamParametersTable (w/95% CIs) [0.0s] Iter 06 of 19 : Generating table: bestGatesetGaugeOptParamsTable (w/95% CIs) [0.0s] Iter 07 of 19 : Generating table: bestGatesetGatesTable (w/95% CIs) [0.0s] Iter 08 of 19 : Generating table: bestGatesetChoiTable (w/95% CIs) [0.3s] Iter 09 of 19 : Generating table: bestGatesetDecompTable (w/95% CIs) [0.3s] Iter 10 of 19 : Generating table: bestGatesetRotnAxisTable (w/95% CIs) [0.4s] Iter 11 of 19 : Generating table: bestGatesetVsTargetTable (w/95% CIs) [1.7s] Iter 12 of 19 : Generating table: bestGatesetErrorGenTable (w/95% CIs) [0.0s] Iter 13 of 19 : Generating table: metadataTable (w/95% CIs) Retrieving cached table: metadataTable Iter 14 of 19 : Generating table: softwareEnvTable (w/95% CIs) Retrieving cached table: softwareEnvTable Iter 15 of 19 : Generating table: fiducialListTable (w/95% CIs) [0.0s] Iter 16 of 19 : Generating table: prepStrListTable (w/95% CIs) [0.0s] Iter 17 of 19 : Generating table: effectStrListTable (w/95% CIs) [0.0s] Iter 18 of 19 : Generating table: germListTable (w/95% CIs) [0.0s] Iter 19 of 19 : Generating table: progressTable (w/95% CIs) [0.9s] 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] [42.0s] *** 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.5s] Iter 5 of 9 : Generating figure: estimateForLIndex4ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex4ColorBoxPlot[6.4s] Iter 6 of 9 : Generating figure: estimateForLIndex5ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex5ColorBoxPlot[8.1s] Iter 7 of 9 : Generating figure: estimateForLIndex6ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex6ColorBoxPlot[10.0s] Iter 8 of 9 : Generating figure: estimateForLIndex7ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex7ColorBoxPlot[11.7s] Iter 9 of 9 : Generating figure: estimateForLIndex8ColorBoxPlot (w/95% CIs)Generating figure: estimateForLIndex8ColorBoxPlot[13.7s] -- 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 [16.3s] [20.0s] Iter 2 of 2 : Generating figure: directLongSeqGSTDeviationColorBoxPlot (w/95% CIs) Generating figure: directLongSeqGSTDeviationColorBoxPlot Retrieving cached special: DirectLongSeqGatesets (w/95% CIs) [2.0s] -- 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 [37.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)
[35.5s] Iter 3 of 3 : Generating figure: whackGiMoleBoxes (w/95% CIs) Generating figure: whackGiMoleBoxes [35.6s] 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.3s] Iter 3 of 3 : Generating figure: whackGiMoleBoxesSummed (w/95% CIs) Generating figure: whackGiMoleBoxesSummed [22.2s] *** 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... *** 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)
ERROR: pdflatex returned code 1 Check Example_slides.log to see details.
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...
ERROR: b'system returned with code 256\n' ERROR: pdflatex returned code 1 trying to render standalone datasetOverviewTable. Check datasetOverviewTable.log to see details.
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.2s] Retrieving cached table: datasetOverviewTable (w/95% CIs) Generating table: bestGatesetEvalTable (w/95% CIs) [0.7s] Generating table: bestGatesetRelEvalTable (w/95% CIs) [0.6s] Generating table: targetGatesBoxTable (w/95% CIs) [1.3s] Generating table: bestGatesetGatesBoxTable (w/95% CIs) [2.6s] Generating table: bestGatesetErrGenBoxTable (w/95% CIs) [3.7s] Retrieving cached table: metadataTable (w/95% CIs) Retrieving cached table: softwareEnvTable (w/95% CIs) 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 *** (18.3s 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 *** (26.8s 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 31s]
#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}'